	.file	"extr_edma.c_edma_execute.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"\n pset[%d]:\n  chnum\t%d\n  slot\t%d\n  opt\t%08x\n  src\t%08x\n  dst\t%08x\n  abcnt\t%08x\n  ccnt\t%08x\n  bidx\t%08x\n  cidx\t%08x\n  lkrld\t%08x\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"missed event on channel %d\n"
	.section	.rodata.str1.8
	.align 8
.LC2:
	.string	"first transfer starting on channel %d\n"
	.align 8
.LC3:
	.string	"chan: %d: completed %d elements, resuming\n"
	.text
	.p2align 4
	.type	edma_execute, @function
edma_execute:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	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	rax, QWORD PTR 40[rdi]
	mov	rbp, QWORD PTR 32[rdi]
	mov	r12, QWORD PTR 16[rdi]
	mov	r14, QWORD PTR [rax]
	test	rbp, rbp
	je	.L21
.L2:
	mov	edi, DWORD PTR MAX_NR_SG[rip]
	mov	esi, DWORD PTR 0[rbp]
	xor	ebx, ebx
	sub	esi, DWORD PTR 4[rbp]
	call	min@PLT
	mov	QWORD PTR 24[rbp], 0
	lea	ecx, -1[rax]
	mov	DWORD PTR 28[rsp], eax
	mov	DWORD PTR 24[rsp], ecx
	mov	QWORD PTR 8[rsp], rcx
	test	eax, eax
	jle	.L9
	mov	QWORD PTR [rsp], r14
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rbx, rax
.L8:
	mov	r15d, DWORD PTR 4[rbp]
	mov	rdx, QWORD PTR 16[rbp]
	mov	rdi, r12
	add	r15d, ebx
	movsx	rax, r15d
	lea	rax, [rax+rax*4]
	lea	r14, 0[0+rax*8]
	lea	rax, 0[0+rbx*4]
	mov	QWORD PTR 16[rsp], rax
	mov	rax, QWORD PTR 24[r13]
	add	rdx, r14
	mov	esi, DWORD PTR [rax+rbx*4]
	call	edma_write_slot@PLT
	mov	rax, QWORD PTR 16[rbp]
	sub	rsp, 8
	.cfi_def_cfa_offset 104
	mov	ecx, DWORD PTR 0[r13]
	lea	rsi, .LC0[rip]
	add	rax, r14
	mov	rdx, QWORD PTR 32[rax]
	add	QWORD PTR 24[rbp], rdx
	mov	rdx, QWORD PTR 24[r13]
	mov	r9d, DWORD PTR 28[rax]
	mov	r8d, DWORD PTR [rdx+rbx*4]
	mov	edx, DWORD PTR [rax]
	push	rdx
	.cfi_def_cfa_offset 112
	mov	edx, DWORD PTR 4[rax]
	push	rdx
	.cfi_def_cfa_offset 120
	mov	edx, DWORD PTR 8[rax]
	push	rdx
	.cfi_def_cfa_offset 128
	mov	edx, DWORD PTR 12[rax]
	push	rdx
	.cfi_def_cfa_offset 136
	mov	edx, DWORD PTR 16[rax]
	push	rdx
	.cfi_def_cfa_offset 144
	mov	edx, DWORD PTR 20[rax]
	push	rdx
	.cfi_def_cfa_offset 152
	mov	eax, DWORD PTR 24[rax]
	mov	edx, r15d
	push	rax
	.cfi_def_cfa_offset 160
	mov	rdi, QWORD PTR 64[rsp]
	call	dev_vdbg@PLT
	add	rsp, 64
	.cfi_def_cfa_offset 96
	cmp	DWORD PTR 24[rsp], ebx
	je	.L7
	mov	rax, QWORD PTR 24[r13]
	lea	rcx, 0[0+rbx*4]
	mov	rdi, r12
	mov	edx, DWORD PTR 4[rax+rcx]
	mov	esi, DWORD PTR [rax+rbx*4]
	call	edma_link@PLT
.L7:
	lea	rax, 1[rbx]
	cmp	rbx, QWORD PTR 8[rsp]
	jne	.L13
	mov	r14, QWORD PTR [rsp]
.L9:
	mov	eax, DWORD PTR 28[rsp]
	add	eax, DWORD PTR 4[rbp]
	mov	DWORD PTR 4[rbp], eax
	cmp	eax, DWORD PTR 0[rbp]
	je	.L22
.L6:
	cmp	QWORD PTR 8[r13], 0
	mov	edx, DWORD PTR 0[r13]
	jne	.L23
.L11:
	mov	ecx, DWORD PTR 4[rbp]
	cmp	ecx, DWORD PTR MAX_NR_SG[rip]
	jg	.L12
	mov	rdi, r14
	lea	rsi, .LC2[rip]
	xor	eax, eax
	call	dev_dbg@PLT
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdi, r13
	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	edma_start@PLT
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	rdi, r14
	lea	rsi, .LC3[rip]
	xor	eax, eax
	call	dev_dbg@PLT
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdi, r13
	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	edma_resume@PLT
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	mov	rdx, QWORD PTR 24[r13]
	movsx	rax, DWORD PTR 28[rsp]
	cmp	QWORD PTR 8[rbp], 0
	mov	esi, DWORD PTR -4[rdx+rax*4]
	je	.L10
	mov	edx, DWORD PTR 4[rdx]
	mov	rdi, r12
	call	edma_link@PLT
	cmp	QWORD PTR 8[r13], 0
	mov	edx, DWORD PTR 0[r13]
	je	.L11
	.p2align 4,,10
	.p2align 3
.L23:
	lea	rsi, .LC1[rip]
	mov	rdi, r14
	xor	eax, eax
	call	dev_dbg@PLT
	mov	rdi, r13
	call	edma_clean_channel@PLT
	mov	rdi, r13
	call	edma_stop@PLT
	mov	rdi, r13
	call	edma_start@PLT
	mov	rdi, r13
	call	edma_trigger_channel@PLT
	mov	QWORD PTR 8[r13], 0
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	lea	rdi, 40[rdi]
	call	vchan_next_desc@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L1
	lea	rdi, 4[rax]
	call	list_del@PLT
	mov	rdi, rbp
	call	to_edma_desc@PLT
	mov	QWORD PTR 32[r13], rax
	mov	rbp, rax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rax, QWORD PTR 16[r13]
	mov	rdi, r12
	mov	edx, DWORD PTR [rax]
	call	edma_link@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	edma_execute, .-edma_execute
	.comm	MAX_NR_SG,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_edma.c_edma_execute.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"\012 pset[%d]:\012  chnum\011%d\012  slot\011%d\012"
	.ascii	"  opt\011%08x\012  src\011%08x\012  dst\011%08x\012"
	.ascii	"  abcnt\011%08x\012  ccnt\011%08x\012  bidx\011%08x"
	.ascii	"\012  cidx\011%08x\012  lkrld\011%08x\012\000"
	.align	2
.LC1:
	.ascii	"missed event on channel %d\012\000"
	.align	2
.LC2:
	.ascii	"first transfer starting on channel %d\012\000"
	.align	2
.LC3:
	.ascii	"chan: %d: completed %d elements, resuming\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	edma_execute, %function
edma_execute:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r5, [r0, #16]
	ldr	r3, [r0, #20]
	cmp	r5, #0
	mov	r7, r0
	ldr	r10, [r3]
	ldr	r9, [r0, #8]
	sub	sp, sp, #52
	beq	.L19
.L2:
	ldm	r5, {r1, r3}
	sub	r1, r1, r3
	ldr	r3, .L21
	mov	r4, #0
	ldr	r0, [r3]
	bl	min
	subs	r3, r0, #0
	str	r3, [sp, #40]
	str	r4, [r5, #16]
	ble	.L9
	ldr	r3, [sp, #40]
	ldr	fp, .L21+4
	sub	r3, r3, #1
	str	r3, [sp, #44]
.L8:
	ldr	r6, [r5, #4]
	ldr	r2, [r5, #12]
	add	r6, r4, r6
	ldr	r1, [r7, #12]
	add	r8, r6, r6, lsl #3
	ldr	r1, [r1, r4, lsl #2]
	add	r2, r2, r8, lsl #2
	mov	r0, r9
	bl	edma_write_slot
	ldr	r1, [r5, #12]
	lsl	r0, r8, #2
	add	r0, r1, r0
	ldr	ip, [r0, #32]
	ldr	r2, [r5, #16]
	ldr	r1, [r1, r8, lsl #2]
	add	r3, r2, ip
	str	r3, [r5, #16]
	str	r1, [sp, #32]
	ldr	r3, [r0, #4]
	ldr	ip, [r7, #12]
	str	r3, [sp, #28]
	ldr	r3, [r0, #8]
	mov	r2, r6
	str	r3, [sp, #24]
	ldr	r1, [r0, #12]
	ldr	r3, [r7]
	str	r1, [sp, #20]
	ldr	lr, [r0, #16]
	mov	r1, fp
	str	lr, [sp, #16]
	ldr	lr, [r0, #20]
	lsl	r6, r4, #2
	str	lr, [sp, #12]
	ldr	lr, [r0, #24]
	str	lr, [sp, #8]
	ldr	lr, [r0, #28]
	mov	r0, r10
	str	lr, [sp, #4]
	ldr	ip, [ip, r4, lsl #2]
	str	ip, [sp]
	bl	dev_vdbg
	ldr	r3, [sp, #44]
	cmp	r4, r3
	beq	.L7
	ldr	r3, [r7, #12]
	mov	r0, r9
	add	r6, r3, r6
	ldr	r2, [r6, #4]
	ldr	r1, [r3, r4, lsl #2]
	bl	edma_link
.L7:
	ldr	r3, [sp, #40]
	add	r4, r4, #1
	cmp	r3, r4
	bne	.L8
.L9:
	ldm	r5, {r2, r3}
	ldr	r1, [sp, #40]
	add	r3, r1, r3
	cmp	r3, r2
	str	r3, [r5, #4]
	bne	.L6
	ldr	r2, [r5, #8]
	ldr	r1, [sp, #40]
	ldr	r3, [r7, #12]
	cmp	r2, #0
	sub	r8, r1, #-1073741823
	ldr	r1, [r3, r8, lsl #2]
	ldreq	r3, [r7, #8]
	movne	r0, r9
	moveq	r0, r9
	ldrne	r2, [r3, #4]
	ldreq	r2, [r3]
	bl	edma_link
.L6:
	ldm	r7, {r2, r3}
	cmp	r3, #0
	bne	.L20
	ldr	r1, .L21
	ldr	r3, [r5, #4]
	ldr	r1, [r1]
	mov	r0, r10
	cmp	r3, r1
	bgt	.L12
	ldr	r1, .L21+8
	bl	dev_dbg
	mov	r0, r7
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	edma_start
.L12:
	ldr	r1, .L21+12
	bl	dev_dbg
	mov	r0, r7
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	edma_resume
.L19:
	add	r0, r0, #20
	bl	vchan_next_desc
	subs	r4, r0, #0
	beq	.L1
	add	r0, r4, #4
	bl	list_del
	mov	r0, r4
	bl	to_edma_desc
	mov	r5, r0
	str	r0, [r7, #16]
	b	.L2
.L20:
	ldr	r1, .L21+16
	mov	r0, r10
	bl	dev_dbg
	mov	r0, r7
	bl	edma_clean_channel
	mov	r0, r7
	bl	edma_stop
	mov	r0, r7
	bl	edma_start
	mov	r0, r7
	bl	edma_trigger_channel
	mov	r3, #0
	str	r3, [r7, #4]
.L1:
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L22:
	.align	2
.L21:
	.word	MAX_NR_SG
	.word	.LC0
	.word	.LC2
	.word	.LC3
	.word	.LC1
	.size	edma_execute, .-edma_execute
	.comm	MAX_NR_SG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
