	.file	"extr_ar9003_mci.c_ar9003_mci_stop_bt.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ar9003_mci_stop_bt
	.type	ar9003_mci_stop_bt, @function
ar9003_mci_stop_bt:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	ar9003_mci_disable_interrupt@PLT
	mov	eax, DWORD PTR [rbx]
	test	eax, eax
	je	.L2
	test	ebp, ebp
	je	.L11
.L2:
	mov	eax, DWORD PTR MCI_BT_SLEEP[rip]
	mov	DWORD PTR [rbx], 0
	mov	DWORD PTR 4[rbx], eax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	rdi, rbx
	call	ar9003_mci_mute_bt@PLT
	mov	edi, 20
	call	udelay@PLT
	mov	esi, DWORD PTR AR_BTCOEX_CTRL[rip]
	xor	edx, edx
	mov	rdi, rbx
	call	REG_WRITE@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	ar9003_mci_stop_bt, .-ar9003_mci_stop_bt
	.comm	MCI_BT_SLEEP,4,4
	.comm	AR_BTCOEX_CTRL,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_ar9003_mci.c_ar9003_mci_stop_bt.c"
	.text
	.align	2
	.global	ar9003_mci_stop_bt
	.syntax unified
	.arm
	.fpu softvfp
	.type	ar9003_mci_stop_bt, %function
ar9003_mci_stop_bt:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r1
	mov	r5, r0
	bl	ar9003_mci_disable_interrupt
	clz	r1, r4
	ldr	r3, [r5]
	lsr	r1, r1, #5
	cmp	r3, #0
	moveq	r1, #0
	cmp	r1, #0
	bne	.L8
.L2:
	mov	r2, #0
	ldr	r3, .L9
	ldr	r3, [r3]
	stm	r5, {r2, r3}
	pop	{r4, r5, r6, pc}
.L8:
	mov	r0, r5
	bl	ar9003_mci_mute_bt
	mov	r0, #20
	bl	udelay
	ldr	r3, .L9+4
	mov	r2, #0
	mov	r0, r5
	ldr	r1, [r3]
	bl	REG_WRITE
	b	.L2
.L10:
	.align	2
.L9:
	.word	MCI_BT_SLEEP
	.word	AR_BTCOEX_CTRL
	.size	ar9003_mci_stop_bt, .-ar9003_mci_stop_bt
	.comm	MCI_BT_SLEEP,4,4
	.comm	AR_BTCOEX_CTRL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
