	.file	"720352.c"
	.intel_syntax noprefix
	.text
	.globl	help_str
	.section	.rodata
	.align 8
.LC0:
	.string	"ERROR: Incorrect number of arguments.\n\nNAME\n\tfilereader - Read and print contents of a file.\nSYNOPSIS\n\tfilereader nameofthefile.txt\n\n"
	.section	.data.rel.local,"aw"
	.align 8
	.type	help_str, @object
	.size	help_str, 8
help_str:
	.quad	.LC0
	.section	.rodata
.LC1:
	.string	"Reading file %s\n"
.LC2:
	.string	"***************************\n"
.LC3:
	.string	"%s"
	.text
	.globl	readInputFileName
	.type	readInputFileName, @function
readInputFileName:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	cmp	DWORD PTR -4[rbp], 2
	jne	.L2
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	jmp	.L6
.L2:
	cmp	DWORD PTR -4[rbp], 2
	jle	.L4
	mov	rax, QWORD PTR help_str[rip]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	rax, QWORD PTR help_str[rip]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	readInputFileName, .-readInputFileName
	.section	.rodata
.LC4:
	.string	"r"
	.align 8
.LC5:
	.string	"ERROR: File could not be opened."
	.text
	.globl	main
	.type	main, @function
main:
.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rdx, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	readInputFileName
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L8
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	jmp	.L9
.L10:
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
.L9:
	mov	rdx, QWORD PTR -24[rbp]
	lea	rcx, -32[rbp]
	lea	rax, -40[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	getline@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], -1
	jne	.L10
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	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
.LFE7:
	.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	"720352.c"
	.text
	.global	help_str
	.section	.rodata
	.align	2
.LC0:
	.ascii	"ERROR: Incorrect number of arguments.\012\012NAME\012"
	.ascii	"\011filereader - Read and print contents of a file."
	.ascii	"\012SYNOPSIS\012\011filereader nameofthefile.txt\012"
	.ascii	"\012\000"
	.data
	.align	2
	.type	help_str, %object
	.size	help_str, 4
help_str:
	.word	.LC0
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Reading file %s\012\000"
	.align	2
.LC2:
	.ascii	"***************************\012\000"
	.align	2
.LC3:
	.ascii	"%s\000"
	.text
	.align	2
	.global	readInputFileName
	.syntax unified
	.arm
	.fpu softvfp
	.type	readInputFileName, %function
readInputFileName:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	bne	.L2
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L7
	bl	printf
	ldr	r0, .L7+4
	bl	puts
	b	.L6
.L2:
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	ble	.L4
	ldr	r3, .L7+8
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L7+12
	bl	printf
	mov	r0, #1
	bl	exit
.L4:
	ldr	r3, .L7+8
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L7+12
	bl	printf
	mov	r0, #1
	bl	exit
.L6:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC1
	.word	.LC2
	.word	help_str
	.word	.LC3
	.size	readInputFileName, .-readInputFileName
	.section	.rodata
	.align	2
.LC4:
	.ascii	"r\000"
	.align	2
.LC5:
	.ascii	"ERROR: File could not be opened.\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.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	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	readInputFileName
	mov	r3, r0
	ldr	r1, .L15+4
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L10
	ldr	r0, .L15+8
	bl	puts
	mov	r0, #1
	bl	exit
.L10:
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L11
.L12:
	ldr	r3, [fp, #-24]
	mov	r1, r3
	ldr	r0, .L15+12
	bl	printf
.L11:
	sub	r1, fp, #20
	sub	r3, fp, #24
	ldr	r2, [fp, #-16]
	mov	r0, r3
	bl	getline
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L12
	ldr	r0, [fp, #-16]
	bl	fclose
	mov	r3, #0
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC6
	.word	.LC4
	.word	.LC5
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
