	.file	"590098.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%i"
.LC1:
	.string	"%*c"
.LC2:
	.string	"%i\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
	push	r15
	push	r14
	push	r12
	push	rbx
	sub	rsp, 160
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	r12, rax
	lea	rax, -132[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -132[rbp]
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -80[rbp], rdx
	movsx	rdx, eax
	mov	QWORD PTR -160[rbp], rdx
	mov	QWORD PTR -152[rbp], 0
	movsx	rdx, eax
	mov	QWORD PTR -176[rbp], rdx
	mov	QWORD PTR -168[rbp], 0
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	ebx, 16
	mov	edx, 0
	div	rbx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L2:
	cmp	rsp, rdx
	je	.L3
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L2
.L3:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L4
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L4:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -72[rbp], rax
	mov	DWORD PTR -116[rbp], 0
	mov	eax, DWORD PTR -132[rbp]
	sal	eax, 2
	add	eax, 2
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -64[rbp], rdx
	movsx	rdx, eax
	mov	QWORD PTR -192[rbp], rdx
	mov	QWORD PTR -184[rbp], 0
	movsx	rdx, eax
	mov	r14, rdx
	mov	r15d, 0
	cdqe
	mov	edx, 16
	sub	rdx, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L5:
	cmp	rsp, rdx
	je	.L6
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L5
.L6:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L7
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L7:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -56[rbp], rax
	mov	rdx, QWORD PTR stdin[rip]
	mov	eax, DWORD PTR -132[rbp]
	sal	eax, 2
	lea	ecx, 2[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	fgets@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR -88[rbp], rax
	lea	rax, -44[rbp]
	mov	QWORD PTR -96[rbp], rax
	jmp	.L8
.L12:
	mov	rax, QWORD PTR -88[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	je	.L9
	mov	rax, QWORD PTR -88[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	je	.L9
	mov	rax, QWORD PTR -88[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L10
.L9:
	mov	rax, QWORD PTR -96[rbp]
	mov	BYTE PTR [rax], 0
	mov	ebx, DWORD PTR -116[rbp]
	lea	eax, 1[rbx]
	mov	DWORD PTR -116[rbp], eax
	lea	rax, -44[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	rdx, QWORD PTR -72[rbp]
	movsx	rcx, ebx
	mov	DWORD PTR [rdx+rcx*4], eax
	lea	rax, -44[rbp]
	mov	QWORD PTR -96[rbp], rax
	jmp	.L11
.L10:
	mov	rax, QWORD PTR -88[rbp]
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -96[rbp]
	mov	BYTE PTR [rax], dl
	add	QWORD PTR -96[rbp], 1
.L11:
	add	QWORD PTR -88[rbp], 1
.L8:
	mov	rax, QWORD PTR -88[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L12
	mov	DWORD PTR -120[rbp], 1
	jmp	.L13
.L17:
	mov	DWORD PTR -120[rbp], 0
	mov	DWORD PTR -124[rbp], 0
	mov	DWORD PTR -100[rbp], 0
	mov	DWORD PTR -128[rbp], 1
	jmp	.L14
.L16:
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR -124[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR [rax+rdx*4]
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR -128[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	cmp	ecx, eax
	jle	.L15
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR -128[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	DWORD PTR -100[rbp], eax
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR -124[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR [rax+rdx*4]
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR -128[rbp]
	movsx	rdx, edx
	mov	DWORD PTR [rax+rdx*4], ecx
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR -124[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR -100[rbp]
	mov	DWORD PTR [rax+rdx*4], ecx
	mov	DWORD PTR -120[rbp], 1
.L15:
	add	DWORD PTR -124[rbp], 1
	add	DWORD PTR -128[rbp], 1
.L14:
	mov	eax, DWORD PTR -132[rbp]
	sub	eax, 1
	cmp	DWORD PTR -124[rbp], eax
	jl	.L16
.L13:
	cmp	DWORD PTR -120[rbp], 0
	jne	.L17
	mov	DWORD PTR -112[rbp], 0
	mov	DWORD PTR -108[rbp], 0
	mov	DWORD PTR -104[rbp], 0
	jmp	.L18
.L21:
	mov	eax, DWORD PTR -132[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	cmp	DWORD PTR -104[rbp], eax
	jge	.L19
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR -104[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	add	DWORD PTR -108[rbp], eax
	jmp	.L20
.L19:
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR -104[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	add	DWORD PTR -112[rbp], eax
.L20:
	add	DWORD PTR -104[rbp], 1
.L18:
	mov	eax, DWORD PTR -132[rbp]
	cmp	DWORD PTR -104[rbp], eax
	jl	.L21
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -108[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rsp, r12
	mov	eax, 0
	mov	rsi, QWORD PTR -40[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	lea	rsp, -32[rbp]
	pop	rbx
	pop	r12
	pop	r14
	pop	r15
	pop	rbp
	.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	"590098.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%i\000"
	.align	2
.LC1:
	.ascii	"%*c\000"
	.align	2
.LC2:
	.ascii	"%i\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.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, #72
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r5, r3
	sub	r3, fp, #80
	mov	r1, r3
	ldr	r0, .L18+4
	bl	__isoc99_scanf
	ldr	r0, .L18+8
	bl	__isoc99_scanf
	ldr	ip, [fp, #-80]
	sub	r3, ip, #1
	str	r3, [fp, #-40]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-80]
	lsl	r3, r3, #2
	add	ip, r3, #2
	sub	r3, ip, #1
	str	r3, [fp, #-32]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-80]
	lsl	r3, r3, #2
	add	r3, r3, #2
	ldr	r2, .L18+12
	ldr	r2, [r2]
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	fgets
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-60]
	sub	r3, fp, #20
	str	r3, [fp, #-64]
	b	.L2
.L6:
	ldr	r3, [fp, #-60]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L3
	ldr	r3, [fp, #-60]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L3
	ldr	r3, [fp, #-60]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L4
.L3:
	ldr	r3, [fp, #-64]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r4, [fp, #-56]
	add	r3, r4, #1
	str	r3, [fp, #-56]
	sub	r3, fp, #20
	mov	r0, r3
	bl	atoi
	mov	r2, r0
	ldr	r3, [fp, #-36]
	str	r2, [r3, r4, lsl #2]
	sub	r3, fp, #20
	str	r3, [fp, #-64]
	b	.L5
.L4:
	ldr	r3, [fp, #-60]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-64]
	strb	r2, [r3]
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L5:
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L2:
	ldr	r3, [fp, #-60]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L6
	mov	r3, #1
	str	r3, [fp, #-68]
	b	.L7
.L11:
	mov	r3, #0
	str	r3, [fp, #-68]
	mov	r3, #0
	str	r3, [fp, #-72]
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #1
	str	r3, [fp, #-76]
	b	.L8
.L10:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-72]
	ldr	r2, [r3, r2, lsl #2]
	ldr	r3, [fp, #-36]
	ldr	r1, [fp, #-76]
	ldr	r3, [r3, r1, lsl #2]
	cmp	r2, r3
	ble	.L9
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-76]
	ldr	r3, [r3, r2, lsl #2]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-72]
	ldr	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-76]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-72]
	ldr	r1, [fp, #-24]
	str	r1, [r3, r2, lsl #2]
	mov	r3, #1
	str	r3, [fp, #-68]
.L9:
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
.L8:
	ldr	r3, [fp, #-80]
	sub	r3, r3, #1
	ldr	r2, [fp, #-72]
	cmp	r2, r3
	blt	.L10
.L7:
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	bne	.L11
	mov	r3, #0
	str	r3, [fp, #-52]
	mov	r3, #0
	str	r3, [fp, #-48]
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L12
.L15:
	ldr	r3, [fp, #-80]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-44]
	cmp	r3, r2
	bge	.L13
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-44]
	ldr	r3, [r3, r2, lsl #2]
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	str	r3, [fp, #-48]
	b	.L14
.L13:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-44]
	ldr	r3, [r3, r2, lsl #2]
	ldr	r2, [fp, #-52]
	add	r3, r2, r3
	str	r3, [fp, #-52]
.L14:
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L12:
	ldr	r3, [fp, #-80]
	ldr	r2, [fp, #-44]
	cmp	r2, r3
	blt	.L15
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-48]
	sub	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L18+16
	bl	printf
	mov	sp, r5
	mov	r3, #0
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	stdin
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
