	.file	"extr_ar9003_paprd.c_ar9003_paprd_setup_gain_table.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ar9003_paprd_setup_gain_table
	.type	ar9003_paprd_setup_gain_table, @function
ar9003_paprd_setup_gain_table:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	edx, DWORD PTR [rdi]
	mov	rbp, rdi
	call	ar9003_get_desired_gain@PLT
	mov	esi, DWORD PTR PAPRD_GAIN_TABLE_ENTRIES[rip]
	test	esi, esi
	je	.L2
	mov	r8, QWORD PTR 8[rbp]
	lea	r9d, -1[rsi]
	xor	edx, edx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L10:
	lea	esi, 1[rdx]
	lea	rcx, 1[rdx]
	cmp	rdx, r9
	je	.L2
	mov	rdx, rcx
.L3:
	mov	esi, edx
	cmp	DWORD PTR [r8+rdx*4], eax
	jb	.L10
.L2:
	mov	rdi, rbp
	call	ar9003_tx_force_gain@PLT
	mov	edx, DWORD PTR AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE[rip]
	mov	esi, DWORD PTR AR_PHY_PAPRD_TRAINER_STAT1[rip]
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	REG_CLR_BIT@PLT
	.cfi_endproc
.LFE0:
	.size	ar9003_paprd_setup_gain_table, .-ar9003_paprd_setup_gain_table
	.comm	PAPRD_GAIN_TABLE_ENTRIES,4,4
	.comm	AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE,4,4
	.comm	AR_PHY_PAPRD_TRAINER_STAT1,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_ar9003_paprd.c_ar9003_paprd_setup_gain_table.c"
	.text
	.align	2
	.global	ar9003_paprd_setup_gain_table
	.syntax unified
	.arm
	.fpu softvfp
	.type	ar9003_paprd_setup_gain_table, %function
ar9003_paprd_setup_gain_table:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	ldr	r2, [r0]
	mov	r4, r0
	bl	ar9003_get_desired_gain
	ldr	r3, .L12
	ldr	r1, [r3]
	cmp	r1, #0
	beq	.L2
	ldr	r2, [r4, #4]
	mov	r3, #0
	sub	r2, r2, #4
	b	.L3
.L11:
	add	r3, r3, #1
	cmp	r3, r1
	beq	.L2
.L3:
	ldr	ip, [r2, #4]!
	cmp	ip, r0
	bcc	.L11
	mov	r1, r3
.L2:
	mov	r0, r4
	bl	ar9003_tx_force_gain
	ldr	r2, .L12+4
	ldr	r3, .L12+8
	mov	r0, r4
	pop	{r4, lr}
	ldr	r2, [r2]
	ldr	r1, [r3]
	b	REG_CLR_BIT
.L13:
	.align	2
.L12:
	.word	PAPRD_GAIN_TABLE_ENTRIES
	.word	AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE
	.word	AR_PHY_PAPRD_TRAINER_STAT1
	.size	ar9003_paprd_setup_gain_table, .-ar9003_paprd_setup_gain_table
	.comm	PAPRD_GAIN_TABLE_ENTRIES,4,4
	.comm	AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE,4,4
	.comm	AR_PHY_PAPRD_TRAINER_STAT1,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
