	.file	"90763366.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_pru1"
	.align 8
.LC1:
	.string	"Failed to open /dev/rpmsg_pru1"
.LC2:
	.string	"Error writing to PRU"
.LC3:
	.string	"ch%d=%4u, "
.LC4:
	.string	"ts=%lu,\t"
.LC5:
	.string	"delta=%lu,\n"
.LC6:
	.string	"Error reading from device"
	.align 8
.LC7:
	.string	"[[read only %d bytes, buffer size %u]]\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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, 2
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], 0
	jns	.L2
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L3
.L2:
	mov	QWORD PTR -16[rbp], 0
.L11:
	mov	eax, DWORD PTR -28[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -24[rbp], eax
	cmp	DWORD PTR -24[rbp], 0
	jns	.L4
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -28[rbp]
	mov	edx, 512
	lea	rsi, readBuf[rip]
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -24[rbp], eax
	cmp	DWORD PTR -24[rbp], 488
	jne	.L5
	lea	rax, readBuf[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -32[rbp], 0
	jmp	.L6
.L8:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -32[rbp]
	movsx	rdx, edx
	movzx	eax, WORD PTR 8[rax+rdx*2]
	movzx	esi, ax
	mov	edx, DWORD PTR -32[rbp]
	movsx	rax, edx
	imul	rax, rax, 715827883
	shr	rax, 32
	mov	edi, edx
	sar	edi, 31
	mov	ecx, eax
	sub	ecx, edi
	mov	eax, ecx
	add	eax, eax
	add	eax, ecx
	add	eax, eax
	mov	ecx, edx
	sub	ecx, eax
	mov	edx, esi
	mov	esi, ecx
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	ecx, DWORD PTR -32[rbp]
	movsx	rax, ecx
	imul	rax, rax, 715827883
	shr	rax, 32
	mov	esi, ecx
	sar	esi, 31
	mov	edx, eax
	sub	edx, esi
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	add	eax, eax
	sub	ecx, eax
	mov	edx, ecx
	cmp	edx, 5
	jne	.L7
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	sub	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
.L7:
	add	DWORD PTR -32[rbp], 1
.L6:
	cmp	DWORD PTR -32[rbp], 239
	jle	.L8
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L11
.L5:
	cmp	DWORD PTR -24[rbp], 0
	jns	.L10
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L3
.L10:
	mov	DWORD PTR -20[rbp], 488
	mov	edx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L11
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	"90763366.c"
	.text
	.comm	readBuf,512,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/dev/rpmsg_pru1\000"
	.align	2
.LC1:
	.ascii	"Failed to open /dev/rpmsg_pru1\000"
	.align	2
.LC2:
	.ascii	"Error writing to PRU\000"
	.align	2
.LC3:
	.ascii	"ch%d=%4u, \000"
	.align	2
.LC4:
	.ascii	"ts=%llu,\011\000"
	.align	2
.LC5:
	.ascii	"delta=%llu,\012\000"
	.align	2
.LC6:
	.ascii	"Error reading from device\000"
	.align	2
.LC7:
	.ascii	"[[read only %d bytes, buffer size %u]]\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #32
	mov	r1, #2
	ldr	r0, .L12
	bl	open
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L12+4
	bl	perror
	mvn	r3, #0
	b	.L3
.L2:
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
.L11:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-36]
	bl	write
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L12+8
	bl	perror
	mvn	r3, #0
	b	.L3
.L4:
	mov	r2, #512
	ldr	r1, .L12+12
	ldr	r0, [fp, #-36]
	bl	read
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #488
	bne	.L5
	ldr	r3, .L12+12
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L6
.L8:
	ldr	r2, [fp, #-40]
	ldr	r3, .L12+16
	smull	r0, r1, r3, r2
	asr	r3, r2, #31
	sub	r1, r1, r3
	mov	r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r1
	lsl	r3, r3, #1
	sub	r1, r2, r3
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-40]
	add	r3, r3, #4
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	mov	r2, r3
	ldr	r0, .L12+20
	bl	printf
	ldr	r1, [fp, #-40]
	ldr	r3, .L12+16
	smull	r0, r2, r3, r1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	cmp	r2, #5
	bne	.L7
	ldr	r3, [fp, #-24]
	ldmia	r3, {r2-r3}
	ldr	r0, .L12+24
	bl	printf
	ldr	r3, [fp, #-24]
	ldmia	r3, {r0-r1}
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	subs	r4, r0, r2
	sbc	r5, r1, r3
	mov	r2, r4
	mov	r3, r5
	ldr	r0, .L12+28
	bl	printf
.L7:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L6:
	ldr	r3, [fp, #-40]
	cmp	r3, #239
	ble	.L8
	ldr	r3, [fp, #-24]
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	b	.L11
.L5:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bge	.L10
	ldr	r0, .L12+32
	bl	perror
	mvn	r3, #0
	b	.L3
.L10:
	mov	r3, #488
	str	r3, [fp, #-28]
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-32]
	ldr	r0, .L12+36
	bl	printf
	b	.L11
.L3:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	readBuf
	.word	715827883
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
