	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BTE_Shutdown                   ## -- Begin function BTE_Shutdown
	.p2align	4, 0x90
_BTE_Shutdown:                          ## @BTE_Shutdown
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_btstate@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	je	LBB0_1
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_LOG
	callq	__CPU_ISR_Disable
	movl	32(%rbx), %edi
	callq	_SYS_RemoveAlarm
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rbx)
	movq	$0, 24(%rbx)
	movq	%rbx, %rdi
	callq	_hci_arg
	movq	___bte_shutdown_finished@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_hci_cmd_complete
	xorl	%eax, %eax
	callq	_hci_reset
	movq	%rbx, %rdi
	callq	___bte_waitcmdfinish
	callq	__CPU_ISR_Restore
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_physbusif_shutdown             ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_btstate,40,3                   ## @btstate
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BTE_Shutdown()\n"

	.comm	___bte_shutdown_finished,4,2    ## @__bte_shutdown_finished
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BTE_Shutdown                   ; -- Begin function BTE_Shutdown
	.p2align	2
_BTE_Shutdown:                          ; @BTE_Shutdown
	.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
Lloh0:
	adrp	x19, _btstate@GOTPAGE
Lloh1:
	ldr	x19, [x19, _btstate@GOTPAGEOFF]
	ldr	x8, [x19]
	cbz	x8, LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_LOG
	bl	__CPU_ISR_Disable
	ldr	w0, [x19, #32]
	bl	_SYS_RemoveAlarm
	stp	xzr, xzr, [x19, #16]
	str	xzr, [x19, #8]
	mov	x0, x19
	bl	_hci_arg
Lloh4:
	adrp	x8, ___bte_shutdown_finished@GOTPAGE
Lloh5:
	ldr	x8, [x8, ___bte_shutdown_finished@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_hci_cmd_complete
	bl	_hci_reset
	mov	x0, x19
	bl	___bte_waitcmdfinish
	bl	__CPU_ISR_Restore
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_physbusif_shutdown
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_btstate,40,3                   ; @btstate
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BTE_Shutdown()\n"

	.comm	___bte_shutdown_finished,4,2    ; @__bte_shutdown_finished
.subsections_via_symbols
