	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wpas_add_channels
_wpas_add_channels:                     ## @wpas_add_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %ebx
	movq	%rcx, %r12
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	testq	%rcx, %rcx
	jne	LBB0_2
## %bb.1:
	movl	(%r14), %eax
	subl	4(%r14), %eax
	cltd
	idivl	8(%r14)
	movl	%eax, %ebx
	incl	%ebx
LBB0_2:
	movq	16(%r14), %rax
	movq	_BW80@GOTPCREL(%rip), %rcx
	movq	_BW160@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	movl	$8, %edx
	movl	$1, %edi
	cmovel	%edx, %edi
	movq	_BW80P80@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	movl	$4, %edx
	cmovel	%edx, %edi
	cmpq	(%rcx), %rax
	cmovel	%edx, %edi
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	imull	%ebx, %edi
	incl	%edi
	movl	$4, %esi
	callq	_os_calloc
	testq	%rax, %rax
	je	LBB0_19
## %bb.3:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testl	%ebx, %ebx
	jle	LBB0_14
## %bb.4:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	%ebx, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%r13
	cmpq	%r13, -80(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_14
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	testq	%r12, %r12
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r12,%r13,4), %r15d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	8(%r14), %r15d
	imull	%r13d, %r15d
	addl	4(%r14), %r15d
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	16(%r14), %rdx
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	callq	_verify_channel
	movq	_NOT_ALLOWED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_NO_IR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_13
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	24(%r14), %edi
	movl	%r15d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%rbx, %rcx
	callq	_wpas_add_channel
	testq	%rax, %rax
	js	LBB0_20
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rbx,%rax,4), %rbx
	jmp	LBB0_13
LBB0_14:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, (%rax)
	jne	LBB0_18
## %bb.15:
	movq	%rax, %rdi
	jmp	LBB0_16
LBB0_19:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	jmp	LBB0_17
LBB0_20:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
LBB0_16:
	callq	_os_free
LBB0_17:
	xorl	%eax, %eax
LBB0_18:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BW80,8,3                       ## @BW80
	.comm	_BW80P80,8,3                    ## @BW80P80
	.comm	_BW160,8,3                      ## @BW160
	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Beacon Report: Failed to allocate freqs array"

	.comm	_NOT_ALLOWED,4,2                ## @NOT_ALLOWED
	.comm	_NO_IR,4,2                      ## @NO_IR
	.no_dead_strip	_wpas_add_channels
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wpas_add_channels
_wpas_add_channels:                     ; @wpas_add_channels
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x26, x4
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	cbnz	x3, LBB0_2
; %bb.1:
	ldp	w8, w9, [x22]
	sub	w8, w8, w9
	ldr	w9, [x22, #8]
	sdiv	w8, w8, w9
	add	w26, w8, #1
LBB0_2:
	ldr	x8, [x22, #16]
Lloh0:
	adrp	x9, _BW80@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BW80@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _BW80P80@GOTPAGE
Lloh4:
	ldr	x10, [x10, _BW80P80@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
Lloh6:
	adrp	x11, _BW160@GOTPAGE
Lloh7:
	ldr	x11, [x11, _BW160@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	cmp	x8, x11
	mov	w11, #8
	csinc	w11, w11, wzr, eq
	cmp	x8, x10
	ccmp	x8, x9, #4, ne
	mov	w8, #4
	csel	w24, w8, w11, eq
	orr	w8, wzr, #0x1
	madd	w0, w24, w26, w8
	mov	w1, #4
	bl	_os_calloc
	cbz	x0, LBB0_15
; %bb.3:
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	cmp	w26, #1
	b.lt	LBB0_14
; %bb.4:
	mov	x27, #0
Lloh9:
	adrp	x28, _NOT_ALLOWED@GOTPAGE
Lloh10:
	ldr	x28, [x28, _NOT_ALLOWED@GOTPAGEOFF]
	ldr	x25, [sp, #8]                   ; 8-byte Folded Reload
	mov	w23, w26
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x27, x27, #1
	cmp	x23, x27
	b.eq	LBB0_14
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x19, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w26, [x19, x27, lsl #2]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldp	w8, w9, [x22, #4]
	madd	w26, w9, w27, w8
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x2, [x22, #16]
	mov	x0, x21
	mov	x1, x26
	bl	_verify_channel
	ldr	w8, [x28]
	cmp	w0, w8
	b.eq	LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	cbz	w20, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
Lloh11:
	adrp	x8, _NO_IR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NO_IR@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_5
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x22, #24]
	mov	x1, x26
	mov	x2, x24
	mov	x3, x25
	bl	_wpas_add_channel
	tbnz	x0, #63, LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	add	x25, x25, x24, lsl #2
	b	LBB0_5
LBB0_14:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w8, [x0]
	cbnz	w8, LBB0_19
	b	LBB0_17
LBB0_15:
Lloh14:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	b	LBB0_18
LBB0_16:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
LBB0_17:
	bl	_os_free
LBB0_18:
	mov	x0, #0
LBB0_19:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_BW80,8,3                       ; @BW80
	.comm	_BW80P80,8,3                    ; @BW80P80
	.comm	_BW160,8,3                      ; @BW160
	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Beacon Report: Failed to allocate freqs array"

	.comm	_NOT_ALLOWED,4,2                ; @NOT_ALLOWED
	.comm	_NO_IR,4,2                      ; @NO_IR
	.no_dead_strip	_wpas_add_channels
.subsections_via_symbols
