	.file	"extr_hw_atl_b0.c_hw_atl_b0_hw_ring_tx_xmit.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	hw_atl_b0_hw_ring_tx_xmit, @function
hw_atl_b0_hw_ring_tx_xmit:
.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
	mov	r14, rsi
	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
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR 8[rsi]
	mov	rsi, QWORD PTR [rsi]
	mov	DWORD PTR 4[rsp], edx
	lea	rdx, [rsi+rsi*2]
	mov	QWORD PTR 8[rsp], rdi
	lea	rdx, [rsi+rdx*4]
	lea	rdx, [rax+rdx*8]
	cmp	QWORD PTR 32[rdx], 0
	je	.L2
	cmp	QWORD PTR 96[rdx], 0
	jne	.L33
.L2:
	mov	ebp, DWORD PTR 4[rdx]
.L5:
	mov	edx, DWORD PTR 4[rsp]
	xor	r13d, r13d
	xor	r12d, r12d
	xor	r15d, r15d
	test	edx, edx
	jne	.L3
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L34:
	mov	edi, DWORD PTR 8[rax]
	mov	r11d, DWORD PTR HW_ATL_B0_TXD_CTL_DESC_TYPE_TXC[rip]
	mov	ecx, DWORD PTR HW_ATL_B0_TXD_CTL_CMD_TCP[rip]
	mov	r13d, DWORD PTR 12[rax]
	mov	edx, edi
	mov	r9d, DWORD PTR 16[rax]
	sal	edx, 31
	or	ecx, r11d
	or	ecx, edx
	mov	edx, r13d
	sal	r9d, 16
	sal	edx, 24
	or	ecx, edx
	mov	edx, DWORD PTR 20[rax]
	mov	DWORD PTR [rbx], ecx
	lea	r10d, [rdi+rdx]
	add	r10d, r13d
	sub	ebp, r10d
	cmp	QWORD PTR 88[rax], 0
	je	.L7
	or	ecx, DWORD PTR HW_ATL_B0_TXD_CTL_CMD_IPV6[rip]
	mov	DWORD PTR [rbx], ecx
.L7:
	sal	edx, 8
	sar	edi
	mov	r13d, 1
	or	r9d, edx
	or	edi, r9d
	mov	DWORD PTR 4[rbx], edi
	test	r8, r8
	je	.L8
	mov	edx, DWORD PTR [rbx]
.L18:
	mov	eax, DWORD PTR 24[rax]
	or	r11d, edx
	mov	r12d, 1
	sal	eax, 4
	or	r11d, eax
	mov	DWORD PTR [rbx], r11d
.L8:
	mov	rdi, r14
	add	r15d, 1
	call	aq_ring_next_dx@PLT
	mov	QWORD PTR [r14], rax
	mov	rsi, rax
	cmp	DWORD PTR 4[rsp], r15d
	je	.L4
	mov	rax, QWORD PTR 8[r14]
.L3:
	mov	rcx, QWORD PTR HW_ATL_B0_TXD_SIZE[rip]
	mov	rdx, QWORD PTR 16[r14]
	imul	rcx, rsi
	lea	rbx, [rdx+rcx*4]
	lea	rdx, [rsi+rsi*2]
	lea	rdx, [rsi+rdx*4]
	mov	QWORD PTR [rbx], 0
	lea	rax, [rax+rdx*8]
	mov	QWORD PTR 8[rbx], 0
	cmp	QWORD PTR 80[rax], 0
	mov	r8, QWORD PTR 72[rax]
	jne	.L34
	test	r8, r8
	je	.L17
	mov	r11d, DWORD PTR HW_ATL_B0_TXD_CTL_DESC_TYPE_TXC[rip]
	xor	edx, edx
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rcx, QWORD PTR 64[rax]
	mov	edx, DWORD PTR [rax]
	mov	edi, r12d
	mov	QWORD PTR 8[rbx], rcx
	mov	ecx, ebp
	sal	edx, 4
	and	edx, DWORD PTR HW_ATL_B0_TXD_CTL_BLEN[rip]
	sal	ecx, 14
	or	edx, DWORD PTR HW_ATL_B0_TXD_CTL_DESC_TYPE_TXD[rip]
	and	ecx, DWORD PTR HW_ATL_B0_TXD_CTL2_LEN[rip]
	or	edi, r13d
	mov	DWORD PTR [rbx], edx
	mov	DWORD PTR 4[rbx], ecx
	je	.L10
	or	ecx, DWORD PTR HW_ATL_B0_TXD_CTL2_CTX_EN[rip]
	mov	DWORD PTR 4[rbx], ecx
	test	r13d, r13d
	je	.L10
	or	edx, DWORD PTR HW_ATL_B0_TXD_CTL_CMD_LSO[rip]
	mov	DWORD PTR [rbx], edx
.L10:
	cmp	QWORD PTR 56[rax], 0
	je	.L12
	mov	edx, DWORD PTR HW_ATL_B0_TXD_CTL_CMD_IPCSO[rip]
	or	DWORD PTR [rbx], edx
.L12:
	cmp	QWORD PTR 48[rax], 0
	jne	.L13
	cmp	QWORD PTR 40[rax], 0
	je	.L14
.L13:
	mov	edx, DWORD PTR HW_ATL_B0_TXD_CTL_CMD_TUCSO[rip]
	or	DWORD PTR [rbx], edx
.L14:
	test	r12d, r12d
	je	.L15
	mov	edx, DWORD PTR HW_ATL_B0_TXD_CTL_CMD_VLAN[rip]
	or	DWORD PTR [rbx], edx
.L15:
	mov	rdi, QWORD PTR 32[rax]
	call	unlikely@PLT
	test	rax, rax
	jne	.L16
	mov	rsi, QWORD PTR [r14]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L16:
	mov	eax, DWORD PTR HW_ATL_B0_TXD_CTL_EOP[rip]
	mov	rsi, QWORD PTR [r14]
	xor	r13d, r13d
	xor	r12d, r12d
	or	eax, DWORD PTR HW_ATL_B0_TXD_CTL_CMD_WB[rip]
	or	DWORD PTR [rbx], eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rbx, QWORD PTR 8[rsp]
	mov	rsi, r14
	mov	rdi, rbx
	call	hw_atl_b0_hw_tx_ring_tail_update@PLT
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdi, rbx
	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
	jmp	aq_hw_err_from_flags@PLT
	.p2align 4,,10
	.p2align 3
.L33:
	.cfi_restore_state
	mov	ebp, DWORD PTR [rdx]
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	hw_atl_b0_hw_ring_tx_xmit, .-hw_atl_b0_hw_ring_tx_xmit
	.comm	HW_ATL_B0_TXD_SIZE,8,8
	.comm	HW_ATL_B0_TXD_CTL_EOP,4,4
	.comm	HW_ATL_B0_TXD_CTL_DESC_TYPE_TXD,4,4
	.comm	HW_ATL_B0_TXD_CTL_DESC_TYPE_TXC,4,4
	.comm	HW_ATL_B0_TXD_CTL_CMD_WB,4,4
	.comm	HW_ATL_B0_TXD_CTL_CMD_VLAN,4,4
	.comm	HW_ATL_B0_TXD_CTL_CMD_TUCSO,4,4
	.comm	HW_ATL_B0_TXD_CTL_CMD_TCP,4,4
	.comm	HW_ATL_B0_TXD_CTL_CMD_LSO,4,4
	.comm	HW_ATL_B0_TXD_CTL_CMD_IPV6,4,4
	.comm	HW_ATL_B0_TXD_CTL_CMD_IPCSO,4,4
	.comm	HW_ATL_B0_TXD_CTL_BLEN,4,4
	.comm	HW_ATL_B0_TXD_CTL2_LEN,4,4
	.comm	HW_ATL_B0_TXD_CTL2_CTX_EN,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_hw_atl_b0.c_hw_atl_b0_hw_ring_tx_xmit.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hw_atl_b0_hw_ring_tx_xmit, %function
hw_atl_b0_hw_ring_tx_xmit:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #28
	mov	r6, r1
	ldm	r1, {r1, r3}
	str	r0, [sp, #20]
	add	r0, r3, r1, lsl #6
	ldr	ip, [r0, #28]
	str	r2, [sp, #4]
	cmp	ip, #0
	lsl	r2, r1, #6
	beq	.L2
	ldr	ip, [r0, #60]
	cmp	ip, #0
	bne	.L46
.L2:
	ldr	r0, [r0, #4]
	str	r0, [sp]
.L5:
	ldr	r0, [sp, #4]
	cmp	r0, #0
	beq	.L4
	mov	r8, #0
	ldr	fp, .L48
	mov	r10, r8
	str	r8, [sp, #8]
	b	.L3
.L47:
	ldr	ip, .L48+4
	ldr	r2, .L48+8
	ldr	r9, [ip]
	ldr	r2, [r2]
	ldr	r7, [r3, #8]
	ldr	r8, [r3, #20]
	ldr	ip, [r3, #12]
	orr	r2, r9, r2
	str	r8, [sp, #12]
	orr	r2, r2, r7, lsl #31
	add	r8, r7, r8
	add	r8, r8, ip
	orr	r2, r2, ip, lsl #24
	ldr	ip, [r3, #16]
	str	ip, [sp, #16]
	ldr	ip, [r3, #56]
	str	r2, [r5, r4, lsl #2]
	cmp	ip, #0
	ldr	ip, [sp]
	sub	ip, ip, r8
	ldrne	r8, .L48+12
	str	ip, [sp]
	ldrne	r8, [r8]
	ldr	ip, [sp, #16]
	orrne	r2, r8, r2
	strne	r2, [r5, r4, lsl #2]
	ldr	r2, [sp, #12]
	lsl	ip, ip, #16
	orr	ip, ip, r2, lsl #8
	orr	ip, ip, r7, asr #1
	cmp	lr, #0
	mov	r8, #1
	str	ip, [r0, #4]
	beq	.L8
	ldr	r2, [r5, r4, lsl #2]
.L18:
	ldr	r3, [r3, #24]
	orr	r9, r9, r2
	orr	r9, r9, r3, lsl #4
	mov	r3, #1
	str	r9, [r5, r4, lsl #2]
	str	r3, [sp, #8]
.L8:
	mov	r0, r6
	bl	aq_ring_next_dx
	ldr	r3, [sp, #4]
	add	r10, r10, #1
	cmp	r3, r10
	mov	r1, r0
	str	r0, [r6]
	beq	.L4
	ldr	r3, [r6, #4]
	lsl	r2, r0, #6
.L3:
	mov	ip, #0
	ldr	r4, [fp]
	add	r3, r3, r2
	mul	r4, r1, r4
	ldr	r5, [r6, #8]
	ldr	r2, [r3, #52]
	add	r0, r5, r4, lsl #2
	cmp	r2, ip
	str	ip, [r5, r4, lsl #2]
	ldr	lr, [r3, #48]
	str	ip, [r0, #4]
	str	ip, [r0, #8]
	bne	.L47
	cmp	lr, #0
	ldrne	r0, .L48+4
	ldrne	r9, [r0]
	bne	.L18
.L17:
	ldr	r2, .L48+16
	ldr	r1, [r3]
	ldr	r2, [r2]
	ldr	ip, .L48+20
	ldr	lr, [sp, #8]
	and	r2, r2, r1, lsl #4
	ldr	r1, .L48+24
	ldr	ip, [ip]
	ldr	r1, [r1]
	orrs	lr, lr, r8
	ldr	lr, [sp]
	orr	r2, r2, ip
	ldr	ip, [r3, #44]
	and	r1, r1, lr, lsl #14
	str	ip, [r0, #8]
	str	r2, [r5, r4, lsl #2]
	str	r1, [r0, #4]
	beq	.L10
	ldr	ip, .L48+28
	cmp	r8, #0
	ldr	ip, [ip]
	orr	r1, ip, r1
	str	r1, [r0, #4]
	ldrne	r1, .L48+32
	ldrne	r1, [r1]
	orrne	r2, r1, r2
	strne	r2, [r5, r4, lsl #2]
.L10:
	ldr	r2, [r3, #40]
	cmp	r2, #0
	ldrne	r1, .L48+36
	ldrne	r2, [r5, r4, lsl #2]
	ldrne	r1, [r1]
	orrne	r2, r2, r1
	strne	r2, [r5, r4, lsl #2]
	ldr	r2, [r3, #36]
	cmp	r2, #0
	bne	.L13
	ldr	r2, [r3, #32]
	cmp	r2, #0
	beq	.L14
.L13:
	ldr	r1, .L48+40
	ldr	r2, [r5, r4, lsl #2]
	ldr	r1, [r1]
	orr	r2, r2, r1
	str	r2, [r5, r4, lsl #2]
.L14:
	ldr	r2, [sp, #8]
	ldr	r0, [r3, #28]
	cmp	r2, #0
	ldrne	r1, .L48+44
	ldrne	r2, [r5, r4, lsl #2]
	ldrne	r1, [r1]
	orrne	r2, r2, r1
	strne	r2, [r5, r4, lsl #2]
	bl	unlikely
	cmp	r0, #0
	movne	r8, #0
	ldrne	r3, .L48+48
	strne	r8, [sp, #8]
	ldrne	r2, [r3]
	ldrne	r3, .L48+52
	ldrne	r1, [r3]
	ldrne	r3, [r5, r4, lsl #2]
	orrne	r2, r2, r1
	orrne	r3, r3, r2
	ldr	r1, [r6]
	strne	r3, [r5, r4, lsl #2]
	b	.L8
.L4:
	ldr	r4, [sp, #20]
	mov	r1, r6
	mov	r0, r4
	bl	hw_atl_b0_hw_tx_ring_tail_update
	mov	r0, r4
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	aq_hw_err_from_flags
.L46:
	ldr	r0, [r0]
	str	r0, [sp]
	b	.L5
.L49:
	.align	2
.L48:
	.word	HW_ATL_B0_TXD_SIZE
	.word	HW_ATL_B0_TXD_CTL_DESC_TYPE_TXC
	.word	HW_ATL_B0_TXD_CTL_CMD_TCP
	.word	HW_ATL_B0_TXD_CTL_CMD_IPV6
	.word	HW_ATL_B0_TXD_CTL_BLEN
	.word	HW_ATL_B0_TXD_CTL_DESC_TYPE_TXD
	.word	HW_ATL_B0_TXD_CTL2_LEN
	.word	HW_ATL_B0_TXD_CTL2_CTX_EN
	.word	HW_ATL_B0_TXD_CTL_CMD_LSO
	.word	HW_ATL_B0_TXD_CTL_CMD_IPCSO
	.word	HW_ATL_B0_TXD_CTL_CMD_TUCSO
	.word	HW_ATL_B0_TXD_CTL_CMD_VLAN
	.word	HW_ATL_B0_TXD_CTL_EOP
	.word	HW_ATL_B0_TXD_CTL_CMD_WB
	.size	hw_atl_b0_hw_ring_tx_xmit, .-hw_atl_b0_hw_ring_tx_xmit
	.comm	HW_ATL_B0_TXD_SIZE,4,4
	.comm	HW_ATL_B0_TXD_CTL_EOP,4,4
	.comm	HW_ATL_B0_TXD_CTL_DESC_TYPE_TXD,4,4
	.comm	HW_ATL_B0_TXD_CTL_DESC_TYPE_TXC,4,4
	.comm	HW_ATL_B0_TXD_CTL_CMD_WB,4,4
	.comm	HW_ATL_B0_TXD_CTL_CMD_VLAN,4,4
	.comm	HW_ATL_B0_TXD_CTL_CMD_TUCSO,4,4
	.comm	HW_ATL_B0_TXD_CTL_CMD_TCP,4,4
	.comm	HW_ATL_B0_TXD_CTL_CMD_LSO,4,4
	.comm	HW_ATL_B0_TXD_CTL_CMD_IPV6,4,4
	.comm	HW_ATL_B0_TXD_CTL_CMD_IPCSO,4,4
	.comm	HW_ATL_B0_TXD_CTL_BLEN,4,4
	.comm	HW_ATL_B0_TXD_CTL2_LEN,4,4
	.comm	HW_ATL_B0_TXD_CTL2_CTX_EN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
