	.file	"151705401.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"\nFile name to read?"
	.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, 2064
	mov	DWORD PTR -2052[rbp], edi
	mov	QWORD PTR -2064[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -2052[rbp], 1
	jle	.L2
	mov	rax, QWORD PTR -2064[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -2064[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	lea	rax, -1040[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	fileread
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L4
	jmp	.L5
.L2:
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	printf@PLT
	lea	rdx, -1040[rbp]
	lea	rax, -2048[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	mov	eax, 0
	call	fileread
	jmp	.L2
.L5:
	call	__stack_chk_fail@PLT
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC1:
	.string	"r"
.LC2:
	.string	"File does not exist!"
	.text
	.globl	fileread
	.type	fileread, @function
fileread:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1440
	mov	QWORD PTR -1432[rbp], rdi
	mov	QWORD PTR -1440[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -1408[rbp]
	mov	rax, QWORD PTR -1440[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	test	eax, eax
	jne	.L7
	mov	rax, QWORD PTR -1440[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -1416[rbp], rax
	mov	rdx, QWORD PTR -1416[rbp]
	lea	rax, -1264[rbp]
	mov	esi, 1255
	mov	rdi, rax
	call	fgets@PLT
	mov	rax, QWORD PTR -1416[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rdx, -1264[rbp]
	mov	rax, QWORD PTR -1432[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, 0
	jmp	.L9
.L7:
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
.L9:
	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
.LFE1:
	.size	fileread, .-fileread
	.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	"151705401.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012File name to read?\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 2040
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2032
	sub	sp, sp, #8
	str	r0, [fp, #-2040]
	str	r1, [fp, #-2044]
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-2040]
	cmp	r3, #1
	ble	.L2
	ldr	r3, [fp, #-2044]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	printf
	ldr	r3, [fp, #-2044]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	fileread
	mov	r3, #0
	ldr	r2, .L6
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L4
	b	.L5
.L2:
	ldr	r0, .L6+4
	bl	puts
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	gets
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	printf
	sub	r2, fp, #1024
	sub	r2, r2, #4
	sub	r2, r2, #4
	sub	r3, fp, #2016
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r1, r2
	mov	r0, r3
	bl	fileread
	b	.L2
.L5:
	bl	__stack_chk_fail
.L4:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC1
	.word	.LC0
	.size	main, .-main
	.section	.rodata
	.align	2
.LC2:
	.ascii	"r\000"
	.align	2
.LC3:
	.ascii	"File does not exist!\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	fileread
	.syntax unified
	.arm
	.fpu softvfp
	.type	fileread, %function
fileread:
	@ args = 0, pretend = 0, frame = 1368
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1360
	sub	sp, sp, #8
	str	r0, [fp, #-1368]
	str	r1, [fp, #-1372]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #1344
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r1, r3
	ldr	r0, [fp, #-1372]
	bl	stat
	mov	r3, r0
	cmp	r3, #0
	bne	.L9
	ldr	r1, .L13+4
	ldr	r0, [fp, #-1372]
	bl	fopen
	str	r0, [fp, #-1360]
	sub	r3, fp, #1248
	sub	r3, r3, #4
	sub	r3, r3, #12
	ldr	r2, [fp, #-1360]
	ldr	r1, .L13+8
	mov	r0, r3
	bl	fgets
	ldr	r0, [fp, #-1360]
	bl	fclose
	sub	r3, fp, #1248
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r1, r3
	ldr	r0, [fp, #-1368]
	bl	strcpy
	mov	r3, #0
	b	.L11
.L9:
	ldr	r0, .L13+12
	bl	printf
	mov	r3, #1
.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	.LC4
	.word	.LC2
	.word	1255
	.word	.LC3
	.size	fileread, .-fileread
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
