	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_get_channels_for_scan
_iwl_get_channels_for_scan:             ## @iwl_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, %r13
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movl	%edx, %r15d
	movq	%rdi, %r14
	movl	%edx, %esi
	callq	_iwl_get_hw_mode
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_iwl_get_active_dwell_time
	movq	%rax, %r12
	movq	%r14, %rdi
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, %esi
	callq	_iwl_get_passive_dwell_time
	leaq	1(%r12), %rcx
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	cmpq	%r12, %rax
	cmovgq	%rax, %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	(%r14), %rax
	cmpl	$0, (%rax)
	jle	LBB0_3
## %bb.4:
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_cpu_to_le16
	movq	%rax, 24(%r13)
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_cpu_to_le16
	movq	%rax, 16(%r13)
	movl	$110, 4(%r13)
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	movl	$40, %eax
	movl	$59, %ecx
	cmovel	%ecx, %eax
	movl	%eax, 8(%r13)
	movl	(%r13), %edi
	callq	_le32_to_cpu
	movq	_SCAN_CHANNEL_TYPE_ACTIVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%r13), %ecx
	leaq	L_.str.1(%rip), %r8
	leaq	L_.str.2(%rip), %rcx
	cmoveq	%rcx, %r8
	cmoveq	%rbx, %r12
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	leaq	L_.str(%rip), %rsi
	movq	-104(%rbp), %rdx                ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%eax, %ecx
	movq	%r12, %r9
	xorl	%eax, %eax
	callq	_IWL_DEBUG_SCAN
	movl	%r14d, %edx
	addq	$40, %r13
	movl	-60(%rbp), %r14d                ## 4-byte Reload
	incl	%r14d
	movq	(%rbx), %rax
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%r15
	movslq	(%rax), %rcx
	cmpq	%rcx, %r15
	jge	LBB0_13
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rax), %rcx
	movq	(%rcx,%r15,8), %r12
	cmpl	%edx, (%r12)
	jne	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r12), %rdi
	movq	%rdi, -104(%rbp)                ## 8-byte Spill
	callq	_cpu_to_le16
	movq	%rax, 32(%r13)
	movq	_SCAN_CHANNEL_TYPE_PASSIVE@GOTPCREL(%rip), %rax
	cmpq	$0, -96(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_IEEE80211_CHAN_NO_IR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_SCAN_CHANNEL_TYPE_PASSIVE@GOTPCREL(%rip), %rax
	testl	%ecx, 16(%r12)
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_SCAN_CHANNEL_TYPE_ACTIVE@GOTPCREL(%rip), %rax
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	%r14d, -60(%rbp)                ## 4-byte Spill
	movl	(%rax), %eax
	movl	%eax, (%r13)
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_IWL_SCAN_PROBE_MASK
	orl	%eax, (%r13)
	jmp	LBB0_11
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_14
LBB0_3:
	xorl	%r14d, %r14d
LBB0_13:
	leaq	L_.str.3(%rip), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_IWL_DEBUG_SCAN
LBB0_14:
	movl	%r14d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Scanning ch=%d prob=0x%X [%s %d]\n"

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

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

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

	.no_dead_strip	_iwl_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 iwl_get_channels_for_scan
_iwl_get_channels_for_scan:             ; @iwl_get_channels_for_scan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x20, x5
	mov	x21, x4
	str	x3, [sp, #24]                   ; 8-byte Folded Spill
	mov	x23, x2
	mov	x19, x0
	mov	x1, x2
	bl	_iwl_get_hw_mode
	cbz	x0, LBB0_11
; %bb.1:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x21
	bl	_iwl_get_active_dwell_time
	mov	x25, x0
	mov	x0, x19
	mov	x1, x23
	bl	_iwl_get_passive_dwell_time
	cmp	x0, x25
	csinc	x26, x0, x25, gt
	ldr	x8, [x19]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_12
; %bb.2:
	mov	x27, #0
	mov	w24, #0
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x25
	bl	_cpu_to_le16
	str	x0, [x20, #24]
	mov	x0, x26
	bl	_cpu_to_le16
	str	x0, [x20, #16]
Lloh0:
	adrp	x8, _NL80211_BAND_5GHZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NL80211_BAND_5GHZ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w23
	mov	w8, #40
	mov	w9, #59
	csel	w8, w9, w8, eq
	mov	w9, #110
	stp	w9, w8, [x20, #4]
	ldr	w0, [x20]
	bl	_le32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x20], #40
Lloh3:
	adrp	x9, _SCAN_CHANNEL_TYPE_ACTIVE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SCAN_CHANNEL_TYPE_ACTIVE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
Lloh6:
	adrp	x8, l_.str.1@PAGE
Lloh7:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh8:
	adrp	x9, l_.str.2@PAGE
Lloh9:
	add	x9, x9, l_.str.2@PAGEOFF
	csel	x8, x9, x8, eq
	csel	x9, x26, x25, eq
	stp	x8, x9, [sp, #8]
	str	x0, [sp]
	mov	x0, x19
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x28
	bl	_IWL_DEBUG_SCAN
	add	w24, w24, #1
	ldr	x8, [x19]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x27, x27, #1
	ldrsw	x9, [x8]
	cmp	x27, x9
	b.ge	LBB0_13
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x8, #8]
	ldr	x22, [x9, x27, lsl #3]
	ldr	w9, [x22]
	cmp	w9, w23
	b.ne	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x28, [x22, #8]
	mov	x0, x28
	bl	_cpu_to_le16
	str	x0, [x20, #32]
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	cbz	x8, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x22, #16]
Lloh12:
	adrp	x9, _IEEE80211_CHAN_NO_IR@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IEEE80211_CHAN_NO_IR@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
Lloh15:
	adrp	x8, _SCAN_CHANNEL_TYPE_PASSIVE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SCAN_CHANNEL_TYPE_PASSIVE@GOTPAGEOFF]
Lloh17:
	adrp	x9, _SCAN_CHANNEL_TYPE_ACTIVE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _SCAN_CHANNEL_TYPE_ACTIVE@GOTPAGEOFF]
	csel	x8, x9, x8, eq
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
Lloh19:
	adrp	x8, _SCAN_CHANNEL_TYPE_PASSIVE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SCAN_CHANNEL_TYPE_PASSIVE@GOTPAGEOFF]
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x8]
	str	w8, [x20]
	cbz	x21, LBB0_3
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_IWL_SCAN_PROBE_MASK
	ldr	w8, [x20]
	orr	w8, w8, w0
	str	w8, [x20]
	b	LBB0_3
LBB0_11:
	mov	w24, #0
	b	LBB0_14
LBB0_12:
	mov	w24, #0
LBB0_13:
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x24
	bl	_IWL_DEBUG_SCAN
LBB0_14:
	mov	x0, x24
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.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
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Scanning ch=%d prob=0x%X [%s %d]\n"

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

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

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

	.no_dead_strip	_iwl_get_channels_for_scan
.subsections_via_symbols
