	.file	"extr_dm.c_rtl8723e_dm_dynamic_txpower.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Not connected to any\n"
.LC1:
	.string	"AP Client PWDB = 0x%lx\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"STA Default Port PWDB = 0x%lx\n"
	.section	.rodata.str1.1
.LC3:
	.string	"AP Ext Port PWDB = 0x%lx\n"
	.section	.rodata.str1.8
	.align 8
.LC4:
	.string	"TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x0)\n"
	.align 8
.LC5:
	.string	"TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x10)\n"
	.section	.rodata.str1.1
.LC6:
	.string	"TXHIGHPWRLEVEL_NORMAL\n"
	.section	.rodata.str1.8
	.align 8
.LC7:
	.string	"PHY_SetTxPowerLevel8192S() Channel = %d\n"
	.text
	.p2align 4
	.type	rtl8723e_dm_dynamic_txpower, @function
rtl8723e_dm_dynamic_txpower:
.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
	call	rtl_priv@PLT
	mov	rdi, rbp
	mov	rbx, rax
	call	rtl_priv@PLT
	mov	rdi, rax
	call	rtl_mac@PLT
	mov	edx, DWORD PTR 40[rbx]
	test	edx, edx
	je	.L1
	mov	edx, DWORD PTR [rbx]
	test	DWORD PTR HAL_DM_HIPWR_DISABLE[rip], edx
	jne	.L15
	mov	esi, DWORD PTR COMP_POWER[rip]
	mov	rcx, QWORD PTR MAC80211_LINKED[rip]
	cmp	QWORD PTR [rax], rcx
	jge	.L4
	mov	r12, QWORD PTR 16[rbx]
	test	r12, r12
	je	.L16
	mov	edx, DWORD PTR DBG_LOUD[rip]
	mov	r8, r12
	mov	rdi, rbx
	xor	eax, eax
	lea	rcx, .LC3[rip]
	call	RT_TRACE@PLT
.L7:
	mov	rax, QWORD PTR TX_POWER_NEAR_FIELD_THRESH_LVL2[rip]
	cmp	rax, r12
	jle	.L17
.L8:
	sub	rax, 3
	mov	rdx, QWORD PTR TX_POWER_NEAR_FIELD_THRESH_LVL1[rip]
	cmp	rax, r12
	jle	.L10
	cmp	r12, rdx
	jge	.L18
.L10:
	sub	rdx, 5
	cmp	rdx, r12
	jg	.L19
.L9:
	mov	rax, QWORD PTR 24[rbx]
	cmp	QWORD PTR 8[rbx], rax
	je	.L11
	mov	r8, QWORD PTR 48[rbx]
	mov	edx, DWORD PTR DBG_LOUD[rip]
	mov	rdi, rbx
	xor	eax, eax
	mov	esi, DWORD PTR COMP_POWER[rip]
	lea	rcx, .LC7[rip]
	call	RT_TRACE@PLT
	mov	rsi, QWORD PTR 48[rbx]
	mov	rdi, rbp
	call	rtl8723e_phy_set_txpower_level@PLT
	mov	rax, QWORD PTR 8[rbx]
.L11:
	mov	QWORD PTR 24[rbx], rax
.L1:
	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
.L15:
	.cfi_restore_state
	mov	rax, QWORD PTR TXHIGHPWRLEVEL_NORMAL[rip]
	mov	QWORD PTR 8[rbx], rax
	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
.L4:
	.cfi_restore_state
	mov	edx, DWORD PTR DBG_LOUD[rip]
	mov	rcx, QWORD PTR NL80211_IFTYPE_ADHOC[rip]
	cmp	QWORD PTR 8[rax], rcx
	je	.L20
	mov	r12, QWORD PTR 32[rbx]
	lea	rcx, .LC2[rip]
	mov	rdi, rbx
	xor	eax, eax
	mov	r8, r12
	call	RT_TRACE@PLT
	mov	rax, QWORD PTR TX_POWER_NEAR_FIELD_THRESH_LVL2[rip]
	cmp	rax, r12
	jg	.L8
.L17:
	mov	rax, QWORD PTR TXHIGHPWRLEVEL_LEVEL1[rip]
	lea	rcx, .LC4[rip]
	mov	QWORD PTR 8[rbx], rax
.L13:
	mov	edx, DWORD PTR DBG_LOUD[rip]
	mov	esi, DWORD PTR COMP_POWER[rip]
	mov	rdi, rbx
	xor	eax, eax
	call	RT_TRACE@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L20:
	mov	r12, QWORD PTR 16[rbx]
	lea	rcx, .LC1[rip]
	mov	rdi, rbx
	xor	eax, eax
	mov	r8, r12
	call	RT_TRACE@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rax, QWORD PTR TXHIGHPWRLEVEL_NORMAL[rip]
	lea	rcx, .LC6[rip]
	mov	QWORD PTR 8[rbx], rax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L16:
	mov	edx, DWORD PTR DBG_TRACE[rip]
	lea	rcx, .LC0[rip]
	mov	rdi, rbx
	xor	eax, eax
	call	RT_TRACE@PLT
	mov	rax, QWORD PTR TXHIGHPWRLEVEL_NORMAL[rip]
	mov	QWORD PTR 8[rbx], rax
	mov	QWORD PTR 24[rbx], rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rax, QWORD PTR TXHIGHPWRLEVEL_LEVEL1[rip]
	lea	rcx, .LC5[rip]
	mov	QWORD PTR 8[rbx], rax
	jmp	.L13
	.cfi_endproc
.LFE0:
	.size	rtl8723e_dm_dynamic_txpower, .-rtl8723e_dm_dynamic_txpower
	.comm	TX_POWER_NEAR_FIELD_THRESH_LVL2,8,8
	.comm	TX_POWER_NEAR_FIELD_THRESH_LVL1,8,8
	.comm	TXHIGHPWRLEVEL_NORMAL,8,8
	.comm	TXHIGHPWRLEVEL_LEVEL1,8,8
	.comm	NL80211_IFTYPE_ADHOC,8,8
	.comm	MAC80211_LINKED,8,8
	.comm	HAL_DM_HIPWR_DISABLE,4,4
	.comm	DBG_TRACE,4,4
	.comm	DBG_LOUD,4,4
	.comm	COMP_POWER,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_dm.c_rtl8723e_dm_dynamic_txpower.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Not connected to any\012\000"
	.align	2
.LC1:
	.ascii	"AP Client PWDB = 0x%lx\012\000"
	.align	2
.LC2:
	.ascii	"STA Default Port PWDB = 0x%lx\012\000"
	.align	2
.LC3:
	.ascii	"AP Ext Port PWDB = 0x%lx\012\000"
	.align	2
.LC4:
	.ascii	"TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x0)\012\000"
	.align	2
.LC5:
	.ascii	"TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x10)\012\000"
	.align	2
.LC6:
	.ascii	"TXHIGHPWRLEVEL_NORMAL\012\000"
	.align	2
.LC7:
	.ascii	"PHY_SetTxPowerLevel8192S() Channel = %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rtl8723e_dm_dynamic_txpower, %function
rtl8723e_dm_dynamic_txpower:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	sub	sp, sp, #8
	mov	r6, r0
	bl	rtl_priv
	mov	r4, r0
	mov	r0, r6
	bl	rtl_priv
	bl	rtl_mac
	ldr	r3, [r4, #20]
	cmp	r3, #0
	beq	.L1
	ldr	r3, .L22
	ldr	r2, [r4]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L18
	ldr	r3, .L22+4
	ldr	r2, [r0]
	ldr	r3, [r3]
	ldr	r7, .L22+8
	cmp	r2, r3
	ldr	r1, [r7]
	bge	.L4
	ldr	r5, [r4, #8]
	cmp	r5, #0
	beq	.L19
	ldr	r8, .L22+12
	ldr	r3, .L22+16
	mov	r0, r4
	ldr	r2, [r8]
	str	r5, [sp]
	bl	RT_TRACE
	ldr	r3, .L22+20
	ldr	r3, [r3]
	cmp	r3, r5
	bgt	.L8
.L20:
	ldr	r2, .L22+24
	ldr	r3, .L22+28
	b	.L16
.L4:
	ldr	r3, .L22+32
	ldr	r2, [r0, #4]
	ldr	r3, [r3]
	ldr	r8, .L22+12
	cmp	r2, r3
	ldreq	r5, [r4, #8]
	ldrne	r5, [r4, #16]
	ldreq	r3, .L22+36
	ldrne	r3, .L22+40
	streq	r5, [sp]
	strne	r5, [sp]
	mov	r0, r4
	ldr	r2, [r8]
	bl	RT_TRACE
	ldr	r3, .L22+20
	ldr	r3, [r3]
	cmp	r3, r5
	ble	.L20
.L8:
	sub	r3, r3, #3
	ldr	r2, .L22+44
	cmp	r3, r5
	ldr	r3, [r2]
	ble	.L10
	cmp	r5, r3
	bge	.L21
.L10:
	sub	r3, r3, #5
	cmp	r3, r5
	ble	.L9
	ldr	r2, .L22+48
	ldr	r3, .L22+52
.L16:
	ldr	r1, [r2]
	mov	r0, r4
	str	r1, [r4, #4]
	ldr	r2, [r8]
	ldr	r1, [r7]
	bl	RT_TRACE
.L9:
	ldr	r3, [r4, #12]
	ldr	r2, [r4, #4]
	cmp	r2, r3
	beq	.L11
	ldr	r3, [r4, #24]
	ldr	r2, [r8]
	ldr	r1, [r7]
	str	r3, [sp]
	mov	r0, r4
	ldr	r3, .L22+56
	bl	RT_TRACE
	mov	r0, r6
	ldr	r1, [r4, #24]
	bl	rtl8723e_phy_set_txpower_level
	ldr	r3, [r4, #4]
.L11:
	str	r3, [r4, #12]
.L1:
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L18:
	ldr	r3, .L22+48
	ldr	r3, [r3]
	str	r3, [r4, #4]
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L19:
	ldr	r3, .L22+60
	mov	r0, r4
	ldr	r2, [r3]
	ldr	r3, .L22+64
	bl	RT_TRACE
	ldr	r3, .L22+48
	ldr	r3, [r3]
	str	r3, [r4, #4]
	str	r3, [r4, #12]
	b	.L1
.L21:
	ldr	r2, .L22+24
	ldr	r3, .L22+68
	b	.L16
.L23:
	.align	2
.L22:
	.word	HAL_DM_HIPWR_DISABLE
	.word	MAC80211_LINKED
	.word	COMP_POWER
	.word	DBG_LOUD
	.word	.LC3
	.word	TX_POWER_NEAR_FIELD_THRESH_LVL2
	.word	TXHIGHPWRLEVEL_LEVEL1
	.word	.LC4
	.word	NL80211_IFTYPE_ADHOC
	.word	.LC1
	.word	.LC2
	.word	TX_POWER_NEAR_FIELD_THRESH_LVL1
	.word	TXHIGHPWRLEVEL_NORMAL
	.word	.LC6
	.word	.LC7
	.word	DBG_TRACE
	.word	.LC0
	.word	.LC5
	.size	rtl8723e_dm_dynamic_txpower, .-rtl8723e_dm_dynamic_txpower
	.comm	TX_POWER_NEAR_FIELD_THRESH_LVL2,4,4
	.comm	TX_POWER_NEAR_FIELD_THRESH_LVL1,4,4
	.comm	TXHIGHPWRLEVEL_NORMAL,4,4
	.comm	TXHIGHPWRLEVEL_LEVEL1,4,4
	.comm	NL80211_IFTYPE_ADHOC,4,4
	.comm	MAC80211_LINKED,4,4
	.comm	HAL_DM_HIPWR_DISABLE,4,4
	.comm	DBG_TRACE,4,4
	.comm	DBG_LOUD,4,4
	.comm	COMP_POWER,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
