	.file	"extr_mtk_eth_soc.c_fe_poll_tx.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	fe_poll_tx, @function
fe_poll_tx:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	xor	r13d, r13d
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xor	r12d, r12d
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, esi
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rbp, QWORD PTR 24[rdi]
	mov	r14, QWORD PTR [rdi]
	mov	edi, DWORD PTR FE_REG_TX_DTX_IDX0[rip]
	mov	QWORD PTR 24[rsp], rdx
	mov	QWORD PTR 16[rsp], rcx
	call	fe_reg_r32@PLT
	mov	QWORD PTR 8[rsp], rax
	test	ebx, ebx
	je	.L2
	cmp	r14, rax
	jne	.L5
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L32:
	cmp	rax, QWORD PTR DMA_DUMMY_DESC[rip]
	je	.L4
	add	r13d, DWORD PTR [rax]
	add	r12d, 1
	sub	ebx, 1
.L4:
	mov	rdi, rbp
	call	fe_txd_unmap@PLT
	mov	rdi, r14
	call	NEXT_TX_DESP_IDX@PLT
	mov	r14, rax
	cmp	QWORD PTR 8[rsp], rax
	je	.L2
	test	ebx, ebx
	je	.L2
.L5:
	mov	rax, QWORD PTR 16[r15]
	lea	rsi, [rax+r14*8]
	mov	rax, QWORD PTR [rsi]
	test	rax, rax
	jne	.L32
	mov	QWORD PTR [r15], r14
.L7:
	mov	rax, QWORD PTR 16[rsp]
	mov	DWORD PTR [rax], 1
.L9:
	test	r12d, r12d
	jne	.L33
.L1:
	add	rsp, 40
	.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
.L2:
	.cfi_restore_state
	mov	QWORD PTR [r15], r14
	cmp	QWORD PTR 8[rsp], r14
	jne	.L7
	mov	edi, DWORD PTR FE_REG_TX_DTX_IDX0[rip]
	call	fe_reg_r32@PLT
	cmp	rax, QWORD PTR 8[rsp]
	jne	.L7
	mov	esi, DWORD PTR FE_REG_FE_INT_STATUS[rip]
	mov	rdi, QWORD PTR 24[rsp]
	call	fe_reg_w32@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L33:
	mov	edx, r13d
	mov	esi, r12d
	mov	rdi, rbp
	call	netdev_completed_queue@PLT
	xor	eax, eax
	call	smp_mb@PLT
	mov	rdi, rbp
	call	netif_queue_stopped@PLT
	xor	edi, edi
	test	rax, rax
	jne	.L34
.L12:
	call	unlikely@PLT
	test	rax, rax
	je	.L1
	mov	rdi, rbp
	call	netif_wake_queue@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L34:
	mov	rdi, r15
	call	fe_empty_txd@PLT
	xor	edi, edi
	cmp	rax, QWORD PTR 8[r15]
	setg	dil
	jmp	.L12
	.cfi_endproc
.LFE0:
	.size	fe_poll_tx, .-fe_poll_tx
	.comm	FE_REG_TX_DTX_IDX0,4,4
	.comm	FE_REG_FE_INT_STATUS,4,4
	.comm	DMA_DUMMY_DESC,8,8
	.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_mtk_eth_soc.c_fe_poll_tx.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fe_poll_tx, %function
fe_poll_tx:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r0
	mov	fp, r1
	ldr	r1, .L26
	sub	sp, sp, #12
	ldr	r0, [r1]
	ldr	r4, [r6]
	ldr	r9, [r6, #12]
	str	r2, [sp, #4]
	str	r3, [sp]
	bl	fe_reg_r32
	subs	r5, r4, r0
	movne	r5, #1
	cmp	fp, #0
	moveq	r5, #0
	cmp	r5, #0
	mov	r7, r0
	beq	.L13
	mov	r5, #0
	ldr	r10, .L26+4
	mov	r8, r5
	b	.L5
.L23:
	ldr	r2, [r10]
	mov	r0, r9
	cmp	r3, r2
	ldrne	r3, [r3]
	addne	r5, r5, #1
	addne	r8, r8, r3
	subne	fp, fp, #1
	bl	fe_txd_unmap
	mov	r0, r4
	bl	NEXT_TX_DESP_IDX
	cmp	r7, r0
	cmpne	fp, #0
	mov	r4, r0
	beq	.L2
.L5:
	ldr	r1, [r6, #8]
	ldr	r3, [r1, r4, lsl #2]
	add	r1, r1, r4, lsl #2
	cmp	r3, #0
	bne	.L23
	str	r4, [r6]
.L6:
	mov	r3, #1
	ldr	r2, [sp]
	str	r3, [r2]
.L8:
	cmp	r5, #0
	bne	.L24
.L1:
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	mov	r8, r5
.L2:
	cmp	r7, r4
	str	r4, [r6]
	bne	.L6
	ldr	r3, .L26
	ldr	r0, [r3]
	bl	fe_reg_r32
	cmp	r0, r7
	bne	.L6
	ldr	r3, .L26+8
	ldr	r0, [sp, #4]
	ldr	r1, [r3]
	bl	fe_reg_w32
	b	.L8
.L24:
	mov	r2, r8
	mov	r1, r5
	mov	r0, r9
	bl	netdev_completed_queue
	bl	smp_mb
	mov	r0, r9
	bl	netif_queue_stopped
	cmp	r0, #0
	bne	.L25
.L11:
	bl	unlikely
	cmp	r0, #0
	beq	.L1
	mov	r0, r9
	bl	netif_wake_queue
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L25:
	mov	r0, r6
	bl	fe_empty_txd
	ldr	r3, [r6, #4]
	cmp	r0, r3
	movle	r0, #0
	movgt	r0, #1
	b	.L11
.L27:
	.align	2
.L26:
	.word	FE_REG_TX_DTX_IDX0
	.word	DMA_DUMMY_DESC
	.word	FE_REG_FE_INT_STATUS
	.size	fe_poll_tx, .-fe_poll_tx
	.comm	FE_REG_TX_DTX_IDX0,4,4
	.comm	FE_REG_FE_INT_STATUS,4,4
	.comm	DMA_DUMMY_DESC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
