	.file	"extr_pt3_dma.c_pt3_stop_dma.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	pt3_stop_dma
	.type	pt3_stop_dma, @function
pt3_stop_dma:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	r12, QWORD PTR 8[rdi]
	mov	edi, DWORD PTR [rdi]
	call	get_dma_base@PLT
	mov	ebx, eax
	mov	rax, QWORD PTR [r12]
	mov	edi, DWORD PTR [rax]
	add	edi, ebx
	add	edi, DWORD PTR OFST_STATUS[rip]
	call	ioread32@PLT
	test	al, 1
	jne	.L2
.L4:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rax, QWORD PTR [r12]
	mov	edi, 2
	mov	ebp, 5
	mov	esi, DWORD PTR [rax]
	add	esi, ebx
	add	esi, DWORD PTR OFST_DMA_CTL[rip]
	call	iowrite32@PLT
.L5:
	mov	rax, QWORD PTR [r12]
	mov	edi, DWORD PTR [rax]
	add	edi, ebx
	add	edi, DWORD PTR OFST_STATUS[rip]
	call	ioread32@PLT
	test	al, 1
	je	.L4
	mov	edi, 50
	call	msleep@PLT
	sub	ebp, 1
	jne	.L5
	mov	eax, DWORD PTR EIO[rip]
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.cfi_endproc
.LFE0:
	.size	pt3_stop_dma, .-pt3_stop_dma
	.comm	OFST_STATUS,4,4
	.comm	OFST_DMA_CTL,4,4
	.comm	EIO,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_pt3_dma.c_pt3_stop_dma.c"
	.text
	.align	2
	.global	pt3_stop_dma
	.syntax unified
	.arm
	.fpu softvfp
	.type	pt3_stop_dma, %function
pt3_stop_dma:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, r0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r0, [r0]
	ldr	r6, [r3, #4]
	bl	get_dma_base
	mov	r4, r0
	ldr	r3, [r6]
	ldr	r7, .L12
	ldr	r3, [r3]
	ldr	r0, [r7]
	add	r3, r4, r3
	add	r0, r3, r0
	bl	ioread32
	tst	r0, #1
	bne	.L2
.L4:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r3, [r6]
	ldr	r2, .L12+4
	ldr	r3, [r3]
	ldr	r1, [r2]
	add	r3, r4, r3
	mov	r0, #2
	add	r1, r3, r1
	bl	iowrite32
	mov	r5, #5
.L5:
	ldr	r3, [r6]
	ldr	r0, [r7]
	ldr	r3, [r3]
	add	r3, r4, r3
	add	r0, r3, r0
	bl	ioread32
	tst	r0, #1
	beq	.L4
	mov	r0, #50
	bl	msleep
	subs	r5, r5, #1
	bne	.L5
	ldr	r3, .L12+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	.align	2
.L12:
	.word	OFST_STATUS
	.word	OFST_DMA_CTL
	.word	EIO
	.size	pt3_stop_dma, .-pt3_stop_dma
	.comm	OFST_STATUS,4,4
	.comm	OFST_DMA_CTL,4,4
	.comm	EIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
