	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wl18xx_scan_send
_wl18xx_scan_send:                      ## @wl18xx_scan_send
	.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	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	$128, %edi
	callq	_kzalloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%r12, %rdi
	callq	_wlcore_is_p2p_mgmt
	xorl	%ecx, %ecx
	testq	%rax, %rax
	sete	%cl
	movq	(%r12,%rcx,8), %rax
	movq	%rax, (%rbx)
	movq	_WL12XX_INVALID_ROLE_ID@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_5:
	movq	_SCAN_TYPE_SEARCH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 120(%rbx)
	movl	$-127, 8(%rbx)
	movq	$0, 112(%rbx)
	movq	_SCAN_BSS_TYPE_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 104(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 64(%rbx)
	movups	%xmm0, 80(%rbx)
	movq	$0, 96(%rbx)
	movl	(%r15), %eax
	movl	%eax, 56(%rbx)
	movq	$0, 48(%rbx)
	xorl	%edi, %edi
	cmpl	$2, (%r13)
	setge	%dil
	callq	_WARN_ON
	movl	(%r14), %esi
	movl	$128, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.6:
	movq	%r15, %rdi
	movq	%rax, %r15
	movl	36(%r13), %edx
	movl	(%r13), %r8d
	movl	32(%r13), %ecx
	movq	_SCAN_TYPE_SEARCH@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rsi
	callq	_wlcore_set_scan_chan_params
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_wl18xx_adjust_channels
	movl	$1, 12(%rbx)
	cmpq	$0, 24(%r13)
	je	LBB0_8
## %bb.7:
	movq	_WL18XX_SCAN_RATE_6@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
LBB0_8:
	movq	_WL1271_SCAN_DEFAULT_TAG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	cmpl	$0, (%r13)
	je	LBB0_10
## %bb.9:
	movq	16(%r13), %rax
	movl	(%rax), %edx
	movl	%edx, 32(%rbx)
	movl	36(%rbx), %edi
	movq	8(%rax), %rsi
	callq	_memcpy
LBB0_10:
	movq	24(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_16
## %bb.11:
	movq	_NL80211_BAND_2GHZ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	(%rbx), %rdx
	movq	16(%r13), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	8(%rax), %r8
	movl	(%rax), %r9d
	jmp	LBB0_14
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_26:
	movq	%r15, %rdi
	callq	_kfree
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
LBB0_14:
	movl	4(%r13), %eax
	movl	8(%r13), %r10d
	subq	$8, %rsp
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	%rax
	pushq	%r10
	callq	_wl12xx_cmd_build_probe_req
	addq	$48, %rsp
	testl	%eax, %eax
	js	LBB0_27
## %bb.15:
	movq	24(%rbx), %rax
LBB0_16:
	cmpq	$0, 8(%rax)
	jne	LBB0_18
## %bb.17:
	cmpq	$0, 16(%rbx)
	je	LBB0_23
LBB0_18:
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	(%rbx), %rdx
	movq	16(%r13), %rax
	testq	%rax, %rax
	je	LBB0_19
## %bb.20:
	movq	8(%rax), %r8
	movl	(%rax), %r9d
	jmp	LBB0_21
LBB0_19:
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
LBB0_21:
	movl	4(%r13), %eax
	movl	8(%r13), %r10d
	subq	$8, %rsp
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	%rax
	pushq	%r10
	callq	_wl12xx_cmd_build_probe_req
	addq	$48, %rsp
	testl	%eax, %eax
	js	LBB0_22
LBB0_23:
	movq	_DEBUG_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdx
	movl	$128, %ecx
	callq	_wl1271_dump
	movq	_CMD_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rdx
	movl	$128, %ecx
	xorl	%r8d, %r8d
	callq	_wl1271_cmd_send
	movl	%eax, %r14d
	testl	%eax, %eax
	jns	LBB0_26
## %bb.24:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_25
LBB0_22:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_25
LBB0_27:
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rdi
LBB0_25:
	callq	_wl1271_error
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_WL12XX_INVALID_ROLE_ID,8,3     ## @WL12XX_INVALID_ROLE_ID
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SCAN_TYPE_SEARCH,4,2           ## @SCAN_TYPE_SEARCH
	.comm	_SCAN_BSS_TYPE_ANY,4,2          ## @SCAN_BSS_TYPE_ANY
	.comm	_WL18XX_SCAN_RATE_6,4,2         ## @WL18XX_SCAN_RATE_6
	.comm	_WL1271_SCAN_DEFAULT_TAG,4,2    ## @WL1271_SCAN_DEFAULT_TAG
	.comm	_NL80211_BAND_2GHZ,4,2          ## @NL80211_BAND_2GHZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"2.4GHz PROBE request template failed"

	.comm	_NL80211_BAND_5GHZ,4,2          ## @NL80211_BAND_5GHZ
L_.str.1:                               ## @.str.1
	.asciz	"5GHz PROBE request template failed"

	.comm	_DEBUG_SCAN,4,2                 ## @DEBUG_SCAN
L_.str.2:                               ## @.str.2
	.asciz	"SCAN: "

	.comm	_CMD_SCAN,4,2                   ## @CMD_SCAN
L_.str.3:                               ## @.str.3
	.asciz	"SCAN failed"

	.no_dead_strip	_wl18xx_scan_send
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wl18xx_scan_send
_wl18xx_scan_send:                      ; @wl18xx_scan_send
	.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	x23, x2
	mov	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x20, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	w0, #128
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_3
; %bb.1:
	mov	x0, x22
	bl	_wlcore_is_p2p_mgmt
	cmp	x0, #0
	cset	w8, eq
	ldr	x8, [x22, w8, uxtw #3]
	str	x8, [x19]
Lloh2:
	adrp	x9, _WL12XX_INVALID_ROLE_ID@GOTPAGE
Lloh3:
	ldr	x9, [x9, _WL12XX_INVALID_ROLE_ID@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_7
; %bb.2:
	mov	x20, #0
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
	mov	x20, #0
LBB0_4:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_6:
	mov	x0, x20
	bl	_kfree
	mov	x0, x19
	bl	_kfree
	mov	x0, x24
	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
LBB0_7:
Lloh9:
	adrp	x24, _SCAN_TYPE_SEARCH@GOTPAGE
Lloh10:
	ldr	x24, [x24, _SCAN_TYPE_SEARCH@GOTPAGEOFF]
	ldr	w8, [x24]
	str	w8, [x19, #120]
	mov	w8, #-127
	str	w8, [x19, #8]
	str	xzr, [x19, #112]
Lloh11:
	adrp	x8, _SCAN_BSS_TYPE_ANY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SCAN_BSS_TYPE_ANY@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x19, #104]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x19, #64]
	str	xzr, [x19, #96]
	ldr	w8, [x21]
	str	w8, [x19, #56]
	str	xzr, [x19, #48]
	ldr	w8, [x23]
	cmp	w8, #1
	cset	w0, gt
	bl	_WARN_ON
	ldr	w1, [x20]
	mov	w0, #128
	bl	_kzalloc
	mov	x20, x0
	cbz	x0, LBB0_4
; %bb.8:
	ldp	w3, w2, [x23, #32]
	ldr	w4, [x23]
	ldr	w5, [x24]
	mov	x0, x21
	mov	x1, x20
	bl	_wlcore_set_scan_chan_params
	mov	x0, x19
	mov	x1, x20
	bl	_wl18xx_adjust_channels
	mov	w8, #1
	str	w8, [x19, #12]
	ldr	x8, [x23, #24]
	cbz	x8, LBB0_10
; %bb.9:
Lloh14:
	adrp	x8, _WL18XX_SCAN_RATE_6@GOTPAGE
Lloh15:
	ldr	x8, [x8, _WL18XX_SCAN_RATE_6@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x19, #44]
LBB0_10:
Lloh17:
	adrp	x8, _WL1271_SCAN_DEFAULT_TAG@GOTPAGE
Lloh18:
	ldr	x8, [x8, _WL1271_SCAN_DEFAULT_TAG@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x19, #40]
	ldr	w8, [x23]
	cbz	w8, LBB0_12
; %bb.11:
	ldr	x8, [x23, #16]
	ldr	w2, [x8]
	str	w2, [x19, #32]
	ldr	w0, [x19, #36]
	ldr	x1, [x8, #8]
	bl	_memcpy
LBB0_12:
	ldr	x8, [x19, #24]
	ldr	x9, [x8]
	cbz	x9, LBB0_18
; %bb.13:
Lloh20:
	adrp	x8, _NL80211_BAND_2GHZ@GOTPAGE
Lloh21:
	ldr	x8, [x8, _NL80211_BAND_2GHZ@GOTPAGEOFF]
Lloh22:
	ldr	w3, [x8]
	ldr	x2, [x19]
	ldr	x8, [x23, #16]
	cbz	x8, LBB0_15
; %bb.14:
	ldr	x4, [x8, #8]
	ldr	w5, [x8]
	b	LBB0_16
LBB0_15:
	mov	x4, #0
	mov	w5, #0
LBB0_16:
	ldp	w7, w6, [x23, #4]
	stp	xzr, xzr, [sp]
	mov	x0, x21
	mov	x1, x22
	bl	_wl12xx_cmd_build_probe_req
	tbnz	w0, #31, LBB0_27
; %bb.17:
	ldr	x8, [x19, #24]
LBB0_18:
	ldr	x8, [x8, #8]
	cbnz	x8, LBB0_20
; %bb.19:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_24
LBB0_20:
Lloh23:
	adrp	x8, _NL80211_BAND_5GHZ@GOTPAGE
Lloh24:
	ldr	x8, [x8, _NL80211_BAND_5GHZ@GOTPAGEOFF]
Lloh25:
	ldr	w3, [x8]
	ldr	x2, [x19]
	ldr	x8, [x23, #16]
	cbz	x8, LBB0_22
; %bb.21:
	ldr	x4, [x8, #8]
	ldr	w5, [x8]
	b	LBB0_23
LBB0_22:
	mov	x4, #0
	mov	w5, #0
LBB0_23:
	ldp	w7, w6, [x23, #4]
	stp	xzr, xzr, [sp]
	mov	x0, x21
	mov	x1, x22
	bl	_wl12xx_cmd_build_probe_req
	tbnz	w0, #31, LBB0_26
LBB0_24:
Lloh26:
	adrp	x8, _DEBUG_SCAN@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DEBUG_SCAN@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
Lloh29:
	adrp	x1, l_.str.2@PAGE
Lloh30:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	mov	w3, #128
	bl	_wl1271_dump
Lloh31:
	adrp	x8, _CMD_SCAN@GOTPAGE
Lloh32:
	ldr	x8, [x8, _CMD_SCAN@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x19
	mov	w3, #128
	mov	w4, #0
	bl	_wl1271_cmd_send
	mov	x24, x0
	tbz	w0, #31, LBB0_6
; %bb.25:
Lloh34:
	adrp	x0, l_.str.3@PAGE
Lloh35:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_28
LBB0_26:
	mov	x24, x0
Lloh36:
	adrp	x0, l_.str.1@PAGE
Lloh37:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_28
LBB0_27:
	mov	x24, x0
Lloh38:
	adrp	x0, l_.str@PAGE
Lloh39:
	add	x0, x0, l_.str@PAGEOFF
LBB0_28:
	bl	_wl1271_error
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_WL12XX_INVALID_ROLE_ID,8,3     ; @WL12XX_INVALID_ROLE_ID
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SCAN_TYPE_SEARCH,4,2           ; @SCAN_TYPE_SEARCH
	.comm	_SCAN_BSS_TYPE_ANY,4,2          ; @SCAN_BSS_TYPE_ANY
	.comm	_WL18XX_SCAN_RATE_6,4,2         ; @WL18XX_SCAN_RATE_6
	.comm	_WL1271_SCAN_DEFAULT_TAG,4,2    ; @WL1271_SCAN_DEFAULT_TAG
	.comm	_NL80211_BAND_2GHZ,4,2          ; @NL80211_BAND_2GHZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"2.4GHz PROBE request template failed"

	.comm	_NL80211_BAND_5GHZ,4,2          ; @NL80211_BAND_5GHZ
l_.str.1:                               ; @.str.1
	.asciz	"5GHz PROBE request template failed"

	.comm	_DEBUG_SCAN,4,2                 ; @DEBUG_SCAN
l_.str.2:                               ; @.str.2
	.asciz	"SCAN: "

	.comm	_CMD_SCAN,4,2                   ; @CMD_SCAN
l_.str.3:                               ; @.str.3
	.asciz	"SCAN failed"

	.no_dead_strip	_wl18xx_scan_send
.subsections_via_symbols
