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

long fack(long n){
  long k = n;
  long result = 1;
  if(n == 0){
    result = 1;
  }else{
    for(;k > 0;){
      result = (result * k)%FUCK;
      //printf("%ld#",result);
      k--;
    }
  }
  return result;
}

int main(){
  long n=0;
  long m=0;
  long i=0;
  long combcnt = -1;
  scanf("%ld %ld",&n,&m);
  if(n == m+1 || n+1 == m){
    combcnt = (fack(n)*fack(m))%FUCK;
  }else if(n == m){
    combcnt = (2*fack(n)*fack(n))%FUCK;
  }else{
    combcnt  =0;
  }
  
  //printf("%ld#",fack(6));
  printf("%ld",combcnt);
  return 0;
}
    ```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	fack
	.type	fack, @function
fack:
.LFB0:
	.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	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	$1, -8(%rbp)
	cmpq	$0, -24(%rbp)
	jne	.L4
	movq	$1, -8(%rbp)
	jmp	.L3
.L5:
	movq	-8(%rbp), %rax
	imulq	-16(%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, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	subq	$1, -16(%rbp)
.L4:
	cmpq	$0, -16(%rbp)
	jg	.L5
.L3:
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	fack, .-fack
	.section	.rodata
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%ld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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	$56, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -32(%rbp)
	movq	$-1, -40(%rbp)
	leaq	-48(%rbp), %rdx
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-48(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-56(%rbp), %rax
	cmpq	%rax, %rdx
	je	.L8
	movq	-56(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-48(%rbp), %rax
	cmpq	%rax, %rdx
	jne	.L9
.L8:
	movq	-56(%rbp), %rax
	movq	%rax, %rdi
	call	fack
	movq	%rax, %rbx
	movq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	fack
	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
	movq	%rax, -40(%rbp)
	movq	-40(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -40(%rbp)
	jmp	.L10
.L9:
	movq	-56(%rbp), %rdx
	movq	-48(%rbp), %rax
	cmpq	%rax, %rdx
	jne	.L11
	movq	-56(%rbp), %rax
	movq	%rax, %rdi
	call	fack
	movq	%rax, %rbx
	movq	-56(%rbp), %rax
	movq	%rax, %rdi
	call	fack
	imulq	%rbx, %rax
	leaq	(%rax,%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, -40(%rbp)
	movq	-40(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -40(%rbp)
	jmp	.L10
.L11:
	movq	$0, -40(%rbp)
.L10:
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	fack
	.type	fack, @function
fack:
.LFB23:
	.cfi_startproc
	endbr64
	movl	$1, %eax
	testq	%rdi, %rdi
	jle	.L4
	movabsq	$-8543223828751151131, %rsi
	.p2align 4,,10
	.p2align 3
.L3:
	imulq	%rdi, %rax
	movq	%rax, %rcx
	mulq	%rsi
	movq	%rdx, %rax
	shrq	$29, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	subq	$1, %rdi
	jne	.L3
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	ret
	.cfi_endproc
.LFE23:
	.size	fack, .-fack
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	movq	$0, 8(%rsp)
	movq	$0, 16(%rsp)
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rdi
	movq	8(%rsp), %rcx
	leaq	1(%rdi), %rax
	cmpq	%rcx, %rax
	je	.L8
	leaq	1(%rcx), %rax
	cmpq	%rax, %rdi
	je	.L8
	xorl	%edx, %edx
	cmpq	%rcx, %rdi
	je	.L26
.L14:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	movl	$1, %esi
	testq	%rcx, %rcx
	jle	.L10
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L11:
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %r8
	mulq	%r9
	movq	%rdx, %rsi
	shrq	$29, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%r8, %rsi
	subq	%rax, %rsi
	subq	$1, %rcx
	jne	.L11
.L10:
	movl	$1, %edx
	testq	%rdi, %rdi
	jle	.L12
	movabsq	$-8543223828751151131, %r8
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rdx, %rcx
	imulq	%rdi, %rcx
	movq	%rcx, %rax
	mulq	%r8
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	subq	$1, %rdi
	jne	.L13
.L12:
	movq	%rdx, %rax
	movl	$1000000007, %ecx
	imulq	%rsi, %rax
	cqto
	idivq	%rcx
	jmp	.L14
.L26:
	movl	$1, %edx
	testq	%rcx, %rcx
	jle	.L15
	movl	$1000000007, %esi
.L16:
	movq	%rdx, %rax
	imulq	%rcx, %rax
	cqto
	idivq	%rsi
	subq	$1, %rcx
	jne	.L16
.L15:
	movq	%rdx, %rax
	movl	$1000000007, %ecx
	imulq	%rdx, %rax
	addq	%rax, %rax
	cqto
	idivq	%rcx
	jmp	.L14
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	fack
	.type	fack, @function
fack:
.LFB23:
	.cfi_startproc
	endbr64
	movl	$1, %eax
	testq	%rdi, %rdi
	jle	.L4
	movabsq	$-8543223828751151131, %rsi
	.p2align 4,,10
	.p2align 3
.L3:
	imulq	%rdi, %rax
	movq	%rax, %rcx
	mulq	%rsi
	movq	%rdx, %rax
	shrq	$29, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	subq	$1, %rdi
	jne	.L3
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	ret
	.cfi_endproc
.LFE23:
	.size	fack, .-fack
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	movq	$0, 8(%rsp)
	movq	$0, 16(%rsp)
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rdi
	movq	8(%rsp), %rcx
	leaq	1(%rdi), %rax
	cmpq	%rcx, %rax
	je	.L8
	leaq	1(%rcx), %rax
	cmpq	%rax, %rdi
	je	.L8
	xorl	%edx, %edx
	cmpq	%rcx, %rdi
	je	.L26
.L14:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	movl	$1, %esi
	testq	%rcx, %rcx
	jle	.L10
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L11:
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %r8
	mulq	%r9
	movq	%rdx, %rsi
	shrq	$29, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%r8, %rsi
	subq	%rax, %rsi
	subq	$1, %rcx
	jne	.L11
.L10:
	movl	$1, %edx
	testq	%rdi, %rdi
	jle	.L12
	movabsq	$-8543223828751151131, %r8
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rdx, %rcx
	imulq	%rdi, %rcx
	movq	%rcx, %rax
	mulq	%r8
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	subq	$1, %rdi
	jne	.L13
.L12:
	movq	%rdx, %rax
	movl	$1000000007, %ecx
	imulq	%rsi, %rax
	cqto
	idivq	%rcx
	jmp	.L14
.L26:
	movl	$1, %edx
	testq	%rcx, %rcx
	jle	.L15
	movl	$1000000007, %esi
.L16:
	movq	%rdx, %rax
	imulq	%rcx, %rax
	cqto
	idivq	%rsi
	subq	$1, %rcx
	jne	.L16
.L15:
	movq	%rdx, %rax
	movl	$1000000007, %ecx
	imulq	%rdx, %rax
	addq	%rax, %rax
	cqto
	idivq	%rcx
	jmp	.L14
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>

#define FUCK 1000000007

long fack(long n){
  long k = n;
  long result = 1;
  if(n == 0){
    result = 1;
  }else{
    for(;k > 0;){
      result = (result * k)%FUCK;
      //printf("%ld#",result);
      k--;
    }
  }
  return result;
}

int main(){
  long n=0;
  long m=0;
  long i=0;
  long combcnt = -1;
  scanf("%ld %ld",&n,&m);
  if(n == m+1 || n+1 == m){
    combcnt = (fack(n)*fack(m))%FUCK;
  }else if(n == m){
    combcnt = (2*fack(n)*fack(n))%FUCK;
  }else{
    combcnt  =0;
  }
  
  //printf("%ld#",fack(6));
  printf("%ld",combcnt);
  return 0;
}
    
2 2

8
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 FUCK 1000000007

long fack(long n){
  long k = n;
  long result = 1;
  if(n == 0){
    result = 1;
  }else{
    for(;k > 0;){
      result = (result * k)%FUCK;
      //printf("%ld#",result);
      k--;
    }
  }
  return result;
}

int main(){
  long n=0;
  long m=0;
  long i=0;
  long combcnt = -1;
  scanf("%ld %ld",&n,&m);
  if(n == m+1 || n+1 == m){
    combcnt = (fack(n)*fack(m))%FUCK;
  }else if(n == m){
    combcnt = (2*fack(n)*fack(n))%FUCK;
  }else{
    combcnt  =0;
  }
  
  //printf("%ld#",fack(6));
  printf("%ld",combcnt);
  return 0;
}
    ```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	fack
	.type	fack, @function
fack:
.LFB0:
	.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	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	$1, -8(%rbp)
	cmpq	$0, -24(%rbp)
	jne	.L4
	movq	$1, -8(%rbp)
	jmp	.L3
.L5:
	movq	-8(%rbp), %rax
	imulq	-16(%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, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	subq	$1, -16(%rbp)
.L4:
	cmpq	$0, -16(%rbp)
	jg	.L5
.L3:
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	fack, .-fack
	.section	.rodata
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%ld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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	$56, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -32(%rbp)
	movq	$-1, -40(%rbp)
	leaq	-48(%rbp), %rdx
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-48(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-56(%rbp), %rax
	cmpq	%rax, %rdx
	je	.L8
	movq	-56(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-48(%rbp), %rax
	cmpq	%rax, %rdx
	jne	.L9
.L8:
	movq	-56(%rbp), %rax
	movq	%rax, %rdi
	call	fack
	movq	%rax, %rbx
	movq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	fack
	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
	movq	%rax, -40(%rbp)
	movq	-40(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -40(%rbp)
	jmp	.L10
.L9:
	movq	-56(%rbp), %rdx
	movq	-48(%rbp), %rax
	cmpq	%rax, %rdx
	jne	.L11
	movq	-56(%rbp), %rax
	movq	%rax, %rdi
	call	fack
	movq	%rax, %rbx
	movq	-56(%rbp), %rax
	movq	%rax, %rdi
	call	fack
	imulq	%rbx, %rax
	leaq	(%rax,%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, -40(%rbp)
	movq	-40(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -40(%rbp)
	jmp	.L10
.L11:
	movq	$0, -40(%rbp)
.L10:
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	fack
	.type	fack, @function
fack:
.LFB0:
	.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	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	$1, -8(%rbp)
	cmpq	$0, -24(%rbp)
	jne	.L4
	movq	$1, -8(%rbp)
	jmp	.L3
.L5:
	movq	-8(%rbp), %rax
	imulq	-16(%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, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	subq	$1, -16(%rbp)
.L4:
	cmpq	$0, -16(%rbp)
	jg	.L5
.L3:
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	fack, .-fack
	.section	.rodata
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%ld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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	$56, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -32(%rbp)
	movq	$-1, -40(%rbp)
	leaq	-48(%rbp), %rdx
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-48(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-56(%rbp), %rax
	cmpq	%rax, %rdx
	je	.L8
	movq	-56(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-48(%rbp), %rax
	cmpq	%rax, %rdx
	jne	.L9
.L8:
	movq	-56(%rbp), %rax
	movq	%rax, %rdi
	call	fack
	movq	%rax, %rbx
	movq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	fack
	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
	movq	%rax, -40(%rbp)
	movq	-40(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -40(%rbp)
	jmp	.L10
.L9:
	movq	-56(%rbp), %rdx
	movq	-48(%rbp), %rax
	cmpq	%rax, %rdx
	jne	.L11
	movq	-56(%rbp), %rax
	movq	%rax, %rdi
	call	fack
	movq	%rax, %rbx
	movq	-56(%rbp), %rax
	movq	%rax, %rdi
	call	fack
	imulq	%rbx, %rax
	leaq	(%rax,%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, -40(%rbp)
	movq	-40(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -40(%rbp)
	jmp	.L10
.L11:
	movq	$0, -40(%rbp)
.L10:
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
