	.file	"extr_sh_flctl.c_flctl_dma_fifo0_transfer.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"DMA submit failed, falling back to PIO\n"
	.align 8
.LC1:
	.string	"DMA failed, falling back to PIO\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"wait_for_completion_timeout\n"
	.text
	.p2align 4
	.type	flctl_dma_fifo0_transfer, @function
flctl_dma_fifo0_transfer:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, edx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, ecx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	cmp	DWORD PTR DMA_FROM_DEVICE[rip], ecx
	mov	rbx, QWORD PTR 16[rdi]
	mov	rax, QWORD PTR 24[rdi]
	mov	r13d, DWORD PTR DMA_MEM_TO_DEV[rip]
	jne	.L3
	mov	r13d, DWORD PTR DMA_DEV_TO_MEM[rip]
	mov	rbx, rax
.L3:
	mov	rax, QWORD PTR [rbx]
	mov	ecx, r12d
	mov	edx, r15d
	mov	edi, DWORD PTR [rax]
	call	dma_map_single@PLT
	mov	r14d, eax
	mov	rax, QWORD PTR [rbx]
	mov	esi, r14d
	mov	edi, DWORD PTR [rax]
	call	dma_mapping_error@PLT
	test	eax, eax
	jne	.L4
	mov	r8d, DWORD PTR DMA_PREP_INTERRUPT[rip]
	mov	ecx, r13d
	mov	edx, r15d
	mov	esi, r14d
	or	r8d, DWORD PTR DMA_CTRL_ACK[rip]
	mov	rdi, rbx
	call	dmaengine_prep_slave_single@PLT
	mov	r13, rax
	test	rax, rax
	je	.L4
	mov	rdi, rbp
	call	FLINTDMACR@PLT
	mov	edi, eax
	call	readl@PLT
	mov	rdi, rbp
	or	eax, DWORD PTR DREQ0EN[rip]
	mov	DWORD PTR 12[rsp], eax
	call	FLINTDMACR@PLT
	mov	r8d, DWORD PTR 12[rsp]
	mov	esi, eax
	mov	edi, r8d
	call	writel@PLT
	mov	eax, DWORD PTR flctl_dma_complete[rip]
	mov	QWORD PTR 0[r13], rbp
	mov	rdi, r13
	mov	DWORD PTR 8[r13], eax
	call	dmaengine_submit@PLT
	mov	edi, eax
	mov	r13d, eax
	call	dma_submit_error@PLT
	test	eax, eax
	jne	.L13
	mov	rdi, rbx
	call	dma_async_issue_pending@PLT
	mov	edi, 3000
	call	msecs_to_jiffies@PLT
	lea	rdi, 8[rbp]
	mov	esi, eax
	call	wait_for_completion_timeout@PLT
	mov	r8d, eax
	test	eax, eax
	jg	.L6
	mov	rdi, rbx
	mov	DWORD PTR 12[rsp], eax
	call	dmaengine_terminate_all@PLT
	mov	rdi, QWORD PTR 0[rbp]
	lea	rsi, .LC2[rip]
	call	dev_err@PLT
	mov	r8d, DWORD PTR 12[rsp]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, rbp
	call	flctl_release_dma@PLT
	mov	rdi, QWORD PTR 0[rbp]
	lea	rsi, .LC1[rip]
	call	dev_warn@PLT
	mov	r8d, DWORD PTR EIO[rip]
	neg	r8d
.L6:
	mov	rdi, rbp
	mov	DWORD PTR 12[rsp], r8d
	call	FLINTDMACR@PLT
	mov	edi, eax
	call	readl@PLT
	mov	r13d, DWORD PTR DREQ0EN[rip]
	mov	rdi, rbp
	not	r13d
	and	r13d, eax
	call	FLINTDMACR@PLT
	mov	edi, r13d
	mov	esi, eax
	call	writel@PLT
	mov	rax, QWORD PTR [rbx]
	mov	ecx, r12d
	mov	edx, r15d
	mov	esi, r14d
	mov	edi, DWORD PTR [rax]
	call	dma_unmap_single@PLT
	mov	r8d, DWORD PTR 12[rsp]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	mov	eax, r8d
	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
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	edi, r13d
	call	dma_submit_error@PLT
	mov	rdi, QWORD PTR 0[rbp]
	lea	rsi, .LC0[rip]
	mov	DWORD PTR 12[rsp], eax
	call	dev_warn@PLT
	mov	r8d, DWORD PTR 12[rsp]
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	flctl_dma_fifo0_transfer, .-flctl_dma_fifo0_transfer
	.comm	flctl_dma_complete,4,4
	.comm	EIO,4,4
	.comm	DREQ0EN,4,4
	.comm	DMA_PREP_INTERRUPT,4,4
	.comm	DMA_MEM_TO_DEV,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.comm	DMA_DEV_TO_MEM,4,4
	.comm	DMA_CTRL_ACK,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_sh_flctl.c_flctl_dma_fifo0_transfer.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"DMA submit failed, falling back to PIO\012\000"
	.align	2
.LC1:
	.ascii	"DMA failed, falling back to PIO\012\000"
	.align	2
.LC2:
	.ascii	"wait_for_completion_timeout\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	flctl_dma_fifo0_transfer, %function
flctl_dma_fifo0_transfer:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r3
	ldr	r3, .L14
	ldr	r8, [r0, #8]
	ldr	r3, [r3]
	mov	r7, r2
	cmp	r3, r5
	ldr	r3, [r0, #12]
	ldrne	r3, .L14+4
	moveq	r8, r3
	ldreq	r2, .L14+8
	ldrne	r9, [r3]
	ldr	r3, [r8]
	ldreq	r9, [r2]
	sub	sp, sp, #12
	mov	r2, r7
	mov	r4, r0
	ldr	r0, [r3]
	mov	r3, r5
	bl	dma_map_single
	ldr	r3, [r8]
	mov	r1, r0
	mov	r6, r0
	ldr	r0, [r3]
	bl	dma_mapping_error
	cmp	r0, #0
	bne	.L4
	ldr	r3, .L14+12
	ldr	r2, .L14+16
	ldr	r1, [r3]
	ldr	r2, [r2]
	mov	r3, r9
	orr	r2, r2, r1
	str	r2, [sp]
	mov	r1, r6
	mov	r2, r7
	mov	r0, r8
	bl	dmaengine_prep_slave_single
	subs	r9, r0, #0
	beq	.L4
	mov	r0, r4
	bl	FLINTDMACR
	bl	readl
	mov	fp, r0
	ldr	r10, .L14+20
	mov	r0, r4
	ldr	r3, [r10]
	orr	fp, fp, r3
	bl	FLINTDMACR
	mov	r1, r0
	mov	r0, fp
	bl	writel
	ldr	r3, .L14+24
	mov	r0, r9
	ldr	r3, [r3]
	str	r4, [r9]
	str	r3, [r9, #4]
	bl	dmaengine_submit
	mov	r9, r0
	bl	dma_submit_error
	cmp	r0, #0
	bne	.L13
	mov	r0, r8
	bl	dma_async_issue_pending
	ldr	r0, .L14+28
	bl	msecs_to_jiffies
	mov	r1, r0
	add	r0, r4, #4
	bl	wait_for_completion_timeout
	subs	r9, r0, #0
	bgt	.L6
	mov	r0, r8
	bl	dmaengine_terminate_all
	ldr	r1, .L14+32
	ldr	r0, [r4]
	bl	dev_err
	b	.L6
.L4:
	mov	r0, r4
	bl	flctl_release_dma
	ldr	r1, .L14+36
	ldr	r0, [r4]
	bl	dev_warn
	ldr	r3, .L14+40
	ldr	r10, .L14+20
	ldr	r9, [r3]
	rsb	r9, r9, #0
.L6:
	mov	r0, r4
	bl	FLINTDMACR
	bl	readl
	mov	r3, r0
	ldr	r2, [r10]
	mov	r0, r4
	bic	r4, r3, r2
	bl	FLINTDMACR
	mov	r1, r0
	mov	r0, r4
	bl	writel
	ldr	r2, [r8]
	mov	r3, r5
	mov	r1, r6
	ldr	r0, [r2]
	mov	r2, r7
	bl	dma_unmap_single
	mov	r0, r9
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	mov	r0, r9
	bl	dma_submit_error
	ldr	r1, .L14+44
	mov	r9, r0
	ldr	r0, [r4]
	bl	dev_warn
	b	.L6
.L15:
	.align	2
.L14:
	.word	DMA_FROM_DEVICE
	.word	DMA_MEM_TO_DEV
	.word	DMA_DEV_TO_MEM
	.word	DMA_CTRL_ACK
	.word	DMA_PREP_INTERRUPT
	.word	DREQ0EN
	.word	flctl_dma_complete
	.word	3000
	.word	.LC2
	.word	.LC1
	.word	EIO
	.word	.LC0
	.size	flctl_dma_fifo0_transfer, .-flctl_dma_fifo0_transfer
	.comm	flctl_dma_complete,4,4
	.comm	EIO,4,4
	.comm	DREQ0EN,4,4
	.comm	DMA_PREP_INTERRUPT,4,4
	.comm	DMA_MEM_TO_DEV,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.comm	DMA_DEV_TO_MEM,4,4
	.comm	DMA_CTRL_ACK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
