	.file	"extr_r592.c_r592_transfer_fifo_pio.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	r592_transfer_fifo_pio, @function
r592_transfer_fifo_pio:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	add	rdi, 8
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rbx, QWORD PTR MS_TPC_SET_RW_REG_ADRS[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -8[rdi]
	mov	r12, QWORD PTR [rax]
	call	kfifo_reset@PLT
	mov	rax, QWORD PTR 0[rbp]
	mov	edx, DWORD PTR 20[rax]
	test	edx, edx
	jne	.L2
	mov	edx, DWORD PTR 12[rax]
	mov	esi, DWORD PTR 16[rax]
	mov	rdi, rbp
	cmp	r12, rbx
	jge	.L15
	call	r592_read_fifo_pio@PLT
.L4:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L16
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	call	r592_write_fifo_pio@PLT
	mov	rdi, rbp
	call	r592_flush_fifo_write@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	xor	edi, edi
	mov	r13, rsp
	call	local_irq_save@PLT
	mov	rax, QWORD PTR 0[rbp]
	cmp	r12, rbx
	mov	rdi, r13
	mov	ecx, DWORD PTR SG_MITER_FROM_SG[rip]
	mov	edx, 1
	cmovl	ecx, DWORD PTR SG_MITER_TO_SG[rip]
	lea	rsi, 8[rax]
	or	ecx, DWORD PTR SG_MITER_ATOMIC[rip]
	call	sg_miter_start@PLT
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rdi, r13
	call	sg_miter_next@PLT
	test	rax, rax
	je	.L17
.L10:
	mov	edx, DWORD PTR [rsp]
	mov	esi, DWORD PTR 4[rsp]
	mov	rdi, rbp
	cmp	r12, rbx
	jl	.L8
	call	r592_write_fifo_pio@PLT
	mov	rdi, r13
	call	sg_miter_next@PLT
	test	rax, rax
	jne	.L10
.L17:
	cmp	r12, rbx
	jge	.L18
.L11:
	mov	rdi, r13
	call	sg_miter_stop@PLT
	xor	edi, edi
	call	local_irq_restore@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L8:
	call	r592_read_fifo_pio@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rdi, rbp
	call	r592_flush_fifo_write@PLT
	jmp	.L11
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	r592_transfer_fifo_pio, .-r592_transfer_fifo_pio
	.comm	SG_MITER_TO_SG,4,4
	.comm	SG_MITER_FROM_SG,4,4
	.comm	SG_MITER_ATOMIC,4,4
	.comm	MS_TPC_SET_RW_REG_ADRS,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_r592.c_r592_transfer_fifo_pio.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	r592_transfer_fifo_pio, %function
r592_transfer_fifo_pio:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r3, .L19
	ldr	r2, [r0], #4
	ldr	r1, .L19+4
	sub	sp, sp, #16
	ldr	r6, [r2]
	ldr	r5, [r3]
	ldr	r1, [r1]
	str	r1, [sp, #12]
	mov	r1,#0
	bl	kfifo_reset
	ldr	r3, [r4]
	ldr	r2, [r3, #16]
	cmp	r2, #0
	bne	.L2
	cmp	r6, r5
	mov	r0, r4
	ldr	r1, [r3, #12]
	ldr	r2, [r3, #8]
	bge	.L15
	bl	r592_read_fifo_pio
.L4:
	ldr	r3, .L19+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L16
	mov	r0, #0
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, pc}
.L15:
	bl	r592_write_fifo_pio
	mov	r0, r4
	bl	r592_flush_fifo_write
	b	.L4
.L2:
	mov	r0, #0
	bl	local_irq_save
	cmp	r6, r5
	ldrge	r3, .L19+8
	ldrlt	r3, .L19+12
	ldr	r1, [r4]
	ldr	r2, [r3]
	ldr	r3, .L19+16
	add	r1, r1, #4
	ldr	r3, [r3]
	add	r0, sp, #4
	orr	r3, r2, r3
	mov	r2, #1
	bl	sg_miter_start
.L7:
	add	r0, sp, #4
	bl	sg_miter_next
	cmp	r0, #0
	beq	.L17
.L10:
	cmp	r6, r5
	mov	r0, r4
	ldr	r1, [sp, #8]
	ldr	r2, [sp, #4]
	blt	.L8
	bl	r592_write_fifo_pio
	add	r0, sp, #4
	bl	sg_miter_next
	cmp	r0, #0
	bne	.L10
.L17:
	cmp	r6, r5
	bge	.L18
.L11:
	add	r0, sp, #4
	bl	sg_miter_stop
	mov	r0, #0
	bl	local_irq_restore
	b	.L4
.L8:
	bl	r592_read_fifo_pio
	b	.L7
.L18:
	mov	r0, r4
	bl	r592_flush_fifo_write
	b	.L11
.L16:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	MS_TPC_SET_RW_REG_ADRS
	.word	.LC0
	.word	SG_MITER_FROM_SG
	.word	SG_MITER_TO_SG
	.word	SG_MITER_ATOMIC
	.size	r592_transfer_fifo_pio, .-r592_transfer_fifo_pio
	.comm	SG_MITER_TO_SG,4,4
	.comm	SG_MITER_FROM_SG,4,4
	.comm	SG_MITER_ATOMIC,4,4
	.comm	MS_TPC_SET_RW_REG_ADRS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
