Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define DEB 0

//answer_max:2192
unsigned short int dp[5][32770];

int main(){
  unsigned short int i,j,k;
  int n;
  for(i=1; i*i<(1<<15); i++){
    dp[1][i*i] = 1;
    for(j=i*i+1; j<(1<<15); j++){
      for(k=1; k<4; k++){
	dp[k+1][j] += dp[k][j-i*i];
      }
    }
  }
  while(scanf("%d",&n),n){
    printf("%d\n",dp[1][n]+dp[2][n]+dp[3][n]+dp[4][n]);
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 327700
dp:
	.zero	327700
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movw	$1, -18(%rbp)
	jmp	.L2
.L7:
	movzwl	-18(%rbp), %edx
	movzwl	-18(%rbp), %eax
	imull	%edx, %eax
	cltq
	addq	$32770, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movw	$1, (%rdx,%rax)
	movzwl	-18(%rbp), %eax
	imull	%eax, %eax
	addl	$1, %eax
	movw	%ax, -16(%rbp)
	jmp	.L3
.L6:
	movw	$1, -14(%rbp)
	jmp	.L4
.L5:
	movzwl	-14(%rbp), %eax
	leal	1(%rax), %edx
	movzwl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movzwl	(%rdx,%rax), %edi
	movzwl	-14(%rbp), %eax
	movzwl	-16(%rbp), %edx
	movzwl	-18(%rbp), %esi
	movzwl	-18(%rbp), %ecx
	imull	%esi, %ecx
	subl	%ecx, %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movzwl	(%rdx,%rax), %ecx
	movzwl	-14(%rbp), %eax
	leal	1(%rax), %edx
	movzwl	-16(%rbp), %eax
	addl	%edi, %ecx
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movw	%cx, (%rdx,%rax)
	movzwl	-14(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -14(%rbp)
.L4:
	cmpw	$3, -14(%rbp)
	jbe	.L5
	movzwl	-16(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -16(%rbp)
.L3:
	movzwl	-16(%rbp), %eax
	testw	%ax, %ax
	jns	.L6
	movzwl	-18(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -18(%rbp)
.L2:
	movzwl	-18(%rbp), %edx
	movzwl	-18(%rbp), %eax
	imull	%edx, %eax
	cmpl	$32767, %eax
	jle	.L7
	jmp	.L8
.L9:
	movl	-12(%rbp), %eax
	cltq
	addq	$32770, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movzwl	(%rdx,%rax), %eax
	movzwl	%ax, %ecx
	movl	-12(%rbp), %eax
	cltq
	addq	$65540, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movzwl	(%rdx,%rax), %eax
	movzwl	%ax, %eax
	addl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	addq	$98310, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movzwl	(%rdx,%rax), %eax
	movzwl	%ax, %eax
	addl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	addq	$131080, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movzwl	(%rdx,%rax), %eax
	movzwl	%ax, %eax
	addl	%ecx, %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	testl	%eax, %eax
	jne	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$1, %r8d
	movl	$1, %edi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	dp(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%r8d, %ecx
	movslq	%edi, %rax
	movl	$1, %edx
	imull	%r8d, %ecx
	movw	%dx, 65540(%rbx,%rax,2)
	addw	$1, %cx
	js	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movzwl	%cx, %eax
	movl	%eax, %edx
	subl	%edi, %edx
	movslq	%edx, %rdx
	movzwl	65540(%rbx,%rdx,2), %esi
	addw	%si, 131080(%rbx,%rax,2)
	movzwl	131080(%rbx,%rdx,2), %esi
	addw	%si, 196620(%rbx,%rax,2)
	movzwl	196620(%rbx,%rdx,2), %edx
	addw	%dx, 262160(%rbx,%rax,2)
	addw	$1, %cx
	jns	.L3
.L2:
	addl	$1, %r8d
	movzwl	%r8w, %edi
	imull	%edi, %edi
	cmpl	$32767, %edi
	jle	.L4
	leaq	4(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	leaq	.LC0(%rip), %r13
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	movzwl	131080(%rbx,%rax,2), %ecx
	movzwl	65540(%rbx,%rax,2), %edx
	movq	%r13, %rsi
	movl	$1, %edi
	addl	%ecx, %edx
	movzwl	196620(%rbx,%rax,2), %ecx
	movzwl	262160(%rbx,%rax,2), %eax
	addl	%ecx, %edx
	addl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rax
	testl	%eax, %eax
	jne	.L6
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 327700
dp:
	.zero	327700
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$1, %r8d
	movl	$1, %edi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	dp(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%r8d, %ecx
	movslq	%edi, %rax
	movl	$1, %edx
	imull	%r8d, %ecx
	movw	%dx, 65540(%rbx,%rax,2)
	addw	$1, %cx
	js	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movzwl	%cx, %eax
	movl	%eax, %edx
	subl	%edi, %edx
	movslq	%edx, %rdx
	movzwl	65540(%rbx,%rdx,2), %esi
	addw	%si, 131080(%rbx,%rax,2)
	movzwl	131080(%rbx,%rdx,2), %esi
	addw	%si, 196620(%rbx,%rax,2)
	movzwl	196620(%rbx,%rdx,2), %edx
	addw	%dx, 262160(%rbx,%rax,2)
	addw	$1, %cx
	jns	.L3
.L2:
	addl	$1, %r8d
	movzwl	%r8w, %edi
	imull	%edi, %edi
	cmpl	$32767, %edi
	jle	.L4
	leaq	4(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	leaq	.LC0(%rip), %r13
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	movzwl	131080(%rbx,%rax,2), %ecx
	movzwl	65540(%rbx,%rax,2), %edx
	movq	%r13, %rsi
	movl	$1, %edi
	addl	%ecx, %edx
	movzwl	196620(%rbx,%rax,2), %ecx
	movzwl	262160(%rbx,%rax,2), %eax
	addl	%ecx, %edx
	addl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rax
	testl	%eax, %eax
	jne	.L6
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 327700
dp:
	.zero	327700
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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:

#include <stdio.h>

#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define DEB 0

//answer_max:2192
unsigned short int dp[5][32770];

int main(){
  unsigned short int i,j,k;
  int n;
  for(i=1; i*i<(1<<15); i++){
    dp[1][i*i] = 1;
    for(j=i*i+1; j<(1<<15); j++){
      for(k=1; k<4; k++){
	dp[k+1][j] += dp[k][j-i*i];
      }
    }
  }
  while(scanf("%d",&n),n){
    printf("%d\n",dp[1][n]+dp[2][n]+dp[3][n]+dp[4][n]);
  }
  return 0;
}
1
8
2003
211
20007
0
 1
0
2003
211
20007
0
 1
1
762
0
34403
0
 1
25
2003
170
20007
0
 1
8
2003
211
20858
0
 1
1
1704
211
20007
0
 1
14
2003
170
20007
0
 1
8
1621
211
20858
0
 1
1
1704
312
20007
0
 1
12
1621
211
20858
0

1
1
48
7
738
 1
 1
1
41
 1
3
48
11
738
 1
1
48
7
699
 1
1
24
7
738
 1
1
48
11
738
 1
1
42
7
699
 1
1
24
4
738
 1
2
42
7
699

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define DEB 0

//answer_max:2192
unsigned short int dp[5][32770];

int main(){
  unsigned short int i,j,k;
  int n;
  for(i=1; i*i<(1<<15); i++){
    dp[1][i*i] = 1;
    for(j=i*i+1; j<(1<<15); j++){
      for(k=1; k<4; k++){
	dp[k+1][j] += dp[k][j-i*i];
      }
    }
  }
  while(scanf("%d",&n),n){
    printf("%d\n",dp[1][n]+dp[2][n]+dp[3][n]+dp[4][n]);
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 327700
dp:
	.zero	327700
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movw	$1, -18(%rbp)
	jmp	.L2
.L7:
	movzwl	-18(%rbp), %edx
	movzwl	-18(%rbp), %eax
	imull	%edx, %eax
	cltq
	addq	$32770, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movw	$1, (%rdx,%rax)
	movzwl	-18(%rbp), %eax
	imull	%eax, %eax
	addl	$1, %eax
	movw	%ax, -16(%rbp)
	jmp	.L3
.L6:
	movw	$1, -14(%rbp)
	jmp	.L4
.L5:
	movzwl	-14(%rbp), %eax
	leal	1(%rax), %edx
	movzwl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movzwl	(%rdx,%rax), %edi
	movzwl	-14(%rbp), %eax
	movzwl	-16(%rbp), %edx
	movzwl	-18(%rbp), %esi
	movzwl	-18(%rbp), %ecx
	imull	%esi, %ecx
	subl	%ecx, %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movzwl	(%rdx,%rax), %ecx
	movzwl	-14(%rbp), %eax
	leal	1(%rax), %edx
	movzwl	-16(%rbp), %eax
	addl	%edi, %ecx
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movw	%cx, (%rdx,%rax)
	movzwl	-14(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -14(%rbp)
.L4:
	cmpw	$3, -14(%rbp)
	jbe	.L5
	movzwl	-16(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -16(%rbp)
.L3:
	movzwl	-16(%rbp), %eax
	testw	%ax, %ax
	jns	.L6
	movzwl	-18(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -18(%rbp)
.L2:
	movzwl	-18(%rbp), %edx
	movzwl	-18(%rbp), %eax
	imull	%edx, %eax
	cmpl	$32767, %eax
	jle	.L7
	jmp	.L8
.L9:
	movl	-12(%rbp), %eax
	cltq
	addq	$32770, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movzwl	(%rdx,%rax), %eax
	movzwl	%ax, %ecx
	movl	-12(%rbp), %eax
	cltq
	addq	$65540, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movzwl	(%rdx,%rax), %eax
	movzwl	%ax, %eax
	addl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	addq	$98310, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movzwl	(%rdx,%rax), %eax
	movzwl	%ax, %eax
	addl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	addq	$131080, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movzwl	(%rdx,%rax), %eax
	movzwl	%ax, %eax
	addl	%ecx, %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	testl	%eax, %eax
	jne	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 327700
dp:
	.zero	327700
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movw	$1, -18(%rbp)
	jmp	.L2
.L7:
	movzwl	-18(%rbp), %edx
	movzwl	-18(%rbp), %eax
	imull	%edx, %eax
	cltq
	addq	$32770, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movw	$1, (%rdx,%rax)
	movzwl	-18(%rbp), %eax
	imull	%eax, %eax
	addl	$1, %eax
	movw	%ax, -16(%rbp)
	jmp	.L3
.L6:
	movw	$1, -14(%rbp)
	jmp	.L4
.L5:
	movzwl	-14(%rbp), %eax
	leal	1(%rax), %edx
	movzwl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movzwl	(%rdx,%rax), %edi
	movzwl	-14(%rbp), %eax
	movzwl	-16(%rbp), %edx
	movzwl	-18(%rbp), %esi
	movzwl	-18(%rbp), %ecx
	imull	%esi, %ecx
	subl	%ecx, %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movzwl	(%rdx,%rax), %ecx
	movzwl	-14(%rbp), %eax
	leal	1(%rax), %edx
	movzwl	-16(%rbp), %eax
	addl	%edi, %ecx
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$14, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movw	%cx, (%rdx,%rax)
	movzwl	-14(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -14(%rbp)
.L4:
	cmpw	$3, -14(%rbp)
	jbe	.L5
	movzwl	-16(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -16(%rbp)
.L3:
	movzwl	-16(%rbp), %eax
	testw	%ax, %ax
	jns	.L6
	movzwl	-18(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -18(%rbp)
.L2:
	movzwl	-18(%rbp), %edx
	movzwl	-18(%rbp), %eax
	imull	%edx, %eax
	cmpl	$32767, %eax
	jle	.L7
	jmp	.L8
.L9:
	movl	-12(%rbp), %eax
	cltq
	addq	$32770, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movzwl	(%rdx,%rax), %eax
	movzwl	%ax, %ecx
	movl	-12(%rbp), %eax
	cltq
	addq	$65540, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movzwl	(%rdx,%rax), %eax
	movzwl	%ax, %eax
	addl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	addq	$98310, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movzwl	(%rdx,%rax), %eax
	movzwl	%ax, %eax
	addl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	addq	$131080, %rax
	leaq	(%rax,%rax), %rdx
	leaq	dp(%rip), %rax
	movzwl	(%rdx,%rax), %eax
	movzwl	%ax, %eax
	addl	%ecx, %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	testl	%eax, %eax
	jne	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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:
