	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wl1271_get_scan_channels
_wl1271_get_scan_channels:              ## @wl1271_get_scan_channels
	.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
	movl	%r8d, -60(%rbp)                 ## 4-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, -112(%rbp)                ## 8-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	cmpl	$0, (%rsi)
	jle	LBB0_11
## %bb.1:
	movq	_WL1271_SCAN_MAX_CHANNELS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_11
## %bb.2:
	movq	%rsi, %r13
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	4(%rax), %rcx
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	leaq	12(%rax), %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	addq	$8, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movq	(%rax,%r15,8), %rax
	movl	(%rax), %r12d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_IEEE80211_CHAN_DISABLED@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	jne	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r13), %rax
	movq	(%rax,%r15,8), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, 4(%rax)
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, %rdx
	movq	%rcx, %rsi
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	_IEEE80211_CHAN_NO_IR@GOTPCREL(%rip), %rcx
	testl	%r12d, (%rcx)
	jne	LBB0_9
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	movq	_DEBUG_SCAN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	28(%rax), %ecx
	movq	%rsi, %r12
	leaq	L_.str(%rip), %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_wl1271_debug
	movl	(%rbx), %edi
	movq	8(%r13), %rax
	movq	(%rax,%r15,8), %rax
	movl	(%rax), %ecx
	movl	8(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_wl1271_debug
	movl	(%rbx), %edi
	movq	8(%r13), %rax
	movq	(%rax,%r15,8), %rax
	movl	16(%rax), %ecx
	movl	24(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_wl1271_debug
	movl	(%rbx), %edi
	movq	8(%r13), %rax
	movq	(%rax,%r15,8), %rax
	movl	20(%rax), %edx
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_wl1271_debug
	movl	(%r12), %edi
	callq	_cpu_to_le32
	movslq	%r14d, %r14
	leaq	(%r14,%r14,2), %rbx
	shlq	$4, %rbx
	movq	-112(%rbp), %r12                ## 8-byte Reload
	leaq	(%r12,%rbx), %rcx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	%rax, 40(%r12,%rbx)
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, 32(%r12,%rbx)
	movq	$0, 24(%r12,%rbx)
	movq	8(%r13), %rax
	movq	(%rax,%r15,8), %rax
	movl	16(%rax), %ecx
	movl	%ecx, 16(%r12,%rbx)
	movq	8(%rax), %rax
	movq	%rax, 8(%r12,%rbx)
	leaq	(%r12,%rbx), %rdi
	addq	$4, %rdi
	movl	$255, %esi
	movl	$4, %edx
	callq	_memset
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	$255, %esi
	movl	$2, %edx
	callq	_memset
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_set_bit
	incl	%r14d
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	movslq	(%r13), %rax
	cmpq	%rax, %r15
	jge	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_WL1271_SCAN_MAX_CHANNELS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jl	LBB0_3
LBB0_11:
	movl	%r14d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WL1271_SCAN_MAX_CHANNELS,4,2   ## @WL1271_SCAN_MAX_CHANNELS
	.comm	_IEEE80211_CHAN_DISABLED,4,2    ## @IEEE80211_CHAN_DISABLED
	.comm	_IEEE80211_CHAN_NO_IR,4,2       ## @IEEE80211_CHAN_NO_IR
	.comm	_DEBUG_SCAN,4,2                 ## @DEBUG_SCAN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"band %d, center_freq %d "

L_.str.1:                               ## @.str.1
	.asciz	"hw_value %d, flags %X"

L_.str.2:                               ## @.str.2
	.asciz	"max_antenna_gain %d, max_power %d"

L_.str.3:                               ## @.str.3
	.asciz	"beacon_found %d"

	.no_dead_strip	_wl1271_get_scan_channels
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wl1271_get_scan_channels
_wl1271_get_scan_channels:              ; @wl1271_get_scan_channels
	.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
	str	w4, [sp, #44]                   ; 4-byte Folded Spill
	str	x2, [sp, #32]                   ; 8-byte Folded Spill
	ldr	w8, [x1]
Lloh0:
	adrp	x28, _WL1271_SCAN_MAX_CHANNELS@GOTPAGE
Lloh1:
	ldr	x28, [x28, _WL1271_SCAN_MAX_CHANNELS@GOTPAGEOFF]
	ldr	w9, [x28]
	cmp	w8, #1
	ccmp	w9, #1, #8, ge
	b.ge	LBB0_3
; %bb.1:
	mov	w24, #0
LBB0_2:
	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
LBB0_3:
	mov	x20, x3
	mov	x22, x1
	mov	x23, x0
	mov	x25, #0
	mov	w24, #0
	add	x9, x0, #4
	add	x8, x0, #12
	stp	x8, x9, [sp, #16]               ; 16-byte Folded Spill
Lloh2:
	adrp	x21, _IEEE80211_CHAN_DISABLED@GOTPAGE
Lloh3:
	ldr	x21, [x21, _IEEE80211_CHAN_DISABLED@GOTPAGEOFF]
	add	x8, x0, #8
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
Lloh4:
	adrp	x21, _DEBUG_SCAN@GOTPAGE
Lloh5:
	ldr	x21, [x21, _DEBUG_SCAN@GOTPAGEOFF]
	ldr	w0, [x21]
	ldr	w8, [x8, #28]
	str	x8, [sp]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_wl1271_debug
	ldr	w0, [x21]
	ldr	x8, [x22, #8]
	lsl	x19, x25, #3
	ldr	x8, [x8, x19]
	ldr	w2, [x8, #8]
	ldr	w8, [x8]
	str	x8, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wl1271_debug
	ldr	w0, [x21]
	ldr	x8, [x22, #8]
	ldr	x8, [x8, x19]
	ldr	w2, [x8, #24]
	ldr	w8, [x8, #16]
	str	x8, [sp]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wl1271_debug
	ldr	w0, [x21]
Lloh12:
	adrp	x21, _IEEE80211_CHAN_DISABLED@GOTPAGE
Lloh13:
	ldr	x21, [x21, _IEEE80211_CHAN_DISABLED@GOTPAGEOFF]
	ldr	x8, [x22, #8]
	ldr	x8, [x8, x19]
	ldr	w2, [x8, #20]
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_wl1271_debug
	ldr	w0, [x27]
	bl	_cpu_to_le32
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	mov	w9, #48
	smaddl	x27, w24, w9, x8
	str	x0, [x27, #40]
	ldr	w0, [x26]
	bl	_cpu_to_le32
	ldr	x8, [x22, #8]
	str	x0, [x27, #32]
	ldr	x8, [x8, x19]
	str	xzr, [x27, #24]
	ldr	w9, [x8, #16]
	str	w9, [x27, #16]
	ldr	x8, [x8, #8]
	str	x8, [x27, #8]
	add	x0, x27, #4
	mov	w1, #255
	mov	w2, #4
	bl	_memset
	mov	x0, x27
	mov	w1, #255
	mov	w2, #2
	bl	_memset
	ldr	w1, [x23]
	mov	x0, x25
	bl	_set_bit
	add	w24, w24, #1
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x25, x25, #1
	ldrsw	x8, [x22]
	ldr	w9, [x28]
	cmp	x25, x8
	ccmp	w24, w9, #0, lt
	b.ge	LBB0_2
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	ldr	x8, [x8, x25, lsl #3]
	ldr	w19, [x8]
	ldr	w1, [x23]
	mov	x0, x25
	bl	_test_bit
	cbnz	w0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x21]
	tst	w8, w19
	b.ne	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x22, #8]
	ldr	x8, [x8, x25, lsl #3]
	ldr	w9, [x8, #4]
	cmp	w9, w20
	b.ne	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x27, [sp, #24]                  ; 8-byte Folded Reload
	mov	x26, x27
	ldr	w9, [sp, #44]                   ; 4-byte Folded Reload
	cbnz	w9, LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
Lloh16:
	adrp	x9, _IEEE80211_CHAN_NO_IR@GOTPAGE
Lloh17:
	ldr	x9, [x9, _IEEE80211_CHAN_NO_IR@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	ldp	x26, x27, [sp, #8]              ; 16-byte Folded Reload
	tst	w9, w19
	b.ne	LBB0_5
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_WL1271_SCAN_MAX_CHANNELS,4,2   ; @WL1271_SCAN_MAX_CHANNELS
	.comm	_IEEE80211_CHAN_DISABLED,4,2    ; @IEEE80211_CHAN_DISABLED
	.comm	_IEEE80211_CHAN_NO_IR,4,2       ; @IEEE80211_CHAN_NO_IR
	.comm	_DEBUG_SCAN,4,2                 ; @DEBUG_SCAN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"band %d, center_freq %d "

l_.str.1:                               ; @.str.1
	.asciz	"hw_value %d, flags %X"

l_.str.2:                               ; @.str.2
	.asciz	"max_antenna_gain %d, max_power %d"

l_.str.3:                               ; @.str.3
	.asciz	"beacon_found %d"

	.no_dead_strip	_wl1271_get_scan_channels
.subsections_via_symbols
