	.file	"extr_ag71xx_main.c_ag71xx_ring_rx_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"ag71xx: RX desc at %p, next is %08x\n"
	.text
	.p2align 4
	.type	ag71xx_ring_rx_init, @function
ag71xx_ring_rx_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	r15d, r15d
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	lea	r14, .LC0[rip]
	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
	lea	rbp, 8[rdi]
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	edi, DWORD PTR 40[rdi]
	call	BIT@PLT
	mov	edi, DWORD PTR 40[rbx]
	mov	r12d, eax
	call	BIT@PLT
	lea	r13d, -1[rax]
	test	r12d, r12d
	je	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	mov	esi, r15d
	mov	rdi, rbp
	add	r15d, 1
	call	ag71xx_ring_desc@PLT
	mov	edx, r15d
	mov	rdi, r14
	and	edx, r13d
	imul	edx, DWORD PTR AG71XX_DESC_SIZE[rip]
	add	rdx, QWORD PTR 32[rbx]
	mov	rsi, rax
	mov	QWORD PTR 8[rax], rdx
	call	DBG@PLT
	cmp	r15d, r12d
	jne	.L4
	lea	r14d, -1[r15]
	xor	r12d, r12d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	mov	eax, DWORD PTR DESC_EMPTY[rip]
	mov	DWORD PTR 0[r13], eax
	lea	rax, 1[r12]
	cmp	r14, r12
	je	.L7
	mov	r12, rax
.L6:
	mov	esi, r12d
	mov	rdi, rbp
	call	ag71xx_ring_desc@PLT
	mov	ecx, DWORD PTR netdev_alloc_frag[rip]
	mov	edx, DWORD PTR [rbx]
	mov	rdi, rbx
	mov	r13, rax
	mov	rax, QWORD PTR 24[rbx]
	lea	rsi, [rax+r12*4]
	call	ag71xx_fill_rx_buf@PLT
	test	eax, eax
	jne	.L5
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L7:
	xor	r12d, r12d
.L3:
	xor	eax, eax
	call	wmb@PLT
	mov	QWORD PTR 16[rbx], 0
	mov	eax, r12d
	mov	QWORD PTR 8[rbx], 0
	add	rsp, 8
	.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	ag71xx_ring_rx_init, .-ag71xx_ring_rx_init
	.comm	netdev_alloc_frag,4,4
	.comm	ENOMEM,4,4
	.comm	DESC_EMPTY,4,4
	.comm	AG71XX_DESC_SIZE,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_ag71xx_main.c_ag71xx_ring_rx_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ag71xx: RX desc at %p, next is %08x\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ag71xx_ring_rx_init, %function
ag71xx_ring_rx_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	ldr	r0, [r0, #20]
	bl	BIT
	mov	r6, r0
	ldr	r0, [r5, #20]
	bl	BIT
	cmp	r6, #0
	beq	.L7
	mov	r4, #0
	ldr	r10, .L12
	ldr	r9, .L12+4
	sub	r8, r0, #1
	add	r7, r5, #4
.L4:
	mov	r1, r4
	mov	r0, r7
	bl	ag71xx_ring_desc
	mov	r1, r0
	ldr	r3, [r5, #16]
	ldr	r0, [r10]
	add	r4, r4, #1
	and	r2, r4, r8
	mla	r2, r0, r2, r3
	mov	r0, r9
	str	r2, [r1, #4]
	bl	DBG
	cmp	r4, r6
	bne	.L4
	mov	r4, #0
	ldr	r8, .L12+8
	ldr	r9, .L12+12
	b	.L6
.L5:
	ldr	r3, [r9]
	cmp	r4, r6
	str	r3, [r10]
	beq	.L7
.L6:
	mov	r1, r4
	mov	r0, r7
	bl	ag71xx_ring_desc
	ldr	r1, [r5, #12]
	mov	r10, r0
	add	r1, r1, r4, lsl #2
	mov	r0, r5
	ldr	r3, [r8]
	ldr	r2, [r5]
	bl	ag71xx_fill_rx_buf
	cmp	r0, #0
	add	r4, r4, #1
	bne	.L5
	ldr	r3, .L12+16
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L3
.L7:
	mov	r4, #0
.L3:
	bl	wmb
	mov	r3, #0
	mov	r0, r4
	str	r3, [r5, #8]
	str	r3, [r5, #4]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L13:
	.align	2
.L12:
	.word	AG71XX_DESC_SIZE
	.word	.LC0
	.word	netdev_alloc_frag
	.word	DESC_EMPTY
	.word	ENOMEM
	.size	ag71xx_ring_rx_init, .-ag71xx_ring_rx_init
	.comm	netdev_alloc_frag,4,4
	.comm	ENOMEM,4,4
	.comm	DESC_EMPTY,4,4
	.comm	AG71XX_DESC_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
