	.file	"extr_phy_lcn.c_wlc_phy_txpwr_srom_read_lcnphy.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	wlc_phy_txpwr_srom_read_lcnphy, @function
wlc_phy_txpwr_srom_read_lcnphy:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rax, QWORD PTR 48[rdi]
	mov	rbx, QWORD PTR 56[rdi]
	mov	edi, DWORD PTR 40[rdi]
	mov	r12, QWORD PTR [rax]
	call	CHSPEC_IS2G@PLT
	test	rax, rax
	je	.L3
	mov	eax, DWORD PTR 92[r12]
	mov	rcx, QWORD PTR 8[rbp]
	mov	DWORD PTR 80[rbx], eax
	mov	eax, DWORD PTR 88[r12]
	mov	DWORD PTR 76[rbx], eax
	mov	eax, DWORD PTR 84[r12]
	mov	DWORD PTR [rcx], eax
	mov	eax, DWORD PTR 80[r12]
	mov	DWORD PTR 4[rcx], eax
	mov	eax, DWORD PTR 76[r12]
	mov	DWORD PTR 8[rcx], eax
	mov	eax, DWORD PTR 64[r12]
	mov	esi, DWORD PTR 72[r12]
	mov	edx, DWORD PTR 68[r12]
	mov	DWORD PTR 40[rbx], eax
	mov	DWORD PTR 64[rbx], eax
	mov	DWORD PTR 44[rbx], eax
	mov	rax, QWORD PTR 56[r12]
	mov	DWORD PTR 48[rbx], edx
	mov	DWORD PTR 68[rbx], edx
	mov	DWORD PTR 52[rbx], edx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR PWRTBL_NUM_COEFF[rip]
	mov	DWORD PTR 56[rbx], esi
	mov	DWORD PTR 72[rbx], esi
	mov	DWORD PTR 60[rbx], esi
	mov	QWORD PTR 32[rbp], rdx
	test	eax, eax
	jle	.L8
	mov	r8, QWORD PTR 24[rbp]
	mov	rdi, QWORD PTR 16[rbp]
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L7:
	mov	esi, DWORD PTR [rcx+rax*4]
	mov	DWORD PTR [r8+rax*4], esi
	mov	esi, DWORD PTR [rcx+rax*4]
	mov	DWORD PTR [rdi+rax*4], esi
	add	rax, 1
	cmp	DWORD PTR PWRTBL_NUM_COEFF[rip], eax
	jg	.L7
.L8:
	mov	edi, DWORD PTR [r12]
	mov	eax, DWORD PTR 4[r12]
	mov	r8d, DWORD PTR TXP_FIRST_CCK[rip]
	mov	esi, DWORD PTR TXP_LAST_CCK[rip]
	test	edi, edi
	je	.L34
	cmp	r8d, esi
	jg	.L13
	movsx	r9, r8d
	sub	esi, r8d
	lea	rcx, 0[0+r9*8]
	lea	r9, 1[r9+rsi]
	sal	r9, 3
	.p2align 4,,10
	.p2align 3
.L12:
	lea	rsi, [rdi+rdi]
	mov	r8, QWORD PTR 0[rbp]
	mov	r10, rdx
	sar	edi, 4
	and	esi, 30
	sub	r10, rsi
	mov	QWORD PTR [r8+rcx], r10
	add	rcx, 8
	cmp	r9, rcx
	jne	.L12
.L13:
	mov	edi, DWORD PTR TXP_FIRST_OFDM[rip]
	mov	esi, DWORD PTR TXP_LAST_OFDM[rip]
	cmp	edi, esi
	jg	.L11
	movsx	r8, edi
	sub	esi, edi
	lea	rcx, 0[0+r8*8]
	lea	r8, 1[r8+rsi]
	sal	r8, 3
	.p2align 4,,10
	.p2align 3
.L16:
	lea	rsi, [rax+rax]
	mov	rdi, QWORD PTR 0[rbp]
	mov	r11, rdx
	sar	eax, 4
	and	esi, 30
	sub	r11, rsi
	mov	QWORD PTR [rdi+rcx], r11
	add	rcx, 8
	cmp	rcx, r8
	jne	.L16
.L11:
	mov	eax, DWORD PTR 48[r12]
	mov	esi, DWORD PTR 16[r12]
	mov	DWORD PTR 36[rbx], eax
	mov	eax, DWORD PTR 44[r12]
	mov	DWORD PTR 32[rbx], eax
	mov	eax, DWORD PTR 40[r12]
	mov	DWORD PTR 28[rbx], eax
	mov	eax, DWORD PTR 36[r12]
	mov	DWORD PTR 24[rbx], eax
	mov	eax, DWORD PTR 32[r12]
	mov	DWORD PTR 20[rbx], eax
	mov	eax, DWORD PTR 28[r12]
	mov	DWORD PTR 16[rbx], eax
	mov	eax, DWORD PTR 24[r12]
	mov	DWORD PTR 12[rbx], eax
	mov	eax, DWORD PTR 20[r12]
	mov	DWORD PTR 8[rbx], eax
	cmp	esi, 1
	jle	.L3
	mov	rdi, rbp
	call	wlc_phy_ant_rxdiv_set@PLT
.L3:
	mov	DWORD PTR 4[rbx], -1
	mov	eax, 1
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L34:
	.cfi_restore_state
	cmp	r8d, esi
	jg	.L21
	movsx	rdi, r8d
	sub	esi, r8d
	lea	rcx, 0[0+rdi*8]
	lea	rdi, 1[rdi+rsi]
	sal	rdi, 3
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rsi, QWORD PTR 0[rbp]
	mov	QWORD PTR [rsi+rcx], rdx
	add	rcx, 8
	cmp	rdi, rcx
	jne	.L20
.L21:
	mov	edi, DWORD PTR TXP_FIRST_OFDM[rip]
	mov	esi, DWORD PTR TXP_LAST_OFDM[rip]
	cmp	edi, esi
	jg	.L19
	movsx	r8, edi
	sub	esi, edi
	lea	rcx, 0[0+r8*8]
	lea	r8, 1[r8+rsi]
	sal	r8, 3
	.p2align 4,,10
	.p2align 3
.L23:
	lea	rsi, [rax+rax]
	mov	rdi, QWORD PTR 0[rbp]
	mov	r9, rdx
	sar	eax, 4
	and	esi, 30
	sub	r9, rsi
	mov	QWORD PTR [rdi+rcx], r9
	add	rcx, 8
	cmp	r8, rcx
	jne	.L23
.L19:
	mov	rax, QWORD PTR 8[r12]
	mov	edi, DWORD PTR TXP_FIRST_SISO_MCS_20[rip]
	mov	ecx, DWORD PTR TXP_LAST_SISO_MCS_20[rip]
	mov	esi, DWORD PTR 4[rax]
	sal	esi, 16
	or	esi, DWORD PTR [rax]
	mov	DWORD PTR [rbx], esi
	cmp	edi, ecx
	jg	.L11
	movsx	r8, edi
	sub	ecx, edi
	lea	rax, 0[0+r8*8]
	lea	r8, 1[r8+rcx]
	sal	r8, 3
	.p2align 4,,10
	.p2align 3
.L24:
	lea	rcx, [rsi+rsi]
	mov	rdi, QWORD PTR 0[rbp]
	mov	r10, rdx
	sar	esi, 4
	and	ecx, 30
	sub	r10, rcx
	mov	QWORD PTR [rdi+rax], r10
	add	rax, 8
	cmp	r8, rax
	jne	.L24
	jmp	.L11
	.cfi_endproc
.LFE0:
	.size	wlc_phy_txpwr_srom_read_lcnphy, .-wlc_phy_txpwr_srom_read_lcnphy
	.comm	TXP_LAST_SISO_MCS_20,4,4
	.comm	TXP_LAST_OFDM,4,4
	.comm	TXP_LAST_CCK,4,4
	.comm	TXP_FIRST_SISO_MCS_20,4,4
	.comm	TXP_FIRST_OFDM,4,4
	.comm	TXP_FIRST_CCK,4,4
	.comm	PWRTBL_NUM_COEFF,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_lcn.c_wlc_phy_txpwr_srom_read_lcnphy.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	wlc_phy_txpwr_srom_read_lcnphy, %function
wlc_phy_txpwr_srom_read_lcnphy:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r3, [r0, #24]
	ldr	r0, [r0, #20]
	ldr	r6, [r3]
	ldr	r5, [r4, #28]
	bl	CHSPEC_IS2G
	cmp	r0, #0
	beq	.L3
	ldr	r0, [r6, #84]
	ldr	r1, [r6, #80]
	ldr	r2, [r6, #76]
	ldr	r3, [r4, #4]
	str	r0, [r5, #80]
	str	r1, [r5, #76]
	str	r2, [r3]
	ldr	r2, [r6, #72]
	ldr	r7, .L35
	str	r2, [r3, #4]
	ldr	r2, [r6, #68]
	ldr	r1, [r6, #52]
	ldr	lr, [r7]
	str	r2, [r3, #8]
	ldr	ip, [r6, #64]
	ldr	r0, [r6, #60]
	ldr	r2, [r6, #56]
	ldr	r1, [r1]
	cmp	lr, #0
	str	ip, [r5, #56]
	str	r0, [r5, #48]
	str	ip, [r5, #72]
	str	r2, [r5, #40]
	str	r0, [r5, #68]
	str	r2, [r5, #64]
	str	ip, [r5, #60]
	str	r0, [r5, #52]
	str	r2, [r5, #44]
	str	r1, [r4, #16]
	ble	.L8
	mov	r2, #0
	ldr	ip, [r4, #12]
	ldr	r0, [r4, #8]
	sub	r3, r3, #4
	sub	ip, ip, #4
	sub	r0, r0, #4
.L7:
	ldr	lr, [r3, #4]!
	add	r2, r2, #1
	str	lr, [ip, #4]!
	ldr	lr, [r3]
	str	lr, [r0, #4]!
	ldr	lr, [r7]
	cmp	lr, r2
	bgt	.L7
.L8:
	ldr	ip, [r6]
	ldr	r2, .L35+4
	ldr	r3, .L35+8
	cmp	ip, #0
	ldr	r0, [r2]
	ldr	r3, [r3]
	ldr	r2, [r6, #4]
	beq	.L34
	cmp	r3, r0
	addle	lr, r0, #1
	bgt	.L13
.L12:
	and	r0, ip, #15
	ldr	r7, [r4]
	sub	r0, r1, r0, lsl #1
	str	r0, [r7, r3, lsl #2]
	add	r3, r3, #1
	cmp	r3, lr
	asr	ip, ip, #4
	bne	.L12
.L13:
	ldr	r3, .L35+12
	ldr	r0, .L35+16
	ldr	r3, [r3]
	ldr	lr, [r0]
	cmp	r3, lr
	addle	lr, lr, #1
	bgt	.L11
.L16:
	and	r0, r2, #15
	ldr	ip, [r4]
	sub	r0, r1, r0, lsl #1
	str	r0, [ip, r3, lsl #2]
	add	r3, r3, #1
	cmp	r3, lr
	asr	r2, r2, #4
	bne	.L16
.L11:
	ldr	r3, [r6, #44]
	ldr	r1, [r6, #12]
	ldr	r2, [r6, #40]
	str	r3, [r5, #36]
	ldr	r3, [r6, #36]
	str	r2, [r5, #32]
	ldr	r2, [r6, #32]
	str	r3, [r5, #28]
	ldr	r3, [r6, #28]
	ldr	r0, [r6, #24]
	str	r2, [r5, #24]
	str	r3, [r5, #20]
	ldr	r2, [r6, #20]
	ldr	r3, [r6, #16]
	cmp	r1, #1
	str	r0, [r5, #16]
	str	r2, [r5, #12]
	str	r3, [r5, #8]
	ble	.L3
	mov	r0, r4
	bl	wlc_phy_ant_rxdiv_set
.L3:
	mvn	r3, #0
	mov	r0, #1
	str	r3, [r5, #4]
	pop	{r4, r5, r6, r7, r8, pc}
.L34:
	cmp	r3, r0
	addle	r0, r0, #1
	bgt	.L21
.L20:
	ldr	ip, [r4]
	str	r1, [ip, r3, lsl #2]
	add	r3, r3, #1
	cmp	r3, r0
	bne	.L20
.L21:
	ldr	r3, .L35+12
	ldr	r0, .L35+16
	ldr	r3, [r3]
	ldr	lr, [r0]
	cmp	r3, lr
	addle	lr, lr, #1
	bgt	.L19
.L23:
	and	r0, r2, #15
	ldr	ip, [r4]
	sub	r0, r1, r0, lsl #1
	str	r0, [ip, r3, lsl #2]
	add	r3, r3, #1
	cmp	r3, lr
	asr	r2, r2, #4
	bne	.L23
.L19:
	ldr	r3, [r6, #8]
	ldr	lr, .L35+20
	ldr	ip, .L35+24
	ldm	r3, {r0, r2}
	ldr	r3, [lr]
	ldr	lr, [ip]
	orr	r0, r0, r2, lsl #16
	cmp	r3, lr
	str	r0, [r5]
	addle	lr, lr, #1
	bgt	.L11
.L24:
	and	r2, r0, #15
	ldr	ip, [r4]
	sub	r2, r1, r2, lsl #1
	str	r2, [ip, r3, lsl #2]
	add	r3, r3, #1
	cmp	r3, lr
	asr	r0, r0, #4
	bne	.L24
	b	.L11
.L36:
	.align	2
.L35:
	.word	PWRTBL_NUM_COEFF
	.word	TXP_LAST_CCK
	.word	TXP_FIRST_CCK
	.word	TXP_FIRST_OFDM
	.word	TXP_LAST_OFDM
	.word	TXP_FIRST_SISO_MCS_20
	.word	TXP_LAST_SISO_MCS_20
	.size	wlc_phy_txpwr_srom_read_lcnphy, .-wlc_phy_txpwr_srom_read_lcnphy
	.comm	TXP_LAST_SISO_MCS_20,4,4
	.comm	TXP_LAST_OFDM,4,4
	.comm	TXP_LAST_CCK,4,4
	.comm	TXP_FIRST_SISO_MCS_20,4,4
	.comm	TXP_FIRST_OFDM,4,4
	.comm	TXP_FIRST_CCK,4,4
	.comm	PWRTBL_NUM_COEFF,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
