	.file	"extr_ieee80211_ioctl.c_ieee80211_ioctl_setchanlist.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ieee80211_ioctl_setchanlist, @function
ieee80211_ioctl_setchanlist:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rbp, QWORD PTR [rdi]
	mov	QWORD PTR 8[rsp], rdi
	movsx	rdi, DWORD PTR [rsi]
	cmp	edi, 4
	jbe	.L3
	mov	DWORD PTR [rsi], 4
	mov	edi, 4
.L3:
	mov	esi, DWORD PTR M_TEMP[rip]
	mov	edx, DWORD PTR IEEE80211_M_NOWAIT[rip]
	add	rdi, QWORD PTR IEEE80211_CHAN_BYTES[rip]
	or	edx, DWORD PTR IEEE80211_M_ZERO[rip]
	call	IEEE80211_MALLOC@PLT
	mov	r14d, DWORD PTR ENOMEM[rip]
	mov	r15, rax
	test	rax, rax
	je	.L1
	mov	edi, DWORD PTR 4[rbx]
	mov	edx, DWORD PTR [rbx]
	mov	rsi, rax
	call	copyin@PLT
	mov	r14d, eax
	test	eax, eax
	jne	.L28
	movsx	rax, DWORD PTR [rbx]
	xor	ebx, ebx
	mov	rdx, rax
	imul	edx, DWORD PTR NBBY[rip]
	lea	rax, [r15+rax*4]
	mov	QWORD PTR [rsp], rax
	mov	eax, DWORD PTR 0[rbp]
	mov	r13d, edx
	test	eax, eax
	jg	.L7
.L9:
	mov	esi, DWORD PTR M_TEMP[rip]
	mov	rdi, r15
	call	IEEE80211_FREE@PLT
	mov	r14d, DWORD PTR EINVAL[rip]
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L30:
	.cfi_restore_state
	mov	rdi, r15
	call	isset@PLT
	test	rax, rax
	je	.L8
	mov	esi, DWORD PTR [r12]
	mov	rdi, QWORD PTR [rsp]
	add	r14d, 1
	call	setbit@PLT
.L8:
	add	rbx, 1
	cmp	DWORD PTR 0[rbp], ebx
	jle	.L29
.L7:
	mov	rax, QWORD PTR 16[rbp]
	lea	r12, [rax+rbx*4]
	mov	esi, DWORD PTR [r12]
	cmp	esi, r13d
	jl	.L30
	add	rbx, 1
	cmp	DWORD PTR 0[rbp], ebx
	jg	.L7
.L29:
	test	r14d, r14d
	je	.L9
	mov	rax, QWORD PTR 8[rbp]
	cmp	rax, QWORD PTR IEEE80211_CHAN_ANYC[rip]
	je	.L11
	mov	esi, DWORD PTR [rax]
	mov	rdi, QWORD PTR [rsp]
	call	isclr@PLT
	test	rax, rax
	je	.L11
	mov	rax, QWORD PTR IEEE80211_CHAN_ANYC[rip]
	mov	QWORD PTR 8[rbp], rax
.L11:
	mov	rdx, QWORD PTR IEEE80211_CHAN_BYTES[rip]
	mov	rsi, QWORD PTR [rsp]
	mov	edi, DWORD PTR 4[rbp]
	call	memcpy@PLT
	mov	rdi, QWORD PTR 8[rsp]
	call	ieee80211_scan_flush@PLT
	mov	esi, DWORD PTR M_TEMP[rip]
	mov	rdi, r15
	call	IEEE80211_FREE@PLT
	mov	r14d, DWORD PTR ENETRESET[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L28:
	mov	esi, DWORD PTR M_TEMP[rip]
	mov	rdi, r15
	call	IEEE80211_FREE@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	ieee80211_ioctl_setchanlist, .-ieee80211_ioctl_setchanlist
	.comm	NBBY,4,4
	.comm	M_TEMP,4,4
	.comm	IEEE80211_M_ZERO,4,4
	.comm	IEEE80211_M_NOWAIT,4,4
	.comm	IEEE80211_CHAN_BYTES,8,8
	.comm	IEEE80211_CHAN_ANYC,8,8
	.comm	ENOMEM,4,4
	.comm	ENETRESET,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ieee80211_ioctl.c_ieee80211_ioctl_setchanlist.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ieee80211_ioctl_setchanlist, %function
ieee80211_ioctl_setchanlist:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r1]
	mov	r2, r0
	cmp	r3, #4
	movhi	r2, #4
	movhi	r3, r2
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	fp, .L30
	sub	sp, sp, #12
	ldr	r6, [r0]
	str	r0, [sp, #4]
	strhi	r2, [r1]
	ldr	r0, [fp]
	mov	r4, r1
	ldr	r2, .L30+4
	ldr	r1, .L30+8
	ldr	r2, [r2]
	ldr	r1, [r1]
	add	r0, r3, r0
	ldr	r3, .L30+12
	orr	r2, r1, r2
	ldr	r1, [r3]
	bl	IEEE80211_MALLOC
	subs	r7, r0, #0
	beq	.L26
	mov	r1, r7
	ldr	r2, [r4]
	ldr	r0, [r4, #4]
	bl	copyin
	subs	r8, r0, #0
	bne	.L27
	ldr	r3, .L30+16
	ldr	r10, [r4]
	ldr	r3, [r3]
	ldr	r0, [r6]
	mul	r9, r3, r10
	cmp	r0, #0
	add	r3, r7, r10, lsl #2
	movgt	r4, r8
	str	r3, [sp]
	bgt	.L6
.L8:
	ldr	r3, .L30+12
	mov	r0, r7
	ldr	r1, [r3]
	bl	IEEE80211_FREE
	ldr	r3, .L30+20
	ldr	r8, [r3]
	mov	r0, r8
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L29:
	mov	r0, r7
	bl	isset
	cmp	r0, #0
	bne	.L22
	ldr	r0, [r6]
.L7:
	add	r4, r4, #1
	cmp	r0, r4
	ble	.L28
.L6:
	ldr	r5, [r6, #12]
	lsl	r10, r4, #2
	ldr	r1, [r5, r4, lsl #2]
	cmp	r1, r9
	blt	.L29
	add	r4, r4, #1
	cmp	r0, r4
	bgt	.L6
.L28:
	cmp	r8, #0
	beq	.L8
	ldr	r4, .L30+24
	ldr	r3, [r6, #8]
	ldr	r2, [r4]
	cmp	r3, r2
	beq	.L10
	ldr	r1, [r3]
	ldr	r0, [sp]
	bl	isclr
	cmp	r0, #0
	ldrne	r3, [r4]
	strne	r3, [r6, #8]
.L10:
	ldr	r2, [fp]
	ldr	r1, [sp]
	ldr	r0, [r6, #4]
	bl	memcpy
	ldr	r0, [sp, #4]
	bl	ieee80211_scan_flush
	ldr	r3, .L30+12
	mov	r0, r7
	ldr	r1, [r3]
	bl	IEEE80211_FREE
	ldr	r3, .L30+28
	ldr	r8, [r3]
	mov	r0, r8
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L22:
	ldr	r1, [r5, r10]
	ldr	r0, [sp]
	bl	setbit
	add	r8, r8, #1
	ldr	r0, [r6]
	b	.L7
.L26:
	ldr	r3, .L30+32
	ldr	r8, [r3]
	mov	r0, r8
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L27:
	ldr	r3, .L30+12
	mov	r0, r7
	ldr	r1, [r3]
	bl	IEEE80211_FREE
	mov	r0, r8
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L31:
	.align	2
.L30:
	.word	IEEE80211_CHAN_BYTES
	.word	IEEE80211_M_ZERO
	.word	IEEE80211_M_NOWAIT
	.word	M_TEMP
	.word	NBBY
	.word	EINVAL
	.word	IEEE80211_CHAN_ANYC
	.word	ENETRESET
	.word	ENOMEM
	.size	ieee80211_ioctl_setchanlist, .-ieee80211_ioctl_setchanlist
	.comm	NBBY,4,4
	.comm	M_TEMP,4,4
	.comm	IEEE80211_M_ZERO,4,4
	.comm	IEEE80211_M_NOWAIT,4,4
	.comm	IEEE80211_CHAN_BYTES,4,4
	.comm	IEEE80211_CHAN_ANYC,4,4
	.comm	ENOMEM,4,4
	.comm	ENETRESET,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
