	.file	"865263.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"Error while reading file: %s"
.LC2:
	.string	"Error while closing file: %s"
.LC3:
	.string	"Cannot open file: %s\n"
	.text
	.globl	catfile
	.type	catfile, @function
catfile:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -40[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	je	.L2
	mov	DWORD PTR -20[rbp], 0
	jmp	.L3
.L9:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, 13
	je	.L4
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, 10
	jne	.L5
.L4:
	cmp	DWORD PTR -20[rbp], 0
	je	.L6
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, 10
	je	.L14
.L6:
	mov	edi, 10
	call	putchar@PLT
	jmp	.L14
.L5:
	mov	eax, DWORD PTR -24[rbp]
	mov	edi, eax
	call	putchar@PLT
	jmp	.L8
.L14:
	nop
.L8:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, 13
	sete	al
	movzx	eax, al
	mov	DWORD PTR -20[rbp], eax
.L3:
	mov	rdx, QWORD PTR -16[rbp]
	lea	rax, -24[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	cmp	rax, 1
	je	.L9
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	jne	.L10
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
.L10:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	test	eax, eax
	je	.L15
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L15
.L2:
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
.L15:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	catfile, .-catfile
	.section	.rodata
.LC4:
	.string	"dummy-to-test-filenotfound"
.LC5:
	.string	"test-lf.txt"
.LC6:
	.string	"test-cr.txt"
.LC7:
	.string	"testcrlf.txt"
.LC8:
	.string	"Printing file: %s\n"
	.align 8
.LC9:
	.string	"================================================================================"
	.align 8
.LC10:
	.string	"\n================================================================================"
	.text
	.globl	main
	.type	main, @function
main:
.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, 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -52[rbp], 4
	lea	rax, .LC4[rip]
	mov	QWORD PTR -48[rbp], rax
	lea	rax, .LC5[rip]
	mov	QWORD PTR -40[rbp], rax
	lea	rax, .LC6[rip]
	mov	QWORD PTR -32[rbp], rax
	lea	rax, .LC7[rip]
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -56[rbp], 0
	jmp	.L17
.L18:
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	mov	rax, QWORD PTR -48[rbp+rax*8]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	mov	rax, QWORD PTR -48[rbp+rax*8]
	mov	rdi, rax
	call	catfile
	lea	rdi, .LC10[rip]
	call	puts@PLT
	add	DWORD PTR -56[rbp], 1
.L17:
	mov	eax, DWORD PTR -56[rbp]
	cmp	eax, DWORD PTR -52[rbp]
	jl	.L18
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	"865263.c"
	.section	.rodata
	.align	2
.LC0:
	.ascii	"dummy-to-test-filenotfound\000"
	.align	2
.LC1:
	.ascii	"test-lf.txt\000"
	.align	2
.LC2:
	.ascii	"test-cr.txt\000"
	.align	2
.LC3:
	.ascii	"testcrlf.txt\000"
	.text
	.section	.rodata
	.align	2
.LC5:
	.ascii	"r\000"
	.align	2
.LC6:
	.ascii	"Error while reading file: %s\000"
	.align	2
.LC7:
	.ascii	"Error while closing file: %s\000"
	.align	2
.LC8:
	.ascii	"Cannot open file: %s\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	catfile
	.syntax unified
	.arm
	.fpu softvfp
	.type	catfile, %function
catfile:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L16+4
	ldr	r0, [fp, #-24]
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L2
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L3
.L9:
	ldr	r3, [fp, #-20]
	cmp	r3, #13
	beq	.L4
	ldr	r3, [fp, #-20]
	cmp	r3, #10
	bne	.L5
.L4:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L6
	ldr	r3, [fp, #-20]
	cmp	r3, #10
	beq	.L14
.L6:
	mov	r0, #10
	bl	putchar
	b	.L14
.L5:
	ldr	r3, [fp, #-20]
	mov	r0, r3
	bl	putchar
	b	.L8
.L14:
	nop
.L8:
	ldr	r3, [fp, #-20]
	cmp	r3, #13
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	str	r3, [fp, #-16]
.L3:
	sub	r0, fp, #20
	ldr	r3, [fp, #-12]
	mov	r2, #1
	mov	r1, #1
	bl	fread
	mov	r3, r0
	cmp	r3, #1
	beq	.L9
	ldr	r0, [fp, #-12]
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	bne	.L10
	ldr	r1, [fp, #-24]
	ldr	r0, .L16+8
	bl	printf
.L10:
	ldr	r0, [fp, #-12]
	bl	fclose
	mov	r3, r0
	cmp	r3, #0
	beq	.L15
	ldr	r1, [fp, #-24]
	ldr	r0, .L16+12
	bl	printf
	b	.L15
.L2:
	ldr	r1, [fp, #-24]
	ldr	r0, .L16+16
	bl	printf
.L15:
	nop
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC9
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	catfile, .-catfile
	.section	.rodata
	.align	2
.LC11:
	.ascii	"Printing file: %s\012\000"
	.align	2
.LC12:
	.ascii	"==================================================="
	.ascii	"=============================\000"
	.align	2
.LC13:
	.ascii	"\012==============================================="
	.ascii	"=================================\000"
	.align	2
.LC10:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.align	2
.LC14:
	.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
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #4
	str	r3, [fp, #-28]
	ldr	r3, .L23+4
	sub	ip, fp, #24
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L19
.L20:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-20]
	mov	r1, r3
	ldr	r0, .L23+8
	bl	printf
	ldr	r0, .L23+12
	bl	puts
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-20]
	mov	r0, r3
	bl	catfile
	ldr	r0, .L23+16
	bl	puts
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L19:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L20
	mov	r3, #0
	ldr	r2, .L23
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L22
	bl	__stack_chk_fail
.L22:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC14
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
