	.file	"extr_atl1.c_atl1_tx_queue.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	atl1_tx_queue, @function
atl1_tx_queue:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	lea	rax, 8[rdi]
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdx
	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
	mov	rdi, rax
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	QWORD PTR 8[rsp], rsi
	mov	QWORD PTR 24[rsp], rax
	call	atomic_read@PLT
	movsx	r15, eax
	test	rbx, rbx
	jle	.L2
	lea	rax, -1[rbx]
	xor	ebx, ebx
	mov	QWORD PTR 16[rsp], rax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	mov	ecx, DWORD PTR TPD_HDRFLAG_SHIFT[rip]
	mov	edx, 1
	sal	edx, cl
	not	edx
	and	eax, edx
	mov	DWORD PTR 4[r14], eax
.L4:
	cmp	rbx, QWORD PTR 16[rsp]
	jne	.L6
	mov	ecx, DWORD PTR TPD_EOP_SHIFT[rip]
	mov	eax, 1
	sal	eax, cl
	or	DWORD PTR 4[r14], eax
.L6:
	add	r15, 1
	mov	eax, 0
	cmp	QWORD PTR 0[rbp], r15
	cmove	r15, rax
	add	rbx, 1
	cmp	QWORD PTR 8[rsp], rbx
	je	.L2
.L8:
	mov	rax, QWORD PTR 16[rbp]
	mov	rsi, r15
	mov	rdi, rbp
	lea	r12, [rax+r15*8]
	call	ATL1_TPD_DESC@PLT
	mov	r14, rax
	cmp	rax, r13
	je	.L3
	mov	edx, 12
	mov	rsi, r13
	mov	rdi, rax
	call	memcpy@PLT
.L3:
	mov	edi, DWORD PTR 4[r12]
	call	cpu_to_le64@PLT
	mov	ecx, DWORD PTR TPD_BUFLEN_SHIFT[rip]
	mov	edi, DWORD PTR [r12]
	mov	DWORD PTR 8[r14], eax
	mov	eax, DWORD PTR TPD_BUFLEN_MASK[rip]
	sal	eax, cl
	not	eax
	and	DWORD PTR [r14], eax
	call	cpu_to_le16@PLT
	mov	ecx, DWORD PTR TPD_BUFLEN_SHIFT[rip]
	and	eax, DWORD PTR TPD_BUFLEN_MASK[rip]
	sal	eax, cl
	or	DWORD PTR [r14], eax
	mov	eax, DWORD PTR 4[r14]
	mov	ecx, DWORD PTR TPD_SEGMENT_EN_SHIFT[rip]
	mov	edx, eax
	sar	edx, cl
	test	DWORD PTR TPD_SEGMENT_EN_MASK[rip], edx
	je	.L4
	test	rbx, rbx
	jne	.L5
	mov	edx, DWORD PTR TPD_HDRFLAG_SHIFT[rip]
	bts	eax, edx
	mov	DWORD PTR 4[r14], eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	xor	eax, eax
	call	wmb@PLT
	mov	rdi, QWORD PTR 24[rsp]
	add	rsp, 40
	.cfi_def_cfa_offset 56
	mov	rsi, r15
	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	atomic_set@PLT
	.cfi_endproc
.LFE0:
	.size	atl1_tx_queue, .-atl1_tx_queue
	.comm	TPD_SEGMENT_EN_SHIFT,4,4
	.comm	TPD_SEGMENT_EN_MASK,4,4
	.comm	TPD_HDRFLAG_SHIFT,4,4
	.comm	TPD_EOP_SHIFT,4,4
	.comm	TPD_BUFLEN_SHIFT,4,4
	.comm	TPD_BUFLEN_MASK,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_atl1.c_atl1_tx_queue.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	atl1_tx_queue, %function
atl1_tx_queue:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r1
	sub	sp, sp, #20
	mov	r7, r0
	add	r0, r0, #4
	mov	fp, r2
	str	r0, [sp, #12]
	str	r1, [sp]
	bl	atomic_read
	cmp	r4, #0
	mov	r5, r0
	ble	.L2
	mov	r6, #0
	sub	r3, r4, #1
	ldr	r10, .L15
	ldr	r9, .L15+4
	str	r3, [sp, #4]
.L8:
	mov	r1, r5
	mov	r0, r7
	ldr	r8, [r7, #8]
	bl	ATL1_TPD_DESC
	lsl	r2, r5, #3
	cmp	r0, fp
	mov	r4, r0
	add	r3, r8, r5, lsl #3
	str	r2, [sp, #8]
	beq	.L3
	mov	r2, #12
	mov	r1, fp
	str	r3, [sp, #8]
	bl	memcpy
	ldr	r3, [sp, #8]
.L3:
	ldr	r0, [r3, #4]
	bl	cpu_to_le64
	ldr	r1, [r10]
	ldr	r2, [r9]
	ldr	r3, [r4]
	str	r0, [r4, #8]
	bic	r3, r3, r1, lsl r2
	lsl	r2, r5, #3
	ldr	r0, [r8, r2]
	str	r3, [r4]
	bl	cpu_to_le16
	ldr	r1, [r10]
	ldr	r3, [r4]
	ldr	ip, [r9]
	and	r0, r0, r1
	orr	r0, r3, r0, lsl ip
	ldr	r1, .L15+8
	ldr	r3, .L15+12
	ldr	r1, [r1]
	ldr	r3, [r3]
	ldr	r2, [r4, #4]
	str	r0, [r4]
	ands	r3, r3, r2, asr r1
	beq	.L4
	cmp	r6, #0
	moveq	r3, #1
	movne	r1, #1
	ldreq	r1, .L15+16
	ldrne	r3, .L15+16
	ldreq	r1, [r1]
	ldrne	r3, [r3]
	orreq	r2, r2, r3, lsl r1
	bicne	r2, r2, r1, lsl r3
	str	r2, [r4, #4]
.L4:
	ldr	r3, [sp, #4]
	add	r5, r5, #1
	cmp	r6, r3
	add	r6, r6, #1
	bne	.L6
	mov	r1, #1
	ldr	r3, .L15+20
	ldr	r2, [r3]
	ldr	r3, [r4, #4]
	orr	r3, r3, r1, lsl r2
	str	r3, [r4, #4]
.L6:
	ldr	r3, [r7]
	cmp	r3, r5
	ldr	r3, [sp]
	moveq	r5, #0
	cmp	r3, r6
	bne	.L8
.L2:
	bl	wmb
	mov	r1, r5
	ldr	r0, [sp, #12]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	atomic_set
.L16:
	.align	2
.L15:
	.word	TPD_BUFLEN_MASK
	.word	TPD_BUFLEN_SHIFT
	.word	TPD_SEGMENT_EN_SHIFT
	.word	TPD_SEGMENT_EN_MASK
	.word	TPD_HDRFLAG_SHIFT
	.word	TPD_EOP_SHIFT
	.size	atl1_tx_queue, .-atl1_tx_queue
	.comm	TPD_SEGMENT_EN_SHIFT,4,4
	.comm	TPD_SEGMENT_EN_MASK,4,4
	.comm	TPD_HDRFLAG_SHIFT,4,4
	.comm	TPD_EOP_SHIFT,4,4
	.comm	TPD_BUFLEN_SHIFT,4,4
	.comm	TPD_BUFLEN_MASK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
