	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dtl1_close
_dtl1_close:                            ## @dtl1_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	8(%rdi), %r15
	testq	%r15, %r15
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movl	(%rax), %r12d
	movq	%r15, %rdi
	callq	_dtl1_hci_close
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	_UART_MCR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r12, %rsi
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	callq	_outb
	movq	_UART_IER@GOTPCREL(%rip), %rax
	addq	(%rax), %r12
	xorl	%edi, %edi
	movq	%r12, %rsi
	callq	_outb
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r15, %rdi
	callq	_hci_unregister_dev
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	movl	(%r15), %esi
	leaq	L_.str(%rip), %rdi
	callq	_BT_ERR
LBB0_4:
	movq	%r15, %rdi
	callq	_hci_free_dev
	jmp	LBB0_5
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_UART_MCR,8,3                   ## @UART_MCR
	.comm	_UART_IER,8,3                   ## @UART_IER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't unregister HCI device %s"

	.no_dead_strip	_dtl1_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dtl1_close
_dtl1_close:                            ; @dtl1_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
	ldr	x19, [x0, #8]
	cbz	x19, LBB0_4
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0, #16]
	ldr	w21, [x8]
	mov	x0, x19
	bl	_dtl1_hci_close
	mov	x0, x20
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x8, _UART_MCR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UART_MCR@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x1, x8, x21
	mov	w0, #0
	bl	_outb
Lloh3:
	adrp	x8, _UART_IER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UART_IER@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x1, x8, x21
	mov	w0, #0
	bl	_outb
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_hci_unregister_dev
	tbz	x0, #63, LBB0_3
; %bb.2:
	ldr	w1, [x19]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BT_ERR
LBB0_3:
	mov	x0, x19
	bl	_hci_free_dev
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_UART_MCR,8,3                   ; @UART_MCR
	.comm	_UART_IER,8,3                   ; @UART_IER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't unregister HCI device %s"

	.no_dead_strip	_dtl1_close
.subsections_via_symbols
