	.file	"413421.c"
	.intel_syntax noprefix
	.text
	.globl	dma_set
	.type	dma_set, @function
dma_set:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	DWORD PTR -16[rbp], edx
	mov	eax, DWORD PTR -12[rbp]
	sar	eax, 2
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR [rdx], eax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	dma_set, .-dma_set
	.globl	dma_get
	.type	dma_get, @function
dma_get:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	eax, DWORD PTR -12[rbp]
	sar	eax, 2
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	dma_get, .-dma_get
	.section	.rodata
	.align 8
.LC0:
	.string	"Stream to memory-mapped status (0x%08x@0x%02x):"
.LC1:
	.string	" halted"
.LC2:
	.string	" running"
.LC3:
	.string	" idle"
.LC4:
	.string	" SGIncld"
.LC5:
	.string	" DMAIntErr"
.LC6:
	.string	" DMASlvErr"
.LC7:
	.string	" DMADecErr"
.LC8:
	.string	" SGIntErr"
.LC9:
	.string	" SGSlvErr"
.LC10:
	.string	" SGDecErr"
.LC11:
	.string	" IOC_Irq"
.LC12:
	.string	" Dly_Irq"
.LC13:
	.string	" Err_Irq"
	.text
	.globl	dma_s2mm_status
	.type	dma_s2mm_status, @function
dma_s2mm_status:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 52
	mov	rdi, rax
	call	dma_get
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, 52
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 1
	test	eax, eax
	je	.L5
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L6
.L5:
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L6:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 2
	test	eax, eax
	je	.L7
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
.L7:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 8
	test	eax, eax
	je	.L8
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
.L8:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 16
	test	eax, eax
	je	.L9
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
.L9:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 32
	test	eax, eax
	je	.L10
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
.L10:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 64
	test	eax, eax
	je	.L11
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
.L11:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 256
	test	eax, eax
	je	.L12
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
.L12:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 512
	test	eax, eax
	je	.L13
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
.L13:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 1024
	test	eax, eax
	je	.L14
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
.L14:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 4096
	test	eax, eax
	je	.L15
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
.L15:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 8192
	test	eax, eax
	je	.L16
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
.L16:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 16384
	test	eax, eax
	je	.L17
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
.L17:
	mov	edi, 10
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	dma_s2mm_status, .-dma_s2mm_status
	.section	.rodata
	.align 8
.LC14:
	.string	"Memory-mapped to stream status (0x%08x@0x%02x):"
	.text
	.globl	dma_mm2s_status
	.type	dma_mm2s_status, @function
dma_mm2s_status:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 4
	mov	rdi, rax
	call	dma_get
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, 4
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 1
	test	eax, eax
	je	.L19
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L20
.L19:
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L20:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 2
	test	eax, eax
	je	.L21
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
.L21:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 8
	test	eax, eax
	je	.L22
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
.L22:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 16
	test	eax, eax
	je	.L23
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
.L23:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 32
	test	eax, eax
	je	.L24
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
.L24:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 64
	test	eax, eax
	je	.L25
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
.L25:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 256
	test	eax, eax
	je	.L26
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
.L26:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 512
	test	eax, eax
	je	.L27
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
.L27:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 1024
	test	eax, eax
	je	.L28
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
.L28:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 4096
	test	eax, eax
	je	.L29
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
.L29:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 8192
	test	eax, eax
	je	.L30
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
.L30:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 16384
	test	eax, eax
	je	.L31
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
.L31:
	mov	edi, 10
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	dma_mm2s_status, .-dma_mm2s_status
	.globl	dma_mm2s_sync
	.type	dma_mm2s_sync, @function
dma_mm2s_sync:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 4
	mov	rdi, rax
	call	dma_get
	mov	DWORD PTR -4[rbp], eax
	jmp	.L33
.L34:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	dma_s2mm_status
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	dma_mm2s_status
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 4
	mov	rdi, rax
	call	dma_get
	mov	DWORD PTR -4[rbp], eax
.L33:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 4096
	test	eax, eax
	je	.L34
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 2
	test	eax, eax
	je	.L34
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	dma_mm2s_sync, .-dma_mm2s_sync
	.globl	dma_s2mm_sync
	.type	dma_s2mm_sync, @function
dma_s2mm_sync:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 52
	mov	rdi, rax
	call	dma_get
	mov	DWORD PTR -4[rbp], eax
	jmp	.L36
.L37:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	dma_s2mm_status
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	dma_mm2s_status
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 52
	mov	rdi, rax
	call	dma_get
	mov	DWORD PTR -4[rbp], eax
.L36:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 4096
	test	eax, eax
	je	.L37
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 2
	test	eax, eax
	je	.L37
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	dma_s2mm_sync, .-dma_s2mm_sync
	.section	.rodata
.LC15:
	.string	"%5d %5d\n"
	.text
	.globl	memdump
	.type	memdump, @function
memdump:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -28[rbp], 0
	jmp	.L39
.L40:
	mov	eax, DWORD PTR -28[rbp]
	sal	eax, 2
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	mov	WORD PTR -12[rbp], ax
	mov	eax, DWORD PTR -28[rbp]
	sal	eax, 2
	cdqe
	lea	rdx, 2[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	mov	WORD PTR -10[rbp], ax
	movzx	eax, WORD PTR -10[rbp]
	movsx	edx, ax
	movzx	eax, WORD PTR -12[rbp]
	cwde
	mov	esi, eax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -28[rbp], 1
.L39:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L40
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L41
	call	__stack_chk_fail@PLT
.L41:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	memdump, .-memdump
	.section	.rodata
.LC16:
	.string	"/dev/mem"
.LC17:
	.string	"Resetting DMA"
.LC18:
	.string	"Halting DMA"
.LC19:
	.string	"Writing destination address"
	.align 8
.LC20:
	.string	"Starting S2MM channel with all interrupts masked..."
	.align 8
.LC21:
	.string	"Writing S2MM transfer length..."
	.align 8
.LC22:
	.string	"Waiting for S2MM sychronization..."
.LC23:
	.string	"Destination memory block: "
	.align 8
.LC24:
	.string	"Can't unmap memory from user space."
	.text
	.globl	main
	.type	main, @function
main:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	esi, 1052674
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -28[rbp], eax
	mov	edi, 30
	call	sysconf@PLT
	sal	rax, 4
	mov	rsi, rax
	mov	eax, DWORD PTR -28[rbp]
	mov	r9d, 1077936128
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	edi, 30
	call	sysconf@PLT
	sal	rax, 10
	mov	rsi, rax
	mov	eax, DWORD PTR -28[rbp]
	mov	r9d, 234881024
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	edi, 30
	call	sysconf@PLT
	sal	rax, 10
	mov	rsi, rax
	mov	eax, DWORD PTR -28[rbp]
	mov	r9d, 15728640
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -8[rbp], rax
	lea	rdi, .LC17[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 4
	mov	esi, 48
	mov	rdi, rax
	call	dma_set
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	dma_s2mm_status
	lea	rdi, .LC18[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 0
	mov	esi, 48
	mov	rdi, rax
	call	dma_set
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	dma_s2mm_status
	lea	rdi, .LC19[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 251658240
	mov	esi, 72
	mov	rdi, rax
	call	dma_set
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	dma_s2mm_status
	lea	rdi, .LC20[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 61441
	mov	esi, 48
	mov	rdi, rax
	call	dma_set
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	dma_s2mm_status
	lea	rdi, .LC21[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 4096
	mov	esi, 88
	mov	rdi, rax
	call	dma_set
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	dma_s2mm_status
	lea	rdi, .LC22[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	dma_s2mm_sync
	lea	rdi, .LC23[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 4096
	mov	rdi, rax
	call	memdump
	mov	edi, 30
	call	sysconf@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	munmap@PLT
	cmp	eax, -1
	jne	.L43
	lea	rdi, .LC24[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L43:
	mov	edi, 30
	call	sysconf@PLT
	sal	rax, 10
	mov	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	munmap@PLT
	cmp	eax, -1
	jne	.L44
	lea	rdi, .LC24[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L44:
	mov	edi, 30
	call	sysconf@PLT
	sal	rax, 10
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	munmap@PLT
	cmp	eax, -1
	jne	.L45
	lea	rdi, .LC24[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L45:
	mov	eax, DWORD PTR -28[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"413421.c"
	.text
	.align	2
	.global	dma_set
	.syntax unified
	.arm
	.fpu softvfp
	.type	dma_set, %function
dma_set:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	asr	r3, r3, #2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	nop
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	dma_set, .-dma_set
	.align	2
	.global	dma_get
	.syntax unified
	.arm
	.fpu softvfp
	.type	dma_get, %function
dma_get:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-12]
	asr	r3, r3, #2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	dma_get, .-dma_get
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Stream to memory-mapped status (0x%08x@0x%02x):\000"
	.align	2
.LC1:
	.ascii	" halted\000"
	.align	2
.LC2:
	.ascii	" running\000"
	.align	2
.LC3:
	.ascii	" idle\000"
	.align	2
.LC4:
	.ascii	" SGIncld\000"
	.align	2
.LC5:
	.ascii	" DMAIntErr\000"
	.align	2
.LC6:
	.ascii	" DMASlvErr\000"
	.align	2
.LC7:
	.ascii	" DMADecErr\000"
	.align	2
.LC8:
	.ascii	" SGIntErr\000"
	.align	2
.LC9:
	.ascii	" SGSlvErr\000"
	.align	2
.LC10:
	.ascii	" SGDecErr\000"
	.align	2
.LC11:
	.ascii	" IOC_Irq\000"
	.align	2
.LC12:
	.ascii	" Dly_Irq\000"
	.align	2
.LC13:
	.ascii	" Err_Irq\000"
	.text
	.align	2
	.global	dma_s2mm_status
	.syntax unified
	.arm
	.fpu softvfp
	.type	dma_s2mm_status, %function
dma_s2mm_status:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r1, #52
	ldr	r0, [fp, #-16]
	bl	dma_get
	str	r0, [fp, #-8]
	mov	r2, #52
	ldr	r1, [fp, #-8]
	ldr	r0, .L18
	bl	printf
	ldr	r3, [fp, #-8]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L5
	ldr	r0, .L18+4
	bl	printf
	b	.L6
.L5:
	ldr	r0, .L18+8
	bl	printf
.L6:
	ldr	r3, [fp, #-8]
	and	r3, r3, #2
	cmp	r3, #0
	beq	.L7
	ldr	r0, .L18+12
	bl	printf
.L7:
	ldr	r3, [fp, #-8]
	and	r3, r3, #8
	cmp	r3, #0
	beq	.L8
	ldr	r0, .L18+16
	bl	printf
.L8:
	ldr	r3, [fp, #-8]
	and	r3, r3, #16
	cmp	r3, #0
	beq	.L9
	ldr	r0, .L18+20
	bl	printf
.L9:
	ldr	r3, [fp, #-8]
	and	r3, r3, #32
	cmp	r3, #0
	beq	.L10
	ldr	r0, .L18+24
	bl	printf
.L10:
	ldr	r3, [fp, #-8]
	and	r3, r3, #64
	cmp	r3, #0
	beq	.L11
	ldr	r0, .L18+28
	bl	printf
.L11:
	ldr	r3, [fp, #-8]
	and	r3, r3, #256
	cmp	r3, #0
	beq	.L12
	ldr	r0, .L18+32
	bl	printf
.L12:
	ldr	r3, [fp, #-8]
	and	r3, r3, #512
	cmp	r3, #0
	beq	.L13
	ldr	r0, .L18+36
	bl	printf
.L13:
	ldr	r3, [fp, #-8]
	and	r3, r3, #1024
	cmp	r3, #0
	beq	.L14
	ldr	r0, .L18+40
	bl	printf
.L14:
	ldr	r3, [fp, #-8]
	and	r3, r3, #4096
	cmp	r3, #0
	beq	.L15
	ldr	r0, .L18+44
	bl	printf
.L15:
	ldr	r3, [fp, #-8]
	and	r3, r3, #8192
	cmp	r3, #0
	beq	.L16
	ldr	r0, .L18+48
	bl	printf
.L16:
	ldr	r3, [fp, #-8]
	and	r3, r3, #16384
	cmp	r3, #0
	beq	.L17
	ldr	r0, .L18+52
	bl	printf
.L17:
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	dma_s2mm_status, .-dma_s2mm_status
	.section	.rodata
	.align	2
.LC14:
	.ascii	"Memory-mapped to stream status (0x%08x@0x%02x):\000"
	.text
	.align	2
	.global	dma_mm2s_status
	.syntax unified
	.arm
	.fpu softvfp
	.type	dma_mm2s_status, %function
dma_mm2s_status:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r1, #4
	ldr	r0, [fp, #-16]
	bl	dma_get
	str	r0, [fp, #-8]
	mov	r2, #4
	ldr	r1, [fp, #-8]
	ldr	r0, .L34
	bl	printf
	ldr	r3, [fp, #-8]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L21
	ldr	r0, .L34+4
	bl	printf
	b	.L22
.L21:
	ldr	r0, .L34+8
	bl	printf
.L22:
	ldr	r3, [fp, #-8]
	and	r3, r3, #2
	cmp	r3, #0
	beq	.L23
	ldr	r0, .L34+12
	bl	printf
.L23:
	ldr	r3, [fp, #-8]
	and	r3, r3, #8
	cmp	r3, #0
	beq	.L24
	ldr	r0, .L34+16
	bl	printf
.L24:
	ldr	r3, [fp, #-8]
	and	r3, r3, #16
	cmp	r3, #0
	beq	.L25
	ldr	r0, .L34+20
	bl	printf
.L25:
	ldr	r3, [fp, #-8]
	and	r3, r3, #32
	cmp	r3, #0
	beq	.L26
	ldr	r0, .L34+24
	bl	printf
.L26:
	ldr	r3, [fp, #-8]
	and	r3, r3, #64
	cmp	r3, #0
	beq	.L27
	ldr	r0, .L34+28
	bl	printf
.L27:
	ldr	r3, [fp, #-8]
	and	r3, r3, #256
	cmp	r3, #0
	beq	.L28
	ldr	r0, .L34+32
	bl	printf
.L28:
	ldr	r3, [fp, #-8]
	and	r3, r3, #512
	cmp	r3, #0
	beq	.L29
	ldr	r0, .L34+36
	bl	printf
.L29:
	ldr	r3, [fp, #-8]
	and	r3, r3, #1024
	cmp	r3, #0
	beq	.L30
	ldr	r0, .L34+40
	bl	printf
.L30:
	ldr	r3, [fp, #-8]
	and	r3, r3, #4096
	cmp	r3, #0
	beq	.L31
	ldr	r0, .L34+44
	bl	printf
.L31:
	ldr	r3, [fp, #-8]
	and	r3, r3, #8192
	cmp	r3, #0
	beq	.L32
	ldr	r0, .L34+48
	bl	printf
.L32:
	ldr	r3, [fp, #-8]
	and	r3, r3, #16384
	cmp	r3, #0
	beq	.L33
	ldr	r0, .L34+52
	bl	printf
.L33:
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L35:
	.align	2
.L34:
	.word	.LC14
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	dma_mm2s_status, .-dma_mm2s_status
	.align	2
	.global	dma_mm2s_sync
	.syntax unified
	.arm
	.fpu softvfp
	.type	dma_mm2s_sync, %function
dma_mm2s_sync:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r1, #4
	ldr	r0, [fp, #-16]
	bl	dma_get
	str	r0, [fp, #-8]
	b	.L37
.L38:
	ldr	r0, [fp, #-16]
	bl	dma_s2mm_status
	ldr	r0, [fp, #-16]
	bl	dma_mm2s_status
	mov	r1, #4
	ldr	r0, [fp, #-16]
	bl	dma_get
	str	r0, [fp, #-8]
.L37:
	ldr	r3, [fp, #-8]
	and	r3, r3, #4096
	cmp	r3, #0
	beq	.L38
	ldr	r3, [fp, #-8]
	and	r3, r3, #2
	cmp	r3, #0
	beq	.L38
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	dma_mm2s_sync, .-dma_mm2s_sync
	.align	2
	.global	dma_s2mm_sync
	.syntax unified
	.arm
	.fpu softvfp
	.type	dma_s2mm_sync, %function
dma_s2mm_sync:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r1, #52
	ldr	r0, [fp, #-16]
	bl	dma_get
	str	r0, [fp, #-8]
	b	.L40
.L41:
	ldr	r0, [fp, #-16]
	bl	dma_s2mm_status
	ldr	r0, [fp, #-16]
	bl	dma_mm2s_status
	mov	r1, #52
	ldr	r0, [fp, #-16]
	bl	dma_get
	str	r0, [fp, #-8]
.L40:
	ldr	r3, [fp, #-8]
	and	r3, r3, #4096
	cmp	r3, #0
	beq	.L41
	ldr	r3, [fp, #-8]
	and	r3, r3, #2
	cmp	r3, #0
	beq	.L41
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	dma_s2mm_sync, .-dma_s2mm_sync
	.section	.rodata
	.align	2
.LC15:
	.ascii	"%5d %5d\012\000"
	.align	2
.LC16:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	memdump
	.syntax unified
	.arm
	.fpu softvfp
	.type	memdump, %function
memdump:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L46
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L43
.L44:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldrsh	r3, [r3]
	strh	r3, [fp, #-12]	@ movhi
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrsh	r3, [r3]
	strh	r3, [fp, #-10]	@ movhi
	ldrsh	r3, [fp, #-12]
	mov	r1, r3
	ldrsh	r3, [fp, #-10]
	mov	r2, r3
	ldr	r0, .L46+4
	bl	printf
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L43:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L44
	nop
	ldr	r3, .L46
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L45
	bl	__stack_chk_fail
.L45:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L47:
	.align	2
.L46:
	.word	.LC16
	.word	.LC15
	.size	memdump, .-memdump
	.section	.rodata
	.align	2
.LC17:
	.ascii	"/dev/mem\000"
	.align	2
.LC18:
	.ascii	"Resetting DMA\000"
	.align	2
.LC19:
	.ascii	"Halting DMA\000"
	.align	2
.LC20:
	.ascii	"Writing destination address\000"
	.align	2
.LC21:
	.ascii	"Starting S2MM channel with all interrupts masked..."
	.ascii	"\000"
	.align	2
.LC22:
	.ascii	"Writing S2MM transfer length...\000"
	.align	2
.LC23:
	.ascii	"Waiting for S2MM sychronization...\000"
	.align	2
.LC24:
	.ascii	"Destination memory block: \000"
	.align	2
.LC25:
	.ascii	"Can't unmap memory from user space.\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r1, .L53
	ldr	r0, .L53+4
	bl	open
	str	r0, [fp, #-20]
	mov	r0, #30
	bl	sysconf
	mov	r3, r0
	lsl	r3, r3, #4
	mov	r1, r3
	ldr	r3, .L53+8
	str	r3, [sp, #4]
	ldr	r3, [fp, #-20]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-16]
	mov	r0, #30
	bl	sysconf
	mov	r3, r0
	lsl	r3, r3, #10
	mov	r1, r3
	mov	r3, #234881024
	str	r3, [sp, #4]
	ldr	r3, [fp, #-20]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-12]
	mov	r0, #30
	bl	sysconf
	mov	r3, r0
	lsl	r3, r3, #10
	mov	r1, r3
	mov	r3, #15728640
	str	r3, [sp, #4]
	ldr	r3, [fp, #-20]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-8]
	ldr	r0, .L53+12
	bl	puts
	mov	r2, #4
	mov	r1, #48
	ldr	r0, [fp, #-16]
	bl	dma_set
	ldr	r0, [fp, #-16]
	bl	dma_s2mm_status
	ldr	r0, .L53+16
	bl	puts
	mov	r2, #0
	mov	r1, #48
	ldr	r0, [fp, #-16]
	bl	dma_set
	ldr	r0, [fp, #-16]
	bl	dma_s2mm_status
	ldr	r0, .L53+20
	bl	puts
	mov	r2, #251658240
	mov	r1, #72
	ldr	r0, [fp, #-16]
	bl	dma_set
	ldr	r0, [fp, #-16]
	bl	dma_s2mm_status
	ldr	r0, .L53+24
	bl	puts
	ldr	r2, .L53+28
	mov	r1, #48
	ldr	r0, [fp, #-16]
	bl	dma_set
	ldr	r0, [fp, #-16]
	bl	dma_s2mm_status
	ldr	r0, .L53+32
	bl	puts
	mov	r2, #4096
	mov	r1, #88
	ldr	r0, [fp, #-16]
	bl	dma_set
	ldr	r0, [fp, #-16]
	bl	dma_s2mm_status
	ldr	r0, .L53+36
	bl	puts
	ldr	r0, [fp, #-16]
	bl	dma_s2mm_sync
	ldr	r0, .L53+40
	bl	printf
	mov	r1, #4096
	ldr	r0, [fp, #-8]
	bl	memdump
	mov	r0, #30
	bl	sysconf
	mov	r3, r0
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	munmap
	mov	r3, r0
	cmn	r3, #1
	bne	.L49
	ldr	r0, .L53+44
	bl	puts
	mov	r0, #0
	bl	exit
.L49:
	mov	r0, #30
	bl	sysconf
	mov	r3, r0
	lsl	r3, r3, #10
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	munmap
	mov	r3, r0
	cmn	r3, #1
	bne	.L50
	ldr	r0, .L53+44
	bl	puts
	mov	r0, #0
	bl	exit
.L50:
	mov	r0, #30
	bl	sysconf
	mov	r3, r0
	lsl	r3, r3, #10
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	munmap
	mov	r3, r0
	cmn	r3, #1
	bne	.L51
	ldr	r0, .L53+44
	bl	puts
	mov	r0, #0
	bl	exit
.L51:
	ldr	r0, [fp, #-20]
	bl	close
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L54:
	.align	2
.L53:
	.word	1052674
	.word	.LC17
	.word	1077936128
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	61441
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
