	.file	"extr_horizon.c_tx_schedule.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"(pio)"
.LC1:
	.string	"(simple or last multi)"
.LC2:
	.string	"(continuing multi)"
.LC3:
	.string	"(full region)"
.LC4:
	.string	"(start multi region)"
	.text
	.p2align 4
	.type	tx_schedule, @function
tx_schedule:
.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
	lea	r14, 32[rdi]
	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
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L44:
	mov	rdx, QWORD PTR 24[rbx]
	sub	eax, 1
	mov	edi, DWORD PTR ultra[rip]
	mov	rsi, r14
	mov	ecx, DWORD PTR [rdx]
	mov	ebp, DWORD PTR 4[rdx]
	add	rdx, 8
	mov	DWORD PTR 4[rbx], eax
	mov	QWORD PTR 24[rbx], rdx
	mov	DWORD PTR 8[rbx], ecx
	call	test_bit@PLT
	test	eax, eax
	je	.L10
	cmp	DWORD PTR MAX_PIO_COUNT[rip], ebp
	jb	.L11
.L10:
	mov	edi, DWORD PTR DBG_TX[rip]
	lea	rsi, .LC0[rip]
	or	edi, DWORD PTR DBG_BUS[rip]
	call	PRINTD@PLT
.L11:
	mov	edi, DWORD PTR DBG_BUS[rip]
	or	edi, DWORD PTR DBG_TX[rip]
	cmp	DWORD PTR MAX_TRANSFER_COUNT[rip], ebp
	jb	.L12
	lea	rsi, .LC3[rip]
	mov	r15d, ebp
	call	PRINTD@PLT
	mov	DWORD PTR [rbx], 0
.L8:
	test	r15d, r15d
	je	.L13
	test	r12d, r12d
	jne	.L41
.L14:
	mov	edx, DWORD PTR 8[rbx]
	mov	esi, DWORD PTR DATA_PORT_OFF[rip]
	mov	ecx, r15d
	mov	rdi, rbx
	call	wrs_regb@PLT
	test	r13d, r13d
	jne	.L42
.L15:
	add	DWORD PTR 8[rbx], r15d
.L16:
	xor	r12d, r12d
.L2:
	mov	ebp, DWORD PTR [rbx]
	test	ebp, ebp
	jne	.L43
	mov	eax, DWORD PTR 4[rbx]
	test	eax, eax
	jne	.L44
	mov	rbp, QWORD PTR 16[rbx]
	mov	QWORD PTR 24[rbx], 0
	mov	rdi, rbp
	call	ATM_SKB@PLT
	mov	rax, QWORD PTR [rax]
	mov	rdi, QWORD PTR [rax]
	call	atomic_inc@PLT
	mov	rdi, rbp
	call	hrz_kfree_skb@PLT
.L13:
	test	r12d, r12d
	jne	.L45
.L17:
	mov	rdi, rbx
	call	YELLOW_LED_ON@PLT
	mov	rdi, rbx
	call	tx_release@PLT
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L43:
	mov	edi, DWORD PTR ultra[rip]
	mov	rsi, r14
	call	test_bit@PLT
	test	eax, eax
	je	.L3
	cmp	DWORD PTR MAX_PIO_COUNT[rip], ebp
	jb	.L4
.L3:
	mov	edi, DWORD PTR DBG_TX[rip]
	lea	rsi, .LC0[rip]
	or	edi, DWORD PTR DBG_BUS[rip]
	call	PRINTD@PLT
.L4:
	mov	edi, DWORD PTR DBG_BUS[rip]
	or	edi, DWORD PTR DBG_TX[rip]
	cmp	DWORD PTR MAX_TRANSFER_COUNT[rip], ebp
	jb	.L5
	lea	rsi, .LC1[rip]
	mov	r15d, ebp
	call	PRINTD@PLT
	cmp	QWORD PTR 24[rbx], 0
	mov	eax, 1
	mov	DWORD PTR [rbx], 0
	cmove	r13d, eax
	test	r12d, r12d
	je	.L14
.L41:
	mov	esi, DWORD PTR MASTER_TX_COUNT_REG_OFF[rip]
	xor	edx, edx
	mov	rdi, rbx
	call	wr_regl@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L12:
	lea	rsi, .LC4[rip]
	call	PRINTD@PLT
	mov	r15d, DWORD PTR MAX_TRANSFER_COUNT[rip]
	sub	ebp, r15d
	mov	DWORD PTR [rbx], ebp
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L42:
	mov	rax, QWORD PTR 16[rbx]
	mov	edi, DWORD PTR [rax]
	call	cpu_to_be32@PLT
	mov	esi, DWORD PTR TX_DESCRIPTOR_PORT_OFF[rip]
	mov	rdi, rbx
	mov	edx, eax
	call	wr_regl@PLT
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L45:
	mov	esi, DWORD PTR MASTER_TX_COUNT_REG_OFF[rip]
	xor	edx, edx
	mov	rdi, rbx
	call	wr_regl@PLT
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L5:
	lea	rsi, .LC2[rip]
	call	PRINTD@PLT
	mov	r15d, DWORD PTR MAX_TRANSFER_COUNT[rip]
	sub	ebp, r15d
	mov	DWORD PTR [rbx], ebp
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	tx_schedule, .-tx_schedule
	.comm	ultra,4,4
	.comm	spin_count,4,4
	.comm	TX_DESCRIPTOR_REG_OFF,4,4
	.comm	TX_DESCRIPTOR_PORT_OFF,4,4
	.comm	MAX_TRANSFER_COUNT,4,4
	.comm	MAX_PIO_COUNT,4,4
	.comm	MASTER_TX_COUNT_REG_OFF,4,4
	.comm	MASTER_TX_AUTO_APPEND_DESC,4,4
	.comm	MASTER_TX_ADDR_REG_OFF,4,4
	.comm	DBG_WARN,4,4
	.comm	DBG_TX,4,4
	.comm	DBG_ERR,4,4
	.comm	DBG_BUS,4,4
	.comm	DATA_PORT_OFF,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_horizon.c_tx_schedule.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"(pio)\000"
	.align	2
.LC1:
	.ascii	"(simple or last multi)\000"
	.align	2
.LC2:
	.ascii	"(continuing multi)\000"
	.align	2
.LC3:
	.ascii	"(full region)\000"
	.align	2
.LC4:
	.ascii	"(start multi region)\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tx_schedule, %function
tx_schedule:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #12
	mov	r4, r0
	mov	r5, r1
	ldr	r8, .L46
	ldr	r7, .L46+4
	ldr	r9, .L46+8
	str	r3, [sp, #4]
	add	r10, r0, #20
	b	.L2
.L44:
	ldr	r2, [r4, #16]
	sub	r3, r3, #1
	ldr	r0, [r2]
	ldr	r6, [r2, #4]
	str	r3, [r4, #4]
	ldr	r3, .L46+12
	add	r1, r2, #8
	str	r0, [r4, #8]
	str	r1, [r4, #16]
	ldr	r0, [r3]
	mov	r1, r10
	bl	test_bit
	cmp	r0, #0
	beq	.L10
	ldr	r3, .L46+16
	ldr	r3, [r3]
	cmp	r3, r6
	bcc	.L11
.L10:
	ldr	r0, [r8]
	ldr	r3, [r7]
	ldr	r1, .L46+20
	orr	r0, r0, r3
	bl	PRINTD
.L11:
	ldr	r2, [r9]
	ldr	r0, [r7]
	ldr	r3, [r8]
	cmp	r2, r6
	orr	r0, r0, r3
	bcc	.L12
	ldr	r1, .L46+24
	bl	PRINTD
	mov	r3, #0
	mov	fp, r6
	str	r3, [r4]
.L8:
	cmp	fp, #0
	beq	.L13
	cmp	r5, #0
	bne	.L41
.L14:
	ldr	r1, .L46+28
	mov	r3, fp
	mov	r0, r4
	ldr	r2, [r4, #8]
	ldr	r1, [r1]
	bl	wrs_regb
	ldr	r3, [sp, #4]
	cmp	r3, #0
	bne	.L42
.L15:
	ldr	r2, [r4, #8]
	add	r3, r2, fp
	str	r3, [r4, #8]
.L16:
	mov	r5, #0
.L2:
	ldr	r6, [r4]
	cmp	r6, #0
	bne	.L43
	ldr	r3, [r4, #4]
	cmp	r3, #0
	bne	.L44
	ldr	r6, [r4, #12]
	str	r3, [r4, #16]
	mov	r0, r6
	bl	ATM_SKB
	ldr	r3, [r0]
	ldr	r0, [r3]
	bl	atomic_inc
	mov	r0, r6
	bl	hrz_kfree_skb
.L13:
	cmp	r5, #0
	bne	.L45
.L17:
	mov	r0, r4
	bl	YELLOW_LED_ON
	mov	r0, r4
	bl	tx_release
	b	.L16
.L43:
	ldr	r3, .L46+12
	mov	r1, r10
	ldr	r0, [r3]
	bl	test_bit
	cmp	r0, #0
	beq	.L3
	ldr	r3, .L46+16
	ldr	r3, [r3]
	cmp	r3, r6
	bcc	.L4
.L3:
	ldr	r0, [r8]
	ldr	r3, [r7]
	ldr	r1, .L46+20
	orr	r0, r0, r3
	bl	PRINTD
.L4:
	ldr	r2, [r9]
	ldr	r0, [r7]
	ldr	r3, [r8]
	cmp	r2, r6
	orr	r0, r0, r3
	bcc	.L5
	ldr	r1, .L46+32
	bl	PRINTD
	mov	r3, #0
	ldr	r2, [r4, #16]
	str	r3, [r4]
	cmp	r2, #0
	ldr	r3, [sp, #4]
	moveq	r3, #1
	cmp	r5, #0
	mov	fp, r6
	str	r3, [sp, #4]
	beq	.L14
.L41:
	ldr	r3, .L46+36
	mov	r2, #0
	mov	r0, r4
	ldr	r1, [r3]
	bl	wr_regl
	b	.L14
.L12:
	ldr	r1, .L46+40
	bl	PRINTD
	ldr	fp, [r9]
	sub	r6, r6, fp
	str	r6, [r4]
	b	.L8
.L42:
	ldr	r2, [r4, #12]
	ldr	r3, .L46+44
	ldr	r0, [r2]
	ldr	r5, [r3]
	bl	cpu_to_be32
	mov	r1, r5
	mov	r2, r0
	mov	r0, r4
	bl	wr_regl
	b	.L15
.L45:
	ldr	r3, .L46+36
	mov	r2, #0
	mov	r0, r4
	ldr	r1, [r3]
	bl	wr_regl
	b	.L17
.L5:
	ldr	r1, .L46+48
	bl	PRINTD
	ldr	fp, [r9]
	sub	r6, r6, fp
	str	r6, [r4]
	b	.L8
.L47:
	.align	2
.L46:
	.word	DBG_TX
	.word	DBG_BUS
	.word	MAX_TRANSFER_COUNT
	.word	ultra
	.word	MAX_PIO_COUNT
	.word	.LC0
	.word	.LC3
	.word	DATA_PORT_OFF
	.word	.LC1
	.word	MASTER_TX_COUNT_REG_OFF
	.word	.LC4
	.word	TX_DESCRIPTOR_PORT_OFF
	.word	.LC2
	.size	tx_schedule, .-tx_schedule
	.comm	ultra,4,4
	.comm	spin_count,4,4
	.comm	TX_DESCRIPTOR_REG_OFF,4,4
	.comm	TX_DESCRIPTOR_PORT_OFF,4,4
	.comm	MAX_TRANSFER_COUNT,4,4
	.comm	MAX_PIO_COUNT,4,4
	.comm	MASTER_TX_COUNT_REG_OFF,4,4
	.comm	MASTER_TX_AUTO_APPEND_DESC,4,4
	.comm	MASTER_TX_ADDR_REG_OFF,4,4
	.comm	DBG_WARN,4,4
	.comm	DBG_TX,4,4
	.comm	DBG_ERR,4,4
	.comm	DBG_BUS,4,4
	.comm	DATA_PORT_OFF,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
