	.file	"extr_mv643xx_eth.c_rxq_refill.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	rxq_refill, @function
rxq_refill:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, esi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xor	r14d, r14d
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	DWORD PTR 12[rsp], esi
	call	rxq_to_mp@PLT
	mov	r13, rax
	test	r15d, r15d
	jg	.L2
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	r12, QWORD PTR 16[rbx]
	add	QWORD PTR [rbx], 1
	add	r14d, 1
	lea	rax, 1[r12]
	mov	QWORD PTR 16[rbx], rax
	cmp	rax, QWORD PTR 8[rbx]
	jne	.L6
	mov	QWORD PTR 16[rbx], 0
.L6:
	mov	rax, QWORD PTR 40[rbx]
	movsx	r12, r12d
	mov	rdi, rbp
	lea	rdx, [r12+r12*2]
	lea	r15, [rax+rdx*4]
	call	skb_end_pointer@PLT
	mov	esi, DWORD PTR 0[rbp]
	mov	ecx, DWORD PTR DMA_FROM_DEVICE[rip]
	sub	eax, esi
	mov	edx, eax
	mov	rax, QWORD PTR 8[r13]
	mov	DWORD PTR 8[rsp], edx
	mov	edi, DWORD PTR [rax]
	call	dma_map_single@PLT
	mov	edx, DWORD PTR 8[rsp]
	mov	DWORD PTR 8[r15], eax
	mov	rax, QWORD PTR 32[rbx]
	mov	DWORD PTR [r15], edx
	mov	QWORD PTR [rax+r12*8], rbp
	xor	eax, eax
	call	wmb@PLT
	mov	eax, DWORD PTR BUFFER_OWNED_BY_DMA[rip]
	or	eax, DWORD PTR RX_ENABLE_INTERRUPT[rip]
	mov	DWORD PTR 4[r15], eax
	xor	eax, eax
	call	wmb@PLT
	mov	esi, 2
	mov	rdi, rbp
	call	skb_reserve@PLT
	cmp	DWORD PTR 12[rsp], r14d
	je	.L1
.L2:
	mov	rax, QWORD PTR 8[rbx]
	cmp	QWORD PTR [rbx], rax
	jge	.L17
	mov	esi, DWORD PTR 16[r13]
	mov	rdi, QWORD PTR 8[r13]
	call	netdev_alloc_skb@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L18
	mov	esi, DWORD PTR SKB_DMA_REALIGN[rip]
	test	esi, esi
	je	.L5
	mov	rdi, rax
	call	skb_reserve@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L17:
.L3:
	endbr64
	mov	ecx, DWORD PTR 24[rbx]
	mov	eax, -2
	rol	eax, cl
	and	DWORD PTR 4[r13], eax
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	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
.L18:
	.cfi_restore_state
	mov	DWORD PTR 0[r13], 1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	rxq_refill, .-rxq_refill
	.comm	SKB_DMA_REALIGN,4,4
	.comm	RX_ENABLE_INTERRUPT,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.comm	BUFFER_OWNED_BY_DMA,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_mv643xx_eth.c_rxq_refill.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rxq_refill, %function
rxq_refill:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r1
	sub	sp, sp, #20
	mov	r4, r0
	str	r1, [sp, #12]
	bl	rxq_to_mp
	cmp	r5, #0
	movle	r8, #0
	ble	.L1
	mov	r7, r0
	mov	r8, #0
	ldr	fp, .L17
	ldr	r10, .L17+4
	b	.L2
.L5:
	ldmib	r4, {r3, r6}
	add	r2, r6, #1
	cmp	r2, r3
	movne	r1, r2
	moveq	r1, #0
	ldr	r3, [r4]
	str	r1, [r4, #8]
	add	r3, r3, #1
	str	r3, [r4]
	mov	r0, r5
	ldr	r9, [r4, #20]
	bl	skb_end_pointer
	ldr	r1, [r5]
	ldr	r3, [r7, #8]
	sub	r2, r0, r1
	ldr	r0, [r3]
	ldr	r3, .L17+8
	str	r2, [sp, #8]
	ldr	r3, [r3]
	bl	dma_map_single
	ldr	ip, [r4, #16]
	add	r3, r6, r6, lsl #1
	ldr	r2, [sp, #8]
	add	r1, r9, r3, lsl #2
	str	r0, [r1, #8]
	str	r2, [r9, r3, lsl #2]
	str	r5, [ip, r6, lsl #2]
	str	r1, [sp, #4]
	bl	wmb
	ldr	r2, [r10]
	ldr	r3, [fp]
	ldr	r1, [sp, #4]
	orr	r3, r3, r2
	str	r3, [r1, #4]
	bl	wmb
	mov	r0, r5
	mov	r1, #2
	bl	skb_reserve
	ldr	r3, [sp, #12]
	cmp	r3, r8
	beq	.L1
.L2:
	ldm	r4, {r2, r3}
	cmp	r2, r3
	bge	.L15
	ldr	r1, [r7, #12]
	ldr	r0, [r7, #8]
	bl	netdev_alloc_skb
	subs	r5, r0, #0
	beq	.L16
	ldr	r3, .L17+12
	add	r8, r8, #1
	ldr	r1, [r3]
	cmp	r1, #0
	beq	.L5
	bl	skb_reserve
	b	.L5
.L15:
.L3:
	mov	r1, #1
	ldr	r2, [r4, #12]
	ldr	r3, [r7, #4]
	bic	r3, r3, r1, lsl r2
	str	r3, [r7, #4]
.L1:
	mov	r0, r8
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	mov	r3, #1
	mov	r0, r8
	str	r3, [r7]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	.align	2
.L17:
	.word	BUFFER_OWNED_BY_DMA
	.word	RX_ENABLE_INTERRUPT
	.word	DMA_FROM_DEVICE
	.word	SKB_DMA_REALIGN
	.size	rxq_refill, .-rxq_refill
	.comm	SKB_DMA_REALIGN,4,4
	.comm	RX_ENABLE_INTERRUPT,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.comm	BUFFER_OWNED_BY_DMA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
