	.file	"extr_main.c_ath_reset_internal.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Reset to %u MHz, HT40: %d fastcc: %d\n"
	.align 8
.LC1:
	.string	"Unable to reset channel, reset status %d\n"
	.text
	.p2align 4
	.type	ath_reset_internal, @function
ath_reset_internal:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	lea	r15, 4[rbp]
	lea	rbx, 8[rbp]
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	r14, QWORD PTR 24[rdi]
	mov	rdi, r14
	call	ath9k_hw_common@PLT
	mov	rdi, rbp
	mov	QWORD PTR 8[rsp], rax
	call	__ath_cancel_work@PLT
	mov	edi, DWORD PTR 12[rbp]
	call	disable_irq@PLT
	mov	rdi, rbp
	call	tasklet_disable@PLT
	mov	rdi, r15
	call	tasklet_disable@PLT
	mov	rdi, rbx
	call	spin_lock_bh@PLT
	mov	r10, QWORD PTR 16[rbp]
	cmp	QWORD PTR [r10], 0
	jne	.L9
	add	r10, 12
	xor	r13d, r13d
	test	r12, r12
	je	.L17
.L3:
	mov	rdi, rbp
	mov	QWORD PTR 24[rsp], r10
	call	ath_prepare_reset@PLT
	xor	edx, edx
	test	eax, eax
	cmove	r13d, edx
	xor	eax, eax
	call	ath9k_is_chanctx_enabled@PLT
	mov	edx, 0
	lea	rdi, 32[rbp]
	test	rax, rax
	mov	QWORD PTR 16[rsp], rdi
	cmovne	r13d, edx
	call	spin_lock_bh@PLT
	mov	rax, QWORD PTR 16[rbp]
	mov	rdi, QWORD PTR 16[rsp]
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR 36[rbp], eax
	call	spin_unlock_bh@PLT
	mov	rdi, r12
	call	IS_CHAN_HT40@PLT
	mov	ecx, DWORD PTR [r12]
	mov	rdi, QWORD PTR 8[rsp]
	mov	r9d, r13d
	mov	esi, DWORD PTR CONFIG[rip]
	mov	r8d, eax
	lea	rdx, .LC0[rip]
	call	ath_dbg@PLT
	mov	r10, QWORD PTR 24[rsp]
	mov	rsi, r12
	mov	ecx, r13d
	mov	rdi, r14
	mov	rdx, r10
	call	ath9k_hw_reset@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L18
	mov	rdi, QWORD PTR 24[rbp]
	call	ath9k_hw_mci_is_enabled@PLT
	test	rax, rax
	je	.L8
	mov	rax, QWORD PTR 16[rbp]
	cmp	QWORD PTR [rax], 0
	jne	.L19
.L8:
	mov	esi, 1
	mov	rdi, rbp
	call	ath_complete_reset@PLT
	test	eax, eax
	jne	.L7
	mov	r12d, DWORD PTR EIO[rip]
	neg	r12d
.L7:
	mov	edi, DWORD PTR 12[rbp]
	call	enable_irq@PLT
	mov	rdi, rbx
	call	spin_unlock_bh@PLT
	mov	rdi, r15
	call	tasklet_enable@PLT
	mov	rdi, rbp
	call	tasklet_enable@PLT
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	r13d, 1
	xor	r10d, r10d
	test	r12, r12
	jne	.L3
.L17:
	mov	r12, QWORD PTR [r14]
	xor	r13d, r13d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rdi, QWORD PTR 8[rsp]
	mov	edx, eax
	lea	rsi, .LC1[rip]
	call	ath_err@PLT
	mov	rdi, r14
	call	ath9k_hw_enable_interrupts@PLT
	mov	esi, DWORD PTR RESET_TYPE_BB_HANG[rip]
	mov	rdi, rbp
	call	ath9k_queue_reset@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L19:
	xor	edx, edx
	mov	esi, 1
	mov	rdi, rbp
	call	ath9k_mci_set_txpower@PLT
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	ath_reset_internal, .-ath_reset_internal
	.comm	RESET_TYPE_BB_HANG,4,4
	.comm	EIO,4,4
	.comm	CONFIG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_main.c_ath_reset_internal.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Reset to %u MHz, HT40: %d fastcc: %d\012\000"
	.align	2
.LC1:
	.ascii	"Unable to reset channel, reset status %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ath_reset_internal, %function
ath_reset_internal:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r9, [r0, #20]
	sub	sp, sp, #20
	mov	r4, r0
	mov	r0, r9
	mov	r6, r1
	bl	ath9k_hw_common
	mov	r8, r0
	mov	r0, r4
	bl	__ath_cancel_work
	ldr	r0, [r4, #12]
	bl	disable_irq
	add	r10, r4, #4
	mov	r0, r4
	bl	tasklet_disable
	add	fp, r4, #8
	mov	r0, r10
	bl	tasklet_disable
	mov	r0, fp
	bl	spin_lock_bh
	ldr	r7, [r4, #16]
	mov	r0, r4
	ldr	r5, [r7]
	cmp	r5, #0
	movne	r5, #1
	movne	r7, #0
	addeq	r7, r7, #8
	cmp	r6, #0
	moveq	r5, #0
	ldreq	r6, [r9]
	bl	ath_prepare_reset
	cmp	r0, #0
	moveq	r5, #0
	bl	ath9k_is_chanctx_enabled
	add	r3, r4, #24
	cmp	r0, #0
	mov	r0, r3
	movne	r5, #0
	str	r3, [sp, #8]
	bl	spin_lock_bh
	ldr	r2, [r4, #16]
	ldr	r3, [sp, #8]
	mov	r0, r3
	ldr	r3, [r2, #4]
	str	r3, [r4, #28]
	bl	spin_unlock_bh
	ldr	r3, .L22
	mov	r0, r6
	ldr	r1, [r3]
	ldr	r3, [r6]
	str	r1, [sp, #12]
	str	r3, [sp, #8]
	bl	IS_CHAN_HT40
	ldr	r1, [sp, #12]
	ldr	r3, [sp, #8]
	ldr	r2, .L22+4
	str	r5, [sp, #4]
	str	r0, [sp]
	mov	r0, r8
	bl	ath_dbg
	mov	r3, r5
	mov	r2, r7
	mov	r1, r6
	mov	r0, r9
	bl	ath9k_hw_reset
	subs	r5, r0, #0
	bne	.L20
	ldr	r0, [r4, #20]
	bl	ath9k_hw_mci_is_enabled
	cmp	r0, #0
	bne	.L21
.L8:
	mov	r1, #1
	mov	r0, r4
	bl	ath_complete_reset
	cmp	r0, #0
	ldreq	r3, .L22+8
	ldreq	r0, [r3]
	rsbeq	r5, r0, #0
.L7:
	ldr	r0, [r4, #12]
	bl	enable_irq
	mov	r0, fp
	bl	spin_unlock_bh
	mov	r0, r10
	bl	tasklet_enable
	mov	r0, r4
	bl	tasklet_enable
	mov	r0, r5
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L21:
	ldr	r3, [r4, #16]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L8
	mov	r2, r5
	mov	r1, #1
	mov	r0, r4
	bl	ath9k_mci_set_txpower
	b	.L8
.L20:
	mov	r2, r5
	ldr	r1, .L22+12
	mov	r0, r8
	bl	ath_err
	mov	r0, r9
	bl	ath9k_hw_enable_interrupts
	ldr	r3, .L22+16
	mov	r0, r4
	ldr	r1, [r3]
	bl	ath9k_queue_reset
	b	.L7
.L23:
	.align	2
.L22:
	.word	CONFIG
	.word	.LC0
	.word	EIO
	.word	.LC1
	.word	RESET_TYPE_BB_HANG
	.size	ath_reset_internal, .-ath_reset_internal
	.comm	RESET_TYPE_BB_HANG,4,4
	.comm	EIO,4,4
	.comm	CONFIG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
