	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wl1251_op_hw_scan
_wl1251_op_hw_scan:                     ## @wl1251_op_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rdi, %rbx
	movq	8(%rdi), %r13
	movq	_DEBUG_MAC80211@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_wl1251_debug
	cmpq	$0, 32(%r12)
	je	LBB0_1
## %bb.2:
	movq	24(%r12), %rax
	movq	(%rax), %r15
	movq	8(%rax), %rax
	jmp	LBB0_3
LBB0_1:
	xorl	%eax, %eax
LBB0_3:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	4(%r13), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpl	$0, (%r13)
	je	LBB0_5
## %bb.4:
	movq	_DEBUG_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_wl1251_debug
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_23
LBB0_5:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_wl1251_ps_elp_wakeup
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	_IEEE80211_CONF_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_10
## %bb.8:
	movq	_STATION_ACTIVE_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_wl1251_ps_set_mode
	testl	%eax, %eax
	js	LBB0_21
## %bb.9:
	movl	32(%r13), %esi
	movl	28(%r13), %edx
	movl	20(%r13), %r8d
	movl	24(%r13), %ecx
	movq	%r13, %rdi
	callq	_wl1251_join
	testl	%eax, %eax
	js	LBB0_21
LBB0_10:
	movl	16(%r13), %edi
	movq	8(%r13), %rax
	movl	(%rax), %esi
	movq	8(%r12), %r8
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	_ieee80211_probereq_get
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	%rax, %r15
	movq	8(%r12), %rdx
	testq	%rdx, %rdx
	je	LBB0_14
## %bb.13:
	movl	16(%r12), %esi
	movq	%r15, %rdi
	callq	_skb_put_data
LBB0_14:
	movq	_CMD_PROBE_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %ecx
	movl	4(%r15), %edx
	movq	%r13, %rdi
	callq	_wl1251_cmd_template_set
	movq	%r15, %rdi
	movl	%eax, %r15d
	callq	_dev_kfree_skb
	testl	%r15d, %r15d
	js	LBB0_19
## %bb.15:
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_wl1251_cmd_trigger_scan_to
	testl	%eax, %eax
	js	LBB0_16
## %bb.17:
	movl	$1, (%r13)
	movl	(%r12), %r8d
	movl	4(%r12), %ecx
	movq	_WL1251_SCAN_NUM_PROBES@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_wl1251_cmd_scan
	movl	%eax, %r15d
	testl	%eax, %eax
	jns	LBB0_22
## %bb.18:
	movq	_DEBUG_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_wl1251_debug
	movl	$0, (%r13)
	jmp	LBB0_19
LBB0_6:
	movl	%eax, %r15d
	jmp	LBB0_23
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_19
LBB0_16:
	movl	%eax, %r15d
LBB0_19:
	movq	_IEEE80211_CONF_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_22
## %bb.20:
	movq	_STATION_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_wl1251_ps_set_mode
LBB0_21:
	movl	%eax, %r15d
LBB0_22:
	movq	%r13, %rdi
	callq	_wl1251_ps_elp_sleep
LBB0_23:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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 hw scan"

	.comm	_DEBUG_SCAN,4,2                 ## @DEBUG_SCAN
L_.str.1:                               ## @.str.1
	.asciz	"scan already in progress"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IEEE80211_CONF_IDLE,4,2        ## @IEEE80211_CONF_IDLE
	.comm	_STATION_ACTIVE_MODE,4,2        ## @STATION_ACTIVE_MODE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CMD_PROBE_REQ,4,2              ## @CMD_PROBE_REQ
	.comm	_WL1251_SCAN_NUM_PROBES,4,2     ## @WL1251_SCAN_NUM_PROBES
L_.str.2:                               ## @.str.2
	.asciz	"scan failed %d"

	.comm	_STATION_IDLE,4,2               ## @STATION_IDLE
	.no_dead_strip	_wl1251_op_hw_scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wl1251_op_hw_scan
_wl1251_op_hw_scan:                     ; @wl1251_op_hw_scan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x2
	mov	x21, x0
	ldr	x19, [x0, #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	_wl1251_debug
	ldr	x8, [x22, #32]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x22, #24]
	ldp	x23, x24, [x8]
	b	LBB0_3
LBB0_2:
	mov	x23, #0
	mov	x24, #0
LBB0_3:
	add	x20, x19, #4
	mov	x0, x20
	bl	_mutex_lock
	ldr	w8, [x19]
	cbz	w8, LBB0_5
; %bb.4:
Lloh5:
	adrp	x8, _DEBUG_SCAN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DEBUG_SCAN@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wl1251_debug
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_23
LBB0_5:
	mov	x0, x19
	bl	_wl1251_ps_elp_wakeup
	tbnz	w0, #31, LBB0_16
; %bb.6:
	ldr	w8, [x21]
Lloh13:
	adrp	x27, _IEEE80211_CONF_IDLE@GOTPAGE
Lloh14:
	ldr	x27, [x27, _IEEE80211_CONF_IDLE@GOTPAGEOFF]
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.7:
Lloh15:
	adrp	x8, _STATION_ACTIVE_MODE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _STATION_ACTIVE_MODE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_wl1251_ps_set_mode
	tbnz	w0, #31, LBB0_21
; %bb.8:
	ldp	w2, w1, [x19, #28]
	ldp	w4, w3, [x19, #20]
	mov	x0, x19
	bl	_wl1251_join
	tbnz	w0, #31, LBB0_21
LBB0_9:
	ldr	w0, [x19, #16]
	ldr	x8, [x19, #8]
	ldr	w1, [x8]
	ldr	x4, [x22, #8]
	mov	x2, x24
	mov	x3, x23
	bl	_ieee80211_probereq_get
	cbz	x0, LBB0_17
; %bb.10:
	mov	x26, x0
	ldr	x2, [x22, #8]
	cbz	x2, LBB0_12
; %bb.11:
	ldr	w1, [x22, #16]
	mov	x0, x26
	bl	_skb_put_data
LBB0_12:
Lloh18:
	adrp	x8, _CMD_PROBE_REQ@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CMD_PROBE_REQ@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	ldp	w3, w2, [x26]
	mov	x0, x19
	bl	_wl1251_cmd_template_set
	mov	x25, x0
	mov	x0, x26
	bl	_dev_kfree_skb
	tbnz	w25, #31, LBB0_19
; %bb.13:
	mov	x0, x19
	mov	w1, #0
	bl	_wl1251_cmd_trigger_scan_to
	tbnz	w0, #31, LBB0_18
; %bb.14:
	mov	w8, #1
	str	w8, [x19]
	ldp	w4, w3, [x22]
Lloh21:
	adrp	x8, _WL1251_SCAN_NUM_PROBES@GOTPAGE
Lloh22:
	ldr	x8, [x8, _WL1251_SCAN_NUM_PROBES@GOTPAGEOFF]
Lloh23:
	ldr	w5, [x8]
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	bl	_wl1251_cmd_scan
	mov	x25, x0
	tbz	w0, #31, LBB0_22
; %bb.15:
Lloh24:
	adrp	x8, _DEBUG_SCAN@GOTPAGE
Lloh25:
	ldr	x8, [x8, _DEBUG_SCAN@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	str	x25, [sp]
Lloh27:
	adrp	x1, l_.str.2@PAGE
Lloh28:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wl1251_debug
	str	wzr, [x19]
	b	LBB0_19
LBB0_16:
	mov	x25, x0
	b	LBB0_23
LBB0_17:
Lloh29:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_19
LBB0_18:
	mov	x25, x0
LBB0_19:
	ldr	w8, [x21]
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_22
; %bb.20:
Lloh32:
	adrp	x8, _STATION_IDLE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _STATION_IDLE@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_wl1251_ps_set_mode
LBB0_21:
	mov	x25, x0
LBB0_22:
	mov	x0, x19
	bl	_wl1251_ps_elp_sleep
LBB0_23:
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x25
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_DEBUG_MAC80211,4,2             ; @DEBUG_MAC80211
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mac80211 hw scan"

	.comm	_DEBUG_SCAN,4,2                 ; @DEBUG_SCAN
l_.str.1:                               ; @.str.1
	.asciz	"scan already in progress"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IEEE80211_CONF_IDLE,4,2        ; @IEEE80211_CONF_IDLE
	.comm	_STATION_ACTIVE_MODE,4,2        ; @STATION_ACTIVE_MODE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CMD_PROBE_REQ,4,2              ; @CMD_PROBE_REQ
	.comm	_WL1251_SCAN_NUM_PROBES,4,2     ; @WL1251_SCAN_NUM_PROBES
l_.str.2:                               ; @.str.2
	.asciz	"scan failed %d"

	.comm	_STATION_IDLE,4,2               ; @STATION_IDLE
	.no_dead_strip	_wl1251_op_hw_scan
.subsections_via_symbols
