	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btsdio_close
_btsdio_close:                          ## @btsdio_close
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movl	4(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	callq	_BT_DBG
	movq	_HCI_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_and_clear_bit
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	(%r14), %edi
	callq	_sdio_claim_host
	movl	(%r14), %edi
	movq	_REG_EN_INTRD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_sdio_writeb
	movl	(%r14), %edi
	callq	_sdio_release_irq
	movl	(%r14), %edi
	callq	_sdio_disable_func
	movl	(%r14), %edi
	callq	_sdio_release_host
LBB0_2:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_HCI_RUNNING,4,2                ## @HCI_RUNNING
	.comm	_REG_EN_INTRD,4,2               ## @REG_EN_INTRD
	.no_dead_strip	_btsdio_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btsdio_close
_btsdio_close:                          ; @btsdio_close
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x20, [x0, #8]
	ldr	w1, [x0, #4]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BT_DBG
Lloh2:
	adrp	x8, _HCI_RUNNING@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HCI_RUNNING@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_and_clear_bit
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x20]
	bl	_sdio_claim_host
	ldr	w0, [x20]
Lloh5:
	adrp	x8, _REG_EN_INTRD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _REG_EN_INTRD@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	w1, #0
	mov	x3, #0
	bl	_sdio_writeb
	ldr	w0, [x20]
	bl	_sdio_release_irq
	ldr	w0, [x20]
	bl	_sdio_disable_func
	ldr	w0, [x20]
	bl	_sdio_release_host
LBB0_2:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_HCI_RUNNING,4,2                ; @HCI_RUNNING
	.comm	_REG_EN_INTRD,4,2               ; @REG_EN_INTRD
	.no_dead_strip	_btsdio_close
.subsections_via_symbols
