	.file	"70449275.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"%s: cannot access '%s': %s\n"
.LC2:
	.string	"standard input"
	.align 8
.LC3:
	.string	"Usage: %s PREFIX SUFFIX [FILENAME]\n"
.LC4:
	.string	"%s: Out of memory\n"
.LC5:
	.string	"%s: error reading '%s': %s\n"
.LC6:
	.string	"%s: write error: %s\n"
	.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
	add	rsp, -128
	mov	DWORD PTR -116[rbp], edi
	mov	QWORD PTR -128[rbp], rsi
	mov	DWORD PTR -112[rbp], 0
	cmp	DWORD PTR -116[rbp], 4
	jne	.L2
	mov	rax, QWORD PTR -128[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	QWORD PTR -104[rbp], rax
	mov	rax, QWORD PTR -104[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -96[rbp], rax
	cmp	QWORD PTR -96[rbp], 0
	jne	.L3
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	mov	rax, QWORD PTR -128[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, QWORD PTR -104[rbp]
	mov	r8, rsi
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L4
.L2:
	cmp	DWORD PTR -116[rbp], 3
	jne	.L5
	lea	rax, .LC2[rip]
	mov	QWORD PTR -104[rbp], rax
	mov	rax, QWORD PTR stdin[rip]
	mov	QWORD PTR -96[rbp], rax
	jmp	.L3
.L5:
	mov	rax, QWORD PTR -128[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 255
	jmp	.L4
.L3:
	mov	rax, QWORD PTR -128[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -128[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -88[rbp], 1024
	mov	rax, QWORD PTR -88[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -80[rbp], rax
	cmp	QWORD PTR -80[rbp], 0
	jne	.L6
	mov	rax, QWORD PTR -128[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -112[rbp], 2
	jmp	.L7
.L6:
	mov	rax, QWORD PTR stdout[rip]
	mov	esi, 0
	mov	rdi, rax
	call	setbuf@PLT
	jmp	.L8
.L22:
	mov	rax, QWORD PTR -88[rbp]
	mov	ecx, eax
	mov	rdx, QWORD PTR -96[rbp]
	mov	rax, QWORD PTR -80[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L9
	nop
	jmp	.L10
.L25:
	nop
.L10:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L24
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	mov	rax, QWORD PTR -128[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, QWORD PTR -104[rbp]
	mov	r8, rsi
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -112[rbp], 1
	jmp	.L12
.L9:
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	QWORD PTR -72[rbp], rax
	jmp	.L13
.L17:
	mov	rax, QWORD PTR -88[rbp]
	mov	QWORD PTR -24[rbp], rax
	sal	QWORD PTR -88[rbp]
	mov	rdx, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR -80[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -80[rbp], rax
	cmp	QWORD PTR -80[rbp], 0
	jne	.L14
	mov	rax, QWORD PTR -128[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -112[rbp], 2
	jmp	.L12
.L14:
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, eax
	mov	rax, QWORD PTR -72[rbp]
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -80[rbp]
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -96[rbp]
	mov	rdx, rax
	mov	rdi, rcx
	call	fgets@PLT
	test	rax, rax
	je	.L25
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	QWORD PTR -72[rbp], rax
.L13:
	mov	rax, QWORD PTR -88[rbp]
	sub	rax, 1
	cmp	QWORD PTR -72[rbp], rax
	jne	.L16
	mov	rax, QWORD PTR -72[rbp]
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	jne	.L17
.L16:
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -80[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strstr@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	je	.L8
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	mov	QWORD PTR -56[rbp], 0
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L18
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strstr@PLT
	mov	QWORD PTR -56[rbp], rax
.L18:
	mov	DWORD PTR -108[rbp], 0
	cmp	QWORD PTR -56[rbp], 0
	je	.L19
	mov	rax, QWORD PTR -56[rbp]
	sub	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR -64[rbp], rax
	jmp	.L20
.L19:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR -80[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR -72[rbp]
	sub	rax, rdx
	mov	QWORD PTR -64[rbp], rax
	mov	DWORD PTR -108[rbp], 1
.L20:
	mov	rcx, QWORD PTR stdout[rip]
	mov	rdx, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	cmp	QWORD PTR -64[rbp], rax
	jbe	.L21
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -128[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L4
.L21:
	cmp	DWORD PTR -108[rbp], 0
	jne	.L8
	mov	edi, 10
	call	putchar@PLT
.L8:
	mov	rax, QWORD PTR -96[rbp]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	je	.L22
	jmp	.L12
.L24:
	nop
.L12:
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	free@PLT
.L7:
	mov	rax, QWORD PTR stdin[rip]
	cmp	QWORD PTR -96[rbp], rax
	je	.L23
	mov	rax, QWORD PTR -96[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L23:
	mov	eax, DWORD PTR -112[rbp]
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"70449275.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"%s: cannot access '%s': %s\012\000"
	.align	2
.LC2:
	.ascii	"standard input\000"
	.align	2
.LC3:
	.ascii	"Usage: %s PREFIX SUFFIX [FILENAME]\012\000"
	.align	2
.LC4:
	.ascii	"%s: Out of memory\012\000"
	.align	2
.LC5:
	.ascii	"%s: error reading '%s': %s\012\000"
	.align	2
.LC6:
	.ascii	"%s: write error: %s\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #80
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	mov	r3, #0
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-80]
	cmp	r3, #4
	bne	.L2
	ldr	r3, [fp, #-84]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-68]
	ldr	r1, .L26
	ldr	r0, [fp, #-68]
	bl	fopen
	str	r0, [fp, #-64]
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	bne	.L3
	ldr	r3, .L26+4
	ldr	r4, [r3]
	ldr	r3, [fp, #-84]
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	ldr	r3, [fp, #-68]
	mov	r2, r5
	ldr	r1, .L26+8
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L4
.L2:
	ldr	r3, [fp, #-80]
	cmp	r3, #3
	bne	.L5
	ldr	r3, .L26+12
	str	r3, [fp, #-68]
	ldr	r3, .L26+16
	ldr	r3, [r3]
	str	r3, [fp, #-64]
	b	.L3
.L5:
	ldr	r3, .L26+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-84]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L26+20
	bl	fprintf
	mov	r3, #255
	b	.L4
.L3:
	ldr	r3, [fp, #-84]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-84]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-32]
	ldr	r0, [fp, #-36]
	bl	strlen
	str	r0, [fp, #-28]
	mov	r3, #1024
	str	r3, [fp, #-60]
	ldr	r0, [fp, #-60]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bne	.L6
	ldr	r3, .L26+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-84]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L26+24
	bl	fprintf
	mov	r3, #2
	str	r3, [fp, #-72]
	b	.L7
.L6:
	ldr	r3, .L26+28
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	setbuf
	b	.L8
.L22:
	ldr	r3, [fp, #-60]
	ldr	r2, [fp, #-64]
	mov	r1, r3
	ldr	r0, [fp, #-56]
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L9
	nop
	b	.L10
.L25:
	nop
.L10:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L24
	ldr	r3, .L26+4
	ldr	r4, [r3]
	ldr	r3, [fp, #-84]
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	ldr	r3, [fp, #-68]
	mov	r2, r5
	ldr	r1, .L26+32
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	str	r3, [fp, #-72]
	b	.L12
.L9:
	ldr	r0, [fp, #-56]
	bl	strlen
	str	r0, [fp, #-52]
	b	.L13
.L17:
	ldr	r3, [fp, #-60]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #1
	str	r3, [fp, #-60]
	ldr	r1, [fp, #-60]
	ldr	r0, [fp, #-56]
	bl	realloc
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bne	.L14
	ldr	r3, .L26+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-84]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L26+24
	bl	fprintf
	mov	r3, #2
	str	r3, [fp, #-72]
	b	.L12
.L14:
	ldr	r3, [fp, #-52]
	sub	r3, r3, #1
	ldr	r2, [fp, #-56]
	add	r3, r2, r3
	ldr	r1, [fp, #-24]
	ldr	r2, [fp, #-64]
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	beq	.L25
	ldr	r0, [fp, #-56]
	bl	strlen
	str	r0, [fp, #-52]
.L13:
	ldr	r3, [fp, #-60]
	sub	r3, r3, #1
	ldr	r2, [fp, #-52]
	cmp	r2, r3
	bne	.L16
	ldr	r3, [fp, #-52]
	sub	r3, r3, #1
	ldr	r2, [fp, #-56]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L17
.L16:
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-56]
	bl	strstr
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L8
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-32]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L18
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-16]
	bl	strstr
	str	r0, [fp, #-44]
.L18:
	mov	r3, #0
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	beq	.L19
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-16]
	sub	r3, r2, r3
	str	r3, [fp, #-48]
	b	.L20
.L19:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-56]
	sub	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-52]
	sub	r3, r3, r2
	str	r3, [fp, #-48]
	mov	r3, #1
	str	r3, [fp, #-40]
.L20:
	ldr	r3, .L26+28
	ldr	r3, [r3]
	ldr	r2, [fp, #-48]
	mov	r1, #1
	ldr	r0, [fp, #-16]
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-48]
	cmp	r3, r2
	bls	.L21
	ldr	r3, .L26+4
	ldr	r4, [r3]
	ldr	r3, [fp, #-84]
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L26+36
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L4
.L21:
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bne	.L8
	mov	r0, #10
	bl	putchar
.L8:
	ldr	r0, [fp, #-64]
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	beq	.L22
	b	.L12
.L24:
	nop
.L12:
	ldr	r0, [fp, #-56]
	bl	free
.L7:
	ldr	r3, .L26+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-64]
	cmp	r2, r3
	beq	.L23
	ldr	r0, [fp, #-64]
	bl	fclose
.L23:
	ldr	r3, [fp, #-72]
.L4:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC0
	.word	stderr
	.word	.LC1
	.word	.LC2
	.word	stdin
	.word	.LC3
	.word	.LC4
	.word	stdout
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
