	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wl1271_op_cancel_hw_scan
_wl1271_op_cancel_hw_scan:              ## @wl1271_op_cancel_hw_scan
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	movq	%rsi, %rdi
	callq	_wl12xx_vif_to_data
	movq	%rax, %r15
	movl	$1, -40(%rbp)
	movq	_DEBUG_MAC80211@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wl1271_debug
	leaq	12(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%rbx), %rax
	movq	_WLCORE_STATE_ON@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_8
## %bb.1:
	movq	24(%rbx), %rax
	movq	_WL1271_SCAN_STATE_IDLE@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	je	LBB0_8
## %bb.2:
	movl	16(%rbx), %edi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	24(%rbx), %rax
	movq	_WL1271_SCAN_STATE_DONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	movq	56(%rbx), %rax
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	*(%rax)
	testl	%eax, %eax
	js	LBB0_7
LBB0_6:
	movq	%rbx, %rdi
	callq	_wl12xx_rearm_tx_watchdog_locked
	movq	(%r12), %rax
	movq	%rax, 24(%rbx)
	movl	40(%rbx), %edi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	$0, 48(%rbx)
	movq	$0, 32(%rbx)
	movl	20(%rbx), %edi
	leaq	-40(%rbp), %rsi
	callq	_ieee80211_scan_completed
LBB0_7:
	movl	16(%rbx), %edi
	callq	_pm_runtime_mark_last_busy
	movl	16(%rbx), %edi
	callq	_pm_runtime_put_autosuspend
	jmp	LBB0_8
LBB0_3:
	movl	16(%rbx), %edi
	callq	_pm_runtime_put_noidle
LBB0_8:
	movq	%r14, %rdi
	callq	_mutex_unlock
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_cancel_delayed_work_sync
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEBUG_MAC80211,4,2             ## @DEBUG_MAC80211
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mac80211 cancel hw scan"

	.comm	_WLCORE_STATE_ON,8,3            ## @WLCORE_STATE_ON
	.comm	_WL1271_SCAN_STATE_IDLE,8,3     ## @WL1271_SCAN_STATE_IDLE
	.comm	_WL1271_SCAN_STATE_DONE,8,3     ## @WL1271_SCAN_STATE_DONE
	.no_dead_strip	_wl1271_op_cancel_hw_scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wl1271_op_cancel_hw_scan
_wl1271_op_cancel_hw_scan:              ; @wl1271_op_cancel_hw_scan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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]
	mov	x0, x1
	bl	_wl12xx_vif_to_data
	mov	x21, x0
	mov	w8, #1
	str	w8, [sp, #8]
Lloh0:
	adrp	x8, _DEBUG_MAC80211@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEBUG_MAC80211@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wl1271_debug
	add	x20, x19, #12
	mov	x0, x20
	bl	_mutex_lock
	ldr	x8, [x19]
Lloh5:
	adrp	x9, _WLCORE_STATE_ON@GOTPAGE
Lloh6:
	ldr	x9, [x9, _WLCORE_STATE_ON@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_8
; %bb.1:
	ldr	x8, [x19, #24]
Lloh8:
	adrp	x22, _WL1271_SCAN_STATE_IDLE@GOTPAGE
Lloh9:
	ldr	x22, [x22, _WL1271_SCAN_STATE_IDLE@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.2:
	ldr	w0, [x19, #16]
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_7
; %bb.3:
	ldr	x8, [x19, #24]
Lloh10:
	adrp	x9, _WL1271_SCAN_STATE_DONE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _WL1271_SCAN_STATE_DONE@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.4:
	ldr	x8, [x19, #56]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x1, x21
	blr	x8
	tbnz	w0, #31, LBB0_6
LBB0_5:
	mov	x0, x19
	bl	_wl12xx_rearm_tx_watchdog_locked
	ldr	x8, [x22]
	str	x8, [x19, #24]
	ldr	w0, [x19, #40]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	str	xzr, [x19, #48]
	str	xzr, [x19, #32]
	ldr	w0, [x19, #20]
	add	x1, sp, #8
	bl	_ieee80211_scan_completed
LBB0_6:
	ldr	w0, [x19, #16]
	bl	_pm_runtime_mark_last_busy
	ldr	w0, [x19, #16]
	bl	_pm_runtime_put_autosuspend
	b	LBB0_8
LBB0_7:
	ldr	w0, [x19, #16]
	bl	_pm_runtime_put_noidle
LBB0_8:
	mov	x0, x20
	bl	_mutex_unlock
	add	x0, x19, #8
	bl	_cancel_delayed_work_sync
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_DEBUG_MAC80211,4,2             ; @DEBUG_MAC80211
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mac80211 cancel hw scan"

	.comm	_WLCORE_STATE_ON,8,3            ; @WLCORE_STATE_ON
	.comm	_WL1271_SCAN_STATE_IDLE,8,3     ; @WL1271_SCAN_STATE_IDLE
	.comm	_WL1271_SCAN_STATE_DONE,8,3     ; @WL1271_SCAN_STATE_DONE
	.no_dead_strip	_wl1271_op_cancel_hw_scan
.subsections_via_symbols
