	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ieee80211_ioctl_setchanlist
_ieee80211_ioctl_setchanlist:           ## @ieee80211_ioctl_setchanlist
	.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	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	movl	(%rsi), %eax
	cmpl	$5, %eax
	jb	LBB0_2
## %bb.1:
	movl	$4, (%r15)
	movl	$4, %eax
LBB0_2:
	movl	%eax, %edi
	movq	_IEEE80211_CHAN_BYTES@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	movq	_M_TEMP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IEEE80211_M_NOWAIT@GOTPCREL(%rip), %rax
	movq	_IEEE80211_M_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	callq	_IEEE80211_MALLOC
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	(%r15), %edx
	movl	4(%r15), %edi
	movq	%rax, %rsi
	movq	%rax, %r12
	callq	_copyin
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r13d
	movq	_M_TEMP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_IEEE80211_FREE
	jmp	LBB0_20
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_6:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%rbx)
	movq	%r12, %rdi
	jle	LBB0_14
## %bb.7:
	movslq	(%r15), %rax
	leaq	(%rdi,%rax,4), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	_NBBY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	imull	%eax, %r13d
	xorl	%r14d, %r14d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r15, %rdi
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%r14
	movslq	(%rbx), %rax
	cmpq	%rax, %r14
	jge	LBB0_13
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rbx), %r12
	movl	(%r12,%r14,4), %esi
	cmpl	%r13d, %esi
	jge	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%rdi, %r15
	callq	_isset
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	(%r12,%r14,4), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_setbit
	incl	-44(%rbp)                       ## 4-byte Folded Spill
	jmp	LBB0_11
LBB0_13:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_14
## %bb.15:
	movq	%rdi, %r15
	movq	8(%rbx), %rax
	movq	_IEEE80211_CHAN_ANYC@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	je	LBB0_18
## %bb.16:
	movl	(%rax), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_isclr
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	(%r14), %rax
	movq	%rax, 8(%rbx)
LBB0_18:
	movl	4(%rbx), %edi
	movq	_IEEE80211_CHAN_BYTES@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_memcpy
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_ieee80211_scan_flush
	movq	_M_TEMP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_IEEE80211_FREE
	movq	_ENETRESET@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_14:
	movq	_M_TEMP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_IEEE80211_FREE
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_19:
	movl	(%rax), %r13d
LBB0_20:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_CHAN_BYTES,8,3       ## @IEEE80211_CHAN_BYTES
	.comm	_M_TEMP,4,2                     ## @M_TEMP
	.comm	_IEEE80211_M_NOWAIT,4,2         ## @IEEE80211_M_NOWAIT
	.comm	_IEEE80211_M_ZERO,4,2           ## @IEEE80211_M_ZERO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_NBBY,4,2                       ## @NBBY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IEEE80211_CHAN_ANYC,8,3        ## @IEEE80211_CHAN_ANYC
	.comm	_ENETRESET,4,2                  ## @ENETRESET
	.no_dead_strip	_ieee80211_ioctl_setchanlist
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ieee80211_ioctl_setchanlist
_ieee80211_ioctl_setchanlist:           ; @ieee80211_ioctl_setchanlist
	.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	x21, x1
	mov	x19, x0
	ldr	x23, [x0]
	ldr	w8, [x1]
	cmp	w8, #5
	b.lo	LBB0_2
; %bb.1:
	mov	w8, #4
	str	w8, [x21]
LBB0_2:
Lloh0:
	adrp	x25, _IEEE80211_CHAN_BYTES@GOTPAGE
Lloh1:
	ldr	x25, [x25, _IEEE80211_CHAN_BYTES@GOTPAGEOFF]
	ldr	x9, [x25]
	add	x0, x9, w8, uxtw
Lloh2:
	adrp	x24, _M_TEMP@GOTPAGE
Lloh3:
	ldr	x24, [x24, _M_TEMP@GOTPAGEOFF]
Lloh4:
	adrp	x8, _IEEE80211_M_NOWAIT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IEEE80211_M_NOWAIT@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _IEEE80211_M_ZERO@GOTPAGE
Lloh8:
	ldr	x9, [x9, _IEEE80211_M_ZERO@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w2, w9, w8
	bl	_IEEE80211_MALLOC
	cbz	x0, LBB0_5
; %bb.3:
	mov	x20, x0
	ldp	w2, w0, [x21]
	mov	x1, x20
	bl	_copyin
	cbz	w0, LBB0_6
; %bb.4:
	mov	x22, x0
	ldr	w1, [x24]
	mov	x0, x20
	bl	_IEEE80211_FREE
	b	LBB0_19
LBB0_5:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_18
LBB0_6:
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.7:
	mov	x26, #0
	mov	w22, #0
	ldrsw	x8, [x21]
	add	x21, x20, x8, lsl #2
Lloh12:
	adrp	x9, _NBBY@GOTPAGE
Lloh13:
	ldr	x9, [x9, _NBBY@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	mul	w27, w9, w8
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x26, x26, #1
	ldrsw	x8, [x23]
	cmp	x26, x8
	b.ge	LBB0_12
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x28, [x23, #16]
	ldr	w1, [x28, x26, lsl #2]
	cmp	w1, w27
	b.ge	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x20
	bl	_isset
	cbz	x0, LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w1, [x28, x26, lsl #2]
	mov	x0, x21
	bl	_setbit
	add	w22, w22, #1
	b	LBB0_8
LBB0_12:
	cbz	w22, LBB0_17
; %bb.13:
	ldr	x8, [x23, #8]
Lloh15:
	adrp	x22, _IEEE80211_CHAN_ANYC@GOTPAGE
Lloh16:
	ldr	x22, [x22, _IEEE80211_CHAN_ANYC@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	b.eq	LBB0_16
; %bb.14:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_isclr
	cbz	x0, LBB0_16
; %bb.15:
	ldr	x8, [x22]
	str	x8, [x23, #8]
LBB0_16:
	ldr	w0, [x23, #4]
	ldr	x2, [x25]
	mov	x1, x21
	bl	_memcpy
	mov	x0, x19
	bl	_ieee80211_scan_flush
	ldr	w1, [x24]
	mov	x0, x20
	bl	_IEEE80211_FREE
Lloh17:
	adrp	x8, _ENETRESET@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENETRESET@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:
	ldr	w1, [x24]
	mov	x0, x20
	bl	_IEEE80211_FREE
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_18:
	ldr	w22, [x8]
LBB0_19:
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_CHAN_BYTES,8,3       ; @IEEE80211_CHAN_BYTES
	.comm	_M_TEMP,4,2                     ; @M_TEMP
	.comm	_IEEE80211_M_NOWAIT,4,2         ; @IEEE80211_M_NOWAIT
	.comm	_IEEE80211_M_ZERO,4,2           ; @IEEE80211_M_ZERO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_NBBY,4,2                       ; @NBBY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IEEE80211_CHAN_ANYC,8,3        ; @IEEE80211_CHAN_ANYC
	.comm	_ENETRESET,4,2                  ; @ENETRESET
	.no_dead_strip	_ieee80211_ioctl_setchanlist
.subsections_via_symbols
