	.file	"extr_atmel.c_atmel_get_scan.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	atmel_get_scan, @function
atmel_get_scan:
.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
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rcx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 88
	.cfi_def_cfa_offset 144
	mov	QWORD PTR 8[rsp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	call	netdev_priv@PLT
	mov	r14, rax
	mov	rax, QWORD PTR SITE_SURVEY_COMPLETED[rip]
	cmp	QWORD PTR [r14], rax
	jne	.L2
	mov	eax, DWORD PTR 8[r14]
	mov	r9, rbp
	xor	r15d, r15d
	lea	r13, 16[rsp]
	xor	r11d, r11d
	test	eax, eax
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	mov	eax, DWORD PTR SIOCGIWAP[rip]
	lea	rbx, [r15+r15*2]
	mov	edi, DWORD PTR 52[rsp]
	mov	QWORD PTR [rsp], r9
	sal	rbx, 4
	mov	edx, DWORD PTR ETH_ALEN[rip]
	mov	DWORD PTR 64[rsp], eax
	mov	eax, DWORD PTR ARPHRD_ETHER[rip]
	mov	DWORD PTR 56[rsp], eax
	mov	rax, QWORD PTR 16[r14]
	mov	esi, DWORD PTR 40[rax+rbx]
	call	memcpy@PLT
	mov	r9, QWORD PTR [rsp]
	mov	rcx, r13
	mov	rdi, r12
	movsx	rdx, DWORD PTR IW_SCAN_MAX_DATA[rip]
	mov	r8d, DWORD PTR IW_EV_ADDR_LEN[rip]
	mov	rsi, r9
	add	rdx, rbp
	call	iwe_stream_add_event@PLT
	mov	ecx, 32
	mov	rdi, r12
	mov	rsi, rax
	mov	rax, QWORD PTR 16[r14]
	add	rax, rbx
	mov	edx, DWORD PTR [rax]
	mov	r8, QWORD PTR 32[rax]
	mov	DWORD PTR 20[rsp], 1
	cmp	edx, 32
	cmovg	edx, ecx
	mov	rcx, r13
	mov	DWORD PTR 16[rsp], edx
	mov	edx, DWORD PTR SIOCGIWESSID[rip]
	mov	DWORD PTR 64[rsp], edx
	movsx	rdx, DWORD PTR IW_SCAN_MAX_DATA[rip]
	add	rdx, rbp
	call	iwe_stream_add_point@PLT
	movsx	rdx, DWORD PTR IW_SCAN_MAX_DATA[rip]
	mov	rcx, r13
	mov	rdi, r12
	mov	rsi, rax
	mov	eax, DWORD PTR SIOCGIWMODE[rip]
	mov	r8d, DWORD PTR IW_EV_UINT_LEN[rip]
	add	rdx, rbp
	mov	DWORD PTR 64[rsp], eax
	mov	rax, QWORD PTR 16[r14]
	mov	eax, DWORD PTR 24[rax+rbx]
	mov	DWORD PTR 48[rsp], eax
	call	iwe_stream_add_event@PLT
	movsx	rdx, DWORD PTR IW_SCAN_MAX_DATA[rip]
	mov	rcx, r13
	mov	rdi, r12
	mov	rsi, rax
	mov	eax, DWORD PTR SIOCGIWFREQ[rip]
	mov	r8d, DWORD PTR IW_EV_FREQ_LEN[rip]
	add	rdx, rbp
	mov	DWORD PTR 64[rsp], eax
	mov	rax, QWORD PTR 16[r14]
	mov	eax, DWORD PTR 20[rax+rbx]
	mov	QWORD PTR 32[rsp], 0
	mov	DWORD PTR 40[rsp], eax
	call	iwe_stream_add_event@PLT
	movsx	rdx, DWORD PTR IW_SCAN_MAX_DATA[rip]
	mov	rcx, r13
	mov	rdi, r12
	mov	rsi, rax
	mov	eax, DWORD PTR IWEVQUAL[rip]
	mov	r8d, DWORD PTR IW_EV_QUAL_LEN[rip]
	add	rdx, rbp
	mov	DWORD PTR 64[rsp], eax
	mov	rax, QWORD PTR 16[r14]
	mov	eax, DWORD PTR 16[rax+rbx]
	mov	DWORD PTR 24[rsp], eax
	mov	DWORD PTR 28[rsp], eax
	call	iwe_stream_add_event@PLT
	mov	rdx, QWORD PTR 16[r14]
	mov	rsi, rax
	mov	eax, DWORD PTR SIOCGIWENCODE[rip]
	cmp	QWORD PTR 8[rdx+rbx], 0
	mov	DWORD PTR 64[rsp], eax
	mov	eax, DWORD PTR IW_ENCODE_DISABLED[rip]
	je	.L9
	mov	eax, DWORD PTR IW_ENCODE_ENABLED[rip]
	or	eax, DWORD PTR IW_ENCODE_NOKEY[rip]
.L9:
	movsx	rdx, DWORD PTR IW_SCAN_MAX_DATA[rip]
	xor	r8d, r8d
	mov	rcx, r13
	mov	rdi, r12
	mov	DWORD PTR 20[rsp], eax
	add	r15, 1
	add	rdx, rbp
	mov	DWORD PTR 16[rsp], 0
	call	iwe_stream_add_point@PLT
	mov	r9, rax
	cmp	DWORD PTR 8[r14], r15d
	jg	.L3
	mov	r11d, eax
	sub	r11d, ebp
.L4:
	mov	rax, QWORD PTR 8[rsp]
	mov	DWORD PTR [rax], r11d
	mov	QWORD PTR 8[rax], 0
	xor	eax, eax
.L1:
	mov	rdi, QWORD PTR 72[rsp]
	xor	rdi, QWORD PTR fs:40
	jne	.L16
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L2:
	.cfi_restore_state
	mov	eax, DWORD PTR EAGAIN[rip]
	neg	eax
	jmp	.L1
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	atmel_get_scan, .-atmel_get_scan
	.comm	SITE_SURVEY_COMPLETED,8,8
	.comm	SIOCGIWMODE,4,4
	.comm	SIOCGIWFREQ,4,4
	.comm	SIOCGIWESSID,4,4
	.comm	SIOCGIWENCODE,4,4
	.comm	SIOCGIWAP,4,4
	.comm	IW_SCAN_MAX_DATA,4,4
	.comm	IW_EV_UINT_LEN,4,4
	.comm	IW_EV_QUAL_LEN,4,4
	.comm	IW_EV_FREQ_LEN,4,4
	.comm	IW_EV_ADDR_LEN,4,4
	.comm	IW_ENCODE_NOKEY,4,4
	.comm	IW_ENCODE_ENABLED,4,4
	.comm	IW_ENCODE_DISABLED,4,4
	.comm	IWEVQUAL,4,4
	.comm	ETH_ALEN,4,4
	.comm	EAGAIN,4,4
	.comm	ARPHRD_ETHER,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_atmel.c_atmel_get_scan.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	atmel_get_scan, %function
atmel_get_scan:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r3
	sub	sp, sp, #68
	ldr	r3, .L17
	str	r2, [sp, #12]
	ldr	r3, [r3]
	str	r3, [sp, #60]
	mov	r3,#0
	mov	r6, r1
	bl	netdev_priv
	ldr	r3, .L17+4
	ldr	r2, [r0]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L2
	ldr	r3, [r0, #4]
	mov	r4, r0
	cmp	r3, #0
	movle	r5, #0
	ble	.L4
	mov	r8, r5
	mov	r9, #0
	ldr	r7, .L17+8
	ldr	fp, .L17+12
.L3:
	ldr	r3, [r4, #8]
	ldr	r2, .L17+16
	rsb	r10, r9, r9, lsl #3
	ldr	r0, [r2]
	add	r3, r3, r10, lsl #2
	ldr	r2, .L17+20
	ldr	r1, [r3, #24]
	ldr	r3, .L17+24
	ldr	ip, [r2]
	str	r0, [sp, #56]
	ldr	r2, [r3]
	ldr	r0, [sp, #48]
	str	ip, [sp, #52]
	bl	memcpy
	ldr	r3, .L17+28
	ldr	r2, [r7]
	ldr	r3, [r3]
	mov	r1, r8
	add	r2, r5, r2
	str	r3, [sp]
	mov	r0, r6
	add	r3, sp, #20
	bl	iwe_stream_add_event
	ldr	r3, [r4, #8]
	mov	r1, r0
	ldr	r2, [r3, r10, lsl #2]
	mov	r0, #1
	cmp	r2, #32
	movgt	r2, #32
	lsl	r8, r10, #2
	add	r3, r3, r8
	ldr	ip, .L17+32
	ldr	r3, [r3, #20]
	str	r2, [sp, #20]
	ldr	r2, [r7]
	ldr	ip, [ip]
	add	r2, r5, r2
	str	r3, [sp]
	str	r0, [sp, #24]
	add	r3, sp, #20
	mov	r0, r6
	str	ip, [sp, #56]
	bl	iwe_stream_add_point
	ldr	r3, [r4, #8]
	mov	r1, r0
	add	r3, r3, r8
	ldr	r0, .L17+36
	ldr	lr, [r3, #16]
	ldr	r3, .L17+40
	ldr	r10, [r0]
	ldr	r2, [r7]
	ldr	ip, [r3]
	add	r2, r5, r2
	str	r10, [sp]
	add	r3, sp, #20
	mov	r0, r6
	str	lr, [sp, #44]
	str	ip, [sp, #56]
	bl	iwe_stream_add_event
	mov	lr, #0
	mov	r1, r0
	ldr	r0, .L17+44
	ldr	r3, [r4, #8]
	ldr	ip, [r0]
	add	r3, r3, r8
	ldr	r0, .L17+48
	ldr	r3, [r3, #12]
	ldr	r2, [r7]
	str	ip, [sp]
	ldr	ip, [r0]
	add	r2, r5, r2
	str	r3, [sp, #40]
	mov	r0, r6
	add	r3, sp, #20
	str	lr, [sp, #36]
	str	ip, [sp, #56]
	bl	iwe_stream_add_event
	ldr	r3, [r4, #8]
	mov	r1, r0
	add	r3, r3, r8
	ldr	r0, .L17+52
	ldr	ip, [r3, #8]
	ldr	r3, .L17+56
	ldr	r10, [r0]
	ldr	r2, [r7]
	ldr	lr, [r3]
	add	r2, r5, r2
	add	r3, sp, #20
	mov	r0, r6
	str	r10, [sp]
	str	ip, [sp, #28]
	str	ip, [sp, #32]
	str	lr, [sp, #56]
	bl	iwe_stream_add_event
	mov	ip, #0
	ldr	r3, [r4, #8]
	mov	r1, r0
	add	r8, r3, r8
	ldr	r3, [r8, #4]
	ldr	r2, [fp]
	cmp	r3, #0
	ldrne	r3, .L17+60
	ldreq	r3, .L17+64
	ldrne	r0, [r3]
	ldrne	r3, .L17+68
	ldreq	r0, [r3]
	ldrne	r3, [r3]
	str	r2, [sp, #56]
	ldr	r2, [r7]
	orrne	r0, r0, r3
	str	r0, [sp, #24]
	add	r3, sp, #20
	mov	r0, r6
	str	ip, [sp]
	add	r2, r5, r2
	str	ip, [sp, #20]
	bl	iwe_stream_add_point
	ldr	r3, [r4, #4]
	add	r9, r9, #1
	cmp	r3, r9
	mov	r8, r0
	bgt	.L3
	sub	r5, r0, r5
.L4:
	mov	r3, #0
	mov	r0, r3
	ldr	r2, [sp, #12]
	str	r5, [r2]
	str	r3, [r2, #4]
.L1:
	ldr	r3, .L17
	ldr	r2, [r3]
	ldr	r3, [sp, #60]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L16
	add	sp, sp, #68
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r3, .L17+72
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L16:
	bl	__stack_chk_fail
.L18:
	.align	2
.L17:
	.word	.LC0
	.word	SITE_SURVEY_COMPLETED
	.word	IW_SCAN_MAX_DATA
	.word	SIOCGIWENCODE
	.word	SIOCGIWAP
	.word	ARPHRD_ETHER
	.word	ETH_ALEN
	.word	IW_EV_ADDR_LEN
	.word	SIOCGIWESSID
	.word	IW_EV_UINT_LEN
	.word	SIOCGIWMODE
	.word	IW_EV_FREQ_LEN
	.word	SIOCGIWFREQ
	.word	IW_EV_QUAL_LEN
	.word	IWEVQUAL
	.word	IW_ENCODE_ENABLED
	.word	IW_ENCODE_DISABLED
	.word	IW_ENCODE_NOKEY
	.word	EAGAIN
	.size	atmel_get_scan, .-atmel_get_scan
	.comm	SITE_SURVEY_COMPLETED,4,4
	.comm	SIOCGIWMODE,4,4
	.comm	SIOCGIWFREQ,4,4
	.comm	SIOCGIWESSID,4,4
	.comm	SIOCGIWENCODE,4,4
	.comm	SIOCGIWAP,4,4
	.comm	IW_SCAN_MAX_DATA,4,4
	.comm	IW_EV_UINT_LEN,4,4
	.comm	IW_EV_QUAL_LEN,4,4
	.comm	IW_EV_FREQ_LEN,4,4
	.comm	IW_EV_ADDR_LEN,4,4
	.comm	IW_ENCODE_NOKEY,4,4
	.comm	IW_ENCODE_ENABLED,4,4
	.comm	IW_ENCODE_DISABLED,4,4
	.comm	IWEVQUAL,4,4
	.comm	ETH_ALEN,4,4
	.comm	EAGAIN,4,4
	.comm	ARPHRD_ETHER,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
