	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_cfg80211_scan
_ath6kl_cfg80211_scan:                  ## @ath6kl_cfg80211_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	40(%rsi), %edi
	callq	_ath6kl_vif_from_wdev
	movq	%rax, %r13
	movl	16(%rax), %edi
	callq	_ath6kl_priv
	movq	%rax, %r15
	movq	%r13, %rdi
	callq	_ath6kl_cfg80211_ready
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%r13, %rdi
	callq	_ath6kl_cfg80211_sscan_disable
	cmpl	$0, 4(%r15)
	je	LBB0_3
LBB0_6:
	movl	32(%r14), %ecx
	movl	36(%r14), %edx
	movq	%r15, %rdi
	movq	%r13, %rsi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_ath6kl_set_probed_ssids
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	movl	(%r15), %edi
	movl	8(%r13), %esi
	movq	_WMI_FRAME_PROBE_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	24(%r14), %r8d
	movl	28(%r14), %ecx
	callq	_ath6kl_wmi_set_appie_cmd
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_5
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_26
LBB0_3:
	movq	_CLEAR_BSSFILTER_ON_BEACON@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	12(%r13), %rsi
	callq	_clear_bit
	movl	(%r15), %edi
	movl	8(%r13), %esi
	movq	_ALL_BSS_FILTER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ecx, %ecx
	callq	_ath6kl_wmi_bssfilter_cmd
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
LBB0_5:
	xorl	%eax, %eax
	callq	_ath6kl_err
	jmp	LBB0_26
LBB0_7:
	movl	%eax, %ebx
	jmp	LBB0_26
LBB0_10:
	movq	(%r14), %rbx
	xorl	%ecx, %ecx
	testq	%rbx, %rbx
	jle	LBB0_11
## %bb.12:
	movq	_WMI_MAX_CHANNELS@GOTPCREL(%rip), %rax
	movl	$0, %r12d
	cmpq	(%rax), %rbx
	jg	LBB0_23
## %bb.13:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.15:
	movq	%rax, %r12
	movq	16(%r14), %rcx
	leaq	-1(%rbx), %rdx
	movl	%ebx, %eax
	andl	$3, %eax
	cmpq	$3, %rdx
	jae	LBB0_17
## %bb.16:
	xorl	%edx, %edx
	jmp	LBB0_19
LBB0_11:
	xorl	%r12d, %r12d
	jmp	LBB0_23
LBB0_14:
	leaq	L_.str.2(%rip), %rdi
	callq	_ath6kl_warn
	xorl	%ecx, %ecx
	xorl	%r12d, %r12d
	jmp	LBB0_23
LBB0_17:
	movq	%rbx, %rsi
	andq	$-4, %rsi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdx,8), %rdi
	movl	(%rdi), %edi
	movl	%edi, (%r12,%rdx,4)
	movq	8(%rcx,%rdx,8), %rdi
	movl	(%rdi), %edi
	movl	%edi, 4(%r12,%rdx,4)
	movq	16(%rcx,%rdx,8), %rdi
	movl	(%rdi), %edi
	movl	%edi, 8(%r12,%rdx,4)
	movq	24(%rcx,%rdx,8), %rdi
	movl	(%rdi), %edi
	movl	%edi, 12(%r12,%rdx,4)
	addq	$4, %rdx
	cmpq	%rdx, %rsi
	jne	LBB0_18
LBB0_19:
	testq	%rax, %rax
	je	LBB0_22
## %bb.20:
	leaq	(%r12,%rdx,4), %rsi
	leaq	(%rcx,%rdx,8), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdx,8), %rdi
	movl	(%rdi), %edi
	movl	%edi, (%rsi,%rdx,4)
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_21
LBB0_22:
	movq	%rbx, %rcx
LBB0_23:
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	_CONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	addq	$12, %rsi
	callq	_test_bit
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	movq	%r14, (%r13)
	movl	(%r15), %edi
	movl	8(%r13), %esi
	movq	_WMI_LONG_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ATH6KL_FG_SCAN_INTERVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movl	8(%r14), %ebx
	movl	12(%r14), %eax
	subq	$8, %rsp
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%rbx
	pushq	%rax
	pushq	%r12
	pushq	-48(%rbp)                       ## 8-byte Folded Reload
	pushq	%r10
	callq	_ath6kl_wmi_beginscan_cmd
	addq	$48, %rsp
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_25
## %bb.24:
	leaq	L_.str.3(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_ath6kl_err
	movq	$0, (%r13)
LBB0_25:
	movq	%r12, %rdi
	callq	_kfree
LBB0_26:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_CLEAR_BSSFILTER_ON_BEACON,4,2  ## @CLEAR_BSSFILTER_ON_BEACON
	.comm	_ALL_BSS_FILTER,4,2             ## @ALL_BSS_FILTER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"couldn't set bss filtering\n"

	.comm	_WMI_FRAME_PROBE_REQ,4,2        ## @WMI_FRAME_PROBE_REQ
L_.str.1:                               ## @.str.1
	.asciz	"failed to set Probe Request appie for scan\n"

	.comm	_WMI_MAX_CHANNELS,8,3           ## @WMI_MAX_CHANNELS
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.2:                               ## @.str.2
	.asciz	"failed to set scan channels, scan all channels"

	.comm	_CONNECTED,4,2                  ## @CONNECTED
	.comm	_WMI_LONG_SCAN,4,2              ## @WMI_LONG_SCAN
	.comm	_ATH6KL_FG_SCAN_INTERVAL,4,2    ## @ATH6KL_FG_SCAN_INTERVAL
L_.str.3:                               ## @.str.3
	.asciz	"failed to start scan: %d\n"

	.no_dead_strip	_ath6kl_cfg80211_scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath6kl_cfg80211_scan
_ath6kl_cfg80211_scan:                  ; @ath6kl_cfg80211_scan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	ldr	w0, [x1, #40]
	bl	_ath6kl_vif_from_wdev
	mov	x19, x0
	ldr	w0, [x0, #16]
	bl	_ath6kl_priv
	mov	x21, x0
	mov	x0, x19
	bl	_ath6kl_cfg80211_ready
	cbz	w0, LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_ath6kl_cfg80211_sscan_disable
	ldr	w8, [x21, #4]
	cbz	w8, LBB0_6
LBB0_2:
	ldp	w3, w2, [x20, #32]
	mov	x0, x21
	mov	x1, x19
	mov	x4, #0
	mov	w5, #0
	bl	_ath6kl_set_probed_ssids
	tbnz	w0, #31, LBB0_8
; %bb.3:
	ldr	w0, [x21]
	ldr	w1, [x19, #8]
Lloh0:
	adrp	x8, _WMI_FRAME_PROBE_REQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WMI_FRAME_PROBE_REQ@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	ldp	w4, w3, [x20, #24]
	bl	_ath6kl_wmi_set_appie_cmd
	cbz	w0, LBB0_9
; %bb.4:
	mov	x23, x0
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ath6kl_err
	b	LBB0_20
LBB0_5:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_20
LBB0_6:
Lloh8:
	adrp	x8, _CLEAR_BSSFILTER_ON_BEACON@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CLEAR_BSSFILTER_ON_BEACON@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	add	x1, x19, #12
	bl	_clear_bit
	ldr	w0, [x21]
	ldr	w1, [x19, #8]
Lloh11:
	adrp	x8, _ALL_BSS_FILTER@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ALL_BSS_FILTER@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	w3, #0
	bl	_ath6kl_wmi_bssfilter_cmd
	cbz	w0, LBB0_2
; %bb.7:
	mov	x23, x0
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ath6kl_err
	b	LBB0_20
LBB0_8:
	mov	x23, x0
	b	LBB0_20
LBB0_9:
	mov	x23, #0
	ldr	x24, [x20]
	cmp	x24, #1
	b.lt	LBB0_15
; %bb.10:
Lloh16:
	adrp	x8, _WMI_MAX_CHANNELS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _WMI_MAX_CHANNELS@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	mov	x22, x23
	cmp	x24, x8
	b.gt	LBB0_17
; %bb.11:
Lloh19:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x24
	mov	w1, #4
	bl	_kcalloc
	mov	x22, x0
	cbz	x0, LBB0_16
; %bb.12:
	mov	x8, #0
	ldr	x9, [x20, #16]
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9, x8, lsl #3]
	ldr	w10, [x10]
	str	w10, [x22, x8, lsl #2]
	add	x8, x8, #1
	cmp	x24, x8
	b.ne	LBB0_13
; %bb.14:
	mov	x23, x24
	b	LBB0_17
LBB0_15:
	mov	x22, x23
	b	LBB0_17
LBB0_16:
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_ath6kl_warn
	mov	x23, #0
LBB0_17:
Lloh24:
	adrp	x8, _CONNECTED@GOTPAGE
Lloh25:
	ldr	x8, [x8, _CONNECTED@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	add	x1, x19, #12
	bl	_test_bit
	cmp	x0, #0
	cset	w3, ne
	str	x20, [x19]
	ldr	w0, [x21]
	ldr	w1, [x19, #8]
Lloh27:
	adrp	x8, _WMI_LONG_SCAN@GOTPAGE
Lloh28:
	ldr	x8, [x8, _WMI_LONG_SCAN@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
Lloh30:
	adrp	x8, _ATH6KL_FG_SCAN_INTERVAL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ATH6KL_FG_SCAN_INTERVAL@GOTPAGEOFF]
Lloh32:
	ldr	w6, [x8]
	ldp	w9, w8, [x20, #8]
	stp	w8, w9, [sp, #8]
	str	x22, [sp]
	mov	w4, #0
	mov	w5, #0
	mov	x7, x23
	bl	_ath6kl_wmi_beginscan_cmd
	mov	x23, x0
	cbz	w0, LBB0_19
; %bb.18:
	str	x23, [sp]
Lloh33:
	adrp	x0, l_.str.3@PAGE
Lloh34:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_ath6kl_err
	str	xzr, [x19]
LBB0_19:
	mov	x0, x22
	bl	_kfree
LBB0_20:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_CLEAR_BSSFILTER_ON_BEACON,4,2  ; @CLEAR_BSSFILTER_ON_BEACON
	.comm	_ALL_BSS_FILTER,4,2             ; @ALL_BSS_FILTER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"couldn't set bss filtering\n"

	.comm	_WMI_FRAME_PROBE_REQ,4,2        ; @WMI_FRAME_PROBE_REQ
l_.str.1:                               ; @.str.1
	.asciz	"failed to set Probe Request appie for scan\n"

	.comm	_WMI_MAX_CHANNELS,8,3           ; @WMI_MAX_CHANNELS
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.2:                               ; @.str.2
	.asciz	"failed to set scan channels, scan all channels"

	.comm	_CONNECTED,4,2                  ; @CONNECTED
	.comm	_WMI_LONG_SCAN,4,2              ; @WMI_LONG_SCAN
	.comm	_ATH6KL_FG_SCAN_INTERVAL,4,2    ; @ATH6KL_FG_SCAN_INTERVAL
l_.str.3:                               ; @.str.3
	.asciz	"failed to start scan: %d\n"

	.no_dead_strip	_ath6kl_cfg80211_scan
.subsections_via_symbols
