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>
int main(){
  long long n,m,x,ans=0,s[100010],f[100010]={},lc,ls,nokori,sum=0,i,a;
  scanf("%lld %lld %lld",&n,&x,&m);
  int d[10]={1,2,3,4,2,6,7,1};
  f[x]=1;
  s[x]=x;
  sum=x;
  for(i=2;i<=n;i++){
    a=(x*x)%m;
    //a=d[x];
    sum=s[x]+a;
    if(f[a])break;
    f[a]=i;
    s[a]=sum;
    x=a;
  }
  ls=sum-s[a];
  lc=i-f[a];
  nokori=n-i;
  if(lc==0){
    printf("%lld\n",x*n);
    return 0;
  }
  //printf("%lld\n",i);
  //printf("%lld %lld %lld %lld %lld\n",ls,lc,sum,nokori,f[a]);
  //if(nokori<0)nokori=0;
  ans=sum+(nokori/lc)*ls;
  nokori=nokori%lc;
  x=a;
  //printf("%lld\n",x);
  for(i=0;i<nokori;i++){
    a=(x*x)%m;
    //a=d[x];
    ans+=a;
    x=a;
  }
  printf("%lld\n",ans);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld %lld %lld"
.LC1:
	.string	"%lld\n"
	.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
	leaq	-1597440(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2864, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -1600280(%rbp)
	leaq	-800096(%rbp), %rax
	movl	$800080, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$0, -1600272(%rbp)
	leaq	-1600296(%rbp), %rcx
	leaq	-1600288(%rbp), %rdx
	leaq	-1600304(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -1600224(%rbp)
	movq	$0, -1600216(%rbp)
	movq	$0, -1600208(%rbp)
	movq	$0, -1600200(%rbp)
	movq	$0, -1600192(%rbp)
	movl	$1, -1600224(%rbp)
	movl	$2, -1600220(%rbp)
	movl	$3, -1600216(%rbp)
	movl	$4, -1600212(%rbp)
	movl	$2, -1600208(%rbp)
	movl	$6, -1600204(%rbp)
	movl	$7, -1600200(%rbp)
	movl	$1, -1600196(%rbp)
	movq	-1600288(%rbp), %rax
	movq	$1, -800096(%rbp,%rax,8)
	movq	-1600288(%rbp), %rax
	movq	-1600288(%rbp), %rdx
	movq	%rdx, -1600176(%rbp,%rax,8)
	movq	-1600288(%rbp), %rax
	movq	%rax, -1600272(%rbp)
	movq	$2, -1600264(%rbp)
	jmp	.L2
.L5:
	movq	-1600288(%rbp), %rdx
	movq	-1600288(%rbp), %rax
	imulq	%rdx, %rax
	movq	-1600296(%rbp), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -1600256(%rbp)
	movq	-1600288(%rbp), %rax
	movq	-1600176(%rbp,%rax,8), %rdx
	movq	-1600256(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -1600272(%rbp)
	movq	-1600256(%rbp), %rax
	movq	-800096(%rbp,%rax,8), %rax
	testq	%rax, %rax
	jne	.L12
	movq	-1600256(%rbp), %rax
	movq	-1600264(%rbp), %rdx
	movq	%rdx, -800096(%rbp,%rax,8)
	movq	-1600256(%rbp), %rax
	movq	-1600272(%rbp), %rdx
	movq	%rdx, -1600176(%rbp,%rax,8)
	movq	-1600256(%rbp), %rax
	movq	%rax, -1600288(%rbp)
	addq	$1, -1600264(%rbp)
.L2:
	movq	-1600304(%rbp), %rax
	cmpq	%rax, -1600264(%rbp)
	jle	.L5
	jmp	.L4
.L12:
	nop
.L4:
	movq	-1600256(%rbp), %rax
	movq	-1600176(%rbp,%rax,8), %rdx
	movq	-1600272(%rbp), %rax
	subq	%rdx, %rax
	movq	%rax, -1600248(%rbp)
	movq	-1600256(%rbp), %rax
	movq	-800096(%rbp,%rax,8), %rdx
	movq	-1600264(%rbp), %rax
	subq	%rdx, %rax
	movq	%rax, -1600240(%rbp)
	movq	-1600304(%rbp), %rax
	subq	-1600264(%rbp), %rax
	movq	%rax, -1600232(%rbp)
	cmpq	$0, -1600240(%rbp)
	jne	.L6
	movq	-1600288(%rbp), %rdx
	movq	-1600304(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L10
.L6:
	movq	-1600232(%rbp), %rax
	cqto
	idivq	-1600240(%rbp)
	imulq	-1600248(%rbp), %rax
	movq	%rax, %rdx
	movq	-1600272(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -1600280(%rbp)
	movq	-1600232(%rbp), %rax
	cqto
	idivq	-1600240(%rbp)
	movq	%rdx, -1600232(%rbp)
	movq	-1600256(%rbp), %rax
	movq	%rax, -1600288(%rbp)
	movq	$0, -1600264(%rbp)
	jmp	.L8
.L9:
	movq	-1600288(%rbp), %rdx
	movq	-1600288(%rbp), %rax
	imulq	%rdx, %rax
	movq	-1600296(%rbp), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -1600256(%rbp)
	movq	-1600256(%rbp), %rax
	addq	%rax, -1600280(%rbp)
	movq	-1600256(%rbp), %rax
	movq	%rax, -1600288(%rbp)
	addq	$1, -1600264(%rbp)
.L8:
	movq	-1600264(%rbp), %rax
	cmpq	-1600232(%rbp), %rax
	jl	.L9
	movq	-1600280(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L10:
	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	"%lld %lld %lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	-1597440(%rsp), %r11
	.cfi_def_cfa 11, 1597456
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2768, %rsp
	.cfi_def_cfa_offset 1600224
	movl	$800080, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 1600200(%rsp)
	xorl	%eax, %eax
	leaq	800112(%rsp), %rdi
	call	memset@PLT
	leaq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	24(%rsp), %rdx
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	24(%rsp), %rsi
	movq	8(%rsp), %r10
	movq	$1, 800112(%rsp,%rsi,8)
	movq	%rsi, 32(%rsp,%rsi,8)
	cmpq	$1, %r10
	jle	.L11
	movq	16(%rsp), %r9
	movq	%rsi, %rdi
	xorl	%r11d, %r11d
	movl	$2, %ecx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rcx, 800112(%rsp,%rdx,8)
	addq	$1, %rcx
	movl	$1, %r11d
	movq	%rdi, 32(%rsp,%rdx,8)
	cmpq	%r10, %rcx
	jg	.L19
.L5:
	movq	%rsi, %rax
	movq	%rsi, %r8
	imulq	%rsi, %rax
	cqto
	idivq	%r9
	addq	%rdx, %rdi
	movq	%rdx, %rsi
	cmpq	$0, 800112(%rsp,%rdx,8)
	je	.L3
	testb	%r11b, %r11b
	je	.L4
	movq	%r8, 24(%rsp)
.L4:
	movq	%rdx, %rbx
	movq	%rdi, %rsi
.L2:
	movq	%r10, %rax
	movq	%rsi, %r8
	subq	32(%rsp,%rbx,8), %r8
	subq	%rcx, %rax
	subq	800112(%rsp,%rbx,8), %rcx
	je	.L20
	cqto
	movq	%rbx, 24(%rsp)
	idivq	%rcx
	imulq	%r8, %rax
	movq	%rdx, %rdi
	leaq	(%rax,%rsi), %r8
	testq	%rdx, %rdx
	jle	.L8
	movq	16(%rsp), %rsi
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbx, %rax
	addq	$1, %rcx
	imulq	%rbx, %rax
	cqto
	idivq	%rsi
	movq	%rdx, %rbx
	addq	%rdx, %r8
	cmpq	%rcx, %rdi
	jne	.L9
	movq	%rdx, 24(%rsp)
.L8:
	movq	%r8, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L7:
	movq	1600200(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$1600208, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L19:
	.cfi_restore_state
	movq	%rdx, 24(%rsp)
	movq	%rdx, %rbx
	movq	%rdi, %rsi
	jmp	.L2
.L20:
	movq	24(%rsp), %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	imulq	%r10, %rdx
	call	__printf_chk@PLT
	jmp	.L7
.L11:
	movl	$2, %ecx
	jmp	.L2
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld %lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	-1597440(%rsp), %r11
	.cfi_def_cfa 11, 1597456
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2768, %rsp
	.cfi_def_cfa_offset 1600224
	movl	$800080, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 1600200(%rsp)
	xorl	%eax, %eax
	leaq	800112(%rsp), %rdi
	call	memset@PLT
	leaq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	24(%rsp), %rdx
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	24(%rsp), %rsi
	movq	8(%rsp), %r10
	movq	$1, 800112(%rsp,%rsi,8)
	movq	%rsi, 32(%rsp,%rsi,8)
	cmpq	$1, %r10
	jle	.L11
	movq	16(%rsp), %r9
	movq	%rsi, %rdi
	xorl	%r11d, %r11d
	movl	$2, %ecx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rcx, 800112(%rsp,%rdx,8)
	addq	$1, %rcx
	movl	$1, %r11d
	movq	%rdi, 32(%rsp,%rdx,8)
	cmpq	%r10, %rcx
	jg	.L19
.L5:
	movq	%rsi, %rax
	movq	%rsi, %r8
	imulq	%rsi, %rax
	cqto
	idivq	%r9
	addq	%rdx, %rdi
	movq	%rdx, %rsi
	cmpq	$0, 800112(%rsp,%rdx,8)
	je	.L3
	testb	%r11b, %r11b
	je	.L4
	movq	%r8, 24(%rsp)
.L4:
	movq	%rdx, %rbx
	movq	%rdi, %rsi
.L2:
	movq	%r10, %rax
	movq	%rsi, %r8
	subq	32(%rsp,%rbx,8), %r8
	subq	%rcx, %rax
	subq	800112(%rsp,%rbx,8), %rcx
	je	.L20
	cqto
	movq	%rbx, 24(%rsp)
	idivq	%rcx
	imulq	%r8, %rax
	movq	%rdx, %rdi
	leaq	(%rax,%rsi), %r8
	testq	%rdx, %rdx
	jle	.L8
	movq	16(%rsp), %rsi
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbx, %rax
	addq	$1, %rcx
	imulq	%rbx, %rax
	cqto
	idivq	%rsi
	movq	%rdx, %rbx
	addq	%rdx, %r8
	cmpq	%rcx, %rdi
	jne	.L9
	movq	%rdx, 24(%rsp)
.L8:
	movq	%r8, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L7:
	movq	1600200(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$1600208, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L19:
	.cfi_restore_state
	movq	%rdx, 24(%rsp)
	movq	%rdx, %rbx
	movq	%rdi, %rsi
	jmp	.L2
.L20:
	movq	24(%rsp), %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	imulq	%r10, %rdx
	call	__printf_chk@PLT
	jmp	.L7
.L11:
	movl	$2, %ecx
	jmp	.L2
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

#include<stdio.h>
int main(){
  long long n,m,x,ans=0,s[100010],f[100010]={},lc,ls,nokori,sum=0,i,a;
  scanf("%lld %lld %lld",&n,&x,&m);
  int d[10]={1,2,3,4,2,6,7,1};
  f[x]=1;
  s[x]=x;
  sum=x;
  for(i=2;i<=n;i++){
    a=(x*x)%m;
    //a=d[x];
    sum=s[x]+a;
    if(f[a])break;
    f[a]=i;
    s[a]=sum;
    x=a;
  }
  ls=sum-s[a];
  lc=i-f[a];
  nokori=n-i;
  if(lc==0){
    printf("%lld\n",x*n);
    return 0;
  }
  //printf("%lld\n",i);
  //printf("%lld %lld %lld %lld %lld\n",ls,lc,sum,nokori,f[a]);
  //if(nokori<0)nokori=0;
  ans=sum+(nokori/lc)*ls;
  nokori=nokori%lc;
  x=a;
  //printf("%lld\n",x);
  for(i=0;i<nokori;i++){
    a=(x*x)%m;
    //a=d[x];
    ans+=a;
    x=a;
  }
  printf("%lld\n",ans);
  return 0;
}

10000000000 2 99959
 1000 0 16
 10010000000 2 99959
 10010000100 2 99959
 10000000000 15 99959
 6 2 1101
 1100 2 16
 10010001000 2 99959
 11010000100 2 99959
 1000 1 20

500550770156172
 0
 501051320374664
 501051325615660
 500550769812856
 1282
 6
 501051370879075
 551106402301729
 1000

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>
int main(){
  long long n,m,x,ans=0,s[100010],f[100010]={},lc,ls,nokori,sum=0,i,a;
  scanf("%lld %lld %lld",&n,&x,&m);
  int d[10]={1,2,3,4,2,6,7,1};
  f[x]=1;
  s[x]=x;
  sum=x;
  for(i=2;i<=n;i++){
    a=(x*x)%m;
    //a=d[x];
    sum=s[x]+a;
    if(f[a])break;
    f[a]=i;
    s[a]=sum;
    x=a;
  }
  ls=sum-s[a];
  lc=i-f[a];
  nokori=n-i;
  if(lc==0){
    printf("%lld\n",x*n);
    return 0;
  }
  //printf("%lld\n",i);
  //printf("%lld %lld %lld %lld %lld\n",ls,lc,sum,nokori,f[a]);
  //if(nokori<0)nokori=0;
  ans=sum+(nokori/lc)*ls;
  nokori=nokori%lc;
  x=a;
  //printf("%lld\n",x);
  for(i=0;i<nokori;i++){
    a=(x*x)%m;
    //a=d[x];
    ans+=a;
    x=a;
  }
  printf("%lld\n",ans);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld %lld %lld"
.LC1:
	.string	"%lld\n"
	.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
	leaq	-1597440(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2864, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -1600280(%rbp)
	leaq	-800096(%rbp), %rax
	movl	$800080, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$0, -1600272(%rbp)
	leaq	-1600296(%rbp), %rcx
	leaq	-1600288(%rbp), %rdx
	leaq	-1600304(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -1600224(%rbp)
	movq	$0, -1600216(%rbp)
	movq	$0, -1600208(%rbp)
	movq	$0, -1600200(%rbp)
	movq	$0, -1600192(%rbp)
	movl	$1, -1600224(%rbp)
	movl	$2, -1600220(%rbp)
	movl	$3, -1600216(%rbp)
	movl	$4, -1600212(%rbp)
	movl	$2, -1600208(%rbp)
	movl	$6, -1600204(%rbp)
	movl	$7, -1600200(%rbp)
	movl	$1, -1600196(%rbp)
	movq	-1600288(%rbp), %rax
	movq	$1, -800096(%rbp,%rax,8)
	movq	-1600288(%rbp), %rax
	movq	-1600288(%rbp), %rdx
	movq	%rdx, -1600176(%rbp,%rax,8)
	movq	-1600288(%rbp), %rax
	movq	%rax, -1600272(%rbp)
	movq	$2, -1600264(%rbp)
	jmp	.L2
.L5:
	movq	-1600288(%rbp), %rdx
	movq	-1600288(%rbp), %rax
	imulq	%rdx, %rax
	movq	-1600296(%rbp), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -1600256(%rbp)
	movq	-1600288(%rbp), %rax
	movq	-1600176(%rbp,%rax,8), %rdx
	movq	-1600256(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -1600272(%rbp)
	movq	-1600256(%rbp), %rax
	movq	-800096(%rbp,%rax,8), %rax
	testq	%rax, %rax
	jne	.L12
	movq	-1600256(%rbp), %rax
	movq	-1600264(%rbp), %rdx
	movq	%rdx, -800096(%rbp,%rax,8)
	movq	-1600256(%rbp), %rax
	movq	-1600272(%rbp), %rdx
	movq	%rdx, -1600176(%rbp,%rax,8)
	movq	-1600256(%rbp), %rax
	movq	%rax, -1600288(%rbp)
	addq	$1, -1600264(%rbp)
.L2:
	movq	-1600304(%rbp), %rax
	cmpq	%rax, -1600264(%rbp)
	jle	.L5
	jmp	.L4
.L12:
	nop
.L4:
	movq	-1600256(%rbp), %rax
	movq	-1600176(%rbp,%rax,8), %rdx
	movq	-1600272(%rbp), %rax
	subq	%rdx, %rax
	movq	%rax, -1600248(%rbp)
	movq	-1600256(%rbp), %rax
	movq	-800096(%rbp,%rax,8), %rdx
	movq	-1600264(%rbp), %rax
	subq	%rdx, %rax
	movq	%rax, -1600240(%rbp)
	movq	-1600304(%rbp), %rax
	subq	-1600264(%rbp), %rax
	movq	%rax, -1600232(%rbp)
	cmpq	$0, -1600240(%rbp)
	jne	.L6
	movq	-1600288(%rbp), %rdx
	movq	-1600304(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L10
.L6:
	movq	-1600232(%rbp), %rax
	cqto
	idivq	-1600240(%rbp)
	imulq	-1600248(%rbp), %rax
	movq	%rax, %rdx
	movq	-1600272(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -1600280(%rbp)
	movq	-1600232(%rbp), %rax
	cqto
	idivq	-1600240(%rbp)
	movq	%rdx, -1600232(%rbp)
	movq	-1600256(%rbp), %rax
	movq	%rax, -1600288(%rbp)
	movq	$0, -1600264(%rbp)
	jmp	.L8
.L9:
	movq	-1600288(%rbp), %rdx
	movq	-1600288(%rbp), %rax
	imulq	%rdx, %rax
	movq	-1600296(%rbp), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -1600256(%rbp)
	movq	-1600256(%rbp), %rax
	addq	%rax, -1600280(%rbp)
	movq	-1600256(%rbp), %rax
	movq	%rax, -1600288(%rbp)
	addq	$1, -1600264(%rbp)
.L8:
	movq	-1600264(%rbp), %rax
	cmpq	-1600232(%rbp), %rax
	jl	.L9
	movq	-1600280(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L10:
	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
	.section	.rodata
.LC0:
	.string	"%lld %lld %lld"
.LC1:
	.string	"%lld\n"
	.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
	leaq	-1597440(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2864, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -1600280(%rbp)
	leaq	-800096(%rbp), %rax
	movl	$800080, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$0, -1600272(%rbp)
	leaq	-1600296(%rbp), %rcx
	leaq	-1600288(%rbp), %rdx
	leaq	-1600304(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -1600224(%rbp)
	movq	$0, -1600216(%rbp)
	movq	$0, -1600208(%rbp)
	movq	$0, -1600200(%rbp)
	movq	$0, -1600192(%rbp)
	movl	$1, -1600224(%rbp)
	movl	$2, -1600220(%rbp)
	movl	$3, -1600216(%rbp)
	movl	$4, -1600212(%rbp)
	movl	$2, -1600208(%rbp)
	movl	$6, -1600204(%rbp)
	movl	$7, -1600200(%rbp)
	movl	$1, -1600196(%rbp)
	movq	-1600288(%rbp), %rax
	movq	$1, -800096(%rbp,%rax,8)
	movq	-1600288(%rbp), %rax
	movq	-1600288(%rbp), %rdx
	movq	%rdx, -1600176(%rbp,%rax,8)
	movq	-1600288(%rbp), %rax
	movq	%rax, -1600272(%rbp)
	movq	$2, -1600264(%rbp)
	jmp	.L2
.L5:
	movq	-1600288(%rbp), %rdx
	movq	-1600288(%rbp), %rax
	imulq	%rdx, %rax
	movq	-1600296(%rbp), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -1600256(%rbp)
	movq	-1600288(%rbp), %rax
	movq	-1600176(%rbp,%rax,8), %rdx
	movq	-1600256(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -1600272(%rbp)
	movq	-1600256(%rbp), %rax
	movq	-800096(%rbp,%rax,8), %rax
	testq	%rax, %rax
	jne	.L12
	movq	-1600256(%rbp), %rax
	movq	-1600264(%rbp), %rdx
	movq	%rdx, -800096(%rbp,%rax,8)
	movq	-1600256(%rbp), %rax
	movq	-1600272(%rbp), %rdx
	movq	%rdx, -1600176(%rbp,%rax,8)
	movq	-1600256(%rbp), %rax
	movq	%rax, -1600288(%rbp)
	addq	$1, -1600264(%rbp)
.L2:
	movq	-1600304(%rbp), %rax
	cmpq	%rax, -1600264(%rbp)
	jle	.L5
	jmp	.L4
.L12:
	nop
.L4:
	movq	-1600256(%rbp), %rax
	movq	-1600176(%rbp,%rax,8), %rdx
	movq	-1600272(%rbp), %rax
	subq	%rdx, %rax
	movq	%rax, -1600248(%rbp)
	movq	-1600256(%rbp), %rax
	movq	-800096(%rbp,%rax,8), %rdx
	movq	-1600264(%rbp), %rax
	subq	%rdx, %rax
	movq	%rax, -1600240(%rbp)
	movq	-1600304(%rbp), %rax
	subq	-1600264(%rbp), %rax
	movq	%rax, -1600232(%rbp)
	cmpq	$0, -1600240(%rbp)
	jne	.L6
	movq	-1600288(%rbp), %rdx
	movq	-1600304(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L10
.L6:
	movq	-1600232(%rbp), %rax
	cqto
	idivq	-1600240(%rbp)
	imulq	-1600248(%rbp), %rax
	movq	%rax, %rdx
	movq	-1600272(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -1600280(%rbp)
	movq	-1600232(%rbp), %rax
	cqto
	idivq	-1600240(%rbp)
	movq	%rdx, -1600232(%rbp)
	movq	-1600256(%rbp), %rax
	movq	%rax, -1600288(%rbp)
	movq	$0, -1600264(%rbp)
	jmp	.L8
.L9:
	movq	-1600288(%rbp), %rdx
	movq	-1600288(%rbp), %rax
	imulq	%rdx, %rax
	movq	-1600296(%rbp), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -1600256(%rbp)
	movq	-1600256(%rbp), %rax
	addq	%rax, -1600280(%rbp)
	movq	-1600256(%rbp), %rax
	movq	%rax, -1600288(%rbp)
	addq	$1, -1600264(%rbp)
.L8:
	movq	-1600264(%rbp), %rax
	cmpq	-1600232(%rbp), %rax
	jl	.L9
	movq	-1600280(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L10:
	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:
