	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ieee80211_ifdetach             ## -- Begin function ieee80211_ifdetach
	.p2align	4, 0x90
_ieee80211_ifdetach:                    ## @ieee80211_ifdetach
	.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
	cmpq	$0, (%rdi)
	je	LBB0_5
## %bb.1:
	movq	%rdi, %r14
	movq	_ic_list_mtx@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_mtx_lock
	movq	_ic_next@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_LIST_REMOVE
	movq	%rbx, %rdi
	callq	_mtx_unlock
	movq	_taskqueue_thread@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	20(%r14), %rsi
	callq	_taskqueue_drain
	leaq	16(%r14), %r15
	movq	%r15, %rdi
	callq	_TAILQ_FIRST
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%rax, %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_ieee80211_com_vdetach
	movq	%rbx, %rdi
	callq	_ieee80211_vap_destroy
	movq	%r15, %rdi
	callq	_TAILQ_FIRST
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_3
LBB0_4:
	movq	%r14, %rdi
	callq	_ieee80211_waitfor_parent
	movq	%r14, %rdi
	callq	_ieee80211_sysctl_detach
	movq	%r14, %rdi
	callq	_ieee80211_dfs_detach
	movq	%r14, %rdi
	callq	_ieee80211_regdomain_detach
	movq	%r14, %rdi
	callq	_ieee80211_scan_detach
	movq	%r14, %rdi
	callq	_ieee80211_vht_detach
	movq	%r14, %rdi
	callq	_ieee80211_ht_detach
	movq	%r14, %rdi
	callq	_ieee80211_proto_detach
	movq	%r14, %rdi
	callq	_ieee80211_crypto_detach
	movq	%r14, %rdi
	callq	_ieee80211_power_detach
	movq	%r14, %rdi
	callq	_ieee80211_node_detach
	movl	12(%r14), %edi
	callq	_counter_u64_free
	movl	8(%r14), %edi
	callq	_counter_u64_free
	movq	(%r14), %rdi
	callq	_taskqueue_free
	movq	%r14, %rdi
	callq	_IEEE80211_TX_LOCK_DESTROY
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_IEEE80211_LOCK_DESTROY         ## TAILCALL
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ic_list_mtx,4,2                ## @ic_list_mtx
	.comm	_ic_next,4,2                    ## @ic_next
	.comm	_taskqueue_thread,4,2           ## @taskqueue_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ieee80211_ifdetach             ; -- Begin function ieee80211_ifdetach
	.p2align	2
_ieee80211_ifdetach:                    ; @ieee80211_ifdetach
	.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	x8, [x0]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x20, _ic_list_mtx@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ic_list_mtx@GOTPAGEOFF]
	mov	x0, x20
	bl	_mtx_lock
Lloh2:
	adrp	x8, _ic_next@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ic_next@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_LIST_REMOVE
	mov	x0, x20
	bl	_mtx_unlock
Lloh5:
	adrp	x8, _taskqueue_thread@GOTPAGE
Lloh6:
	ldr	x8, [x8, _taskqueue_thread@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	add	x1, x19, #20
	bl	_taskqueue_drain
	add	x20, x19, #16
	mov	x0, x20
	bl	_TAILQ_FIRST
	cbz	x0, LBB0_4
; %bb.2:
	mov	x21, x0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_ieee80211_com_vdetach
	mov	x0, x21
	bl	_ieee80211_vap_destroy
	mov	x0, x20
	bl	_TAILQ_FIRST
	mov	x21, x0
	cbnz	x0, LBB0_3
LBB0_4:
	mov	x0, x19
	bl	_ieee80211_waitfor_parent
	mov	x0, x19
	bl	_ieee80211_sysctl_detach
	mov	x0, x19
	bl	_ieee80211_dfs_detach
	mov	x0, x19
	bl	_ieee80211_regdomain_detach
	mov	x0, x19
	bl	_ieee80211_scan_detach
	mov	x0, x19
	bl	_ieee80211_vht_detach
	mov	x0, x19
	bl	_ieee80211_ht_detach
	mov	x0, x19
	bl	_ieee80211_proto_detach
	mov	x0, x19
	bl	_ieee80211_crypto_detach
	mov	x0, x19
	bl	_ieee80211_power_detach
	mov	x0, x19
	bl	_ieee80211_node_detach
	ldr	w0, [x19, #12]
	bl	_counter_u64_free
	ldr	w0, [x19, #8]
	bl	_counter_u64_free
	ldr	x0, [x19]
	bl	_taskqueue_free
	mov	x0, x19
	bl	_IEEE80211_TX_LOCK_DESTROY
	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	_IEEE80211_LOCK_DESTROY
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	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ic_list_mtx,4,2                ; @ic_list_mtx
	.comm	_ic_next,4,2                    ; @ic_next
	.comm	_taskqueue_thread,4,2           ; @taskqueue_thread
.subsections_via_symbols
