	.file	"extr_rtw8822b.c_rtw8822b_query_rx_desc.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	rtw8822b_query_rx_desc, @function
rtw8822b_query_rx_desc:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rcx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	mov	edx, 56
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	xor	esi, esi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR [rdi]
	mov	rdi, rbp
	movsx	r14, DWORD PTR [rax]
	call	memset@PLT
	mov	rdi, rbx
	call	GET_RX_DESC_PHYST@PLT
	mov	rdi, rbx
	mov	DWORD PTR 12[rbp], eax
	call	GET_RX_DESC_ICV_ERR@PLT
	mov	rdi, rbx
	mov	DWORD PTR 48[rbp], eax
	call	GET_RX_DESC_CRC32@PLT
	mov	rdi, rbx
	mov	DWORD PTR 44[rbp], eax
	call	GET_RX_DESC_SWDEC@PLT
	mov	rdi, rbx
	test	eax, eax
	sete	al
	movzx	eax, al
	mov	DWORD PTR 0[rbp], eax
	call	GET_RX_DESC_C2H@PLT
	mov	rdi, rbx
	mov	QWORD PTR 16[rbp], rax
	call	GET_RX_DESC_PKT_LEN@PLT
	mov	rdi, rbx
	mov	DWORD PTR 40[rbp], eax
	call	GET_RX_DESC_DRV_INFO_SIZE@PLT
	mov	rdi, rbx
	mov	DWORD PTR 4[rbp], eax
	call	GET_RX_DESC_SHIFT@PLT
	mov	rdi, rbx
	mov	DWORD PTR 8[rbp], eax
	call	GET_RX_DESC_RX_RATE@PLT
	mov	rdi, rbx
	mov	DWORD PTR 36[rbp], eax
	call	GET_RX_DESC_MACID@PLT
	mov	rdi, rbx
	mov	DWORD PTR 32[rbp], eax
	call	GET_RX_DESC_PPDU_CNT@PLT
	mov	rdi, rbx
	mov	DWORD PTR 28[rbp], eax
	call	GET_RX_DESC_TSFL@PLT
	mov	DWORD PTR 24[rbp], eax
	mov	eax, DWORD PTR 4[rbp]
	sal	eax, 3
	cmp	QWORD PTR 16[rbp], 0
	mov	DWORD PTR 4[rbp], eax
	jne	.L1
	movsx	rdx, DWORD PTR 8[rbp]
	cdqe
	xor	r8d, r8d
	add	r14, rdx
	add	rax, r14
	lea	r15, [rbx+rax*4]
	mov	eax, DWORD PTR 12[rbp]
	test	eax, eax
	jne	.L7
.L3:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rcx, r12
	mov	rdx, r15
	mov	rsi, rbp
	pop	rbx
	.cfi_def_cfa_offset 48
	mov	rdi, r13
	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	rtw_rx_fill_rx_status@PLT
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	lea	r8, [rbx+r14*4]
	mov	rdx, rbp
	mov	rdi, r13
	mov	rsi, r8
	mov	QWORD PTR 8[rsp], r8
	call	query_phy_status@PLT
	mov	r8, QWORD PTR 8[rsp]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L1:
	add	rsp, 24
	.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
	.cfi_endproc
.LFE0:
	.size	rtw8822b_query_rx_desc, .-rtw8822b_query_rx_desc
	.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_rtw8822b.c_rtw8822b_query_rx_desc.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rtw8822b_query_rx_desc, %function
rtw8822b_query_rx_desc:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	ldr	ip, [r0]
	mov	r4, r2
	mov	r1, #0
	sub	sp, sp, #8
	mov	r7, r0
	mov	r0, r2
	mov	r2, #48
	ldr	r6, [ip]
	mov	r8, r3
	bl	memset
	mov	r0, r5
	bl	GET_RX_DESC_PHYST
	mov	r3, r0
	mov	r0, r5
	str	r3, [r4, #12]
	bl	GET_RX_DESC_ICV_ERR
	mov	r3, r0
	mov	r0, r5
	str	r3, [r4, #44]
	bl	GET_RX_DESC_CRC32
	mov	r3, r0
	mov	r0, r5
	str	r3, [r4, #40]
	bl	GET_RX_DESC_SWDEC
	clz	r2, r0
	lsr	r2, r2, #5
	str	r2, [r4]
	mov	r0, r5
	bl	GET_RX_DESC_C2H
	mov	r3, r0
	mov	r0, r5
	str	r3, [r4, #16]
	bl	GET_RX_DESC_PKT_LEN
	mov	r3, r0
	mov	r0, r5
	str	r3, [r4, #36]
	bl	GET_RX_DESC_DRV_INFO_SIZE
	mov	r3, r0
	mov	r0, r5
	str	r3, [r4, #4]
	bl	GET_RX_DESC_SHIFT
	mov	r3, r0
	mov	r0, r5
	str	r3, [r4, #8]
	bl	GET_RX_DESC_RX_RATE
	mov	r3, r0
	mov	r0, r5
	str	r3, [r4, #32]
	bl	GET_RX_DESC_MACID
	mov	r3, r0
	mov	r0, r5
	str	r3, [r4, #28]
	bl	GET_RX_DESC_PPDU_CNT
	mov	r3, r0
	mov	r0, r5
	str	r3, [r4, #24]
	bl	GET_RX_DESC_TSFL
	ldr	r2, [r4, #4]
	ldr	r3, [r4, #16]
	lsl	r2, r2, #3
	cmp	r3, #0
	str	r0, [r4, #20]
	str	r2, [r4, #4]
	bne	.L1
	ldr	r3, [r4, #8]
	ldr	r1, [r4, #12]
	add	r3, r6, r3
	add	r2, r2, r3
	cmp	r1, #0
	add	r6, r5, r2, lsl #2
	moveq	r5, r1
	bne	.L7
.L3:
	mov	r3, r8
	mov	r2, r6
	mov	r1, r4
	mov	r0, r7
	str	r5, [sp]
	bl	rtw_rx_fill_rx_status
.L1:
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	add	r5, r5, r3, lsl #2
	mov	r1, r5
	mov	r2, r4
	mov	r0, r7
	bl	query_phy_status
	b	.L3
	.size	rtw8822b_query_rx_desc, .-rtw8822b_query_rx_desc
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
