	.file	"extr_p2p.c_brcmf_p2p_run_escan.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"enter\n"
.LC1:
	.string	"P2P SEARCH PHASE START\n"
.LC2:
	.string	"Already a GO. Do SEARCH Only\n"
.LC3:
	.string	"P2P SCAN STATE START\n"
.LC4:
	.string	"%d: chan=%d, channel spec=%x\n"
.LC5:
	.string	"error (%d)\n"
	.text
	.p2align 4
	.type	brcmf_p2p_run_escan, @function
brcmf_p2p_run_escan:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	lea	rsi, .LC0[rip]
	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
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR [rdi]
	mov	edi, DWORD PTR TRACE[rip]
	mov	QWORD PTR 8[rsp], rax
	mov	eax, DWORD PTR WL_P2P_DISC_ST_SCAN[rip]
	mov	DWORD PTR 4[rsp], eax
	xor	eax, eax
	call	brcmf_dbg@PLT
	mov	r15d, DWORD PTR EINVAL[rip]
	neg	r15d
	test	rbx, rbx
	je	.L3
	mov	r15d, DWORD PTR [rbx]
	test	r15d, r15d
	jne	.L27
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r15d
	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
.L14:
	.cfi_restore_state
	xor	r14d, r14d
	.p2align 4,,10
	.p2align 3
.L10:
	mov	ecx, DWORD PTR 4[rsp]
	lea	rdi, 8[rbp]
	mov	rdx, r12
	mov	esi, r14d
	mov	r8d, DWORD PTR P2PAPI_BSSCFG_DEVICE[rip]
	call	brcmf_p2p_escan@PLT
	mov	rdi, r12
	mov	r15d, eax
	call	kfree@PLT
.L3:
	test	r15d, r15d
	je	.L1
	mov	rdi, QWORD PTR 8[rsp]
	mov	edx, r15d
	lea	rsi, .LC5[rip]
	call	bphy_err@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L27:
	mov	edx, DWORD PTR GFP_KERNEL[rip]
	mov	edi, r15d
	mov	esi, 4
	call	kcalloc@PLT
	mov	r15d, DWORD PTR ENOMEM[rip]
	mov	r12, rax
	neg	r15d
	test	rax, rax
	je	.L3
	mov	rdx, QWORD PTR P2PAPI_BSSCFG_CONNECTION[rip]
	mov	rax, QWORD PTR 16[rbp]
	mov	edi, DWORD PTR INFO[rip]
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	edx, DWORD PTR [rbx]
	test	rax, rax
	je	.L6
	mov	rcx, QWORD PTR 8[rax]
	cmp	edx, 3
	je	.L28
.L7:
	test	rcx, rcx
	je	.L9
	mov	rcx, QWORD PTR NL80211_IFTYPE_P2P_GO[rip]
	cmp	QWORD PTR [rax], rcx
	je	.L29
.L9:
	lea	rsi, .LC3[rip]
	xor	eax, eax
	call	brcmf_dbg@PLT
.L8:
	mov	eax, DWORD PTR [rbx]
	test	eax, eax
	jle	.L14
	xor	r13d, r13d
	xor	r14d, r14d
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rax, QWORD PTR 8[rbx]
	mov	r15, QWORD PTR [rax+r13*8]
	mov	eax, DWORD PTR IEEE80211_CHAN_RADAR[rip]
	or	eax, DWORD PTR IEEE80211_CHAN_NO_IR[rip]
	test	DWORD PTR 8[r15], eax
	jne	.L11
	mov	rdi, QWORD PTR 8[rbp]
	mov	rsi, r15
	call	channel_to_chanspec@PLT
	mov	rcx, QWORD PTR [r15]
	mov	edx, r14d
	lea	rsi, .LC4[rip]
	mov	DWORD PTR [r12+r13*4], eax
	mov	edi, DWORD PTR INFO[rip]
	mov	r8d, eax
	xor	eax, eax
	add	r14d, 1
	call	brcmf_dbg@PLT
.L11:
	add	r13, 1
	cmp	DWORD PTR [rbx], r13d
	jg	.L12
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L6:
	cmp	edx, 3
	jne	.L9
	mov	rax, QWORD PTR 8[rbx]
	mov	rcx, QWORD PTR SOCIAL_CHAN_1[rip]
	mov	rdx, QWORD PTR [rax]
	cmp	QWORD PTR [rdx], rcx
	jne	.L9
	mov	rdx, QWORD PTR 8[rax]
	mov	rcx, QWORD PTR SOCIAL_CHAN_2[rip]
	cmp	QWORD PTR [rdx], rcx
	jne	.L9
	mov	rax, QWORD PTR 16[rax]
	mov	rcx, QWORD PTR SOCIAL_CHAN_3[rip]
	cmp	QWORD PTR [rax], rcx
	jne	.L9
.L13:
	mov	eax, DWORD PTR WL_P2P_DISC_ST_SEARCH[rip]
	lea	rsi, .LC1[rip]
	mov	DWORD PTR 4[rsp], eax
	xor	eax, eax
	call	brcmf_dbg@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L28:
	mov	rdx, QWORD PTR 8[rbx]
	mov	r9, QWORD PTR SOCIAL_CHAN_1[rip]
	mov	rsi, QWORD PTR [rdx]
	cmp	QWORD PTR [rsi], r9
	jne	.L7
	mov	rsi, QWORD PTR 8[rdx]
	mov	r10, QWORD PTR SOCIAL_CHAN_2[rip]
	cmp	QWORD PTR [rsi], r10
	jne	.L7
	mov	rdx, QWORD PTR 16[rdx]
	mov	rsi, QWORD PTR SOCIAL_CHAN_3[rip]
	cmp	QWORD PTR [rdx], rsi
	jne	.L7
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L29:
	lea	rsi, .LC2[rip]
	xor	eax, eax
	call	brcmf_dbg@PLT
	mov	eax, DWORD PTR WL_P2P_DISC_ST_SEARCH[rip]
	mov	DWORD PTR 4[rsp], eax
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	brcmf_p2p_run_escan, .-brcmf_p2p_run_escan
	.comm	WL_P2P_DISC_ST_SEARCH,4,4
	.comm	WL_P2P_DISC_ST_SCAN,4,4
	.comm	TRACE,4,4
	.comm	SOCIAL_CHAN_3,8,8
	.comm	SOCIAL_CHAN_2,8,8
	.comm	SOCIAL_CHAN_1,8,8
	.comm	P2PAPI_BSSCFG_DEVICE,4,4
	.comm	P2PAPI_BSSCFG_CONNECTION,8,8
	.comm	NL80211_IFTYPE_P2P_GO,8,8
	.comm	INFO,4,4
	.comm	IEEE80211_CHAN_RADAR,4,4
	.comm	IEEE80211_CHAN_NO_IR,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,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_p2p.c_brcmf_p2p_run_escan.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"enter\012\000"
	.align	2
.LC1:
	.ascii	"P2P SEARCH PHASE START\012\000"
	.align	2
.LC2:
	.ascii	"Already a GO. Do SEARCH Only\012\000"
	.align	2
.LC3:
	.ascii	"P2P SCAN STATE START\012\000"
	.align	2
.LC4:
	.ascii	"%d: chan=%d, channel spec=%x\012\000"
	.align	2
.LC5:
	.ascii	"error (%d)\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	brcmf_p2p_run_escan, %function
brcmf_p2p_run_escan:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r0
	mov	r5, r2
	ldr	r3, .L32
	ldr	r2, .L32+4
	ldr	r3, [r3]
	ldr	r0, [r2]
	ldr	r2, [r6]
	sub	sp, sp, #28
	ldr	r1, .L32+8
	str	r2, [sp, #20]
	str	r3, [sp, #16]
	bl	brcmf_dbg
	cmp	r5, #0
	beq	.L27
	ldr	r4, [r5]
	cmp	r4, #0
	bne	.L28
.L1:
	mov	r0, r4
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L28:
	ldr	r3, .L32+12
	mov	r0, r4
	mov	r1, #4
	ldr	r2, [r3]
	bl	kcalloc
	subs	r7, r0, #0
	beq	.L29
	ldr	r2, .L32+16
	ldr	r3, [r6, #8]
	ldr	r2, [r2]
	ldr	r3, [r3, r2, lsl #2]
	ldr	r2, .L32+20
	cmp	r3, #0
	ldr	r0, [r2]
	ldr	r2, [r5]
	beq	.L6
	cmp	r2, #3
	ldr	r2, [r3, #4]
	beq	.L30
.L7:
	cmp	r2, #0
	beq	.L9
	ldr	r1, .L32+24
	ldr	r2, [r3]
	ldr	r3, [r1]
	cmp	r2, r3
	beq	.L31
.L9:
	ldr	r1, .L32+28
	bl	brcmf_dbg
.L8:
	ldr	ip, [r5]
	mov	r10, #0
	cmp	ip, #0
	ble	.L10
	mov	r4, r10
	ldr	r9, .L32+32
	ldr	r8, .L32+36
	ldr	fp, .L32+40
	str	r6, [sp, #12]
.L12:
	ldr	r2, [r5, #4]
	ldr	r3, [r9]
	ldr	r6, [r2, r4, lsl #2]
	ldr	r0, [r8]
	ldr	r2, [r6, #4]
	orr	r3, r3, r0
	tst	r3, r2
	bne	.L11
	ldr	r3, [sp, #12]
	mov	r1, r6
	ldr	r0, [r3, #4]
	bl	channel_to_chanspec
	ldr	r2, .L32+20
	ldr	r3, [r6]
	str	r0, [r7, r4, lsl #2]
	str	r0, [sp]
	ldr	r0, [r2]
	mov	r1, fp
	mov	r2, r10
	bl	brcmf_dbg
	ldr	ip, [r5]
	add	r10, r10, #1
.L11:
	add	r4, r4, #1
	cmp	ip, r4
	bgt	.L12
	ldr	r6, [sp, #12]
.L10:
	ldr	r1, .L32+44
	mov	r2, r7
	ldr	ip, [r1]
	ldr	r3, [sp, #16]
	mov	r1, r10
	add	r0, r6, #4
	str	ip, [sp]
	bl	brcmf_p2p_escan
	mov	r4, r0
	mov	r0, r7
	bl	kfree
.L3:
	cmp	r4, #0
	beq	.L1
	mov	r2, r4
	ldr	r0, [sp, #20]
	ldr	r1, .L32+48
	bl	bphy_err
	mov	r0, r4
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L6:
	cmp	r2, #3
	bne	.L9
	ldr	r3, [r5, #4]
	ldr	r2, .L32+52
	ldr	r1, [r3]
	ldr	r2, [r2]
	ldr	r1, [r1]
	cmp	r1, r2
	bne	.L9
	ldr	r1, [r3, #4]
	ldr	r2, .L32+56
	ldr	r1, [r1]
	ldr	r2, [r2]
	cmp	r1, r2
	bne	.L9
	ldr	r3, [r3, #8]
	ldr	r2, .L32+60
	ldr	r3, [r3]
	ldr	r2, [r2]
	cmp	r2, r3
	bne	.L9
.L13:
	ldr	r3, .L32+64
	ldr	r1, .L32+68
	ldr	r3, [r3]
	str	r3, [sp, #16]
	bl	brcmf_dbg
	b	.L8
.L27:
	ldr	r3, .L32+72
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L3
.L29:
	ldr	r3, .L32+76
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L3
.L30:
	ldr	r1, [r5, #4]
	ldr	ip, .L32+52
	ldr	lr, [r1]
	ldr	ip, [ip]
	ldr	lr, [lr]
	cmp	lr, ip
	bne	.L7
	ldr	lr, [r1, #4]
	ldr	ip, .L32+56
	ldr	lr, [lr]
	ldr	ip, [ip]
	cmp	lr, ip
	bne	.L7
	ldr	ip, [r1, #8]
	ldr	r1, .L32+60
	ldr	ip, [ip]
	ldr	r1, [r1]
	cmp	ip, r1
	bne	.L7
	b	.L13
.L31:
	ldr	r1, .L32+80
	bl	brcmf_dbg
	ldr	r3, .L32+64
	ldr	r3, [r3]
	str	r3, [sp, #16]
	b	.L8
.L33:
	.align	2
.L32:
	.word	WL_P2P_DISC_ST_SCAN
	.word	TRACE
	.word	.LC0
	.word	GFP_KERNEL
	.word	P2PAPI_BSSCFG_CONNECTION
	.word	INFO
	.word	NL80211_IFTYPE_P2P_GO
	.word	.LC3
	.word	IEEE80211_CHAN_RADAR
	.word	IEEE80211_CHAN_NO_IR
	.word	.LC4
	.word	P2PAPI_BSSCFG_DEVICE
	.word	.LC5
	.word	SOCIAL_CHAN_1
	.word	SOCIAL_CHAN_2
	.word	SOCIAL_CHAN_3
	.word	WL_P2P_DISC_ST_SEARCH
	.word	.LC1
	.word	EINVAL
	.word	ENOMEM
	.word	.LC2
	.size	brcmf_p2p_run_escan, .-brcmf_p2p_run_escan
	.comm	WL_P2P_DISC_ST_SEARCH,4,4
	.comm	WL_P2P_DISC_ST_SCAN,4,4
	.comm	TRACE,4,4
	.comm	SOCIAL_CHAN_3,4,4
	.comm	SOCIAL_CHAN_2,4,4
	.comm	SOCIAL_CHAN_1,4,4
	.comm	P2PAPI_BSSCFG_DEVICE,4,4
	.comm	P2PAPI_BSSCFG_CONNECTION,4,4
	.comm	NL80211_IFTYPE_P2P_GO,4,4
	.comm	INFO,4,4
	.comm	IEEE80211_CHAN_RADAR,4,4
	.comm	IEEE80211_CHAN_NO_IR,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
