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 <string.h>
#include <stdlib.h>
#include <stdint.h> // uint64_t

#define max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) > (b) ? (b) : (a))
#define BUF_SIZE 20
#define DIVISOR 1000000007

int get_int2(int *a1, int *a2) {
#ifdef BUF_SIZE
  char line[BUF_SIZE];
  if(!fgets(line, BUF_SIZE, stdin)) return -1;
  sscanf(line, "%d %d", a1, a2);
#else
#error
#endif
  return 0;
}
#define NUM_MAX 1000
#define K_MAX 1000

static uint64_t factorial[NUM_MAX+K_MAX+1];
static uint64_t inv_factorial[NUM_MAX+K_MAX+1];

struct pair {
    int x;
    int y;
};

struct pair gcdext(int a, int b) {
    if(a == 0) { return (struct pair){0, 1}; }
    struct pair p = gcdext(b%a, a);
    return (struct pair){p.y - (b/a)*p.x, p.x};
}

void prep_combi(int n) {
    // prep
    int i;
    factorial[0] = factorial[1] = 1;
    for(i = 2; i <= n; i++) {
        factorial[i] = (factorial[i-1] * i)%DIVISOR;
    }

    inv_factorial[0] = inv_factorial[1] = 1;
    for(i = 2; i <= n; i++) {
        struct pair p = gcdext(i, DIVISOR);
        int inv = (p.x + DIVISOR)%DIVISOR;
        inv_factorial[i] = (inv_factorial[i-1]*inv)%DIVISOR;
    }
}

uint64_t calc_combi(int n, int k) {
    uint64_t ans = 1;
    ans = (ans * factorial[n])%DIVISOR;
    ans = (ans * inv_factorial[k])%DIVISOR;
    ans = (ans * inv_factorial[n-k])%DIVISOR;
    return ans;
}

void init() {
    prep_combi(NUM_MAX+K_MAX);
}

int main(void) {
    int n, k;
    init();
    get_int2(&n, &k);
    uint64_t ans = 0;
    
    if(n >= k) ans = calc_combi(n-1, k-1);
    printf("%d\n", (int)ans);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
	.text
	.globl	get_int2
	.type	get_int2, @function
get_int2:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rdx
	leaq	-32(%rbp), %rax
	movl	$20, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	jne	.L2
	movl	$-1, %eax
	jmp	.L4
.L2:
	movq	-48(%rbp), %rcx
	movq	-40(%rbp), %rdx
	leaq	-32(%rbp), %rax
	leaq	.LC0(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	$0, %eax
.L4:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_int2, .-get_int2
	.local	factorial
	.comm	factorial,16008,32
	.local	inv_factorial
	.comm	inv_factorial,16008,32
	.globl	gcdext
	.type	gcdext, @function
gcdext:
.LFB7:
	.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
	movl	%edi, -36(%rbp)
	movl	%esi, -40(%rbp)
	cmpl	$0, -36(%rbp)
	jne	.L7
	movabsq	$-4294967296, %rax
	andq	%rbx, %rax
	movq	%rax, %rbx
	movl	%ebx, %edx
	movabsq	$4294967296, %rax
	orq	%rdx, %rax
	movq	%rax, %rbx
	jmp	.L9
.L7:
	movl	-40(%rbp), %eax
	cltd
	idivl	-36(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, %esi
	movl	%edx, %edi
	call	gcdext
	movq	%rax, -24(%rbp)
	movl	-20(%rbp), %ecx
	movl	-40(%rbp), %eax
	cltd
	idivl	-36(%rbp)
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	imull	%edx, %eax
	subl	%eax, %ecx
	movl	-24(%rbp), %edx
	movl	%ecx, %ecx
	movabsq	$-4294967296, %rax
	andq	%rbx, %rax
	orq	%rcx, %rax
	movq	%rax, %rbx
	movl	%edx, %eax
	salq	$32, %rax
	movl	%ebx, %edx
	orq	%rdx, %rax
	movq	%rax, %rbx
.L9:
	movq	%rbx, %rax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	gcdext, .-gcdext
	.globl	prep_combi
	.type	prep_combi, @function
prep_combi:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movq	$1, 8+factorial(%rip)
	movq	8+factorial(%rip), %rax
	movq	%rax, factorial(%rip)
	movl	$2, -16(%rbp)
	jmp	.L11
.L12:
	movl	-16(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	factorial(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-16(%rbp), %eax
	cltq
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	mulq	%rdx
	movq	%rdx, %rax
	shrq	$29, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	factorial(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L11:
	movl	-16(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L12
	movq	$1, 8+inv_factorial(%rip)
	movq	8+inv_factorial(%rip), %rax
	movq	%rax, inv_factorial(%rip)
	movl	$2, -16(%rbp)
	jmp	.L13
.L14:
	movl	-16(%rbp), %eax
	movl	$1000000007, %esi
	movl	%eax, %edi
	call	gcdext
	movq	%rax, -8(%rbp)
	movl	-8(%rbp), %eax
	addl	$1000000007, %eax
	movslq	%eax, %rdx
	imulq	$1152921497, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$28, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	movl	%edx, -12(%rbp)
	movl	-12(%rbp), %edx
	imull	$1000000007, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	inv_factorial(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-12(%rbp), %eax
	cltq
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	mulq	%rdx
	movq	%rdx, %rax
	shrq	$29, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	inv_factorial(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L13:
	movl	-16(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L14
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	prep_combi, .-prep_combi
	.globl	calc_combi
	.type	calc_combi, @function
calc_combi:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movq	$1, -8(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	factorial(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	-8(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	mulq	%rdx
	movq	%rdx, %rax
	shrq	$29, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	inv_factorial(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	-8(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	mulq	%rdx
	movq	%rdx, %rax
	shrq	$29, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movl	-20(%rbp), %eax
	subl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	inv_factorial(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	-8(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	mulq	%rdx
	movq	%rdx, %rax
	shrq	$29, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	calc_combi, .-calc_combi
	.globl	init
	.type	init, @function
init:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$2000, %edi
	call	prep_combi
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	init, .-init
	.section	.rodata
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, %eax
	call	init
	leaq	-20(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	get_int2
	movq	$0, -16(%rbp)
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L19
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	calc_combi
	movq	%rax, -16(%rbp)
.L19:
	movq	-16(%rbp), %rax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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
	.type	gcdext.part.0, @function
gcdext.part.0:
.LFB57:
	.cfi_startproc
	movl	%esi, %eax
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	cltd
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	idivl	%edi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	movl	%edx, %ebp
	testl	%edx, %edx
	jne	.L17
	movl	%edx, %ecx
	movl	$1, %edx
.L2:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	salq	$32, %rcx
	movl	%edx, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	orq	%rcx, %rax
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	movl	%eax, %r12d
	movl	%edi, %eax
	movl	$1, %ecx
	cltd
	idivl	%ebp
	movl	%edx, %r13d
	movl	%eax, %ebx
	testl	%edx, %edx
	je	.L3
	movl	%ebp, %eax
	cltd
	idivl	%r13d
	movl	%edx, %r8d
	movl	%edx, %ecx
	movl	%eax, %ebp
	movl	$1, %edx
	testl	%r8d, %r8d
	jne	.L18
.L4:
	imull	%edx, %ebx
	subl	%ebx, %ecx
.L3:
	movl	%r12d, %esi
	imull	%ecx, %esi
	subl	%esi, %edx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L18:
	movl	%r13d, %eax
	movl	$1, %ecx
	cltd
	idivl	%r8d
	movl	%eax, %r13d
	testl	%edx, %edx
	je	.L5
	movl	%r8d, %esi
	movl	%edx, %edi
	call	gcdext.part.0
	movl	%r13d, %esi
	imull	%eax, %esi
	movq	%rax, %rcx
	movl	%eax, %edx
	sarq	$32, %rcx
	subl	%esi, %ecx
.L5:
	movl	%ebp, %r8d
	imull	%ecx, %r8d
	subl	%r8d, %edx
	jmp	.L4
	.cfi_endproc
.LFE57:
	.size	gcdext.part.0, .-gcdext.part.0
	.p2align 4
	.type	prep_combi.constprop.0, @function
prep_combi.constprop.0:
.LFB60:
	.cfi_startproc
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	$2, %ecx
	movdqa	.LC0(%rip), %xmm0
	movl	$1, %edx
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	factorial(%rip), %r8
	movabsq	$-8543223828751151131, %rdi
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movaps	%xmm0, factorial(%rip)
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%rdx, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	mulq	%rdi
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rsi
	movq	%rsi, (%r8,%rcx,8)
	addq	$1, %rcx
	movq	%rsi, %rdx
	cmpq	$2001, %rcx
	jne	.L20
	leaq	inv_factorial(%rip), %rbx
	movl	$2, %r9d
	movaps	%xmm0, inv_factorial(%rip)
	movabsq	$-8543223828751151131, %r10
	leaq	-8(%rbx), %r11
	.p2align 4,,10
	.p2align 3
.L25:
	movl	$1000000007, %eax
	movl	%r9d, %ebp
	movl	$1, %ecx
	cltd
	idivl	%r9d
	movl	%edx, %r12d
	testl	%edx, %edx
	je	.L21
	movl	%r9d, %eax
	movl	$1, %r8d
	cltd
	idivl	%r12d
	movl	%edx, %r13d
	movl	%eax, %r14d
	movl	%edx, %ecx
	testl	%edx, %edx
	je	.L22
	movl	%r12d, %eax
	movl	$1, %ecx
	cltd
	idivl	%r13d
	movl	%edx, %esi
	movl	%eax, %r12d
	movl	%edx, %r8d
	testl	%edx, %edx
	je	.L23
	movl	%r13d, %eax
	movl	$1, %r8d
	cltd
	idivl	%esi
	movl	%eax, %r13d
	testl	%edx, %edx
	jne	.L37
.L24:
	movl	%r12d, %esi
	movl	%edx, %ecx
	imull	%r8d, %esi
	subl	%esi, %ecx
.L23:
	imull	%ecx, %r14d
	subl	%r14d, %r8d
.L22:
	movl	$1000000007, %eax
	cltd
	idivl	%ebp
	imull	%r8d, %eax
	subl	%eax, %ecx
	addl	$1000000007, %ecx
	movslq	%ecx, %rax
	movl	%ecx, %edx
	imulq	$1152921497, %rax, %rax
	sarl	$31, %edx
	sarq	$60, %rax
	subl	%edx, %eax
	imull	$1000000007, %eax, %eax
	subl	%eax, %ecx
	movslq	%ecx, %rcx
.L21:
	imulq	(%r11,%r9,8), %rcx
	movq	%rcx, %rax
	mulq	%r10
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	movq	%rcx, (%rbx,%r9,8)
	addq	$1, %r9
	cmpq	$2001, %r9
	jne	.L25
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L37:
	.cfi_restore_state
	movl	%edx, %edi
	call	gcdext.part.0
	movl	%r13d, %edi
	imull	%eax, %edi
	movq	%rax, %r8
	movl	%eax, %edx
	sarq	$32, %r8
	subl	%edi, %r8d
	jmp	.L24
	.cfi_endproc
.LFE60:
	.size	prep_combi.constprop.0, .-prep_combi.constprop.0
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d"
	.text
	.p2align 4
	.globl	get_int2
	.type	get_int2, @function
get_int2:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movq	%rsi, %r13
	movl	$20, %esi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movq	stdin(%rip), %rdx
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L41
	movq	%r13, %rcx
	movq	%r12, %rdx
	leaq	.LC1(%rip), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	xorl	%eax, %eax
.L38:
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L43
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L41:
	.cfi_restore_state
	movl	$-1, %eax
	jmp	.L38
.L43:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	get_int2, .-get_int2
	.p2align 4
	.globl	gcdext
	.type	gcdext, @function
gcdext:
.LFB52:
	.cfi_startproc
	endbr64
	movl	$1, %ecx
	testl	%edi, %edi
	jne	.L63
	salq	$32, %rcx
	movl	%edi, %eax
	orq	%rcx, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L63:
	movl	%esi, %eax
	cltd
	idivl	%edi
	movl	%edx, %r10d
	movl	%eax, %r9d
	movl	%edx, %ecx
	testl	%edx, %edx
	je	.L51
	movl	%edi, %eax
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	$1, %ecx
	cltd
	idivl	%r10d
	movl	%edx, %r11d
	movl	%eax, %ebx
	movl	%edx, %edi
	testl	%edx, %edx
	jne	.L64
.L47:
	movl	%r9d, %esi
	popq	%rbx
	.cfi_def_cfa_offset 8
	imull	%ecx, %esi
	salq	$32, %rcx
	subl	%esi, %edi
	movl	%edi, %eax
	orq	%rcx, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L51:
	.cfi_restore 3
	movl	$1, %edi
	salq	$32, %rcx
	movl	%edi, %eax
	orq	%rcx, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L64:
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	%r10d, %eax
	movl	$1, %edi
	cltd
	idivl	%r11d
	movl	%edx, %esi
	movl	%eax, %r10d
	movl	%edx, %ecx
	testl	%edx, %edx
	je	.L48
	movl	%r11d, %eax
	movl	$1, %ecx
	cltd
	idivl	%esi
	movl	%edx, %edi
	movl	%eax, %r11d
	testl	%edx, %edx
	jne	.L65
.L49:
	movl	%r10d, %esi
	imull	%ecx, %esi
	subl	%esi, %edi
.L48:
	imull	%edi, %ebx
	subl	%ebx, %ecx
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L65:
	call	gcdext.part.0
	movl	%r11d, %r8d
	imull	%eax, %r8d
	movq	%rax, %rcx
	movl	%eax, %edi
	sarq	$32, %rcx
	subl	%r8d, %ecx
	jmp	.L49
	.cfi_endproc
.LFE52:
	.size	gcdext, .-gcdext
	.p2align 4
	.globl	prep_combi
	.type	prep_combi, @function
prep_combi:
.LFB53:
	.cfi_startproc
	endbr64
	movdqa	.LC0(%rip), %xmm0
	movaps	%xmm0, factorial(%rip)
	cmpl	$1, %edi
	jle	.L67
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leal	1(%rdi), %r10d
	movl	$2, %ecx
	movl	$1, %edx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	factorial(%rip), %r8
	movabsq	$-8543223828751151131, %rdi
	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
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L68:
	movq	%rdx, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	mulq	%rdi
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rsi
	movq	%rsi, (%r8,%rcx,8)
	addq	$1, %rcx
	movq	%rsi, %rdx
	cmpq	%rcx, %r10
	jne	.L68
	leaq	inv_factorial(%rip), %rbp
	movl	$2, %r9d
	movaps	%xmm0, inv_factorial(%rip)
	movabsq	$-8543223828751151131, %r11
	leaq	-8(%rbp), %rbx
	.p2align 4,,10
	.p2align 3
.L74:
	movl	$1000000007, %eax
	movl	%r9d, %r12d
	movl	$1, %ecx
	cltd
	idivl	%r9d
	movl	%edx, %r13d
	testl	%edx, %edx
	je	.L70
	movl	%r9d, %eax
	movl	$1, %r8d
	cltd
	idivl	%r13d
	movl	%edx, %r15d
	movl	%eax, %r14d
	movl	%edx, %ecx
	testl	%edx, %edx
	je	.L71
	movl	%r13d, %eax
	movl	$1, %ecx
	cltd
	idivl	%r15d
	movl	%edx, %esi
	movl	%eax, %r13d
	movl	%edx, %r8d
	testl	%edx, %edx
	je	.L72
	movl	%r15d, %eax
	movl	$1, %r8d
	cltd
	idivl	%esi
	movl	%eax, %r15d
	testl	%edx, %edx
	jne	.L91
.L73:
	movl	%r13d, %esi
	movl	%edx, %ecx
	imull	%r8d, %esi
	subl	%esi, %ecx
.L72:
	imull	%ecx, %r14d
	subl	%r14d, %r8d
.L71:
	movl	$1000000007, %eax
	cltd
	idivl	%r12d
	imull	%r8d, %eax
	subl	%eax, %ecx
	addl	$1000000007, %ecx
	movslq	%ecx, %rax
	movl	%ecx, %edx
	imulq	$1152921497, %rax, %rax
	sarl	$31, %edx
	sarq	$60, %rax
	subl	%edx, %eax
	imull	$1000000007, %eax, %eax
	subl	%eax, %ecx
	movslq	%ecx, %rcx
.L70:
	imulq	(%rbx,%r9,8), %rcx
	movq	%rcx, %rax
	mulq	%r11
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	movq	%rcx, 0(%rbp,%r9,8)
	addq	$1, %r9
	cmpq	%r9, %r10
	jne	.L74
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	.p2align 4,,10
	.p2align 3
.L91:
	.cfi_restore_state
	movl	%edx, %edi
	call	gcdext.part.0
	movl	%r15d, %edi
	imull	%eax, %edi
	movq	%rax, %r8
	movl	%eax, %edx
	sarq	$32, %r8
	subl	%edi, %r8d
	jmp	.L73
	.p2align 4,,10
	.p2align 3
.L67:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	movaps	%xmm0, inv_factorial(%rip)
	ret
	.cfi_endproc
.LFE53:
	.size	prep_combi, .-prep_combi
	.p2align 4
	.globl	calc_combi
	.type	calc_combi, @function
calc_combi:
.LFB54:
	.cfi_startproc
	endbr64
	movslq	%edi, %rdx
	leaq	factorial(%rip), %rax
	movl	%esi, %r8d
	movabsq	$-8543223828751151131, %rsi
	movq	(%rax,%rdx,8), %rcx
	leaq	inv_factorial(%rip), %r9
	subl	%r8d, %edi
	movslq	%edi, %rdi
	movq	%rcx, %rax
	mulq	%rsi
	movslq	%r8d, %rax
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	imulq	(%r9,%rax,8), %rcx
	movq	%rcx, %rax
	mulq	%rsi
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	imulq	(%r9,%rdi,8), %rcx
	movq	%rcx, %rax
	mulq	%rsi
	movq	%rdx, %rax
	shrq	$29, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	ret
	.cfi_endproc
.LFE54:
	.size	calc_combi, .-calc_combi
	.p2align 4
	.globl	init
	.type	init, @function
init:
.LFB55:
	.cfi_startproc
	endbr64
	jmp	prep_combi.constprop.0
	.cfi_endproc
.LFE55:
	.size	init, .-init
	.section	.rodata.str1.1
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB56:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	call	prep_combi.constprop.0
	movq	%rsp, %rdi
	leaq	4(%rsp), %rsi
	call	get_int2
	movl	(%rsp), %ecx
	movl	4(%rsp), %edi
	xorl	%edx, %edx
	cmpl	%edi, %ecx
	jl	.L95
	leal	-1(%rcx), %eax
	leaq	factorial(%rip), %rdx
	movl	$1000000007, %esi
	subl	%edi, %ecx
	cltq
	leaq	inv_factorial(%rip), %r8
	movslq	%ecx, %rcx
	movq	(%rdx,%rax,8), %rax
	xorl	%edx, %edx
	divq	%rsi
	leal	-1(%rdi), %eax
	cltq
	imulq	(%r8,%rax,8), %rdx
	movq	%rdx, %rax
	xorl	%edx, %edx
	divq	%rsi
	movq	(%r8,%rcx,8), %rax
	imulq	%rdx, %rax
	xorl	%edx, %edx
	divq	%rsi
.L95:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L100
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L100:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE56:
	.size	main, .-main
	.local	inv_factorial
	.comm	inv_factorial,16008,32
	.local	factorial
	.comm	factorial,16008,32
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.quad	1
	.quad	1
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.type	gcdext.part.0, @function
gcdext.part.0:
.LFB57:
	.cfi_startproc
	movl	%esi, %eax
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	cltd
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	idivl	%edi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	movl	%edx, %ebp
	testl	%edx, %edx
	jne	.L17
	movl	%edx, %ecx
	movl	$1, %edx
.L2:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	salq	$32, %rcx
	movl	%edx, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	orq	%rcx, %rax
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	movl	%eax, %r12d
	movl	%edi, %eax
	movl	$1, %ecx
	cltd
	idivl	%ebp
	movl	%edx, %r13d
	movl	%eax, %ebx
	testl	%edx, %edx
	je	.L3
	movl	%ebp, %eax
	cltd
	idivl	%r13d
	movl	%edx, %r8d
	movl	%edx, %ecx
	movl	%eax, %ebp
	movl	$1, %edx
	testl	%r8d, %r8d
	jne	.L18
.L4:
	imull	%edx, %ebx
	subl	%ebx, %ecx
.L3:
	movl	%r12d, %esi
	imull	%ecx, %esi
	subl	%esi, %edx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L18:
	movl	%r13d, %eax
	movl	$1, %ecx
	cltd
	idivl	%r8d
	movl	%eax, %r13d
	testl	%edx, %edx
	je	.L5
	movl	%r8d, %esi
	movl	%edx, %edi
	call	gcdext.part.0
	movl	%r13d, %esi
	imull	%eax, %esi
	movq	%rax, %rcx
	movl	%eax, %edx
	sarq	$32, %rcx
	subl	%esi, %ecx
.L5:
	movl	%ebp, %r8d
	imull	%ecx, %r8d
	subl	%r8d, %edx
	jmp	.L4
	.cfi_endproc
.LFE57:
	.size	gcdext.part.0, .-gcdext.part.0
	.p2align 4
	.type	prep_combi.constprop.0, @function
prep_combi.constprop.0:
.LFB60:
	.cfi_startproc
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	$2, %ecx
	movdqa	.LC0(%rip), %xmm0
	movl	$1, %edx
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	factorial(%rip), %r8
	movabsq	$-8543223828751151131, %rdi
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movaps	%xmm0, factorial(%rip)
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%rdx, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	mulq	%rdi
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rsi
	movq	%rsi, (%r8,%rcx,8)
	addq	$1, %rcx
	movq	%rsi, %rdx
	cmpq	$2001, %rcx
	jne	.L20
	leaq	inv_factorial(%rip), %rbx
	movl	$2, %r9d
	movaps	%xmm0, inv_factorial(%rip)
	movabsq	$-8543223828751151131, %r10
	leaq	-8(%rbx), %r11
	.p2align 4,,10
	.p2align 3
.L25:
	movl	$1000000007, %eax
	movl	%r9d, %ebp
	movl	$1, %ecx
	cltd
	idivl	%r9d
	movl	%edx, %r12d
	testl	%edx, %edx
	je	.L21
	movl	%r9d, %eax
	movl	$1, %r8d
	cltd
	idivl	%r12d
	movl	%edx, %r13d
	movl	%eax, %r14d
	movl	%edx, %ecx
	testl	%edx, %edx
	je	.L22
	movl	%r12d, %eax
	movl	$1, %ecx
	cltd
	idivl	%r13d
	movl	%edx, %esi
	movl	%eax, %r12d
	movl	%edx, %r8d
	testl	%edx, %edx
	je	.L23
	movl	%r13d, %eax
	movl	$1, %r8d
	cltd
	idivl	%esi
	movl	%eax, %r13d
	testl	%edx, %edx
	jne	.L37
.L24:
	movl	%r12d, %esi
	movl	%edx, %ecx
	imull	%r8d, %esi
	subl	%esi, %ecx
.L23:
	imull	%ecx, %r14d
	subl	%r14d, %r8d
.L22:
	movl	$1000000007, %eax
	cltd
	idivl	%ebp
	imull	%r8d, %eax
	subl	%eax, %ecx
	addl	$1000000007, %ecx
	movslq	%ecx, %rax
	movl	%ecx, %edx
	imulq	$1152921497, %rax, %rax
	sarl	$31, %edx
	sarq	$60, %rax
	subl	%edx, %eax
	imull	$1000000007, %eax, %eax
	subl	%eax, %ecx
	movslq	%ecx, %rcx
.L21:
	imulq	(%r11,%r9,8), %rcx
	movq	%rcx, %rax
	mulq	%r10
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	movq	%rcx, (%rbx,%r9,8)
	addq	$1, %r9
	cmpq	$2001, %r9
	jne	.L25
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L37:
	.cfi_restore_state
	movl	%edx, %edi
	call	gcdext.part.0
	movl	%r13d, %edi
	imull	%eax, %edi
	movq	%rax, %r8
	movl	%eax, %edx
	sarq	$32, %r8
	subl	%edi, %r8d
	jmp	.L24
	.cfi_endproc
.LFE60:
	.size	prep_combi.constprop.0, .-prep_combi.constprop.0
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d"
	.text
	.p2align 4
	.globl	get_int2
	.type	get_int2, @function
get_int2:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movq	%rsi, %r13
	movl	$20, %esi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movq	stdin(%rip), %rdx
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L41
	movq	%r13, %rcx
	movq	%r12, %rdx
	leaq	.LC1(%rip), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	xorl	%eax, %eax
.L38:
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L43
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L41:
	.cfi_restore_state
	movl	$-1, %eax
	jmp	.L38
.L43:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	get_int2, .-get_int2
	.p2align 4
	.globl	gcdext
	.type	gcdext, @function
gcdext:
.LFB52:
	.cfi_startproc
	endbr64
	movl	$1, %ecx
	testl	%edi, %edi
	jne	.L63
	salq	$32, %rcx
	movl	%edi, %eax
	orq	%rcx, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L63:
	movl	%esi, %eax
	cltd
	idivl	%edi
	movl	%edx, %r10d
	movl	%eax, %r9d
	movl	%edx, %ecx
	testl	%edx, %edx
	je	.L51
	movl	%edi, %eax
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	$1, %ecx
	cltd
	idivl	%r10d
	movl	%edx, %r11d
	movl	%eax, %ebx
	movl	%edx, %edi
	testl	%edx, %edx
	jne	.L64
.L47:
	movl	%r9d, %esi
	popq	%rbx
	.cfi_def_cfa_offset 8
	imull	%ecx, %esi
	salq	$32, %rcx
	subl	%esi, %edi
	movl	%edi, %eax
	orq	%rcx, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L51:
	.cfi_restore 3
	movl	$1, %edi
	salq	$32, %rcx
	movl	%edi, %eax
	orq	%rcx, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L64:
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	%r10d, %eax
	movl	$1, %edi
	cltd
	idivl	%r11d
	movl	%edx, %esi
	movl	%eax, %r10d
	movl	%edx, %ecx
	testl	%edx, %edx
	je	.L48
	movl	%r11d, %eax
	movl	$1, %ecx
	cltd
	idivl	%esi
	movl	%edx, %edi
	movl	%eax, %r11d
	testl	%edx, %edx
	jne	.L65
.L49:
	movl	%r10d, %esi
	imull	%ecx, %esi
	subl	%esi, %edi
.L48:
	imull	%edi, %ebx
	subl	%ebx, %ecx
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L65:
	call	gcdext.part.0
	movl	%r11d, %r8d
	imull	%eax, %r8d
	movq	%rax, %rcx
	movl	%eax, %edi
	sarq	$32, %rcx
	subl	%r8d, %ecx
	jmp	.L49
	.cfi_endproc
.LFE52:
	.size	gcdext, .-gcdext
	.p2align 4
	.globl	prep_combi
	.type	prep_combi, @function
prep_combi:
.LFB53:
	.cfi_startproc
	endbr64
	movdqa	.LC0(%rip), %xmm0
	movaps	%xmm0, factorial(%rip)
	cmpl	$1, %edi
	jle	.L67
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leal	1(%rdi), %r10d
	movl	$2, %ecx
	movl	$1, %edx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	factorial(%rip), %r8
	movabsq	$-8543223828751151131, %rdi
	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
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L68:
	movq	%rdx, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	mulq	%rdi
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rsi
	movq	%rsi, (%r8,%rcx,8)
	addq	$1, %rcx
	movq	%rsi, %rdx
	cmpq	%rcx, %r10
	jne	.L68
	leaq	inv_factorial(%rip), %rbp
	movl	$2, %r9d
	movaps	%xmm0, inv_factorial(%rip)
	movabsq	$-8543223828751151131, %r11
	leaq	-8(%rbp), %rbx
	.p2align 4,,10
	.p2align 3
.L74:
	movl	$1000000007, %eax
	movl	%r9d, %r12d
	movl	$1, %ecx
	cltd
	idivl	%r9d
	movl	%edx, %r13d
	testl	%edx, %edx
	je	.L70
	movl	%r9d, %eax
	movl	$1, %r8d
	cltd
	idivl	%r13d
	movl	%edx, %r15d
	movl	%eax, %r14d
	movl	%edx, %ecx
	testl	%edx, %edx
	je	.L71
	movl	%r13d, %eax
	movl	$1, %ecx
	cltd
	idivl	%r15d
	movl	%edx, %esi
	movl	%eax, %r13d
	movl	%edx, %r8d
	testl	%edx, %edx
	je	.L72
	movl	%r15d, %eax
	movl	$1, %r8d
	cltd
	idivl	%esi
	movl	%eax, %r15d
	testl	%edx, %edx
	jne	.L91
.L73:
	movl	%r13d, %esi
	movl	%edx, %ecx
	imull	%r8d, %esi
	subl	%esi, %ecx
.L72:
	imull	%ecx, %r14d
	subl	%r14d, %r8d
.L71:
	movl	$1000000007, %eax
	cltd
	idivl	%r12d
	imull	%r8d, %eax
	subl	%eax, %ecx
	addl	$1000000007, %ecx
	movslq	%ecx, %rax
	movl	%ecx, %edx
	imulq	$1152921497, %rax, %rax
	sarl	$31, %edx
	sarq	$60, %rax
	subl	%edx, %eax
	imull	$1000000007, %eax, %eax
	subl	%eax, %ecx
	movslq	%ecx, %rcx
.L70:
	imulq	(%rbx,%r9,8), %rcx
	movq	%rcx, %rax
	mulq	%r11
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	movq	%rcx, 0(%rbp,%r9,8)
	addq	$1, %r9
	cmpq	%r9, %r10
	jne	.L74
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	.p2align 4,,10
	.p2align 3
.L91:
	.cfi_restore_state
	movl	%edx, %edi
	call	gcdext.part.0
	movl	%r15d, %edi
	imull	%eax, %edi
	movq	%rax, %r8
	movl	%eax, %edx
	sarq	$32, %r8
	subl	%edi, %r8d
	jmp	.L73
	.p2align 4,,10
	.p2align 3
.L67:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	movaps	%xmm0, inv_factorial(%rip)
	ret
	.cfi_endproc
.LFE53:
	.size	prep_combi, .-prep_combi
	.p2align 4
	.globl	calc_combi
	.type	calc_combi, @function
calc_combi:
.LFB54:
	.cfi_startproc
	endbr64
	movslq	%edi, %rdx
	leaq	factorial(%rip), %rax
	movl	%esi, %r8d
	movabsq	$-8543223828751151131, %rsi
	movq	(%rax,%rdx,8), %rcx
	leaq	inv_factorial(%rip), %r9
	subl	%r8d, %edi
	movslq	%edi, %rdi
	movq	%rcx, %rax
	mulq	%rsi
	movslq	%r8d, %rax
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	imulq	(%r9,%rax,8), %rcx
	movq	%rcx, %rax
	mulq	%rsi
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	imulq	(%r9,%rdi,8), %rcx
	movq	%rcx, %rax
	mulq	%rsi
	movq	%rdx, %rax
	shrq	$29, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	ret
	.cfi_endproc
.LFE54:
	.size	calc_combi, .-calc_combi
	.p2align 4
	.globl	init
	.type	init, @function
init:
.LFB55:
	.cfi_startproc
	endbr64
	jmp	prep_combi.constprop.0
	.cfi_endproc
.LFE55:
	.size	init, .-init
	.section	.rodata.str1.1
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB56:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	call	prep_combi.constprop.0
	movq	%rsp, %rdi
	leaq	4(%rsp), %rsi
	call	get_int2
	movl	(%rsp), %ecx
	movl	4(%rsp), %edi
	xorl	%edx, %edx
	cmpl	%edi, %ecx
	jl	.L95
	leal	-1(%rcx), %eax
	leaq	factorial(%rip), %rdx
	movl	$1000000007, %esi
	subl	%edi, %ecx
	cltq
	leaq	inv_factorial(%rip), %r8
	movslq	%ecx, %rcx
	movq	(%rdx,%rax,8), %rax
	xorl	%edx, %edx
	divq	%rsi
	leal	-1(%rdi), %eax
	cltq
	imulq	(%r8,%rax,8), %rdx
	movq	%rdx, %rax
	xorl	%edx, %edx
	divq	%rsi
	movq	(%r8,%rcx,8), %rax
	imulq	%rdx, %rax
	xorl	%edx, %edx
	divq	%rsi
.L95:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L100
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L100:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE56:
	.size	main, .-main
	.local	inv_factorial
	.comm	inv_factorial,16008,32
	.local	factorial
	.comm	factorial,16008,32
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.quad	1
	.quad	1
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h> // uint64_t

#define max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) > (b) ? (b) : (a))
#define BUF_SIZE 20
#define DIVISOR 1000000007

int get_int2(int *a1, int *a2) {
#ifdef BUF_SIZE
  char line[BUF_SIZE];
  if(!fgets(line, BUF_SIZE, stdin)) return -1;
  sscanf(line, "%d %d", a1, a2);
#else
#error
#endif
  return 0;
}
#define NUM_MAX 1000
#define K_MAX 1000

static uint64_t factorial[NUM_MAX+K_MAX+1];
static uint64_t inv_factorial[NUM_MAX+K_MAX+1];

struct pair {
    int x;
    int y;
};

struct pair gcdext(int a, int b) {
    if(a == 0) { return (struct pair){0, 1}; }
    struct pair p = gcdext(b%a, a);
    return (struct pair){p.y - (b/a)*p.x, p.x};
}

void prep_combi(int n) {
    // prep
    int i;
    factorial[0] = factorial[1] = 1;
    for(i = 2; i <= n; i++) {
        factorial[i] = (factorial[i-1] * i)%DIVISOR;
    }

    inv_factorial[0] = inv_factorial[1] = 1;
    for(i = 2; i <= n; i++) {
        struct pair p = gcdext(i, DIVISOR);
        int inv = (p.x + DIVISOR)%DIVISOR;
        inv_factorial[i] = (inv_factorial[i-1]*inv)%DIVISOR;
    }
}

uint64_t calc_combi(int n, int k) {
    uint64_t ans = 1;
    ans = (ans * factorial[n])%DIVISOR;
    ans = (ans * inv_factorial[k])%DIVISOR;
    ans = (ans * inv_factorial[n-k])%DIVISOR;
    return ans;
}

void init() {
    prep_combi(NUM_MAX+K_MAX);
}

int main(void) {
    int n, k;
    init();
    get_int2(&n, &k);
    uint64_t ans = 0;
    
    if(n >= k) ans = calc_combi(n-1, k-1);
    printf("%d\n", (int)ans);
    return 0;
}

5 3

6

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 <string.h>
#include <stdlib.h>
#include <stdint.h> // uint64_t

#define max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) > (b) ? (b) : (a))
#define BUF_SIZE 20
#define DIVISOR 1000000007

int get_int2(int *a1, int *a2) {
#ifdef BUF_SIZE
  char line[BUF_SIZE];
  if(!fgets(line, BUF_SIZE, stdin)) return -1;
  sscanf(line, "%d %d", a1, a2);
#else
#error
#endif
  return 0;
}
#define NUM_MAX 1000
#define K_MAX 1000

static uint64_t factorial[NUM_MAX+K_MAX+1];
static uint64_t inv_factorial[NUM_MAX+K_MAX+1];

struct pair {
    int x;
    int y;
};

struct pair gcdext(int a, int b) {
    if(a == 0) { return (struct pair){0, 1}; }
    struct pair p = gcdext(b%a, a);
    return (struct pair){p.y - (b/a)*p.x, p.x};
}

void prep_combi(int n) {
    // prep
    int i;
    factorial[0] = factorial[1] = 1;
    for(i = 2; i <= n; i++) {
        factorial[i] = (factorial[i-1] * i)%DIVISOR;
    }

    inv_factorial[0] = inv_factorial[1] = 1;
    for(i = 2; i <= n; i++) {
        struct pair p = gcdext(i, DIVISOR);
        int inv = (p.x + DIVISOR)%DIVISOR;
        inv_factorial[i] = (inv_factorial[i-1]*inv)%DIVISOR;
    }
}

uint64_t calc_combi(int n, int k) {
    uint64_t ans = 1;
    ans = (ans * factorial[n])%DIVISOR;
    ans = (ans * inv_factorial[k])%DIVISOR;
    ans = (ans * inv_factorial[n-k])%DIVISOR;
    return ans;
}

void init() {
    prep_combi(NUM_MAX+K_MAX);
}

int main(void) {
    int n, k;
    init();
    get_int2(&n, &k);
    uint64_t ans = 0;
    
    if(n >= k) ans = calc_combi(n-1, k-1);
    printf("%d\n", (int)ans);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
	.text
	.globl	get_int2
	.type	get_int2, @function
get_int2:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rdx
	leaq	-32(%rbp), %rax
	movl	$20, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	jne	.L2
	movl	$-1, %eax
	jmp	.L4
.L2:
	movq	-48(%rbp), %rcx
	movq	-40(%rbp), %rdx
	leaq	-32(%rbp), %rax
	leaq	.LC0(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	$0, %eax
.L4:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_int2, .-get_int2
	.local	factorial
	.comm	factorial,16008,32
	.local	inv_factorial
	.comm	inv_factorial,16008,32
	.globl	gcdext
	.type	gcdext, @function
gcdext:
.LFB7:
	.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
	movl	%edi, -36(%rbp)
	movl	%esi, -40(%rbp)
	cmpl	$0, -36(%rbp)
	jne	.L7
	movabsq	$-4294967296, %rax
	andq	%rbx, %rax
	movq	%rax, %rbx
	movl	%ebx, %edx
	movabsq	$4294967296, %rax
	orq	%rdx, %rax
	movq	%rax, %rbx
	jmp	.L9
.L7:
	movl	-40(%rbp), %eax
	cltd
	idivl	-36(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, %esi
	movl	%edx, %edi
	call	gcdext
	movq	%rax, -24(%rbp)
	movl	-20(%rbp), %ecx
	movl	-40(%rbp), %eax
	cltd
	idivl	-36(%rbp)
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	imull	%edx, %eax
	subl	%eax, %ecx
	movl	-24(%rbp), %edx
	movl	%ecx, %ecx
	movabsq	$-4294967296, %rax
	andq	%rbx, %rax
	orq	%rcx, %rax
	movq	%rax, %rbx
	movl	%edx, %eax
	salq	$32, %rax
	movl	%ebx, %edx
	orq	%rdx, %rax
	movq	%rax, %rbx
.L9:
	movq	%rbx, %rax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	gcdext, .-gcdext
	.globl	prep_combi
	.type	prep_combi, @function
prep_combi:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movq	$1, 8+factorial(%rip)
	movq	8+factorial(%rip), %rax
	movq	%rax, factorial(%rip)
	movl	$2, -16(%rbp)
	jmp	.L11
.L12:
	movl	-16(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	factorial(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-16(%rbp), %eax
	cltq
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	mulq	%rdx
	movq	%rdx, %rax
	shrq	$29, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	factorial(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L11:
	movl	-16(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L12
	movq	$1, 8+inv_factorial(%rip)
	movq	8+inv_factorial(%rip), %rax
	movq	%rax, inv_factorial(%rip)
	movl	$2, -16(%rbp)
	jmp	.L13
.L14:
	movl	-16(%rbp), %eax
	movl	$1000000007, %esi
	movl	%eax, %edi
	call	gcdext
	movq	%rax, -8(%rbp)
	movl	-8(%rbp), %eax
	addl	$1000000007, %eax
	movslq	%eax, %rdx
	imulq	$1152921497, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$28, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	movl	%edx, -12(%rbp)
	movl	-12(%rbp), %edx
	imull	$1000000007, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	inv_factorial(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-12(%rbp), %eax
	cltq
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	mulq	%rdx
	movq	%rdx, %rax
	shrq	$29, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	inv_factorial(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L13:
	movl	-16(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L14
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	prep_combi, .-prep_combi
	.globl	calc_combi
	.type	calc_combi, @function
calc_combi:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movq	$1, -8(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	factorial(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	-8(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	mulq	%rdx
	movq	%rdx, %rax
	shrq	$29, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	inv_factorial(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	-8(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	mulq	%rdx
	movq	%rdx, %rax
	shrq	$29, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movl	-20(%rbp), %eax
	subl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	inv_factorial(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	-8(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	mulq	%rdx
	movq	%rdx, %rax
	shrq	$29, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	calc_combi, .-calc_combi
	.globl	init
	.type	init, @function
init:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$2000, %edi
	call	prep_combi
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	init, .-init
	.section	.rodata
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, %eax
	call	init
	leaq	-20(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	get_int2
	movq	$0, -16(%rbp)
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L19
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	calc_combi
	movq	%rax, -16(%rbp)
.L19:
	movq	-16(%rbp), %rax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
	.text
	.globl	get_int2
	.type	get_int2, @function
get_int2:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rdx
	leaq	-32(%rbp), %rax
	movl	$20, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	jne	.L2
	movl	$-1, %eax
	jmp	.L4
.L2:
	movq	-48(%rbp), %rcx
	movq	-40(%rbp), %rdx
	leaq	-32(%rbp), %rax
	leaq	.LC0(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	$0, %eax
.L4:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_int2, .-get_int2
	.local	factorial
	.comm	factorial,16008,32
	.local	inv_factorial
	.comm	inv_factorial,16008,32
	.globl	gcdext
	.type	gcdext, @function
gcdext:
.LFB7:
	.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
	movl	%edi, -36(%rbp)
	movl	%esi, -40(%rbp)
	cmpl	$0, -36(%rbp)
	jne	.L7
	movabsq	$-4294967296, %rax
	andq	%rbx, %rax
	movq	%rax, %rbx
	movl	%ebx, %edx
	movabsq	$4294967296, %rax
	orq	%rdx, %rax
	movq	%rax, %rbx
	jmp	.L9
.L7:
	movl	-40(%rbp), %eax
	cltd
	idivl	-36(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, %esi
	movl	%edx, %edi
	call	gcdext
	movq	%rax, -24(%rbp)
	movl	-20(%rbp), %ecx
	movl	-40(%rbp), %eax
	cltd
	idivl	-36(%rbp)
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	imull	%edx, %eax
	subl	%eax, %ecx
	movl	-24(%rbp), %edx
	movl	%ecx, %ecx
	movabsq	$-4294967296, %rax
	andq	%rbx, %rax
	orq	%rcx, %rax
	movq	%rax, %rbx
	movl	%edx, %eax
	salq	$32, %rax
	movl	%ebx, %edx
	orq	%rdx, %rax
	movq	%rax, %rbx
.L9:
	movq	%rbx, %rax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	gcdext, .-gcdext
	.globl	prep_combi
	.type	prep_combi, @function
prep_combi:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movq	$1, 8+factorial(%rip)
	movq	8+factorial(%rip), %rax
	movq	%rax, factorial(%rip)
	movl	$2, -16(%rbp)
	jmp	.L11
.L12:
	movl	-16(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	factorial(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-16(%rbp), %eax
	cltq
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	mulq	%rdx
	movq	%rdx, %rax
	shrq	$29, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	factorial(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L11:
	movl	-16(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L12
	movq	$1, 8+inv_factorial(%rip)
	movq	8+inv_factorial(%rip), %rax
	movq	%rax, inv_factorial(%rip)
	movl	$2, -16(%rbp)
	jmp	.L13
.L14:
	movl	-16(%rbp), %eax
	movl	$1000000007, %esi
	movl	%eax, %edi
	call	gcdext
	movq	%rax, -8(%rbp)
	movl	-8(%rbp), %eax
	addl	$1000000007, %eax
	movslq	%eax, %rdx
	imulq	$1152921497, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$28, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	movl	%edx, -12(%rbp)
	movl	-12(%rbp), %edx
	imull	$1000000007, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	inv_factorial(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-12(%rbp), %eax
	cltq
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	mulq	%rdx
	movq	%rdx, %rax
	shrq	$29, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	inv_factorial(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L13:
	movl	-16(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L14
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	prep_combi, .-prep_combi
	.globl	calc_combi
	.type	calc_combi, @function
calc_combi:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movq	$1, -8(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	factorial(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	-8(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	mulq	%rdx
	movq	%rdx, %rax
	shrq	$29, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	inv_factorial(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	-8(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	mulq	%rdx
	movq	%rdx, %rax
	shrq	$29, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movl	-20(%rbp), %eax
	subl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	inv_factorial(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	-8(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	mulq	%rdx
	movq	%rdx, %rax
	shrq	$29, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	calc_combi, .-calc_combi
	.globl	init
	.type	init, @function
init:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$2000, %edi
	call	prep_combi
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	init, .-init
	.section	.rodata
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, %eax
	call	init
	leaq	-20(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	get_int2
	movq	$0, -16(%rbp)
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L19
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	calc_combi
	movq	%rax, -16(%rbp)
.L19:
	movq	-16(%rbp), %rax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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:
