	.file	"extr_rtl8225.c_rtl8225z2_rf_set_tx_power.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	rtl8225z2_rf_set_tx_power, @function
rtl8225z2_rf_set_tx_power:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movsx	rdx, esi
	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
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r13, QWORD PTR [rdi]
	mov	rbp, QWORD PTR rtl8225z2_tx_power_cck_ch14[rip]
	mov	rax, QWORD PTR 8[r13]
	mov	r14d, DWORD PTR -4[rax+rdx*4]
	movzx	r15d, r14b
	sar	r14d, 8
	cmp	esi, 14
	je	.L3
	cmp	r15d, 12
	je	.L12
	mov	rbp, QWORD PTR rtl8225z2_tx_power_cck_A[rip]
	cmp	r15d, 13
	cmovne	rbp, QWORD PTR rtl8225z2_tx_power_cck[rip]
.L3:
	mov	ebx, 68
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edx, DWORD PTR 0[rbp]
	mov	esi, ebx
	mov	rdi, r12
	add	ebx, 1
	add	rbp, 4
	call	rtl8225_write_phy_cck@PLT
	cmp	ebx, 76
	jne	.L5
	mov	esi, 35
	mov	edi, r15d
	call	min@PLT
	mov	edx, eax
	lea	eax, -13[rax]
	cmp	eax, 1
	jbe	.L8
	lea	eax, -2[rdx]
	cmp	edx, 14
	cmovg	edx, eax
.L7:
	mov	rax, QWORD PTR 0[r13]
	mov	rdi, r13
	lea	rsi, 4[rax]
	call	rtl818x_iowrite8@PLT
	mov	rax, QWORD PTR 0[r13]
	mov	rdi, r13
	lea	rsi, 4[rax]
	call	rtl818x_ioread8@PLT
	mov	edi, 1
	call	msleep@PLT
	mov	edi, r14d
	mov	esi, 35
	call	min@PLT
	mov	rsi, QWORD PTR 0[r13]
	mov	rdi, r13
	mov	edx, eax
	call	rtl818x_iowrite8@PLT
	mov	rdi, r12
	mov	edx, 98
	mov	esi, 2
	call	rtl8225_write_phy_ofdm@PLT
	mov	rdi, r12
	xor	edx, edx
	mov	esi, 5
	call	rtl8225_write_phy_ofdm@PLT
	mov	rdi, r12
	mov	edx, 64
	mov	esi, 6
	call	rtl8225_write_phy_ofdm@PLT
	mov	rdi, r12
	xor	edx, edx
	mov	esi, 7
	call	rtl8225_write_phy_ofdm@PLT
	mov	rdi, r12
	mov	edx, 64
	mov	esi, 8
	call	rtl8225_write_phy_ofdm@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	edi, 1
	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
	jmp	msleep@PLT
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	rbp, QWORD PTR rtl8225z2_tx_power_cck_B[rip]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	mov	edx, 12
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	rtl8225z2_rf_set_tx_power, .-rtl8225z2_rf_set_tx_power
	.comm	rtl8225z2_tx_power_cck_ch14,8,8
	.comm	rtl8225z2_tx_power_cck_B,8,8
	.comm	rtl8225z2_tx_power_cck_A,8,8
	.comm	rtl8225z2_tx_power_cck,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_rtl8225.c_rtl8225z2_rf_set_tx_power.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rtl8225z2_rf_set_tx_power, %function
rtl8225z2_rf_set_tx_power:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r7, [r0]
	sub	r2, r1, #-1073741823
	ldr	r3, [r7, #4]
	mov	r5, r0
	ldr	r0, [r3, r2, lsl #2]
	cmp	r1, #14
	and	r8, r0, #255
	asr	r9, r0, #8
	beq	.L12
	cmp	r8, #12
	beq	.L13
	cmp	r8, #13
	ldreq	r3, .L14
	ldrne	r3, .L14+4
	ldr	r6, [r3]
.L3:
	mov	r4, #68
.L5:
	mov	r1, r4
	mov	r0, r5
	ldr	r2, [r6], #4
	add	r4, r4, #1
	bl	rtl8225_write_phy_cck
	cmp	r4, #76
	bne	.L5
	mov	r0, r8
	mov	r1, #35
	bl	min
	sub	r3, r0, #13
	cmp	r3, #1
	mov	r2, r0
	movls	r2, #12
	bls	.L7
	cmp	r2, #14
	subgt	r2, r2, #2
.L7:
	ldr	r1, [r7]
	mov	r0, r7
	add	r1, r1, #4
	bl	rtl818x_iowrite8
	ldr	r1, [r7]
	mov	r0, r7
	add	r1, r1, #4
	bl	rtl818x_ioread8
	mov	r0, #1
	bl	msleep
	mov	r0, r9
	mov	r1, #35
	bl	min
	ldr	r1, [r7]
	mov	r2, r0
	mov	r0, r7
	bl	rtl818x_iowrite8
	mov	r2, #98
	mov	r1, #2
	mov	r0, r5
	bl	rtl8225_write_phy_ofdm
	mov	r2, #0
	mov	r1, #5
	mov	r0, r5
	bl	rtl8225_write_phy_ofdm
	mov	r2, #64
	mov	r1, #6
	mov	r0, r5
	bl	rtl8225_write_phy_ofdm
	mov	r2, #0
	mov	r1, #7
	mov	r0, r5
	bl	rtl8225_write_phy_ofdm
	mov	r0, r5
	mov	r2, #64
	mov	r1, #8
	bl	rtl8225_write_phy_ofdm
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r0, #1
	b	msleep
.L13:
	ldr	r3, .L14+8
	ldr	r6, [r3]
	b	.L3
.L12:
	ldr	r3, .L14+12
	ldr	r6, [r3]
	b	.L3
.L15:
	.align	2
.L14:
	.word	rtl8225z2_tx_power_cck_A
	.word	rtl8225z2_tx_power_cck
	.word	rtl8225z2_tx_power_cck_B
	.word	rtl8225z2_tx_power_cck_ch14
	.size	rtl8225z2_rf_set_tx_power, .-rtl8225z2_rf_set_tx_power
	.comm	rtl8225z2_tx_power_cck_ch14,4,4
	.comm	rtl8225z2_tx_power_cck_B,4,4
	.comm	rtl8225z2_tx_power_cck_A,4,4
	.comm	rtl8225z2_tx_power_cck,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
