	.file	"extr_scan.c_wlcore_scan_get_channels.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	""
.LC1:
	.string	", NO-IR"
.LC2:
	.string	", DFS"
.LC3:
	.string	"n_pactive_ch = %d"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC4:
	.string	"freq %d, ch. %d, flags 0x%x, power %d, min/max_dwell %d/%d%s%s"
	.text
	.p2align 4
	.type	wlcore_scan_get_channels, @function
wlcore_scan_get_channels:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rsi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rcx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, r9
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	eax, DWORD PTR 168[rsp]
	cmp	DWORD PTR SCAN_TYPE_SEARCH[rip], eax
	mov	QWORD PTR 32[rsp], r8
	mov	r11d, DWORD PTR 152[rsp]
	je	.L41
	cmp	QWORD PTR NL80211_BAND_5GHZ[rip], r9
	mov	rax, QWORD PTR 8[rdi]
	cmove	rax, QWORD PTR [rdi]
	mov	rdi, QWORD PTR 24[rdi]
	mov	rbp, QWORD PTR 32[rbx]
	mov	r8, QWORD PTR 40[rbx]
	imul	rdi, rcx
	imul	rdi, rax
	add	rdi, QWORD PTR 16[rbx]
	mov	rbx, QWORD PTR 48[rbx]
	add	rbp, rdi
.L4:
	mov	esi, 1000
	mov	DWORD PTR 152[rsp], r11d
	mov	QWORD PTR 8[rsp], r8
	call	DIV_ROUND_UP@PLT
	mov	esi, 1000
	mov	rdi, rbp
	mov	QWORD PTR 16[rsp], rax
	call	DIV_ROUND_UP@PLT
	mov	r8, QWORD PTR 8[rsp]
	mov	esi, 1000
	mov	QWORD PTR 24[rsp], rax
	mov	rdi, r8
	call	DIV_ROUND_UP@PLT
	mov	esi, 1000
	mov	rdi, rbx
	mov	QWORD PTR 8[rsp], rax
	call	DIV_ROUND_UP@PLT
	mov	QWORD PTR 40[rsp], rax
	test	r12, r12
	jle	.L17
	mov	r11d, DWORD PTR 152[rsp]
	cmp	DWORD PTR 144[rsp], r11d
	jge	.L17
	mov	ebp, DWORD PTR 144[rsp]
	mov	ebx, 1
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L8:
	cmp	ebp, r11d
	setl	dl
	cmp	r12, rbx
	setg	al
	add	rbx, 1
	test	dl, al
	je	.L42
.L16:
	mov	rax, QWORD PTR -8[r15+rbx*8]
	mov	rcx, QWORD PTR [rax]
	test	r14, r14
	jne	.L7
	or	rcx, QWORD PTR IEEE80211_CHAN_NO_IR[rip]
.L7:
	cmp	QWORD PTR 8[rax], r13
	jne	.L8
	test	QWORD PTR IEEE80211_CHAN_DISABLED[rip], rcx
	jne	.L8
	xor	eax, eax
	mov	rsi, rcx
	and	rsi, QWORD PTR IEEE80211_CHAN_RADAR[rip]
	setne	al
	cmp	eax, DWORD PTR 128[rsp]
	jne	.L8
	mov	eax, DWORD PTR 128[rsp]
	test	eax, eax
	jne	.L9
	xor	eax, eax
	test	QWORD PTR IEEE80211_CHAN_NO_IR[rip], rcx
	setne	al
	cmp	eax, DWORD PTR 136[rsp]
	jne	.L8
.L9:
	mov	rdi, QWORD PTR 32[rsp]
	movsx	rax, ebp
	mov	DWORD PTR 152[rsp], r11d
	lea	rax, [rax+rax*4]
	lea	rdx, [rdi+rax*8]
	test	rsi, rsi
	jne	.L43
	mov	rdi, QWORD PTR 8[rsp]
	mov	QWORD PTR 56[rsp], rdx
	mov	QWORD PTR 48[rsp], rcx
	call	cpu_to_le16@PLT
	mov	rdx, QWORD PTR 56[rsp]
	mov	rcx, QWORD PTR 48[rsp]
	mov	r11d, DWORD PTR 152[rsp]
	mov	QWORD PTR 32[rdx], rax
.L11:
	mov	rdi, QWORD PTR 16[rsp]
	mov	DWORD PTR 152[rsp], r11d
	mov	QWORD PTR 56[rsp], rcx
	mov	QWORD PTR 48[rsp], rdx
	call	cpu_to_le16@PLT
	mov	rdx, QWORD PTR 48[rsp]
	mov	rdi, QWORD PTR 24[rsp]
	mov	QWORD PTR 24[rdx], rax
	call	cpu_to_le16@PLT
	mov	rdx, QWORD PTR 48[rsp]
	mov	rcx, QWORD PTR 56[rsp]
	cmp	QWORD PTR 160[rsp], 0
	mov	r11d, DWORD PTR 152[rsp]
	mov	QWORD PTR 16[rdx], rax
	mov	rax, QWORD PTR -8[r15+rbx*8]
	mov	rdi, rcx
	mov	r9d, DWORD PTR 20[rax]
	mov	r10d, DWORD PTR 16[rax]
	mov	DWORD PTR 8[rdx], r9d
	mov	DWORD PTR [rdx], r10d
	je	.L44
	lea	r8d, -12[r10]
	and	rdi, QWORD PTR IEEE80211_CHAN_NO_IR[rip]
	cmp	r8d, 2
	ja	.L13
	cmp	QWORD PTR NL80211_BAND_2GHZ[rip], r13
	je	.L45
.L13:
	test	rdi, rdi
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	mov	edx, DWORD PTR 24[rax]
	cmove	rdi, rsi
	test	QWORD PTR IEEE80211_CHAN_RADAR[rip], rcx
	mov	rcx, rsi
	mov	DWORD PTR 152[rsp], r11d
	lea	rsi, .LC2[rip]
	cmovne	rcx, rsi
	push	rdi
	.cfi_def_cfa_offset 136
	mov	edi, DWORD PTR DEBUG_SCAN[rip]
	add	ebp, 1
	lea	rsi, .LC4[rip]
	push	rcx
	.cfi_def_cfa_offset 144
	mov	ecx, r10d
	push	QWORD PTR 40[rsp]
	.cfi_def_cfa_offset 152
	push	QWORD PTR 40[rsp]
	.cfi_def_cfa_offset 160
	mov	r8, QWORD PTR [rax]
	xor	eax, eax
	call	wl1271_debug@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 128
	mov	r11d, DWORD PTR 152[rsp]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L42:
	mov	eax, ebp
	sub	eax, DWORD PTR 144[rsp]
	add	rsp, 72
	.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
.L41:
	.cfi_restore_state
	call	wlcore_count_started_vifs@PLT
	mov	rbp, QWORD PTR 80[rbx]
	mov	rdi, QWORD PTR 64[rbx]
	test	eax, eax
	mov	r8, QWORD PTR 88[rbx]
	cmovne	rdi, QWORD PTR 56[rbx]
	cmovne	rbp, QWORD PTR 72[rbx]
	mov	r11d, DWORD PTR 152[rsp]
	mov	rbx, QWORD PTR 96[rbx]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L43:
	mov	eax, DWORD PTR SCAN_CHANNEL_FLAGS_DFS[rip]
	mov	rdi, QWORD PTR 40[rsp]
	mov	QWORD PTR 56[rsp], rcx
	or	DWORD PTR 4[rdx], eax
	mov	QWORD PTR 48[rsp], rdx
	call	cpu_to_le16@PLT
	mov	rdx, QWORD PTR 48[rsp]
	mov	rcx, QWORD PTR 56[rsp]
	mov	r11d, DWORD PTR 152[rsp]
	mov	QWORD PTR 32[rdx], rax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L17:
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
.L44:
	.cfi_restore_state
	and	rdi, QWORD PTR IEEE80211_CHAN_NO_IR[rip]
	jmp	.L13
.L45:
	test	r14, r14
	je	.L13
	test	rdi, rdi
	je	.L13
	mov	eax, DWORD PTR SCAN_CHANNEL_FLAGS_DFS[rip]
	lea	rsi, .LC3[rip]
	mov	QWORD PTR 56[rsp], rcx
	mov	DWORD PTR 152[rsp], r11d
	mov	DWORD PTR 4[rdx], eax
	mov	rax, QWORD PTR 160[rsp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	DWORD PTR 48[rsp], eax
	mov	rax, QWORD PTR 160[rsp]
	mov	DWORD PTR [rax], edx
	mov	edi, DWORD PTR DEBUG_SCAN[rip]
	xor	eax, eax
	call	wl1271_debug@PLT
	mov	rax, QWORD PTR -8[r15+rbx*8]
	mov	rcx, QWORD PTR 56[rsp]
	mov	rdi, QWORD PTR IEEE80211_CHAN_NO_IR[rip]
	mov	r11d, DWORD PTR 152[rsp]
	mov	r9d, DWORD PTR 20[rax]
	mov	r10d, DWORD PTR 16[rax]
	and	rdi, rcx
	jmp	.L13
	.cfi_endproc
.LFE0:
	.size	wlcore_scan_get_channels, .-wlcore_scan_get_channels
	.comm	SCAN_TYPE_SEARCH,4,4
	.comm	SCAN_CHANNEL_FLAGS_DFS,4,4
	.comm	NL80211_BAND_5GHZ,8,8
	.comm	NL80211_BAND_2GHZ,8,8
	.comm	IEEE80211_CHAN_RADAR,8,8
	.comm	IEEE80211_CHAN_NO_IR,8,8
	.comm	IEEE80211_CHAN_DISABLED,8,8
	.comm	DEBUG_SCAN,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_scan.c_wlcore_scan_get_channels.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"\000"
	.align	2
.LC1:
	.ascii	", DFS\000"
	.align	2
.LC2:
	.ascii	", NO-IR\000"
	.align	2
.LC3:
	.ascii	"n_pactive_ch = %d\000"
	.align	2
.LC4:
	.ascii	"freq %d, ch. %d, flags 0x%x, power %d, min/max_dwel"
	.ascii	"l %d/%d%s%s\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	wlcore_scan_get_channels, %function
wlcore_scan_get_channels:
	@ args = 32, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	lr, .L34
	sub	sp, sp, #52
	ldr	ip, [sp, #116]
	ldr	lr, [lr]
	mov	r6, r1
	cmp	lr, ip
	mov	r8, r2
	mov	r9, r3
	mov	r4, r0
	ldr	fp, [sp, #92]
	beq	.L31
	ldr	r3, .L34+4
	ldr	r2, [r0]
	ldr	r1, [r3]
	ldr	r3, [r0, #4]
	cmp	r1, fp
	moveq	r3, r2
	ldr	r0, [r0, #12]
	ldr	r2, [r4, #8]
	mul	r0, r9, r0
	mla	r0, r3, r0, r2
	ldr	r7, [r4, #16]
	ldr	r5, [r4, #20]
	ldr	r4, [r4, #24]
	add	r7, r0, r7
.L4:
	mov	r1, #1000
	bl	DIV_ROUND_UP
	mov	r3, r0
	mov	r1, #1000
	mov	r0, r7
	str	r3, [sp, #24]
	bl	DIV_ROUND_UP
	mov	r3, r0
	mov	r1, #1000
	mov	r0, r5
	str	r3, [sp, #28]
	bl	DIV_ROUND_UP
	mov	r3, r0
	mov	r1, #1000
	mov	r0, r4
	str	r3, [sp, #32]
	bl	DIV_ROUND_UP
	ldr	r3, [sp, #104]
	ldr	r2, [sp, #108]
	cmp	r8, #0
	movle	r7, #0
	movgt	r7, #1
	cmp	r3, r2
	movge	r7, #0
	cmp	r7, #0
	str	r0, [sp, #36]
	beq	.L17
	mov	r7, r3
	mov	r4, #0
	ldr	r10, .L34+8
	sub	r6, r6, #4
	b	.L16
.L8:
	ldr	r2, [sp, #108]
	add	r4, r4, #1
	cmp	r8, r4
	movle	r3, #0
	movgt	r3, #1
	cmp	r7, r2
	movge	r3, #0
	cmp	r3, #0
	beq	.L32
.L16:
	ldr	r3, [r6, #4]!
	cmp	r9, #0
	ldr	r5, [r3]
	ldreq	r2, [r10]
	ldr	r3, [r3, #4]
	orreq	r5, r5, r2
	cmp	r3, fp
	bne	.L8
	ldr	r3, .L34+12
	ldr	r3, [r3]
	tst	r5, r3
	bne	.L8
	ldr	r3, .L34+16
	ldr	r1, [sp, #96]
	ldr	r3, [r3]
	ands	r3, r5, r3
	movne	r2, #1
	moveq	r2, #0
	cmp	r2, r1
	bne	.L8
	cmp	r1, #0
	bne	.L9
	ldr	r2, [r10]
	ldr	r1, [sp, #100]
	tst	r5, r2
	movne	r2, #1
	moveq	r2, #0
	cmp	r2, r1
	bne	.L8
.L9:
	cmp	r3, #0
	ldr	r2, [sp, #88]
	add	r3, r7, r7, lsl #1
	ldrne	r1, .L34+20
	add	r2, r2, r3, lsl #3
	ldrne	r1, [r1]
	str	r3, [sp, #40]
	ldrne	r3, [r2, #4]
	ldrne	r0, [sp, #36]
	orrne	r3, r3, r1
	strne	r3, [r2, #4]
	ldreq	r0, [sp, #32]
	strne	r2, [sp, #44]
	streq	r2, [sp, #44]
	bl	cpu_to_le16
	ldr	r2, [sp, #44]
	str	r0, [r2, #20]
	ldr	r0, [sp, #24]
	str	r2, [sp, #44]
	bl	cpu_to_le16
	mov	r3, r0
	ldr	r2, [sp, #44]
	ldr	r0, [sp, #28]
	str	r3, [r2, #16]
	bl	cpu_to_le16
	ldr	r2, [sp, #44]
	ldr	r3, [sp, #112]
	str	r0, [r2, #12]
	ldr	r0, [r6]
	ldr	r1, [sp, #88]
	ldr	lr, [r0, #12]
	ldr	ip, [sp, #40]
	cmp	r3, #0
	ldr	r3, [r0, #8]
	str	lr, [r2, #8]
	str	r3, [r1, ip, lsl #3]
	beq	.L33
	ldr	ip, .L34+24
	sub	r1, r3, #12
	ldr	ip, [ip]
	cmp	r1, #2
	cmpls	ip, fp
	ldr	r1, [r10]
	and	r1, r5, r1
	beq	.L26
.L29:
	ldr	r2, .L34+28
	str	r2, [sp, #40]
.L13:
	ldr	r2, .L34+16
	ldr	ip, .L34+32
	ldr	r2, [r2]
	add	r7, r7, #1
	tst	r5, r2
	ldr	r2, .L34+36
	movne	r5, ip
	moveq	r5, r2
	cmp	r1, #0
	ldr	ip, .L34+40
	moveq	ip, r2
	mov	r1, ip
	ldr	r2, [r0, #16]
	ldr	ip, [r0]
	ldr	r0, [sp, #40]
	ldr	r0, [r0]
	str	r1, [sp, #20]
	ldr	r1, [sp, #28]
	str	r5, [sp, #16]
	str	r1, [sp, #12]
	ldr	r1, [sp, #24]
	str	ip, [sp]
	str	r1, [sp, #8]
	str	lr, [sp, #4]
	ldr	r1, .L34+44
	bl	wl1271_debug
	b	.L8
.L32:
	ldr	r3, [sp, #104]
	sub	r0, r7, r3
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L31:
	bl	wlcore_count_started_vifs
	mov	r3, r0
	cmp	r3, #0
	ldr	r3, [r4, #40]
	add	r0, r4, #28
	ldm	r0, {r0, r2, r7}
	ldr	r5, [r4, #44]
	moveq	r0, r2
	moveq	r7, r3
	ldr	r4, [r4, #48]
	b	.L4
.L17:
	mov	r0, r7
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L33:
	ldr	r1, [r10]
	ldr	r2, .L34+28
	and	r1, r1, r5
	str	r2, [sp, #40]
	b	.L13
.L26:
	cmp	r9, #0
	cmpne	r1, #0
	beq	.L29
	ldr	r3, .L34+20
	ldr	r0, .L34+28
	ldr	r3, [r3]
	ldr	r1, .L34+48
	str	r3, [r2, #4]
	ldr	r3, [sp, #112]
	str	r0, [sp, #40]
	ldr	r2, [r3]
	add	r2, r2, #1
	str	r2, [r3]
	ldr	r0, [r0]
	bl	wl1271_debug
	ldr	r0, [r6]
	ldr	r1, [r10]
	ldr	r3, [r0, #8]
	ldr	lr, [r0, #12]
	and	r1, r1, r5
	b	.L13
.L35:
	.align	2
.L34:
	.word	SCAN_TYPE_SEARCH
	.word	NL80211_BAND_5GHZ
	.word	IEEE80211_CHAN_NO_IR
	.word	IEEE80211_CHAN_DISABLED
	.word	IEEE80211_CHAN_RADAR
	.word	SCAN_CHANNEL_FLAGS_DFS
	.word	NL80211_BAND_2GHZ
	.word	DEBUG_SCAN
	.word	.LC1
	.word	.LC0
	.word	.LC2
	.word	.LC4
	.word	.LC3
	.size	wlcore_scan_get_channels, .-wlcore_scan_get_channels
	.comm	SCAN_TYPE_SEARCH,4,4
	.comm	SCAN_CHANNEL_FLAGS_DFS,4,4
	.comm	NL80211_BAND_5GHZ,4,4
	.comm	NL80211_BAND_2GHZ,4,4
	.comm	IEEE80211_CHAN_RADAR,4,4
	.comm	IEEE80211_CHAN_NO_IR,4,4
	.comm	IEEE80211_CHAN_DISABLED,4,4
	.comm	DEBUG_SCAN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
