	.file	"672786.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"80-14-5-random-numbers"
	.align 8
.LC1:
	.string	"Input a position. Number at this position will be printed out on the screen: "
.LC2:
	.string	"%d"
	.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, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC0[rip]
	mov	QWORD PTR -24[rbp], rax
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	createRandomNumbers
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	readFile
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -28[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -28[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	outputFileAtPosition
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC3:
	.string	"rb"
.LC4:
	.string	"Could not open file."
.LC5:
	.string	"%d\n"
.LC6:
	.string	"Could not close the file."
	.text
	.globl	readFile
	.type	readFile, @function
readFile:
.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	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L6
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
.L6:
	mov	rdx, QWORD PTR -32[rbp]
	lea	rax, -12[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 4
	mov	rdi, rax
	call	fread@PLT
	cmp	rax, 1
	je	.L7
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	fclose@PLT
	test	eax, eax
	je	.L8
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 2
	call	exit@PLT
.L8:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	readFile, .-readFile
	.section	.rodata
.LC7:
	.string	"ab"
	.text
	.globl	writeToFile
	.type	writeToFile, @function
writeToFile:
.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 -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	DWORD PTR -20[rbp], edx
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L12
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	mov	rdx, QWORD PTR -16[rbp]
	lea	rax, -20[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 4
	mov	rdi, rax
	call	fwrite@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	test	eax, eax
	je	.L13
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 2
	call	exit@PLT
.L13:
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	writeToFile, .-writeToFile
	.section	.rodata
	.align 8
.LC8:
	.string	"Input number of random samples: "
.LC9:
	.string	"wb"
	.text
	.globl	createRandomNumbers
	.type	createRandomNumbers, @function
createRandomNumbers:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -28[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	rax, QWORD PTR -40[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	DWORD PTR -20[rbp], 0
	jmp	.L16
.L17:
	call	rand@PLT
	mov	DWORD PTR -24[rbp], eax
	mov	edx, DWORD PTR -24[rbp]
	mov	rcx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	writeToFile
	add	DWORD PTR -20[rbp], 1
.L16:
	mov	eax, DWORD PTR -28[rbp]
	cmp	DWORD PTR -20[rbp], eax
	jl	.L17
	nop
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	createRandomNumbers, .-createRandomNumbers
	.section	.rodata
.LC10:
	.string	"Could not seek the position."
.LC11:
	.string	"Number at this positions: %d\n"
	.text
	.globl	outputFileAtPosition
	.type	outputFileAtPosition, @function
outputFileAtPosition:
.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, 64
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -52[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -40[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -48[rbp], rax
	cmp	QWORD PTR -48[rbp], 0
	jne	.L20
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L20:
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 2
	mov	QWORD PTR -16[rbp], rax
	mov	rcx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	test	eax, eax
	je	.L21
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 3
	call	exit@PLT
.L21:
	mov	rdx, QWORD PTR -48[rbp]
	lea	rax, -20[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 4
	mov	rdi, rax
	call	fread@PLT
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	fclose@PLT
	test	eax, eax
	je	.L22
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 2
	call	exit@PLT
.L22:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	outputFileAtPosition, .-outputFileAtPosition
	.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	"672786.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"80-14-5-random-numbers\000"
	.align	2
.LC1:
	.ascii	"Input a position. Number at this position will be p"
	.ascii	"rinted out on the screen: \000"
	.align	2
.LC2:
	.ascii	"%d\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.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, #16
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L4+4
	str	r3, [fp, #-16]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	createRandomNumbers
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	readFile
	ldr	r0, .L4+8
	bl	printf
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L4+12
	bl	__isoc99_scanf
	ldr	r3, [fp, #-20]
	mov	r2, r3
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	outputFileAtPosition
	mov	r3, #0
	ldr	r2, .L4
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.section	.rodata
	.align	2
.LC4:
	.ascii	"rb\000"
	.align	2
.LC5:
	.ascii	"Could not open file.\000"
	.align	2
.LC6:
	.ascii	"%d\012\000"
	.align	2
.LC7:
	.ascii	"Could not close the file.\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	readFile
	.syntax unified
	.arm
	.fpu softvfp
	.type	readFile, %function
readFile:
	@ 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]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L13+4
	ldr	r0, [fp, #-16]
	bl	fopen
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L8
	ldr	r0, .L13+8
	bl	printf
	mov	r0, #1
	bl	exit
.L9:
	ldr	r3, [fp, #-12]
	mov	r1, r3
	ldr	r0, .L13+12
	bl	printf
.L8:
	sub	r0, fp, #12
	ldr	r3, [fp, #-20]
	mov	r2, #1
	mov	r1, #4
	bl	fread
	mov	r3, r0
	cmp	r3, #1
	beq	.L9
	ldr	r0, [fp, #-20]
	bl	fclose
	mov	r3, r0
	cmp	r3, #0
	beq	.L10
	ldr	r0, .L13+16
	bl	printf
	mov	r0, #2
	bl	exit
.L10:
	mov	r3, #0
	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	.LC8
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	readFile, .-readFile
	.section	.rodata
	.align	2
.LC9:
	.ascii	"ab\000"
	.text
	.align	2
	.global	writeToFile
	.syntax unified
	.arm
	.fpu softvfp
	.type	writeToFile, %function
writeToFile:
	@ 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r1, .L19
	ldr	r0, [fp, #-8]
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L16
	ldr	r0, .L19+4
	bl	printf
	mov	r0, #1
	bl	exit
.L16:
	sub	r0, fp, #16
	ldr	r3, [fp, #-12]
	mov	r2, #1
	mov	r1, #4
	bl	fwrite
	ldr	r0, [fp, #-12]
	bl	fclose
	mov	r3, r0
	cmp	r3, #0
	beq	.L17
	ldr	r0, .L19+8
	bl	printf
	mov	r0, #2
	bl	exit
.L17:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC9
	.word	.LC5
	.word	.LC7
	.size	writeToFile, .-writeToFile
	.section	.rodata
	.align	2
.LC10:
	.ascii	"Input number of random samples: \000"
	.align	2
.LC11:
	.ascii	"wb\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	createRandomNumbers
	.syntax unified
	.arm
	.fpu softvfp
	.type	createRandomNumbers, %function
createRandomNumbers:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L25
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L25+4
	bl	printf
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L25+8
	bl	__isoc99_scanf
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	ldr	r1, .L25+12
	ldr	r0, [fp, #-32]
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r0, [fp, #-12]
	bl	fclose
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L22
.L23:
	bl	rand
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	writeToFile
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L22:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L23
	nop
	ldr	r2, .L25
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L24
	bl	__stack_chk_fail
.L24:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC12
	.word	.LC10
	.word	.LC2
	.word	.LC11
	.size	createRandomNumbers, .-createRandomNumbers
	.section	.rodata
	.align	2
.LC13:
	.ascii	"Could not seek the position.\000"
	.align	2
.LC14:
	.ascii	"Number at this positions: %d\012\000"
	.align	2
.LC15:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	outputFileAtPosition
	.syntax unified
	.arm
	.fpu softvfp
	.type	outputFileAtPosition, %function
outputFileAtPosition:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	ldr	r3, .L33
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L33+4
	ldr	r0, [fp, #-24]
	bl	fopen
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L28
	ldr	r0, .L33+8
	bl	printf
	mov	r0, #1
	bl	exit
.L28:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	str	r3, [fp, #-12]
	mov	r2, #0
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-28]
	bl	fseek
	mov	r3, r0
	cmp	r3, #0
	beq	.L29
	ldr	r0, .L33+12
	bl	printf
	mov	r0, #3
	bl	exit
.L29:
	sub	r0, fp, #16
	ldr	r3, [fp, #-28]
	mov	r2, #1
	mov	r1, #4
	bl	fread
	ldr	r3, [fp, #-16]
	mov	r1, r3
	ldr	r0, .L33+16
	bl	printf
	ldr	r0, [fp, #-28]
	bl	fclose
	mov	r3, r0
	cmp	r3, #0
	beq	.L30
	ldr	r0, .L33+20
	bl	printf
	mov	r0, #2
	bl	exit
.L30:
	mov	r3, #0
	ldr	r2, .L33
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L32
	bl	__stack_chk_fail
.L32:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	.LC15
	.word	.LC4
	.word	.LC5
	.word	.LC13
	.word	.LC14
	.word	.LC7
	.size	outputFileAtPosition, .-outputFileAtPosition
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
