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

```c
#include<stdio.h>
int main(){
  int a,b,i,M=1e9+7;
  long long s,d[100010]={1,1};
  for(i=1;i<100005;i++)d[i]=(d[i-1]*i)%M;
  scanf("%d %d",&a,&b);
  s=(d[a]*d[b])%M;
  if(a-b<-1||1<a-b)s*=0;
  if(a==b)s=(s*2)%M;
  printf("%lld\n",s);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1408, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1000000007, -800108(%rbp)
	leaq	-800096(%rbp), %rax
	movl	$800080, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$1, -800096(%rbp)
	movq	$1, -800088(%rbp)
	movl	$1, -800112(%rbp)
	jmp	.L2
.L3:
	movl	-800112(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rdx
	movl	-800112(%rbp), %eax
	cltq
	imulq	%rdx, %rax
	movl	-800108(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movl	-800112(%rbp), %eax
	cltq
	movq	%rdx, -800096(%rbp,%rax,8)
	addl	$1, -800112(%rbp)
.L2:
	cmpl	$100004, -800112(%rbp)
	jle	.L3
	leaq	-800116(%rbp), %rdx
	leaq	-800120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-800120(%rbp), %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rdx
	movl	-800116(%rbp), %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rax
	imulq	%rdx, %rax
	movl	-800108(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -800104(%rbp)
	movl	-800120(%rbp), %eax
	movl	-800116(%rbp), %edx
	subl	%edx, %eax
	cmpl	$-1, %eax
	jl	.L4
	movl	-800120(%rbp), %eax
	movl	-800116(%rbp), %edx
	subl	%edx, %eax
	cmpl	$1, %eax
	jle	.L5
.L4:
	movq	$0, -800104(%rbp)
.L5:
	movl	-800120(%rbp), %edx
	movl	-800116(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L6
	movq	-800104(%rbp), %rax
	addq	%rax, %rax
	movl	-800108(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -800104(%rbp)
.L6:
	movq	-800104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798728
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1400, %rsp
	.cfi_def_cfa_offset 800128
	movl	$800080, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 800104(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	call	memset@PLT
	movl	$1, %ecx
	movl	$1, %edx
	movdqa	.LC0(%rip), %xmm0
	movabsq	$-8543223828751151131, %r8
	movq	%rax, %rdi
	movaps	%xmm0, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rdx, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	imulq	%r8
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rsi
	movq	%rsi, (%rdi,%rcx,8)
	addq	$1, %rcx
	movq	%rsi, %rdx
	cmpq	$100005, %rcx
	jne	.L2
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movslq	8(%rsp), %rax
	movslq	12(%rsp), %rdx
	movq	%rax, %rsi
	movq	16(%rsp,%rdx,8), %r8
	movq	%rdx, %rcx
	movq	16(%rsp,%rax,8), %rax
	movl	%esi, %edi
	subl	%edx, %edi
	xorl	%edx, %edx
	addl	$1, %edi
	cmpl	$2, %edi
	ja	.L3
	imulq	%r8, %rax
	movl	$1000000007, %edi
	cqto
	idivq	%rdi
.L3:
	cmpl	%ecx, %esi
	jne	.L4
	leaq	(%rdx,%rdx), %rax
	movl	$1000000007, %ecx
	cqto
	idivq	%rcx
.L4:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L10
	xorl	%eax, %eax
	addq	$800120, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798728
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1400, %rsp
	.cfi_def_cfa_offset 800128
	movl	$800080, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 800104(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	call	memset@PLT
	movl	$1, %ecx
	movl	$1, %edx
	movdqa	.LC0(%rip), %xmm0
	movabsq	$-8543223828751151131, %r8
	movq	%rax, %rdi
	movaps	%xmm0, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rdx, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	imulq	%r8
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rsi
	movq	%rsi, (%rdi,%rcx,8)
	addq	$1, %rcx
	movq	%rsi, %rdx
	cmpq	$100005, %rcx
	jne	.L2
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movslq	8(%rsp), %rax
	movslq	12(%rsp), %rdx
	movq	%rax, %rsi
	movq	16(%rsp,%rdx,8), %r8
	movq	%rdx, %rcx
	movq	16(%rsp,%rax,8), %rax
	movl	%esi, %edi
	subl	%edx, %edi
	xorl	%edx, %edx
	addl	$1, %edi
	cmpl	$2, %edi
	ja	.L3
	imulq	%r8, %rax
	movl	$1000000007, %edi
	cqto
	idivq	%rdi
.L3:
	cmpl	%ecx, %esi
	jne	.L4
	leaq	(%rdx,%rdx), %rax
	movl	$1000000007, %ecx
	cqto
	idivq	%rcx
.L4:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L10
	xorl	%eax, %eax
	addq	$800120, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.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>
int main(){
  int a,b,i,M=1e9+7;
  long long s,d[100010]={1,1};
  for(i=1;i<100005;i++)d[i]=(d[i-1]*i)%M;
  scanf("%d %d",&a,&b);
  s=(d[a]*d[b])%M;
  if(a-b<-1||1<a-b)s*=0;
  if(a==b)s=(s*2)%M;
  printf("%lld\n",s);
  return 0;
}

100010 100000
 3 4
 1 2
 4 4
 2 3
 000011 000010
 001010 001011
 000101 000101
 000110 000111
 001111 001110

0
 144
 2
 1152
 12
 82826050
 931093537
 414723868
 399920258
 292820538

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

```c
#include<stdio.h>
int main(){
  int a,b,i,M=1e9+7;
  long long s,d[100010]={1,1};
  for(i=1;i<100005;i++)d[i]=(d[i-1]*i)%M;
  scanf("%d %d",&a,&b);
  s=(d[a]*d[b])%M;
  if(a-b<-1||1<a-b)s*=0;
  if(a==b)s=(s*2)%M;
  printf("%lld\n",s);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1408, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1000000007, -800108(%rbp)
	leaq	-800096(%rbp), %rax
	movl	$800080, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$1, -800096(%rbp)
	movq	$1, -800088(%rbp)
	movl	$1, -800112(%rbp)
	jmp	.L2
.L3:
	movl	-800112(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rdx
	movl	-800112(%rbp), %eax
	cltq
	imulq	%rdx, %rax
	movl	-800108(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movl	-800112(%rbp), %eax
	cltq
	movq	%rdx, -800096(%rbp,%rax,8)
	addl	$1, -800112(%rbp)
.L2:
	cmpl	$100004, -800112(%rbp)
	jle	.L3
	leaq	-800116(%rbp), %rdx
	leaq	-800120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-800120(%rbp), %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rdx
	movl	-800116(%rbp), %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rax
	imulq	%rdx, %rax
	movl	-800108(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -800104(%rbp)
	movl	-800120(%rbp), %eax
	movl	-800116(%rbp), %edx
	subl	%edx, %eax
	cmpl	$-1, %eax
	jl	.L4
	movl	-800120(%rbp), %eax
	movl	-800116(%rbp), %edx
	subl	%edx, %eax
	cmpl	$1, %eax
	jle	.L5
.L4:
	movq	$0, -800104(%rbp)
.L5:
	movl	-800120(%rbp), %edx
	movl	-800116(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L6
	movq	-800104(%rbp), %rax
	addq	%rax, %rax
	movl	-800108(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -800104(%rbp)
.L6:
	movq	-800104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1408, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1000000007, -800108(%rbp)
	leaq	-800096(%rbp), %rax
	movl	$800080, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$1, -800096(%rbp)
	movq	$1, -800088(%rbp)
	movl	$1, -800112(%rbp)
	jmp	.L2
.L3:
	movl	-800112(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rdx
	movl	-800112(%rbp), %eax
	cltq
	imulq	%rdx, %rax
	movl	-800108(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movl	-800112(%rbp), %eax
	cltq
	movq	%rdx, -800096(%rbp,%rax,8)
	addl	$1, -800112(%rbp)
.L2:
	cmpl	$100004, -800112(%rbp)
	jle	.L3
	leaq	-800116(%rbp), %rdx
	leaq	-800120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-800120(%rbp), %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rdx
	movl	-800116(%rbp), %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rax
	imulq	%rdx, %rax
	movl	-800108(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -800104(%rbp)
	movl	-800120(%rbp), %eax
	movl	-800116(%rbp), %edx
	subl	%edx, %eax
	cmpl	$-1, %eax
	jl	.L4
	movl	-800120(%rbp), %eax
	movl	-800116(%rbp), %edx
	subl	%edx, %eax
	cmpl	$1, %eax
	jle	.L5
.L4:
	movq	$0, -800104(%rbp)
.L5:
	movl	-800120(%rbp), %edx
	movl	-800116(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L6
	movq	-800104(%rbp), %rax
	addq	%rax, %rax
	movl	-800108(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -800104(%rbp)
.L6:
	movq	-800104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
