	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il4965_request_scan            ## -- Begin function il4965_request_scan
	.p2align	4, 0x90
_il4965_request_scan:                   ## @il4965_request_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r14
	movl	$112, -104(%rbp)
	movq	$0, -96(%rbp)
	movq	_CMD_SIZE_HUGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)
	movq	_C_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -84(%rbp)
	movl	16(%rdi), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movl	20(%rdi), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	addq	$64, %rdi
	callq	_lockdep_assert_held
	movq	56(%r14), %r12
	testq	%r12, %r12
	jne	LBB0_3
## %bb.1:
	movq	_IL_MAX_SCAN_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	$112, %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	movq	%rax, %r12
	movq	%rax, 56(%r14)
	testq	%rax, %rax
	je	LBB0_2
LBB0_3:
	movq	_IL_MAX_SCAN_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	addq	$112, %rdx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	_IL_PLCP_QUIET_THRESH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 108(%r12)
	movq	_IL_ACTIVE_QUIET_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 104(%r12)
	movq	%r14, %rdi
	callq	_il_is_any_associated
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	callq	_D_INFO
	movl	4(%r13), %r15d
	movq	$0, 88(%r12)
	movl	$204800, %edi                   ## imm = 0x32000
	callq	_cpu_to_le32
	movq	%rax, 96(%r12)
	testl	%r15d, %r15d
	movl	$100, %eax
	cmovel	%eax, %r15d
	movl	$100, %eax
	xorl	%edx, %edx
	idivl	%r15d
	movl	%edx, %ebx
	shll	$22, %eax
	shll	$10, %ebx
	orl	%eax, %ebx
	movl	%ebx, %edi
	callq	_cpu_to_le32
	movq	%rax, 88(%r12)
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_D_SCAN
LBB0_5:
	movq	8(%r14), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_13
## %bb.6:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_D_SCAN
	movq	8(%r14), %rax
	cmpl	$0, (%rax)
	jle	LBB0_7
## %bb.8:
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movl	$1, -56(%rbp)                   ## 4-byte Folded Spill
	movq	%r14, %r13
	xorl	%r15d, %r15d
	movl	$8, %ebx
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%r15
	movslq	(%rax), %rcx
	addq	$16, %rbx
	cmpq	%rcx, %r15
	jge	LBB0_12
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rax), %rcx
	movq	-8(%rcx,%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_WLAN_EID_SSID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	80(%rsi), %rsi
	movslq	%r14d, %r14
	leaq	(%r14,%r14,2), %rdi
	movl	%eax, 16(%rsi,%rdi,8)
	movq	%rdx, 8(%rsi,%rdi,8)
	movl	(%rsi,%rdi,8), %edi
	movl	(%rcx,%rbx), %esi
	callq	_memcpy
	incl	%r12d
	incl	%r14d
	movq	8(%r13), %rax
	jmp	LBB0_11
LBB0_13:
	leaq	L_.str.4(%rip), %rdi
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
	xorl	%eax, %eax
	callq	_D_SCAN
	xorl	%r12d, %r12d
	jmp	LBB0_14
LBB0_12:
	movq	%r13, %r14
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_14
LBB0_7:
	xorl	%r12d, %r12d
	movl	$1, -56(%rbp)                   ## 4-byte Folded Spill
LBB0_14:
	movq	_TX_CMD_FLG_SEQ_CTL_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 48(%rcx)
	movl	24(%r14), %eax
	movl	%eax, 44(%rcx)
	movq	_TX_CMD_LIFE_TIME_INFINITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rcx)
	movl	(%r14), %edx
	cmpl	$128, %edx
	je	LBB0_15
## %bb.16:
	cmpl	$129, %edx
	jne	LBB0_30
## %bb.17:
	movq	_RXON_FLG_BAND_24G_MSK@GOTPCREL(%rip), %rax
	movq	_RXON_FLG_AUTO_DETECT_MSK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%ecx, (%rax)
	movq	_RXON_FLG_CHANNEL_MODE_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	48(%r14), %edi
	callq	_le32_to_cpu
	movq	_RXON_FLG_CHANNEL_MODE_POS@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movq	_CHANNEL_MODE_PURE_40@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpl	(%rcx), %eax
	movq	_RATE_MCS_CCK_MSK@GOTPCREL(%rip), %rcx
	movq	_RATE_1M_PLCP@GOTPCREL(%rip), %rax
	cmoveq	_RATE_6M_PLCP@GOTPCREL(%rip), %rax
	cmovnel	(%rcx), %r15d
	movl	(%r14), %edx
	testl	%ebx, %ebx
	je	LBB0_20
LBB0_19:
	movq	_IL_GOOD_CRC_TH_DEFAULT@GOTPCREL(%rip), %rcx
	jmp	LBB0_21
LBB0_15:
	xorl	%r15d, %r15d
	movq	_RATE_6M_PLCP@GOTPCREL(%rip), %rax
	testl	%ebx, %ebx
	jne	LBB0_19
LBB0_20:
	movq	_IL_GOOD_CRC_TH_NEVER@GOTPCREL(%rip), %rcx
LBB0_21:
	orl	(%rax), %r15d
	movl	(%rcx), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 72(%rcx)
	movq	40(%r14), %rax
	movq	(%rax), %rax
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, %ebx
	leaq	(,%rbx,4), %rsi
	movl	(%rax,%rbx,4), %eax
	testl	%eax, %eax
	movl	-64(%rbp), %r13d                ## 4-byte Reload
	cmovnel	%eax, %r13d
	addq	32(%r14), %rsi
	movq	%r14, %rdi
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	callq	_il4965_toggle_tx_ant
	movq	32(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_BIT
	movq	_RATE_MCS_ANT_POS@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%eax, %r15d
	movl	%r15d, %edi
	callq	_cpu_to_le32
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 32(%rcx)
	movq	_S_POWER_PMI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r14), %rbx
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_22
## %bb.23:
	movl	28(%r14), %esi
	movl	%esi, %ebx
	andl	%r13d, %ebx
	cmovel	%r13d, %ebx
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_D_SCAN
	movl	%ebx, %edi
	callq	_il4965_first_antenna
	movl	%eax, %edi
	jmp	LBB0_24
LBB0_30:
	leaq	L_.str.5(%rip), %rdi
	callq	_IL_WARN
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_29
LBB0_22:
	movl	%r13d, %edi
LBB0_24:
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	_IL_MAX_SCAN_SIZE@GOTPCREL(%rip), %rbx
	movl	%r12d, %r13d
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movl	16(%r14), %eax
	movq	_RXON_RX_CHAIN_VALID_POS@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	_RXON_RX_CHAIN_FORCE_MIMO_SEL_POS@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%edi, %edx
	shll	%cl, %edx
	orl	%eax, %edx
	movq	_RXON_RX_CHAIN_FORCE_SEL_POS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edi
	orl	%edx, %edi
	movq	_RXON_RX_CHAIN_DRIVER_FORCE_POS@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	btsl	%eax, %edi
	callq	_cpu_to_le16
	movq	%rax, 64(%r12)
	movq	56(%r12), %rsi
	movl	(%r15), %edx
	movq	8(%r14), %rax
	movl	4(%rax), %r8d
	movl	8(%rax), %ecx
	movq	(%rbx), %r9
	addq	$-112, %r9
	movq	%r14, %rdi
	callq	_il_fill_probe_req
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_cpu_to_le16
	movq	%rax, 24(%r12)
	movq	_RXON_FILTER_ACCEPT_GRP_MSK@GOTPCREL(%rip), %rax
	movq	_RXON_FILTER_BCON_AWARE_MSK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	orl	%ecx, 4(%r12)
	movslq	%ebx, %r9
	shlq	$2, %r9
	addq	56(%r12), %r9
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	movl	%r13d, %r8d
	callq	_il4965_get_channels_for_scan
	movl	%eax, 8(%r12)
	testl	%eax, %eax
	je	LBB0_25
## %bb.26:
	movq	24(%r12), %rdi
	callq	_le16_to_cpu
	movl	8(%r12), %ecx
	leal	(%rax,%rcx,4), %edi
	addl	$112, %edi
	movl	%edi, -104(%rbp)
	movq	%r12, -96(%rbp)
	callq	_cpu_to_le16
	movq	%rax, 16(%r12)
	movq	%r14, %rbx
	movq	_S_SCAN_HW@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_set_bit
	leaq	-104(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_il_send_cmd_sync
	testl	%eax, %eax
	je	LBB0_27
## %bb.28:
	movl	%eax, %ebx
	movl	(%r14), %edi
	movq	%r15, %rsi
	callq	_clear_bit
	jmp	LBB0_29
LBB0_25:
	leaq	L_.str.7(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	_D_SCAN
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_29
LBB0_2:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_D_SCAN
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_29
LBB0_27:
	xorl	%ebx, %ebx
LBB0_29:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_SIZE_HUGE,4,2              ## @CMD_SIZE_HUGE
	.comm	_C_SCAN,4,2                     ## @C_SCAN
	.comm	_IL_MAX_SCAN_SIZE,8,3           ## @IL_MAX_SCAN_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fail to allocate memory for scan\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IL_PLCP_QUIET_THRESH,4,2       ## @IL_PLCP_QUIET_THRESH
	.comm	_IL_ACTIVE_QUIET_TIME,4,2       ## @IL_ACTIVE_QUIET_TIME
L_.str.1:                               ## @.str.1
	.asciz	"Scanning while associated...\n"

L_.str.2:                               ## @.str.2
	.asciz	"suspend_time 0x%X beacon interval %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Kicking off active scan\n"

	.comm	_WLAN_EID_SSID,4,2              ## @WLAN_EID_SSID
L_.str.4:                               ## @.str.4
	.asciz	"Start passive scan.\n"

	.comm	_TX_CMD_FLG_SEQ_CTL_MSK,4,2     ## @TX_CMD_FLG_SEQ_CTL_MSK
	.comm	_TX_CMD_LIFE_TIME_INFINITE,4,2  ## @TX_CMD_LIFE_TIME_INFINITE
	.comm	_RXON_FLG_BAND_24G_MSK,4,2      ## @RXON_FLG_BAND_24G_MSK
	.comm	_RXON_FLG_AUTO_DETECT_MSK,4,2   ## @RXON_FLG_AUTO_DETECT_MSK
	.comm	_RXON_FLG_CHANNEL_MODE_MSK,4,2  ## @RXON_FLG_CHANNEL_MODE_MSK
	.comm	_RXON_FLG_CHANNEL_MODE_POS,4,2  ## @RXON_FLG_CHANNEL_MODE_POS
	.comm	_CHANNEL_MODE_PURE_40,4,2       ## @CHANNEL_MODE_PURE_40
	.comm	_RATE_6M_PLCP,4,2               ## @RATE_6M_PLCP
	.comm	_RATE_1M_PLCP,4,2               ## @RATE_1M_PLCP
	.comm	_RATE_MCS_CCK_MSK,4,2           ## @RATE_MCS_CCK_MSK
L_.str.5:                               ## @.str.5
	.asciz	"Invalid scan band\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_IL_GOOD_CRC_TH_DEFAULT,4,2     ## @IL_GOOD_CRC_TH_DEFAULT
	.comm	_IL_GOOD_CRC_TH_NEVER,4,2       ## @IL_GOOD_CRC_TH_NEVER
	.comm	_RATE_MCS_ANT_POS,4,2           ## @RATE_MCS_ANT_POS
	.comm	_S_POWER_PMI,4,2                ## @S_POWER_PMI
L_.str.6:                               ## @.str.6
	.asciz	"chain_noise_data.active_chains: %u\n"

	.comm	_RXON_RX_CHAIN_VALID_POS,4,2    ## @RXON_RX_CHAIN_VALID_POS
	.comm	_RXON_RX_CHAIN_FORCE_MIMO_SEL_POS,4,2 ## @RXON_RX_CHAIN_FORCE_MIMO_SEL_POS
	.comm	_RXON_RX_CHAIN_FORCE_SEL_POS,4,2 ## @RXON_RX_CHAIN_FORCE_SEL_POS
	.comm	_RXON_RX_CHAIN_DRIVER_FORCE_POS,4,2 ## @RXON_RX_CHAIN_DRIVER_FORCE_POS
	.comm	_RXON_FILTER_ACCEPT_GRP_MSK,4,2 ## @RXON_FILTER_ACCEPT_GRP_MSK
	.comm	_RXON_FILTER_BCON_AWARE_MSK,4,2 ## @RXON_FILTER_BCON_AWARE_MSK
L_.str.7:                               ## @.str.7
	.asciz	"channel count %d\n"

	.comm	_S_SCAN_HW,4,2                  ## @S_SCAN_HW
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il4965_request_scan            ; -- Begin function il4965_request_scan
	.p2align	2
_il4965_request_scan:                   ; @il4965_request_scan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x24, x1
	mov	x19, x0
	mov	w8, #112
	str	w8, [sp, #40]
	str	xzr, [sp, #48]
Lloh0:
	adrp	x8, _CMD_SIZE_HUGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMD_SIZE_HUGE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _C_SCAN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _C_SCAN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #56]
	ldp	w26, w21, [x0, #16]
	add	x0, x0, #64
	bl	_lockdep_assert_held
	ldr	x20, [x19, #56]
Lloh6:
	adrp	x22, _IL_MAX_SCAN_SIZE@GOTPAGE
Lloh7:
	ldr	x22, [x22, _IL_MAX_SCAN_SIZE@GOTPAGEOFF]
	cbnz	x20, LBB0_2
; %bb.1:
	ldr	x8, [x22]
	add	x0, x8, #112
Lloh8:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_kmalloc
	mov	x20, x0
	str	x0, [x19, #56]
	cbz	x0, LBB0_25
LBB0_2:
	ldr	x8, [x22]
	add	x2, x8, #112
	mov	x0, x20
	mov	w1, #0
	bl	_memset
Lloh11:
	adrp	x8, _IL_PLCP_QUIET_THRESH@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IL_PLCP_QUIET_THRESH@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _IL_ACTIVE_QUIET_TIME@GOTPAGE
Lloh15:
	ldr	x9, [x9, _IL_ACTIVE_QUIET_TIME@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #104]
	mov	x0, x19
	bl	_il_is_any_associated
	cbz	x0, LBB0_4
; %bb.3:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_D_INFO
	ldr	w22, [x24, #4]
	str	xzr, [x20, #88]
	mov	w0, #8192
	movk	w0, #3, lsl #16
	bl	_cpu_to_le32
	str	x0, [x20, #96]
	mov	w8, #100
	cmp	w22, #0
	csel	w23, w8, w22, eq
	sdiv	w9, w8, w23
	msub	w8, w9, w23, w8
	lsl	w8, w8, #10
	orr	w22, w8, w9, lsl #22
	mov	x0, x22
	bl	_cpu_to_le32
	str	x0, [x20, #88]
	stp	x22, x23, [sp]
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_D_SCAN
LBB0_4:
	ldr	x8, [x19, #8]
	ldr	w28, [x8]
	str	x24, [sp, #32]                  ; 8-byte Folded Spill
	cbz	w28, LBB0_11
; %bb.5:
Lloh21:
	adrp	x0, l_.str.3@PAGE
Lloh22:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_D_SCAN
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_12
; %bb.6:
	str	w26, [sp, #28]                  ; 4-byte Folded Spill
	mov	x24, #0
	mov	x25, #0
	mov	w27, #0
	mov	w22, #0
Lloh23:
	adrp	x26, _WLAN_EID_SSID@GOTPAGE
Lloh24:
	ldr	x26, [x26, _WLAN_EID_SSID@GOTPAGEOFF]
	mov	w23, #24
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x25, x25, #1
	ldrsw	x9, [x8]
	add	x24, x24, #16
	cmp	x25, x9
	b.ge	LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x8, #16]
	ldr	x2, [x9, x24]
	cbz	x2, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x26]
	ldr	x10, [x20, #80]
	smaddl	x10, w27, w23, x10
	str	w8, [x10, #16]
	str	x2, [x10, #8]
	ldr	w0, [x10]
	add	x8, x9, x24
	ldr	w1, [x8, #8]
	bl	_memcpy
	add	w22, w22, #1
	add	w27, w27, #1
	ldr	x8, [x19, #8]
	b	LBB0_7
LBB0_10:
	mov	w24, #1
	ldr	w26, [sp, #28]                  ; 4-byte Folded Reload
	b	LBB0_13
LBB0_11:
Lloh25:
	adrp	x0, l_.str.4@PAGE
Lloh26:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_D_SCAN
	mov	w24, #0
	mov	w22, #0
	b	LBB0_13
LBB0_12:
	mov	w22, #0
	mov	w24, #1
LBB0_13:
Lloh27:
	adrp	x8, _TX_CMD_FLG_SEQ_CTL_MSK@GOTPAGE
Lloh28:
	ldr	x8, [x8, _TX_CMD_FLG_SEQ_CTL_MSK@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	str	w8, [x20, #48]
	ldr	w8, [x19, #24]
Lloh30:
	adrp	x9, _TX_CMD_LIFE_TIME_INFINITE@GOTPAGE
Lloh31:
	ldr	x9, [x9, _TX_CMD_LIFE_TIME_INFINITE@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #40]
	ldr	w25, [x19]
Lloh33:
	adrp	x23, _RATE_6M_PLCP@GOTPAGE
Lloh34:
	ldr	x23, [x23, _RATE_6M_PLCP@GOTPAGEOFF]
	cmp	w25, #128
	b.eq	LBB0_16
; %bb.14:
	cmp	w25, #129
	b.ne	LBB0_22
; %bb.15:
Lloh35:
	adrp	x8, _RXON_FLG_BAND_24G_MSK@GOTPAGE
Lloh36:
	ldr	x8, [x8, _RXON_FLG_BAND_24G_MSK@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
Lloh38:
	adrp	x9, _RXON_FLG_AUTO_DETECT_MSK@GOTPAGE
Lloh39:
	ldr	x9, [x9, _RXON_FLG_AUTO_DETECT_MSK@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x20]
	ldr	w8, [x19, #48]
Lloh41:
	adrp	x9, _RXON_FLG_CHANNEL_MODE_MSK@GOTPAGE
Lloh42:
	ldr	x9, [x9, _RXON_FLG_CHANNEL_MODE_MSK@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	and	w0, w9, w8
	bl	_le32_to_cpu
Lloh44:
	adrp	x8, _RXON_FLG_CHANNEL_MODE_POS@GOTPAGE
Lloh45:
	ldr	x8, [x8, _RXON_FLG_CHANNEL_MODE_POS@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
	asr	w8, w0, w8
Lloh47:
	adrp	x9, _CHANNEL_MODE_PURE_40@GOTPAGE
Lloh48:
	ldr	x9, [x9, _CHANNEL_MODE_PURE_40@GOTPAGEOFF]
Lloh49:
	ldr	w9, [x9]
Lloh50:
	adrp	x10, _RATE_MCS_CCK_MSK@GOTPAGE
Lloh51:
	ldr	x10, [x10, _RATE_MCS_CCK_MSK@GOTPAGEOFF]
Lloh52:
	ldr	w10, [x10]
Lloh53:
	adrp	x11, _RATE_1M_PLCP@GOTPAGE
Lloh54:
	ldr	x11, [x11, _RATE_1M_PLCP@GOTPAGEOFF]
	cmp	w8, w9
	csel	w27, wzr, w10, eq
	csel	x23, x23, x11, eq
	ldr	w25, [x19]
	b	LBB0_17
LBB0_16:
	mov	w27, #0
LBB0_17:
	ldr	w23, [x23]
Lloh55:
	adrp	x8, _IL_GOOD_CRC_TH_DEFAULT@GOTPAGE
Lloh56:
	ldr	x8, [x8, _IL_GOOD_CRC_TH_DEFAULT@GOTPAGEOFF]
Lloh57:
	adrp	x9, _IL_GOOD_CRC_TH_NEVER@GOTPAGE
Lloh58:
	ldr	x9, [x9, _IL_GOOD_CRC_TH_NEVER@GOTPAGEOFF]
	cmp	w28, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	str	w8, [x20, #72]
	ldp	x9, x8, [x19, #32]
	ldr	x8, [x8]
	mov	w10, w25
	lsl	x28, x10, #2
	ldr	w8, [x8, x28]
	cmp	w8, #0
	csel	w26, w26, w8, eq
	add	x1, x9, x28
	mov	x0, x19
	mov	x2, x21
	bl	_il4965_toggle_tx_ant
	ldr	x8, [x19, #32]
	ldr	w0, [x8, x28]
	bl	_BIT
Lloh59:
	adrp	x8, _RATE_MCS_ANT_POS@GOTPAGE
Lloh60:
	ldr	x8, [x8, _RATE_MCS_ANT_POS@GOTPAGEOFF]
Lloh61:
	ldr	w8, [x8]
	lsl	w8, w0, w8
	orr	w9, w23, w27
	orr	w0, w9, w8
	bl	_cpu_to_le32
	str	x0, [x20, #32]
Lloh62:
	adrp	x8, _S_POWER_PMI@GOTPAGE
Lloh63:
	ldr	x8, [x8, _S_POWER_PMI@GOTPAGEOFF]
Lloh64:
	ldr	w0, [x8]
	add	x23, x19, #4
	mov	x1, x23
	bl	_test_bit
	cbz	x0, LBB0_19
; %bb.18:
	ldr	w8, [x19, #28]
	ands	w9, w8, w26
	csel	w26, w26, w9, eq
	str	x8, [sp]
Lloh65:
	adrp	x0, l_.str.6@PAGE
Lloh66:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_D_SCAN
	mov	x0, x26
	bl	_il4965_first_antenna
	mov	x26, x0
LBB0_19:
	ldr	w8, [x19, #16]
Lloh67:
	adrp	x9, _RXON_RX_CHAIN_VALID_POS@GOTPAGE
Lloh68:
	ldr	x9, [x9, _RXON_RX_CHAIN_VALID_POS@GOTPAGEOFF]
Lloh69:
	ldr	w9, [x9]
	lsl	w8, w8, w9
Lloh70:
	adrp	x9, _RXON_RX_CHAIN_FORCE_MIMO_SEL_POS@GOTPAGE
Lloh71:
	ldr	x9, [x9, _RXON_RX_CHAIN_FORCE_MIMO_SEL_POS@GOTPAGEOFF]
Lloh72:
	ldr	w9, [x9]
	lsl	w9, w26, w9
	orr	w8, w9, w8
Lloh73:
	adrp	x9, _RXON_RX_CHAIN_FORCE_SEL_POS@GOTPAGE
Lloh74:
	ldr	x9, [x9, _RXON_RX_CHAIN_FORCE_SEL_POS@GOTPAGEOFF]
Lloh75:
	ldr	w9, [x9]
	lsl	w9, w26, w9
	orr	w8, w8, w9
Lloh76:
	adrp	x9, _RXON_RX_CHAIN_DRIVER_FORCE_POS@GOTPAGE
Lloh77:
	ldr	x9, [x9, _RXON_RX_CHAIN_DRIVER_FORCE_POS@GOTPAGEOFF]
Lloh78:
	ldr	w9, [x9]
	mov	w10, #1
	lsl	w9, w10, w9
	orr	w0, w8, w9
	bl	_cpu_to_le16
	str	x0, [x20, #64]
	ldr	x1, [x20, #56]
	ldr	x21, [sp, #32]                  ; 8-byte Folded Reload
	ldr	w2, [x21]
	ldr	x8, [x19, #8]
	ldp	w4, w3, [x8, #4]
Lloh79:
	adrp	x8, _IL_MAX_SCAN_SIZE@GOTPAGE
Lloh80:
	ldr	x8, [x8, _IL_MAX_SCAN_SIZE@GOTPAGEOFF]
Lloh81:
	ldr	x8, [x8]
	sub	x5, x8, #112
	mov	x0, x19
	bl	_il_fill_probe_req
	mov	x26, x0
	bl	_cpu_to_le16
	str	x0, [x20, #24]
Lloh82:
	adrp	x8, _RXON_FILTER_ACCEPT_GRP_MSK@GOTPAGE
Lloh83:
	ldr	x8, [x8, _RXON_FILTER_ACCEPT_GRP_MSK@GOTPAGEOFF]
Lloh84:
	ldr	w8, [x8]
Lloh85:
	adrp	x9, _RXON_FILTER_BCON_AWARE_MSK@GOTPAGE
Lloh86:
	ldr	x9, [x9, _RXON_FILTER_BCON_AWARE_MSK@GOTPAGEOFF]
Lloh87:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x20, #4]
	orr	w8, w8, w9
	str	w8, [x20, #4]
	ldr	x8, [x20, #56]
	add	x5, x8, w26, sxtw #2
	mov	x0, x19
	mov	x1, x21
	mov	x2, x25
	mov	x3, x24
	mov	x4, x22
	bl	_il4965_get_channels_for_scan
	str	w0, [x20, #8]
	cbz	w0, LBB0_23
; %bb.20:
	ldr	x0, [x20, #24]
	bl	_le16_to_cpu
	ldr	w8, [x20, #8]
	add	w8, w0, w8, lsl #2
	add	w0, w8, #112
	str	w0, [sp, #40]
	str	x20, [sp, #48]
	bl	_cpu_to_le16
	str	x0, [x20, #16]
Lloh88:
	adrp	x20, _S_SCAN_HW@GOTPAGE
Lloh89:
	ldr	x20, [x20, _S_SCAN_HW@GOTPAGEOFF]
	ldr	w0, [x20]
	mov	x1, x23
	bl	_set_bit
	add	x1, sp, #40
	mov	x0, x19
	bl	_il_send_cmd_sync
	mov	x19, x0
	cbz	w0, LBB0_27
; %bb.21:
	ldr	w0, [x20]
	mov	x1, x23
	bl	_clear_bit
	b	LBB0_27
LBB0_22:
Lloh90:
	adrp	x0, l_.str.5@PAGE
Lloh91:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_IL_WARN
	b	LBB0_24
LBB0_23:
	str	xzr, [sp]
Lloh92:
	adrp	x0, l_.str.7@PAGE
Lloh93:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_D_SCAN
LBB0_24:
Lloh94:
	adrp	x8, _EIO@GOTPAGE
Lloh95:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_26
LBB0_25:
Lloh96:
	adrp	x0, l_.str@PAGE
Lloh97:
	add	x0, x0, l_.str@PAGEOFF
	bl	_D_SCAN
Lloh98:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh99:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_26:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_27:
	mov	x0, x19
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGot	Lloh57, Lloh58
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpAdd	Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh85, Lloh86, Lloh87
	.loh AdrpLdrGotLdr	Lloh82, Lloh83, Lloh84
	.loh AdrpLdrGotLdr	Lloh79, Lloh80, Lloh81
	.loh AdrpLdrGotLdr	Lloh76, Lloh77, Lloh78
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGot	Lloh88, Lloh89
	.loh AdrpAdd	Lloh90, Lloh91
	.loh AdrpAdd	Lloh92, Lloh93
	.loh AdrpLdrGot	Lloh94, Lloh95
	.loh AdrpLdrGot	Lloh98, Lloh99
	.loh AdrpAdd	Lloh96, Lloh97
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_SIZE_HUGE,4,2              ; @CMD_SIZE_HUGE
	.comm	_C_SCAN,4,2                     ; @C_SCAN
	.comm	_IL_MAX_SCAN_SIZE,8,3           ; @IL_MAX_SCAN_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fail to allocate memory for scan\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IL_PLCP_QUIET_THRESH,4,2       ; @IL_PLCP_QUIET_THRESH
	.comm	_IL_ACTIVE_QUIET_TIME,4,2       ; @IL_ACTIVE_QUIET_TIME
l_.str.1:                               ; @.str.1
	.asciz	"Scanning while associated...\n"

l_.str.2:                               ; @.str.2
	.asciz	"suspend_time 0x%X beacon interval %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Kicking off active scan\n"

	.comm	_WLAN_EID_SSID,4,2              ; @WLAN_EID_SSID
l_.str.4:                               ; @.str.4
	.asciz	"Start passive scan.\n"

	.comm	_TX_CMD_FLG_SEQ_CTL_MSK,4,2     ; @TX_CMD_FLG_SEQ_CTL_MSK
	.comm	_TX_CMD_LIFE_TIME_INFINITE,4,2  ; @TX_CMD_LIFE_TIME_INFINITE
	.comm	_RXON_FLG_BAND_24G_MSK,4,2      ; @RXON_FLG_BAND_24G_MSK
	.comm	_RXON_FLG_AUTO_DETECT_MSK,4,2   ; @RXON_FLG_AUTO_DETECT_MSK
	.comm	_RXON_FLG_CHANNEL_MODE_MSK,4,2  ; @RXON_FLG_CHANNEL_MODE_MSK
	.comm	_RXON_FLG_CHANNEL_MODE_POS,4,2  ; @RXON_FLG_CHANNEL_MODE_POS
	.comm	_CHANNEL_MODE_PURE_40,4,2       ; @CHANNEL_MODE_PURE_40
	.comm	_RATE_6M_PLCP,4,2               ; @RATE_6M_PLCP
	.comm	_RATE_1M_PLCP,4,2               ; @RATE_1M_PLCP
	.comm	_RATE_MCS_CCK_MSK,4,2           ; @RATE_MCS_CCK_MSK
l_.str.5:                               ; @.str.5
	.asciz	"Invalid scan band\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_IL_GOOD_CRC_TH_DEFAULT,4,2     ; @IL_GOOD_CRC_TH_DEFAULT
	.comm	_IL_GOOD_CRC_TH_NEVER,4,2       ; @IL_GOOD_CRC_TH_NEVER
	.comm	_RATE_MCS_ANT_POS,4,2           ; @RATE_MCS_ANT_POS
	.comm	_S_POWER_PMI,4,2                ; @S_POWER_PMI
l_.str.6:                               ; @.str.6
	.asciz	"chain_noise_data.active_chains: %u\n"

	.comm	_RXON_RX_CHAIN_VALID_POS,4,2    ; @RXON_RX_CHAIN_VALID_POS
	.comm	_RXON_RX_CHAIN_FORCE_MIMO_SEL_POS,4,2 ; @RXON_RX_CHAIN_FORCE_MIMO_SEL_POS
	.comm	_RXON_RX_CHAIN_FORCE_SEL_POS,4,2 ; @RXON_RX_CHAIN_FORCE_SEL_POS
	.comm	_RXON_RX_CHAIN_DRIVER_FORCE_POS,4,2 ; @RXON_RX_CHAIN_DRIVER_FORCE_POS
	.comm	_RXON_FILTER_ACCEPT_GRP_MSK,4,2 ; @RXON_FILTER_ACCEPT_GRP_MSK
	.comm	_RXON_FILTER_BCON_AWARE_MSK,4,2 ; @RXON_FILTER_BCON_AWARE_MSK
l_.str.7:                               ; @.str.7
	.asciz	"channel count %d\n"

	.comm	_S_SCAN_HW,4,2                  ; @S_SCAN_HW
.subsections_via_symbols
