	.file	"43887120.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d "
	.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, 448
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -444[rbp], 10
	mov	DWORD PTR -436[rbp], 0
	lea	rax, -444[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -444[rbp]
	add	eax, 1
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -432[rbp], rax
	mov	eax, DWORD PTR -444[rbp]
	add	eax, 1
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -424[rbp], rax
	mov	rax, QWORD PTR -432[rbp]
	add	rax, 4
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -424[rbp]
	add	rax, 4
	mov	DWORD PTR [rax], 0
	mov	DWORD PTR -440[rbp], 2
	jmp	.L2
.L7:
	mov	eax, DWORD PTR -440[rbp]
	cdqe
	sal	rax, 2
	lea	rdx, -4[rax]
	mov	rax, QWORD PTR -432[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -440[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -432[rbp]
	add	rax, rcx
	add	edx, 1
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR -440[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -424[rbp]
	add	rax, rdx
	mov	DWORD PTR [rax], 1
	mov	eax, DWORD PTR -440[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L3
	mov	eax, DWORD PTR -440[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -432[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -440[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -432[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jge	.L4
	mov	eax, DWORD PTR -440[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -424[rbp]
	add	rax, rdx
	mov	DWORD PTR [rax], 2
.L4:
	mov	eax, DWORD PTR -440[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -432[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	edx, DWORD PTR -440[rbp]
	mov	ecx, edx
	shr	ecx, 31
	add	edx, ecx
	sar	edx
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -432[rbp]
	add	rdx, rcx
	mov	edx, DWORD PTR [rdx]
	add	edx, 1
	mov	ecx, DWORD PTR -440[rbp]
	movsx	rcx, ecx
	lea	rsi, 0[0+rcx*4]
	mov	rcx, QWORD PTR -432[rbp]
	add	rcx, rsi
	cmp	eax, edx
	cmovg	eax, edx
	mov	DWORD PTR [rcx], eax
.L3:
	mov	edx, DWORD PTR -440[rbp]
	movsx	rax, edx
	imul	rax, rax, 1431655766
	shr	rax, 32
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	mov	ecx, eax
	add	ecx, ecx
	add	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	test	eax, eax
	jne	.L5
	mov	eax, DWORD PTR -440[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1431655766
	shr	rdx, 32
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -432[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -440[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -432[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jge	.L6
	mov	eax, DWORD PTR -440[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -424[rbp]
	add	rax, rdx
	mov	DWORD PTR [rax], 3
.L6:
	mov	eax, DWORD PTR -440[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -432[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	edx, DWORD PTR -440[rbp]
	movsx	rcx, edx
	imul	rcx, rcx, 1431655766
	shr	rcx, 32
	mov	esi, edx
	sar	esi, 31
	mov	edx, ecx
	sub	edx, esi
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -432[rbp]
	add	rdx, rcx
	mov	edx, DWORD PTR [rdx]
	add	edx, 1
	mov	ecx, DWORD PTR -440[rbp]
	movsx	rcx, ecx
	lea	rsi, 0[0+rcx*4]
	mov	rcx, QWORD PTR -432[rbp]
	add	rcx, rsi
	cmp	eax, edx
	cmovg	eax, edx
	mov	DWORD PTR [rcx], eax
.L5:
	add	DWORD PTR -440[rbp], 1
.L2:
	mov	eax, DWORD PTR -444[rbp]
	cmp	DWORD PTR -440[rbp], eax
	jle	.L7
	mov	eax, DWORD PTR -444[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -432[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -444[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -432[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -440[rbp], eax
	jmp	.L8
.L12:
	mov	eax, DWORD PTR -444[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -424[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, 1
	jne	.L9
	mov	ecx, DWORD PTR -444[rbp]
	mov	eax, DWORD PTR -436[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -436[rbp], edx
	lea	edx, -1[rcx]
	cdqe
	mov	DWORD PTR -416[rbp+rax*4], edx
	mov	eax, DWORD PTR -444[rbp]
	sub	eax, 1
	mov	DWORD PTR -444[rbp], eax
	mov	eax, DWORD PTR -444[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L10
.L9:
	mov	eax, DWORD PTR -444[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -424[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, 2
	jne	.L11
	mov	edx, DWORD PTR -444[rbp]
	mov	eax, DWORD PTR -436[rbp]
	lea	ecx, 1[rax]
	mov	DWORD PTR -436[rbp], ecx
	mov	ecx, edx
	shr	ecx, 31
	add	edx, ecx
	sar	edx
	cdqe
	mov	DWORD PTR -416[rbp+rax*4], edx
	mov	eax, DWORD PTR -444[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -444[rbp], eax
	mov	eax, DWORD PTR -444[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L10
.L11:
	mov	edx, DWORD PTR -444[rbp]
	mov	eax, DWORD PTR -436[rbp]
	lea	ecx, 1[rax]
	mov	DWORD PTR -436[rbp], ecx
	movsx	rcx, edx
	imul	rcx, rcx, 1431655766
	shr	rcx, 32
	mov	esi, edx
	sar	esi, 31
	mov	edx, ecx
	sub	edx, esi
	cdqe
	mov	DWORD PTR -416[rbp+rax*4], edx
	mov	eax, DWORD PTR -444[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1431655766
	shr	rdx, 32
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR -444[rbp], eax
	mov	eax, DWORD PTR -444[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L10:
	sub	DWORD PTR -440[rbp], 1
.L8:
	cmp	DWORD PTR -440[rbp], 0
	jg	.L12
	mov	edi, 10
	call	putchar@PLT
	mov	eax, 0
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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	"43887120.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\000"
	.align	2
.LC1:
	.ascii	"%d\012\000"
	.align	2
.LC2:
	.ascii	"%d \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 = 424
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #424
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #10
	str	r3, [fp, #-428]
	mov	r3, #0
	str	r3, [fp, #-420]
	sub	r3, fp, #428
	mov	r1, r3
	ldr	r0, .L15+4
	bl	__isoc99_scanf
	ldr	r3, [fp, #-428]
	add	r3, r3, #1
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-416]
	ldr	r3, [fp, #-428]
	add	r3, r3, #1
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-412]
	ldr	r3, [fp, #-416]
	add	r3, r3, #4
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-412]
	add	r3, r3, #4
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #2
	str	r3, [fp, #-424]
	b	.L2
.L7:
	ldr	r3, [fp, #-424]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-416]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-424]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-416]
	add	r3, r1, r3
	add	r2, r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-424]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-412]
	add	r3, r2, r3
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-424]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L3
	ldr	r3, [fp, #-424]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-416]
	add	r3, r2, r3
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-424]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-416]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L4
	ldr	r3, [fp, #-424]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-412]
	add	r3, r2, r3
	mov	r2, #2
	str	r2, [r3]
.L4:
	ldr	r3, [fp, #-424]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-416]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-424]
	lsr	r1, r3, #31
	add	r3, r1, r3
	asr	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r1, [fp, #-416]
	add	r3, r1, r3
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r1, [fp, #-424]
	lsl	r1, r1, #2
	ldr	r0, [fp, #-416]
	add	r1, r0, r1
	cmp	r2, r3
	movlt	r3, r2
	movge	r3, r3
	str	r3, [r1]
.L3:
	ldr	r1, [fp, #-424]
	ldr	r3, .L15+8
	smull	r0, r2, r3, r1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	sub	r2, r1, r3
	cmp	r2, #0
	bne	.L5
	ldr	r3, [fp, #-424]
	ldr	r2, .L15+8
	smull	r1, r2, r3, r2
	asr	r3, r3, #31
	sub	r3, r2, r3
	lsl	r3, r3, #2
	ldr	r2, [fp, #-416]
	add	r3, r2, r3
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-424]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-416]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L6
	ldr	r3, [fp, #-424]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-412]
	add	r3, r2, r3
	mov	r2, #3
	str	r2, [r3]
.L6:
	ldr	r3, [fp, #-424]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-416]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-424]
	ldr	r1, .L15+8
	smull	r0, r1, r3, r1
	asr	r3, r3, #31
	sub	r3, r1, r3
	lsl	r3, r3, #2
	ldr	r1, [fp, #-416]
	add	r3, r1, r3
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r1, [fp, #-424]
	lsl	r1, r1, #2
	ldr	r0, [fp, #-416]
	add	r1, r0, r1
	cmp	r2, r3
	movlt	r3, r2
	movge	r3, r3
	str	r3, [r1]
.L5:
	ldr	r3, [fp, #-424]
	add	r3, r3, #1
	str	r3, [fp, #-424]
.L2:
	ldr	r3, [fp, #-428]
	ldr	r2, [fp, #-424]
	cmp	r2, r3
	ble	.L7
	ldr	r3, [fp, #-428]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-416]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L15+12
	bl	printf
	ldr	r3, [fp, #-428]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-416]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-424]
	b	.L8
.L12:
	ldr	r3, [fp, #-428]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-412]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L9
	ldr	r2, [fp, #-428]
	ldr	r3, [fp, #-420]
	add	r1, r3, #1
	str	r1, [fp, #-420]
	sub	r2, r2, #1
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-404]
	ldr	r3, [fp, #-428]
	sub	r3, r3, #1
	str	r3, [fp, #-428]
	ldr	r3, [fp, #-428]
	mov	r1, r3
	ldr	r0, .L15+16
	bl	printf
	b	.L10
.L9:
	ldr	r3, [fp, #-428]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-412]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #2
	bne	.L11
	ldr	r2, [fp, #-428]
	ldr	r3, [fp, #-420]
	add	r1, r3, #1
	str	r1, [fp, #-420]
	lsr	r1, r2, #31
	add	r2, r1, r2
	asr	r2, r2, #1
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-404]
	ldr	r3, [fp, #-428]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-428]
	ldr	r3, [fp, #-428]
	mov	r1, r3
	ldr	r0, .L15+16
	bl	printf
	b	.L10
.L11:
	ldr	r2, [fp, #-428]
	ldr	r3, [fp, #-420]
	add	r1, r3, #1
	str	r1, [fp, #-420]
	ldr	r1, .L15+8
	smull	r0, r1, r2, r1
	asr	r2, r2, #31
	sub	r2, r1, r2
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-404]
	ldr	r3, [fp, #-428]
	ldr	r2, .L15+8
	smull	r1, r2, r3, r2
	asr	r3, r3, #31
	sub	r3, r2, r3
	str	r3, [fp, #-428]
	ldr	r3, [fp, #-428]
	mov	r1, r3
	ldr	r0, .L15+16
	bl	printf
.L10:
	ldr	r3, [fp, #-424]
	sub	r3, r3, #1
	str	r3, [fp, #-424]
.L8:
	ldr	r3, [fp, #-424]
	cmp	r3, #0
	bgt	.L12
	mov	r0, #10
	bl	putchar
	mov	r3, #0
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC3
	.word	.LC0
	.word	1431655766
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
