	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ieee80211_swscan_detach
_ieee80211_swscan_detach:               ## @ieee80211_swscan_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	8(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.1:
	movq	%rdi, %r14
	movq	_ISCAN_ABORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_scan_signal
	movq	%rbx, %rdi
	callq	_SCAN_PRIVATE
	leaq	4(%rax), %rsi
	movq	%r14, %rdi
	callq	_ieee80211_draintask
	movl	16(%r14), %r15d
	movq	%rbx, %rdi
	callq	_SCAN_PRIVATE
	movl	%r15d, %edi
	movq	%rax, %rsi
	callq	_taskqueue_drain_timeout
	movq	_IEEE80211_F_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	andl	(%r14), %eax
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	*(%rax)
	movq	$0, (%rbx)
LBB0_3:
	movq	$0, 8(%r14)
	movq	%rbx, %rdi
	callq	_SCAN_PRIVATE
	movq	_M_80211_SCAN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_IEEE80211_FREE                 ## TAILCALL
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ISCAN_ABORT,4,2                ## @ISCAN_ABORT
	.comm	_IEEE80211_F_SCAN,4,2           ## @IEEE80211_F_SCAN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"scan still running"

	.comm	_M_80211_SCAN,4,2               ## @M_80211_SCAN
	.no_dead_strip	_ieee80211_swscan_detach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ieee80211_swscan_detach
_ieee80211_swscan_detach:               ; @ieee80211_swscan_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
	ldr	x19, [x0, #8]
	cbz	x19, LBB0_4
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x8, _ISCAN_ABORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ISCAN_ABORT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_scan_signal
	mov	x0, x19
	bl	_SCAN_PRIVATE
	add	x1, x0, #4
	mov	x0, x20
	bl	_ieee80211_draintask
	ldr	w21, [x20, #16]
	mov	x0, x19
	bl	_SCAN_PRIVATE
	mov	x1, x0
	mov	x0, x21
	bl	_taskqueue_drain_timeout
	ldr	w8, [x20]
Lloh3:
	adrp	x9, _IEEE80211_F_SCAN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IEEE80211_F_SCAN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, eq
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	ldr	x8, [x19]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	str	xzr, [x19]
LBB0_3:
	str	xzr, [x20, #8]
	mov	x0, x19
	bl	_SCAN_PRIVATE
Lloh8:
	adrp	x8, _M_80211_SCAN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _M_80211_SCAN@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	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_FREE
LBB0_4:
	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 AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ISCAN_ABORT,4,2                ; @ISCAN_ABORT
	.comm	_IEEE80211_F_SCAN,4,2           ; @IEEE80211_F_SCAN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"scan still running"

	.comm	_M_80211_SCAN,4,2               ; @M_80211_SCAN
	.no_dead_strip	_ieee80211_swscan_detach
.subsections_via_symbols
