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

```c
#include<stdio.h>
#define MOD 1000000007
#define modml(a,b) ((long)(1ll * (a) * (b) % MOD))
#define modadd(a,b) (((a)+(b)) % MOD)

static inline long modpow(long num,long ind){
    unsigned long cnt = ind;
    long res = 1;
    while(cnt){
        if(cnt & 1ul)res = modml(res,num);
        num = modml(num,num);
        cnt >>= 1;
    }
    return res;
}

long fact[2001];
long fcinv[2001];

static inline long modinv(long num){
    return modpow(num,MOD-2);
}

static inline long modnck(long n,long k){
    return modml(fact[n],modinv(modml(fact[k],fact[n-k])));
}

int main(void){
    register int i;
    fact[0] = 1;
    for(i = 1;i <= 2000;i++)fact[i] = modml(fact[i-1],i);
    for(i = 1;i <= 2000;i++)fcinv[i] = modinv(fact[i]);

    int n,k,r;
    scanf("%d %d",&n,&k);
    r = n - k;
    for(i = 1;i <= k;i++){
        if(k-1 < i-1 || r + 1 < i){
            puts("0");
            continue;
        }
        printf("%ld\n",modml(modnck(k-1,i-1),modnck(r+1,i)));
    }
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.type	modpow, @function
modpow:
.LFB0:
	.cfi_startproc
	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	-32(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	$1, -8(%rbp)
	jmp	.L2
.L4:
	movq	-16(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.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)
.L3:
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -24(%rbp)
	movq	-24(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -24(%rbp)
	shrq	-16(%rbp)
.L2:
	cmpq	$0, -16(%rbp)
	jne	.L4
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	modpow, .-modpow
	.globl	fact
	.bss
	.align 32
	.type	fact, @object
	.size	fact, 16008
fact:
	.zero	16008
	.globl	fcinv
	.align 32
	.type	fcinv, @object
	.size	fcinv, 16008
fcinv:
	.zero	16008
	.text
	.type	modinv, @function
modinv:
.LFB1:
	.cfi_startproc
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	$1000000005, %esi
	movq	%rax, %rdi
	call	modpow
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	modinv, .-modinv
	.type	modnck, @function
modnck:
.LFB2:
	.cfi_startproc
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -16(%rbp)
	movq	%rsi, -24(%rbp)
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	fact(%rip), %rax
	movq	(%rdx,%rax), %rbx
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	fact(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-16(%rbp), %rax
	subq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	leaq	fact(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, %rdi
	call	modinv
	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	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	modnck, .-modnck
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"0"
.LC2:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movq	$1, fact(%rip)
	movl	$1, %ebx
	jmp	.L11
.L12:
	leal	-1(%rbx), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	fact(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movslq	%ebx, %rax
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movslq	%ebx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	fact(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, %ebx
.L11:
	cmpl	$2000, %ebx
	jle	.L12
	movl	$1, %ebx
	jmp	.L13
.L14:
	movslq	%ebx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	fact(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rdi
	call	modinv
	movslq	%ebx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	fcinv(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, %ebx
.L13:
	cmpl	$2000, %ebx
	jle	.L14
	leaq	-32(%rbp), %rdx
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-36(%rbp), %eax
	movl	-32(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$1, %ebx
	jmp	.L15
.L19:
	movl	-32(%rbp), %eax
	cmpl	%eax, %ebx
	jg	.L16
	movl	-28(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, %ebx
	jle	.L17
.L16:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L18
.L17:
	leal	-1(%rbx), %eax
	movslq	%eax, %rdx
	movl	-32(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	modnck
	movq	%rax, %r12
	movslq	%ebx, %rdx
	movl	-28(%rbp), %eax
	addl	$1, %eax
	cltq
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	modnck
	movq	%r12, %rcx
	imulq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L18:
	addl	$1, %ebx
.L15:
	movl	-32(%rbp), %eax
	cmpl	%eax, %ebx
	jle	.L19
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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
.LC0:
	.string	"%d %d"
.LC1:
	.string	"0"
.LC2:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$1, %ecx
	movl	$1, %edx
	movabsq	$-8543223828751151131, %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	fact(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	$1, fact(%rip)
	.p2align 4,,10
	.p2align 3
.L2:
	imulq	%rcx, %rdx
	movq	%rdx, %rax
	movq	%rdx, %rsi
	imulq	%rdi
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	movq	%rsi, %rdx
	subq	%rax, %rdx
	movq	%rdx, (%rbx,%rcx,8)
	addq	$1, %rcx
	cmpq	$2001, %rcx
	jne	.L2
	movl	$8, %r11d
	leaq	fcinv(%rip), %rbp
	movabsq	$-8543223828751151131, %r10
	.p2align 4,,10
	.p2align 3
.L5:
	movq	(%rbx,%r11), %rcx
	movl	$30, %r9d
	movl	$1, %esi
	movl	$1000000005, %r8d
	.p2align 4,,10
	.p2align 3
.L4:
	testb	$1, %r8b
	je	.L3
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %rdi
	imulq	%r10
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rdi, %rsi
	subq	%rax, %rsi
.L3:
	movq	%rcx, %rdi
	shrq	%r8
	imulq	%rcx, %rdi
	movq	%rdi, %rax
	movq	%rdi, %rcx
	mulq	%r10
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %r9d
	jne	.L4
	movq	%rsi, 0(%rbp,%r11)
	addq	$8, %r11
	cmpq	$16008, %r11
	jne	.L5
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rax
	movl	(%rsp), %edx
	subl	%eax, %edx
	testl	%eax, %eax
	jle	.L14
	leal	1(%rdx), %r12d
	movslq	%edx, %rdx
	movl	$1, %r14d
	movabsq	$-8543223828751151131, %rbp
	leaq	(%rbx,%rdx,8), %r15
	leaq	.LC2(%rip), %r13
.L13:
	cmpl	%r14d, %r12d
	jl	.L34
	leal	-1(%rax), %edx
	subq	%r14, %rax
	movl	$30, %r8d
	movl	$1000000005, %edi
	movq	(%rbx,%rax,8), %rsi
	leaq	-8+fact(%rip), %rax
	movslq	%edx, %rdx
	imulq	(%rax,%r14,8), %rsi
	movq	(%rbx,%rdx,8), %r10
	movq	%rsi, %rax
	imulq	%rbp
	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, %rcx
	movl	$1, %esi
	.p2align 4,,10
	.p2align 3
.L10:
	testb	$1, %dil
	je	.L9
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %r9
	imulq	%rbp
	movq	%r9, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%r9, %rsi
	subq	%rax, %rsi
.L9:
	imulq	%rcx, %rcx
	shrq	%rdi
	movq	%rcx, %rax
	mulq	%rbp
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %r8d
	jne	.L10
	imulq	%r10, %rsi
	movl	$30, %r8d
	movl	$1000000005, %edi
	movq	%rsi, %rax
	imulq	%rbp
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %r10
	sarq	$29, %r10
	subq	%rax, %r10
	imulq	$1000000007, %r10, %rax
	subq	%rax, %rsi
	movslq	%r12d, %rax
	movq	%rsi, %r10
	movq	(%rbx,%r14,8), %rsi
	imulq	(%r15), %rsi
	movq	(%rbx,%rax,8), %r11
	movq	%rsi, %rax
	imulq	%rbp
	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, %rcx
	movl	$1, %esi
	.p2align 4,,10
	.p2align 3
.L12:
	testb	$1, %dil
	je	.L11
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %r9
	imulq	%rbp
	movq	%r9, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%r9, %rsi
	subq	%rax, %rsi
.L11:
	imulq	%rcx, %rcx
	shrq	%rdi
	movq	%rcx, %rax
	mulq	%rbp
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %r8d
	jne	.L12
	imulq	%r11, %rsi
	movl	$1, %edi
	movq	%rsi, %rax
	imulq	%rbp
	leaq	(%rdx,%rsi), %rax
	movq	%rsi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rsi
	imulq	%r10, %rsi
	movq	%rsi, %rax
	imulq	%rbp
	leaq	(%rdx,%rsi), %rax
	movq	%rsi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	movq	%rsi, %rdx
	movq	%r13, %rsi
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L8:
	movslq	4(%rsp), %rax
	addq	$1, %r14
	subq	$8, %r15
	cmpl	%r14d, %eax
	jge	.L13
.L14:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L35
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L34:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L8
.L35:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.globl	fcinv
	.bss
	.align 32
	.type	fcinv, @object
	.size	fcinv, 16008
fcinv:
	.zero	16008
	.globl	fact
	.align 32
	.type	fact, @object
	.size	fact, 16008
fact:
	.zero	16008
	.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
.LC0:
	.string	"%d %d"
.LC1:
	.string	"0"
.LC2:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$1, %ecx
	movl	$1, %edx
	movabsq	$-8543223828751151131, %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	fact(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	$1, fact(%rip)
	.p2align 4,,10
	.p2align 3
.L2:
	imulq	%rcx, %rdx
	movq	%rdx, %rax
	movq	%rdx, %rsi
	imulq	%rdi
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	movq	%rsi, %rdx
	subq	%rax, %rdx
	movq	%rdx, (%rbx,%rcx,8)
	addq	$1, %rcx
	cmpq	$2001, %rcx
	jne	.L2
	movl	$8, %r11d
	leaq	fcinv(%rip), %rbp
	movabsq	$-8543223828751151131, %r10
	.p2align 4,,10
	.p2align 3
.L5:
	movq	(%rbx,%r11), %rcx
	movl	$30, %r9d
	movl	$1, %esi
	movl	$1000000005, %r8d
	.p2align 4,,10
	.p2align 3
.L4:
	testb	$1, %r8b
	je	.L3
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %rdi
	imulq	%r10
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rdi, %rsi
	subq	%rax, %rsi
.L3:
	movq	%rcx, %rdi
	shrq	%r8
	imulq	%rcx, %rdi
	movq	%rdi, %rax
	movq	%rdi, %rcx
	mulq	%r10
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %r9d
	jne	.L4
	movq	%rsi, 0(%rbp,%r11)
	addq	$8, %r11
	cmpq	$16008, %r11
	jne	.L5
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rax
	movl	(%rsp), %edx
	subl	%eax, %edx
	testl	%eax, %eax
	jle	.L14
	leal	1(%rdx), %r12d
	movslq	%edx, %rdx
	movl	$1, %r14d
	movabsq	$-8543223828751151131, %rbp
	leaq	(%rbx,%rdx,8), %r15
	leaq	.LC2(%rip), %r13
.L13:
	cmpl	%r14d, %r12d
	jl	.L34
	leal	-1(%rax), %edx
	subq	%r14, %rax
	movl	$30, %r8d
	movl	$1000000005, %edi
	movq	(%rbx,%rax,8), %rsi
	leaq	-8+fact(%rip), %rax
	movslq	%edx, %rdx
	imulq	(%rax,%r14,8), %rsi
	movq	(%rbx,%rdx,8), %r10
	movq	%rsi, %rax
	imulq	%rbp
	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, %rcx
	movl	$1, %esi
	.p2align 4,,10
	.p2align 3
.L10:
	testb	$1, %dil
	je	.L9
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %r9
	imulq	%rbp
	movq	%r9, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%r9, %rsi
	subq	%rax, %rsi
.L9:
	imulq	%rcx, %rcx
	shrq	%rdi
	movq	%rcx, %rax
	mulq	%rbp
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %r8d
	jne	.L10
	imulq	%r10, %rsi
	movl	$30, %r8d
	movl	$1000000005, %edi
	movq	%rsi, %rax
	imulq	%rbp
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %r10
	sarq	$29, %r10
	subq	%rax, %r10
	imulq	$1000000007, %r10, %rax
	subq	%rax, %rsi
	movslq	%r12d, %rax
	movq	%rsi, %r10
	movq	(%rbx,%r14,8), %rsi
	imulq	(%r15), %rsi
	movq	(%rbx,%rax,8), %r11
	movq	%rsi, %rax
	imulq	%rbp
	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, %rcx
	movl	$1, %esi
	.p2align 4,,10
	.p2align 3
.L12:
	testb	$1, %dil
	je	.L11
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %r9
	imulq	%rbp
	movq	%r9, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%r9, %rsi
	subq	%rax, %rsi
.L11:
	imulq	%rcx, %rcx
	shrq	%rdi
	movq	%rcx, %rax
	mulq	%rbp
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	subl	$1, %r8d
	jne	.L12
	imulq	%r11, %rsi
	movl	$1, %edi
	movq	%rsi, %rax
	imulq	%rbp
	leaq	(%rdx,%rsi), %rax
	movq	%rsi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rsi
	imulq	%r10, %rsi
	movq	%rsi, %rax
	imulq	%rbp
	leaq	(%rdx,%rsi), %rax
	movq	%rsi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	movq	%rsi, %rdx
	movq	%r13, %rsi
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L8:
	movslq	4(%rsp), %rax
	addq	$1, %r14
	subq	$8, %r15
	cmpl	%r14d, %eax
	jge	.L13
.L14:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L35
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L34:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L8
.L35:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.globl	fcinv
	.bss
	.align 32
	.type	fcinv, @object
	.size	fcinv, 16008
fcinv:
	.zero	16008
	.globl	fact
	.align 32
	.type	fact, @object
	.size	fact, 16008
fact:
	.zero	16008
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>
#define MOD 1000000007
#define modml(a,b) ((long)(1ll * (a) * (b) % MOD))
#define modadd(a,b) (((a)+(b)) % MOD)

static inline long modpow(long num,long ind){
    unsigned long cnt = ind;
    long res = 1;
    while(cnt){
        if(cnt & 1ul)res = modml(res,num);
        num = modml(num,num);
        cnt >>= 1;
    }
    return res;
}

long fact[2001];
long fcinv[2001];

static inline long modinv(long num){
    return modpow(num,MOD-2);
}

static inline long modnck(long n,long k){
    return modml(fact[n],modinv(modml(fact[k],fact[n-k])));
}

int main(void){
    register int i;
    fact[0] = 1;
    for(i = 1;i <= 2000;i++)fact[i] = modml(fact[i-1],i);
    for(i = 1;i <= 2000;i++)fcinv[i] = modinv(fact[i]);

    int n,k,r;
    scanf("%d %d",&n,&k);
    r = n - k;
    for(i = 1;i <= k;i++){
        if(k-1 < i-1 || r + 1 < i){
            puts("0");
            continue;
        }
        printf("%ld\n",modml(modnck(k-1,i-1),modnck(r+1,i)));
    }
}
7 3
 1776 3
 7 5
 195 3
 5 5
 206 3
 96 3
 96 2
 2000 1
 7 4

5
20
10
 1774
3145302
928912524
 3
12
6
0
0
 193
37056
1179616
 1
0
0
0
0
 204
41412
1394204
 94
8742
134044
 95
4465
 2000
 4
18
12
1

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

```c
#include<stdio.h>
#define MOD 1000000007
#define modml(a,b) ((long)(1ll * (a) * (b) % MOD))
#define modadd(a,b) (((a)+(b)) % MOD)

static inline long modpow(long num,long ind){
    unsigned long cnt = ind;
    long res = 1;
    while(cnt){
        if(cnt & 1ul)res = modml(res,num);
        num = modml(num,num);
        cnt >>= 1;
    }
    return res;
}

long fact[2001];
long fcinv[2001];

static inline long modinv(long num){
    return modpow(num,MOD-2);
}

static inline long modnck(long n,long k){
    return modml(fact[n],modinv(modml(fact[k],fact[n-k])));
}

int main(void){
    register int i;
    fact[0] = 1;
    for(i = 1;i <= 2000;i++)fact[i] = modml(fact[i-1],i);
    for(i = 1;i <= 2000;i++)fcinv[i] = modinv(fact[i]);

    int n,k,r;
    scanf("%d %d",&n,&k);
    r = n - k;
    for(i = 1;i <= k;i++){
        if(k-1 < i-1 || r + 1 < i){
            puts("0");
            continue;
        }
        printf("%ld\n",modml(modnck(k-1,i-1),modnck(r+1,i)));
    }
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.type	modpow, @function
modpow:
.LFB0:
	.cfi_startproc
	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	-32(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	$1, -8(%rbp)
	jmp	.L2
.L4:
	movq	-16(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.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)
.L3:
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -24(%rbp)
	movq	-24(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -24(%rbp)
	shrq	-16(%rbp)
.L2:
	cmpq	$0, -16(%rbp)
	jne	.L4
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	modpow, .-modpow
	.globl	fact
	.bss
	.align 32
	.type	fact, @object
	.size	fact, 16008
fact:
	.zero	16008
	.globl	fcinv
	.align 32
	.type	fcinv, @object
	.size	fcinv, 16008
fcinv:
	.zero	16008
	.text
	.type	modinv, @function
modinv:
.LFB1:
	.cfi_startproc
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	$1000000005, %esi
	movq	%rax, %rdi
	call	modpow
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	modinv, .-modinv
	.type	modnck, @function
modnck:
.LFB2:
	.cfi_startproc
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -16(%rbp)
	movq	%rsi, -24(%rbp)
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	fact(%rip), %rax
	movq	(%rdx,%rax), %rbx
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	fact(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-16(%rbp), %rax
	subq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	leaq	fact(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, %rdi
	call	modinv
	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	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	modnck, .-modnck
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"0"
.LC2:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movq	$1, fact(%rip)
	movl	$1, %ebx
	jmp	.L11
.L12:
	leal	-1(%rbx), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	fact(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movslq	%ebx, %rax
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movslq	%ebx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	fact(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, %ebx
.L11:
	cmpl	$2000, %ebx
	jle	.L12
	movl	$1, %ebx
	jmp	.L13
.L14:
	movslq	%ebx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	fact(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rdi
	call	modinv
	movslq	%ebx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	fcinv(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, %ebx
.L13:
	cmpl	$2000, %ebx
	jle	.L14
	leaq	-32(%rbp), %rdx
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-36(%rbp), %eax
	movl	-32(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$1, %ebx
	jmp	.L15
.L19:
	movl	-32(%rbp), %eax
	cmpl	%eax, %ebx
	jg	.L16
	movl	-28(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, %ebx
	jle	.L17
.L16:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L18
.L17:
	leal	-1(%rbx), %eax
	movslq	%eax, %rdx
	movl	-32(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	modnck
	movq	%rax, %r12
	movslq	%ebx, %rdx
	movl	-28(%rbp), %eax
	addl	$1, %eax
	cltq
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	modnck
	movq	%r12, %rcx
	imulq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L18:
	addl	$1, %ebx
.L15:
	movl	-32(%rbp), %eax
	cmpl	%eax, %ebx
	jle	.L19
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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
	.type	modpow, @function
modpow:
.LFB0:
	.cfi_startproc
	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	-32(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	$1, -8(%rbp)
	jmp	.L2
.L4:
	movq	-16(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.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)
.L3:
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -24(%rbp)
	movq	-24(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -24(%rbp)
	shrq	-16(%rbp)
.L2:
	cmpq	$0, -16(%rbp)
	jne	.L4
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	modpow, .-modpow
	.globl	fact
	.bss
	.align 32
	.type	fact, @object
	.size	fact, 16008
fact:
	.zero	16008
	.globl	fcinv
	.align 32
	.type	fcinv, @object
	.size	fcinv, 16008
fcinv:
	.zero	16008
	.text
	.type	modinv, @function
modinv:
.LFB1:
	.cfi_startproc
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	$1000000005, %esi
	movq	%rax, %rdi
	call	modpow
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	modinv, .-modinv
	.type	modnck, @function
modnck:
.LFB2:
	.cfi_startproc
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -16(%rbp)
	movq	%rsi, -24(%rbp)
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	fact(%rip), %rax
	movq	(%rdx,%rax), %rbx
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	fact(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-16(%rbp), %rax
	subq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	leaq	fact(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, %rdi
	call	modinv
	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	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	modnck, .-modnck
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"0"
.LC2:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movq	$1, fact(%rip)
	movl	$1, %ebx
	jmp	.L11
.L12:
	leal	-1(%rbx), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	fact(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movslq	%ebx, %rax
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movslq	%ebx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	fact(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, %ebx
.L11:
	cmpl	$2000, %ebx
	jle	.L12
	movl	$1, %ebx
	jmp	.L13
.L14:
	movslq	%ebx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	fact(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rdi
	call	modinv
	movslq	%ebx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	fcinv(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, %ebx
.L13:
	cmpl	$2000, %ebx
	jle	.L14
	leaq	-32(%rbp), %rdx
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-36(%rbp), %eax
	movl	-32(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$1, %ebx
	jmp	.L15
.L19:
	movl	-32(%rbp), %eax
	cmpl	%eax, %ebx
	jg	.L16
	movl	-28(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, %ebx
	jle	.L17
.L16:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L18
.L17:
	leal	-1(%rbx), %eax
	movslq	%eax, %rdx
	movl	-32(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	modnck
	movq	%rax, %r12
	movslq	%ebx, %rdx
	movl	-28(%rbp), %eax
	addl	$1, %eax
	cltq
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	modnck
	movq	%r12, %rcx
	imulq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L18:
	addl	$1, %ebx
.L15:
	movl	-32(%rbp), %eax
	cmpl	%eax, %ebx
	jle	.L19
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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:
