	.file	"extr_sni_ave.c_ave_tx_complete.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ave_tx_complete, @function
ave_tx_complete:
.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
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	netdev_priv@PLT
	mov	r14, rax
	mov	eax, DWORD PTR 24[rax]
	mov	ebx, DWORD PTR 32[r14]
	mov	r13d, DWORD PTR 28[r14]
	mov	DWORD PTR 4[rsp], eax
	mov	DWORD PTR 8[rsp], ebx
	cmp	eax, r13d
	je	.L9
	mov	DWORD PTR 12[rsp], 0
	xor	r15d, r15d
	xor	r12d, r12d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L28:
	and	eax, DWORD PTR AVE_STS_PKTLEN_TX_MASK[rip]
	add	DWORD PTR 12[rsp], eax
	cmp	edx, 1
	sbb	r15d, -1
.L5:
	mov	rax, QWORD PTR 40[r14]
	movsx	rbx, r13d
	lea	rsi, [rax+rbx*8]
	cmp	QWORD PTR [rsi], 0
	je	.L6
	mov	edx, DWORD PTR DMA_TO_DEVICE[rip]
	mov	rdi, rbp
	add	r12d, 1
	call	ave_dma_unmap@PLT
	mov	rax, QWORD PTR 40[r14]
	mov	rdi, QWORD PTR [rax+rbx*8]
	call	dev_consume_skb_any@PLT
	mov	rax, QWORD PTR 40[r14]
	mov	QWORD PTR [rax+rbx*8], 0
.L6:
	lea	eax, 1[r13]
	cdq
	idiv	DWORD PTR 8[rsp]
	mov	r13d, edx
	cmp	DWORD PTR 4[rsp], edx
	je	.L26
.L7:
	mov	esi, DWORD PTR AVE_DESCID_TX[rip]
	mov	edx, r13d
	mov	rdi, rbp
	call	ave_desc_read_cmdsts@PLT
	test	DWORD PTR AVE_STS_OWN[rip], eax
	jne	.L26
	mov	edx, DWORD PTR AVE_STS_LAST[rip]
	and	edx, eax
	test	DWORD PTR AVE_STS_OK[rip], eax
	jne	.L28
	test	edx, edx
	je	.L5
	mov	edx, DWORD PTR AVE_STS_OWC[rip]
	or	edx, DWORD PTR AVE_STS_EC[rip]
	add	DWORD PTR 16[r14], 1
	test	edx, eax
	je	.L5
	add	DWORD PTR 12[r14], 1
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L26:
	test	r12d, r12d
	setne	bl
.L2:
	mov	DWORD PTR 28[r14], r13d
	lea	r13, 8[r14]
	mov	rdi, r13
	call	u64_stats_update_begin@PLT
	add	DWORD PTR [r14], r15d
	mov	eax, DWORD PTR 12[rsp]
	mov	rdi, r13
	add	DWORD PTR 4[r14], eax
	call	u64_stats_update_end@PLT
	mov	rdi, rbp
	call	netif_queue_stopped@PLT
	mov	edi, eax
	call	unlikely@PLT
	test	rax, rax
	je	.L1
	test	bl, bl
	jne	.L29
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L29:
	.cfi_restore_state
	mov	rdi, rbp
	call	netif_wake_queue@PLT
	jmp	.L1
.L9:
	mov	DWORD PTR 12[rsp], 0
	xor	r12d, r12d
	xor	ebx, ebx
	xor	r15d, r15d
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	ave_tx_complete, .-ave_tx_complete
	.comm	DMA_TO_DEVICE,4,4
	.comm	AVE_STS_PKTLEN_TX_MASK,4,4
	.comm	AVE_STS_OWN,4,4
	.comm	AVE_STS_OWC,4,4
	.comm	AVE_STS_OK,4,4
	.comm	AVE_STS_LAST,4,4
	.comm	AVE_STS_EC,4,4
	.comm	AVE_DESCID_TX,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_sni_ave.c_ave_tx_complete.c"
	.text
	.global	__aeabi_idivmod
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ave_tx_complete, %function
ave_tx_complete:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #20
	mov	r5, r0
	bl	netdev_priv
	ldr	r3, [r0, #20]
	ldr	r4, [r0, #24]
	mov	r7, r0
	cmp	r3, r4
	mov	r6, #0
	ldr	r9, [r0, #28]
	str	r3, [sp, #8]
	beq	.L9
	mov	r3, r4
	ldr	r8, .L31
	mov	r4, r9
	ldr	fp, .L31+4
	mov	r9, r3
	ldr	r10, .L31+8
	str	r6, [sp, #4]
	str	r6, [sp, #12]
	b	.L7
.L29:
	ldr	r3, .L31+12
	cmp	r2, #0
	ldr	r1, [r3]
	ldr	r3, [sp, #4]
	and	r0, r0, r1
	add	r3, r3, r0
	str	r3, [sp, #4]
	ldrne	r3, [sp, #12]
	addne	r3, r3, #1
	strne	r3, [sp, #12]
.L5:
	ldr	r1, [r7, #32]
	ldr	r2, [r1, r9, lsl #2]
	add	r1, r1, r9, lsl #2
	cmp	r2, #0
	beq	.L6
	ldr	r3, .L31+16
	mov	r0, r5
	ldr	r2, [r3]
	bl	ave_dma_unmap
	ldr	r2, [r7, #32]
	add	r6, r6, #1
	ldr	r0, [r2, r9, lsl #2]
	bl	dev_consume_skb_any
	mov	r1, #0
	ldr	r2, [r7, #32]
	str	r1, [r2, r9, lsl #2]
.L6:
	add	r0, r9, #1
	mov	r1, r4
	bl	__aeabi_idivmod
	ldr	r3, [sp, #8]
	mov	r9, r1
	cmp	r3, r1
	beq	.L27
.L7:
	ldr	r3, .L31+20
	mov	r2, r9
	mov	r0, r5
	ldr	r1, [r3]
	bl	ave_desc_read_cmdsts
	ldr	r2, [r8]
	tst	r0, r2
	bne	.L27
	ldr	r1, [r10]
	ldr	r2, [fp]
	tst	r0, r1
	and	r2, r2, r0
	bne	.L29
	cmp	r2, #0
	beq	.L5
	ldr	r3, .L31+24
	ldr	r2, [r7, #16]
	ldr	r1, [r3]
	ldr	r3, .L31+28
	add	r2, r2, #1
	ldr	ip, [r3]
	str	r2, [r7, #16]
	orr	r1, r1, ip
	tst	r1, r0
	ldrne	r2, [r7, #12]
	addne	r2, r2, #1
	strne	r2, [r7, #12]
	b	.L5
.L27:
	subs	r8, r6, #0
	mov	r4, r9
	movne	r8, #1
.L2:
	add	r9, r7, #8
	mov	r0, r9
	str	r4, [r7, #24]
	bl	u64_stats_update_begin
	ldm	r7, {r1, r2}
	ldr	r3, [sp, #12]
	mov	r0, r9
	add	r1, r1, r3
	ldr	r3, [sp, #4]
	add	r3, r2, r3
	stm	r7, {r1, r3}
	bl	u64_stats_update_end
	mov	r0, r5
	bl	netif_queue_stopped
	bl	unlikely
	cmp	r0, #0
	moveq	r8, #0
	cmp	r8, #0
	bne	.L30
	mov	r0, r6
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L30:
	mov	r0, r5
	bl	netif_wake_queue
	mov	r0, r6
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L9:
	mov	r8, r6
	str	r6, [sp, #4]
	str	r6, [sp, #12]
	b	.L2
.L32:
	.align	2
.L31:
	.word	AVE_STS_OWN
	.word	AVE_STS_LAST
	.word	AVE_STS_OK
	.word	AVE_STS_PKTLEN_TX_MASK
	.word	DMA_TO_DEVICE
	.word	AVE_DESCID_TX
	.word	AVE_STS_OWC
	.word	AVE_STS_EC
	.size	ave_tx_complete, .-ave_tx_complete
	.comm	DMA_TO_DEVICE,4,4
	.comm	AVE_STS_PKTLEN_TX_MASK,4,4
	.comm	AVE_STS_OWN,4,4
	.comm	AVE_STS_OWC,4,4
	.comm	AVE_STS_OK,4,4
	.comm	AVE_STS_LAST,4,4
	.comm	AVE_STS_EC,4,4
	.comm	AVE_DESCID_TX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
