	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hci_dev_reset                  ## -- Begin function hci_dev_reset
	.p2align	4, 0x90
_hci_dev_reset:                         ## @hci_dev_reset
	.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
	callq	_hci_dev_get
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_hci_req_lock
	movq	%rbx, %rdi
	callq	_tasklet_disable
	movq	_HCI_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%rbx), %r15
	movq	%r15, %rsi
	callq	_test_bit
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_7
## %bb.3:
	leaq	44(%rbx), %rdi
	callq	_skb_queue_purge
	leaq	40(%rbx), %rdi
	callq	_skb_queue_purge
	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	32(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	*%rax
LBB0_5:
	movq	%rbx, %rdi
	addq	$24, %rdi
	movl	$1, %esi
	callq	_atomic_set
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rbx)
	movq	_HCI_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	_hci_reset_req@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_HCI_INIT_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rbx, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	movl	%eax, %ecx
	callq	___hci_request
	movl	%eax, %r14d
LBB0_7:
	movq	%rbx, %rdi
	callq	_tasklet_enable
	movq	%rbx, %rdi
	callq	_hci_req_unlock
	movq	%rbx, %rdi
	callq	_hci_dev_put
	jmp	LBB0_8
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_HCI_UP,4,2                     ## @HCI_UP
	.comm	_HCI_RAW,4,2                    ## @HCI_RAW
	.comm	_hci_reset_req,4,2              ## @hci_reset_req
	.comm	_HCI_INIT_TIMEOUT,4,2           ## @HCI_INIT_TIMEOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hci_dev_reset                  ; -- Begin function hci_dev_reset
	.p2align	2
_hci_dev_reset:                         ; @hci_dev_reset
	.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
	bl	_hci_dev_get
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	bl	_hci_req_lock
	mov	x0, x19
	bl	_tasklet_disable
Lloh0:
	adrp	x8, _HCI_UP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HCI_UP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x20, x19, #4
	mov	x1, x20
	bl	_test_bit
	cbz	w0, LBB0_5
; %bb.2:
	add	x0, x19, #44
	bl	_skb_queue_purge
	add	x0, x19, #40
	bl	_skb_queue_purge
	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
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x19
	blr	x8
LBB0_4:
	add	x0, x19, #24
	mov	w1, #1
	bl	_atomic_set
	stp	xzr, xzr, [x19, #8]
Lloh3:
	adrp	x8, _HCI_RAW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HCI_RAW@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_test_bit
	cbz	w0, LBB0_7
LBB0_5:
	mov	w20, #0
	b	LBB0_8
LBB0_6:
Lloh6:
	adrp	x8, _ENODEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_9
LBB0_7:
Lloh9:
	adrp	x8, _hci_reset_req@GOTPAGE
Lloh10:
	ldr	x8, [x8, _hci_reset_req@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
Lloh12:
	adrp	x8, _HCI_INIT_TIMEOUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HCI_INIT_TIMEOUT@GOTPAGEOFF]
Lloh14:
	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
LBB0_8:
	mov	x0, x19
	bl	_tasklet_enable
	mov	x0, x19
	bl	_hci_req_unlock
	mov	x0, x19
	bl	_hci_dev_put
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_HCI_UP,4,2                     ; @HCI_UP
	.comm	_HCI_RAW,4,2                    ; @HCI_RAW
	.comm	_hci_reset_req,4,2              ; @hci_reset_req
	.comm	_HCI_INIT_TIMEOUT,4,2           ; @HCI_INIT_TIMEOUT
.subsections_via_symbols
