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>
#include<stdlib.h>
#include<math.h>
#define MOD 1000000007
#define MAX 510000

long int FAC[MAX],FINV[MAX],INVE[MAX];
long int SUM(long int a,long int b){return (a%MOD+b%MOD+MOD)%MOD;}//a+b
long int PROD(long int a,long int b){return a%MOD*(b%MOD)%MOD;}//a*b
long int POW(long int a,long int b){//a^b
  long int c=1;
  for(a%=MOD;b;a=PROD(a,a),b>>=1)if(b&1)c=PROD(a,c);
  return c;
}
long int INV(long int a){return a<MAX?INVE[a]:POW(a,MOD-2);}//a^-1
long int QUOT(long int a,long int b){return PROD(a,INV(b));}//a/b
void init_inv(long int a){//make inv list
  INVE[1]=1;
  for(long int i=2;i<=a;i++)INVE[i]=SUM(0,-PROD(INVE[MOD%i],MOD/i));
}
void init_com(long int a){//make fac and facinv list
  FAC[0]=FAC[1]=1;
  FINV[0]=FINV[1]=1;
  init_inv(a);
  for(long int i=2;i<=a;i++){
    FAC[i]=PROD(FAC[i-1],i);
    FINV[i]=PROD(FINV[i-1],INV(i));
  }
}
long int COM(long int a,long int b){return PROD(PROD(FAC[a],FINV[a-b]),FINV[b]);}

int main(){
  int abs[100000];
  int n,i,t;
  scanf("%d",&n);
  for(i=0;i<n;i++)abs[i]=0;
  for(i=0;i<n-1;i++){
    scanf("%d",&t);if((n-t)%2)abs[t]++;
    if(!((n-t)%2)||abs[t]>2||abs[0]>1){printf("0");return 0;}
  }
  printf("%ld",POW(2,n/2));
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	FAC
	.bss
	.align 32
	.type	FAC, @object
	.size	FAC, 4080000
FAC:
	.zero	4080000
	.globl	FINV
	.align 32
	.type	FINV, @object
	.size	FINV, 4080000
FINV:
	.zero	4080000
	.globl	INVE
	.align 32
	.type	INVE, @object
	.size	INVE, 4080000
INVE:
	.zero	4080000
	.text
	.globl	SUM
	.type	SUM, @function
SUM:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rcx, %rsi
	subq	%rax, %rsi
	movq	-16(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	addq	%rsi, %rax
	leaq	1000000007(%rax), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	SUM, .-SUM
	.globl	PROD
	.type	PROD, @function
PROD:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rcx, %rsi
	subq	%rax, %rsi
	movq	-16(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	imulq	%rax, %rsi
	movq	%rsi, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	PROD, .-PROD
	.globl	POW
	.type	POW, @function
POW:
.LFB8:
	.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	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	$1, -8(%rbp)
	movq	-24(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -24(%rbp)
	jmp	.L6
.L8:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L7
	movq	-8(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	PROD
	movq	%rax, -8(%rbp)
.L7:
	movq	-24(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	PROD
	movq	%rax, -24(%rbp)
	sarq	-32(%rbp)
.L6:
	cmpq	$0, -32(%rbp)
	jne	.L8
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	POW, .-POW
	.globl	INV
	.type	INV, @function
INV:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movq	%rdi, -8(%rbp)
	cmpq	$509999, -8(%rbp)
	jg	.L11
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	INVE(%rip), %rax
	movq	(%rdx,%rax), %rax
	jmp	.L13
.L11:
	movq	-8(%rbp), %rax
	movl	$1000000005, %esi
	movq	%rax, %rdi
	call	POW
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	INV, .-INV
	.globl	QUOT
	.type	QUOT, @function
QUOT:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, %rdi
	call	INV
	movq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	PROD
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	QUOT, .-QUOT
	.globl	init_inv
	.type	init_inv, @function
init_inv:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movq	%rdi, -24(%rbp)
	movq	$1, 8+INVE(%rip)
	movq	$2, -8(%rbp)
	jmp	.L17
.L18:
	movl	$1000000007, %eax
	cqto
	idivq	-8(%rbp)
	movq	%rax, %rcx
	movl	$1000000007, %eax
	cqto
	idivq	-8(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	INVE(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	PROD
	negq	%rax
	movq	%rax, %rsi
	movl	$0, %edi
	call	SUM
	movq	-8(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	INVE(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addq	$1, -8(%rbp)
.L17:
	movq	-8(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jle	.L18
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	init_inv, .-init_inv
	.globl	init_com
	.type	init_com, @function
init_com:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movq	%rdi, -24(%rbp)
	movq	$1, 8+FAC(%rip)
	movq	8+FAC(%rip), %rax
	movq	%rax, FAC(%rip)
	movq	$1, 8+FINV(%rip)
	movq	8+FINV(%rip), %rax
	movq	%rax, FINV(%rip)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	init_inv
	movq	$2, -8(%rbp)
	jmp	.L20
.L21:
	movq	-8(%rbp), %rax
	subq	$1, %rax
	leaq	0(,%rax,8), %rdx
	leaq	FAC(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	PROD
	movq	-8(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	FAC(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	INV
	movq	%rax, %rdx
	movq	-8(%rbp), %rax
	subq	$1, %rax
	leaq	0(,%rax,8), %rcx
	leaq	FINV(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	PROD
	movq	-8(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	FINV(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addq	$1, -8(%rbp)
.L20:
	movq	-8(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jle	.L21
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	init_com, .-init_com
	.globl	COM
	.type	COM, @function
COM:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -16(%rbp)
	movq	%rsi, -24(%rbp)
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	FINV(%rip), %rax
	movq	(%rdx,%rax), %rbx
	movq	-16(%rbp), %rax
	subq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	FINV(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	leaq	FAC(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	PROD
	movq	%rbx, %rsi
	movq	%rax, %rdi
	call	PROD
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	COM, .-COM
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB14:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2720, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400028(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400020(%rbp)
	jmp	.L25
.L26:
	movl	-400020(%rbp), %eax
	cltq
	movl	$0, -400016(%rbp,%rax,4)
	addl	$1, -400020(%rbp)
.L25:
	movl	-400028(%rbp), %eax
	cmpl	%eax, -400020(%rbp)
	jl	.L26
	movl	$0, -400020(%rbp)
	jmp	.L27
.L32:
	leaq	-400024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-400028(%rbp), %eax
	movl	-400024(%rbp), %edx
	subl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L28
	movl	-400024(%rbp), %eax
	movslq	%eax, %rdx
	movl	-400016(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
.L28:
	movl	-400028(%rbp), %eax
	movl	-400024(%rbp), %edx
	subl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L29
	movl	-400024(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	jg	.L29
	movl	-400016(%rbp), %eax
	cmpl	$1, %eax
	jle	.L30
.L29:
	movl	$48, %edi
	call	putchar@PLT
	movl	$0, %eax
	jmp	.L31
.L30:
	addl	$1, -400020(%rbp)
.L27:
	movl	-400028(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -400020(%rbp)
	jl	.L32
	movl	-400028(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	movq	%rax, %rsi
	movl	$2, %edi
	call	POW
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L31:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.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
	.p2align 4
	.globl	SUM
	.type	SUM, @function
SUM:
.LFB39:
	.cfi_startproc
	endbr64
	movabsq	$-8543223828751151131, %rcx
	movq	%rdi, %rax
	imulq	%rcx
	movq	%rdi, %rax
	sarq	$63, %rax
	addq	%rdi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movq	%rsi, %rax
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rdi
	imulq	%rcx
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rsi
	leaq	1000000007(%rdi,%rsi), %rsi
	movq	%rsi, %rax
	imulq	%rcx
	leaq	(%rdx,%rsi), %rax
	movq	%rsi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rsi, %rax
	subq	%rdx, %rax
	ret
	.cfi_endproc
.LFE39:
	.size	SUM, .-SUM
	.p2align 4
	.globl	PROD
	.type	PROD, @function
PROD:
.LFB40:
	.cfi_startproc
	endbr64
	movabsq	$-8543223828751151131, %rcx
	movq	%rdi, %rax
	imulq	%rcx
	movq	%rdi, %rax
	sarq	$63, %rax
	addq	%rdi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movq	%rsi, %rax
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rdi
	imulq	%rcx
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rsi
	imulq	%rsi, %rdi
	movq	%rdi, %rax
	imulq	%rcx
	leaq	(%rdx,%rdi), %rax
	movq	%rdi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rdi, %rax
	subq	%rdx, %rax
	ret
	.cfi_endproc
.LFE40:
	.size	PROD, .-PROD
	.p2align 4
	.globl	POW
	.type	POW, @function
POW:
.LFB41:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movq	%rsi, %r9
	movl	$1, %r8d
	movabsq	$-8543223828751151131, %r10
	imulq	%r10
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rcx
	testq	%rsi, %rsi
	je	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	testb	$1, %r9b
	je	.L6
	movq	%r8, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %r8
	sarq	$29, %r8
	subq	%rax, %r8
	imulq	$1000000007, %r8, %rax
	subq	%rax, %rsi
	movq	%rsi, %r8
.L6:
	movq	%rcx, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%rsi, %rcx
	subq	%rax, %rcx
	sarq	%r9
	jne	.L7
.L4:
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE41:
	.size	POW, .-POW
	.p2align 4
	.globl	INV
	.type	INV, @function
INV:
.LFB42:
	.cfi_startproc
	endbr64
	cmpq	$509999, %rdi
	jg	.L14
	leaq	INVE(%rip), %rax
	movq	(%rax,%rdi,8), %r8
	movq	%r8, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%rdi, %rax
	movl	$1, %r8d
	movl	$1000000005, %esi
	movabsq	$-8543223828751151131, %r10
	imulq	%r10
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rcx
	movl	$30, %edi
	.p2align 4,,10
	.p2align 3
.L17:
	testb	$1, %sil
	je	.L16
	imulq	%rcx, %r8
	movq	%r8, %rax
	mulq	%r10
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %r8
.L16:
	imulq	%rcx, %rcx
	sarq	%rsi
	movq	%rcx, %rax
	mulq	%r10
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %edi
	jne	.L17
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE42:
	.size	INV, .-INV
	.p2align 4
	.globl	QUOT
	.type	QUOT, @function
QUOT:
.LFB43:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %r8
	cmpq	$509999, %rsi
	jg	.L23
	leaq	INVE(%rip), %rax
	movq	(%rax,%rsi,8), %r9
.L24:
	movabsq	$-8543223828751151131, %rsi
	movq	%r9, %rax
	movq	%r9, %rcx
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	imulq	%rsi
	movq	%r9, %rax
	sarq	$63, %rax
	leaq	(%rdx,%r9), %rdi
	sarq	$29, %rdi
	subq	%rax, %rdi
	movq	%r8, %rax
	imulq	%rsi
	movq	%r8, %rax
	sarq	$63, %rax
	imulq	$1000000007, %rdi, %rdi
	addq	%r8, %rdx
	sarq	$29, %rdx
	subq	%rdi, %rcx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %r8
	imulq	%r8, %rcx
	movq	%rcx, %rax
	imulq	%rsi
	leaq	(%rdx,%rcx), %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	movq	%rsi, %rax
	movl	$30, %ebx
	movabsq	$-8543223828751151131, %r10
	movl	$1, %r9d
	imulq	%r10
	movq	%rsi, %rax
	movl	$1000000005, %r11d
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%rsi, %rcx
	subq	%rax, %rcx
	.p2align 4,,10
	.p2align 3
.L26:
	testb	$1, %r11b
	je	.L25
	movq	%r9, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	mulq	%r10
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rsi
	movq	%rsi, %r9
.L25:
	movq	%rcx, %rsi
	sarq	%r11
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %rcx
	mulq	%r10
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rdi
	subq	%rdi, %rcx
	subl	$1, %ebx
	jne	.L26
	jmp	.L24
	.cfi_endproc
.LFE43:
	.size	QUOT, .-QUOT
	.p2align 4
	.globl	init_inv
	.type	init_inv, @function
init_inv:
.LFB44:
	.cfi_startproc
	endbr64
	movq	$1, 8+INVE(%rip)
	cmpq	$1, %rdi
	jle	.L32
	leaq	1(%rdi), %r11
	movl	$3, %esi
	movq	$500000004, 16+INVE(%rip)
	leaq	INVE(%rip), %r10
	movabsq	$-8543223828751151131, %r8
	movl	$1000000007, %r9d
	cmpq	$2, %rdi
	je	.L32
	.p2align 4,,10
	.p2align 3
.L35:
	movq	%r9, %rax
	cqto
	idivq	%rsi
	movq	(%r10,%rdx,8), %rcx
	movq	%rax, %rdi
	movq	%rcx, %rax
	imulq	%r8
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	imulq	%rdi, %rcx
	movq	%r9, %rdi
	movq	%rcx, %rax
	imulq	%r8
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	subq	%rcx, %rdi
	movq	%rdi, %rax
	mulq	%r8
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rdi
	movq	%rdi, (%r10,%rsi,8)
	addq	$1, %rsi
	cmpq	%r11, %rsi
	jne	.L35
.L32:
	ret
	.cfi_endproc
.LFE44:
	.size	init_inv, .-init_inv
	.p2align 4
	.globl	init_com
	.type	init_com, @function
init_com:
.LFB45:
	.cfi_startproc
	endbr64
	movdqa	.LC0(%rip), %xmm0
	movq	$1, 8+INVE(%rip)
	movaps	%xmm0, FAC(%rip)
	movaps	%xmm0, FINV(%rip)
	cmpq	$1, %rdi
	jle	.L51
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$3, %r9d
	leaq	INVE(%rip), %r8
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	$500000004, 16+INVE(%rip)
	cmpq	$2, %rdi
	je	.L41
	leaq	1(%rdi), %r9
	movl	$3, %esi
	leaq	INVE(%rip), %r8
	movl	$1000000007, %r10d
	movabsq	$-8543223828751151131, %rdi
	.p2align 4,,10
	.p2align 3
.L42:
	movq	%r10, %rax
	cqto
	idivq	%rsi
	movq	(%r8,%rdx,8), %rcx
	movq	%rax, %r11
	movq	%rcx, %rax
	imulq	%rdi
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	imulq	%r11, %rcx
	movq	%r10, %r11
	movq	%rcx, %rax
	imulq	%rdi
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	subq	%rcx, %r11
	movq	%r11, %rax
	mulq	%rdi
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %r11
	movq	%r11, (%r8,%rsi,8)
	addq	$1, %rsi
	cmpq	%r9, %rsi
	jne	.L42
.L41:
	movl	$1, %ecx
	movl	$1, %edi
	movl	$2, %r10d
	movabsq	$-8543223828751151131, %r11
	leaq	FAC(%rip), %rbp
	leaq	FINV(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L43:
	movq	%rcx, %rax
	movq	%rcx, %rsi
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rsi
	imulq	%r10, %rsi
	movq	%rsi, %rax
	imulq	%r11
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%rsi, %rcx
	movq	(%r8,%r10,8), %rsi
	subq	%rax, %rcx
	movq	%rsi, %rax
	imulq	%r11
	movq	%rsi, %rax
	movq	%rcx, 0(%rbp,%r10,8)
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rsi
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%r11
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rdi
	sarq	$29, %rdi
	subq	%rax, %rdi
	imulq	$1000000007, %rdi, %rax
	movq	%rsi, %rdi
	subq	%rax, %rdi
	movq	%rdi, (%rbx,%r10,8)
	addq	$1, %r10
	cmpq	%r10, %r9
	jne	.L43
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L51:
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE45:
	.size	init_com, .-init_com
	.p2align 4
	.globl	COM
	.type	COM, @function
COM:
.LFB46:
	.cfi_startproc
	endbr64
	movabsq	$-8543223828751151131, %rcx
	movq	%rdi, %r9
	leaq	FINV(%rip), %rdi
	movq	%r9, %rax
	subq	%rsi, %rax
	movq	(%rdi,%rax,8), %r8
	movq	(%rdi,%rsi,8), %rdi
	movq	%r8, %rax
	imulq	%rcx
	movq	%r8, %rax
	sarq	$63, %rax
	addq	%r8, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	leaq	FAC(%rip), %rax
	movq	(%rax,%r9,8), %r9
	imulq	$1000000007, %rdx, %rdx
	movq	%r9, %rax
	subq	%rdx, %r8
	imulq	%rcx
	movq	%r9, %rax
	sarq	$63, %rax
	addq	%r9, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %r9
	imulq	%r9, %r8
	movq	%r8, %rax
	imulq	%rcx
	movq	%r8, %rax
	sarq	$63, %rax
	addq	%r8, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movq	%rdi, %rax
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %r8
	imulq	%rcx
	movq	%rdi, %rax
	sarq	$63, %rax
	movq	%r8, %rsi
	addq	%rdi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rdi
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%rcx
	leaq	(%rdx,%rsi), %rax
	movq	%rsi, %rdx
	sarq	$29, %rax
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rsi, %rax
	subq	%rdx, %rax
	ret
	.cfi_endproc
.LFE46:
	.size	COM, .-COM
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB47:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	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	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397352
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2728, %rsp
	.cfi_def_cfa_offset 400080
	leaq	.LC1(%rip), %rbp
	movq	%rbp, %rdi
	movq	%fs:40, %rax
	movq	%rax, 400024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ebx
	testl	%ebx, %ebx
	jle	.L61
	movslq	%ebx, %rdx
	xorl	%esi, %esi
	leaq	16(%rsp), %rdi
	salq	$2, %rdx
	call	memset@PLT
	cmpl	$1, %ebx
	jle	.L61
	xorl	%r13d, %r13d
	leaq	12(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L60:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ebx
	movslq	12(%rsp), %rdx
	movl	%ebx, %eax
	subl	%edx, %eax
	testb	$1, %al
	jne	.L57
.L59:
	movl	$48, %edi
	call	putchar@PLT
.L58:
	movq	400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L73
	addq	$400040, %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
	.p2align 4,,10
	.p2align 3
.L57:
	.cfi_restore_state
	movl	16(%rsp,%rdx,4), %eax
	leal	1(%rax), %ecx
	movl	%ecx, 16(%rsp,%rdx,4)
	cmpl	$2, %ecx
	jg	.L59
	cmpl	$1, 16(%rsp)
	jg	.L59
	addl	$1, %r13d
	leal	-1(%rbx), %eax
	cmpl	%r13d, %eax
	jg	.L60
.L61:
	movl	%ebx, %eax
	movl	$2, %ecx
	movl	$1, %r8d
	cltd
	idivl	%ecx
	movslq	%eax, %rdi
	testl	%eax, %eax
	je	.L62
	movabsq	$-8543223828751151131, %r9
	movl	$2, %ecx
	.p2align 4,,10
	.p2align 3
.L64:
	testb	$1, %dil
	je	.L63
	movq	%r8, %rax
	movq	%r8, %rsi
	imulq	%r9
	movq	%r8, %rax
	sarq	$63, %rax
	addq	%r8, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	imulq	%r9
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %r8
	sarq	$29, %r8
	subq	%rax, %r8
	imulq	$1000000007, %r8, %rax
	subq	%rax, %rsi
	movq	%rsi, %r8
.L63:
	movq	%rcx, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	mulq	%r9
	movq	%rdx, %rcx
	shrq	$29, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rsi
	sarq	%rdi
	movq	%rsi, %rcx
	jne	.L64
.L62:
	movq	%r8, %rdx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L58
.L73:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE47:
	.size	main, .-main
	.globl	INVE
	.bss
	.align 32
	.type	INVE, @object
	.size	INVE, 4080000
INVE:
	.zero	4080000
	.globl	FINV
	.align 32
	.type	FINV, @object
	.size	FINV, 4080000
FINV:
	.zero	4080000
	.globl	FAC
	.align 32
	.type	FAC, @object
	.size	FAC, 4080000
FAC:
	.zero	4080000
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.quad	1
	.quad	1
	.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
	.p2align 4
	.globl	SUM
	.type	SUM, @function
SUM:
.LFB39:
	.cfi_startproc
	endbr64
	movabsq	$-8543223828751151131, %rcx
	movq	%rdi, %rax
	imulq	%rcx
	movq	%rdi, %rax
	sarq	$63, %rax
	addq	%rdi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movq	%rsi, %rax
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rdi
	imulq	%rcx
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rsi
	leaq	1000000007(%rdi,%rsi), %rsi
	movq	%rsi, %rax
	imulq	%rcx
	leaq	(%rdx,%rsi), %rax
	movq	%rsi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rsi, %rax
	subq	%rdx, %rax
	ret
	.cfi_endproc
.LFE39:
	.size	SUM, .-SUM
	.p2align 4
	.globl	PROD
	.type	PROD, @function
PROD:
.LFB40:
	.cfi_startproc
	endbr64
	movabsq	$-8543223828751151131, %rcx
	movq	%rdi, %rax
	imulq	%rcx
	movq	%rdi, %rax
	sarq	$63, %rax
	addq	%rdi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movq	%rsi, %rax
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rdi
	imulq	%rcx
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rsi
	imulq	%rsi, %rdi
	movq	%rdi, %rax
	imulq	%rcx
	leaq	(%rdx,%rdi), %rax
	movq	%rdi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rdi, %rax
	subq	%rdx, %rax
	ret
	.cfi_endproc
.LFE40:
	.size	PROD, .-PROD
	.p2align 4
	.globl	POW
	.type	POW, @function
POW:
.LFB41:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movq	%rsi, %r9
	movl	$1, %r8d
	movabsq	$-8543223828751151131, %r10
	imulq	%r10
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rcx
	testq	%rsi, %rsi
	je	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	testb	$1, %r9b
	je	.L6
	movq	%r8, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %r8
	sarq	$29, %r8
	subq	%rax, %r8
	imulq	$1000000007, %r8, %rax
	subq	%rax, %rsi
	movq	%rsi, %r8
.L6:
	movq	%rcx, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%rsi, %rcx
	subq	%rax, %rcx
	sarq	%r9
	jne	.L7
.L4:
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE41:
	.size	POW, .-POW
	.p2align 4
	.globl	INV
	.type	INV, @function
INV:
.LFB42:
	.cfi_startproc
	endbr64
	cmpq	$509999, %rdi
	jg	.L14
	leaq	INVE(%rip), %rax
	movq	(%rax,%rdi,8), %r8
	movq	%r8, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%rdi, %rax
	movl	$1, %r8d
	movl	$1000000005, %esi
	movabsq	$-8543223828751151131, %r10
	imulq	%r10
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rcx
	movl	$30, %edi
	.p2align 4,,10
	.p2align 3
.L17:
	testb	$1, %sil
	je	.L16
	imulq	%rcx, %r8
	movq	%r8, %rax
	mulq	%r10
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %r8
.L16:
	imulq	%rcx, %rcx
	sarq	%rsi
	movq	%rcx, %rax
	mulq	%r10
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %edi
	jne	.L17
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE42:
	.size	INV, .-INV
	.p2align 4
	.globl	QUOT
	.type	QUOT, @function
QUOT:
.LFB43:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %r8
	cmpq	$509999, %rsi
	jg	.L23
	leaq	INVE(%rip), %rax
	movq	(%rax,%rsi,8), %r9
.L24:
	movabsq	$-8543223828751151131, %rsi
	movq	%r9, %rax
	movq	%r9, %rcx
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	imulq	%rsi
	movq	%r9, %rax
	sarq	$63, %rax
	leaq	(%rdx,%r9), %rdi
	sarq	$29, %rdi
	subq	%rax, %rdi
	movq	%r8, %rax
	imulq	%rsi
	movq	%r8, %rax
	sarq	$63, %rax
	imulq	$1000000007, %rdi, %rdi
	addq	%r8, %rdx
	sarq	$29, %rdx
	subq	%rdi, %rcx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %r8
	imulq	%r8, %rcx
	movq	%rcx, %rax
	imulq	%rsi
	leaq	(%rdx,%rcx), %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	movq	%rsi, %rax
	movl	$30, %ebx
	movabsq	$-8543223828751151131, %r10
	movl	$1, %r9d
	imulq	%r10
	movq	%rsi, %rax
	movl	$1000000005, %r11d
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%rsi, %rcx
	subq	%rax, %rcx
	.p2align 4,,10
	.p2align 3
.L26:
	testb	$1, %r11b
	je	.L25
	movq	%r9, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	mulq	%r10
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rsi
	movq	%rsi, %r9
.L25:
	movq	%rcx, %rsi
	sarq	%r11
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %rcx
	mulq	%r10
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rdi
	subq	%rdi, %rcx
	subl	$1, %ebx
	jne	.L26
	jmp	.L24
	.cfi_endproc
.LFE43:
	.size	QUOT, .-QUOT
	.p2align 4
	.globl	init_inv
	.type	init_inv, @function
init_inv:
.LFB44:
	.cfi_startproc
	endbr64
	movq	$1, 8+INVE(%rip)
	cmpq	$1, %rdi
	jle	.L32
	leaq	1(%rdi), %r11
	movl	$3, %esi
	movq	$500000004, 16+INVE(%rip)
	leaq	INVE(%rip), %r10
	movabsq	$-8543223828751151131, %r8
	movl	$1000000007, %r9d
	cmpq	$2, %rdi
	je	.L32
	.p2align 4,,10
	.p2align 3
.L35:
	movq	%r9, %rax
	cqto
	idivq	%rsi
	movq	(%r10,%rdx,8), %rcx
	movq	%rax, %rdi
	movq	%rcx, %rax
	imulq	%r8
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	imulq	%rdi, %rcx
	movq	%r9, %rdi
	movq	%rcx, %rax
	imulq	%r8
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	subq	%rcx, %rdi
	movq	%rdi, %rax
	mulq	%r8
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rdi
	movq	%rdi, (%r10,%rsi,8)
	addq	$1, %rsi
	cmpq	%r11, %rsi
	jne	.L35
.L32:
	ret
	.cfi_endproc
.LFE44:
	.size	init_inv, .-init_inv
	.p2align 4
	.globl	init_com
	.type	init_com, @function
init_com:
.LFB45:
	.cfi_startproc
	endbr64
	movdqa	.LC0(%rip), %xmm0
	movq	$1, 8+INVE(%rip)
	movaps	%xmm0, FAC(%rip)
	movaps	%xmm0, FINV(%rip)
	cmpq	$1, %rdi
	jle	.L51
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$3, %r9d
	leaq	INVE(%rip), %r8
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	$500000004, 16+INVE(%rip)
	cmpq	$2, %rdi
	je	.L41
	leaq	1(%rdi), %r9
	movl	$3, %esi
	leaq	INVE(%rip), %r8
	movl	$1000000007, %r10d
	movabsq	$-8543223828751151131, %rdi
	.p2align 4,,10
	.p2align 3
.L42:
	movq	%r10, %rax
	cqto
	idivq	%rsi
	movq	(%r8,%rdx,8), %rcx
	movq	%rax, %r11
	movq	%rcx, %rax
	imulq	%rdi
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	imulq	%r11, %rcx
	movq	%r10, %r11
	movq	%rcx, %rax
	imulq	%rdi
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	subq	%rcx, %r11
	movq	%r11, %rax
	mulq	%rdi
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %r11
	movq	%r11, (%r8,%rsi,8)
	addq	$1, %rsi
	cmpq	%r9, %rsi
	jne	.L42
.L41:
	movl	$1, %ecx
	movl	$1, %edi
	movl	$2, %r10d
	movabsq	$-8543223828751151131, %r11
	leaq	FAC(%rip), %rbp
	leaq	FINV(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L43:
	movq	%rcx, %rax
	movq	%rcx, %rsi
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rsi
	imulq	%r10, %rsi
	movq	%rsi, %rax
	imulq	%r11
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%rsi, %rcx
	movq	(%r8,%r10,8), %rsi
	subq	%rax, %rcx
	movq	%rsi, %rax
	imulq	%r11
	movq	%rsi, %rax
	movq	%rcx, 0(%rbp,%r10,8)
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rsi
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%r11
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rdi
	sarq	$29, %rdi
	subq	%rax, %rdi
	imulq	$1000000007, %rdi, %rax
	movq	%rsi, %rdi
	subq	%rax, %rdi
	movq	%rdi, (%rbx,%r10,8)
	addq	$1, %r10
	cmpq	%r10, %r9
	jne	.L43
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L51:
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE45:
	.size	init_com, .-init_com
	.p2align 4
	.globl	COM
	.type	COM, @function
COM:
.LFB46:
	.cfi_startproc
	endbr64
	movabsq	$-8543223828751151131, %rcx
	movq	%rdi, %r9
	leaq	FINV(%rip), %rdi
	movq	%r9, %rax
	subq	%rsi, %rax
	movq	(%rdi,%rax,8), %r8
	movq	(%rdi,%rsi,8), %rdi
	movq	%r8, %rax
	imulq	%rcx
	movq	%r8, %rax
	sarq	$63, %rax
	addq	%r8, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	leaq	FAC(%rip), %rax
	movq	(%rax,%r9,8), %r9
	imulq	$1000000007, %rdx, %rdx
	movq	%r9, %rax
	subq	%rdx, %r8
	imulq	%rcx
	movq	%r9, %rax
	sarq	$63, %rax
	addq	%r9, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %r9
	imulq	%r9, %r8
	movq	%r8, %rax
	imulq	%rcx
	movq	%r8, %rax
	sarq	$63, %rax
	addq	%r8, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movq	%rdi, %rax
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %r8
	imulq	%rcx
	movq	%rdi, %rax
	sarq	$63, %rax
	movq	%r8, %rsi
	addq	%rdi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rdi
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%rcx
	leaq	(%rdx,%rsi), %rax
	movq	%rsi, %rdx
	sarq	$29, %rax
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rsi, %rax
	subq	%rdx, %rax
	ret
	.cfi_endproc
.LFE46:
	.size	COM, .-COM
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB47:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	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	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397352
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2728, %rsp
	.cfi_def_cfa_offset 400080
	leaq	.LC1(%rip), %rbp
	movq	%rbp, %rdi
	movq	%fs:40, %rax
	movq	%rax, 400024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ebx
	testl	%ebx, %ebx
	jle	.L61
	movslq	%ebx, %rdx
	xorl	%esi, %esi
	leaq	16(%rsp), %rdi
	salq	$2, %rdx
	call	memset@PLT
	cmpl	$1, %ebx
	jle	.L61
	xorl	%r13d, %r13d
	leaq	12(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L60:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ebx
	movslq	12(%rsp), %rdx
	movl	%ebx, %eax
	subl	%edx, %eax
	testb	$1, %al
	jne	.L57
.L59:
	movl	$48, %edi
	call	putchar@PLT
.L58:
	movq	400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L73
	addq	$400040, %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
	.p2align 4,,10
	.p2align 3
.L57:
	.cfi_restore_state
	movl	16(%rsp,%rdx,4), %eax
	leal	1(%rax), %ecx
	movl	%ecx, 16(%rsp,%rdx,4)
	cmpl	$2, %ecx
	jg	.L59
	cmpl	$1, 16(%rsp)
	jg	.L59
	addl	$1, %r13d
	leal	-1(%rbx), %eax
	cmpl	%r13d, %eax
	jg	.L60
.L61:
	movl	%ebx, %eax
	movl	$2, %ecx
	movl	$1, %r8d
	cltd
	idivl	%ecx
	movslq	%eax, %rdi
	testl	%eax, %eax
	je	.L62
	movabsq	$-8543223828751151131, %r9
	movl	$2, %ecx
	.p2align 4,,10
	.p2align 3
.L64:
	testb	$1, %dil
	je	.L63
	movq	%r8, %rax
	movq	%r8, %rsi
	imulq	%r9
	movq	%r8, %rax
	sarq	$63, %rax
	addq	%r8, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	imulq	%r9
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %r8
	sarq	$29, %r8
	subq	%rax, %r8
	imulq	$1000000007, %r8, %rax
	subq	%rax, %rsi
	movq	%rsi, %r8
.L63:
	movq	%rcx, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	mulq	%r9
	movq	%rdx, %rcx
	shrq	$29, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rsi
	sarq	%rdi
	movq	%rsi, %rcx
	jne	.L64
.L62:
	movq	%r8, %rdx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L58
.L73:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE47:
	.size	main, .-main
	.globl	INVE
	.bss
	.align 32
	.type	INVE, @object
	.size	INVE, 4080000
INVE:
	.zero	4080000
	.globl	FINV
	.align 32
	.type	FINV, @object
	.size	FINV, 4080000
FINV:
	.zero	4080000
	.globl	FAC
	.align 32
	.type	FAC, @object
	.size	FAC, 4080000
FAC:
	.zero	4080000
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.quad	1
	.quad	1
	.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>
#include<stdlib.h>
#include<math.h>
#define MOD 1000000007
#define MAX 510000

long int FAC[MAX],FINV[MAX],INVE[MAX];
long int SUM(long int a,long int b){return (a%MOD+b%MOD+MOD)%MOD;}//a+b
long int PROD(long int a,long int b){return a%MOD*(b%MOD)%MOD;}//a*b
long int POW(long int a,long int b){//a^b
  long int c=1;
  for(a%=MOD;b;a=PROD(a,a),b>>=1)if(b&1)c=PROD(a,c);
  return c;
}
long int INV(long int a){return a<MAX?INVE[a]:POW(a,MOD-2);}//a^-1
long int QUOT(long int a,long int b){return PROD(a,INV(b));}//a/b
void init_inv(long int a){//make inv list
  INVE[1]=1;
  for(long int i=2;i<=a;i++)INVE[i]=SUM(0,-PROD(INVE[MOD%i],MOD/i));
}
void init_com(long int a){//make fac and facinv list
  FAC[0]=FAC[1]=1;
  FINV[0]=FINV[1]=1;
  init_inv(a);
  for(long int i=2;i<=a;i++){
    FAC[i]=PROD(FAC[i-1],i);
    FINV[i]=PROD(FINV[i-1],INV(i));
  }
}
long int COM(long int a,long int b){return PROD(PROD(FAC[a],FINV[a-b]),FINV[b]);}

int main(){
  int abs[100000];
  int n,i,t;
  scanf("%d",&n);
  for(i=0;i<n;i++)abs[i]=0;
  for(i=0;i<n-1;i++){
    scanf("%d",&t);if((n-t)%2)abs[t]++;
    if(!((n-t)%2)||abs[t]>2||abs[0]>1){printf("0");return 0;}
  }
  printf("%ld",POW(2,n/2));
}

8
7 5 1 2 7 3 5 3
 7
6 4 0 2 4 0 4
 5
0 4 4 0 2
 7
6 4 0 2 4 -1 4
 5
0 4 4 0 1
 7
6 4 0 2 8 -1 4
 5
0 4 1 0 1
 7
6 4 0 2 8 0 4
 5
0 4 0 0 1
 7
6 4 1 2 8 0 4

0 0 0 0 0 0 0 0 0 0
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>
#include<stdlib.h>
#include<math.h>
#define MOD 1000000007
#define MAX 510000

long int FAC[MAX],FINV[MAX],INVE[MAX];
long int SUM(long int a,long int b){return (a%MOD+b%MOD+MOD)%MOD;}//a+b
long int PROD(long int a,long int b){return a%MOD*(b%MOD)%MOD;}//a*b
long int POW(long int a,long int b){//a^b
  long int c=1;
  for(a%=MOD;b;a=PROD(a,a),b>>=1)if(b&1)c=PROD(a,c);
  return c;
}
long int INV(long int a){return a<MAX?INVE[a]:POW(a,MOD-2);}//a^-1
long int QUOT(long int a,long int b){return PROD(a,INV(b));}//a/b
void init_inv(long int a){//make inv list
  INVE[1]=1;
  for(long int i=2;i<=a;i++)INVE[i]=SUM(0,-PROD(INVE[MOD%i],MOD/i));
}
void init_com(long int a){//make fac and facinv list
  FAC[0]=FAC[1]=1;
  FINV[0]=FINV[1]=1;
  init_inv(a);
  for(long int i=2;i<=a;i++){
    FAC[i]=PROD(FAC[i-1],i);
    FINV[i]=PROD(FINV[i-1],INV(i));
  }
}
long int COM(long int a,long int b){return PROD(PROD(FAC[a],FINV[a-b]),FINV[b]);}

int main(){
  int abs[100000];
  int n,i,t;
  scanf("%d",&n);
  for(i=0;i<n;i++)abs[i]=0;
  for(i=0;i<n-1;i++){
    scanf("%d",&t);if((n-t)%2)abs[t]++;
    if(!((n-t)%2)||abs[t]>2||abs[0]>1){printf("0");return 0;}
  }
  printf("%ld",POW(2,n/2));
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	FAC
	.bss
	.align 32
	.type	FAC, @object
	.size	FAC, 4080000
FAC:
	.zero	4080000
	.globl	FINV
	.align 32
	.type	FINV, @object
	.size	FINV, 4080000
FINV:
	.zero	4080000
	.globl	INVE
	.align 32
	.type	INVE, @object
	.size	INVE, 4080000
INVE:
	.zero	4080000
	.text
	.globl	SUM
	.type	SUM, @function
SUM:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rcx, %rsi
	subq	%rax, %rsi
	movq	-16(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	addq	%rsi, %rax
	leaq	1000000007(%rax), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	SUM, .-SUM
	.globl	PROD
	.type	PROD, @function
PROD:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rcx, %rsi
	subq	%rax, %rsi
	movq	-16(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	imulq	%rax, %rsi
	movq	%rsi, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	PROD, .-PROD
	.globl	POW
	.type	POW, @function
POW:
.LFB8:
	.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	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	$1, -8(%rbp)
	movq	-24(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -24(%rbp)
	jmp	.L6
.L8:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L7
	movq	-8(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	PROD
	movq	%rax, -8(%rbp)
.L7:
	movq	-24(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	PROD
	movq	%rax, -24(%rbp)
	sarq	-32(%rbp)
.L6:
	cmpq	$0, -32(%rbp)
	jne	.L8
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	POW, .-POW
	.globl	INV
	.type	INV, @function
INV:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movq	%rdi, -8(%rbp)
	cmpq	$509999, -8(%rbp)
	jg	.L11
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	INVE(%rip), %rax
	movq	(%rdx,%rax), %rax
	jmp	.L13
.L11:
	movq	-8(%rbp), %rax
	movl	$1000000005, %esi
	movq	%rax, %rdi
	call	POW
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	INV, .-INV
	.globl	QUOT
	.type	QUOT, @function
QUOT:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, %rdi
	call	INV
	movq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	PROD
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	QUOT, .-QUOT
	.globl	init_inv
	.type	init_inv, @function
init_inv:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movq	%rdi, -24(%rbp)
	movq	$1, 8+INVE(%rip)
	movq	$2, -8(%rbp)
	jmp	.L17
.L18:
	movl	$1000000007, %eax
	cqto
	idivq	-8(%rbp)
	movq	%rax, %rcx
	movl	$1000000007, %eax
	cqto
	idivq	-8(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	INVE(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	PROD
	negq	%rax
	movq	%rax, %rsi
	movl	$0, %edi
	call	SUM
	movq	-8(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	INVE(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addq	$1, -8(%rbp)
.L17:
	movq	-8(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jle	.L18
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	init_inv, .-init_inv
	.globl	init_com
	.type	init_com, @function
init_com:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movq	%rdi, -24(%rbp)
	movq	$1, 8+FAC(%rip)
	movq	8+FAC(%rip), %rax
	movq	%rax, FAC(%rip)
	movq	$1, 8+FINV(%rip)
	movq	8+FINV(%rip), %rax
	movq	%rax, FINV(%rip)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	init_inv
	movq	$2, -8(%rbp)
	jmp	.L20
.L21:
	movq	-8(%rbp), %rax
	subq	$1, %rax
	leaq	0(,%rax,8), %rdx
	leaq	FAC(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	PROD
	movq	-8(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	FAC(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	INV
	movq	%rax, %rdx
	movq	-8(%rbp), %rax
	subq	$1, %rax
	leaq	0(,%rax,8), %rcx
	leaq	FINV(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	PROD
	movq	-8(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	FINV(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addq	$1, -8(%rbp)
.L20:
	movq	-8(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jle	.L21
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	init_com, .-init_com
	.globl	COM
	.type	COM, @function
COM:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -16(%rbp)
	movq	%rsi, -24(%rbp)
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	FINV(%rip), %rax
	movq	(%rdx,%rax), %rbx
	movq	-16(%rbp), %rax
	subq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	FINV(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	leaq	FAC(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	PROD
	movq	%rbx, %rsi
	movq	%rax, %rdi
	call	PROD
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	COM, .-COM
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB14:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2720, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400028(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400020(%rbp)
	jmp	.L25
.L26:
	movl	-400020(%rbp), %eax
	cltq
	movl	$0, -400016(%rbp,%rax,4)
	addl	$1, -400020(%rbp)
.L25:
	movl	-400028(%rbp), %eax
	cmpl	%eax, -400020(%rbp)
	jl	.L26
	movl	$0, -400020(%rbp)
	jmp	.L27
.L32:
	leaq	-400024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-400028(%rbp), %eax
	movl	-400024(%rbp), %edx
	subl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L28
	movl	-400024(%rbp), %eax
	movslq	%eax, %rdx
	movl	-400016(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
.L28:
	movl	-400028(%rbp), %eax
	movl	-400024(%rbp), %edx
	subl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L29
	movl	-400024(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	jg	.L29
	movl	-400016(%rbp), %eax
	cmpl	$1, %eax
	jle	.L30
.L29:
	movl	$48, %edi
	call	putchar@PLT
	movl	$0, %eax
	jmp	.L31
.L30:
	addl	$1, -400020(%rbp)
.L27:
	movl	-400028(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -400020(%rbp)
	jl	.L32
	movl	-400028(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	movq	%rax, %rsi
	movl	$2, %edi
	call	POW
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L31:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.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	FAC
	.bss
	.align 32
	.type	FAC, @object
	.size	FAC, 4080000
FAC:
	.zero	4080000
	.globl	FINV
	.align 32
	.type	FINV, @object
	.size	FINV, 4080000
FINV:
	.zero	4080000
	.globl	INVE
	.align 32
	.type	INVE, @object
	.size	INVE, 4080000
INVE:
	.zero	4080000
	.text
	.globl	SUM
	.type	SUM, @function
SUM:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rcx, %rsi
	subq	%rax, %rsi
	movq	-16(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	addq	%rsi, %rax
	leaq	1000000007(%rax), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	SUM, .-SUM
	.globl	PROD
	.type	PROD, @function
PROD:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rcx, %rsi
	subq	%rax, %rsi
	movq	-16(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	imulq	%rax, %rsi
	movq	%rsi, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	PROD, .-PROD
	.globl	POW
	.type	POW, @function
POW:
.LFB8:
	.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	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	$1, -8(%rbp)
	movq	-24(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -24(%rbp)
	jmp	.L6
.L8:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L7
	movq	-8(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	PROD
	movq	%rax, -8(%rbp)
.L7:
	movq	-24(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	PROD
	movq	%rax, -24(%rbp)
	sarq	-32(%rbp)
.L6:
	cmpq	$0, -32(%rbp)
	jne	.L8
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	POW, .-POW
	.globl	INV
	.type	INV, @function
INV:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movq	%rdi, -8(%rbp)
	cmpq	$509999, -8(%rbp)
	jg	.L11
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	INVE(%rip), %rax
	movq	(%rdx,%rax), %rax
	jmp	.L13
.L11:
	movq	-8(%rbp), %rax
	movl	$1000000005, %esi
	movq	%rax, %rdi
	call	POW
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	INV, .-INV
	.globl	QUOT
	.type	QUOT, @function
QUOT:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, %rdi
	call	INV
	movq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	PROD
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	QUOT, .-QUOT
	.globl	init_inv
	.type	init_inv, @function
init_inv:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movq	%rdi, -24(%rbp)
	movq	$1, 8+INVE(%rip)
	movq	$2, -8(%rbp)
	jmp	.L17
.L18:
	movl	$1000000007, %eax
	cqto
	idivq	-8(%rbp)
	movq	%rax, %rcx
	movl	$1000000007, %eax
	cqto
	idivq	-8(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	INVE(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	PROD
	negq	%rax
	movq	%rax, %rsi
	movl	$0, %edi
	call	SUM
	movq	-8(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	INVE(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addq	$1, -8(%rbp)
.L17:
	movq	-8(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jle	.L18
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	init_inv, .-init_inv
	.globl	init_com
	.type	init_com, @function
init_com:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movq	%rdi, -24(%rbp)
	movq	$1, 8+FAC(%rip)
	movq	8+FAC(%rip), %rax
	movq	%rax, FAC(%rip)
	movq	$1, 8+FINV(%rip)
	movq	8+FINV(%rip), %rax
	movq	%rax, FINV(%rip)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	init_inv
	movq	$2, -8(%rbp)
	jmp	.L20
.L21:
	movq	-8(%rbp), %rax
	subq	$1, %rax
	leaq	0(,%rax,8), %rdx
	leaq	FAC(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	PROD
	movq	-8(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	FAC(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	INV
	movq	%rax, %rdx
	movq	-8(%rbp), %rax
	subq	$1, %rax
	leaq	0(,%rax,8), %rcx
	leaq	FINV(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	PROD
	movq	-8(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	FINV(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addq	$1, -8(%rbp)
.L20:
	movq	-8(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jle	.L21
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	init_com, .-init_com
	.globl	COM
	.type	COM, @function
COM:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -16(%rbp)
	movq	%rsi, -24(%rbp)
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	FINV(%rip), %rax
	movq	(%rdx,%rax), %rbx
	movq	-16(%rbp), %rax
	subq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	FINV(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	leaq	FAC(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	PROD
	movq	%rbx, %rsi
	movq	%rax, %rdi
	call	PROD
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	COM, .-COM
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB14:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2720, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400028(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400020(%rbp)
	jmp	.L25
.L26:
	movl	-400020(%rbp), %eax
	cltq
	movl	$0, -400016(%rbp,%rax,4)
	addl	$1, -400020(%rbp)
.L25:
	movl	-400028(%rbp), %eax
	cmpl	%eax, -400020(%rbp)
	jl	.L26
	movl	$0, -400020(%rbp)
	jmp	.L27
.L32:
	leaq	-400024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-400028(%rbp), %eax
	movl	-400024(%rbp), %edx
	subl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L28
	movl	-400024(%rbp), %eax
	movslq	%eax, %rdx
	movl	-400016(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
.L28:
	movl	-400028(%rbp), %eax
	movl	-400024(%rbp), %edx
	subl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L29
	movl	-400024(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	jg	.L29
	movl	-400016(%rbp), %eax
	cmpl	$1, %eax
	jle	.L30
.L29:
	movl	$48, %edi
	call	putchar@PLT
	movl	$0, %eax
	jmp	.L31
.L30:
	addl	$1, -400020(%rbp)
.L27:
	movl	-400028(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -400020(%rbp)
	jl	.L32
	movl	-400028(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	movq	%rax, %rsi
	movl	$2, %edi
	call	POW
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L31:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.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:
