	.file	"369986.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"w"
.LC2:
	.string	"output.txt"
.LC3:
	.string	"Error"
	.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
	lea	r11, -196608[rsp]
.LPSRL0:
	sub	rsp, 4096
	or	DWORD PTR [rsp], 0
	cmp	rsp, r11
	jne	.LPSRL0
	sub	rsp, 3568
	mov	DWORD PTR -200164[rbp], edi
	mov	QWORD PTR -200176[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -200176[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -200144[rbp], rax
	mov	DWORD PTR -200156[rbp], 0
	mov	DWORD PTR -200152[rbp], 0
	mov	rax, QWORD PTR -200144[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	BYTE PTR -200157[rbp], al
	jmp	.L2
.L7:
	cmp	BYTE PTR -200157[rbp], 105
	jne	.L3
	mov	DWORD PTR -200148[rbp], 0
	jmp	.L4
.L5:
	mov	edx, DWORD PTR -200156[rbp]
	mov	eax, DWORD PTR -200148[rbp]
	lea	ecx, [rdx+rax]
	mov	eax, DWORD PTR -200148[rbp]
	cdqe
	movzx	edx, BYTE PTR -200128[rbp+rax]
	movsx	rax, ecx
	mov	BYTE PTR -200016[rbp+rax], dl
	add	DWORD PTR -200148[rbp], 1
.L4:
	mov	eax, DWORD PTR -200148[rbp]
	cmp	eax, DWORD PTR -200152[rbp]
	jle	.L5
	mov	eax, DWORD PTR -200156[rbp]
	cdqe
	movzx	edx, BYTE PTR -200157[rbp]
	mov	BYTE PTR -200016[rbp+rax], dl
	add	DWORD PTR -200156[rbp], 1
	lea	rax, -200128[rbp]
	mov	edx, 100
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -200152[rbp], 0
	jmp	.L6
.L3:
	mov	eax, DWORD PTR -200152[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -200152[rbp], edx
	cdqe
	movzx	edx, BYTE PTR -200157[rbp]
	mov	BYTE PTR -200128[rbp+rax], dl
.L6:
	mov	rax, QWORD PTR -200144[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	BYTE PTR -200157[rbp], al
.L2:
	cmp	BYTE PTR -200157[rbp], -1
	jne	.L7
	mov	rax, QWORD PTR -200144[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rsi, .LC1[rip]
	lea	rdi, .LC2[rip]
	call	fopen@PLT
	mov	QWORD PTR -200136[rbp], rax
	mov	rdx, QWORD PTR -200136[rbp]
	lea	rax, -200016[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
	cmp	eax, -1
	jne	.L8
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
.L8:
	mov	rax, QWORD PTR -200136[rbp]
	mov	rdi, rax
	call	fclose@PLT
	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
.LFE0:
	.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	"369986.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\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 = 200136
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #199680
	sub	sp, sp, #460
	sub	r3, fp, #196608
	sub	r3, r3, #12
	str	r0, [r3, #-3524]
	sub	r3, fp, #196608
	sub	r3, r3, #12
	str	r1, [r3, #-3528]
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #196608
	sub	r3, r3, #12
	ldr	r3, [r3, #-3528]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r2, fp, #196608
	sub	r2, r2, #12
	mov	r4, r2
	ldr	r1, .L8+4
	mov	r0, r3
	bl	fopen
	str	r0, [r4, #-3500]
	sub	r3, fp, #196608
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-3512]
	sub	r3, fp, #196608
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-3508]
	sub	r3, fp, #196608
	sub	r3, r3, #12
	ldr	r0, [r3, #-3500]
	bl	fgetc
	mov	r2, r0
	sub	r3, fp, #196608
	sub	r3, r3, #12
	strb	r2, [r3, #-3513]
.L6:
	sub	r3, fp, #196608
	sub	r3, r3, #12
	ldrb	r3, [r3, #-3513]	@ zero_extendqisi2
	cmp	r3, #105
	bne	.L2
	sub	r3, fp, #196608
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-3504]
	b	.L3
.L4:
	sub	r3, fp, #196608
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #196608
	sub	r3, r3, #12
	ldr	r2, [r2, #-3512]
	ldr	r3, [r3, #-3504]
	add	r2, r2, r3
	sub	r3, fp, #196608
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #196608
	sub	r3, r3, #12
	ldr	r3, [r3, #-3504]
	add	r3, r1, r3
	sub	r3, r3, #3488
	sub	r3, r3, #8
	ldrb	r1, [r3]	@ zero_extendqisi2
	sub	r3, fp, #196608
	sub	r3, r3, #12
	add	r3, r3, r2
	mov	r2, r1
	strb	r2, [r3, #-3396]
	sub	r3, fp, #196608
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #196608
	sub	r3, r3, #12
	ldr	r3, [r3, #-3504]
	add	r3, r3, #1
	str	r3, [r2, #-3504]
.L3:
	sub	r3, fp, #196608
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #196608
	sub	r3, r3, #12
	ldr	r2, [r2, #-3504]
	ldr	r3, [r3, #-3508]
	cmp	r2, r3
	ble	.L4
	sub	r3, fp, #196608
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #196608
	sub	r3, r3, #12
	ldr	r3, [r3, #-3512]
	add	r3, r2, r3
	sub	r3, r3, #3392
	sub	r3, r3, #4
	sub	r2, fp, #196608
	sub	r2, r2, #12
	ldrb	r2, [r2, #-3513]
	strb	r2, [r3]
	sub	r3, fp, #196608
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #196608
	sub	r3, r3, #12
	ldr	r3, [r3, #-3512]
	add	r3, r3, #1
	str	r3, [r2, #-3512]
	sub	r3, fp, #199680
	sub	r3, r3, #12
	sub	r3, r3, #424
	mov	r2, #100
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #196608
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-3508]
	b	.L5
.L2:
	sub	r3, fp, #196608
	sub	r3, r3, #12
	ldr	r3, [r3, #-3508]
	sub	r2, fp, #196608
	sub	r2, r2, #12
	mov	r1, r2
	add	r2, r3, #1
	str	r2, [r1, #-3508]
	sub	r2, fp, #196608
	sub	r2, r2, #12
	add	r3, r2, r3
	sub	r2, fp, #196608
	sub	r2, r2, #12
	ldrb	r2, [r2, #-3513]
	strb	r2, [r3, #-3496]
.L5:
	sub	r3, fp, #196608
	sub	r3, r3, #12
	ldr	r0, [r3, #-3500]
	bl	fgetc
	mov	r2, r0
	sub	r3, fp, #196608
	sub	r3, r3, #12
	strb	r2, [r3, #-3513]
	b	.L6
.L9:
	.align	2
.L8:
	.word	.LC1
	.word	.LC0
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
