	.file	"1222948.c"
	.intel_syntax noprefix
	.text
	.globl	readBuf
	.bss
	.align 32
	.type	readBuf, @object
	.size	readBuf, 512
readBuf:
	.zero	512
	.section	.rodata
.LC0:
	.string	"/dev/rpmsg_pru30"
.LC1:
	.string	"Failed to open %s\n"
	.align 8
.LC2:
	.string	"Opened %s, sending address to read to PRU\n"
.LC3:
	.string	"hello PRU!"
	.align 8
.LC4:
	.string	"Waiting for PRU answer through character device %s\n"
	.align 8
.LC5:
	.string	"Sample is ready to read in PRU memory, \n Reading Data points\n"
.LC6:
	.string	"/dev/mem"
	.align 8
.LC7:
	.string	"Failed to open memory, you need to be root! "
.LC8:
	.string	"Failed to map base address"
.LC9:
	.string	"Value at address 0x%X is: %d\n"
.LC10:
	.string	"Failed to unmap memory"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -60[rbp], 0
	mov	DWORD PTR -56[rbp], 1024
	mov	QWORD PTR -48[rbp], 1244667904
	mov	esi, 2
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -16[rbp]
	test	eax, eax
	jns	.L2
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L11
.L2:
	lea	rsi, .LC0[rip]
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -16[rbp]
	mov	edx, 10
	lea	rsi, .LC3[rip]
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -60[rbp], eax
	cmp	DWORD PTR -60[rbp], 0
	jle	.L4
	lea	rsi, .LC0[rip]
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
.L4:
	mov	eax, DWORD PTR -16[rbp]
	mov	edx, 8
	lea	rsi, readBuf[rip]
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -60[rbp], eax
	cmp	DWORD PTR -60[rbp], 0
	jle	.L5
	lea	rsi, readBuf[rip]
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
.L5:
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	close@PLT
	mov	esi, 1052674
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], -1
	jne	.L6
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L11
.L6:
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	rax, QWORD PTR -48[rbp]
	and	rax, -1024
	mov	rdx, rax
	mov	eax, DWORD PTR -52[rbp]
	mov	r9, rdx
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	esi, 1024
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], -1
	jne	.L7
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L11
.L7:
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	DWORD PTR -64[rbp], 0
	jmp	.L8
.L9:
	mov	rax, QWORD PTR -48[rbp]
	and	eax, 1023
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	QWORD PTR -32[rbp], rax
	add	QWORD PTR -48[rbp], 4
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	mov	QWORD PTR -24[rbp], rax
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	add	DWORD PTR -64[rbp], 1
.L8:
	mov	eax, DWORD PTR -64[rbp]
	cmp	DWORD PTR -56[rbp], eax
	ja	.L9
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	munmap@PLT
	cmp	eax, -1
	jne	.L10
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L11
.L10:
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
.L11:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.type	delay, @function
delay:
.LFB7:
	.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	DWORD PTR -20[rbp], edi
	mov	eax, DWORD PTR -20[rbp]
	imul	eax, eax, 100000
	mov	DWORD PTR -12[rbp], eax
	call	clock@PLT
	mov	QWORD PTR -8[rbp], rax
	nop
.L14:
	call	clock@PLT
	mov	edx, DWORD PTR -12[rbp]
	movsx	rcx, edx
	mov	rdx, QWORD PTR -8[rbp]
	add	rdx, rcx
	cmp	rax, rdx
	jl	.L14
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	delay, .-delay
	.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	"1222948.c"
	.text
	.comm	readBuf,512,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/dev/rpmsg_pru30\000"
	.align	2
.LC1:
	.ascii	"Failed to open %s\012\000"
	.align	2
.LC2:
	.ascii	"Opened %s, sending address to read to PRU\012\000"
	.align	2
.LC3:
	.ascii	"hello PRU!\000"
	.align	2
.LC4:
	.ascii	"Waiting for PRU answer through character device %s\012"
	.ascii	"\000"
	.align	2
.LC5:
	.ascii	"Sample is ready to read in PRU memory, \012 Reading"
	.ascii	" Data points\012\000"
	.align	2
.LC6:
	.ascii	"/dev/mem\000"
	.align	2
.LC7:
	.ascii	"Failed to open memory, you need to be root! \000"
	.align	2
.LC8:
	.ascii	"Failed to map base address\000"
	.align	2
.LC9:
	.ascii	"Value at address 0x%X is: %d\012\000"
	.align	2
.LC10:
	.ascii	"Failed to unmap memory\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #1024
	str	r3, [fp, #-36]
	ldr	r3, .L13+4
	str	r3, [fp, #-44]
	mov	r1, #2
	ldr	r0, .L13+8
	bl	open
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L2
	ldr	r1, .L13+8
	ldr	r0, .L13+12
	bl	printf
	mvn	r3, #0
	b	.L11
.L2:
	ldr	r1, .L13+8
	ldr	r0, .L13+16
	bl	printf
	ldr	r3, [fp, #-16]
	mov	r2, #10
	ldr	r1, .L13+20
	mov	r0, r3
	bl	write
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	ble	.L4
	ldr	r1, .L13+8
	ldr	r0, .L13+24
	bl	printf
.L4:
	ldr	r3, [fp, #-16]
	mov	r2, #4
	ldr	r1, .L13+28
	mov	r0, r3
	bl	read
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	ble	.L5
	ldr	r1, .L13+28
	ldr	r0, .L13+32
	bl	printf
.L5:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	close
	ldr	r1, .L13+36
	ldr	r0, .L13+40
	bl	open
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmn	r3, #1
	bne	.L6
	ldr	r0, .L13+44
	bl	puts
	mvn	r3, #0
	b	.L11
.L6:
	ldr	r3, .L13+48
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, [fp, #-44]
	bic	r3, r3, #1020
	bic	r3, r3, #3
	str	r3, [sp, #4]
	ldr	r3, [fp, #-32]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r1, #1024
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L7
	ldr	r0, .L13+52
	bl	puts
	mvn	r3, #0
	b	.L11
.L7:
	ldr	r3, .L13+48
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L8
.L9:
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #22
	lsr	r3, r3, #22
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-44]
	ldr	r0, .L13+56
	bl	printf
	ldr	r3, .L13+48
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L8:
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	bhi	.L9
	mov	r1, #1024
	ldr	r0, [fp, #-28]
	bl	munmap
	mov	r3, r0
	cmn	r3, #1
	bne	.L10
	ldr	r0, .L13+60
	bl	printf
	mvn	r3, #0
	b	.L11
.L10:
	ldr	r0, [fp, #-32]
	bl	close
	mov	r3, #0
.L11:
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC11
	.word	1244667904
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	readBuf
	.word	.LC5
	.word	1052674
	.word	.LC6
	.word	.LC7
	.word	stdout
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	main, .-main
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	delay, %function
delay:
	@ 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]
	ldr	r3, [fp, #-16]
	ldr	r2, .L17
	mul	r3, r2, r3
	str	r3, [fp, #-12]
	bl	clock
	str	r0, [fp, #-8]
	nop
.L16:
	bl	clock
	mov	r1, r0
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	cmp	r1, r3
	blt	.L16
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	100000
	.size	delay, .-delay
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
