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 mod 1000000007

long long factorial[524288];

void cfact(){
    long long i;
    factorial[0]=1;
    factorial[1]=1;
    for(i=2;i<524288;i++){
        factorial[i]=factorial[i-1]*i;
        factorial[i]%=mod;
    }
}

long long power(long long a,long long b){
  long long x=1,y=a;
  while(b>0){
    if(b&1ll){
      x=(x*y)%mod;
    }
    y=(y*y)%mod;
    b>>=1;
  }
  return x%mod;
}
 
long long modular_inverse(long long n){
	return power(n,mod-2);
}

long long calcnCr(long long n,long long k){
	return (factorial[n]*(modular_inverse(factorial[k])*modular_inverse(factorial[n-k])%mod))%mod;
}

long long calc(long long a,long long b,long long c,long long d){
  long long n=a+b+c+d,r;
  r=calcnCr(n,a);
  r*=calcnCr(n-a,b);r%=mod;
  r*=calcnCr(n-a-b,c);
  return r%mod;
}

int main(){
  cfact();
  long long n,a,b,c,r=0,w;
  long long alpha,beta,gamma,delta,sigma;
  scanf("%lld%lld%lld%lld",&n,&a,&b,&c);
  if(b%2==1){printf("0\n");return 0;}
  beta=b/2;
  for(alpha=0;alpha<=a;alpha++){
    gamma=a-alpha;
    for(delta=0;3*delta<=c;delta++){
      //printf("%lld %lld %lld %lld\n",alpha,beta,gamma,delta);
      w=calc(alpha,beta,gamma,delta);
      sigma=c-3*delta-gamma;
      if(sigma<0){continue;}
      if(beta==0){
        if(sigma==0){
          r+=w;r%=mod;
        }
      }
      else{
        r+=((w*calcnCr(sigma+(beta-1),beta-1))%mod);r%=mod;
      }
    }
  }
  printf("%lld\n",r);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	factorial
	.bss
	.align 32
	.type	factorial, @object
	.size	factorial, 4194304
factorial:
	.zero	4194304
	.text
	.globl	cfact
	.type	cfact, @function
cfact:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	$1, factorial(%rip)
	movq	$1, 8+factorial(%rip)
	movq	$2, -8(%rbp)
	jmp	.L2
.L3:
	movq	-8(%rbp), %rax
	subq	$1, %rax
	leaq	0(,%rax,8), %rdx
	leaq	factorial(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	-8(%rbp), %rax
	movq	-8(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	factorial(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	factorial(%rip), %rax
	movq	(%rdx,%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
	movq	-8(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	factorial(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addq	$1, -8(%rbp)
.L2:
	cmpq	$524287, -8(%rbp)
	jle	.L3
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	cfact, .-cfact
	.globl	power
	.type	power, @function
power:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	$1, -16(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -8(%rbp)
	jmp	.L5
.L7:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L6
	movq	-16(%rbp), %rax
	imulq	-8(%rbp), %rax
	movq	%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
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
.L6:
	movq	-8(%rbp), %rax
	imulq	%rax, %rax
	movq	%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
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	sarq	-32(%rbp)
.L5:
	cmpq	$0, -32(%rbp)
	jg	.L7
	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
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	power, .-power
	.globl	modular_inverse
	.type	modular_inverse, @function
modular_inverse:
.LFB2:
	.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)
	movq	-8(%rbp), %rax
	movl	$1000000005, %esi
	movq	%rax, %rdi
	call	power
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	modular_inverse, .-modular_inverse
	.globl	calcnCr
	.type	calcnCr, @function
calcnCr:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	factorial(%rip), %rax
	movq	(%rdx,%rax), %r12
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	factorial(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rdi
	call	modular_inverse
	movq	%rax, %rbx
	movq	-24(%rbp), %rax
	subq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	factorial(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rdi
	call	modular_inverse
	imulq	%rax, %rbx
	movq	%rbx, %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	%r12, %rcx
	imulq	%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
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	calcnCr, .-calcnCr
	.globl	calc
	.type	calc, @function
calc:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movq	%rcx, -48(%rbp)
	movq	-24(%rbp), %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	calcnCr
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	subq	-24(%rbp), %rax
	movq	-32(%rbp), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	calcnCr
	movq	-8(%rbp), %rdx
	imulq	%rdx, %rax
	movq	%rax, -8(%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
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	subq	-24(%rbp), %rax
	subq	-32(%rbp), %rax
	movq	-40(%rbp), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	calcnCr
	movq	-8(%rbp), %rdx
	imulq	%rdx, %rax
	movq	%rax, -8(%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
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	calc, .-calc
	.section	.rodata
.LC0:
	.string	"%lld%lld%lld%lld"
.LC1:
	.string	"0"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB5:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$96, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, %eax
	call	cfact
	movq	$0, -64(%rbp)
	leaq	-72(%rbp), %rsi
	leaq	-80(%rbp), %rcx
	leaq	-88(%rbp), %rdx
	leaq	-96(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-80(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	cmpq	$1, %rax
	jne	.L16
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L25
.L16:
	movq	-80(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -40(%rbp)
	movq	$0, -56(%rbp)
	jmp	.L18
.L24:
	movq	-88(%rbp), %rax
	subq	-56(%rbp), %rax
	movq	%rax, -32(%rbp)
	movq	$0, -48(%rbp)
	jmp	.L19
.L23:
	movq	-48(%rbp), %rcx
	movq	-32(%rbp), %rdx
	movq	-40(%rbp), %rsi
	movq	-56(%rbp), %rax
	movq	%rax, %rdi
	call	calc
	movq	%rax, -24(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, %rdx
	salq	$2, %rax
	subq	%rax, %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	subq	-32(%rbp), %rax
	movq	%rax, -16(%rbp)
	cmpq	$0, -16(%rbp)
	js	.L27
	cmpq	$0, -40(%rbp)
	jne	.L22
	cmpq	$0, -16(%rbp)
	jne	.L21
	movq	-24(%rbp), %rax
	addq	%rax, -64(%rbp)
	movq	-64(%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, -64(%rbp)
	jmp	.L21
.L22:
	movq	-40(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-40(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	calcnCr
	imulq	-24(%rbp), %rax
	movq	%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
	addq	%rax, -64(%rbp)
	movq	-64(%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, -64(%rbp)
	jmp	.L21
.L27:
	nop
.L21:
	addq	$1, -48(%rbp)
.L19:
	movq	-48(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rax, %rdx
	movq	-72(%rbp), %rax
	cmpq	%rax, %rdx
	jle	.L23
	addq	$1, -56(%rbp)
.L18:
	movq	-88(%rbp), %rax
	cmpq	%rax, -56(%rbp)
	jle	.L24
	movq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L25:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.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	cfact
	.type	cfact, @function
cfact:
.LFB23:
	.cfi_startproc
	endbr64
	movdqa	.LC0(%rip), %xmm0
	movl	$1, %edx
	movl	$2, %ecx
	leaq	factorial(%rip), %r8
	movabsq	$-8543223828751151131, %rdi
	movaps	%xmm0, factorial(%rip)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rdx, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	imulq	%rdi
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rsi
	movq	%rsi, (%r8,%rcx,8)
	addq	$1, %rcx
	movq	%rsi, %rdx
	cmpq	$524288, %rcx
	jne	.L2
	ret
	.cfi_endproc
.LFE23:
	.size	cfact, .-cfact
	.p2align 4
	.globl	power
	.type	power, @function
power:
.LFB24:
	.cfi_startproc
	endbr64
	movq	%rdi, %rcx
	movl	$1, %r8d
	movq	%rsi, %rdi
	testq	%rsi, %rsi
	jle	.L5
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L8:
	testb	$1, %dil
	je	.L7
	movq	%r8, %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
.L7:
	imulq	%rcx, %rcx
	movq	%rcx, %rax
	movq	%rcx, %rsi
	mulq	%r9
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rsi
	sarq	%rdi
	movq	%rsi, %rcx
	jne	.L8
.L5:
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE24:
	.size	power, .-power
	.p2align 4
	.globl	modular_inverse
	.type	modular_inverse, @function
modular_inverse:
.LFB25:
	.cfi_startproc
	endbr64
	movq	%rdi, %rcx
	movl	$30, %r9d
	movl	$1, %r8d
	movl	$1000000005, %edi
	movabsq	$-8543223828751151131, %r10
	.p2align 4,,10
	.p2align 3
.L16:
	testb	$1, %dil
	je	.L15
	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
.L15:
	movq	%rcx, %rsi
	sarq	%rdi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %rcx
	mulq	%r10
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %r9d
	jne	.L16
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE25:
	.size	modular_inverse, .-modular_inverse
	.p2align 4
	.globl	calcnCr
	.type	calcnCr, @function
calcnCr:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$1, %r8d
	leaq	factorial(%rip), %r12
	movabsq	$-8543223828751151131, %r10
	movq	(%r12,%rdi,8), %r11
	movq	(%r12,%rsi,8), %rcx
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	$1000000005, %esi
	movq	%rdi, %rbx
	movl	$30, %edi
	.p2align 4,,10
	.p2align 3
.L23:
	testb	$1, %sil
	je	.L22
	imulq	%rcx, %r8
	movq	%r8, %rax
	movq	%r8, %r9
	imulq	%r10
	movq	%r9, %rax
	sarq	$63, %rax
	leaq	(%rdx,%r8), %r8
	sarq	$29, %r8
	subq	%rax, %r8
	imulq	$1000000007, %r8, %rax
	movq	%r9, %r8
	subq	%rax, %r8
.L22:
	imulq	%rcx, %rcx
	sarq	%rsi
	movq	%rcx, %rax
	mulq	%r10
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %edi
	jne	.L23
	subq	%rbp, %rbx
	movl	$1, %esi
	movl	$1000000005, %r9d
	movabsq	$-8543223828751151131, %r10
	movq	(%r12,%rbx,8), %rcx
	movl	$30, %ebx
	.p2align 4,,10
	.p2align 3
.L25:
	testb	$1, %r9b
	je	.L24
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %rdi
	imulq	%r10
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rdi, %rsi
	subq	%rax, %rsi
.L24:
	movq	%rcx, %rdi
	sarq	%r9
	imulq	%rcx, %rdi
	movq	%rdi, %rax
	mulq	%r10
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rcx
	subl	$1, %ebx
	jne	.L25
	imulq	%r8, %rsi
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	movq	%rsi, %rax
	imulq	%r10
	leaq	(%rdx,%rsi), %rax
	movq	%rsi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rsi
	imulq	%r11, %rsi
	movq	%rsi, %rax
	imulq	%r10
	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
.LFE26:
	.size	calcnCr, .-calcnCr
	.p2align 4
	.globl	calc
	.type	calc, @function
calc:
.LFB27:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	factorial(%rip), %r9
	movq	%rsi, %r10
	movq	%rdx, %r8
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	$30, %r11d
	movabsq	$-8543223828751151131, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	(%rdi,%rsi), %rbp
	movl	$1000000005, %esi
	addq	%rdx, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	addq	%rcx, %rbp
	movq	(%r9,%rdi,8), %rcx
	movl	$1, %edi
	movq	(%r9,%rbp,8), %r13
	.p2align 4,,10
	.p2align 3
.L37:
	testb	$1, %sil
	je	.L36
	movq	%rdi, %rbx
	imulq	%rcx, %rbx
	movq	%rbx, %rax
	imulq	%r14
	movq	%rbx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rbx), %rdi
	sarq	$29, %rdi
	subq	%rax, %rdi
	imulq	$1000000007, %rdi, %rax
	movq	%rbx, %rdi
	subq	%rax, %rdi
.L36:
	movq	%rcx, %rbx
	sarq	%rsi
	imulq	%rcx, %rbx
	movq	%rbx, %rax
	mulq	%r14
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rbx
	movq	%rbx, %rcx
	subl	$1, %r11d
	jne	.L37
	subq	%r12, %rbp
	movl	$1, %esi
	movl	$30, %r12d
	movl	$1000000005, %r11d
	movabsq	$-8543223828751151131, %r15
	movq	(%r9,%rbp,8), %rbx
	movq	%rbx, %rcx
	.p2align 4,,10
	.p2align 3
.L39:
	testb	$1, %r11b
	je	.L38
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %r14
	imulq	%r15
	movq	%r14, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%r14, %rsi
	subq	%rax, %rsi
.L38:
	imulq	%rcx, %rcx
	sarq	%r11
	movq	%rcx, %rax
	mulq	%r15
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %r12d
	jne	.L39
	imulq	%rdi, %rsi
	movq	(%r9,%r10,8), %rcx
	movl	$30, %r11d
	movl	$1, %edi
	movabsq	$-8543223828751151131, %r14
	movq	%rsi, %rax
	imulq	%r15
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rsi
	imulq	%r13, %rsi
	movq	%rsi, %rax
	imulq	%r15
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %r13
	sarq	$29, %r13
	subq	%rax, %r13
	imulq	$1000000007, %r13, %rax
	subq	%rax, %rsi
	movq	%rsi, %r13
	movl	$1000000005, %esi
	.p2align 4,,10
	.p2align 3
.L41:
	testb	$1, %sil
	je	.L40
	imulq	%rcx, %rdi
	movq	%rdi, %rax
	movq	%rdi, %r12
	imulq	%r14
	movq	%r12, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rdi
	sarq	$29, %rdi
	subq	%rax, %rdi
	imulq	$1000000007, %rdi, %rax
	movq	%r12, %rdi
	subq	%rax, %rdi
.L40:
	imulq	%rcx, %rcx
	sarq	%rsi
	movq	%rcx, %rax
	mulq	%r14
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %r11d
	jne	.L41
	subq	%r10, %rbp
	movl	$30, %r12d
	movl	$1, %esi
	movl	$1000000005, %r10d
	movabsq	$-8543223828751151131, %r15
	movq	(%r9,%rbp,8), %r11
	movq	%r11, %rcx
	.p2align 4,,10
	.p2align 3
.L43:
	testb	$1, %r10b
	je	.L42
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %r14
	imulq	%r15
	movq	%r14, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%r14, %rsi
	subq	%rax, %rsi
.L42:
	imulq	%rcx, %rcx
	sarq	%r10
	movq	%rcx, %rax
	mulq	%r15
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %r12d
	jne	.L43
	imulq	%rdi, %rsi
	movl	$1000000005, %edi
	movq	%rsi, %rax
	imulq	%r15
	leaq	(%rdx,%rsi), %rax
	movq	%rsi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rsi
	imulq	%rbx, %rsi
	movl	$30, %ebx
	movq	%rsi, %rax
	movq	%rsi, %rcx
	imulq	%r15
	leaq	(%rdx,%rsi), %rax
	movq	%rsi, %rdx
	movl	$1, %esi
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rcx
	imulq	%r13, %rcx
	movabsq	$-8543223828751151131, %r13
	movq	%rcx, %rax
	imulq	%r15
	movq	%rcx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %r10
	sarq	$29, %r10
	subq	%rax, %r10
	imulq	$1000000007, %r10, %rax
	subq	%rax, %rcx
	movq	%rcx, %r10
	movq	(%r9,%r8,8), %rcx
	.p2align 4,,10
	.p2align 3
.L45:
	testb	$1, %dil
	je	.L44
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %r12
	imulq	%r13
	movq	%r12, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%r12, %rsi
	subq	%rax, %rsi
.L44:
	imulq	%rcx, %rcx
	sarq	%rdi
	movq	%rcx, %rax
	mulq	%r13
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %ebx
	jne	.L45
	subq	%r8, %rbp
	movl	$1, %edi
	movl	$1000000005, %ebx
	movq	(%r9,%rbp,8), %rcx
	movl	$30, %ebp
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L47:
	testb	$1, %bl
	je	.L46
	imulq	%rcx, %rdi
	movq	%rdi, %rax
	movq	%rdi, %r8
	imulq	%r9
	movq	%r8, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rdi
	sarq	$29, %rdi
	subq	%rax, %rdi
	imulq	$1000000007, %rdi, %rax
	movq	%r8, %rdi
	subq	%rax, %rdi
.L46:
	imulq	%rcx, %rcx
	sarq	%rbx
	movq	%rcx, %rax
	mulq	%r9
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %ebp
	jne	.L47
	imulq	%rdi, %rsi
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	movq	%rsi, %rax
	imulq	%r9
	leaq	(%rdx,%rsi), %rax
	movq	%rsi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rsi
	imulq	%r11, %rsi
	movq	%rsi, %rax
	movq	%rsi, %rcx
	imulq	%r9
	leaq	(%rdx,%rsi), %rax
	movq	%rsi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rcx
	imulq	%r10, %rcx
	movq	%rcx, %rax
	imulq	%r9
	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
	.cfi_endproc
.LFE27:
	.size	calc, .-calc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%lld%lld%lld%lld"
.LC2:
	.string	"0"
.LC3:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB28:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$2, %ecx
	movabsq	$-8543223828751151131, %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$200, %rsp
	.cfi_def_cfa_offset 256
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 184(%rsp)
	xorl	%eax, %eax
	movl	$1, %eax
	movaps	%xmm0, factorial(%rip)
	movq	%rax, %rdx
	.p2align 4,,10
	.p2align 3
.L74:
	movq	%rdx, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	imulq	%rdi
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rsi
	leaq	factorial(%rip), %rax
	movq	%rsi, (%rax,%rcx,8)
	addq	$1, %rcx
	movq	%rsi, %rdx
	cmpq	$524288, %rcx
	jne	.L74
	leaq	168(%rsp), %rcx
	leaq	160(%rsp), %rdx
	xorl	%eax, %eax
	leaq	152(%rsp), %rsi
	leaq	176(%rsp), %r8
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	168(%rsp), %rdx
	movq	%rdx, %rcx
	shrq	$63, %rcx
	leaq	(%rdx,%rcx), %rax
	andl	$1, %eax
	subq	%rcx, %rax
	cmpq	$1, %rax
	je	.L137
	movq	%rdx, %rax
	shrq	$63, %rax
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, 8(%rsp)
	movq	%rax, %rdi
	movq	160(%rsp), %rax
	testq	%rax, %rax
	js	.L100
	movq	176(%rsp), %rbx
	movq	%rax, %rdx
	movq	$0, 96(%rsp)
	movabsq	$-8543223828751151131, %r15
	movq	$0, 80(%rsp)
	negq	%rdx
	movq	%rbx, 48(%rsp)
	subq	%rax, %rbx
	addq	$1, %rax
	movq	%rbx, 32(%rsp)
	leaq	0(,%rdx,8), %rbx
	movq	%rax, 128(%rsp)
	leaq	factorial(%rip), %rax
	movq	%rbx, %rsi
	leaq	(%rax,%rdi,8), %rax
	movq	%rbx, 40(%rsp)
	leaq	factorial(%rip), %rbx
	subq	%rsi, %rbx
	movq	%rax, 104(%rsp)
	leaq	-1(%rdi), %rax
	movq	%rbx, 136(%rsp)
	movq	%rbx, 120(%rsp)
	movq	%rax, 112(%rsp)
	.p2align 4,,10
	.p2align 3
.L98:
	cmpq	$0, 48(%rsp)
	js	.L78
	movq	40(%rsp), %rdi
	movq	136(%rsp), %rax
	movq	120(%rsp), %r14
	movq	32(%rsp), %r13
	movq	(%rax,%rdi), %rax
	leaq	factorial(%rip), %rdi
	movq	%rax, 56(%rsp)
	movq	(%r14), %rax
	movq	%rax, 64(%rsp)
	movq	8(%rsp), %rax
	movq	(%rdi,%rax,8), %rdi
	addq	96(%rsp), %rax
	movq	%rax, 88(%rsp)
	movq	%rdi, 72(%rsp)
	.p2align 4,,10
	.p2align 3
.L97:
	movq	56(%rsp), %rcx
	movl	$30, %edi
	movl	$1, %r8d
	movl	$1000000005, %esi
	.p2align 4,,10
	.p2align 3
.L80:
	testb	$1, %sil
	je	.L79
	imulq	%rcx, %r8
	movq	%r8, %rax
	movq	%r8, %r9
	imulq	%r15
	movq	%r9, %rax
	sarq	$63, %rax
	leaq	(%rdx,%r8), %r8
	sarq	$29, %r8
	subq	%rax, %r8
	imulq	$1000000007, %r8, %rax
	movq	%r9, %r8
	subq	%rax, %r8
.L79:
	imulq	%rcx, %rcx
	sarq	%rsi
	movq	%rcx, %rax
	mulq	%r15
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %edi
	jne	.L80
	movq	8(%rsp), %rax
	movl	$30, %edi
	movl	$1, %r11d
	movl	$1000000005, %esi
	movq	(%r14,%rax,8), %rax
	movq	%rax, 24(%rsp)
	movq	%rax, %rcx
	.p2align 4,,10
	.p2align 3
.L82:
	testb	$1, %sil
	je	.L81
	imulq	%rcx, %r11
	movq	%r11, %rax
	movq	%r11, %r9
	imulq	%r15
	movq	%r9, %rax
	sarq	$63, %rax
	leaq	(%rdx,%r11), %r11
	sarq	$29, %r11
	subq	%rax, %r11
	imulq	$1000000007, %r11, %rax
	movq	%r9, %r11
	subq	%rax, %r11
.L81:
	imulq	%rcx, %rcx
	sarq	%rsi
	movq	%rcx, %rax
	mulq	%r15
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %edi
	jne	.L82
	movq	72(%rsp), %rcx
	movl	$30, %r9d
	movl	$1, %edi
	movl	$1000000005, %esi
	.p2align 4,,10
	.p2align 3
.L84:
	testb	$1, %sil
	je	.L83
	imulq	%rcx, %rdi
	movq	%rdi, %rax
	movq	%rdi, %r10
	imulq	%r15
	movq	%r10, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rdi
	sarq	$29, %rdi
	subq	%rax, %rdi
	imulq	$1000000007, %rdi, %rax
	movq	%r10, %rdi
	subq	%rax, %rdi
.L83:
	imulq	%rcx, %rcx
	sarq	%rsi
	movq	%rcx, %rax
	mulq	%r15
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %r9d
	jne	.L84
	movq	(%r14), %rax
	movl	$30, %r9d
	movl	$1, %r10d
	movl	$1000000005, %esi
	movq	%rax, 16(%rsp)
	movq	%rax, %rcx
	.p2align 4,,10
	.p2align 3
.L86:
	testb	$1, %sil
	je	.L85
	movq	%r10, %rbx
	imulq	%rcx, %rbx
	movq	%rbx, %rax
	imulq	%r15
	movq	%rbx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rbx), %r10
	sarq	$29, %r10
	subq	%rax, %r10
	imulq	$1000000007, %r10, %rax
	subq	%rax, %rbx
	movq	%rbx, %r10
.L85:
	movq	%rcx, %rbx
	sarq	%rsi
	imulq	%rcx, %rbx
	movq	%rbx, %rax
	mulq	%r15
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rbx
	movq	%rbx, %rcx
	subl	$1, %r9d
	jne	.L86
	movq	64(%rsp), %rcx
	movl	$30, %ebx
	movl	$1, %esi
	movl	$1000000005, %r9d
	.p2align 4,,10
	.p2align 3
.L88:
	testb	$1, %r9b
	je	.L87
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %rbp
	imulq	%r15
	movq	%rbp, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rbp, %rsi
	subq	%rax, %rsi
.L87:
	imulq	%rcx, %rcx
	sarq	%r9
	movq	%rcx, %rax
	mulq	%r15
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %ebx
	jne	.L88
	movq	40(%rsp), %rax
	movl	$30, %ebp
	movl	$1, %r9d
	movl	$1000000005, %ebx
	movq	(%r14,%rax), %rcx
	.p2align 4,,10
	.p2align 3
.L90:
	testb	$1, %bl
	je	.L89
	imulq	%rcx, %r9
	movq	%r9, %rax
	movq	%r9, %r12
	imulq	%r15
	movq	%r12, %rax
	sarq	$63, %rax
	leaq	(%rdx,%r9), %r9
	sarq	$29, %r9
	subq	%rax, %r9
	imulq	$1000000007, %r9, %rax
	movq	%r12, %r9
	subq	%rax, %r9
.L89:
	imulq	%rcx, %rcx
	sarq	%rbx
	movq	%rcx, %rax
	mulq	%r15
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %ebp
	jne	.L90
	testq	%r13, %r13
	js	.L91
	imulq	%r11, %r8
	imulq	%r10, %rdi
	movq	%r8, %rax
	movq	%r8, %rcx
	imulq	%r15
	sarq	$63, %rcx
	leaq	(%rdx,%r8), %rax
	sarq	$29, %rax
	subq	%rcx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %r8
	movq	88(%rsp), %rax
	imulq	(%r14,%rax,8), %r8
	movq	%r8, %rax
	movq	%r8, %rcx
	imulq	%r15
	sarq	$63, %rcx
	leaq	(%rdx,%r8), %rax
	sarq	$29, %rax
	subq	%rcx, %rax
	movq	%rdi, %rcx
	imulq	$1000000007, %rax, %rax
	sarq	$63, %rcx
	subq	%rax, %r8
	movq	%rdi, %rax
	imulq	%r15
	leaq	(%rdx,%rdi), %rax
	sarq	$29, %rax
	subq	%rcx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rdi
	imulq	24(%rsp), %rdi
	movq	%rdi, %rax
	movq	%rdi, %rcx
	imulq	%r15
	sarq	$63, %rcx
	leaq	(%rdx,%rdi), %rax
	sarq	$29, %rax
	subq	%rcx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rdi
	imulq	%r8, %rdi
	movq	%rdi, %rax
	imulq	%r15
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	%r9, %rsi
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rdi
	movq	%rsi, %rax
	imulq	%r15
	movq	%rdi, %rcx
	movq	%rsi, %rdi
	sarq	$63, %rdi
	leaq	(%rdx,%rsi), %rax
	sarq	$29, %rax
	subq	%rdi, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rsi
	imulq	16(%rsp), %rsi
	movq	%rsi, %rax
	movq	%rsi, %rdi
	imulq	%r15
	sarq	$63, %rdi
	leaq	(%rdx,%rsi), %rax
	sarq	$29, %rax
	subq	%rdi, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	imulq	%r15
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %r8
	sarq	$29, %r8
	subq	%rax, %r8
	imulq	$1000000007, %r8, %rax
	subq	%rax, %rsi
	cmpq	$0, 8(%rsp)
	movq	%rsi, %r8
	jne	.L92
	testq	%r13, %r13
	jne	.L91
	addq	80(%rsp), %r8
	movq	%r8, %rax
	imulq	%r15
	movq	%r8, %rax
	sarq	$63, %rax
	addq	%r8, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %r8
	movq	%r8, 80(%rsp)
.L91:
	movq	32(%rsp), %rax
	subq	$3, %r13
	addq	$8, %r14
	subq	%r13, %rax
	cmpq	%rax, 48(%rsp)
	jge	.L97
.L78:
	addq	$1, 96(%rsp)
	movq	96(%rsp), %rax
	addq	$1, 32(%rsp)
	addq	$8, 40(%rsp)
	subq	$8, 120(%rsp)
	cmpq	128(%rsp), %rax
	jne	.L98
.L77:
	movq	80(%rsp), %rdx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L76:
	movq	184(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L138
	addq	$200, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L92:
	.cfi_restore_state
	movq	104(%rsp), %rax
	movq	112(%rsp), %rdi
	movl	$30, %r9d
	movl	$1, %ecx
	movq	-8(%rax,%r13,8), %rbx
	leaq	factorial(%rip), %rax
	movq	(%rax,%rdi,8), %rsi
	movl	$1000000005, %edi
	.p2align 4,,10
	.p2align 3
.L94:
	testb	$1, %dil
	je	.L93
	imulq	%rsi, %rcx
	movq	%rcx, %rax
	movq	%rcx, %r10
	imulq	%r15
	movq	%r10, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%r10, %rcx
	subq	%rax, %rcx
.L93:
	imulq	%rsi, %rsi
	sarq	%rdi
	movq	%rsi, %rax
	movq	%rsi, %r10
	mulq	%r15
	movq	%rdx, %rsi
	shrq	$29, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%r10, %rsi
	subq	%rax, %rsi
	subl	$1, %r9d
	jne	.L94
	leaq	factorial(%rip), %rax
	movl	$30, %r10d
	movl	$1, %edi
	movl	$1000000005, %r9d
	movq	(%rax,%r13,8), %rsi
	.p2align 4,,10
	.p2align 3
.L96:
	testb	$1, %r9b
	je	.L95
	imulq	%rsi, %rdi
	movq	%rdi, %rax
	movq	%rdi, %r11
	imulq	%r15
	movq	%r11, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rdi
	sarq	$29, %rdi
	subq	%rax, %rdi
	imulq	$1000000007, %rdi, %rax
	movq	%r11, %rdi
	subq	%rax, %rdi
.L95:
	imulq	%rsi, %rsi
	sarq	%r9
	movq	%rsi, %rax
	movq	%rsi, %r11
	mulq	%r15
	movq	%rdx, %rsi
	shrq	$29, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%r11, %rsi
	subq	%rax, %rsi
	subl	$1, %r10d
	jne	.L96
	imulq	%rdi, %rcx
	movq	%rcx, %rax
	movq	%rcx, %rsi
	imulq	%r15
	sarq	$63, %rsi
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	subq	%rsi, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rcx
	imulq	%rbx, %rcx
	movq	%rcx, %rax
	movq	%rcx, %rsi
	imulq	%r15
	sarq	$63, %rsi
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	subq	%rsi, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rcx
	imulq	%r8, %rcx
	movq	%rcx, %rax
	movq	%rcx, %rsi
	imulq	%r15
	sarq	$63, %rsi
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	subq	%rsi, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rcx
	addq	80(%rsp), %rcx
	movq	%rcx, %rax
	imulq	%r15
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, 80(%rsp)
	jmp	.L91
.L137:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L76
.L100:
	movq	$0, 80(%rsp)
	jmp	.L77
.L138:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE28:
	.size	main, .-main
	.globl	factorial
	.bss
	.align 32
	.type	factorial, @object
	.size	factorial, 4194304
factorial:
	.zero	4194304
	.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	cfact
	.type	cfact, @function
cfact:
.LFB23:
	.cfi_startproc
	endbr64
	movdqa	.LC0(%rip), %xmm0
	movl	$1, %edx
	movl	$2, %ecx
	leaq	factorial(%rip), %r8
	movabsq	$-8543223828751151131, %rdi
	movaps	%xmm0, factorial(%rip)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rdx, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	imulq	%rdi
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rsi
	movq	%rsi, (%r8,%rcx,8)
	addq	$1, %rcx
	movq	%rsi, %rdx
	cmpq	$524288, %rcx
	jne	.L2
	ret
	.cfi_endproc
.LFE23:
	.size	cfact, .-cfact
	.p2align 4
	.globl	power
	.type	power, @function
power:
.LFB24:
	.cfi_startproc
	endbr64
	movq	%rdi, %rcx
	movl	$1, %r8d
	movq	%rsi, %rdi
	testq	%rsi, %rsi
	jle	.L5
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L8:
	testb	$1, %dil
	je	.L7
	movq	%r8, %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
.L7:
	imulq	%rcx, %rcx
	movq	%rcx, %rax
	movq	%rcx, %rsi
	mulq	%r9
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rsi
	sarq	%rdi
	movq	%rsi, %rcx
	jne	.L8
.L5:
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE24:
	.size	power, .-power
	.p2align 4
	.globl	modular_inverse
	.type	modular_inverse, @function
modular_inverse:
.LFB25:
	.cfi_startproc
	endbr64
	movq	%rdi, %rcx
	movl	$30, %r9d
	movl	$1, %r8d
	movl	$1000000005, %edi
	movabsq	$-8543223828751151131, %r10
	.p2align 4,,10
	.p2align 3
.L16:
	testb	$1, %dil
	je	.L15
	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
.L15:
	movq	%rcx, %rsi
	sarq	%rdi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %rcx
	mulq	%r10
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %r9d
	jne	.L16
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE25:
	.size	modular_inverse, .-modular_inverse
	.p2align 4
	.globl	calcnCr
	.type	calcnCr, @function
calcnCr:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$1, %r8d
	leaq	factorial(%rip), %r12
	movabsq	$-8543223828751151131, %r10
	movq	(%r12,%rdi,8), %r11
	movq	(%r12,%rsi,8), %rcx
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	$1000000005, %esi
	movq	%rdi, %rbx
	movl	$30, %edi
	.p2align 4,,10
	.p2align 3
.L23:
	testb	$1, %sil
	je	.L22
	imulq	%rcx, %r8
	movq	%r8, %rax
	movq	%r8, %r9
	imulq	%r10
	movq	%r9, %rax
	sarq	$63, %rax
	leaq	(%rdx,%r8), %r8
	sarq	$29, %r8
	subq	%rax, %r8
	imulq	$1000000007, %r8, %rax
	movq	%r9, %r8
	subq	%rax, %r8
.L22:
	imulq	%rcx, %rcx
	sarq	%rsi
	movq	%rcx, %rax
	mulq	%r10
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %edi
	jne	.L23
	subq	%rbp, %rbx
	movl	$1, %esi
	movl	$1000000005, %r9d
	movabsq	$-8543223828751151131, %r10
	movq	(%r12,%rbx,8), %rcx
	movl	$30, %ebx
	.p2align 4,,10
	.p2align 3
.L25:
	testb	$1, %r9b
	je	.L24
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %rdi
	imulq	%r10
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rdi, %rsi
	subq	%rax, %rsi
.L24:
	movq	%rcx, %rdi
	sarq	%r9
	imulq	%rcx, %rdi
	movq	%rdi, %rax
	mulq	%r10
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rcx
	subl	$1, %ebx
	jne	.L25
	imulq	%r8, %rsi
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	movq	%rsi, %rax
	imulq	%r10
	leaq	(%rdx,%rsi), %rax
	movq	%rsi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rsi
	imulq	%r11, %rsi
	movq	%rsi, %rax
	imulq	%r10
	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
.LFE26:
	.size	calcnCr, .-calcnCr
	.p2align 4
	.globl	calc
	.type	calc, @function
calc:
.LFB27:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	factorial(%rip), %r9
	movq	%rsi, %r10
	movq	%rdx, %r8
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	$30, %r11d
	movabsq	$-8543223828751151131, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	(%rdi,%rsi), %rbp
	movl	$1000000005, %esi
	addq	%rdx, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	addq	%rcx, %rbp
	movq	(%r9,%rdi,8), %rcx
	movl	$1, %edi
	movq	(%r9,%rbp,8), %r13
	.p2align 4,,10
	.p2align 3
.L37:
	testb	$1, %sil
	je	.L36
	movq	%rdi, %rbx
	imulq	%rcx, %rbx
	movq	%rbx, %rax
	imulq	%r14
	movq	%rbx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rbx), %rdi
	sarq	$29, %rdi
	subq	%rax, %rdi
	imulq	$1000000007, %rdi, %rax
	movq	%rbx, %rdi
	subq	%rax, %rdi
.L36:
	movq	%rcx, %rbx
	sarq	%rsi
	imulq	%rcx, %rbx
	movq	%rbx, %rax
	mulq	%r14
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rbx
	movq	%rbx, %rcx
	subl	$1, %r11d
	jne	.L37
	subq	%r12, %rbp
	movl	$1, %esi
	movl	$30, %r12d
	movl	$1000000005, %r11d
	movabsq	$-8543223828751151131, %r15
	movq	(%r9,%rbp,8), %rbx
	movq	%rbx, %rcx
	.p2align 4,,10
	.p2align 3
.L39:
	testb	$1, %r11b
	je	.L38
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %r14
	imulq	%r15
	movq	%r14, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%r14, %rsi
	subq	%rax, %rsi
.L38:
	imulq	%rcx, %rcx
	sarq	%r11
	movq	%rcx, %rax
	mulq	%r15
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %r12d
	jne	.L39
	imulq	%rdi, %rsi
	movq	(%r9,%r10,8), %rcx
	movl	$30, %r11d
	movl	$1, %edi
	movabsq	$-8543223828751151131, %r14
	movq	%rsi, %rax
	imulq	%r15
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rsi
	imulq	%r13, %rsi
	movq	%rsi, %rax
	imulq	%r15
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %r13
	sarq	$29, %r13
	subq	%rax, %r13
	imulq	$1000000007, %r13, %rax
	subq	%rax, %rsi
	movq	%rsi, %r13
	movl	$1000000005, %esi
	.p2align 4,,10
	.p2align 3
.L41:
	testb	$1, %sil
	je	.L40
	imulq	%rcx, %rdi
	movq	%rdi, %rax
	movq	%rdi, %r12
	imulq	%r14
	movq	%r12, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rdi
	sarq	$29, %rdi
	subq	%rax, %rdi
	imulq	$1000000007, %rdi, %rax
	movq	%r12, %rdi
	subq	%rax, %rdi
.L40:
	imulq	%rcx, %rcx
	sarq	%rsi
	movq	%rcx, %rax
	mulq	%r14
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %r11d
	jne	.L41
	subq	%r10, %rbp
	movl	$30, %r12d
	movl	$1, %esi
	movl	$1000000005, %r10d
	movabsq	$-8543223828751151131, %r15
	movq	(%r9,%rbp,8), %r11
	movq	%r11, %rcx
	.p2align 4,,10
	.p2align 3
.L43:
	testb	$1, %r10b
	je	.L42
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %r14
	imulq	%r15
	movq	%r14, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%r14, %rsi
	subq	%rax, %rsi
.L42:
	imulq	%rcx, %rcx
	sarq	%r10
	movq	%rcx, %rax
	mulq	%r15
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %r12d
	jne	.L43
	imulq	%rdi, %rsi
	movl	$1000000005, %edi
	movq	%rsi, %rax
	imulq	%r15
	leaq	(%rdx,%rsi), %rax
	movq	%rsi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rsi
	imulq	%rbx, %rsi
	movl	$30, %ebx
	movq	%rsi, %rax
	movq	%rsi, %rcx
	imulq	%r15
	leaq	(%rdx,%rsi), %rax
	movq	%rsi, %rdx
	movl	$1, %esi
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rcx
	imulq	%r13, %rcx
	movabsq	$-8543223828751151131, %r13
	movq	%rcx, %rax
	imulq	%r15
	movq	%rcx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %r10
	sarq	$29, %r10
	subq	%rax, %r10
	imulq	$1000000007, %r10, %rax
	subq	%rax, %rcx
	movq	%rcx, %r10
	movq	(%r9,%r8,8), %rcx
	.p2align 4,,10
	.p2align 3
.L45:
	testb	$1, %dil
	je	.L44
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %r12
	imulq	%r13
	movq	%r12, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%r12, %rsi
	subq	%rax, %rsi
.L44:
	imulq	%rcx, %rcx
	sarq	%rdi
	movq	%rcx, %rax
	mulq	%r13
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %ebx
	jne	.L45
	subq	%r8, %rbp
	movl	$1, %edi
	movl	$1000000005, %ebx
	movq	(%r9,%rbp,8), %rcx
	movl	$30, %ebp
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L47:
	testb	$1, %bl
	je	.L46
	imulq	%rcx, %rdi
	movq	%rdi, %rax
	movq	%rdi, %r8
	imulq	%r9
	movq	%r8, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rdi
	sarq	$29, %rdi
	subq	%rax, %rdi
	imulq	$1000000007, %rdi, %rax
	movq	%r8, %rdi
	subq	%rax, %rdi
.L46:
	imulq	%rcx, %rcx
	sarq	%rbx
	movq	%rcx, %rax
	mulq	%r9
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %ebp
	jne	.L47
	imulq	%rdi, %rsi
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	movq	%rsi, %rax
	imulq	%r9
	leaq	(%rdx,%rsi), %rax
	movq	%rsi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rsi
	imulq	%r11, %rsi
	movq	%rsi, %rax
	movq	%rsi, %rcx
	imulq	%r9
	leaq	(%rdx,%rsi), %rax
	movq	%rsi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rcx
	imulq	%r10, %rcx
	movq	%rcx, %rax
	imulq	%r9
	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
	.cfi_endproc
.LFE27:
	.size	calc, .-calc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%lld%lld%lld%lld"
.LC2:
	.string	"0"
.LC3:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB28:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$2, %ecx
	movabsq	$-8543223828751151131, %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$200, %rsp
	.cfi_def_cfa_offset 256
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 184(%rsp)
	xorl	%eax, %eax
	movl	$1, %eax
	movaps	%xmm0, factorial(%rip)
	movq	%rax, %rdx
	.p2align 4,,10
	.p2align 3
.L74:
	movq	%rdx, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	imulq	%rdi
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rsi
	leaq	factorial(%rip), %rax
	movq	%rsi, (%rax,%rcx,8)
	addq	$1, %rcx
	movq	%rsi, %rdx
	cmpq	$524288, %rcx
	jne	.L74
	leaq	168(%rsp), %rcx
	leaq	160(%rsp), %rdx
	xorl	%eax, %eax
	leaq	152(%rsp), %rsi
	leaq	176(%rsp), %r8
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	168(%rsp), %rdx
	movq	%rdx, %rcx
	shrq	$63, %rcx
	leaq	(%rdx,%rcx), %rax
	andl	$1, %eax
	subq	%rcx, %rax
	cmpq	$1, %rax
	je	.L137
	movq	%rdx, %rax
	shrq	$63, %rax
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, 8(%rsp)
	movq	%rax, %rdi
	movq	160(%rsp), %rax
	testq	%rax, %rax
	js	.L100
	movq	176(%rsp), %rbx
	movq	%rax, %rdx
	movq	$0, 96(%rsp)
	movabsq	$-8543223828751151131, %r15
	movq	$0, 80(%rsp)
	negq	%rdx
	movq	%rbx, 48(%rsp)
	subq	%rax, %rbx
	addq	$1, %rax
	movq	%rbx, 32(%rsp)
	leaq	0(,%rdx,8), %rbx
	movq	%rax, 128(%rsp)
	leaq	factorial(%rip), %rax
	movq	%rbx, %rsi
	leaq	(%rax,%rdi,8), %rax
	movq	%rbx, 40(%rsp)
	leaq	factorial(%rip), %rbx
	subq	%rsi, %rbx
	movq	%rax, 104(%rsp)
	leaq	-1(%rdi), %rax
	movq	%rbx, 136(%rsp)
	movq	%rbx, 120(%rsp)
	movq	%rax, 112(%rsp)
	.p2align 4,,10
	.p2align 3
.L98:
	cmpq	$0, 48(%rsp)
	js	.L78
	movq	40(%rsp), %rdi
	movq	136(%rsp), %rax
	movq	120(%rsp), %r14
	movq	32(%rsp), %r13
	movq	(%rax,%rdi), %rax
	leaq	factorial(%rip), %rdi
	movq	%rax, 56(%rsp)
	movq	(%r14), %rax
	movq	%rax, 64(%rsp)
	movq	8(%rsp), %rax
	movq	(%rdi,%rax,8), %rdi
	addq	96(%rsp), %rax
	movq	%rax, 88(%rsp)
	movq	%rdi, 72(%rsp)
	.p2align 4,,10
	.p2align 3
.L97:
	movq	56(%rsp), %rcx
	movl	$30, %edi
	movl	$1, %r8d
	movl	$1000000005, %esi
	.p2align 4,,10
	.p2align 3
.L80:
	testb	$1, %sil
	je	.L79
	imulq	%rcx, %r8
	movq	%r8, %rax
	movq	%r8, %r9
	imulq	%r15
	movq	%r9, %rax
	sarq	$63, %rax
	leaq	(%rdx,%r8), %r8
	sarq	$29, %r8
	subq	%rax, %r8
	imulq	$1000000007, %r8, %rax
	movq	%r9, %r8
	subq	%rax, %r8
.L79:
	imulq	%rcx, %rcx
	sarq	%rsi
	movq	%rcx, %rax
	mulq	%r15
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %edi
	jne	.L80
	movq	8(%rsp), %rax
	movl	$30, %edi
	movl	$1, %r11d
	movl	$1000000005, %esi
	movq	(%r14,%rax,8), %rax
	movq	%rax, 24(%rsp)
	movq	%rax, %rcx
	.p2align 4,,10
	.p2align 3
.L82:
	testb	$1, %sil
	je	.L81
	imulq	%rcx, %r11
	movq	%r11, %rax
	movq	%r11, %r9
	imulq	%r15
	movq	%r9, %rax
	sarq	$63, %rax
	leaq	(%rdx,%r11), %r11
	sarq	$29, %r11
	subq	%rax, %r11
	imulq	$1000000007, %r11, %rax
	movq	%r9, %r11
	subq	%rax, %r11
.L81:
	imulq	%rcx, %rcx
	sarq	%rsi
	movq	%rcx, %rax
	mulq	%r15
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %edi
	jne	.L82
	movq	72(%rsp), %rcx
	movl	$30, %r9d
	movl	$1, %edi
	movl	$1000000005, %esi
	.p2align 4,,10
	.p2align 3
.L84:
	testb	$1, %sil
	je	.L83
	imulq	%rcx, %rdi
	movq	%rdi, %rax
	movq	%rdi, %r10
	imulq	%r15
	movq	%r10, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rdi
	sarq	$29, %rdi
	subq	%rax, %rdi
	imulq	$1000000007, %rdi, %rax
	movq	%r10, %rdi
	subq	%rax, %rdi
.L83:
	imulq	%rcx, %rcx
	sarq	%rsi
	movq	%rcx, %rax
	mulq	%r15
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %r9d
	jne	.L84
	movq	(%r14), %rax
	movl	$30, %r9d
	movl	$1, %r10d
	movl	$1000000005, %esi
	movq	%rax, 16(%rsp)
	movq	%rax, %rcx
	.p2align 4,,10
	.p2align 3
.L86:
	testb	$1, %sil
	je	.L85
	movq	%r10, %rbx
	imulq	%rcx, %rbx
	movq	%rbx, %rax
	imulq	%r15
	movq	%rbx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rbx), %r10
	sarq	$29, %r10
	subq	%rax, %r10
	imulq	$1000000007, %r10, %rax
	subq	%rax, %rbx
	movq	%rbx, %r10
.L85:
	movq	%rcx, %rbx
	sarq	%rsi
	imulq	%rcx, %rbx
	movq	%rbx, %rax
	mulq	%r15
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rbx
	movq	%rbx, %rcx
	subl	$1, %r9d
	jne	.L86
	movq	64(%rsp), %rcx
	movl	$30, %ebx
	movl	$1, %esi
	movl	$1000000005, %r9d
	.p2align 4,,10
	.p2align 3
.L88:
	testb	$1, %r9b
	je	.L87
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %rbp
	imulq	%r15
	movq	%rbp, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rbp, %rsi
	subq	%rax, %rsi
.L87:
	imulq	%rcx, %rcx
	sarq	%r9
	movq	%rcx, %rax
	mulq	%r15
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %ebx
	jne	.L88
	movq	40(%rsp), %rax
	movl	$30, %ebp
	movl	$1, %r9d
	movl	$1000000005, %ebx
	movq	(%r14,%rax), %rcx
	.p2align 4,,10
	.p2align 3
.L90:
	testb	$1, %bl
	je	.L89
	imulq	%rcx, %r9
	movq	%r9, %rax
	movq	%r9, %r12
	imulq	%r15
	movq	%r12, %rax
	sarq	$63, %rax
	leaq	(%rdx,%r9), %r9
	sarq	$29, %r9
	subq	%rax, %r9
	imulq	$1000000007, %r9, %rax
	movq	%r12, %r9
	subq	%rax, %r9
.L89:
	imulq	%rcx, %rcx
	sarq	%rbx
	movq	%rcx, %rax
	mulq	%r15
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %ebp
	jne	.L90
	testq	%r13, %r13
	js	.L91
	imulq	%r11, %r8
	imulq	%r10, %rdi
	movq	%r8, %rax
	movq	%r8, %rcx
	imulq	%r15
	sarq	$63, %rcx
	leaq	(%rdx,%r8), %rax
	sarq	$29, %rax
	subq	%rcx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %r8
	movq	88(%rsp), %rax
	imulq	(%r14,%rax,8), %r8
	movq	%r8, %rax
	movq	%r8, %rcx
	imulq	%r15
	sarq	$63, %rcx
	leaq	(%rdx,%r8), %rax
	sarq	$29, %rax
	subq	%rcx, %rax
	movq	%rdi, %rcx
	imulq	$1000000007, %rax, %rax
	sarq	$63, %rcx
	subq	%rax, %r8
	movq	%rdi, %rax
	imulq	%r15
	leaq	(%rdx,%rdi), %rax
	sarq	$29, %rax
	subq	%rcx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rdi
	imulq	24(%rsp), %rdi
	movq	%rdi, %rax
	movq	%rdi, %rcx
	imulq	%r15
	sarq	$63, %rcx
	leaq	(%rdx,%rdi), %rax
	sarq	$29, %rax
	subq	%rcx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rdi
	imulq	%r8, %rdi
	movq	%rdi, %rax
	imulq	%r15
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	%r9, %rsi
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rdi
	movq	%rsi, %rax
	imulq	%r15
	movq	%rdi, %rcx
	movq	%rsi, %rdi
	sarq	$63, %rdi
	leaq	(%rdx,%rsi), %rax
	sarq	$29, %rax
	subq	%rdi, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rsi
	imulq	16(%rsp), %rsi
	movq	%rsi, %rax
	movq	%rsi, %rdi
	imulq	%r15
	sarq	$63, %rdi
	leaq	(%rdx,%rsi), %rax
	sarq	$29, %rax
	subq	%rdi, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	imulq	%r15
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %r8
	sarq	$29, %r8
	subq	%rax, %r8
	imulq	$1000000007, %r8, %rax
	subq	%rax, %rsi
	cmpq	$0, 8(%rsp)
	movq	%rsi, %r8
	jne	.L92
	testq	%r13, %r13
	jne	.L91
	addq	80(%rsp), %r8
	movq	%r8, %rax
	imulq	%r15
	movq	%r8, %rax
	sarq	$63, %rax
	addq	%r8, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %r8
	movq	%r8, 80(%rsp)
.L91:
	movq	32(%rsp), %rax
	subq	$3, %r13
	addq	$8, %r14
	subq	%r13, %rax
	cmpq	%rax, 48(%rsp)
	jge	.L97
.L78:
	addq	$1, 96(%rsp)
	movq	96(%rsp), %rax
	addq	$1, 32(%rsp)
	addq	$8, 40(%rsp)
	subq	$8, 120(%rsp)
	cmpq	128(%rsp), %rax
	jne	.L98
.L77:
	movq	80(%rsp), %rdx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L76:
	movq	184(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L138
	addq	$200, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L92:
	.cfi_restore_state
	movq	104(%rsp), %rax
	movq	112(%rsp), %rdi
	movl	$30, %r9d
	movl	$1, %ecx
	movq	-8(%rax,%r13,8), %rbx
	leaq	factorial(%rip), %rax
	movq	(%rax,%rdi,8), %rsi
	movl	$1000000005, %edi
	.p2align 4,,10
	.p2align 3
.L94:
	testb	$1, %dil
	je	.L93
	imulq	%rsi, %rcx
	movq	%rcx, %rax
	movq	%rcx, %r10
	imulq	%r15
	movq	%r10, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%r10, %rcx
	subq	%rax, %rcx
.L93:
	imulq	%rsi, %rsi
	sarq	%rdi
	movq	%rsi, %rax
	movq	%rsi, %r10
	mulq	%r15
	movq	%rdx, %rsi
	shrq	$29, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%r10, %rsi
	subq	%rax, %rsi
	subl	$1, %r9d
	jne	.L94
	leaq	factorial(%rip), %rax
	movl	$30, %r10d
	movl	$1, %edi
	movl	$1000000005, %r9d
	movq	(%rax,%r13,8), %rsi
	.p2align 4,,10
	.p2align 3
.L96:
	testb	$1, %r9b
	je	.L95
	imulq	%rsi, %rdi
	movq	%rdi, %rax
	movq	%rdi, %r11
	imulq	%r15
	movq	%r11, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rdi
	sarq	$29, %rdi
	subq	%rax, %rdi
	imulq	$1000000007, %rdi, %rax
	movq	%r11, %rdi
	subq	%rax, %rdi
.L95:
	imulq	%rsi, %rsi
	sarq	%r9
	movq	%rsi, %rax
	movq	%rsi, %r11
	mulq	%r15
	movq	%rdx, %rsi
	shrq	$29, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%r11, %rsi
	subq	%rax, %rsi
	subl	$1, %r10d
	jne	.L96
	imulq	%rdi, %rcx
	movq	%rcx, %rax
	movq	%rcx, %rsi
	imulq	%r15
	sarq	$63, %rsi
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	subq	%rsi, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rcx
	imulq	%rbx, %rcx
	movq	%rcx, %rax
	movq	%rcx, %rsi
	imulq	%r15
	sarq	$63, %rsi
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	subq	%rsi, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rcx
	imulq	%r8, %rcx
	movq	%rcx, %rax
	movq	%rcx, %rsi
	imulq	%r15
	sarq	$63, %rsi
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	subq	%rsi, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rcx
	addq	80(%rsp), %rcx
	movq	%rcx, %rax
	imulq	%r15
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, 80(%rsp)
	jmp	.L91
.L137:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L76
.L100:
	movq	$0, 80(%rsp)
	jmp	.L77
.L138:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE28:
	.size	main, .-main
	.globl	factorial
	.bss
	.align 32
	.type	factorial, @object
	.size	factorial, 4194304
factorial:
	.zero	4194304
	.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>
#define mod 1000000007

long long factorial[524288];

void cfact(){
    long long i;
    factorial[0]=1;
    factorial[1]=1;
    for(i=2;i<524288;i++){
        factorial[i]=factorial[i-1]*i;
        factorial[i]%=mod;
    }
}

long long power(long long a,long long b){
  long long x=1,y=a;
  while(b>0){
    if(b&1ll){
      x=(x*y)%mod;
    }
    y=(y*y)%mod;
    b>>=1;
  }
  return x%mod;
}
 
long long modular_inverse(long long n){
	return power(n,mod-2);
}

long long calcnCr(long long n,long long k){
	return (factorial[n]*(modular_inverse(factorial[k])*modular_inverse(factorial[n-k])%mod))%mod;
}

long long calc(long long a,long long b,long long c,long long d){
  long long n=a+b+c+d,r;
  r=calcnCr(n,a);
  r*=calcnCr(n-a,b);r%=mod;
  r*=calcnCr(n-a-b,c);
  return r%mod;
}

int main(){
  cfact();
  long long n,a,b,c,r=0,w;
  long long alpha,beta,gamma,delta,sigma;
  scanf("%lld%lld%lld%lld",&n,&a,&b,&c);
  if(b%2==1){printf("0\n");return 0;}
  beta=b/2;
  for(alpha=0;alpha<=a;alpha++){
    gamma=a-alpha;
    for(delta=0;3*delta<=c;delta++){
      //printf("%lld %lld %lld %lld\n",alpha,beta,gamma,delta);
      w=calc(alpha,beta,gamma,delta);
      sigma=c-3*delta-gamma;
      if(sigma<0){continue;}
      if(beta==0){
        if(sigma==0){
          r+=w;r%=mod;
        }
      }
      else{
        r+=((w*calcnCr(sigma+(beta-1),beta-1))%mod);r%=mod;
      }
    }
  }
  printf("%lld\n",r);
  return 0;
}
3 1 2 0

2

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 mod 1000000007

long long factorial[524288];

void cfact(){
    long long i;
    factorial[0]=1;
    factorial[1]=1;
    for(i=2;i<524288;i++){
        factorial[i]=factorial[i-1]*i;
        factorial[i]%=mod;
    }
}

long long power(long long a,long long b){
  long long x=1,y=a;
  while(b>0){
    if(b&1ll){
      x=(x*y)%mod;
    }
    y=(y*y)%mod;
    b>>=1;
  }
  return x%mod;
}
 
long long modular_inverse(long long n){
	return power(n,mod-2);
}

long long calcnCr(long long n,long long k){
	return (factorial[n]*(modular_inverse(factorial[k])*modular_inverse(factorial[n-k])%mod))%mod;
}

long long calc(long long a,long long b,long long c,long long d){
  long long n=a+b+c+d,r;
  r=calcnCr(n,a);
  r*=calcnCr(n-a,b);r%=mod;
  r*=calcnCr(n-a-b,c);
  return r%mod;
}

int main(){
  cfact();
  long long n,a,b,c,r=0,w;
  long long alpha,beta,gamma,delta,sigma;
  scanf("%lld%lld%lld%lld",&n,&a,&b,&c);
  if(b%2==1){printf("0\n");return 0;}
  beta=b/2;
  for(alpha=0;alpha<=a;alpha++){
    gamma=a-alpha;
    for(delta=0;3*delta<=c;delta++){
      //printf("%lld %lld %lld %lld\n",alpha,beta,gamma,delta);
      w=calc(alpha,beta,gamma,delta);
      sigma=c-3*delta-gamma;
      if(sigma<0){continue;}
      if(beta==0){
        if(sigma==0){
          r+=w;r%=mod;
        }
      }
      else{
        r+=((w*calcnCr(sigma+(beta-1),beta-1))%mod);r%=mod;
      }
    }
  }
  printf("%lld\n",r);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	factorial
	.bss
	.align 32
	.type	factorial, @object
	.size	factorial, 4194304
factorial:
	.zero	4194304
	.text
	.globl	cfact
	.type	cfact, @function
cfact:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	$1, factorial(%rip)
	movq	$1, 8+factorial(%rip)
	movq	$2, -8(%rbp)
	jmp	.L2
.L3:
	movq	-8(%rbp), %rax
	subq	$1, %rax
	leaq	0(,%rax,8), %rdx
	leaq	factorial(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	-8(%rbp), %rax
	movq	-8(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	factorial(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	factorial(%rip), %rax
	movq	(%rdx,%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
	movq	-8(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	factorial(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addq	$1, -8(%rbp)
.L2:
	cmpq	$524287, -8(%rbp)
	jle	.L3
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	cfact, .-cfact
	.globl	power
	.type	power, @function
power:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	$1, -16(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -8(%rbp)
	jmp	.L5
.L7:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L6
	movq	-16(%rbp), %rax
	imulq	-8(%rbp), %rax
	movq	%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
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
.L6:
	movq	-8(%rbp), %rax
	imulq	%rax, %rax
	movq	%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
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	sarq	-32(%rbp)
.L5:
	cmpq	$0, -32(%rbp)
	jg	.L7
	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
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	power, .-power
	.globl	modular_inverse
	.type	modular_inverse, @function
modular_inverse:
.LFB2:
	.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)
	movq	-8(%rbp), %rax
	movl	$1000000005, %esi
	movq	%rax, %rdi
	call	power
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	modular_inverse, .-modular_inverse
	.globl	calcnCr
	.type	calcnCr, @function
calcnCr:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	factorial(%rip), %rax
	movq	(%rdx,%rax), %r12
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	factorial(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rdi
	call	modular_inverse
	movq	%rax, %rbx
	movq	-24(%rbp), %rax
	subq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	factorial(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rdi
	call	modular_inverse
	imulq	%rax, %rbx
	movq	%rbx, %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	%r12, %rcx
	imulq	%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
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	calcnCr, .-calcnCr
	.globl	calc
	.type	calc, @function
calc:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movq	%rcx, -48(%rbp)
	movq	-24(%rbp), %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	calcnCr
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	subq	-24(%rbp), %rax
	movq	-32(%rbp), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	calcnCr
	movq	-8(%rbp), %rdx
	imulq	%rdx, %rax
	movq	%rax, -8(%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
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	subq	-24(%rbp), %rax
	subq	-32(%rbp), %rax
	movq	-40(%rbp), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	calcnCr
	movq	-8(%rbp), %rdx
	imulq	%rdx, %rax
	movq	%rax, -8(%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
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	calc, .-calc
	.section	.rodata
.LC0:
	.string	"%lld%lld%lld%lld"
.LC1:
	.string	"0"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB5:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$96, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, %eax
	call	cfact
	movq	$0, -64(%rbp)
	leaq	-72(%rbp), %rsi
	leaq	-80(%rbp), %rcx
	leaq	-88(%rbp), %rdx
	leaq	-96(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-80(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	cmpq	$1, %rax
	jne	.L16
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L25
.L16:
	movq	-80(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -40(%rbp)
	movq	$0, -56(%rbp)
	jmp	.L18
.L24:
	movq	-88(%rbp), %rax
	subq	-56(%rbp), %rax
	movq	%rax, -32(%rbp)
	movq	$0, -48(%rbp)
	jmp	.L19
.L23:
	movq	-48(%rbp), %rcx
	movq	-32(%rbp), %rdx
	movq	-40(%rbp), %rsi
	movq	-56(%rbp), %rax
	movq	%rax, %rdi
	call	calc
	movq	%rax, -24(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, %rdx
	salq	$2, %rax
	subq	%rax, %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	subq	-32(%rbp), %rax
	movq	%rax, -16(%rbp)
	cmpq	$0, -16(%rbp)
	js	.L27
	cmpq	$0, -40(%rbp)
	jne	.L22
	cmpq	$0, -16(%rbp)
	jne	.L21
	movq	-24(%rbp), %rax
	addq	%rax, -64(%rbp)
	movq	-64(%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, -64(%rbp)
	jmp	.L21
.L22:
	movq	-40(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-40(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	calcnCr
	imulq	-24(%rbp), %rax
	movq	%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
	addq	%rax, -64(%rbp)
	movq	-64(%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, -64(%rbp)
	jmp	.L21
.L27:
	nop
.L21:
	addq	$1, -48(%rbp)
.L19:
	movq	-48(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rax, %rdx
	movq	-72(%rbp), %rax
	cmpq	%rax, %rdx
	jle	.L23
	addq	$1, -56(%rbp)
.L18:
	movq	-88(%rbp), %rax
	cmpq	%rax, -56(%rbp)
	jle	.L24
	movq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L25:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.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.
val
	.file	"temp.c"
	.text
	.globl	factorial
	.bss
	.align 32
	.type	factorial, @object
	.size	factorial, 4194304
factorial:
	.zero	4194304
	.text
	.globl	cfact
	.type	cfact, @function
cfact:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	$1, factorial(%rip)
	movq	$1, 8+factorial(%rip)
	movq	$2, -8(%rbp)
	jmp	.L2
.L3:
	movq	-8(%rbp), %rax
	subq	$1, %rax
	leaq	0(,%rax,8), %rdx
	leaq	factorial(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	-8(%rbp), %rax
	movq	-8(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	factorial(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	factorial(%rip), %rax
	movq	(%rdx,%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
	movq	-8(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	factorial(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addq	$1, -8(%rbp)
.L2:
	cmpq	$524287, -8(%rbp)
	jle	.L3
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	cfact, .-cfact
	.globl	power
	.type	power, @function
power:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	$1, -16(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -8(%rbp)
	jmp	.L5
.L7:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L6
	movq	-16(%rbp), %rax
	imulq	-8(%rbp), %rax
	movq	%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
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
.L6:
	movq	-8(%rbp), %rax
	imulq	%rax, %rax
	movq	%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
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	sarq	-32(%rbp)
.L5:
	cmpq	$0, -32(%rbp)
	jg	.L7
	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
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	power, .-power
	.globl	modular_inverse
	.type	modular_inverse, @function
modular_inverse:
.LFB2:
	.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)
	movq	-8(%rbp), %rax
	movl	$1000000005, %esi
	movq	%rax, %rdi
	call	power
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	modular_inverse, .-modular_inverse
	.globl	calcnCr
	.type	calcnCr, @function
calcnCr:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	factorial(%rip), %rax
	movq	(%rdx,%rax), %r12
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	factorial(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rdi
	call	modular_inverse
	movq	%rax, %rbx
	movq	-24(%rbp), %rax
	subq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	factorial(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rdi
	call	modular_inverse
	imulq	%rax, %rbx
	movq	%rbx, %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	%r12, %rcx
	imulq	%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
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	calcnCr, .-calcnCr
	.globl	calc
	.type	calc, @function
calc:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movq	%rcx, -48(%rbp)
	movq	-24(%rbp), %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	calcnCr
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	subq	-24(%rbp), %rax
	movq	-32(%rbp), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	calcnCr
	movq	-8(%rbp), %rdx
	imulq	%rdx, %rax
	movq	%rax, -8(%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
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	subq	-24(%rbp), %rax
	subq	-32(%rbp), %rax
	movq	-40(%rbp), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	calcnCr
	movq	-8(%rbp), %rdx
	imulq	%rdx, %rax
	movq	%rax, -8(%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
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	calc, .-calc
	.section	.rodata
.LC0:
	.string	"%lld%lld%lld%lld"
.LC1:
	.string	"0"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB5:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$96, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, %eax
	call	cfact
	movq	$0, -64(%rbp)
	leaq	-72(%rbp), %rsi
	leaq	-80(%rbp), %rcx
	leaq	-88(%rbp), %rdx
	leaq	-96(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-80(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	cmpq	$1, %rax
	jne	.L16
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L25
.L16:
	movq	-80(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -40(%rbp)
	movq	$0, -56(%rbp)
	jmp	.L18
.L24:
	movq	-88(%rbp), %rax
	subq	-56(%rbp), %rax
	movq	%rax, -32(%rbp)
	movq	$0, -48(%rbp)
	jmp	.L19
.L23:
	movq	-48(%rbp), %rcx
	movq	-32(%rbp), %rdx
	movq	-40(%rbp), %rsi
	movq	-56(%rbp), %rax
	movq	%rax, %rdi
	call	calc
	movq	%rax, -24(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, %rdx
	salq	$2, %rax
	subq	%rax, %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	subq	-32(%rbp), %rax
	movq	%rax, -16(%rbp)
	cmpq	$0, -16(%rbp)
	js	.L27
	cmpq	$0, -40(%rbp)
	jne	.L22
	cmpq	$0, -16(%rbp)
	jne	.L21
	movq	-24(%rbp), %rax
	addq	%rax, -64(%rbp)
	movq	-64(%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, -64(%rbp)
	jmp	.L21
.L22:
	movq	-40(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-40(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	calcnCr
	imulq	-24(%rbp), %rax
	movq	%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
	addq	%rax, -64(%rbp)
	movq	-64(%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, -64(%rbp)
	jmp	.L21
.L27:
	nop
.L21:
	addq	$1, -48(%rbp)
.L19:
	movq	-48(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rax, %rdx
	movq	-72(%rbp), %rax
	cmpq	%rax, %rdx
	jle	.L23
	addq	$1, -56(%rbp)
.L18:
	movq	-88(%rbp), %rax
	cmpq	%rax, -56(%rbp)
	jle	.L24
	movq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L25:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.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:
