	.file	"extr_phy_cmn.c_wlc_phy_noise_calc_phy.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	wlc_phy_noise_calc_phy, @function
wlc_phy_noise_calc_phy:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	.cfi_offset 15, -24
	mov	r15, rsi
	push	r14
	.cfi_offset 14, -32
	mov	r14, rdx
	push	r13
	push	r12
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	mov	r12, rdi
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR PHY_CORE_MAX[rip]
	mov	rsi, rsp
	mov	rdx, rax
	lea	rax, 15[0+rax*8]
	mov	rcx, rax
	and	rax, -4096
	sub	rsi, rax
	and	rcx, -16
	mov	rax, rsi
	cmp	rsp, rax
	je	.L3
.L24:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L24
.L3:
	and	ecx, 4095
	sub	rsp, rcx
	test	rcx, rcx
	jne	.L25
.L4:
	mov	r13, rsp
	sal	edx, 3
	xor	esi, esi
	xor	ebx, ebx
	mov	rdi, r13
	call	memset@PLT
	mov	rdx, QWORD PTR 16[r12]
	mov	rsi, r13
	mov	rdi, r15
	call	wlc_phy_compute_dB@PLT
	cmp	QWORD PTR 16[r12], 0
	jne	.L5
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L27:
	mov	rax, QWORD PTR PHY_NOISE_OFFSETFACT_4322[rip]
	add	rax, QWORD PTR 0[r13+rbx*8]
.L7:
	mov	QWORD PTR 0[r13+rbx*8], rax
	mov	rax, QWORD PTR 16[r12]
	add	rbx, 1
	cmp	rax, rbx
	jbe	.L26
.L5:
	mov	edi, DWORD PTR 24[r12]
	mov	esi, 3
	call	NREV_GE@PLT
	test	rax, rax
	jne	.L27
	mov	rax, QWORD PTR 0[r13+rbx*8]
	sub	rax, 99
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L26:
	test	rax, rax
	je	.L8
	mov	rdi, QWORD PTR 8[r12]
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdx, QWORD PTR [rdi+rax*8]
	mov	rsi, QWORD PTR 0[r13+rax*8]
	mov	rcx, QWORD PTR [r12]
	mov	QWORD PTR [rdx+rcx*8], rsi
	mov	rdx, QWORD PTR 0[r13+rax*8]
	mov	QWORD PTR [r14+rax*8], rdx
	add	rax, 1
	cmp	QWORD PTR 16[r12], rax
	ja	.L9
.L8:
	mov	esi, DWORD PTR PHY_NOISE_WINDOW_SZ[rip]
	mov	rdi, QWORD PTR [r12]
	call	MODINC_POW2@PLT
	mov	QWORD PTR [r12], rax
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L28
	lea	rsp, -40[rbp]
	mov	eax, 1
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rcx], 0
	jmp	.L4
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	wlc_phy_noise_calc_phy, .-wlc_phy_noise_calc_phy
	.comm	PHY_NOISE_WINDOW_SZ,4,4
	.comm	PHY_NOISE_OFFSETFACT_4322,8,8
	.comm	PHY_CORE_MAX,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_phy_cmn.c_wlc_phy_noise_calc_phy.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	wlc_phy_noise_calc_phy, %function
wlc_phy_noise_calc_phy:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #8
	ldr	r3, .L18
	mov	r7, r1
	ldr	r3, [r3]
	mov	r4, r0
	lsl	r3, r3, #2
	add	r1, r3, #7
	bic	r1, r1, #7
	sub	sp, sp, r1
	mov	r5, sp
	mov	r6, r2
	mov	r2, r3
	ldr	r3, .L18+4
	mov	r1, #0
	mov	r0, r5
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	bl	memset
	mov	r0, r7
	mov	r1, r5
	ldr	r2, [r4, #8]
	bl	wlc_phy_compute_dB
	ldr	r3, [r4, #8]
	cmp	r3, #0
	beq	.L6
	sub	r5, r5, #4
	mov	r9, r5
	mov	r8, #0
	ldr	r7, .L18+8
.L5:
	mov	r1, #3
	ldr	r0, [r4, #12]
	bl	NREV_GE
	cmp	r0, #0
	ldr	r3, [r9, #4]
	ldrne	r2, [r7]
	add	r8, r8, #1
	addne	r3, r3, r2
	ldr	r2, [r4, #8]
	subeq	r3, r3, #99
	cmp	r2, r8
	str	r3, [r9, #4]!
	bhi	.L5
	cmp	r2, #0
	beq	.L6
	mov	r3, #0
	ldr	r2, [r4, #4]
	sub	r6, r6, #4
	sub	r2, r2, #4
.L7:
	ldr	r1, [r2, #4]!
	ldr	ip, [r5, #4]!
	ldr	r0, [r4]
	add	r3, r3, #1
	str	ip, [r1, r0, lsl #2]
	ldr	r1, [r5]
	str	r1, [r6, #4]!
	ldr	r1, [r4, #8]
	cmp	r1, r3
	bhi	.L7
.L6:
	ldr	r3, .L18+12
	ldr	r0, [r4]
	ldr	r1, [r3]
	bl	MODINC_POW2
	ldr	r3, .L18+4
	str	r0, [r4]
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	mov	r0, #1
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L17:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	PHY_CORE_MAX
	.word	.LC0
	.word	PHY_NOISE_OFFSETFACT_4322
	.word	PHY_NOISE_WINDOW_SZ
	.size	wlc_phy_noise_calc_phy, .-wlc_phy_noise_calc_phy
	.comm	PHY_NOISE_WINDOW_SZ,4,4
	.comm	PHY_NOISE_OFFSETFACT_4322,4,4
	.comm	PHY_CORE_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
