	.file	"extr_r592.c_r592_read_fifo_pio.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	r592_read_fifo_pio, @function
r592_read_fifo_pio:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rsi
	sub	rsp, 32
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	kfifo_is_empty@PLT
	test	eax, eax
	je	.L2
.L6:
	mov	r13, rbx
	cmp	ebp, 3
	jle	.L4
	sub	ebp, 4
	mov	r14d, ebp
	shr	r14d, 2
	mov	eax, r14d
	lea	r13, 4[rbx+rax*4]
	.p2align 4,,10
	.p2align 3
.L7:
	mov	esi, DWORD PTR R592_FIFO_PIO[rip]
	mov	rdi, r12
	add	rbx, 4
	call	r592_read_reg_raw_be@PLT
	mov	DWORD PTR -4[rbx], eax
	cmp	rbx, r13
	jne	.L7
	mov	eax, r14d
	neg	eax
	lea	ebp, 0[rbp+rax*4]
.L4:
	test	ebp, ebp
	jne	.L19
.L8:
	mov	edi, ebp
	call	WARN_ON@PLT
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L20
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	esi, ebp
	mov	edi, 4
	call	min@PLT
	mov	rdi, r12
	mov	rsi, rbx
	mov	edx, eax
	call	kfifo_out@PLT
	mov	rdi, r12
	mov	r13d, eax
	call	kfifo_is_empty@PLT
	test	eax, eax
	je	.L1
	movsx	rax, r13d
	sub	ebp, r13d
	add	rbx, rax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L19:
	mov	esi, DWORD PTR R592_FIFO_PIO[rip]
	mov	rdi, r12
	call	r592_read_reg_raw_be@PLT
	mov	rsi, rsp
	mov	edx, 4
	mov	rdi, r12
	mov	DWORD PTR [rsp], eax
	call	kfifo_in@PLT
	mov	edx, ebp
	mov	rsi, r13
	mov	rdi, r12
	call	kfifo_out@PLT
	sub	ebp, eax
	jmp	.L8
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	r592_read_fifo_pio, .-r592_read_fifo_pio
	.comm	R592_FIFO_PIO,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_r592.c_r592_read_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_read_fifo_pio, %function
r592_read_fifo_pio:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L21
	sub	sp, sp, #28
	mov	r4, r1
	mov	r9, r2
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	mov	r7, r0
	bl	kfifo_is_empty
	cmp	r0, #0
	beq	.L2
.L6:
	cmp	r9, #3
	movle	r8, r4
	ble	.L4
	sub	r9, r9, #4
	lsr	r5, r9, #2
	add	r8, r5, #1
	ldr	r6, .L21+4
	add	r8, r4, r8, lsl #2
.L7:
	mov	r0, r7
	ldr	r1, [r6]
	bl	r592_read_reg_raw_be
	str	r0, [r4], #4
	cmp	r4, r8
	bne	.L7
	rsb	r5, r5, r5, lsl #30
	add	r9, r9, r5, lsl #2
.L4:
	cmp	r9, #0
	bne	.L19
.L8:
	mov	r0, r9
	bl	WARN_ON
.L1:
	ldr	r3, .L21
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L2:
	mov	r1, r9
	mov	r0, #4
	bl	min
	mov	r1, r4
	mov	r2, r0
	mov	r0, r7
	bl	kfifo_out
	mov	r6, r0
	mov	r0, r7
	bl	kfifo_is_empty
	cmp	r0, #0
	beq	.L1
	add	r4, r4, r6
	sub	r9, r9, r6
	b	.L6
.L19:
	ldr	r3, .L21+4
	mov	r0, r7
	ldr	r1, [r3]
	bl	r592_read_reg_raw_be
	mov	r2, #4
	mov	r3, r0
	add	r1, sp, r2
	mov	r0, r7
	str	r3, [sp, #4]
	bl	kfifo_in
	mov	r2, r9
	mov	r1, r8
	mov	r0, r7
	bl	kfifo_out
	sub	r9, r9, r0
	b	.L8
.L20:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	.LC0
	.word	R592_FIFO_PIO
	.size	r592_read_fifo_pio, .-r592_read_fifo_pio
	.comm	R592_FIFO_PIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
