	.file	"extr_hal_com.c_rtw_bb_rf_gain_offset.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Offset RF Gain.\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Offset RF Gain.  padapter->eeprompriv.EEPROMRFGainVal = 0x%x\n"
	.align 8
.LC2:
	.string	"Offset RF Gain. before reg 0x7f = 0x%08x\n"
	.align 8
.LC3:
	.string	"Offset RF Gain. got v1 = 0x%x , v2 = 0x%x\n"
	.align 8
.LC4:
	.string	"padapter->eeprompriv.EEPROMRFGainVal = 0x%x , Gain offset Target Value = 0x%x\n"
	.align 8
.LC5:
	.string	"Offset RF Gain. After reg 0x7f = 0x%08x\n"
	.align 8
.LC6:
	.string	"Offset RF Gain.  padapter->eeprompriv.EEPROMRFGainVal = 0x%x\t!= 0xff, didn't run Kfree\n"
	.section	.rodata.str1.1
.LC7:
	.string	"Using the default RF gain.\n"
	.text
	.p2align 4
	.globl	rtw_bb_rf_gain_offset
	.type	rtw_bb_rf_gain_offset, @function
rtw_bb_rf_gain_offset:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR BIT4[rip]
	test	DWORD PTR [rdi], eax
	je	.L2
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xor	eax, eax
	mov	r12, QWORD PTR Array_kfreemap[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	lea	rdi, .LC0[rip]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	DBG_871X@PLT
	mov	esi, DWORD PTR 4[rbp]
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	DBG_871X@PLT
	cmp	DWORD PTR 4[rbp], 255
	mov	esi, 255
	lea	rdi, .LC6[rip]
	je	.L11
	mov	esi, DWORD PTR RF_PATH_A[rip]
	mov	ecx, -1
	mov	rdi, rbp
	xor	ebx, ebx
	mov	edx, 127
	call	rtw_hal_read_rfreg@PLT
	lea	rdi, .LC2[rip]
	and	eax, -491521
	mov	esi, eax
	xor	eax, eax
	call	DBG_871X@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	mov	esi, DWORD PTR [r12+rbx*4]
	lea	rax, 2[rbx]
	cmp	DWORD PTR 4[rbp], esi
	je	.L13
	mov	rbx, rax
.L4:
	mov	rdi, QWORD PTR Array_kfreemap[rip]
	call	ARRAY_SIZE@PLT
	cmp	eax, ebx
	jg	.L6
	xor	ebx, ebx
.L5:
	mov	esi, DWORD PTR 4[rbp]
	mov	edx, ebx
	lea	rdi, .LC4[rip]
	xor	eax, eax
	call	DBG_871X@PLT
	mov	edx, DWORD PTR REG_RF_BB_GAIN_OFFSET[rip]
	mov	r8d, ebx
	mov	rdi, rbp
	mov	esi, DWORD PTR RF_PATH_A[rip]
	mov	ecx, DWORD PTR BIT18[rip]
	or	ecx, DWORD PTR BIT17[rip]
	or	ecx, DWORD PTR BIT16[rip]
	or	ecx, DWORD PTR BIT15[rip]
	call	PHY_SetRFReg@PLT
	mov	esi, DWORD PTR RF_PATH_A[rip]
	mov	rdi, rbp
	mov	ecx, -1
	mov	edx, 127
	call	rtw_hal_read_rfreg@PLT
	lea	rdi, .LC5[rip]
	mov	esi, eax
.L11:
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 8
	jmp	DBG_871X@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	lea	rdi, .LC7[rip]
	xor	eax, eax
	jmp	DBG_871X@PLT
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	.cfi_offset 6, -24
	.cfi_offset 12, -16
	mov	ebx, DWORD PTR 4[r12+rbx*4]
	lea	rdi, .LC3[rip]
	xor	eax, eax
	mov	edx, ebx
	call	DBG_871X@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	rtw_bb_rf_gain_offset, .-rtw_bb_rf_gain_offset
	.comm	RF_PATH_A,4,4
	.comm	REG_RF_BB_GAIN_OFFSET,4,4
	.comm	BIT4,4,4
	.comm	BIT18,4,4
	.comm	BIT17,4,4
	.comm	BIT16,4,4
	.comm	BIT15,4,4
	.comm	Array_kfreemap,8,8
	.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_hal_com.c_rtw_bb_rf_gain_offset.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Offset RF Gain.\012\000"
	.align	2
.LC1:
	.ascii	"Offset RF Gain.  padapter->eeprompriv.EEPROMRFGainV"
	.ascii	"al = 0x%x\012\000"
	.align	2
.LC2:
	.ascii	"Offset RF Gain. before reg 0x7f = 0x%08x\012\000"
	.align	2
.LC3:
	.ascii	"Offset RF Gain. got v1 = 0x%x , v2 = 0x%x\012\000"
	.align	2
.LC4:
	.ascii	"padapter->eeprompriv.EEPROMRFGainVal = 0x%x , Gain "
	.ascii	"offset Target Value = 0x%x\012\000"
	.align	2
.LC5:
	.ascii	"Offset RF Gain. After reg 0x7f = 0x%08x\012\000"
	.align	2
.LC6:
	.ascii	"Offset RF Gain.  padapter->eeprompriv.EEPROMRFGainV"
	.ascii	"al = 0x%x\011!= 0xff, didn't run Kfree\012\000"
	.align	2
.LC7:
	.ascii	"Using the default RF gain.\012\000"
	.text
	.align	2
	.global	rtw_bb_rf_gain_offset
	.syntax unified
	.arm
	.fpu softvfp
	.type	rtw_bb_rf_gain_offset, %function
rtw_bb_rf_gain_offset:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, .L14
	ldr	r3, [r0]
	ldr	r2, [r2]
	tst	r2, r3
	beq	.L2
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	ldr	r8, .L14+4
	sub	sp, sp, #8
	ldr	r0, .L14+8
	ldr	r6, [r8]
	bl	DBG_871X
	ldr	r1, [r5, #4]
	ldr	r0, .L14+12
	bl	DBG_871X
	ldr	r1, [r5, #4]
	cmp	r1, #255
	beq	.L3
	ldr	r7, .L14+16
	mvn	r3, #0
	mov	r2, #127
	ldr	r1, [r7]
	mov	r0, r5
	bl	rtw_hal_read_rfreg
	mov	r1, r0
	ldr	r0, .L14+20
	bic	r1, r1, #491520
	bl	DBG_871X
	mov	r4, #0
	b	.L4
.L7:
	ldr	r3, [r6, r4, lsl #2]
	ldr	r1, [r5, #4]
	cmp	r1, r3
	beq	.L13
	add	r4, r4, #2
.L4:
	ldr	r0, [r8]
	bl	ARRAY_SIZE
	cmp	r0, r4
	bgt	.L7
	mov	r4, #0
.L6:
	mov	r2, r4
	ldr	r1, [r5, #4]
	ldr	r0, .L14+24
	bl	DBG_871X
	ldr	r2, .L14+28
	ldr	r3, .L14+32
	ldr	r0, .L14+36
	ldr	r3, [r3]
	ldr	r1, [r2]
	ldr	r2, .L14+40
	ldr	ip, [r0]
	orr	r1, r3, r1
	ldr	r0, [r2]
	ldr	r2, .L14+44
	orr	r3, r1, ip
	str	r4, [sp]
	ldr	r1, [r7]
	orr	r3, r3, r0
	ldr	r2, [r2]
	mov	r0, r5
	bl	PHY_SetRFReg
	ldr	r1, [r7]
	mov	r0, r5
	mvn	r3, #0
	mov	r2, #127
	bl	rtw_hal_read_rfreg
	mov	r1, r0
	ldr	r0, .L14+48
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, lr}
	b	DBG_871X
.L2:
	ldr	r0, .L14+52
	b	DBG_871X
.L3:
	ldr	r0, .L14+56
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, lr}
	b	DBG_871X
.L13:
	add	r4, r4, #1
	ldr	r4, [r6, r4, lsl #2]
	ldr	r0, .L14+60
	mov	r2, r4
	bl	DBG_871X
	b	.L6
.L15:
	.align	2
.L14:
	.word	BIT4
	.word	Array_kfreemap
	.word	.LC0
	.word	.LC1
	.word	RF_PATH_A
	.word	.LC2
	.word	.LC4
	.word	BIT17
	.word	BIT18
	.word	BIT16
	.word	BIT15
	.word	REG_RF_BB_GAIN_OFFSET
	.word	.LC5
	.word	.LC7
	.word	.LC6
	.word	.LC3
	.size	rtw_bb_rf_gain_offset, .-rtw_bb_rf_gain_offset
	.comm	RF_PATH_A,4,4
	.comm	REG_RF_BB_GAIN_OFFSET,4,4
	.comm	BIT4,4,4
	.comm	BIT18,4,4
	.comm	BIT17,4,4
	.comm	BIT16,4,4
	.comm	BIT15,4,4
	.comm	Array_kfreemap,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
