	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wpas_add_channel
_wpas_add_channel:                      ## @wpas_add_channel
	.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	%rcx, -64(%rbp)                 ## 8-byte Spill
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.1:
	movq	%rdx, %r13
	movq	%rdi, %r12
	leaq	-128(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leal	(%rsi,%rsi,4), %r15d
	leal	(%rdx,%rdx), %eax
	leal	(%rax,%rax,4), %eax
	subl	%eax, %r15d
	addl	$5010, %r15d                    ## imm = 0x1392
	leaq	(%rdx,%rdx), %rax
	negq	%rax
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	leaq	(%rsi,%rax), %rbx
	addq	$2, %rbx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_ieee80211_chan_to_freq
	testl	%eax, %eax
	movl	%eax, %ecx
	cmovsl	%r15d, %ecx
	cmpq	$3, -56(%rbp)                   ## 8-byte Folded Reload
	cmovael	%eax, %ecx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%ecx, (%rax,%r14,4)
	testl	%ecx, %ecx
	js	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	addl	$20, %r15d
	addq	$4, %rbx
	cmpq	%r14, %r13
	jne	LBB0_2
LBB0_5:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_6:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_wpa_printf
	movl	$-1, %eax
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Beacon Report: Invalid channel %u"

	.no_dead_strip	_wpas_add_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wpas_add_channel
_wpas_add_channel:                      ; @wpas_add_channel
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	cbz	x2, LBB0_4
; %bb.1:
	mov	x20, x3
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
	sub	x24, x0, #128
	add	w8, w19, w19, lsl #2
	mov	w9, #10
	msub	w8, w21, w9, w8
	mov	w9, #5010
	add	w25, w8, w9
	sub	x8, x1, x2, lsl #1
	add	x23, x8, #2
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, #0
	mov	x1, x22
	mov	x2, x23
	bl	_ieee80211_chan_to_freq
	cmp	w0, #0
	ccmp	x24, #3, #2, lt
	csel	w8, w25, w0, lo
	str	w8, [x20]
	tbnz	w8, #31, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x20, x20, #4
	add	w25, w25, #20
	add	x23, x23, #4
	subs	x21, x21, #1
	b.ne	LBB0_2
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh0:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_wpa_printf
	mov	w0, #-1
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Beacon Report: Invalid channel %u"

	.no_dead_strip	_wpas_add_channel
.subsections_via_symbols
