	.file	"214441.c"
	.intel_syntax noprefix
	.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
	sub	rsp, 160
	mov	DWORD PTR -148[rbp], edi
	mov	QWORD PTR -160[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -160[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -112[rbp], rax
	mov	rax, QWORD PTR -112[rbp]
	mov	esi, 2
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -132[rbp], eax
	lea	rcx, -80[rbp]
	mov	eax, DWORD PTR -132[rbp]
	mov	edx, 64
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -104[rbp], rax
	cmp	QWORD PTR -104[rbp], 64
	je	.L2
	mov	eax, -1
	jmp	.L18
.L2:
	movzx	eax, WORD PTR -24[rbp]
	movzx	edx, ax
	movzx	eax, WORD PTR -26[rbp]
	movzx	eax, ax
	imul	eax, edx
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -96[rbp], rax
	cmp	QWORD PTR -96[rbp], 0
	jne	.L4
	mov	eax, -2
	jmp	.L18
.L4:
	mov	rax, QWORD PTR -48[rbp]
	mov	rcx, rax
	mov	eax, DWORD PTR -132[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	cmp	rax, -1
	jne	.L5
	mov	eax, -3
	jmp	.L18
.L5:
	movzx	eax, WORD PTR -24[rbp]
	movzx	edx, ax
	movzx	eax, WORD PTR -26[rbp]
	movzx	eax, ax
	imul	eax, edx
	movsx	rdx, eax
	mov	rcx, QWORD PTR -96[rbp]
	mov	eax, DWORD PTR -132[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	movzx	edx, WORD PTR -24[rbp]
	movzx	ecx, dx
	movzx	edx, WORD PTR -26[rbp]
	movzx	edx, dx
	imul	edx, ecx
	movsx	rdx, edx
	cmp	rax, rdx
	je	.L6
	mov	eax, -4
	jmp	.L18
.L6:
	mov	DWORD PTR -136[rbp], 0
	jmp	.L7
.L17:
	mov	eax, DWORD PTR -136[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, 3
	jne	.L8
	mov	rax, QWORD PTR -160[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	lea	rcx, 1[rax]
	mov	eax, DWORD PTR -136[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 32[rax]
	cmp	rcx, rax
	jbe	.L9
	mov	eax, -5
	jmp	.L18
.L9:
	mov	eax, DWORD PTR -136[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 8[rax]
	mov	rcx, rax
	mov	eax, DWORD PTR -132[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	cmp	rax, -1
	jne	.L11
	mov	eax, -6
	jmp	.L18
.L11:
	mov	eax, DWORD PTR -136[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 32[rax]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -88[rbp], rax
	mov	eax, DWORD PTR -136[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR 32[rax]
	mov	rax, QWORD PTR -88[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -160[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -160[rbp]
	add	rax, 16
	mov	rcx, QWORD PTR [rax]
	mov	rax, QWORD PTR -88[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	eax, DWORD PTR -136[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR 32[rax]
	mov	rax, QWORD PTR -160[rbp]
	add	rax, 16
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -132[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	rdx, rax
	mov	eax, DWORD PTR -136[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	sub	rax, rcx
	sal	rax, 3
	mov	rcx, rax
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rcx
	mov	rax, QWORD PTR 32[rax]
	cmp	rdx, rax
	je	.L12
	mov	eax, -7
	jmp	.L18
.L12:
	mov	rcx, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR -136[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	add	rax, 32
	mov	rdx, QWORD PTR -96[rbp]
	sub	rax, rdx
	add	rax, rcx
	mov	rcx, rax
	mov	eax, DWORD PTR -132[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	cmp	rax, -1
	jne	.L13
	mov	eax, -8
	jmp	.L18
.L13:
	mov	rax, QWORD PTR -160[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, 1
	mov	QWORD PTR -128[rbp], rax
	lea	rcx, -128[rbp]
	mov	eax, DWORD PTR -132[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	cmp	rax, 8
	je	.L14
	mov	eax, -9
	jmp	.L18
.L14:
	mov	rcx, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR -136[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	add	rax, 40
	mov	rdx, QWORD PTR -96[rbp]
	sub	rax, rdx
	add	rax, rcx
	mov	rcx, rax
	mov	eax, DWORD PTR -132[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	cmp	rax, -1
	jne	.L15
	mov	eax, -10
	jmp	.L18
.L15:
	mov	rax, QWORD PTR -160[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, 1
	mov	QWORD PTR -120[rbp], rax
	lea	rcx, -120[rbp]
	mov	eax, DWORD PTR -132[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	cmp	rax, 8
	je	.L16
	mov	eax, -11
	jmp	.L18
.L16:
	mov	eax, 0
	jmp	.L18
.L8:
	add	DWORD PTR -136[rbp], 1
.L7:
	movzx	eax, WORD PTR -24[rbp]
	movzx	eax, ax
	cmp	DWORD PTR -136[rbp], eax
	jl	.L17
	mov	eax, 0
.L18:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	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	"214441.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 = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #108
	str	r0, [fp, #-112]
	str	r1, [fp, #-116]
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-116]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-104]
	mov	r1, #2
	ldr	r0, [fp, #-104]
	bl	open
	str	r0, [fp, #-100]
	sub	r3, fp, #68
	mov	r2, #52
	mov	r1, r3
	ldr	r0, [fp, #-100]
	bl	read
	str	r0, [fp, #-96]
	ldr	r3, [fp, #-96]
	cmp	r3, #52
	beq	.L2
	mvn	r3, #0
	b	.L18
.L2:
	ldrh	r3, [fp, #-24]
	ldrh	r2, [fp, #-26]
	mul	r3, r2, r3
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-92]
	ldr	r3, [fp, #-92]
	cmp	r3, #0
	bne	.L4
	mvn	r3, #1
	b	.L18
.L4:
	ldr	r3, [fp, #-40]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-100]
	bl	lseek
	mov	r3, r0
	cmn	r3, #1
	bne	.L5
	mvn	r3, #2
	b	.L18
.L5:
	ldrh	r3, [fp, #-24]
	ldrh	r2, [fp, #-26]
	mul	r3, r2, r3
	mov	r2, r3
	ldr	r1, [fp, #-92]
	ldr	r0, [fp, #-100]
	bl	read
	mov	r2, r0
	ldrh	r3, [fp, #-24]
	ldrh	r1, [fp, #-26]
	mul	r3, r1, r3
	cmp	r2, r3
	beq	.L6
	mvn	r3, #3
	b	.L18
.L6:
	mov	r3, #0
	str	r3, [fp, #-108]
	b	.L7
.L17:
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #3
	bne	.L8
	ldr	r3, [fp, #-116]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r2, r3, #1
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #5
	ldr	r1, [fp, #-92]
	add	r3, r1, r3
	ldr	r3, [r3, #16]
	cmp	r2, r3
	bls	.L9
	mvn	r3, #4
	b	.L18
.L9:
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-100]
	bl	lseek
	mov	r3, r0
	cmn	r3, #1
	bne	.L11
	mvn	r3, #5
	b	.L18
.L11:
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	ldr	r3, [r3, #16]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-88]
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	ldr	r3, [r3, #16]
	mov	r2, r3
	mov	r1, #0
	ldr	r0, [fp, #-88]
	bl	memset
	ldr	r3, [fp, #-116]
	add	r3, r3, #8
	ldr	r4, [r3]
	ldr	r3, [fp, #-116]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, [fp, #-88]
	bl	memcpy
	ldr	r3, [fp, #-116]
	add	r3, r3, #8
	ldr	r1, [r3]
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	ldr	r3, [r3, #16]
	mov	r2, r3
	ldr	r0, [fp, #-100]
	bl	write
	mov	r3, r0
	mov	r1, r3
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	ldr	r3, [r3, #16]
	cmp	r1, r3
	beq	.L12
	mvn	r3, #6
	b	.L18
.L12:
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-108]
	lsl	r2, r2, #5
	ldr	r1, [fp, #-92]
	add	r2, r1, r2
	add	r2, r2, #16
	mov	r1, r2
	ldr	r2, [fp, #-92]
	sub	r2, r1, r2
	add	r3, r3, r2
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-100]
	bl	lseek
	mov	r3, r0
	cmn	r3, #1
	bne	.L13
	mvn	r3, #7
	b	.L18
.L13:
	ldr	r3, [fp, #-116]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r3, r3, #1
	mov	r2, r3
	mov	r3, #0
	str	r2, [fp, #-84]
	str	r3, [fp, #-80]
	sub	r3, fp, #84
	mov	r2, #8
	mov	r1, r3
	ldr	r0, [fp, #-100]
	bl	write
	mov	r3, r0
	cmp	r3, #8
	beq	.L14
	mvn	r3, #8
	b	.L18
.L14:
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-108]
	lsl	r2, r2, #5
	ldr	r1, [fp, #-92]
	add	r2, r1, r2
	add	r2, r2, #20
	mov	r1, r2
	ldr	r2, [fp, #-92]
	sub	r2, r1, r2
	add	r3, r3, r2
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-100]
	bl	lseek
	mov	r3, r0
	cmn	r3, #1
	bne	.L15
	mvn	r3, #9
	b	.L18
.L15:
	ldr	r3, [fp, #-116]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r3, r3, #1
	mov	r2, r3
	mov	r3, #0
	str	r2, [fp, #-76]
	str	r3, [fp, #-72]
	sub	r3, fp, #76
	mov	r2, #8
	mov	r1, r3
	ldr	r0, [fp, #-100]
	bl	write
	mov	r3, r0
	cmp	r3, #8
	beq	.L16
	mvn	r3, #10
	b	.L18
.L16:
	mov	r3, #0
	b	.L18
.L8:
	ldr	r3, [fp, #-108]
	add	r3, r3, #1
	str	r3, [fp, #-108]
.L7:
	ldrh	r3, [fp, #-24]
	mov	r2, r3
	ldr	r3, [fp, #-108]
	cmp	r3, r2
	blt	.L17
	mov	r3, #0
.L18:
	ldr	r2, .L20
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC0
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
