	.file	"594412.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%hd"
.LC1:
	.string	"%3hd"
.LC2:
	.string	" %3hd"
	.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
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 120
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
.L20:
	mov	rax, rsp
	mov	QWORD PTR -136[rbp], rax
	lea	rax, -92[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	movzx	esi, WORD PTR -92[rbp]
	movzx	edi, WORD PTR -92[rbp]
	movzx	eax, si
	sub	rax, 1
	mov	QWORD PTR -80[rbp], rax
	movzx	eax, si
	mov	QWORD PTR -160[rbp], rax
	mov	QWORD PTR -152[rbp], 0
	movzx	eax, si
	lea	rbx, [rax+rax]
	movzx	eax, di
	sub	rax, 1
	mov	QWORD PTR -72[rbp], rax
	movzx	eax, si
	mov	r12, rax
	mov	r13d, 0
	movzx	eax, di
	mov	r14, rax
	mov	r15d, 0
	mov	rdx, r13
	imul	rdx, r14
	mov	rax, r15
	imul	rax, r12
	lea	rcx, [rdx+rax]
	mov	rax, r12
	mul	r14
	add	rcx, rdx
	mov	rdx, rcx
	movzx	eax, si
	mov	QWORD PTR -128[rbp], rax
	mov	QWORD PTR -120[rbp], 0
	movzx	eax, di
	mov	QWORD PTR -112[rbp], rax
	mov	QWORD PTR -104[rbp], 0
	mov	r9, QWORD PTR -128[rbp]
	mov	r10, QWORD PTR -120[rbp]
	mov	rdx, r10
	imul	rdx, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR -104[rbp]
	imul	rax, r9
	lea	rcx, [rdx+rax]
	mov	rax, r9
	mul	QWORD PTR -112[rbp]
	add	rcx, rdx
	mov	rdx, rcx
	movzx	edx, si
	movzx	eax, di
	imul	rax, rdx
	lea	rdx, [rax+rax]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	edi, 16
	mov	edx, 0
	div	rdi
	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, 1
	shr	rax
	add	rax, rax
	mov	QWORD PTR -64[rbp], rax
	movzx	eax, WORD PTR -92[rbp]
	test	ax, ax
	jne	.L5
	mov	eax, 0
	mov	rsp, QWORD PTR -136[rbp]
	mov	rbx, QWORD PTR -56[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L21
	jmp	.L22
.L5:
	mov	WORD PTR -86[rbp], 0
	movzx	eax, WORD PTR -92[rbp]
	mov	WORD PTR -88[rbp], ax
	mov	WORD PTR -90[rbp], 1
.L13:
	movzx	eax, WORD PTR -86[rbp]
	mov	WORD PTR -84[rbp], ax
	jmp	.L7
.L10:
	movzx	eax, WORD PTR -86[rbp]
	mov	WORD PTR -82[rbp], ax
	jmp	.L8
.L9:
	mov	r8, rbx
	shr	r8
	movzx	edx, WORD PTR -84[rbp]
	movzx	eax, WORD PTR -82[rbp]
	movzx	edi, WORD PTR -90[rbp]
	mov	rcx, QWORD PTR -64[rbp]
	movsx	rsi, eax
	movsx	rax, edx
	imul	rax, r8
	add	rax, rsi
	mov	WORD PTR [rcx+rax*2], di
	movzx	eax, WORD PTR -82[rbp]
	add	eax, 1
	mov	WORD PTR -82[rbp], ax
.L8:
	movzx	eax, WORD PTR -82[rbp]
	cmp	ax, WORD PTR -88[rbp]
	jb	.L9
	movzx	eax, WORD PTR -84[rbp]
	add	eax, 1
	mov	WORD PTR -84[rbp], ax
.L7:
	movzx	eax, WORD PTR -84[rbp]
	cmp	ax, WORD PTR -88[rbp]
	jb	.L10
	cmp	WORD PTR -88[rbp], 0
	je	.L24
	movzx	eax, WORD PTR -88[rbp]
	sub	eax, 1
	mov	WORD PTR -88[rbp], ax
	movzx	eax, WORD PTR -86[rbp]
	add	eax, 1
	mov	WORD PTR -86[rbp], ax
	movzx	eax, WORD PTR -90[rbp]
	add	eax, 1
	mov	WORD PTR -90[rbp], ax
	jmp	.L13
.L24:
	nop
	mov	WORD PTR -84[rbp], 0
	jmp	.L14
.L19:
	mov	WORD PTR -82[rbp], 0
	jmp	.L15
.L18:
	cmp	WORD PTR -82[rbp], 0
	jne	.L16
	mov	rsi, rbx
	shr	rsi
	movzx	edx, WORD PTR -84[rbp]
	movzx	eax, WORD PTR -82[rbp]
	mov	rcx, QWORD PTR -64[rbp]
	movsx	rdi, eax
	movsx	rax, edx
	imul	rax, rsi
	add	rax, rdi
	movzx	eax, WORD PTR [rcx+rax*2]
	cwde
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L17
.L16:
	mov	rsi, rbx
	shr	rsi
	movzx	edx, WORD PTR -84[rbp]
	movzx	eax, WORD PTR -82[rbp]
	mov	rcx, QWORD PTR -64[rbp]
	movsx	rdi, eax
	movsx	rax, edx
	imul	rax, rsi
	add	rax, rdi
	movzx	eax, WORD PTR [rcx+rax*2]
	cwde
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L17:
	movzx	eax, WORD PTR -82[rbp]
	add	eax, 1
	mov	WORD PTR -82[rbp], ax
.L15:
	movzx	eax, WORD PTR -92[rbp]
	cmp	WORD PTR -82[rbp], ax
	jb	.L18
	mov	edi, 10
	call	putchar@PLT
	movzx	eax, WORD PTR -84[rbp]
	add	eax, 1
	mov	WORD PTR -84[rbp], ax
.L14:
	movzx	eax, WORD PTR -92[rbp]
	cmp	WORD PTR -84[rbp], ax
	jb	.L19
	mov	edi, 10
	call	putchar@PLT
	mov	rsp, QWORD PTR -136[rbp]
	jmp	.L20
.L22:
	call	__stack_chk_fail@PLT
.L21:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.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	"594412.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%hd\000"
	.align	2
.LC1:
	.ascii	"%3hd\000"
	.align	2
.LC2:
	.ascii	" %3hd\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 = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, fp, lr}
	add	fp, sp, #24
	sub	sp, sp, #36
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
.L17:
	mov	r3, sp
	mov	r8, r3
	sub	r3, fp, #56
	mov	r1, r3
	ldr	r0, .L22+4
	bl	__isoc99_scanf
	ldrh	ip, [fp, #-56]
	ldrh	lr, [fp, #-56]
	mov	r3, ip
	sub	r3, r3, #1
	str	r3, [fp, #-44]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #4
	orr	r3, r3, r0, lsr #28
	lsl	r2, r0, #4
	mov	r3, ip
	lsl	r6, r3, #1
	mov	r3, lr
	sub	r3, r3, #1
	str	r3, [fp, #-40]
	mov	r3, ip
	mov	r4, r3
	mov	r5, #0
	mov	r3, lr
	mov	r0, r3
	mov	r1, #0
	mul	r2, r0, r5
	mul	r3, r4, r1
	add	r7, r2, r3
	umull	r2, r3, r4, r0
	add	r1, r7, r3
	mov	r3, r1
	mov	r0, #0
	mov	r1, #0
	lsl	r1, r3, #4
	orr	r1, r1, r2, lsr #28
	lsl	r0, r2, #4
	mov	r3, ip
	mov	r4, r3
	mov	r5, #0
	mov	r3, lr
	mov	r0, r3
	mov	r1, #0
	mul	r2, r0, r5
	mul	r3, r4, r1
	add	r7, r2, r3
	umull	r2, r3, r4, r0
	add	r1, r7, r3
	mov	r3, r1
	mov	r0, #0
	mov	r1, #0
	lsl	r1, r3, #4
	orr	r1, r1, r2, lsr #28
	lsl	r0, r2, #4
	mov	r3, ip
	mov	r2, lr
	mul	r3, r2, r3
	lsl	r3, r3, #1
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #1
	lsr	r3, r3, #1
	lsl	r3, r3, #1
	str	r3, [fp, #-36]
	ldrh	r3, [fp, #-56]
	cmp	r3, #0
	bne	.L2
	mov	r3, #0
	mov	sp, r8
	ldr	r2, .L22
	ldr	r1, [r2]
	ldr	r2, [fp, #-32]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L18
	b	.L19
.L2:
	mov	r3, #0
	strh	r3, [fp, #-50]	@ movhi
	ldrh	r3, [fp, #-56]	@ movhi
	strh	r3, [fp, #-52]	@ movhi
	mov	r3, #1
	strh	r3, [fp, #-54]	@ movhi
.L10:
	ldrh	r3, [fp, #-50]	@ movhi
	strh	r3, [fp, #-48]	@ movhi
	b	.L4
.L7:
	ldrh	r3, [fp, #-50]	@ movhi
	strh	r3, [fp, #-46]	@ movhi
	b	.L5
.L6:
	lsr	r0, r6, #1
	ldrh	ip, [fp, #-48]
	ldrh	r3, [fp, #-46]
	ldrsh	r2, [fp, #-54]
	ldr	r1, [fp, #-36]
	mul	r0, ip, r0
	add	r3, r0, r3
	lsl	r3, r3, #1
	add	r3, r1, r3
	strh	r2, [r3]	@ movhi
	ldrh	r3, [fp, #-46]
	add	r3, r3, #1
	strh	r3, [fp, #-46]	@ movhi
.L5:
	ldrh	r2, [fp, #-46]
	ldrh	r3, [fp, #-52]
	cmp	r2, r3
	bcc	.L6
	ldrh	r3, [fp, #-48]
	add	r3, r3, #1
	strh	r3, [fp, #-48]	@ movhi
.L4:
	ldrh	r2, [fp, #-48]
	ldrh	r3, [fp, #-52]
	cmp	r2, r3
	bcc	.L7
	ldrh	r3, [fp, #-52]
	cmp	r3, #0
	beq	.L21
	ldrh	r3, [fp, #-52]
	sub	r3, r3, #1
	strh	r3, [fp, #-52]	@ movhi
	ldrh	r3, [fp, #-50]
	add	r3, r3, #1
	strh	r3, [fp, #-50]	@ movhi
	ldrh	r3, [fp, #-54]
	add	r3, r3, #1
	strh	r3, [fp, #-54]	@ movhi
	b	.L10
.L21:
	nop
	mov	r3, #0
	strh	r3, [fp, #-48]	@ movhi
	b	.L11
.L16:
	mov	r3, #0
	strh	r3, [fp, #-46]	@ movhi
	b	.L12
.L15:
	ldrh	r3, [fp, #-46]
	cmp	r3, #0
	bne	.L13
	lsr	r1, r6, #1
	ldrh	r0, [fp, #-48]
	ldrh	r3, [fp, #-46]
	ldr	r2, [fp, #-36]
	mul	r1, r0, r1
	add	r3, r1, r3
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrsh	r3, [r3]
	mov	r1, r3
	ldr	r0, .L22+8
	bl	printf
	b	.L14
.L13:
	lsr	r1, r6, #1
	ldrh	r0, [fp, #-48]
	ldrh	r3, [fp, #-46]
	ldr	r2, [fp, #-36]
	mul	r1, r0, r1
	add	r3, r1, r3
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrsh	r3, [r3]
	mov	r1, r3
	ldr	r0, .L22+12
	bl	printf
.L14:
	ldrh	r3, [fp, #-46]
	add	r3, r3, #1
	strh	r3, [fp, #-46]	@ movhi
.L12:
	ldrh	r3, [fp, #-56]
	ldrh	r2, [fp, #-46]
	cmp	r2, r3
	bcc	.L15
	mov	r0, #10
	bl	putchar
	ldrh	r3, [fp, #-48]
	add	r3, r3, #1
	strh	r3, [fp, #-48]	@ movhi
.L11:
	ldrh	r3, [fp, #-56]
	ldrh	r2, [fp, #-48]
	cmp	r2, r3
	bcc	.L16
	mov	r0, #10
	bl	putchar
	mov	sp, r8
	b	.L17
.L19:
	bl	__stack_chk_fail
.L18:
	mov	r0, r3
	sub	sp, fp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC3
	.word	.LC0
	.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
