	.file	"extr_ag71xx.c_ag71xx_ring_tx_init.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ag71xx_ring_tx_init, @function
ag71xx_ring_tx_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	lea	rbp, 8[rdi]
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	edi, DWORD PTR 40[rdi]
	call	BIT@PLT
	test	eax, eax
	jle	.L2
	lea	ebx, -1[rax]
	xor	r13d, r13d
	mov	r12d, ebx
	.p2align 4,,10
	.p2align 3
.L3:
	mov	esi, r13d
	mov	rdi, rbp
	call	ag71xx_ring_desc@PLT
	lea	edx, 1[r13]
	and	edx, ebx
	imul	edx, DWORD PTR AG71XX_DESC_SIZE[rip]
	movsx	rdx, edx
	add	rdx, QWORD PTR 32[r14]
	mov	QWORD PTR 8[rax], rdx
	mov	edx, DWORD PTR DESC_EMPTY[rip]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR 24[r14]
	mov	QWORD PTR [rax+r13*8], 0
	mov	rax, r13
	add	r13, 1
	cmp	rax, r12
	jne	.L3
.L2:
	xor	eax, eax
	call	wmb@PLT
	mov	QWORD PTR 16[r14], 0
	mov	edi, DWORD PTR [r14]
	mov	QWORD PTR 8[r14], 0
	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
	jmp	netdev_reset_queue@PLT
	.cfi_endproc
.LFE0:
	.size	ag71xx_ring_tx_init, .-ag71xx_ring_tx_init
	.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.c_ag71xx_ring_tx_init.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ag71xx_ring_tx_init, %function
ag71xx_ring_tx_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r0
	ldr	r0, [r0, #20]
	bl	BIT
	cmp	r0, #0
	ble	.L2
	mov	r4, #0
	mov	r6, r0
	mov	r9, r4
	ldr	fp, .L7
	ldr	r10, .L7+4
	add	r7, r5, #4
	sub	r8, r0, #1
.L3:
	mov	r1, r4
	mov	r0, r7
	bl	ag71xx_ring_desc
	add	r4, r4, #1
	ldr	r1, [fp]
	ldr	r3, [r5, #16]
	and	r2, r4, r8
	mla	r2, r1, r2, r3
	ldr	r3, [r5, #12]
	ldr	r1, [r10]
	add	r3, r3, r4, lsl #2
	cmp	r4, r6
	stm	r0, {r1, r2}
	str	r9, [r3, #-4]
	bne	.L3
.L2:
	bl	wmb
	mov	r3, #0
	ldr	r0, [r5]
	str	r3, [r5, #8]
	str	r3, [r5, #4]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	netdev_reset_queue
.L8:
	.align	2
.L7:
	.word	AG71XX_DESC_SIZE
	.word	DESC_EMPTY
	.size	ag71xx_ring_tx_init, .-ag71xx_ring_tx_init
	.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
