	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hci_dev_open                   ## -- Begin function hci_dev_open
	.p2align	4, 0x90
_hci_dev_open:                          ## @hci_dev_open
	.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
	callq	_hci_dev_get
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movl	80(%rax), %esi
	leaq	L_.str(%rip), %rdi
	movq	%rax, %rdx
	callq	_BT_DBG
	movq	%r14, %rdi
	callq	_hci_req_lock
	movq	72(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.3:
	callq	_rfkill_blocked
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	_ERFKILL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_6:
	movq	_HCI_UP@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	%r14, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_EALREADY@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_21
LBB0_8:
	movq	_HCI_QUIRK_RAW_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	64(%r14), %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_HCI_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_set_bit
LBB0_10:
	movq	%r14, %rdi
	callq	*56(%r14)
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_20:
	movq	%r14, %rdi
	callq	_hci_req_unlock
	movq	%r14, %rdi
	callq	_hci_dev_put
LBB0_21:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	_HCI_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_13
LBB0_14:
	movq	%r14, %rdi
	callq	_hci_dev_hold
	movl	(%r15), %edi
	movq	%r14, %rsi
	callq	_set_bit
	movq	_HCI_DEV_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_hci_notify
	xorl	%ebx, %ebx
	jmp	LBB0_20
LBB0_13:
	leaq	52(%r14), %rdi
	movl	$1, %esi
	callq	_atomic_set
	movq	_HCI_INIT@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	%r14, %rsi
	callq	_set_bit
	movq	_hci_init_req@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_HCI_INIT_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%r14, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	movl	%eax, %ecx
	callq	___hci_request
	movl	%eax, %ebx
	movl	(%r12), %edi
	movq	%r14, %rsi
	callq	_clear_bit
	testl	%ebx, %ebx
	je	LBB0_14
## %bb.15:
	leaq	48(%r14), %rdi
	callq	_tasklet_kill
	leaq	44(%r14), %rdi
	callq	_tasklet_kill
	leaq	40(%r14), %rdi
	callq	_tasklet_kill
	leaq	36(%r14), %rdi
	callq	_skb_queue_purge
	movq	%r14, %rdi
	addq	$32, %rdi
	callq	_skb_queue_purge
	movq	24(%r14), %rax
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	%r14, %rdi
	callq	*%rax
LBB0_17:
	movq	16(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.18:
	callq	_kfree_skb
	movq	$0, 16(%r14)
LBB0_19:
	movq	%r14, %rdi
	callq	*8(%r14)
	movq	$0, (%r14)
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s %p"

	.comm	_ERFKILL,4,2                    ## @ERFKILL
	.comm	_HCI_UP,4,2                     ## @HCI_UP
	.comm	_EALREADY,4,2                   ## @EALREADY
	.comm	_HCI_QUIRK_RAW_DEVICE,4,2       ## @HCI_QUIRK_RAW_DEVICE
	.comm	_HCI_RAW,4,2                    ## @HCI_RAW
	.comm	_EIO,4,2                        ## @EIO
	.comm	_HCI_INIT,4,2                   ## @HCI_INIT
	.comm	_hci_init_req,4,2               ## @hci_init_req
	.comm	_HCI_INIT_TIMEOUT,4,2           ## @HCI_INIT_TIMEOUT
	.comm	_HCI_DEV_UP,4,2                 ## @HCI_DEV_UP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hci_dev_open                   ; -- Begin function hci_dev_open
	.p2align	2
_hci_dev_open:                          ; @hci_dev_open
	.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
	bl	_hci_dev_get
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	w1, [x0, #80]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x19
	bl	_BT_DBG
	mov	x0, x19
	bl	_hci_req_lock
	ldr	x0, [x19, #72]
	cbz	x0, LBB0_4
; %bb.2:
	bl	_rfkill_blocked
	cbz	x0, LBB0_4
; %bb.3:
Lloh2:
	adrp	x8, _ERFKILL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ERFKILL@GOTPAGEOFF]
	b	LBB0_11
LBB0_4:
Lloh4:
	adrp	x21, _HCI_UP@GOTPAGE
Lloh5:
	ldr	x21, [x21, _HCI_UP@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_7
; %bb.5:
Lloh6:
	adrp	x8, _EALREADY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EALREADY@GOTPAGEOFF]
	b	LBB0_11
LBB0_6:
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_13
LBB0_7:
Lloh11:
	adrp	x8, _HCI_QUIRK_RAW_DEVICE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HCI_QUIRK_RAW_DEVICE@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	add	x1, x19, #64
	bl	_test_bit
Lloh14:
	adrp	x20, _HCI_RAW@GOTPAGE
Lloh15:
	ldr	x20, [x20, _HCI_RAW@GOTPAGEOFF]
	cbz	x0, LBB0_9
; %bb.8:
	ldr	w0, [x20]
	mov	x1, x19
	bl	_set_bit
LBB0_9:
	ldr	x8, [x19, #56]
	mov	x0, x19
	blr	x8
	cbz	x0, LBB0_14
; %bb.10:
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_12:
	mov	x0, x19
	bl	_hci_req_unlock
	mov	x0, x19
	bl	_hci_dev_put
LBB0_13:
	mov	x0, x20
	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_14:
	ldr	w0, [x20]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_16
LBB0_15:
	mov	x0, x19
	bl	_hci_dev_hold
	ldr	w0, [x21]
	mov	x1, x19
	bl	_set_bit
Lloh18:
	adrp	x8, _HCI_DEV_UP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HCI_DEV_UP@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hci_notify
	mov	w20, #0
	b	LBB0_12
LBB0_16:
	add	x0, x19, #52
	mov	w1, #1
	bl	_atomic_set
Lloh21:
	adrp	x22, _HCI_INIT@GOTPAGE
Lloh22:
	ldr	x22, [x22, _HCI_INIT@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x1, x19
	bl	_set_bit
Lloh23:
	adrp	x8, _hci_init_req@GOTPAGE
Lloh24:
	ldr	x8, [x8, _hci_init_req@GOTPAGEOFF]
Lloh25:
	ldr	w20, [x8]
Lloh26:
	adrp	x8, _HCI_INIT_TIMEOUT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _HCI_INIT_TIMEOUT@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x3, x0
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	___hci_request
	mov	x20, x0
	ldr	w0, [x22]
	mov	x1, x19
	bl	_clear_bit
	cbz	w20, LBB0_15
; %bb.17:
	add	x0, x19, #48
	bl	_tasklet_kill
	add	x0, x19, #44
	bl	_tasklet_kill
	add	x0, x19, #40
	bl	_tasklet_kill
	add	x0, x19, #36
	bl	_skb_queue_purge
	add	x0, x19, #32
	bl	_skb_queue_purge
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_19
; %bb.18:
	mov	x0, x19
	blr	x8
LBB0_19:
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_21
; %bb.20:
	bl	_kfree_skb
	str	xzr, [x19, #16]
LBB0_21:
	ldr	x8, [x19, #8]
	mov	x0, x19
	blr	x8
	str	xzr, [x19]
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s %p"

	.comm	_ERFKILL,4,2                    ; @ERFKILL
	.comm	_HCI_UP,4,2                     ; @HCI_UP
	.comm	_EALREADY,4,2                   ; @EALREADY
	.comm	_HCI_QUIRK_RAW_DEVICE,4,2       ; @HCI_QUIRK_RAW_DEVICE
	.comm	_HCI_RAW,4,2                    ; @HCI_RAW
	.comm	_EIO,4,2                        ; @EIO
	.comm	_HCI_INIT,4,2                   ; @HCI_INIT
	.comm	_hci_init_req,4,2               ; @hci_init_req
	.comm	_HCI_INIT_TIMEOUT,4,2           ; @HCI_INIT_TIMEOUT
	.comm	_HCI_DEV_UP,4,2                 ; @HCI_DEV_UP
.subsections_via_symbols
