	.file	"extr_mvneta.c_mvneta_rxq_drop_pkts.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mvneta_rxq_drop_pkts, @function
mvneta_rxq_drop_pkts:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	mvneta_rxq_busy_desc_num_get@PLT
	test	eax, eax
	jne	.L21
	cmp	QWORD PTR 8[r13], 0
	jne	.L1
.L8:
	mov	eax, DWORD PTR 0[rbp]
	xor	ebx, ebx
	test	eax, eax
	jle	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rax, QWORD PTR 16[rbp]
	lea	rdx, [rax+rbx*4]
	mov	rax, QWORD PTR 8[rbp]
	mov	r12, QWORD PTR [rax+rbx*8]
	test	r12, r12
	je	.L7
	mov	esi, DWORD PTR [rdx]
	test	esi, esi
	je	.L7
	mov	rax, QWORD PTR 0[r13]
	mov	ecx, DWORD PTR DMA_FROM_DEVICE[rip]
	mov	edx, DWORD PTR PAGE_SIZE[rip]
	mov	edi, DWORD PTR [rax]
	call	dma_unmap_page@PLT
	mov	rdi, r12
	call	__free_page@PLT
.L7:
	add	rbx, 1
	cmp	DWORD PTR 0[rbp], ebx
	jg	.L4
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	mov	ecx, eax
	mov	edx, eax
	mov	rsi, rbp
	mov	rdi, r13
	mov	r14d, eax
	call	mvneta_rxq_desc_num_update@PLT
	cmp	QWORD PTR 8[r13], 0
	je	.L8
	test	r14d, r14d
	jle	.L1
	xor	r12d, r12d
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, rbp
	add	r12d, 1
	call	mvneta_rxq_next_desc_get@PLT
	mov	rdi, rax
	mov	rbx, rax
	call	MVNETA_RX_GET_BM_POOL_ID@PLT
	mov	rdi, QWORD PTR 8[r13]
	mov	rdx, QWORD PTR [rdi]
	lea	rsi, [rdx+rax*4]
	mov	edx, DWORD PTR [rbx]
	call	mvneta_bm_pool_put_bp@PLT
	cmp	r14d, r12d
	jne	.L6
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	mvneta_rxq_drop_pkts, .-mvneta_rxq_drop_pkts
	.comm	PAGE_SIZE,4,4
	.comm	DMA_FROM_DEVICE,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_mvneta.c_mvneta_rxq_drop_pkts.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mvneta_rxq_drop_pkts, %function
mvneta_rxq_drop_pkts:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r7, r0
	mov	r5, r1
	bl	mvneta_rxq_busy_desc_num_get
	subs	r8, r0, #0
	bne	.L23
	ldr	r3, [r7, #4]
	cmp	r3, #0
	popne	{r4, r5, r6, r7, r8, r9, r10, pc}
.L8:
	ldr	r0, [r5]
	cmp	r0, #0
	pople	{r4, r5, r6, r7, r8, r9, r10, pc}
	mov	r4, #0
	ldr	r9, .L24
	ldr	r8, .L24+4
.L4:
	ldr	r3, [r5, #4]
	ldr	r2, [r5, #8]
	ldr	r6, [r3, r4, lsl #2]
	cmp	r6, #0
	beq	.L7
	ldr	r1, [r2, r4, lsl #2]
	cmp	r1, #0
	beq	.L7
	ldr	r3, [r7]
	ldr	r2, [r8]
	ldr	r0, [r3]
	ldr	r3, [r9]
	bl	dma_unmap_page
	mov	r0, r6
	bl	__free_page
	ldr	r0, [r5]
.L7:
	add	r4, r4, #1
	cmp	r0, r4
	bgt	.L4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L23:
	mov	r3, r8
	mov	r2, r8
	mov	r1, r5
	mov	r0, r7
	bl	mvneta_rxq_desc_num_update
	ldr	r3, [r7, #4]
	cmp	r3, #0
	beq	.L8
	cmp	r8, #0
	pople	{r4, r5, r6, r7, r8, r9, r10, pc}
	mov	r6, #0
.L6:
	mov	r0, r5
	bl	mvneta_rxq_next_desc_get
	mov	r4, r0
	bl	MVNETA_RX_GET_BM_POOL_ID
	ldr	r3, [r7, #4]
	ldr	r2, [r4]
	ldr	r1, [r3]
	add	r6, r6, #1
	add	r1, r1, r0, lsl #2
	mov	r0, r3
	bl	mvneta_bm_pool_put_bp
	cmp	r8, r6
	bne	.L6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L25:
	.align	2
.L24:
	.word	DMA_FROM_DEVICE
	.word	PAGE_SIZE
	.size	mvneta_rxq_drop_pkts, .-mvneta_rxq_drop_pkts
	.comm	PAGE_SIZE,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
