	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hci_dev_do_close
_hci_dev_do_close:                      ## @hci_dev_do_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	64(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rdx
	callq	_BT_DBG
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_hci_req_cancel
	movq	%rbx, %rdi
	callq	_hci_req_lock
	movq	_HCI_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_and_clear_bit
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	leaq	60(%rbx), %rdi
	callq	_tasklet_kill
	leaq	56(%rbx), %rdi
	callq	_tasklet_kill
	movq	%rbx, %rdi
	callq	_hci_dev_lock_bh
	movq	%rbx, %rdi
	callq	_inquiry_cache_flush
	movq	%rbx, %rdi
	callq	_hci_conn_hash_flush
	movq	%rbx, %rdi
	callq	_hci_dev_unlock_bh
	movq	_HCI_DEV_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_hci_notify
	movq	48(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	*%rax
LBB0_4:
	leaq	28(%rbx), %r14
	movq	%r14, %rdi
	callq	_skb_queue_purge
	leaq	40(%rbx), %rdi
	movl	$1, %esi
	callq	_atomic_set
	movq	_HCI_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	_HCI_INIT@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_set_bit
	movq	_hci_reset_req@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	$250, %edi
	callq	_msecs_to_jiffies
	movq	%rbx, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	movl	%eax, %ecx
	callq	___hci_request
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_clear_bit
LBB0_6:
	leaq	36(%rbx), %rdi
	callq	_tasklet_kill
	leaq	32(%rbx), %rdi
	callq	_skb_queue_purge
	movq	%r14, %rdi
	callq	_skb_queue_purge
	leaq	24(%rbx), %rdi
	callq	_skb_queue_purge
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:
	callq	_kfree_skb
	movq	$0, 16(%rbx)
LBB0_8:
	movq	%rbx, %rdi
	callq	*8(%rbx)
	movq	$0, (%rbx)
	movq	%rbx, %rdi
	callq	_hci_req_unlock
	movq	%rbx, %rdi
	callq	_hci_dev_put
	jmp	LBB0_9
LBB0_1:
	movq	%rbx, %rdi
	callq	_hci_req_unlock
LBB0_9:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s %p"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_HCI_UP,4,2                     ## @HCI_UP
	.comm	_HCI_DEV_DOWN,4,2               ## @HCI_DEV_DOWN
	.comm	_HCI_RAW,4,2                    ## @HCI_RAW
	.comm	_HCI_INIT,4,2                   ## @HCI_INIT
	.comm	_hci_reset_req,4,2              ## @hci_reset_req
	.no_dead_strip	_hci_dev_do_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hci_dev_do_close
_hci_dev_do_close:                      ; @hci_dev_do_close
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	w1, [x0, #64]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x19
	bl	_BT_DBG
Lloh2:
	adrp	x8, _ENODEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hci_req_cancel
	mov	x0, x19
	bl	_hci_req_lock
Lloh5:
	adrp	x8, _HCI_UP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HCI_UP@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_and_clear_bit
	cbz	w0, LBB0_8
; %bb.1:
	add	x0, x19, #60
	bl	_tasklet_kill
	add	x0, x19, #56
	bl	_tasklet_kill
	mov	x0, x19
	bl	_hci_dev_lock_bh
	mov	x0, x19
	bl	_inquiry_cache_flush
	mov	x0, x19
	bl	_hci_conn_hash_flush
	mov	x0, x19
	bl	_hci_dev_unlock_bh
Lloh8:
	adrp	x8, _HCI_DEV_DOWN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HCI_DEV_DOWN@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hci_notify
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x19
	blr	x8
LBB0_3:
	add	x20, x19, #28
	mov	x0, x20
	bl	_skb_queue_purge
	add	x0, x19, #40
	mov	w1, #1
	bl	_atomic_set
Lloh11:
	adrp	x8, _HCI_RAW@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HCI_RAW@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_bit
	cbnz	w0, LBB0_5
; %bb.4:
Lloh14:
	adrp	x22, _HCI_INIT@GOTPAGE
Lloh15:
	ldr	x22, [x22, _HCI_INIT@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x1, x19
	bl	_set_bit
Lloh16:
	adrp	x8, _hci_reset_req@GOTPAGE
Lloh17:
	ldr	x8, [x8, _hci_reset_req@GOTPAGEOFF]
Lloh18:
	ldr	w21, [x8]
	mov	w0, #250
	bl	_msecs_to_jiffies
	mov	x3, x0
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	bl	___hci_request
	ldr	w0, [x22]
	mov	x1, x19
	bl	_clear_bit
LBB0_5:
	add	x0, x19, #36
	bl	_tasklet_kill
	add	x0, x19, #32
	bl	_skb_queue_purge
	mov	x0, x20
	bl	_skb_queue_purge
	add	x0, x19, #24
	bl	_skb_queue_purge
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_7
; %bb.6:
	bl	_kfree_skb
	str	xzr, [x19, #16]
LBB0_7:
	ldr	x8, [x19, #8]
	mov	x0, x19
	blr	x8
	str	xzr, [x19]
	mov	x0, x19
	bl	_hci_req_unlock
	mov	x0, x19
	bl	_hci_dev_put
	b	LBB0_9
LBB0_8:
	mov	x0, x19
	bl	_hci_req_unlock
LBB0_9:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s %p"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_HCI_UP,4,2                     ; @HCI_UP
	.comm	_HCI_DEV_DOWN,4,2               ; @HCI_DEV_DOWN
	.comm	_HCI_RAW,4,2                    ; @HCI_RAW
	.comm	_HCI_INIT,4,2                   ; @HCI_INIT
	.comm	_hci_reset_req,4,2              ; @hci_reset_req
	.no_dead_strip	_hci_dev_do_close
.subsections_via_symbols
