	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qtnf_core_detach               ## -- Begin function qtnf_core_detach
	.p2align	4, 0x90
_qtnf_core_detach:                      ## @qtnf_core_detach
	.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, %r14
	callq	_qtnf_bus_data_rx_stop
	movq	_QTNF_MAX_MAC@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	je	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_qtnf_core_mac_detach
	incl	%ebx
	cmpl	(%r15), %ebx
	jb	LBB0_2
LBB0_3:
	movq	%r14, %rdi
	callq	_qtnf_fw_is_up
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_qtnf_cmd_send_deinit_fw
LBB0_5:
	movq	_QTNF_FW_STATE_DETACHED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	callq	_flush_workqueue
	movq	8(%r14), %rdi
	callq	_destroy_workqueue
	movq	$0, 8(%r14)
LBB0_7:
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	callq	_flush_workqueue
	movq	(%r14), %rdi
	callq	_destroy_workqueue
	movq	$0, (%r14)
LBB0_9:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_qtnf_trans_free                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_QTNF_MAX_MAC,4,2               ## @QTNF_MAX_MAC
	.comm	_QTNF_FW_STATE_DETACHED,4,2     ## @QTNF_FW_STATE_DETACHED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qtnf_core_detach               ; -- Begin function qtnf_core_detach
	.p2align	2
_qtnf_core_detach:                      ; @qtnf_core_detach
	.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
	bl	_qtnf_bus_data_rx_stop
Lloh0:
	adrp	x21, _QTNF_MAX_MAC@GOTPAGE
Lloh1:
	ldr	x21, [x21, _QTNF_MAX_MAC@GOTPAGEOFF]
	ldr	w8, [x21]
	cbz	w8, LBB0_3
; %bb.1:
	mov	w20, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_qtnf_core_mac_detach
	add	w20, w20, #1
	ldr	w8, [x21]
	cmp	w20, w8
	b.lo	LBB0_2
LBB0_3:
	mov	x0, x19
	bl	_qtnf_fw_is_up
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_qtnf_cmd_send_deinit_fw
LBB0_5:
Lloh2:
	adrp	x8, _QTNF_FW_STATE_DETACHED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _QTNF_FW_STATE_DETACHED@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_7
; %bb.6:
	bl	_flush_workqueue
	ldr	x0, [x19, #8]
	bl	_destroy_workqueue
	str	xzr, [x19, #8]
LBB0_7:
	ldr	x0, [x19]
	cbz	x0, LBB0_9
; %bb.8:
	bl	_flush_workqueue
	ldr	x0, [x19]
	bl	_destroy_workqueue
	str	xzr, [x19]
LBB0_9:
	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	_qtnf_trans_free
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_QTNF_MAX_MAC,4,2               ; @QTNF_MAX_MAC
	.comm	_QTNF_FW_STATE_DETACHED,4,2     ; @QTNF_FW_STATE_DETACHED
.subsections_via_symbols
