	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function il4965_get_channels_for_scan
_il4965_get_channels_for_scan:          ## @il4965_get_channels_for_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	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%r8, %r15
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movl	%edx, %r12d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	%edx, %esi
	callq	_il_get_hw_mode
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movq	%r15, %rdx
	callq	_il_get_active_dwell_time
	movq	%rax, %r13
	movq	%rbx, %rdi
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movl	%r12d, %esi
	movq	%r14, %rdx
	callq	_il_get_passive_dwell_time
	leaq	1(%r13), %rcx
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	cmpq	%r13, %rax
	cmovgq	%rax, %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rax
	cmpl	$0, (%rax)
	jle	LBB0_3
## %bb.4:
	xorl	%r13d, %r13d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_D_SCAN
	movl	-48(%rbp), %r14d                ## 4-byte Reload
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%r13
	movq	(%rbx), %rax
	movslq	(%rax), %rcx
	cmpq	%rcx, %r13
	jge	LBB0_17
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rax), %rax
	movq	(%rax,%r13,8), %r12
	cmpl	%r14d, (%r12)
	jne	LBB0_16
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %r15
	movq	8(%r12), %rbx
	movq	%rbx, %rdi
	callq	_cpu_to_le16
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 32(%rcx)
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	callq	_il_get_channel_info
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_il_is_channel_valid
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	movq	_SCAN_CHANNEL_TYPE_PASSIVE@GOTPCREL(%rip), %rbx
	movq	%rbx, %rcx
	cmpq	$0, -96(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rdi
	callq	_il_is_channel_passive
	movq	%rbx, %rcx
	testq	%rax, %rax
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_IEEE80211_CHAN_NO_IR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rbx, %rcx
	testl	%eax, 16(%r12)
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_SCAN_CHANNEL_TYPE_ACTIVE@GOTPCREL(%rip), %rcx
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	(%rcx), %eax
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movl	%eax, (%r12)
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	callq	_IL_SCAN_PROBE_MASK
	orl	%eax, (%r12)
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_cpu_to_le16
	movq	%rax, 24(%r12)
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_cpu_to_le16
	movq	%rax, 16(%r12)
	movl	$110, 4(%r12)
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	movl	$40, %eax
	movl	$59, %ecx
	cmovel	%ecx, %eax
	movl	%eax, 8(%r12)
	movl	(%r12), %edi
	callq	_le32_to_cpu
	movq	_SCAN_CHANNEL_TYPE_ACTIVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%r12), %ecx
	leaq	L_.str.2(%rip), %rcx
	leaq	L_.str.3(%rip), %rdx
	cmoveq	%rdx, %rcx
	movq	%r15, %r8
	cmoveq	%r14, %r8
	leaq	L_.str.1(%rip), %rdi
	movq	-104(%rbp), %rsi                ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_D_SCAN
	movl	%ebx, %r14d
	addq	$40, %r12
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	incl	-44(%rbp)                       ## 4-byte Folded Spill
	jmp	LBB0_15
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_18
LBB0_3:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_17:
	leaq	L_.str.4(%rip), %rdi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_D_SCAN
LBB0_18:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Channel %d is INVALID for this band.\n"

	.comm	_IEEE80211_CHAN_NO_IR,4,2       ## @IEEE80211_CHAN_NO_IR
	.comm	_SCAN_CHANNEL_TYPE_PASSIVE,4,2  ## @SCAN_CHANNEL_TYPE_PASSIVE
	.comm	_SCAN_CHANNEL_TYPE_ACTIVE,4,2   ## @SCAN_CHANNEL_TYPE_ACTIVE
	.comm	_NL80211_BAND_5GHZ,4,2          ## @NL80211_BAND_5GHZ
L_.str.1:                               ## @.str.1
	.asciz	"Scanning ch=%d prob=0x%X [%s %d]\n"

L_.str.2:                               ## @.str.2
	.asciz	"ACTIVE"

L_.str.3:                               ## @.str.3
	.asciz	"PASSIVE"

L_.str.4:                               ## @.str.4
	.asciz	"total channels to scan %d\n"

	.no_dead_strip	_il4965_get_channels_for_scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function il4965_get_channels_for_scan
_il4965_get_channels_for_scan:          ; @il4965_get_channels_for_scan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x19, x5
	mov	x26, x4
	str	x3, [sp, #40]                   ; 8-byte Folded Spill
	mov	x22, x2
	mov	x24, x1
	mov	x23, x0
	mov	x1, x2
	bl	_il_get_hw_mode
	cbz	x0, LBB0_14
; %bb.1:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x26
	bl	_il_get_active_dwell_time
	mov	x25, x0
	mov	x0, x23
	mov	x1, x22
	mov	x2, x24
	bl	_il_get_passive_dwell_time
	cmp	x0, x25
	csinc	x8, x0, x25, gt
	str	x8, [sp, #32]                   ; 8-byte Folded Spill
	ldr	x8, [x23]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_15
; %bb.2:
	mov	x21, #0
	mov	w24, #0
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x27
	bl	_D_SCAN
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x21, x21, #1
	ldr	x8, [x23]
	ldrsw	x9, [x8]
	cmp	x21, x9
	b.ge	LBB0_16
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x8, #8]
	ldr	x20, [x8, x21, lsl #3]
	ldr	w8, [x20]
	cmp	w8, w22
	b.ne	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x27, [x20, #8]
	mov	x0, x27
	bl	_cpu_to_le16
	str	x0, [x19, #32]
	mov	x0, x23
	mov	x1, x22
	mov	x2, x27
	bl	_il_get_channel_info
	mov	x28, x0
	bl	_il_is_channel_valid
	cbz	w0, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	cbz	x8, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x28
	bl	_il_is_channel_passive
Lloh2:
	adrp	x8, _SCAN_CHANNEL_TYPE_PASSIVE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SCAN_CHANNEL_TYPE_PASSIVE@GOTPAGEOFF]
	cbnz	x0, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x20, #16]
Lloh4:
	adrp	x9, _IEEE80211_CHAN_NO_IR@GOTPAGE
Lloh5:
	ldr	x9, [x9, _IEEE80211_CHAN_NO_IR@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
Lloh7:
	adrp	x8, _SCAN_CHANNEL_TYPE_PASSIVE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SCAN_CHANNEL_TYPE_PASSIVE@GOTPAGEOFF]
Lloh9:
	adrp	x9, _SCAN_CHANNEL_TYPE_ACTIVE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SCAN_CHANNEL_TYPE_ACTIVE@GOTPAGEOFF]
	csel	x8, x9, x8, eq
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh11:
	adrp	x8, _SCAN_CHANNEL_TYPE_PASSIVE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SCAN_CHANNEL_TYPE_PASSIVE@GOTPAGEOFF]
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x8]
	str	w8, [x19]
	cbz	x26, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x26
	bl	_IL_SCAN_PROBE_MASK
	ldr	w8, [x19]
	orr	w8, w8, w0
	str	w8, [x19]
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x25
	bl	_cpu_to_le16
	str	x0, [x19, #24]
	ldr	x20, [sp, #32]                  ; 8-byte Folded Reload
	mov	x0, x20
	bl	_cpu_to_le16
	str	x0, [x19, #16]
Lloh13:
	adrp	x8, _NL80211_BAND_5GHZ@GOTPAGE
Lloh14:
	ldr	x8, [x8, _NL80211_BAND_5GHZ@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w8, w22
	mov	w8, #40
	mov	w9, #59
	csel	w8, w9, w8, eq
	mov	w9, #110
	stp	w9, w8, [x19, #4]
	ldr	w0, [x19]
	bl	_le32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x19], #40
Lloh16:
	adrp	x9, _SCAN_CHANNEL_TYPE_ACTIVE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SCAN_CHANNEL_TYPE_ACTIVE@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
Lloh19:
	adrp	x8, l_.str.2@PAGE
Lloh20:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh21:
	adrp	x9, l_.str.3@PAGE
Lloh22:
	add	x9, x9, l_.str.3@PAGEOFF
	csel	x8, x9, x8, eq
	csel	x9, x20, x25, eq
	stp	x8, x9, [sp, #8]
	str	x0, [sp]
Lloh23:
	adrp	x0, l_.str.1@PAGE
Lloh24:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x27
	bl	_D_SCAN
	add	w24, w24, #1
	b	LBB0_4
LBB0_14:
	mov	w24, #0
	b	LBB0_17
LBB0_15:
	mov	w24, #0
LBB0_16:
Lloh25:
	adrp	x0, l_.str.4@PAGE
Lloh26:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x24
	bl	_D_SCAN
LBB0_17:
	mov	x0, x24
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Channel %d is INVALID for this band.\n"

	.comm	_IEEE80211_CHAN_NO_IR,4,2       ; @IEEE80211_CHAN_NO_IR
	.comm	_SCAN_CHANNEL_TYPE_PASSIVE,4,2  ; @SCAN_CHANNEL_TYPE_PASSIVE
	.comm	_SCAN_CHANNEL_TYPE_ACTIVE,4,2   ; @SCAN_CHANNEL_TYPE_ACTIVE
	.comm	_NL80211_BAND_5GHZ,4,2          ; @NL80211_BAND_5GHZ
l_.str.1:                               ; @.str.1
	.asciz	"Scanning ch=%d prob=0x%X [%s %d]\n"

l_.str.2:                               ; @.str.2
	.asciz	"ACTIVE"

l_.str.3:                               ; @.str.3
	.asciz	"PASSIVE"

l_.str.4:                               ; @.str.4
	.asciz	"total channels to scan %d\n"

	.no_dead_strip	_il4965_get_channels_for_scan
.subsections_via_symbols
