	.file	"819858.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Random %zd: %d\n"
	.text
	.globl	print_random_numbers
	.type	print_random_numbers, @function
print_random_numbers:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -8[rbp], 0
	jmp	.L2
.L3:
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	add	QWORD PTR -8[rbp], 1
.L2:
	mov	rax, QWORD PTR -8[rbp]
	cmp	rax, QWORD PTR -32[rbp]
	jb	.L3
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	print_random_numbers, .-print_random_numbers
	.section	.rodata
.LC1:
	.string	"File error %d: %s\n"
	.text
	.globl	handle_file_error
	.type	handle_file_error, @function
handle_file_error:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -24
	mov	DWORD PTR -20[rbp], edi
	cmp	DWORD PTR -20[rbp], 0
	jns	.L6
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	rdx, rbx
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	handle_file_error, .-handle_file_error
	.section	.rodata
.LC2:
	.string	"Opening /dev/random:"
.LC3:
	.string	"/dev/random"
.LC4:
	.string	"Reading random numbers:"
.LC5:
	.string	"\nWriting to file:"
.LC6:
	.string	"./randnums"
.LC7:
	.string	"Write failed: %s.\n"
.LC8:
	.string	"Reading from file:"
.LC9:
	.string	"Read failed: %s.\n"
	.align 8
.LC10:
	.string	"\nVerification written numbers are the same:"
	.text
	.globl	main
	.type	main, @function
main:
.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, 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	esi, 0
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -108[rbp], eax
	mov	eax, DWORD PTR -108[rbp]
	mov	edi, eax
	call	handle_file_error
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rcx, -96[rbp]
	mov	eax, DWORD PTR -108[rbp]
	mov	edx, 40
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	lea	rax, -96[rbp]
	mov	esi, 10
	mov	rdi, rax
	call	print_random_numbers
	mov	eax, DWORD PTR -108[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edx, 438
	mov	esi, 65
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -104[rbp], eax
	mov	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	handle_file_error
	lea	rcx, -96[rbp]
	mov	eax, DWORD PTR -104[rbp]
	mov	edx, 40
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	test	rax, rax
	jns	.L8
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	esi, 0
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -100[rbp], eax
	mov	eax, DWORD PTR -100[rbp]
	mov	edi, eax
	call	handle_file_error
	lea	rcx, -48[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	edx, 40
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	test	rax, rax
	jns	.L9
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L9:
	lea	rdi, .LC10[rip]
	call	puts@PLT
	lea	rax, -48[rbp]
	mov	esi, 10
	mov	rdi, rax
	call	print_random_numbers
	mov	eax, DWORD PTR -100[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"819858.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Random %zd: %d\012\000"
	.text
	.align	2
	.global	print_random_numbers
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_random_numbers, %function
print_random_numbers:
	@ 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]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L3:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, [fp, #-8]
	ldr	r0, .L4
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	bcc	.L3
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.size	print_random_numbers, .-print_random_numbers
	.section	.rodata
	.align	2
.LC1:
	.ascii	"File error %d: %s\012\000"
	.text
	.align	2
	.global	handle_file_error
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_file_error, %function
handle_file_error:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L8
	bl	__errno_location
	mov	r3, r0
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L9
	bl	printf
	mov	r0, #1
	bl	exit
.L8:
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC1
	.size	handle_file_error, .-handle_file_error
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Opening /dev/random:\000"
	.align	2
.LC3:
	.ascii	"/dev/random\000"
	.align	2
.LC4:
	.ascii	"Reading random numbers:\000"
	.align	2
.LC5:
	.ascii	"\012Writing to file:\000"
	.align	2
.LC6:
	.ascii	"./randnums\000"
	.align	2
.LC7:
	.ascii	"Write failed: %s.\012\000"
	.align	2
.LC8:
	.ascii	"Reading from file:\000"
	.align	2
.LC9:
	.ascii	"Read failed: %s.\012\000"
	.align	2
.LC10:
	.ascii	"\012Verification written numbers are the same:\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 = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #96
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L16+4
	bl	puts
	mov	r1, #0
	ldr	r0, .L16+8
	bl	open
	str	r0, [fp, #-100]
	ldr	r0, [fp, #-100]
	bl	handle_file_error
	ldr	r0, .L16+12
	bl	puts
	sub	r3, fp, #88
	mov	r2, #40
	mov	r1, r3
	ldr	r0, [fp, #-100]
	bl	read
	sub	r3, fp, #88
	mov	r1, #10
	mov	r0, r3
	bl	print_random_numbers
	ldr	r0, [fp, #-100]
	bl	close
	ldr	r0, .L16+16
	bl	puts
	ldr	r2, .L16+20
	mov	r1, #65
	ldr	r0, .L16+24
	bl	open
	str	r0, [fp, #-96]
	ldr	r0, [fp, #-96]
	bl	handle_file_error
	sub	r3, fp, #88
	mov	r2, #40
	mov	r1, r3
	ldr	r0, [fp, #-96]
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bge	.L12
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L16+28
	bl	printf
	mov	r0, #1
	bl	exit
.L12:
	ldr	r0, [fp, #-96]
	bl	close
	ldr	r0, .L16+32
	bl	puts
	mov	r1, #0
	ldr	r0, .L16+24
	bl	open
	str	r0, [fp, #-92]
	ldr	r0, [fp, #-92]
	bl	handle_file_error
	sub	r3, fp, #48
	mov	r2, #40
	mov	r1, r3
	ldr	r0, [fp, #-92]
	bl	read
	mov	r3, r0
	cmp	r3, #0
	bge	.L13
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L16+36
	bl	printf
	mov	r0, #0
	bl	exit
.L13:
	ldr	r0, .L16+40
	bl	puts
	sub	r3, fp, #48
	mov	r1, #10
	mov	r0, r3
	bl	print_random_numbers
	ldr	r0, [fp, #-92]
	bl	close
	mov	r3, #0
	ldr	r2, .L16
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC11
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	438
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
