	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sweepchannels
_sweepchannels:                         ## @sweepchannels
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	16(%rsi), %r13
	cmpl	$0, (%r13)
	jle	LBB0_12
## %bb.1:
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	jmp	LBB0_2
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_isexcluded
	testq	%rax, %rax
	je	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	movslq	(%r13), %rax
	addq	$4, %r15
	cmpq	%rax, %r14
	jge	LBB0_12
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	_IEEE80211_SCAN_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_12
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r13), %rbx
	addq	%r15, %rbx
	movq	%rbx, %rdi
	callq	_IEEE80211_IS_CHAN_DTURBO
	testq	%rax, %rax
	jne	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_IEEE80211_IS_CHAN_HT
	testq	%rax, %rax
	jne	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_IEEE80211_IS_CHAN_VHT
	testq	%rax, %rax
	jne	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rcx
	movq	_IEEE80211_MODE_AUTO@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	callq	_ieee80211_chan2mode
	cmpq	%rax, -56(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_8
	jmp	LBB0_11
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_checktable
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %rax
	movq	8(%r12), %rcx
	leaq	1(%rax), %rdx
	movq	%rdx, (%r12)
	movq	%rbx, (%rcx,%rax,8)
	jmp	LBB0_11
LBB0_12:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rbx
	movq	_IEEE80211_CHAN_ANYC@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_18
## %bb.13:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_onscanlist
	testl	%eax, %eax
	je	LBB0_14
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r14
	movq	_IEEE80211_MODE_AUTO@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	je	LBB0_16
## %bb.15:
	movq	%rbx, %rdi
	callq	_ieee80211_chan2mode
	cmpq	%rax, %r14
	jne	LBB0_18
LBB0_16:
	movq	(%r12), %rax
	movq	_IEEE80211_SCAN_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_18
## %bb.17:
	movq	8(%r12), %rcx
	leaq	1(%rax), %rdx
	movq	%rdx, (%r12)
	movq	%rbx, (%rcx,%rax,8)
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_SCAN_MAX,8,3         ## @IEEE80211_SCAN_MAX
	.comm	_IEEE80211_MODE_AUTO,8,3        ## @IEEE80211_MODE_AUTO
	.comm	_IEEE80211_CHAN_ANYC,8,3        ## @IEEE80211_CHAN_ANYC
	.no_dead_strip	_sweepchannels
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sweepchannels
_sweepchannels:                         ; @sweepchannels
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x1
	mov	x19, x0
	ldr	x23, [x1, #16]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.1:
	mov	x21, x2
	mov	x24, #0
	mov	x25, #0
Lloh0:
	adrp	x26, _IEEE80211_SCAN_MAX@GOTPAGE
Lloh1:
	ldr	x26, [x26, _IEEE80211_SCAN_MAX@GOTPAGEOFF]
Lloh2:
	adrp	x27, _IEEE80211_MODE_AUTO@GOTPAGE
Lloh3:
	ldr	x27, [x27, _IEEE80211_MODE_AUTO@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_isexcluded
	cbz	x0, LBB0_10
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x25, x25, #1
	ldrsw	x8, [x23]
	add	x24, x24, #4
	cmp	x25, x8
	b.ge	LBB0_12
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ge	LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x23, #8]
	add	x22, x8, x24
	mov	x0, x22
	bl	_IEEE80211_IS_CHAN_DTURBO
	cbnz	x0, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	bl	_IEEE80211_IS_CHAN_HT
	cbnz	x0, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	bl	_IEEE80211_IS_CHAN_VHT
	cbnz	x0, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x28, [x20]
	ldr	x8, [x27]
	cmp	x28, x8
	b.eq	LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	bl	_ieee80211_chan2mode
	cmp	x28, x0
	b.eq	LBB0_2
	b	LBB0_3
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_checktable
	cbnz	x0, LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldp	x9, x8, [x19]
	add	x10, x9, #1
	str	x10, [x19]
	str	x22, [x8, x9, lsl #3]
	b	LBB0_3
LBB0_12:
	ldr	x21, [x20, #8]
Lloh4:
	adrp	x8, _IEEE80211_CHAN_ANYC@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IEEE80211_CHAN_ANYC@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cmp	x21, x8
	b.eq	LBB0_14
; %bb.13:
	mov	x0, x19
	mov	x1, x21
	bl	_onscanlist
	cbz	w0, LBB0_15
LBB0_14:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_15:
	ldr	x20, [x20]
Lloh7:
	adrp	x8, _IEEE80211_MODE_AUTO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IEEE80211_MODE_AUTO@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x20, x8
	b.eq	LBB0_17
; %bb.16:
	mov	x0, x21
	bl	_ieee80211_chan2mode
	cmp	x20, x0
	b.ne	LBB0_14
LBB0_17:
	ldr	x8, [x19]
Lloh10:
	adrp	x9, _IEEE80211_SCAN_MAX@GOTPAGE
Lloh11:
	ldr	x9, [x9, _IEEE80211_SCAN_MAX@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_14
; %bb.18:
	ldr	x9, [x19, #8]
	add	x10, x8, #1
	str	x10, [x19]
	str	x21, [x9, x8, lsl #3]
	b	LBB0_14
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_SCAN_MAX,8,3         ; @IEEE80211_SCAN_MAX
	.comm	_IEEE80211_MODE_AUTO,8,3        ; @IEEE80211_MODE_AUTO
	.comm	_IEEE80211_CHAN_ANYC,8,3        ; @IEEE80211_CHAN_ANYC
	.no_dead_strip	_sweepchannels
.subsections_via_symbols
