	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btusb_disconnect
_btusb_disconnect:                      ## @btusb_disconnect
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_usb_get_intfdata
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	callq	_BT_DBG
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.1:
	movq	16(%rbx), %r14
	movq	%r14, %rdi
	callq	___hci_dev_hold
	movq	8(%rbx), %rdi
	xorl	%esi, %esi
	callq	_usb_set_intfdata
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	xorl	%esi, %esi
	callq	_usb_set_intfdata
LBB0_3:
	movq	%r14, %rdi
	callq	_hci_unregister_dev
	movq	(%rbx), %rsi
	cmpq	%r15, %rsi
	je	LBB0_4
## %bb.5:
	testq	%rsi, %rsi
	jne	LBB0_6
	jmp	LBB0_7
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	8(%rbx), %rsi
LBB0_6:
	movq	_btusb_driver@GOTPCREL(%rip), %rdi
	callq	_usb_driver_release_interface
LBB0_7:
	movq	%r14, %rdi
	callq	___hci_dev_put
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hci_free_dev                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"intf %p"

	.comm	_btusb_driver,4,2               ## @btusb_driver
	.no_dead_strip	_btusb_disconnect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btusb_disconnect
_btusb_disconnect:                      ; @btusb_disconnect
	.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	x20, x0
	bl	_usb_get_intfdata
	mov	x21, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_BT_DBG
	cbz	x21, LBB0_5
; %bb.1:
	ldr	x19, [x21, #16]
	mov	x0, x19
	bl	___hci_dev_hold
	ldr	x0, [x21, #8]
	mov	x1, #0
	bl	_usb_set_intfdata
	ldr	x0, [x21]
	cbz	x0, LBB0_3
; %bb.2:
	mov	x1, #0
	bl	_usb_set_intfdata
LBB0_3:
	mov	x0, x19
	bl	_hci_unregister_dev
	ldr	x1, [x21]
	cmp	x1, x20
	b.eq	LBB0_6
; %bb.4:
	cbnz	x1, LBB0_7
	b	LBB0_8
LBB0_5:
	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
LBB0_6:
	ldr	x1, [x21, #8]
LBB0_7:
Lloh2:
	adrp	x0, _btusb_driver@GOTPAGE
Lloh3:
	ldr	x0, [x0, _btusb_driver@GOTPAGEOFF]
	bl	_usb_driver_release_interface
LBB0_8:
	mov	x0, x19
	bl	___hci_dev_put
	mov	x0, x19
	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
	b	_hci_free_dev
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"intf %p"

	.comm	_btusb_driver,4,2               ; @btusb_driver
	.no_dead_strip	_btusb_disconnect
.subsections_via_symbols
