	.file	"942784.c"
	.intel_syntax noprefix
	.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
	cmp	DWORD PTR -68[rbp], 1
	jle	.L2
	mov	DWORD PTR -56[rbp], 1
	jmp	.L3
.L12:
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -44[rbp], eax
	cmp	DWORD PTR -44[rbp], -1
	jne	.L4
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	mov	eax, 1
	jmp	.L21
.L4:
	mov	QWORD PTR -40[rbp], 0
	jmp	.L6
.L11:
	movzx	eax, BYTE PTR -12[rbp]
	cmp	al, 32
	jne	.L7
	add	QWORD PTR -40[rbp], 1
	cmp	QWORD PTR -40[rbp], 8
	jne	.L6
	lea	rax, -12[rbp]
	mov	WORD PTR [rax], 9
	lea	rax, -12[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	mov	QWORD PTR -40[rbp], 0
	jmp	.L6
.L7:
	cmp	QWORD PTR -40[rbp], 0
	jne	.L8
	lea	rax, -12[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
.L8:
	cmp	QWORD PTR -40[rbp], 0
	je	.L6
	mov	BYTE PTR -57[rbp], 32
	mov	DWORD PTR -52[rbp], 0
	jmp	.L9
.L10:
	lea	rax, -57[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	add	DWORD PTR -52[rbp], 1
.L9:
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	cmp	QWORD PTR -40[rbp], rax
	ja	.L10
	lea	rax, -12[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	mov	QWORD PTR -40[rbp], 0
.L6:
	lea	rcx, -12[rbp]
	mov	eax, DWORD PTR -44[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	test	rax, rax
	jne	.L11
	add	DWORD PTR -56[rbp], 1
.L3:
	mov	eax, DWORD PTR -56[rbp]
	cmp	eax, DWORD PTR -68[rbp]
	jl	.L12
	jmp	.L13
.L2:
	mov	QWORD PTR -32[rbp], 0
	jmp	.L14
.L20:
	cmp	QWORD PTR -24[rbp], -1
	jne	.L15
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	mov	eax, 2
	jmp	.L21
.L15:
	movzx	eax, BYTE PTR -12[rbp]
	cmp	al, 32
	jne	.L16
	add	QWORD PTR -32[rbp], 1
	cmp	QWORD PTR -32[rbp], 8
	jne	.L14
	lea	rax, -12[rbp]
	mov	WORD PTR [rax], 9
	lea	rax, -12[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	mov	QWORD PTR -32[rbp], 0
	jmp	.L14
.L16:
	cmp	QWORD PTR -32[rbp], 0
	jne	.L17
	lea	rax, -12[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
.L17:
	cmp	QWORD PTR -32[rbp], 0
	je	.L14
	mov	BYTE PTR -57[rbp], 32
	mov	DWORD PTR -48[rbp], 0
	jmp	.L18
.L19:
	lea	rax, -57[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	add	DWORD PTR -48[rbp], 1
.L18:
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	cmp	QWORD PTR -32[rbp], rax
	ja	.L19
	lea	rax, -12[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	mov	QWORD PTR -32[rbp], 0
.L14:
	lea	rax, -12[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 0
	call	read@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L20
.L13:
	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	"942784.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-48]
	cmp	r3, #1
	ble	.L2
	mov	r3, #1
	str	r3, [fp, #-40]
	b	.L3
.L12:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-52]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L4
	ldr	r3, [fp, #-52]
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	mov	r3, #1
	b	.L21
.L4:
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L6
.L11:
	ldrb	r3, [fp, #-12]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L7
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #8
	bne	.L6
	sub	r3, fp, #12
	mov	r2, #9
	strh	r2, [r3]	@ movhi
	sub	r3, fp, #12
	mov	r2, #1
	mov	r1, r3
	mov	r0, #1
	bl	write
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L6
.L7:
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L8
	sub	r3, fp, #12
	mov	r2, #1
	mov	r1, r3
	mov	r0, #1
	bl	write
.L8:
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L6
	mov	r3, #32
	strb	r3, [fp, #-41]
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L9
.L10:
	sub	r3, fp, #41
	mov	r2, #1
	mov	r1, r3
	mov	r0, #1
	bl	write
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L9:
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	bhi	.L10
	sub	r3, fp, #12
	mov	r2, #1
	mov	r1, r3
	mov	r0, #1
	bl	write
	mov	r3, #0
	str	r3, [fp, #-36]
.L6:
	sub	r3, fp, #12
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	read
	mov	r3, r0
	cmp	r3, #0
	bne	.L11
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L3:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-48]
	cmp	r2, r3
	blt	.L12
	b	.L13
.L2:
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L14
.L20:
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	bne	.L15
	ldr	r3, [fp, #-52]
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	mov	r3, #2
	b	.L21
.L15:
	ldrb	r3, [fp, #-12]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L16
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #8
	bne	.L14
	sub	r3, fp, #12
	mov	r2, #9
	strh	r2, [r3]	@ movhi
	sub	r3, fp, #12
	mov	r2, #1
	mov	r1, r3
	mov	r0, #1
	bl	write
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L14
.L16:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L17
	sub	r3, fp, #12
	mov	r2, #1
	mov	r1, r3
	mov	r0, #1
	bl	write
.L17:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L14
	mov	r3, #32
	strb	r3, [fp, #-41]
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L18
.L19:
	sub	r3, fp, #41
	mov	r2, #1
	mov	r1, r3
	mov	r0, #1
	bl	write
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L18:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bhi	.L19
	sub	r3, fp, #12
	mov	r2, #1
	mov	r1, r3
	mov	r0, #1
	bl	write
	mov	r3, #0
	str	r3, [fp, #-28]
.L14:
	sub	r3, fp, #12
	mov	r2, #1
	mov	r1, r3
	mov	r0, #0
	bl	read
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L20
.L13:
	mov	r3, #0
.L21:
	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	.LC0
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
