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>

long long cal(long long x , long long y) 
{
      long long ans = 1 ;
      for (int i = 0; i < y; i++) {
          ans = (ans*x)%1000000007 ;
      }
      return ans ;
}

int main(){
      long long n ;
      scanf("%lld", &n) ;
      long long a ;
      a = cal(10, n)-cal(9, n)-cal(9, n)+cal(8, n) ;
      a = a%1000000007 ;
      a = (a+1000000007)%1000000007 ;
      printf("%lld", a) ;
      return 0 ;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cal
	.type	cal, @function
cal:
.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	%rsi, -32(%rbp)
	movq	$1, -8(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L2
.L3:
	movq	-8(%rbp), %rax
	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
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	addl	$1, -12(%rbp)
.L2:
	movl	-12(%rbp), %eax
	cltq
	cmpq	%rax, -32(%rbp)
	jg	.L3
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	cal, .-cal
	.section	.rodata
.LC0:
	.string	"%lld"
	.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	$40, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movl	$10, %edi
	call	cal
	movq	%rax, %rbx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movl	$9, %edi
	call	cal
	subq	%rax, %rbx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movl	$9, %edi
	call	cal
	subq	%rax, %rbx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movl	$8, %edi
	call	cal
	addq	%rbx, %rax
	movq	%rax, -32(%rbp)
	movq	-32(%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, -32(%rbp)
	movq	-32(%rbp), %rax
	leaq	1000000007(%rax), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -32(%rbp)
	movq	-32(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -32(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	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	cal
	.type	cal, @function
cal:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdi, %r8
	testq	%rsi, %rsi
	jle	.L4
	xorl	%edi, %edi
	movl	$1, %eax
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L3:
	imulq	%r8, %rax
	addl	$1, %edi
	movq	%rax, %rcx
	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
	cmpl	%esi, %edi
	jne	.L3
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	cal, .-cal
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rbp
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rsi
	testq	%rsi, %rsi
	jle	.L16
	xorl	%r8d, %r8d
	movl	$1, %ecx
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L9:
	leaq	(%rcx,%rcx,4), %rdi
	addl	$1, %r8d
	addq	%rdi, %rdi
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%rdi, %rcx
	subq	%rax, %rcx
	cmpl	%esi, %r8d
	jne	.L9
	xorl	%r8d, %r8d
	movl	$1, %edx
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	(%rdx,%rdx,8), %rdi
	addl	$1, %r8d
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	addq	%rdi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rdx
	cmpl	%esi, %r8d
	jne	.L10
	subq	%rdi, %rcx
	xorl	%r8d, %r8d
	movl	$1, %edx
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	(%rdx,%rdx,8), %rdi
	addl	$1, %r8d
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	addq	%rdi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rdx
	cmpl	%esi, %r8d
	jne	.L12
	subq	%rdi, %rcx
	xorl	%r8d, %r8d
	movl	$1, %edx
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L14:
	leaq	0(,%rdx,8), %rdi
	addl	$1, %r8d
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	addq	%rdi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rdx
	cmpl	%esi, %r8d
	jne	.L14
.L8:
	addq	%rdx, %rcx
	movl	$1, %edi
	movabsq	$-8543223828751151131, %rsi
	movq	%rcx, %rax
	imulq	%rsi
	leaq	(%rdx,%rcx), %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rcx
	leaq	1000000007(%rcx), %rcx
	movq	%rcx, %rax
	mulq	%rsi
	xorl	%eax, %eax
	movq	%rdx, %rsi
	shrq	$29, %rsi
	imulq	$1000000007, %rsi, %rsi
	subq	%rsi, %rcx
	movq	%rbp, %rsi
	movq	%rcx, %rdx
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L16:
	.cfi_restore_state
	orq	$-1, %rcx
	movl	$1, %edx
	jmp	.L8
.L25:
	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	cal
	.type	cal, @function
cal:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdi, %r8
	testq	%rsi, %rsi
	jle	.L4
	xorl	%edi, %edi
	movl	$1, %eax
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L3:
	imulq	%r8, %rax
	addl	$1, %edi
	movq	%rax, %rcx
	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
	cmpl	%esi, %edi
	jne	.L3
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	cal, .-cal
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rbp
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rsi
	testq	%rsi, %rsi
	jle	.L16
	xorl	%r8d, %r8d
	movl	$1, %ecx
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L9:
	leaq	(%rcx,%rcx,4), %rdi
	addl	$1, %r8d
	addq	%rdi, %rdi
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%rdi, %rcx
	subq	%rax, %rcx
	cmpl	%esi, %r8d
	jne	.L9
	xorl	%r8d, %r8d
	movl	$1, %edx
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	(%rdx,%rdx,8), %rdi
	addl	$1, %r8d
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	addq	%rdi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rdx
	cmpl	%esi, %r8d
	jne	.L10
	subq	%rdi, %rcx
	xorl	%r8d, %r8d
	movl	$1, %edx
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	(%rdx,%rdx,8), %rdi
	addl	$1, %r8d
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	addq	%rdi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rdx
	cmpl	%esi, %r8d
	jne	.L12
	subq	%rdi, %rcx
	xorl	%r8d, %r8d
	movl	$1, %edx
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L14:
	leaq	0(,%rdx,8), %rdi
	addl	$1, %r8d
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	addq	%rdi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rdx
	cmpl	%esi, %r8d
	jne	.L14
.L8:
	addq	%rdx, %rcx
	movl	$1, %edi
	movabsq	$-8543223828751151131, %rsi
	movq	%rcx, %rax
	imulq	%rsi
	leaq	(%rdx,%rcx), %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rcx
	leaq	1000000007(%rcx), %rcx
	movq	%rcx, %rax
	mulq	%rsi
	xorl	%eax, %eax
	movq	%rdx, %rsi
	shrq	$29, %rsi
	imulq	$1000000007, %rsi, %rsi
	subq	%rsi, %rcx
	movq	%rbp, %rsi
	movq	%rcx, %rdx
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L16:
	.cfi_restore_state
	orq	$-1, %rcx
	movl	$1, %edx
	jmp	.L8
.L25:
	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>

long long cal(long long x , long long y) 
{
      long long ans = 1 ;
      for (int i = 0; i < y; i++) {
          ans = (ans*x)%1000000007 ;
      }
      return ans ;
}

int main(){
      long long n ;
      scanf("%lld", &n) ;
      long long a ;
      a = cal(10, n)-cal(9, n)-cal(9, n)+cal(8, n) ;
      a = a%1000000007 ;
      a = (a+1000000007)%1000000007 ;
      printf("%lld", a) ;
      return 0 ;
}
226564
 0
 3
 241465
 5
 127499
 10
 99752
 7
 112403

498733826 0 54 202510248 14670 463923590 100172994 794180853 2531214 286663221
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>

long long cal(long long x , long long y) 
{
      long long ans = 1 ;
      for (int i = 0; i < y; i++) {
          ans = (ans*x)%1000000007 ;
      }
      return ans ;
}

int main(){
      long long n ;
      scanf("%lld", &n) ;
      long long a ;
      a = cal(10, n)-cal(9, n)-cal(9, n)+cal(8, n) ;
      a = a%1000000007 ;
      a = (a+1000000007)%1000000007 ;
      printf("%lld", a) ;
      return 0 ;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cal
	.type	cal, @function
cal:
.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	%rsi, -32(%rbp)
	movq	$1, -8(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L2
.L3:
	movq	-8(%rbp), %rax
	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
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	addl	$1, -12(%rbp)
.L2:
	movl	-12(%rbp), %eax
	cltq
	cmpq	%rax, -32(%rbp)
	jg	.L3
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	cal, .-cal
	.section	.rodata
.LC0:
	.string	"%lld"
	.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	$40, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movl	$10, %edi
	call	cal
	movq	%rax, %rbx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movl	$9, %edi
	call	cal
	subq	%rax, %rbx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movl	$9, %edi
	call	cal
	subq	%rax, %rbx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movl	$8, %edi
	call	cal
	addq	%rbx, %rax
	movq	%rax, -32(%rbp)
	movq	-32(%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, -32(%rbp)
	movq	-32(%rbp), %rax
	leaq	1000000007(%rax), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -32(%rbp)
	movq	-32(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -32(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	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	cal
	.type	cal, @function
cal:
.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	%rsi, -32(%rbp)
	movq	$1, -8(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L2
.L3:
	movq	-8(%rbp), %rax
	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
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	addl	$1, -12(%rbp)
.L2:
	movl	-12(%rbp), %eax
	cltq
	cmpq	%rax, -32(%rbp)
	jg	.L3
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	cal, .-cal
	.section	.rodata
.LC0:
	.string	"%lld"
	.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	$40, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movl	$10, %edi
	call	cal
	movq	%rax, %rbx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movl	$9, %edi
	call	cal
	subq	%rax, %rbx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movl	$9, %edi
	call	cal
	subq	%rax, %rbx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movl	$8, %edi
	call	cal
	addq	%rbx, %rax
	movq	%rax, -32(%rbp)
	movq	-32(%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, -32(%rbp)
	movq	-32(%rbp), %rax
	leaq	1000000007(%rax), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -32(%rbp)
	movq	-32(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -32(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	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:
