	.file	"extr_omap24xxcam-dma.c_omap24xxcam_sgdma_process.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	omap24xxcam_sgdma_process
	.type	omap24xxcam_sgdma_process, @function
omap24xxcam_sgdma_process:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	lea	rax, 8[rdi]
	xor	esi, esi
	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	r12, rdi
	mov	rdi, rax
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	ebp, DWORD PTR CAMDMA_CSR_MISALIGNED_ERR[rip]
	or	ebp, DWORD PTR CAMDMA_CSR_SUPERVISOR_ERR[rip]
	or	ebp, DWORD PTR CAMDMA_CSR_SECURE_ERR[rip]
	or	ebp, DWORD PTR CAMDMA_CSR_TRANS_ERR[rip]
	mov	QWORD PTR 24[rsp], rax
	or	ebp, DWORD PTR CAMDMA_CSR_DROP[rip]
	mov	DWORD PTR 4[rsp], ebp
	call	spin_lock_irqsave@PLT
	mov	ecx, DWORD PTR NUM_SG_DMA[rip]
	mov	eax, DWORD PTR [r12]
	mov	ebx, ecx
	sub	ebx, eax
	add	eax, DWORD PTR 4[r12]
	cdq
	mov	DWORD PTR 20[rsp], ebx
	idiv	ecx
	mov	DWORD PTR 16[rsp], edx
	test	ebx, ebx
	jle	.L2
	lea	r14, 16[r12]
.L4:
	movsx	r13, DWORD PTR 16[rsp]
	mov	rax, QWORD PTR 24[r12]
	lea	rdx, 0[r13+r13*4]
	lea	r15, [rax+rdx*8]
	mov	rax, QWORD PTR [r15]
	mov	rdx, QWORD PTR 8[r15]
	cmp	rax, rdx
	jl	.L3
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L14:
	mov	ebx, DWORD PTR 20[r15]
	sub	ebx, DWORD PTR 24[r15]
.L6:
	mov	ebp, DWORD PTR omap24xxcam_sgdma_callback[rip]
	call	sg_dma_address@PLT
	mov	r8, r13
	mov	edx, ebx
	mov	rdi, r14
	mov	esi, eax
	mov	ecx, ebp
	call	omap24xxcam_dma_start@PLT
	test	rax, rax
	jne	.L2
	add	QWORD PTR [r15], 1
	mov	rsi, QWORD PTR HZ[rip]
	lea	rdi, 12[r12]
	add	DWORD PTR 24[r15], ebx
	add	rsi, QWORD PTR jiffies[rip]
	add	DWORD PTR 28[r15], 1
	call	mod_timer@PLT
	mov	rax, QWORD PTR [r15]
	mov	rdx, QWORD PTR 8[r15]
	cmp	rax, rdx
	jge	.L8
.L3:
	mov	ecx, DWORD PTR 4[rsp]
	test	DWORD PTR 16[r15], ecx
	jne	.L8
	mov	rcx, QWORD PTR 32[r15]
	lea	rdi, [rcx+rax*4]
	add	rax, 1
	cmp	rax, rdx
	je	.L14
	mov	QWORD PTR 8[rsp], rdi
	call	sg_dma_len@PLT
	mov	rdi, QWORD PTR 8[rsp]
	mov	ebx, eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L8:
	mov	eax, DWORD PTR 16[rsp]
	add	eax, 1
	cdq
	idiv	DWORD PTR NUM_SG_DMA[rip]
	sub	DWORD PTR 20[rsp], 1
	mov	DWORD PTR 16[rsp], edx
	jne	.L4
.L2:
	mov	rdi, QWORD PTR 24[rsp]
	add	rsp, 40
	.cfi_def_cfa_offset 56
	xor	esi, esi
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	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
	jmp	spin_unlock_irqrestore@PLT
	.cfi_endproc
.LFE0:
	.size	omap24xxcam_sgdma_process, .-omap24xxcam_sgdma_process
	.comm	omap24xxcam_sgdma_callback,4,4
	.comm	jiffies,8,8
	.comm	NUM_SG_DMA,4,4
	.comm	HZ,8,8
	.comm	CAMDMA_CSR_TRANS_ERR,4,4
	.comm	CAMDMA_CSR_SUPERVISOR_ERR,4,4
	.comm	CAMDMA_CSR_SECURE_ERR,4,4
	.comm	CAMDMA_CSR_MISALIGNED_ERR,4,4
	.comm	CAMDMA_CSR_DROP,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_omap24xxcam-dma.c_omap24xxcam_sgdma_process.c"
	.text
	.global	__aeabi_idivmod
	.align	2
	.global	omap24xxcam_sgdma_process
	.syntax unified
	.arm
	.fpu softvfp
	.type	omap24xxcam_sgdma_process, %function
omap24xxcam_sgdma_process:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r8, r0
	ldr	r1, .L17
	ldr	r2, .L17+4
	ldr	r3, .L17+8
	ldr	r0, [r2]
	ldr	r7, [r1]
	ldr	r2, .L17+12
	ldr	r1, [r3]
	ldr	r3, .L17+16
	ldr	r2, [r2]
	orr	r7, r7, r0
	ldr	r3, [r3]
	orr	r7, r7, r1
	sub	sp, sp, #28
	orr	r7, r7, r2
	mov	r1, #0
	add	r0, r8, #8
	orr	r7, r7, r3
	str	r0, [sp, #20]
	bl	spin_lock_irqsave
	ldr	r2, .L17+20
	ldr	r3, [r8]
	ldr	r1, [r2]
	ldr	r0, [r8, #4]
	add	r0, r3, r0
	sub	r3, r1, r3
	mov	r4, r3
	str	r3, [sp, #16]
	bl	__aeabi_idivmod
	cmp	r4, #0
	ble	.L2
	mov	r6, r1
	ldr	fp, .L17+24
	ldr	r10, .L17+28
	add	r9, r8, #16
.L4:
	ldr	r3, [r8, #20]
	rsb	r2, r6, r6, lsl #3
	add	r4, r3, r2, lsl #2
	ldr	r3, [r3, r2, lsl #2]
	ldr	r2, [r4, #4]
	cmp	r3, r2
	blt	.L3
	b	.L8
.L16:
	ldr	r5, [r4, #12]
	ldr	r0, [r4, #16]
	sub	r5, r5, r0
.L6:
	mov	r0, r3
	bl	sg_dma_address
	ldr	r3, .L17+32
	str	r6, [sp]
	mov	r1, r0
	ldr	r3, [r3]
	mov	r2, r5
	mov	r0, r9
	bl	omap24xxcam_dma_start
	mov	r3, r0
	cmp	r3, #0
	add	r0, r8, #12
	bne	.L2
	ldr	r1, [r4]
	ldr	r2, [r4, #16]
	ldr	r3, [r4, #20]
	add	r1, r1, #1
	add	r5, r2, r5
	str	r1, [r4]
	ldr	r2, [r10]
	ldr	r1, [fp]
	add	r3, r3, #1
	str	r3, [r4, #20]
	add	r1, r1, r2
	str	r5, [r4, #16]
	bl	mod_timer
	ldr	r3, [r4]
	ldr	r2, [r4, #4]
	cmp	r3, r2
	bge	.L8
.L3:
	ldr	r1, [r4, #8]
	add	r0, r3, #1
	tst	r7, r1
	bne	.L8
	ldr	r1, [r4, #24]
	cmp	r0, r2
	add	r3, r1, r3, lsl #2
	beq	.L16
	mov	r0, r3
	str	r3, [sp, #12]
	bl	sg_dma_len
	ldr	r3, [sp, #12]
	mov	r5, r0
	b	.L6
.L8:
	ldr	r3, .L17+20
	add	r0, r6, #1
	ldr	r1, [r3]
	bl	__aeabi_idivmod
	ldr	r3, [sp, #16]
	mov	r6, r1
	sub	r3, r3, #1
	cmp	r3, #0
	str	r3, [sp, #16]
	bne	.L4
.L2:
	mov	r1, #0
	ldr	r0, [sp, #20]
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	spin_unlock_irqrestore
.L18:
	.align	2
.L17:
	.word	CAMDMA_CSR_MISALIGNED_ERR
	.word	CAMDMA_CSR_SUPERVISOR_ERR
	.word	CAMDMA_CSR_SECURE_ERR
	.word	CAMDMA_CSR_TRANS_ERR
	.word	CAMDMA_CSR_DROP
	.word	NUM_SG_DMA
	.word	jiffies
	.word	HZ
	.word	omap24xxcam_sgdma_callback
	.size	omap24xxcam_sgdma_process, .-omap24xxcam_sgdma_process
	.comm	omap24xxcam_sgdma_callback,4,4
	.comm	jiffies,4,4
	.comm	NUM_SG_DMA,4,4
	.comm	HZ,4,4
	.comm	CAMDMA_CSR_TRANS_ERR,4,4
	.comm	CAMDMA_CSR_SUPERVISOR_ERR,4,4
	.comm	CAMDMA_CSR_SECURE_ERR,4,4
	.comm	CAMDMA_CSR_MISALIGNED_ERR,4,4
	.comm	CAMDMA_CSR_DROP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
