	.file	"extr_trx.c__rtl92se_query_rxphystatus.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	_rtl92se_query_rxphystatus, @function
_rtl92se_query_rxphystatus:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rcx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, r8d
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, r9d
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	QWORD PTR 16[rsp], rdi
	mov	DWORD PTR 8[rsp], r8d
	call	rtl_priv@PLT
	mov	rdi, rax
	mov	rbx, rax
	call	rtl_psc@PLT
	mov	edx, DWORD PTR 96[rsp]
	mov	ebp, DWORD PTR [r14]
	mov	DWORD PTR 4[r14], r13d
	mov	DWORD PTR 8[r14], r12d
	mov	DWORD PTR 12[r14], edx
	mov	rdx, QWORD PTR 16[r14]
	mov	QWORD PTR [rdx], -1
	test	ebp, ebp
	je	.L2
	mov	rbx, QWORD PTR ERFON[rip]
	cmp	QWORD PTR [rax], rbx
	je	.L3
.L8:
	mov	edx, DWORD PTR [r15]
	mov	eax, edx
	and	edx, 62
	sar	eax, 6
	and	eax, 3
	cmp	eax, 2
	je	.L11
.L55:
	cmp	eax, 3
	je	.L12
	cmp	eax, 1
	je	.L57
	mov	ebp, 14
	sub	ebp, edx
	movsx	rbp, ebp
.L10:
	mov	rdi, rbp
	call	rtl_query_rxpwrpercentage@PLT
	mov	edx, 100
	lea	esi, 6[rax]
	cmp	esi, 100
	cmovg	esi, edx
	lea	edx, -35[rsi]
	cmp	edx, 7
	ja	.L15
	sub	esi, 2
.L16:
	mov	eax, DWORD PTR 8[rsp]
	mov	DWORD PTR 24[r14], esi
	mov	QWORD PTR 64[r14], rbp
	test	eax, eax
	jne	.L35
.L51:
	mov	rdi, QWORD PTR 16[rsp]
	call	rtl_signal_scale_mapping@PLT
	mov	DWORD PTR 48[r14], eax
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	movabs	rcx, 4294967297
	mov	rax, QWORD PTR 8[rbx]
	mov	QWORD PTR [rax], rcx
	mov	r12d, DWORD PTR RF90_PATH_A[rip]
	cmp	r12d, DWORD PTR RF6052_MAX_PATH[rip]
	jge	.L40
	mov	DWORD PTR 12[rsp], 0
	movsx	rdx, r12d
	lea	r13, 0[0+rdx*4]
	.p2align 4,,10
	.p2align 3
.L24:
	cmp	DWORD PTR [rax+r13], 1
	mov	rax, QWORD PTR 8[r15]
	sbb	ebp, -1
	mov	eax, DWORD PTR [rax+r13]
	and	eax, 63
	lea	edi, -110[rax+rax]
	movsx	rdi, edi
	call	rtl_query_rxpwrpercentage@PLT
	mov	rdi, QWORD PTR 16[r15]
	mov	r8, QWORD PTR [rbx]
	add	DWORD PTR 12[rsp], eax
	mov	r9d, DWORD PTR [rdi+r13]
	mov	edi, r9d
	shr	edi, 31
	add	edi, r9d
	sar	edi
	movsx	rdi, edi
	mov	QWORD PTR [r8+r13*2], rdi
	mov	edi, DWORD PTR 8[rsp]
	test	edi, edi
	je	.L23
	mov	rdi, QWORD PTR 32[r14]
	mov	DWORD PTR [rdi+r13], eax
.L23:
	add	r12d, 1
	add	r13, 4
	cmp	DWORD PTR RF6052_MAX_PATH[rip], r12d
	jle	.L21
	mov	rax, QWORD PTR 8[rbx]
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L40:
	mov	DWORD PTR 12[rsp], 0
	.p2align 4,,10
	.p2align 3
.L21:
	mov	edx, DWORD PTR 24[r15]
	sar	edx
	and	edx, 127
	sub	edx, 110
	movsx	rdx, edx
	mov	rdi, rdx
	mov	QWORD PTR 24[rsp], rdx
	call	rtl_query_rxpwrpercentage@PLT
	mov	rdx, QWORD PTR 24[rsp]
	cmp	QWORD PTR 56[r14], 0
	mov	DWORD PTR 24[r14], eax
	mov	QWORD PTR 72[r14], rdx
	mov	QWORD PTR 64[r14], rdx
	je	.L28
	mov	rax, QWORD PTR 40[r14]
	cmp	rax, QWORD PTR DESC_RATEMCS8[rip]
	jge	.L58
.L28:
	mov	rax, QWORD PTR 32[r15]
	mov	edi, DWORD PTR [rax]
.L50:
	call	rtl_evm_db_to_percentage@PLT
	mov	esi, DWORD PTR 8[rsp]
	test	esi, esi
	je	.L27
	mov	rdx, QWORD PTR 16[r14]
	movzx	eax, al
	mov	DWORD PTR 28[r14], eax
	mov	DWORD PTR [rdx], eax
.L27:
	test	ebp, ebp
	je	.L1
	mov	eax, DWORD PTR 12[rsp]
	cdq
	idiv	ebp
	mov	esi, eax
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L15:
	lea	edx, -27[rsi]
	cmp	edx, 7
	jbe	.L59
	lea	edx, -15[rsi]
	cmp	edx, 11
	ja	.L18
	sub	esi, 8
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L59:
	mov	eax, DWORD PTR 8[rsp]
	sub	esi, 6
	mov	QWORD PTR 64[r14], rbp
	mov	DWORD PTR 24[r14], esi
	test	eax, eax
	je	.L51
.L35:
	mov	edx, DWORD PTR 4[r15]
	xor	eax, eax
	cmp	edx, 64
	jg	.L20
	mov	eax, 100
	cmp	edx, 19
	jg	.L60
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rdx, QWORD PTR 16[r14]
	mov	DWORD PTR 28[r14], eax
	mov	DWORD PTR [rdx], eax
	mov	DWORD PTR 4[rdx], -1
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L58:
	cmp	rax, QWORD PTR DESC_RATEMCS15[rip]
	mov	rax, QWORD PTR 32[r15]
	mov	edi, DWORD PTR [rax]
	jg	.L50
	call	rtl_evm_db_to_percentage@PLT
	mov	ecx, DWORD PTR 8[rsp]
	test	ecx, ecx
	je	.L61
	mov	rdx, QWORD PTR 16[r14]
	movzx	eax, al
	mov	DWORD PTR 28[r14], eax
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR 32[r15]
	mov	edi, DWORD PTR 4[rax]
	call	rtl_evm_db_to_percentage@PLT
	mov	rdx, QWORD PTR 16[r14]
	movzx	eax, al
	mov	DWORD PTR 4[rdx], eax
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L3:
	mov	esi, DWORD PTR RFPGA0_XA_HSSIPARAMETER2[rip]
	mov	rdi, QWORD PTR 16[rsp]
	mov	edx, 512
	call	rtl_get_bbreg@PLT
	test	eax, eax
	je	.L8
	mov	rax, QWORD PTR [r15]
	mov	ebx, DWORD PTR [r15]
	mov	eax, DWORD PTR [rax]
	lea	edx, [rbx+rbx]
	and	edx, 62
	sar	eax, 5
	and	eax, 3
	cmp	eax, 2
	jne	.L55
	.p2align 4,,10
	.p2align 3
.L11:
	mov	ebp, -20
	sub	ebp, edx
	movsx	rbp, ebp
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L61:
	mov	rax, QWORD PTR 32[r15]
	mov	edi, DWORD PTR 4[rax]
	call	rtl_evm_db_to_percentage@PLT
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L12:
	mov	ebp, -40
	sub	ebp, edx
	movsx	rbp, ebp
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L57:
	mov	ebp, -2
	sub	ebp, edx
	movsx	rbp, ebp
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L18:
	lea	edx, -5[rsi]
	cmp	edx, 9
	jbe	.L62
	mov	edx, DWORD PTR 8[rsp]
	mov	DWORD PTR 24[r14], esi
	mov	QWORD PTR 64[r14], rbp
	test	edx, edx
	je	.L51
	cmp	eax, 34
	jle	.L35
	mov	eax, 100
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L62:
	sub	esi, 4
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L60:
	mov	eax, 64
	sub	eax, edx
	mov	edx, 3123612579
	imul	eax, eax, 100
	imul	rax, rdx
	shr	rax, 37
	jmp	.L20
	.cfi_endproc
.LFE0:
	.size	_rtl92se_query_rxphystatus, .-_rtl92se_query_rxphystatus
	.comm	RFPGA0_XA_HSSIPARAMETER2,4,4
	.comm	RF90_PATH_A,4,4
	.comm	RF6052_MAX_PATH,4,4
	.comm	ERFON,8,8
	.comm	DESC_RATEMCS8,8,8
	.comm	DESC_RATEMCS15,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_trx.c__rtl92se_query_rxphystatus.c"
	.text
	.global	__aeabi_idiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	_rtl92se_query_rxphystatus, %function
_rtl92se_query_rxphystatus:
	@ args = 12, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #12
	mov	r4, r1
	mov	fp, r3
	ldr	r6, [sp, #52]
	ldr	r5, [sp, #56]
	str	r0, [sp, #4]
	bl	rtl_priv
	mov	r10, r0
	bl	rtl_psc
	mvn	r1, #0
	ldr	r7, [r4]
	ldr	r2, [r4, #16]
	ldr	r3, [sp, #48]
	cmp	r7, #0
	str	r6, [r4, #8]
	str	r3, [r4, #4]
	str	r5, [r4, #12]
	str	r1, [r2]
	str	r1, [r2, #4]
	beq	.L2
	ldr	r3, .L65
	ldr	r2, [r0]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L3
.L8:
	ldr	r5, [fp]
	asr	r3, r5, #6
	and	r3, r3, #3
	cmp	r3, #2
	and	r5, r5, #62
	beq	.L11
.L61:
	cmp	r3, #3
	beq	.L12
	cmp	r3, #1
	rsbne	r5, r5, #14
	beq	.L63
.L10:
	mov	r0, r5
	bl	rtl_query_rxpwrpercentage
	add	r1, r0, #6
	cmp	r1, #100
	movge	r1, #100
	sub	r3, r1, #35
	cmp	r3, #7
	subls	r1, r1, #2
	bls	.L16
	sub	r3, r1, #27
	cmp	r3, #7
	subls	r1, r1, #6
	bls	.L16
	sub	r3, r1, #15
	cmp	r3, #11
	subls	r1, r1, #8
	bls	.L16
	sub	r3, r1, #5
	cmp	r3, #9
	subls	r1, r1, #4
	bls	.L16
	ldr	r3, [sp, #48]
	str	r1, [r4, #20]
	cmp	r3, #0
	str	r5, [r4, #44]
	beq	.L57
	cmp	r0, #34
	ble	.L35
.L39:
	mov	r3, #100
.L20:
	mvn	r0, #0
	ldr	r2, [r4, #16]
	str	r3, [r4, #24]
	str	r0, [r2, #4]
	str	r3, [r2]
	b	.L57
.L2:
	mov	r0, #1
	ldr	r2, [r10, #4]
	ldr	ip, .L65+4
	ldr	r8, .L65+8
	str	r0, [r2]
	ldr	r5, [ip]
	ldr	ip, [r8]
	mov	r9, r7
	cmp	r5, ip
	str	r0, [r2, #4]
	bge	.L21
.L24:
	ldr	r2, [r2, r5, lsl #2]
	lsl	r6, r5, #2
	cmp	r2, #0
	ldr	r2, [fp, #4]
	addne	r7, r7, #1
	ldr	r0, [r2, r6]
	add	r5, r5, #1
	and	r0, r0, #63
	sub	r0, r0, #55
	lsl	r0, r0, #1
	bl	rtl_query_rxpwrpercentage
	ldr	r2, [fp, #8]
	ldr	r3, [sp, #48]
	ldr	r2, [r2, r6]
	ldr	ip, [r10]
	add	r2, r2, r2, lsr #31
	asr	r2, r2, #1
	cmp	r3, #0
	str	r2, [ip, r6]
	ldrne	r2, [r4, #28]
	add	r9, r9, r0
	strne	r0, [r2, r6]
	ldr	r2, [r8]
	cmp	r2, r5
	ldrgt	r2, [r10, #4]
	bgt	.L24
.L21:
	ldr	r5, [fp, #12]
	asr	r5, r5, #1
	and	r5, r5, #127
	sub	r5, r5, #110
	mov	r0, r5
	bl	rtl_query_rxpwrpercentage
	ldr	r3, [r4, #40]
	str	r5, [r4, #48]
	cmp	r3, #0
	str	r5, [r4, #44]
	str	r0, [r4, #20]
	bne	.L25
.L28:
	ldr	r3, [fp, #16]
	ldr	r0, [r3]
.L56:
	bl	rtl_evm_db_to_percentage
	ldr	r3, [sp, #48]
	cmp	r3, #0
	ldrne	r3, [r4, #16]
	andne	r0, r0, #255
	strne	r0, [r4, #24]
	strne	r0, [r3]
.L27:
	cmp	r7, #0
	beq	.L1
	mov	r1, r7
	mov	r0, r9
	bl	__aeabi_idiv
	mov	r1, r0
.L57:
	ldr	r0, [sp, #4]
	bl	rtl_signal_scale_mapping
	str	r0, [r4, #36]
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L25:
	ldr	r2, .L65+12
	ldr	r3, [r4, #32]
	ldr	r2, [r2]
	cmp	r3, r2
	blt	.L28
	ldr	r2, .L65+16
	ldr	r2, [r2]
	cmp	r3, r2
	ldr	r3, [fp, #16]
	ldr	r0, [r3]
	bgt	.L56
	bl	rtl_evm_db_to_percentage
	ldr	r3, [sp, #48]
	cmp	r3, #0
	beq	.L64
	ldr	r1, [r4, #16]
	and	r3, r0, #255
	ldr	r2, [fp, #16]
	str	r3, [r4, #24]
	str	r3, [r1]
	ldr	r0, [r2, #4]
	bl	rtl_evm_db_to_percentage
	ldr	r3, [r4, #16]
	and	r0, r0, #255
	str	r0, [r3, #4]
	b	.L27
.L16:
	ldr	r3, [sp, #48]
	str	r1, [r4, #20]
	cmp	r3, #0
	str	r5, [r4, #44]
	beq	.L57
.L35:
	ldr	r3, [fp, #4]
	cmp	r3, #64
	movgt	r3, #0
	bgt	.L20
	cmp	r3, #19
	ble	.L39
	rsb	r3, r3, #64
	add	r3, r3, r3, lsl #2
	ldr	r2, .L65+20
	add	r3, r3, r3, lsl #2
	lsl	r3, r3, #2
	umull	r0, r3, r2, r3
	lsr	r3, r3, #5
	b	.L20
.L3:
	ldr	r3, .L65+24
	mov	r2, #512
	ldr	r1, [r3]
	ldr	r0, [sp, #4]
	bl	rtl_get_bbreg
	cmp	r0, #0
	beq	.L8
	ldr	r2, [fp]
	ldr	r3, [r2]
	lsl	r5, r2, #1
	asr	r3, r3, #5
	and	r3, r3, #3
	cmp	r3, #2
	and	r5, r5, #62
	bne	.L61
.L11:
	mvn	r3, #19
	sub	r5, r3, r5
	b	.L10
.L64:
	ldr	r3, [fp, #16]
	ldr	r0, [r3, #4]
	bl	rtl_evm_db_to_percentage
	b	.L27
.L63:
	mvn	r3, #1
	sub	r5, r3, r5
	b	.L10
.L12:
	mvn	r3, #39
	sub	r5, r3, r5
	b	.L10
.L66:
	.align	2
.L65:
	.word	ERFON
	.word	RF90_PATH_A
	.word	RF6052_MAX_PATH
	.word	DESC_RATEMCS8
	.word	DESC_RATEMCS15
	.word	-1171354717
	.word	RFPGA0_XA_HSSIPARAMETER2
	.size	_rtl92se_query_rxphystatus, .-_rtl92se_query_rxphystatus
	.comm	RFPGA0_XA_HSSIPARAMETER2,4,4
	.comm	RF90_PATH_A,4,4
	.comm	RF6052_MAX_PATH,4,4
	.comm	ERFON,4,4
	.comm	DESC_RATEMCS8,4,4
	.comm	DESC_RATEMCS15,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
