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

```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>

#define mod 1000000007

long long int inv(long long int n) {
    long long int ans = 1;
    while (n > 1) {
        ans = ans * (mod - mod / n) % mod;
        n = mod % n;
    }
    return ans;
}

int main() {
    int n = 0, a = 0, b = 0, c = 0;
    scanf("%d %d %d %d", &n, &a, &b, &c);
    long long int comb[n];
    comb[0] = 1;
    for (long long int i=1; i<n; i++) {
        comb[i] = comb[i-1] * (n-1+i) % mod * inv(i%mod) % mod;
        comb[i] = comb[i] % mod;
    }
    long long int a_n = 1;
    long long int b_n = 1;
    for (int i=0; i<n; i++) {
        a_n = a_n * a % mod;
        b_n = b_n * b % mod;
    }
    long long int a_buf = 1;
    long long int b_buf = 1;
    long long int ans = 0;
    long long int deno = inv(100 - c);
    long long int inv_ab = inv(a+b);
    for (int i=0; i<n; i++) {
        deno = deno * inv_ab % mod;
    }
    for (long long int i=n; i<=n*2-1; i++) {
        long long int buf1 = a_n * b_buf % mod;
        long long int buf2 = a_buf * b_n % mod;
        long long int buf3 = (buf1 + buf2) % mod;
        ans += comb[i-n] * buf3 % mod * i % mod * deno % mod * 100 % mod;
        b_buf = b_buf * b % mod;
        a_buf = a_buf * a % mod;
        deno = deno * inv_ab % mod;
        ans = ans % mod;
    }
    printf("%lld\n", ans);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	inv
	.type	inv, @function
inv:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	$1, -8(%rbp)
	jmp	.L2
.L3:
	movq	$-1000000007, %rax
	cqto
	idivq	-24(%rbp)
	addq	$1000000007, %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, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movl	$1000000007, %eax
	cqto
	idivq	-24(%rbp)
	movq	%rdx, -24(%rbp)
.L2:
	cmpq	$1, -24(%rbp)
	jg	.L3
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	inv, .-inv
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$160, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %r12
	movl	$0, -176(%rbp)
	movl	$0, -172(%rbp)
	movl	$0, -168(%rbp)
	movl	$0, -164(%rbp)
	leaq	-164(%rbp), %rsi
	leaq	-168(%rbp), %rcx
	leaq	-172(%rbp), %rdx
	leaq	-176(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-176(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -192(%rbp)
	movq	$0, -184(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	cltq
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L6:
	cmpq	%rdx, %rsp
	je	.L7
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L6
.L7:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L8
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L8:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -80(%rbp)
	movq	-80(%rbp), %rax
	movq	$1, (%rax)
	movq	$1, -152(%rbp)
	jmp	.L9
.L10:
	movq	-152(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-80(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	movl	-176(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rcx
	movq	-152(%rbp), %rdx
	addq	%rcx, %rdx
	imulq	%rdx, %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, %rbx
	imulq	$1000000007, %rbx, %rax
	movq	%rcx, %rbx
	subq	%rax, %rbx
	movq	-152(%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, %rdi
	call	inv
	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	-80(%rbp), %rdx
	movq	-152(%rbp), %rcx
	movq	%rax, (%rdx,%rcx,8)
	movq	-80(%rbp), %rax
	movq	-152(%rbp), %rdx
	movq	(%rax,%rdx,8), %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	-80(%rbp), %rdx
	movq	-152(%rbp), %rcx
	movq	%rax, (%rdx,%rcx,8)
	addq	$1, -152(%rbp)
.L9:
	movl	-176(%rbp), %eax
	cltq
	cmpq	%rax, -152(%rbp)
	jl	.L10
	movq	$1, -144(%rbp)
	movq	$1, -136(%rbp)
	movl	$0, -160(%rbp)
	jmp	.L11
.L12:
	movl	-172(%rbp), %eax
	cltq
	imulq	-144(%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, -144(%rbp)
	movq	-144(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -144(%rbp)
	movl	-168(%rbp), %eax
	cltq
	imulq	-136(%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, -136(%rbp)
	movq	-136(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -136(%rbp)
	addl	$1, -160(%rbp)
.L11:
	movl	-176(%rbp), %eax
	cmpl	%eax, -160(%rbp)
	jl	.L12
	movq	$1, -128(%rbp)
	movq	$1, -120(%rbp)
	movq	$0, -112(%rbp)
	movl	-164(%rbp), %edx
	movl	$100, %eax
	subl	%edx, %eax
	cltq
	movq	%rax, %rdi
	call	inv
	movq	%rax, -104(%rbp)
	movl	-172(%rbp), %edx
	movl	-168(%rbp), %eax
	addl	%edx, %eax
	cltq
	movq	%rax, %rdi
	call	inv
	movq	%rax, -72(%rbp)
	movl	$0, -156(%rbp)
	jmp	.L13
.L14:
	movq	-104(%rbp), %rax
	imulq	-72(%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, -104(%rbp)
	movq	-104(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -104(%rbp)
	addl	$1, -156(%rbp)
.L13:
	movl	-176(%rbp), %eax
	cmpl	%eax, -156(%rbp)
	jl	.L14
	movl	-176(%rbp), %eax
	cltq
	movq	%rax, -96(%rbp)
	jmp	.L15
.L16:
	movq	-144(%rbp), %rax
	imulq	-120(%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, -64(%rbp)
	movq	-64(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -64(%rbp)
	movq	-128(%rbp), %rax
	imulq	-136(%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, -56(%rbp)
	movq	-56(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -56(%rbp)
	movq	-64(%rbp), %rdx
	movq	-56(%rbp), %rax
	leaq	(%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
	movq	%rax, -48(%rbp)
	movq	-48(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -48(%rbp)
	movl	-176(%rbp), %eax
	movslq	%eax, %rcx
	movq	-96(%rbp), %rax
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-80(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	imulq	-48(%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
	imulq	-96(%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
	imulq	-104(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %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, -112(%rbp)
	movl	-168(%rbp), %eax
	cltq
	imulq	-120(%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, -120(%rbp)
	movq	-120(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -120(%rbp)
	movl	-172(%rbp), %eax
	cltq
	imulq	-128(%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, -128(%rbp)
	movq	-128(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -128(%rbp)
	movq	-104(%rbp), %rax
	imulq	-72(%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, -104(%rbp)
	movq	-104(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -104(%rbp)
	movq	-112(%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, -112(%rbp)
	addq	$1, -96(%rbp)
.L15:
	movl	-176(%rbp), %eax
	addl	%eax, %eax
	subl	$1, %eax
	cltq
	cmpq	%rax, -96(%rbp)
	jle	.L16
	movq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%r12, %rsp
	movq	-40(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	inv
	.type	inv, @function
inv:
.LFB51:
	.cfi_startproc
	endbr64
	movl	$1, %r8d
	cmpq	$1, %rdi
	jle	.L1
	movq	$-1000000007, %r9
	movl	$1000000007, %esi
	movabsq	$-8543223828751151131, %r10
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r9, %rax
	cqto
	idivq	%rdi
	leaq	1000000007(%rax), %rcx
	imulq	%r8, %rcx
	movq	%rcx, %rax
	mulq	%r10
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rsi, %rax
	cqto
	movq	%rcx, %r8
	idivq	%rdi
	movq	%rdx, %rdi
	cmpq	$1, %rdx
	jg	.L3
.L1:
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE51:
	.size	inv, .-inv
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-64(%rbp), %rcx
	leaq	-68(%rbp), %rdx
	pushq	%r13
	leaq	-72(%rbp), %rsi
	leaq	-60(%rbp), %r8
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movl	$0, -72(%rbp)
	movl	$0, -68(%rbp)
	movl	$0, -64(%rbp)
	movl	$0, -60(%rbp)
	call	__isoc99_scanf@PLT
	movslq	-72(%rbp), %rbx
	movq	%rsp, %rcx
	leaq	0(,%rbx,8), %rax
	movq	%rbx, %r12
	movq	%rax, -112(%rbp)
	addq	$15, %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L9
.L53:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L53
.L9:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L54
.L10:
	leaq	7(%rsp), %r13
	movq	%r13, %rcx
	andq	$-8, %r13
	shrq	$3, %rcx
	movq	$1, 0(,%rcx,8)
	cmpq	$1, %rbx
	jle	.L55
	movq	%rbx, %rax
	movl	$2, %r14d
	leaq	-1(%rbx), %r15
	movabsq	$-8543223828751151131, %r10
	imulq	%r10
	movq	$-1000000007, %r9
	movl	$1000000007, %r8d
	leaq	(%rdx,%rbx), %rax
	movq	%rbx, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rbx, %rax
	subq	%rdx, %rax
	movq	%rax, 8(,%rcx,8)
	movq	%rax, %rcx
	cmpq	$2, %rbx
	je	.L52
	.p2align 4,,10
	.p2align 3
.L15:
	leaq	(%r15,%r14), %rax
	movq	%r14, %rdi
	movl	$1, %esi
	imulq	%rax, %rcx
	movq	%rcx, %rax
	imulq	%r10
	movq	%rcx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %r11
	sarq	$29, %r11
	subq	%rax, %r11
	imulq	$1000000007, %r11, %rax
	subq	%rax, %rcx
	movq	%r14, %rax
	mulq	%r10
	movq	%rcx, %r11
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rdi
	cmpq	$1, %rdi
	jle	.L13
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r9, %rax
	cqto
	idivq	%rdi
	leaq	1000000007(%rax), %rcx
	imulq	%rsi, %rcx
	movq	%rcx, %rax
	mulq	%r10
	movq	%rdx, %rsi
	shrq	$29, %rsi
	imulq	$1000000007, %rsi, %rax
	subq	%rax, %rcx
	movq	%r8, %rax
	cqto
	movq	%rcx, %rsi
	idivq	%rdi
	movq	%rdx, %rdi
	cmpq	$1, %rdx
	jg	.L14
.L13:
	imulq	%r11, %rsi
	movq	%rsi, %rax
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rsi
	movq	%rsi, 0(%r13,%r14,8)
	addq	$1, %r14
	movq	%rsi, %rcx
	cmpq	%r14, %rbx
	jne	.L15
.L52:
	movl	-68(%rbp), %eax
	movl	%eax, -88(%rbp)
	movl	-64(%rbp), %eax
	movl	%eax, -104(%rbp)
.L17:
	movslq	-88(%rbp), %r9
	movslq	-104(%rbp), %r8
	xorl	%esi, %esi
	movl	$1, %r15d
	movabsq	$-8543223828751151131, %rdi
	movl	$1, %r14d
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%r14, %rcx
	addl	$1, %esi
	imulq	%r9, %rcx
	movq	%rcx, %rax
	imulq	%rdi
	movq	%rcx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %r14
	sarq	$29, %r14
	subq	%rax, %r14
	imulq	$1000000007, %r14, %rax
	subq	%rax, %rcx
	movq	%rcx, %r14
	movq	%r15, %rcx
	imulq	%r8, %rcx
	movq	%rcx, %rax
	imulq	%rdi
	movq	%rcx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %r15
	sarq	$29, %r15
	subq	%rax, %r15
	imulq	$1000000007, %r15, %rax
	subq	%rax, %rcx
	movq	%rcx, %r15
	cmpl	%esi, %r12d
	jg	.L16
.L18:
	movl	$100, %eax
	subl	-60(%rbp), %eax
	movl	$1, %ecx
	movslq	%eax, %rdi
	cmpl	$1, %eax
	jle	.L19
	movq	$-1000000007, %r9
	movl	$1000000007, %r8d
	movabsq	$-8543223828751151131, %r10
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%r9, %rax
	cqto
	idivq	%rdi
	leaq	1000000007(%rax), %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	mulq	%r10
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rsi
	movq	%r8, %rax
	cqto
	movq	%rsi, %rcx
	idivq	%rdi
	movq	%rdx, %rdi
	cmpq	$1, %rdx
	jg	.L20
.L19:
	movl	-88(%rbp), %eax
	addl	-104(%rbp), %eax
	movl	$1, %esi
	movslq	%eax, %r8
	cmpl	$1, %eax
	jle	.L21
	movq	$-1000000007, %r10
	movl	$1000000007, %r9d
	movabsq	$-8543223828751151131, %r11
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%r10, %rax
	cqto
	idivq	%r8
	leaq	1000000007(%rax), %rdi
	imulq	%rsi, %rdi
	movq	%rdi, %rax
	mulq	%r11
	movq	%rdx, %rsi
	shrq	$29, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rdi, %rsi
	subq	%rax, %rsi
	movq	%r9, %rax
	cqto
	idivq	%r8
	movq	%rdx, %r8
	cmpq	$1, %rdx
	jg	.L22
.L21:
	testl	%r12d, %r12d
	jle	.L23
	movabsq	$-8543223828751151131, %r9
	xorl	%edi, %edi
	movq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L24:
	imulq	%rsi, %rdx
	addl	$1, %edi
	movq	%rdx, %rax
	movq	%rdx, %rcx
	mulq	%r9
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	movq	%rcx, %rdx
	subq	%rax, %rdx
	cmpl	%edi, %r12d
	jne	.L24
	movq	%rdx, %rcx
.L23:
	addl	%r12d, %r12d
	leal	-1(%r12), %eax
	cltq
	cmpq	%rax, %rbx
	jg	.L32
	movslq	-88(%rbp), %rax
	subq	-112(%rbp), %r13
	xorl	%r11d, %r11d
	movl	$1, %r10d
	movabsq	$-8543223828751151131, %r8
	movl	$1, %r9d
	movq	%rax, -96(%rbp)
	movslq	-104(%rbp), %rax
	movq	%rax, -104(%rbp)
	movslq	%r12d, %rax
	movq	%rax, -88(%rbp)
	.p2align 4,,10
	.p2align 3
.L26:
	movq	%r14, %r12
	imulq	%r10, %r12
	movq	%r12, %rax
	movq	%r12, %rdi
	imulq	%r8
	sarq	$63, %rdi
	leaq	(%rdx,%r12), %rax
	sarq	$29, %rax
	subq	%rdi, %rax
	movq	%r15, %rdi
	imulq	%r9, %rdi
	imulq	$1000000007, %rax, %rax
	subq	%rax, %r12
	movq	%rdi, %rax
	imulq	%r8
	leaq	(%rdx,%rdi), %rax
	movq	%rdi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rdi
	addq	%r12, %rdi
	movq	%rdi, %rax
	movq	%rdi, %r12
	imulq	%r8
	sarq	$63, %r12
	leaq	(%rdx,%rdi), %rax
	sarq	$29, %rax
	subq	%r12, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rdi
	imulq	0(%r13,%rbx,8), %rdi
	movq	%rdi, %rax
	movq	%rdi, %r12
	imulq	%r8
	sarq	$63, %r12
	leaq	(%rdx,%rdi), %rax
	sarq	$29, %rax
	subq	%r12, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rdi
	imulq	%rbx, %rdi
	movq	%rdi, %rax
	movq	%rdi, %r12
	imulq	%r8
	sarq	$63, %r12
	leaq	(%rdx,%rdi), %rax
	sarq	$29, %rax
	subq	%r12, %rax
	imulq	-104(%rbp), %r10
	imulq	$1000000007, %rax, %rax
	imulq	-96(%rbp), %r9
	subq	%rax, %rdi
	imulq	%rcx, %rdi
	movq	%rdi, %rax
	movq	%rdi, %r12
	imulq	%r8
	sarq	$63, %r12
	leaq	(%rdx,%rdi), %rax
	sarq	$29, %rax
	subq	%r12, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rdi
	leaq	(%rdi,%rdi,4), %rax
	leaq	(%rax,%rax,4), %rdi
	salq	$2, %rdi
	movq	%rdi, %rax
	movq	%rdi, %r12
	imulq	%r8
	sarq	$63, %r12
	leaq	(%rdx,%rdi), %rax
	sarq	$29, %rax
	subq	%r12, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rdi
	movq	%r10, %rax
	imulq	%r8
	addq	%r11, %rdi
	movq	%r10, %r11
	movq	%r11, %rax
	sarq	$63, %rax
	leaq	(%rdx,%r10), %r10
	sarq	$29, %r10
	subq	%rax, %r10
	imulq	$1000000007, %r10, %rax
	movq	%r11, %r10
	movq	%r9, %r11
	subq	%rax, %r10
	movq	%r9, %rax
	imulq	%r8
	movq	%r11, %rax
	sarq	$63, %rax
	leaq	(%rdx,%r9), %r9
	sarq	$29, %r9
	subq	%rax, %r9
	imulq	$1000000007, %r9, %rax
	movq	%r11, %r9
	subq	%rax, %r9
	imulq	%rsi, %rcx
	addq	$1, %rbx
	movq	%rcx, %rax
	mulq	%r8
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rdi, %rax
	imulq	%r8
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %r11
	sarq	$29, %r11
	subq	%rax, %r11
	imulq	$1000000007, %r11, %rax
	subq	%rax, %rdi
	movq	%rdi, %r11
	cmpq	-88(%rbp), %rbx
	jne	.L26
.L25:
	xorl	%eax, %eax
	movq	%r11, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L56
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L54:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L10
.L32:
	xorl	%r11d, %r11d
	jmp	.L25
.L55:
	movl	-68(%rbp), %eax
	movl	%eax, -88(%rbp)
	movl	-64(%rbp), %eax
	movl	%eax, -104(%rbp)
	cmpl	$1, %r12d
	je	.L17
	movl	$1, %r15d
	movl	$1, %r14d
	jmp	.L18
.L56:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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	inv
	.type	inv, @function
inv:
.LFB51:
	.cfi_startproc
	endbr64
	movl	$1, %r8d
	cmpq	$1, %rdi
	jle	.L1
	movq	$-1000000007, %r9
	movl	$1000000007, %esi
	movabsq	$-8543223828751151131, %r10
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r9, %rax
	cqto
	idivq	%rdi
	leaq	1000000007(%rax), %rcx
	imulq	%r8, %rcx
	movq	%rcx, %rax
	mulq	%r10
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rsi, %rax
	cqto
	movq	%rcx, %r8
	idivq	%rdi
	movq	%rdx, %rdi
	cmpq	$1, %rdx
	jg	.L3
.L1:
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE51:
	.size	inv, .-inv
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-64(%rbp), %rcx
	leaq	-68(%rbp), %rdx
	pushq	%r13
	leaq	-72(%rbp), %rsi
	leaq	-60(%rbp), %r8
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movl	$0, -72(%rbp)
	movl	$0, -68(%rbp)
	movl	$0, -64(%rbp)
	movl	$0, -60(%rbp)
	call	__isoc99_scanf@PLT
	movslq	-72(%rbp), %rbx
	movq	%rsp, %rcx
	leaq	0(,%rbx,8), %rax
	movq	%rbx, %r12
	movq	%rax, -112(%rbp)
	addq	$15, %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L9
.L53:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L53
.L9:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L54
.L10:
	leaq	7(%rsp), %r13
	movq	%r13, %rcx
	andq	$-8, %r13
	shrq	$3, %rcx
	movq	$1, 0(,%rcx,8)
	cmpq	$1, %rbx
	jle	.L55
	movq	%rbx, %rax
	movl	$2, %r14d
	leaq	-1(%rbx), %r15
	movabsq	$-8543223828751151131, %r10
	imulq	%r10
	movq	$-1000000007, %r9
	movl	$1000000007, %r8d
	leaq	(%rdx,%rbx), %rax
	movq	%rbx, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rbx, %rax
	subq	%rdx, %rax
	movq	%rax, 8(,%rcx,8)
	movq	%rax, %rcx
	cmpq	$2, %rbx
	je	.L52
	.p2align 4,,10
	.p2align 3
.L15:
	leaq	(%r15,%r14), %rax
	movq	%r14, %rdi
	movl	$1, %esi
	imulq	%rax, %rcx
	movq	%rcx, %rax
	imulq	%r10
	movq	%rcx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %r11
	sarq	$29, %r11
	subq	%rax, %r11
	imulq	$1000000007, %r11, %rax
	subq	%rax, %rcx
	movq	%r14, %rax
	mulq	%r10
	movq	%rcx, %r11
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rdi
	cmpq	$1, %rdi
	jle	.L13
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r9, %rax
	cqto
	idivq	%rdi
	leaq	1000000007(%rax), %rcx
	imulq	%rsi, %rcx
	movq	%rcx, %rax
	mulq	%r10
	movq	%rdx, %rsi
	shrq	$29, %rsi
	imulq	$1000000007, %rsi, %rax
	subq	%rax, %rcx
	movq	%r8, %rax
	cqto
	movq	%rcx, %rsi
	idivq	%rdi
	movq	%rdx, %rdi
	cmpq	$1, %rdx
	jg	.L14
.L13:
	imulq	%r11, %rsi
	movq	%rsi, %rax
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rsi
	movq	%rsi, 0(%r13,%r14,8)
	addq	$1, %r14
	movq	%rsi, %rcx
	cmpq	%r14, %rbx
	jne	.L15
.L52:
	movl	-68(%rbp), %eax
	movl	%eax, -88(%rbp)
	movl	-64(%rbp), %eax
	movl	%eax, -104(%rbp)
.L17:
	movslq	-88(%rbp), %r9
	movslq	-104(%rbp), %r8
	xorl	%esi, %esi
	movl	$1, %r15d
	movabsq	$-8543223828751151131, %rdi
	movl	$1, %r14d
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%r14, %rcx
	addl	$1, %esi
	imulq	%r9, %rcx
	movq	%rcx, %rax
	imulq	%rdi
	movq	%rcx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %r14
	sarq	$29, %r14
	subq	%rax, %r14
	imulq	$1000000007, %r14, %rax
	subq	%rax, %rcx
	movq	%rcx, %r14
	movq	%r15, %rcx
	imulq	%r8, %rcx
	movq	%rcx, %rax
	imulq	%rdi
	movq	%rcx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %r15
	sarq	$29, %r15
	subq	%rax, %r15
	imulq	$1000000007, %r15, %rax
	subq	%rax, %rcx
	movq	%rcx, %r15
	cmpl	%esi, %r12d
	jg	.L16
.L18:
	movl	$100, %eax
	subl	-60(%rbp), %eax
	movl	$1, %ecx
	movslq	%eax, %rdi
	cmpl	$1, %eax
	jle	.L19
	movq	$-1000000007, %r9
	movl	$1000000007, %r8d
	movabsq	$-8543223828751151131, %r10
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%r9, %rax
	cqto
	idivq	%rdi
	leaq	1000000007(%rax), %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	mulq	%r10
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rsi
	movq	%r8, %rax
	cqto
	movq	%rsi, %rcx
	idivq	%rdi
	movq	%rdx, %rdi
	cmpq	$1, %rdx
	jg	.L20
.L19:
	movl	-88(%rbp), %eax
	addl	-104(%rbp), %eax
	movl	$1, %esi
	movslq	%eax, %r8
	cmpl	$1, %eax
	jle	.L21
	movq	$-1000000007, %r10
	movl	$1000000007, %r9d
	movabsq	$-8543223828751151131, %r11
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%r10, %rax
	cqto
	idivq	%r8
	leaq	1000000007(%rax), %rdi
	imulq	%rsi, %rdi
	movq	%rdi, %rax
	mulq	%r11
	movq	%rdx, %rsi
	shrq	$29, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rdi, %rsi
	subq	%rax, %rsi
	movq	%r9, %rax
	cqto
	idivq	%r8
	movq	%rdx, %r8
	cmpq	$1, %rdx
	jg	.L22
.L21:
	testl	%r12d, %r12d
	jle	.L23
	movabsq	$-8543223828751151131, %r9
	xorl	%edi, %edi
	movq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L24:
	imulq	%rsi, %rdx
	addl	$1, %edi
	movq	%rdx, %rax
	movq	%rdx, %rcx
	mulq	%r9
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	movq	%rcx, %rdx
	subq	%rax, %rdx
	cmpl	%edi, %r12d
	jne	.L24
	movq	%rdx, %rcx
.L23:
	addl	%r12d, %r12d
	leal	-1(%r12), %eax
	cltq
	cmpq	%rax, %rbx
	jg	.L32
	movslq	-88(%rbp), %rax
	subq	-112(%rbp), %r13
	xorl	%r11d, %r11d
	movl	$1, %r10d
	movabsq	$-8543223828751151131, %r8
	movl	$1, %r9d
	movq	%rax, -96(%rbp)
	movslq	-104(%rbp), %rax
	movq	%rax, -104(%rbp)
	movslq	%r12d, %rax
	movq	%rax, -88(%rbp)
	.p2align 4,,10
	.p2align 3
.L26:
	movq	%r14, %r12
	imulq	%r10, %r12
	movq	%r12, %rax
	movq	%r12, %rdi
	imulq	%r8
	sarq	$63, %rdi
	leaq	(%rdx,%r12), %rax
	sarq	$29, %rax
	subq	%rdi, %rax
	movq	%r15, %rdi
	imulq	%r9, %rdi
	imulq	$1000000007, %rax, %rax
	subq	%rax, %r12
	movq	%rdi, %rax
	imulq	%r8
	leaq	(%rdx,%rdi), %rax
	movq	%rdi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rdi
	addq	%r12, %rdi
	movq	%rdi, %rax
	movq	%rdi, %r12
	imulq	%r8
	sarq	$63, %r12
	leaq	(%rdx,%rdi), %rax
	sarq	$29, %rax
	subq	%r12, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rdi
	imulq	0(%r13,%rbx,8), %rdi
	movq	%rdi, %rax
	movq	%rdi, %r12
	imulq	%r8
	sarq	$63, %r12
	leaq	(%rdx,%rdi), %rax
	sarq	$29, %rax
	subq	%r12, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rdi
	imulq	%rbx, %rdi
	movq	%rdi, %rax
	movq	%rdi, %r12
	imulq	%r8
	sarq	$63, %r12
	leaq	(%rdx,%rdi), %rax
	sarq	$29, %rax
	subq	%r12, %rax
	imulq	-104(%rbp), %r10
	imulq	$1000000007, %rax, %rax
	imulq	-96(%rbp), %r9
	subq	%rax, %rdi
	imulq	%rcx, %rdi
	movq	%rdi, %rax
	movq	%rdi, %r12
	imulq	%r8
	sarq	$63, %r12
	leaq	(%rdx,%rdi), %rax
	sarq	$29, %rax
	subq	%r12, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rdi
	leaq	(%rdi,%rdi,4), %rax
	leaq	(%rax,%rax,4), %rdi
	salq	$2, %rdi
	movq	%rdi, %rax
	movq	%rdi, %r12
	imulq	%r8
	sarq	$63, %r12
	leaq	(%rdx,%rdi), %rax
	sarq	$29, %rax
	subq	%r12, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rdi
	movq	%r10, %rax
	imulq	%r8
	addq	%r11, %rdi
	movq	%r10, %r11
	movq	%r11, %rax
	sarq	$63, %rax
	leaq	(%rdx,%r10), %r10
	sarq	$29, %r10
	subq	%rax, %r10
	imulq	$1000000007, %r10, %rax
	movq	%r11, %r10
	movq	%r9, %r11
	subq	%rax, %r10
	movq	%r9, %rax
	imulq	%r8
	movq	%r11, %rax
	sarq	$63, %rax
	leaq	(%rdx,%r9), %r9
	sarq	$29, %r9
	subq	%rax, %r9
	imulq	$1000000007, %r9, %rax
	movq	%r11, %r9
	subq	%rax, %r9
	imulq	%rsi, %rcx
	addq	$1, %rbx
	movq	%rcx, %rax
	mulq	%r8
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rdi, %rax
	imulq	%r8
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %r11
	sarq	$29, %r11
	subq	%rax, %r11
	imulq	$1000000007, %r11, %rax
	subq	%rax, %rdi
	movq	%rdi, %r11
	cmpq	-88(%rbp), %rbx
	jne	.L26
.L25:
	xorl	%eax, %eax
	movq	%r11, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L56
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L54:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L10
.L32:
	xorl	%r11d, %r11d
	jmp	.L25
.L55:
	movl	-68(%rbp), %eax
	movl	%eax, -88(%rbp)
	movl	-64(%rbp), %eax
	movl	%eax, -104(%rbp)
	cmpl	$1, %r12d
	je	.L17
	movl	$1, %r15d
	movl	$1, %r14d
	jmp	.L18
.L56:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>

#define mod 1000000007

long long int inv(long long int n) {
    long long int ans = 1;
    while (n > 1) {
        ans = ans * (mod - mod / n) % mod;
        n = mod % n;
    }
    return ans;
}

int main() {
    int n = 0, a = 0, b = 0, c = 0;
    scanf("%d %d %d %d", &n, &a, &b, &c);
    long long int comb[n];
    comb[0] = 1;
    for (long long int i=1; i<n; i++) {
        comb[i] = comb[i-1] * (n-1+i) % mod * inv(i%mod) % mod;
        comb[i] = comb[i] % mod;
    }
    long long int a_n = 1;
    long long int b_n = 1;
    for (int i=0; i<n; i++) {
        a_n = a_n * a % mod;
        b_n = b_n * b % mod;
    }
    long long int a_buf = 1;
    long long int b_buf = 1;
    long long int ans = 0;
    long long int deno = inv(100 - c);
    long long int inv_ab = inv(a+b);
    for (int i=0; i<n; i++) {
        deno = deno * inv_ab % mod;
    }
    for (long long int i=n; i<=n*2-1; i++) {
        long long int buf1 = a_n * b_buf % mod;
        long long int buf2 = a_buf * b_n % mod;
        long long int buf3 = (buf1 + buf2) % mod;
        ans += comb[i-n] * buf3 % mod * i % mod * deno % mod * 100 % mod;
        b_buf = b_buf * b % mod;
        a_buf = a_buf * a % mod;
        deno = deno * inv_ab % mod;
        ans = ans % mod;
    }
    printf("%lld\n", ans);
    return 0;
}

8 50 50 0
 1 000 0 0
 2 100 0 0
 6 50 50 0
 1 101 0 -1
 100001 31 41 28
 1 100 -1 1
 000001 31 41 28
 000011 31 41 28
 2 25 25 50

127441420
 0
 2
 386718762
 59405942
 904789367
 646464652
 388888893
 339871354
 5

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

```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>

#define mod 1000000007

long long int inv(long long int n) {
    long long int ans = 1;
    while (n > 1) {
        ans = ans * (mod - mod / n) % mod;
        n = mod % n;
    }
    return ans;
}

int main() {
    int n = 0, a = 0, b = 0, c = 0;
    scanf("%d %d %d %d", &n, &a, &b, &c);
    long long int comb[n];
    comb[0] = 1;
    for (long long int i=1; i<n; i++) {
        comb[i] = comb[i-1] * (n-1+i) % mod * inv(i%mod) % mod;
        comb[i] = comb[i] % mod;
    }
    long long int a_n = 1;
    long long int b_n = 1;
    for (int i=0; i<n; i++) {
        a_n = a_n * a % mod;
        b_n = b_n * b % mod;
    }
    long long int a_buf = 1;
    long long int b_buf = 1;
    long long int ans = 0;
    long long int deno = inv(100 - c);
    long long int inv_ab = inv(a+b);
    for (int i=0; i<n; i++) {
        deno = deno * inv_ab % mod;
    }
    for (long long int i=n; i<=n*2-1; i++) {
        long long int buf1 = a_n * b_buf % mod;
        long long int buf2 = a_buf * b_n % mod;
        long long int buf3 = (buf1 + buf2) % mod;
        ans += comb[i-n] * buf3 % mod * i % mod * deno % mod * 100 % mod;
        b_buf = b_buf * b % mod;
        a_buf = a_buf * a % mod;
        deno = deno * inv_ab % mod;
        ans = ans % mod;
    }
    printf("%lld\n", ans);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	inv
	.type	inv, @function
inv:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	$1, -8(%rbp)
	jmp	.L2
.L3:
	movq	$-1000000007, %rax
	cqto
	idivq	-24(%rbp)
	addq	$1000000007, %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, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movl	$1000000007, %eax
	cqto
	idivq	-24(%rbp)
	movq	%rdx, -24(%rbp)
.L2:
	cmpq	$1, -24(%rbp)
	jg	.L3
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	inv, .-inv
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$160, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %r12
	movl	$0, -176(%rbp)
	movl	$0, -172(%rbp)
	movl	$0, -168(%rbp)
	movl	$0, -164(%rbp)
	leaq	-164(%rbp), %rsi
	leaq	-168(%rbp), %rcx
	leaq	-172(%rbp), %rdx
	leaq	-176(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-176(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -192(%rbp)
	movq	$0, -184(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	cltq
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L6:
	cmpq	%rdx, %rsp
	je	.L7
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L6
.L7:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L8
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L8:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -80(%rbp)
	movq	-80(%rbp), %rax
	movq	$1, (%rax)
	movq	$1, -152(%rbp)
	jmp	.L9
.L10:
	movq	-152(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-80(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	movl	-176(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rcx
	movq	-152(%rbp), %rdx
	addq	%rcx, %rdx
	imulq	%rdx, %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, %rbx
	imulq	$1000000007, %rbx, %rax
	movq	%rcx, %rbx
	subq	%rax, %rbx
	movq	-152(%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, %rdi
	call	inv
	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	-80(%rbp), %rdx
	movq	-152(%rbp), %rcx
	movq	%rax, (%rdx,%rcx,8)
	movq	-80(%rbp), %rax
	movq	-152(%rbp), %rdx
	movq	(%rax,%rdx,8), %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	-80(%rbp), %rdx
	movq	-152(%rbp), %rcx
	movq	%rax, (%rdx,%rcx,8)
	addq	$1, -152(%rbp)
.L9:
	movl	-176(%rbp), %eax
	cltq
	cmpq	%rax, -152(%rbp)
	jl	.L10
	movq	$1, -144(%rbp)
	movq	$1, -136(%rbp)
	movl	$0, -160(%rbp)
	jmp	.L11
.L12:
	movl	-172(%rbp), %eax
	cltq
	imulq	-144(%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, -144(%rbp)
	movq	-144(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -144(%rbp)
	movl	-168(%rbp), %eax
	cltq
	imulq	-136(%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, -136(%rbp)
	movq	-136(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -136(%rbp)
	addl	$1, -160(%rbp)
.L11:
	movl	-176(%rbp), %eax
	cmpl	%eax, -160(%rbp)
	jl	.L12
	movq	$1, -128(%rbp)
	movq	$1, -120(%rbp)
	movq	$0, -112(%rbp)
	movl	-164(%rbp), %edx
	movl	$100, %eax
	subl	%edx, %eax
	cltq
	movq	%rax, %rdi
	call	inv
	movq	%rax, -104(%rbp)
	movl	-172(%rbp), %edx
	movl	-168(%rbp), %eax
	addl	%edx, %eax
	cltq
	movq	%rax, %rdi
	call	inv
	movq	%rax, -72(%rbp)
	movl	$0, -156(%rbp)
	jmp	.L13
.L14:
	movq	-104(%rbp), %rax
	imulq	-72(%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, -104(%rbp)
	movq	-104(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -104(%rbp)
	addl	$1, -156(%rbp)
.L13:
	movl	-176(%rbp), %eax
	cmpl	%eax, -156(%rbp)
	jl	.L14
	movl	-176(%rbp), %eax
	cltq
	movq	%rax, -96(%rbp)
	jmp	.L15
.L16:
	movq	-144(%rbp), %rax
	imulq	-120(%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, -64(%rbp)
	movq	-64(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -64(%rbp)
	movq	-128(%rbp), %rax
	imulq	-136(%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, -56(%rbp)
	movq	-56(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -56(%rbp)
	movq	-64(%rbp), %rdx
	movq	-56(%rbp), %rax
	leaq	(%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
	movq	%rax, -48(%rbp)
	movq	-48(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -48(%rbp)
	movl	-176(%rbp), %eax
	movslq	%eax, %rcx
	movq	-96(%rbp), %rax
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-80(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	imulq	-48(%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
	imulq	-96(%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
	imulq	-104(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %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, -112(%rbp)
	movl	-168(%rbp), %eax
	cltq
	imulq	-120(%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, -120(%rbp)
	movq	-120(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -120(%rbp)
	movl	-172(%rbp), %eax
	cltq
	imulq	-128(%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, -128(%rbp)
	movq	-128(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -128(%rbp)
	movq	-104(%rbp), %rax
	imulq	-72(%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, -104(%rbp)
	movq	-104(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -104(%rbp)
	movq	-112(%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, -112(%rbp)
	addq	$1, -96(%rbp)
.L15:
	movl	-176(%rbp), %eax
	addl	%eax, %eax
	subl	$1, %eax
	cltq
	cmpq	%rax, -96(%rbp)
	jle	.L16
	movq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%r12, %rsp
	movq	-40(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	inv
	.type	inv, @function
inv:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	$1, -8(%rbp)
	jmp	.L2
.L3:
	movq	$-1000000007, %rax
	cqto
	idivq	-24(%rbp)
	addq	$1000000007, %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, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movl	$1000000007, %eax
	cqto
	idivq	-24(%rbp)
	movq	%rdx, -24(%rbp)
.L2:
	cmpq	$1, -24(%rbp)
	jg	.L3
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	inv, .-inv
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$160, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %r12
	movl	$0, -176(%rbp)
	movl	$0, -172(%rbp)
	movl	$0, -168(%rbp)
	movl	$0, -164(%rbp)
	leaq	-164(%rbp), %rsi
	leaq	-168(%rbp), %rcx
	leaq	-172(%rbp), %rdx
	leaq	-176(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-176(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -192(%rbp)
	movq	$0, -184(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	cltq
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L6:
	cmpq	%rdx, %rsp
	je	.L7
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L6
.L7:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L8
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L8:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -80(%rbp)
	movq	-80(%rbp), %rax
	movq	$1, (%rax)
	movq	$1, -152(%rbp)
	jmp	.L9
.L10:
	movq	-152(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-80(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	movl	-176(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rcx
	movq	-152(%rbp), %rdx
	addq	%rcx, %rdx
	imulq	%rdx, %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, %rbx
	imulq	$1000000007, %rbx, %rax
	movq	%rcx, %rbx
	subq	%rax, %rbx
	movq	-152(%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, %rdi
	call	inv
	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	-80(%rbp), %rdx
	movq	-152(%rbp), %rcx
	movq	%rax, (%rdx,%rcx,8)
	movq	-80(%rbp), %rax
	movq	-152(%rbp), %rdx
	movq	(%rax,%rdx,8), %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	-80(%rbp), %rdx
	movq	-152(%rbp), %rcx
	movq	%rax, (%rdx,%rcx,8)
	addq	$1, -152(%rbp)
.L9:
	movl	-176(%rbp), %eax
	cltq
	cmpq	%rax, -152(%rbp)
	jl	.L10
	movq	$1, -144(%rbp)
	movq	$1, -136(%rbp)
	movl	$0, -160(%rbp)
	jmp	.L11
.L12:
	movl	-172(%rbp), %eax
	cltq
	imulq	-144(%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, -144(%rbp)
	movq	-144(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -144(%rbp)
	movl	-168(%rbp), %eax
	cltq
	imulq	-136(%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, -136(%rbp)
	movq	-136(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -136(%rbp)
	addl	$1, -160(%rbp)
.L11:
	movl	-176(%rbp), %eax
	cmpl	%eax, -160(%rbp)
	jl	.L12
	movq	$1, -128(%rbp)
	movq	$1, -120(%rbp)
	movq	$0, -112(%rbp)
	movl	-164(%rbp), %edx
	movl	$100, %eax
	subl	%edx, %eax
	cltq
	movq	%rax, %rdi
	call	inv
	movq	%rax, -104(%rbp)
	movl	-172(%rbp), %edx
	movl	-168(%rbp), %eax
	addl	%edx, %eax
	cltq
	movq	%rax, %rdi
	call	inv
	movq	%rax, -72(%rbp)
	movl	$0, -156(%rbp)
	jmp	.L13
.L14:
	movq	-104(%rbp), %rax
	imulq	-72(%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, -104(%rbp)
	movq	-104(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -104(%rbp)
	addl	$1, -156(%rbp)
.L13:
	movl	-176(%rbp), %eax
	cmpl	%eax, -156(%rbp)
	jl	.L14
	movl	-176(%rbp), %eax
	cltq
	movq	%rax, -96(%rbp)
	jmp	.L15
.L16:
	movq	-144(%rbp), %rax
	imulq	-120(%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, -64(%rbp)
	movq	-64(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -64(%rbp)
	movq	-128(%rbp), %rax
	imulq	-136(%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, -56(%rbp)
	movq	-56(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -56(%rbp)
	movq	-64(%rbp), %rdx
	movq	-56(%rbp), %rax
	leaq	(%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
	movq	%rax, -48(%rbp)
	movq	-48(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -48(%rbp)
	movl	-176(%rbp), %eax
	movslq	%eax, %rcx
	movq	-96(%rbp), %rax
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-80(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	imulq	-48(%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
	imulq	-96(%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
	imulq	-104(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %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, -112(%rbp)
	movl	-168(%rbp), %eax
	cltq
	imulq	-120(%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, -120(%rbp)
	movq	-120(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -120(%rbp)
	movl	-172(%rbp), %eax
	cltq
	imulq	-128(%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, -128(%rbp)
	movq	-128(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -128(%rbp)
	movq	-104(%rbp), %rax
	imulq	-72(%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, -104(%rbp)
	movq	-104(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -104(%rbp)
	movq	-112(%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, -112(%rbp)
	addq	$1, -96(%rbp)
.L15:
	movl	-176(%rbp), %eax
	addl	%eax, %eax
	subl	$1, %eax
	cltq
	cmpq	%rax, -96(%rbp)
	jle	.L16
	movq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%r12, %rsp
	movq	-40(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
