	.file	"extr_omap_udc.c_write_fifo.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	write_fifo, @function
write_fifo:
.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
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rdx, QWORD PTR 8[rsi]
	mov	rbp, rsi
	mov	rax, QWORD PTR 24[rsi]
	lea	r13, [rax+rdx*4]
	mov	rdi, r13
	call	prefetch@PLT
	mov	edi, DWORD PTR UDC_STAT_FLG[rip]
	call	omap_readw@PLT
	test	DWORD PTR UDC_FIFO_UNWRITABLE[rip], eax
	je	.L2
.L5:
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edx, DWORD PTR 4[r12]
	mov	rdi, r13
	mov	rsi, rbp
	call	write_packet@PLT
	mov	esi, DWORD PTR UDC_CTRL[rip]
	mov	edi, DWORD PTR UDC_SET_FIFO_EN[rip]
	mov	r13d, eax
	call	omap_writew@PLT
	mov	DWORD PTR [r12], 1
	cmp	DWORD PTR 4[r12], r13d
	jne	.L4
	mov	rax, QWORD PTR 8[rbp]
	cmp	QWORD PTR 0[rbp], rax
	jne	.L5
	mov	eax, DWORD PTR 16[rbp]
	test	eax, eax
	jne	.L5
.L4:
	mov	rsi, rbp
	mov	rdi, r12
	xor	edx, edx
	call	done@PLT
	pop	rbp
	.cfi_def_cfa_offset 24
	mov	eax, 1
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	write_fifo, .-write_fifo
	.comm	UDC_STAT_FLG,4,4
	.comm	UDC_SET_FIFO_EN,4,4
	.comm	UDC_FIFO_UNWRITABLE,4,4
	.comm	UDC_CTRL,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_omap_udc.c_write_fifo.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_fifo, %function
write_fifo:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, [r1, #4]
	ldr	r6, [r1, #12]
	mov	r5, r0
	add	r6, r6, r3, lsl #2
	mov	r0, r6
	mov	r4, r1
	bl	prefetch
	ldr	r3, .L8
	ldr	r0, [r3]
	bl	omap_readw
	ldr	r3, .L8+4
	ldr	r3, [r3]
	tst	r0, r3
	beq	.L2
.L5:
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L2:
	mov	r0, r6
	mov	r1, r4
	ldr	r2, [r5, #4]
	bl	write_packet
	ldr	r2, .L8+8
	ldr	r3, .L8+12
	mov	r6, r0
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	omap_writew
	mov	r2, #1
	ldr	r3, [r5, #4]
	str	r2, [r5]
	cmp	r3, r6
	bne	.L4
	ldm	r4, {r2, r3}
	cmp	r2, r3
	bne	.L5
	ldr	r3, [r4, #8]
	cmp	r3, #0
	bne	.L5
.L4:
	mov	r1, r4
	mov	r0, r5
	mov	r2, #0
	bl	done
	mov	r0, #1
	pop	{r4, r5, r6, pc}
.L9:
	.align	2
.L8:
	.word	UDC_STAT_FLG
	.word	UDC_FIFO_UNWRITABLE
	.word	UDC_CTRL
	.word	UDC_SET_FIFO_EN
	.size	write_fifo, .-write_fifo
	.comm	UDC_STAT_FLG,4,4
	.comm	UDC_SET_FIFO_EN,4,4
	.comm	UDC_FIFO_UNWRITABLE,4,4
	.comm	UDC_CTRL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
