	.file	"341592.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Usage: %s [FILE]\n"
.LC1:
	.string	"r"
	.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, 80
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -48[rbp], -1
	mov	DWORD PTR -44[rbp], -1
	mov	DWORD PTR -40[rbp], 0
	mov	BYTE PTR -49[rbp], 124
	mov	BYTE PTR -9[rbp], 0
	cmp	DWORD PTR -68[rbp], 2
	je	.L2
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L21
.L2:
	add	QWORD PTR -80[rbp], 8
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -32[rbp], rax
	jmp	.L4
.L20:
	mov	DWORD PTR -36[rbp], 0
	jmp	.L5
.L9:
	cmp	DWORD PTR -48[rbp], -1
	je	.L6
	mov	eax, DWORD PTR -48[rbp]
	sub	eax, DWORD PTR -36[rbp]
	cmp	eax, 1
	jg	.L7
	mov	eax, DWORD PTR -48[rbp]
	sub	eax, DWORD PTR -36[rbp]
	cmp	eax, -1
	jl	.L7
.L6:
	cmp	BYTE PTR -50[rbp], 67
	jne	.L8
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR -44[rbp], eax
	jmp	.L7
.L8:
	cmp	BYTE PTR -50[rbp], 95
	jne	.L7
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR -40[rbp], eax
.L7:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	movzx	edx, BYTE PTR -50[rbp]
	mov	BYTE PTR -21[rbp+rax], dl
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	getc@PLT
	mov	BYTE PTR -50[rbp], al
	add	DWORD PTR -36[rbp], 1
.L5:
	cmp	DWORD PTR -36[rbp], 11
	jle	.L9
	cmp	DWORD PTR -48[rbp], -1
	jne	.L10
	cmp	DWORD PTR -44[rbp], -1
	je	.L11
	mov	eax, DWORD PTR -44[rbp]
	mov	DWORD PTR -48[rbp], eax
	jmp	.L12
.L11:
	mov	eax, DWORD PTR -40[rbp]
	mov	DWORD PTR -48[rbp], eax
	jmp	.L12
.L10:
	cmp	DWORD PTR -44[rbp], -1
	je	.L13
	mov	eax, DWORD PTR -44[rbp]
	cmp	eax, DWORD PTR -48[rbp]
	jge	.L14
	mov	BYTE PTR -49[rbp], 47
	jmp	.L15
.L14:
	mov	eax, DWORD PTR -44[rbp]
	cmp	eax, DWORD PTR -48[rbp]
	jle	.L16
	mov	BYTE PTR -49[rbp], 92
	jmp	.L15
.L16:
	mov	BYTE PTR -49[rbp], 124
.L15:
	mov	eax, DWORD PTR -44[rbp]
	mov	DWORD PTR -48[rbp], eax
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -40[rbp]
	cmp	eax, DWORD PTR -48[rbp]
	jge	.L17
	mov	BYTE PTR -49[rbp], 47
	jmp	.L18
.L17:
	mov	eax, DWORD PTR -40[rbp]
	cmp	eax, DWORD PTR -48[rbp]
	jle	.L19
	mov	BYTE PTR -49[rbp], 92
	jmp	.L18
.L19:
	mov	BYTE PTR -49[rbp], 124
.L18:
	mov	eax, DWORD PTR -40[rbp]
	mov	DWORD PTR -48[rbp], eax
.L12:
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	movzx	edx, BYTE PTR -49[rbp]
	mov	BYTE PTR -21[rbp+rax], dl
	lea	rax, -21[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	DWORD PTR -44[rbp], -1
.L4:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	getc@PLT
	mov	BYTE PTR -50[rbp], al
	cmp	BYTE PTR -50[rbp], -1
	jne	.L20
	mov	eax, 0
.L21:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	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	"341592.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: %s [FILE]\012\000"
	.align	2
.LC1:
	.ascii	"r\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mvn	r3, #0
	str	r3, [fp, #-44]
	mvn	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #124
	strb	r3, [fp, #-45]
	mov	r3, #0
	strb	r3, [fp, #-12]
	ldr	r3, [fp, #-56]
	cmp	r3, #2
	beq	.L2
	ldr	r3, [fp, #-60]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L23+4
	bl	printf
	mov	r3, #1
	ldr	r2, .L23
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L21
	b	.L22
.L2:
	ldr	r3, [fp, #-60]
	add	r3, r3, #4
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	ldr	r3, [r3]
	ldr	r1, .L23+8
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-28]
	b	.L4
.L9:
	ldr	r3, [fp, #-44]
	cmn	r3, #1
	beq	.L6
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-32]
	sub	r3, r2, r3
	cmp	r3, #1
	bgt	.L7
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-32]
	sub	r3, r2, r3
	cmn	r3, #1
	blt	.L7
.L6:
	ldrb	r3, [fp, #-46]	@ zero_extendqisi2
	cmp	r3, #67
	bne	.L8
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-40]
	b	.L7
.L8:
	ldrb	r3, [fp, #-46]	@ zero_extendqisi2
	cmp	r3, #95
	bne	.L7
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-36]
.L7:
	sub	r2, fp, #24
	ldr	r3, [fp, #-32]
	add	r3, r2, r3
	ldrb	r2, [fp, #-46]
	strb	r2, [r3]
	ldr	r0, [fp, #-28]
	bl	getc
	mov	r3, r0
	strb	r3, [fp, #-46]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L5:
	ldr	r3, [fp, #-32]
	cmp	r3, #11
	ble	.L9
	ldr	r3, [fp, #-44]
	cmn	r3, #1
	bne	.L10
	ldr	r3, [fp, #-40]
	cmn	r3, #1
	beq	.L11
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-44]
	b	.L12
.L11:
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-44]
	b	.L12
.L10:
	ldr	r3, [fp, #-40]
	cmn	r3, #1
	beq	.L13
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	bge	.L14
	mov	r3, #47
	strb	r3, [fp, #-45]
	b	.L15
.L14:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	ble	.L16
	mov	r3, #92
	strb	r3, [fp, #-45]
	b	.L15
.L16:
	mov	r3, #124
	strb	r3, [fp, #-45]
.L15:
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-44]
	b	.L12
.L13:
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	bge	.L17
	mov	r3, #47
	strb	r3, [fp, #-45]
	b	.L18
.L17:
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	ble	.L19
	mov	r3, #92
	strb	r3, [fp, #-45]
	b	.L18
.L19:
	mov	r3, #124
	strb	r3, [fp, #-45]
.L18:
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-44]
.L12:
	sub	r2, fp, #24
	ldr	r3, [fp, #-44]
	add	r3, r2, r3
	ldrb	r2, [fp, #-45]
	strb	r2, [r3]
	sub	r3, fp, #24
	mov	r0, r3
	bl	puts
	mvn	r3, #0
	str	r3, [fp, #-40]
.L4:
	ldr	r0, [fp, #-28]
	bl	getc
	mov	r3, r0
	strb	r3, [fp, #-46]
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L5
.L22:
	bl	__stack_chk_fail
.L21:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
