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

```c
/*
cat <<EOF >mistaken-paste
*/

#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"

#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#include <time.h>

#define BIG 2000000007
#define VERYBIG 200000000000007LL

#define MOD 1000000007
typedef uint64_t ull;
typedef  int64_t sll;

#define N_MAX 2000
#define M_MAX 200000

typedef struct {
	int32_t a;
	int32_t b;
} hw;

typedef struct {
	sll a;
	sll b;
} hwll;

typedef struct {
	hwll a;
	hwll b;
} linell;


typedef struct {
	ull s;
	ull t;
	int32_t c;
} struct_a;

typedef struct {
	int32_t from;
	int32_t to;
	sll cost;
} struct_b;

ull n, m;
ull h, w;
ull k;
ull q;
ull vua, vub, vuc, vud, vue, vuf;
sll vsa, vsb, vsc, vsd, vse, vsf;
long double vra, vrb, vrc;
double vda, vdb, vdc;
size_t slen;
size_t tlen;
char ch, dh;

ull umin (ull x, ull y) {
	return (x < y) ? x : y;
}

ull umax (ull x, ull y) {
	return (x > y) ? x : y;
}

sll smin (sll x, sll y) {
	return (x < y) ? x : y;
}

sll smax (sll x, sll y) {
	return (x > y) ? x : y;
}

ull bitpow (ull a, ull x, ull modulo) {
	ull result = 1;
	while (x) {
		if (x & 1) {
			result *= a;
			result %= modulo;
		}
		x /= 2;
		a = (a * a) % modulo;
	}
	return result;
}

ull divide (ull a, ull b, ull modulo) {
	return (a * bitpow(b, modulo - 2, modulo)) % modulo;
}

ull dp[N_MAX + 1];
ull amazing[N_MAX + 100];
ull npkdp[N_MAX + 1][N_MAX + 1];
ull division[N_MAX + 1][N_MAX + 1];

ull npk (ull n, ull k) {
	return divide(amazing[n], amazing[n - k], MOD);
}

ull grouping (sll whole, sll members, sll parts) {
	// whole_P_(mem*par)/(members!)^parts / parts!
	if (!division[members][parts]) {
		division[members][parts] = (bitpow(amazing[members], parts, MOD) * amazing[parts]) % MOD;
	}
	return divide(npk(whole, members * parts), division[members][parts], MOD);
}

ull solve () {
	sll i, j, ki;
	// ull result = 0;
	sll result = 0;
	// double result = 0;
	ull maybe = 0;
	// sll maybe = 0;
	ull sum = 0;
	// sll sum = 0;
	ull item;
	ull *dpcell;

	time_t start = time(NULL);

	amazing[0] = 1;
	for (i = 1; i <= n; i++) {
		amazing[i] = (amazing[i - 1] * i) % MOD;
	}
	// printf("%u...\n", time(NULL) - start);

	sll latest = n;
	dp[n] = 1;

	for (i = vua; i <= vub; i++) {
		latest = smax(latest - i * vud, 0);
		for (j = latest; j + i * vuc <= n; j++) {

			for (ki = vuc; ki <= vud; ki++) {
				sll xi = j + i * ki;
				if (xi > n) break;
				if (!dp[xi]) continue;

				dp[j] += dp[xi] * grouping(xi, i, ki);
				dp[j] %= MOD;
			}
			// printf("[%lld]; %llu\n", j, dp[j]);
		}
		// if (i <= 50 || i % 50 == 0) {
		// 	printf("(time: %u) ", time(NULL) - start);
		// 	printf("%lld... [0]:%llu\n", i, dp[0]);
		// 	fflush(stdout);
		// }
	}
	result = dp[0];

	printf("%llu\n", result);

	return 0;
}

int32_t main (void) {
	int32_t i, j;
	int32_t x, y;

	scanf("%llu", &n, &m);
	scanf("%llu%llu%llu%llu", &vua, &vub, &vuc, &vud, &vue, &vuf);

	solve();

	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.globl	m
	.align 8
	.type	m, @object
	.size	m, 8
m:
	.zero	8
	.globl	h
	.align 8
	.type	h, @object
	.size	h, 8
h:
	.zero	8
	.globl	w
	.align 8
	.type	w, @object
	.size	w, 8
w:
	.zero	8
	.globl	k
	.align 8
	.type	k, @object
	.size	k, 8
k:
	.zero	8
	.globl	q
	.align 8
	.type	q, @object
	.size	q, 8
q:
	.zero	8
	.globl	vua
	.align 8
	.type	vua, @object
	.size	vua, 8
vua:
	.zero	8
	.globl	vub
	.align 8
	.type	vub, @object
	.size	vub, 8
vub:
	.zero	8
	.globl	vuc
	.align 8
	.type	vuc, @object
	.size	vuc, 8
vuc:
	.zero	8
	.globl	vud
	.align 8
	.type	vud, @object
	.size	vud, 8
vud:
	.zero	8
	.globl	vue
	.align 8
	.type	vue, @object
	.size	vue, 8
vue:
	.zero	8
	.globl	vuf
	.align 8
	.type	vuf, @object
	.size	vuf, 8
vuf:
	.zero	8
	.globl	vsa
	.align 8
	.type	vsa, @object
	.size	vsa, 8
vsa:
	.zero	8
	.globl	vsb
	.align 8
	.type	vsb, @object
	.size	vsb, 8
vsb:
	.zero	8
	.globl	vsc
	.align 8
	.type	vsc, @object
	.size	vsc, 8
vsc:
	.zero	8
	.globl	vsd
	.align 8
	.type	vsd, @object
	.size	vsd, 8
vsd:
	.zero	8
	.globl	vse
	.align 8
	.type	vse, @object
	.size	vse, 8
vse:
	.zero	8
	.globl	vsf
	.align 8
	.type	vsf, @object
	.size	vsf, 8
vsf:
	.zero	8
	.globl	vra
	.align 16
	.type	vra, @object
	.size	vra, 16
vra:
	.zero	16
	.globl	vrb
	.align 16
	.type	vrb, @object
	.size	vrb, 16
vrb:
	.zero	16
	.globl	vrc
	.align 16
	.type	vrc, @object
	.size	vrc, 16
vrc:
	.zero	16
	.globl	vda
	.align 8
	.type	vda, @object
	.size	vda, 8
vda:
	.zero	8
	.globl	vdb
	.align 8
	.type	vdb, @object
	.size	vdb, 8
vdb:
	.zero	8
	.globl	vdc
	.align 8
	.type	vdc, @object
	.size	vdc, 8
vdc:
	.zero	8
	.globl	slen
	.align 8
	.type	slen, @object
	.size	slen, 8
slen:
	.zero	8
	.globl	tlen
	.align 8
	.type	tlen, @object
	.size	tlen, 8
tlen:
	.zero	8
	.globl	ch
	.type	ch, @object
	.size	ch, 1
ch:
	.zero	1
	.globl	dh
	.type	dh, @object
	.size	dh, 1
dh:
	.zero	1
	.text
	.globl	umin
	.type	umin, @function
umin:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovbe	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	umin, .-umin
	.globl	umax
	.type	umax, @function
umax:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovnb	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	umax, .-umax
	.globl	smin
	.type	smin, @function
smin:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	smin, .-smin
	.globl	smax
	.type	smax, @function
smax:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	smax, .-smax
	.globl	bitpow
	.type	bitpow, @function
bitpow:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movq	$1, -8(%rbp)
	jmp	.L10
.L12:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L11
	movq	-8(%rbp), %rax
	imulq	-24(%rbp), %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	$0, %edx
	divq	-40(%rbp)
	movq	%rdx, -8(%rbp)
.L11:
	movq	-32(%rbp), %rax
	shrq	%rax
	movq	%rax, -32(%rbp)
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	movl	$0, %edx
	divq	-40(%rbp)
	movq	%rdx, -24(%rbp)
.L10:
	cmpq	$0, -32(%rbp)
	jne	.L12
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	bitpow, .-bitpow
	.globl	divide
	.type	divide, @function
divide:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	%rdx, -24(%rbp)
	movq	-24(%rbp), %rax
	leaq	-2(%rax), %rcx
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	bitpow
	imulq	-8(%rbp), %rax
	movl	$0, %edx
	divq	-24(%rbp)
	movq	%rdx, %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	divide, .-divide
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 16008
dp:
	.zero	16008
	.globl	amazing
	.align 32
	.type	amazing, @object
	.size	amazing, 16800
amazing:
	.zero	16800
	.globl	npkdp
	.align 32
	.type	npkdp, @object
	.size	npkdp, 32032008
npkdp:
	.zero	32032008
	.globl	division
	.align 32
	.type	division, @object
	.size	division, 32032008
division:
	.zero	32032008
	.text
	.globl	npk
	.type	npk, @function
npk:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	subq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	amazing(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	amazing(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	$1000000007, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	divide
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	npk, .-npk
	.globl	grouping
	.type	grouping, @function
grouping:
.LFB13:
	.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	$24, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -16(%rbp)
	movq	%rsi, -24(%rbp)
	movq	%rdx, -32(%rbp)
	movq	-24(%rbp), %rax
	imulq	$2001, %rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	division(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	jne	.L19
	movq	-32(%rbp), %rcx
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	amazing(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	$1000000007, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	bitpow
	movq	-32(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	amazing(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	imulq	%rdx, %rax
	movq	%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
	movq	-24(%rbp), %rdx
	imulq	$2001, %rdx, %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	division(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L19:
	movq	-24(%rbp), %rax
	imulq	$2001, %rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	division(%rip), %rax
	movq	(%rdx,%rax), %rbx
	movq	-24(%rbp), %rax
	imulq	-32(%rbp), %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	npk
	movl	$1000000007, %edx
	movq	%rbx, %rsi
	movq	%rax, %rdi
	call	divide
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	grouping, .-grouping
	.section	.rodata
.LC0:
	.string	"%llu\n"
	.text
	.globl	solve
	.type	solve, @function
solve:
.LFB14:
	.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	$88, %rsp
	.cfi_offset 3, -24
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movl	$0, %edi
	call	time@PLT
	movq	%rax, -32(%rbp)
	movq	$1, amazing(%rip)
	movq	$1, -88(%rbp)
	jmp	.L22
.L23:
	movq	-88(%rbp), %rax
	subq	$1, %rax
	leaq	0(,%rax,8), %rdx
	leaq	amazing(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-88(%rbp), %rax
	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
	movq	-88(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	amazing(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addq	$1, -88(%rbp)
.L22:
	movq	-88(%rbp), %rdx
	movq	n(%rip), %rax
	cmpq	%rax, %rdx
	jbe	.L23
	movq	n(%rip), %rax
	movq	%rax, -64(%rbp)
	movq	n(%rip), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	$1, (%rdx,%rax)
	movq	vua(%rip), %rax
	movq	%rax, -88(%rbp)
	jmp	.L24
.L33:
	movq	-64(%rbp), %rax
	movq	-88(%rbp), %rcx
	movq	vud(%rip), %rdx
	imulq	%rcx, %rdx
	subq	%rdx, %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	smax
	movq	%rax, -64(%rbp)
	movq	-64(%rbp), %rax
	movq	%rax, -80(%rbp)
	jmp	.L25
.L32:
	movq	vuc(%rip), %rax
	movq	%rax, -72(%rbp)
	jmp	.L26
.L31:
	movq	-88(%rbp), %rax
	imulq	-72(%rbp), %rax
	movq	%rax, %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -24(%rbp)
	movq	-24(%rbp), %rdx
	movq	n(%rip), %rax
	cmpq	%rax, %rdx
	ja	.L35
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	je	.L36
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rbx
	movq	-72(%rbp), %rdx
	movq	-88(%rbp), %rcx
	movq	-24(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	grouping
	imulq	%rax, %rbx
	movq	%rbx, %rcx
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%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
	movq	-80(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	dp(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	jmp	.L30
.L36:
	nop
.L30:
	addq	$1, -72(%rbp)
.L26:
	movq	-72(%rbp), %rdx
	movq	vud(%rip), %rax
	cmpq	%rax, %rdx
	jbe	.L31
	jmp	.L28
.L35:
	nop
.L28:
	addq	$1, -80(%rbp)
.L25:
	movq	-88(%rbp), %rdx
	movq	vuc(%rip), %rax
	imulq	%rax, %rdx
	movq	-80(%rbp), %rax
	addq	%rax, %rdx
	movq	n(%rip), %rax
	cmpq	%rax, %rdx
	jbe	.L32
	addq	$1, -88(%rbp)
.L24:
	movq	-88(%rbp), %rdx
	movq	vub(%rip), %rax
	cmpq	%rax, %rdx
	jbe	.L33
	movq	dp(%rip), %rax
	movq	%rax, -56(%rbp)
	movq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	solve, .-solve
	.section	.rodata
.LC1:
	.string	"%llu"
.LC2:
	.string	"%llu%llu%llu%llu"
	.text
	.globl	main
	.type	main, @function
main:
.LFB15:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	m(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	subq	$8, %rsp
	leaq	vuf(%rip), %rax
	pushq	%rax
	leaq	vue(%rip), %r9
	leaq	vud(%rip), %r8
	leaq	vuc(%rip), %rax
	movq	%rax, %rcx
	leaq	vub(%rip), %rax
	movq	%rax, %rdx
	leaq	vua(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$16, %rsp
	movl	$0, %eax
	call	solve
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.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	umin
	.type	umin, @function
umin:
.LFB51:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovbe	%rsi, %rax
	ret
	.cfi_endproc
.LFE51:
	.size	umin, .-umin
	.p2align 4
	.globl	umax
	.type	umax, @function
umax:
.LFB52:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovnb	%rsi, %rax
	ret
	.cfi_endproc
.LFE52:
	.size	umax, .-umax
	.p2align 4
	.globl	smin
	.type	smin, @function
smin:
.LFB53:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovle	%rsi, %rax
	ret
	.cfi_endproc
.LFE53:
	.size	smin, .-smin
	.p2align 4
	.globl	smax
	.type	smax, @function
smax:
.LFB54:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovge	%rsi, %rax
	ret
	.cfi_endproc
.LFE54:
	.size	smax, .-smax
	.p2align 4
	.globl	bitpow
	.type	bitpow, @function
bitpow:
.LFB55:
	.cfi_startproc
	endbr64
	movq	%rdx, %rcx
	movl	$1, %r8d
	testq	%rsi, %rsi
	je	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	testb	$1, %sil
	je	.L8
	movq	%r8, %rax
	xorl	%edx, %edx
	imulq	%rdi, %rax
	divq	%rcx
	movq	%rdx, %r8
.L8:
	imulq	%rdi, %rdi
	xorl	%edx, %edx
	movq	%rdi, %rax
	divq	%rcx
	shrq	%rsi
	movq	%rdx, %rdi
	jne	.L9
.L6:
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE55:
	.size	bitpow, .-bitpow
	.p2align 4
	.globl	divide
	.type	divide, @function
divide:
.LFB56:
	.cfi_startproc
	endbr64
	movq	%rdx, %rcx
	movq	%rdx, %r8
	subq	$2, %rcx
	je	.L16
	movl	$1, %r9d
	.p2align 4,,10
	.p2align 3
.L18:
	testb	$1, %cl
	je	.L17
	movq	%r9, %rax
	xorl	%edx, %edx
	imulq	%rsi, %rax
	divq	%r8
	movq	%rdx, %r9
.L17:
	imulq	%rsi, %rsi
	xorl	%edx, %edx
	movq	%rsi, %rax
	divq	%r8
	shrq	%rcx
	movq	%rdx, %rsi
	jne	.L18
	imulq	%r9, %rdi
.L16:
	movq	%rdi, %rax
	xorl	%edx, %edx
	divq	%r8
	movq	%rdx, %rax
	ret
	.cfi_endproc
.LFE56:
	.size	divide, .-divide
	.p2align 4
	.globl	npk
	.type	npk, @function
npk:
.LFB57:
	.cfi_startproc
	endbr64
	movq	%rdi, %rdx
	leaq	amazing(%rip), %rax
	movl	$30, %r9d
	movl	$1000000005, %r8d
	subq	%rsi, %rdx
	movq	(%rax,%rdi,8), %r11
	movl	$1, %esi
	movabsq	$-8543223828751151131, %r10
	movq	(%rax,%rdx,8), %rcx
	.p2align 4,,10
	.p2align 3
.L28:
	testb	$1, %r8b
	je	.L27
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %rdi
	mulq	%r10
	movq	%rdx, %rsi
	shrq	$29, %rsi
	imulq	$1000000007, %rsi, %rdx
	movq	%rdi, %rsi
	subq	%rdx, %rsi
.L27:
	movq	%rcx, %rdi
	shrq	%r8
	imulq	%rcx, %rdi
	movq	%rdi, %rax
	mulq	%r10
	movq	%rdx, %rcx
	shrq	$29, %rcx
	imulq	$1000000007, %rcx, %rdx
	subq	%rdx, %rdi
	movq	%rdi, %rcx
	subl	$1, %r9d
	jne	.L28
	movq	%r11, %rcx
	imulq	%rsi, %rcx
	movq	%rcx, %rax
	mulq	%r10
	movq	%rdx, %rax
	shrq	$29, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	ret
	.cfi_endproc
.LFE57:
	.size	npk, .-npk
	.p2align 4
	.globl	grouping
	.type	grouping, @function
grouping:
.LFB58:
	.cfi_startproc
	endbr64
	imulq	$2001, %rsi, %rax
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movq	%rdi, %r11
	movq	%rsi, %r9
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%rdx, %r10
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	division(%rip), %rbp
	addq	%rdx, %rax
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	amazing(%rip), %rbx
	movq	0(%rbp,%rax,8), %rcx
	testq	%rcx, %rcx
	jne	.L34
	movq	(%rbx,%rsi,8), %rcx
	movq	%rdx, %rdi
	movl	$1, %r8d
	testq	%rdx, %rdx
	je	.L35
	movabsq	$-8543223828751151131, %r12
	.p2align 4,,10
	.p2align 3
.L37:
	testb	$1, %dil
	je	.L36
	imulq	%rcx, %r8
	movq	%r8, %rax
	mulq	%r12
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %r8
.L36:
	imulq	%rcx, %rcx
	movq	%rcx, %rax
	movq	%rcx, %rsi
	mulq	%r12
	movq	%rdx, %rcx
	shrq	$29, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%rsi, %rcx
	subq	%rax, %rcx
	shrq	%rdi
	jne	.L37
.L35:
	movabsq	$-8543223828751151131, %rdx
	movq	(%rbx,%r10,8), %rsi
	imulq	%r8, %rsi
	movq	%rsi, %rax
	movq	%rsi, %rcx
	mulq	%rdx
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	imulq	$2001, %r9, %rax
	addq	%r10, %rax
	movq	%rcx, 0(%rbp,%rax,8)
.L34:
	imulq	%r10, %r9
	movq	%r11, %rax
	movq	(%rbx,%r11,8), %rbp
	movl	$1, %edi
	movl	$30, %r11d
	movl	$1000000005, %r10d
	subq	%r9, %rax
	movq	(%rbx,%rax,8), %rsi
	movabsq	$-8543223828751151131, %rbx
	.p2align 4,,10
	.p2align 3
.L39:
	testb	$1, %r10b
	je	.L38
	imulq	%rsi, %rdi
	movq	%rdi, %rax
	mulq	%rbx
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rdi
.L38:
	imulq	%rsi, %rsi
	shrq	%r10
	movq	%rsi, %rax
	movq	%rsi, %r8
	mulq	%rbx
	movq	%rdx, %rsi
	shrq	$29, %rsi
	imulq	$1000000007, %rsi, %r9
	movq	%r8, %rsi
	subq	%r9, %rsi
	subl	$1, %r11d
	jne	.L39
	imulq	%rdi, %rbp
	movl	$30, %r10d
	movl	$1, %esi
	movl	$1000000005, %r9d
	movabsq	$-8543223828751151131, %r11
	movq	%rbp, %rax
	mulq	%rbx
	movq	%rdx, %rbx
	shrq	$29, %rbx
	imulq	$1000000007, %rbx, %rax
	movq	%rbp, %rbx
	subq	%rax, %rbx
	.p2align 4,,10
	.p2align 3
.L41:
	testb	$1, %r9b
	je	.L40
	movq	%rsi, %rdi
	imulq	%rcx, %rdi
	movq	%rdi, %rax
	movq	%rdi, %rsi
	mulq	%r11
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %r8
	subq	%r8, %rsi
.L40:
	movq	%rcx, %rdi
	shrq	%r9
	imulq	%rcx, %rdi
	movq	%rdi, %rax
	mulq	%r11
	movq	%rdx, %rcx
	shrq	$29, %rcx
	imulq	$1000000007, %rcx, %r8
	subq	%r8, %rdi
	movq	%rdi, %rcx
	subl	$1, %r10d
	jne	.L41
	imulq	%rsi, %rbx
	movq	%rbx, %rax
	mulq	%r11
	movq	%rdx, %rax
	shrq	$29, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rbx, %rax
	popq	%rbx
	.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
	subq	%rdx, %rax
	ret
	.cfi_endproc
.LFE58:
	.size	grouping, .-grouping
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%llu\n"
	.text
	.p2align 4
	.globl	solve
	.type	solve, @function
solve:
.LFB59:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%edi, %edi
	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
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	time@PLT
	movq	n(%rip), %rdi
	movq	$1, amazing(%rip)
	testq	%rdi, %rdi
	je	.L71
	leaq	1(%rdi), %r10
	movl	$1, %edx
	movl	$1, %ecx
	movabsq	$-8543223828751151131, %r8
	leaq	amazing(%rip), %r9
	.p2align 4,,10
	.p2align 3
.L59:
	movq	%rdx, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	mulq	%r8
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rsi
	movq	%rsi, (%r9,%rcx,8)
	addq	$1, %rcx
	movq	%rsi, %rdx
	cmpq	%r10, %rcx
	jne	.L59
	movq	%rdi, 8(%rsp)
	movq	%rdi, %rax
.L58:
	movq	vua(%rip), %r13
	movq	vub(%rip), %rcx
	leaq	dp(%rip), %rbp
	movq	$1, 0(%rbp,%rax,8)
	movq	vuc(%rip), %r9
	movq	vud(%rip), %rax
	cmpq	%rcx, %r13
	ja	.L70
	.p2align 4,,10
	.p2align 3
.L69:
	movq	%r13, %rdx
	imulq	%rax, %rdx
	subq	%rdx, 8(%rsp)
	movq	8(%rsp), %rsi
	xorl	%edx, %edx
	testq	%rsi, %rsi
	cmovns	%rsi, %rdx
	movq	%rdx, %rsi
	movq	%rdx, 8(%rsp)
	movq	%r13, %rdx
	imulq	%r9, %rdx
	addq	%rsi, %rdx
	cmpq	%rdi, %rdx
	ja	.L61
	movq	%rsi, (%rsp)
	leaq	0(%rbp,%rsi,8), %r12
	.p2align 4,,10
	.p2align 3
.L68:
	movq	%r9, %r15
	cmpq	%rax, %r9
	ja	.L62
	movq	%r9, %r14
	imulq	%r13, %r14
	addq	(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L67:
	cmpq	%rdi, %r14
	ja	.L66
	movq	0(%rbp,%r14,8), %rbx
	testq	%rbx, %rbx
	je	.L64
	movq	%r15, %rdx
	movq	%r14, %rdi
	movq	%r13, %rsi
	addq	$1, %r15
	call	grouping
	addq	%r13, %r14
	movq	n(%rip), %rdi
	imulq	%rax, %rbx
	addq	(%r12), %rbx
	movabsq	$-8543223828751151131, %rax
	mulq	%rbx
	movq	vud(%rip), %rax
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rbx
	movq	%rbx, (%r12)
	cmpq	%r15, %rax
	jnb	.L67
.L66:
	movq	vuc(%rip), %r9
.L62:
	movq	%r13, %rdx
	addq	$1, (%rsp)
	movq	(%rsp), %rcx
	addq	$8, %r12
	imulq	%r9, %rdx
	addq	%rcx, %rdx
	cmpq	%rdi, %rdx
	jbe	.L68
	movq	vub(%rip), %rcx
.L61:
	addq	$1, %r13
	cmpq	%rcx, %r13
	jbe	.L69
.L70:
	movq	dp(%rip), %rdx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	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
	.p2align 4,,10
	.p2align 3
.L64:
	.cfi_restore_state
	addq	$1, %r15
	addq	%r13, %r14
	cmpq	%rax, %r15
	jbe	.L67
	jmp	.L66
.L71:
	movq	$0, 8(%rsp)
	xorl	%eax, %eax
	jmp	.L58
	.cfi_endproc
.LFE59:
	.size	solve, .-solve
	.section	.rodata.str1.1
.LC1:
	.string	"%llu"
.LC2:
	.string	"%llu%llu%llu%llu"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB60:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	leaq	m(%rip), %rdx
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	subq	$8, %rsp
	.cfi_def_cfa_offset 24
	leaq	vuf(%rip), %rax
	leaq	vue(%rip), %r9
	pushq	%rax
	.cfi_def_cfa_offset 32
	leaq	vud(%rip), %r8
	xorl	%eax, %eax
	leaq	vuc(%rip), %rcx
	leaq	vub(%rip), %rdx
	leaq	vua(%rip), %rsi
	leaq	.LC2(%rip), %rdi
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	call	solve
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE60:
	.size	main, .-main
	.globl	division
	.bss
	.align 32
	.type	division, @object
	.size	division, 32032008
division:
	.zero	32032008
	.globl	npkdp
	.align 32
	.type	npkdp, @object
	.size	npkdp, 32032008
npkdp:
	.zero	32032008
	.globl	amazing
	.align 32
	.type	amazing, @object
	.size	amazing, 16800
amazing:
	.zero	16800
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 16008
dp:
	.zero	16008
	.globl	dh
	.type	dh, @object
	.size	dh, 1
dh:
	.zero	1
	.globl	ch
	.type	ch, @object
	.size	ch, 1
ch:
	.zero	1
	.globl	tlen
	.align 8
	.type	tlen, @object
	.size	tlen, 8
tlen:
	.zero	8
	.globl	slen
	.align 8
	.type	slen, @object
	.size	slen, 8
slen:
	.zero	8
	.globl	vdc
	.align 8
	.type	vdc, @object
	.size	vdc, 8
vdc:
	.zero	8
	.globl	vdb
	.align 8
	.type	vdb, @object
	.size	vdb, 8
vdb:
	.zero	8
	.globl	vda
	.align 8
	.type	vda, @object
	.size	vda, 8
vda:
	.zero	8
	.globl	vrc
	.align 16
	.type	vrc, @object
	.size	vrc, 16
vrc:
	.zero	16
	.globl	vrb
	.align 16
	.type	vrb, @object
	.size	vrb, 16
vrb:
	.zero	16
	.globl	vra
	.align 16
	.type	vra, @object
	.size	vra, 16
vra:
	.zero	16
	.globl	vsf
	.align 8
	.type	vsf, @object
	.size	vsf, 8
vsf:
	.zero	8
	.globl	vse
	.align 8
	.type	vse, @object
	.size	vse, 8
vse:
	.zero	8
	.globl	vsd
	.align 8
	.type	vsd, @object
	.size	vsd, 8
vsd:
	.zero	8
	.globl	vsc
	.align 8
	.type	vsc, @object
	.size	vsc, 8
vsc:
	.zero	8
	.globl	vsb
	.align 8
	.type	vsb, @object
	.size	vsb, 8
vsb:
	.zero	8
	.globl	vsa
	.align 8
	.type	vsa, @object
	.size	vsa, 8
vsa:
	.zero	8
	.globl	vuf
	.align 8
	.type	vuf, @object
	.size	vuf, 8
vuf:
	.zero	8
	.globl	vue
	.align 8
	.type	vue, @object
	.size	vue, 8
vue:
	.zero	8
	.globl	vud
	.align 8
	.type	vud, @object
	.size	vud, 8
vud:
	.zero	8
	.globl	vuc
	.align 8
	.type	vuc, @object
	.size	vuc, 8
vuc:
	.zero	8
	.globl	vub
	.align 8
	.type	vub, @object
	.size	vub, 8
vub:
	.zero	8
	.globl	vua
	.align 8
	.type	vua, @object
	.size	vua, 8
vua:
	.zero	8
	.globl	q
	.align 8
	.type	q, @object
	.size	q, 8
q:
	.zero	8
	.globl	k
	.align 8
	.type	k, @object
	.size	k, 8
k:
	.zero	8
	.globl	w
	.align 8
	.type	w, @object
	.size	w, 8
w:
	.zero	8
	.globl	h
	.align 8
	.type	h, @object
	.size	h, 8
h:
	.zero	8
	.globl	m
	.align 8
	.type	m, @object
	.size	m, 8
m:
	.zero	8
	.globl	n
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.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	umin
	.type	umin, @function
umin:
.LFB51:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovbe	%rsi, %rax
	ret
	.cfi_endproc
.LFE51:
	.size	umin, .-umin
	.p2align 4
	.globl	umax
	.type	umax, @function
umax:
.LFB52:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovnb	%rsi, %rax
	ret
	.cfi_endproc
.LFE52:
	.size	umax, .-umax
	.p2align 4
	.globl	smin
	.type	smin, @function
smin:
.LFB53:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovle	%rsi, %rax
	ret
	.cfi_endproc
.LFE53:
	.size	smin, .-smin
	.p2align 4
	.globl	smax
	.type	smax, @function
smax:
.LFB54:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovge	%rsi, %rax
	ret
	.cfi_endproc
.LFE54:
	.size	smax, .-smax
	.p2align 4
	.globl	bitpow
	.type	bitpow, @function
bitpow:
.LFB55:
	.cfi_startproc
	endbr64
	movq	%rdx, %rcx
	movl	$1, %r8d
	testq	%rsi, %rsi
	je	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	testb	$1, %sil
	je	.L8
	movq	%r8, %rax
	xorl	%edx, %edx
	imulq	%rdi, %rax
	divq	%rcx
	movq	%rdx, %r8
.L8:
	imulq	%rdi, %rdi
	xorl	%edx, %edx
	movq	%rdi, %rax
	divq	%rcx
	shrq	%rsi
	movq	%rdx, %rdi
	jne	.L9
.L6:
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE55:
	.size	bitpow, .-bitpow
	.p2align 4
	.globl	divide
	.type	divide, @function
divide:
.LFB56:
	.cfi_startproc
	endbr64
	movq	%rdx, %rcx
	movq	%rdx, %r8
	subq	$2, %rcx
	je	.L16
	movl	$1, %r9d
	.p2align 4,,10
	.p2align 3
.L18:
	testb	$1, %cl
	je	.L17
	movq	%r9, %rax
	xorl	%edx, %edx
	imulq	%rsi, %rax
	divq	%r8
	movq	%rdx, %r9
.L17:
	imulq	%rsi, %rsi
	xorl	%edx, %edx
	movq	%rsi, %rax
	divq	%r8
	shrq	%rcx
	movq	%rdx, %rsi
	jne	.L18
	imulq	%r9, %rdi
.L16:
	movq	%rdi, %rax
	xorl	%edx, %edx
	divq	%r8
	movq	%rdx, %rax
	ret
	.cfi_endproc
.LFE56:
	.size	divide, .-divide
	.p2align 4
	.globl	npk
	.type	npk, @function
npk:
.LFB57:
	.cfi_startproc
	endbr64
	movq	%rdi, %rdx
	leaq	amazing(%rip), %rax
	movl	$30, %r9d
	movl	$1000000005, %r8d
	subq	%rsi, %rdx
	movq	(%rax,%rdi,8), %r11
	movl	$1, %esi
	movabsq	$-8543223828751151131, %r10
	movq	(%rax,%rdx,8), %rcx
	.p2align 4,,10
	.p2align 3
.L28:
	testb	$1, %r8b
	je	.L27
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	movq	%rsi, %rdi
	mulq	%r10
	movq	%rdx, %rsi
	shrq	$29, %rsi
	imulq	$1000000007, %rsi, %rdx
	movq	%rdi, %rsi
	subq	%rdx, %rsi
.L27:
	movq	%rcx, %rdi
	shrq	%r8
	imulq	%rcx, %rdi
	movq	%rdi, %rax
	mulq	%r10
	movq	%rdx, %rcx
	shrq	$29, %rcx
	imulq	$1000000007, %rcx, %rdx
	subq	%rdx, %rdi
	movq	%rdi, %rcx
	subl	$1, %r9d
	jne	.L28
	movq	%r11, %rcx
	imulq	%rsi, %rcx
	movq	%rcx, %rax
	mulq	%r10
	movq	%rdx, %rax
	shrq	$29, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	ret
	.cfi_endproc
.LFE57:
	.size	npk, .-npk
	.p2align 4
	.globl	grouping
	.type	grouping, @function
grouping:
.LFB58:
	.cfi_startproc
	endbr64
	imulq	$2001, %rsi, %rax
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movq	%rdi, %r11
	movq	%rsi, %r9
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%rdx, %r10
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	division(%rip), %rbp
	addq	%rdx, %rax
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	amazing(%rip), %rbx
	movq	0(%rbp,%rax,8), %rcx
	testq	%rcx, %rcx
	jne	.L34
	movq	(%rbx,%rsi,8), %rcx
	movq	%rdx, %rdi
	movl	$1, %r8d
	testq	%rdx, %rdx
	je	.L35
	movabsq	$-8543223828751151131, %r12
	.p2align 4,,10
	.p2align 3
.L37:
	testb	$1, %dil
	je	.L36
	imulq	%rcx, %r8
	movq	%r8, %rax
	mulq	%r12
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %r8
.L36:
	imulq	%rcx, %rcx
	movq	%rcx, %rax
	movq	%rcx, %rsi
	mulq	%r12
	movq	%rdx, %rcx
	shrq	$29, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%rsi, %rcx
	subq	%rax, %rcx
	shrq	%rdi
	jne	.L37
.L35:
	movabsq	$-8543223828751151131, %rdx
	movq	(%rbx,%r10,8), %rsi
	imulq	%r8, %rsi
	movq	%rsi, %rax
	movq	%rsi, %rcx
	mulq	%rdx
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	imulq	$2001, %r9, %rax
	addq	%r10, %rax
	movq	%rcx, 0(%rbp,%rax,8)
.L34:
	imulq	%r10, %r9
	movq	%r11, %rax
	movq	(%rbx,%r11,8), %rbp
	movl	$1, %edi
	movl	$30, %r11d
	movl	$1000000005, %r10d
	subq	%r9, %rax
	movq	(%rbx,%rax,8), %rsi
	movabsq	$-8543223828751151131, %rbx
	.p2align 4,,10
	.p2align 3
.L39:
	testb	$1, %r10b
	je	.L38
	imulq	%rsi, %rdi
	movq	%rdi, %rax
	mulq	%rbx
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rdi
.L38:
	imulq	%rsi, %rsi
	shrq	%r10
	movq	%rsi, %rax
	movq	%rsi, %r8
	mulq	%rbx
	movq	%rdx, %rsi
	shrq	$29, %rsi
	imulq	$1000000007, %rsi, %r9
	movq	%r8, %rsi
	subq	%r9, %rsi
	subl	$1, %r11d
	jne	.L39
	imulq	%rdi, %rbp
	movl	$30, %r10d
	movl	$1, %esi
	movl	$1000000005, %r9d
	movabsq	$-8543223828751151131, %r11
	movq	%rbp, %rax
	mulq	%rbx
	movq	%rdx, %rbx
	shrq	$29, %rbx
	imulq	$1000000007, %rbx, %rax
	movq	%rbp, %rbx
	subq	%rax, %rbx
	.p2align 4,,10
	.p2align 3
.L41:
	testb	$1, %r9b
	je	.L40
	movq	%rsi, %rdi
	imulq	%rcx, %rdi
	movq	%rdi, %rax
	movq	%rdi, %rsi
	mulq	%r11
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %r8
	subq	%r8, %rsi
.L40:
	movq	%rcx, %rdi
	shrq	%r9
	imulq	%rcx, %rdi
	movq	%rdi, %rax
	mulq	%r11
	movq	%rdx, %rcx
	shrq	$29, %rcx
	imulq	$1000000007, %rcx, %r8
	subq	%r8, %rdi
	movq	%rdi, %rcx
	subl	$1, %r10d
	jne	.L41
	imulq	%rsi, %rbx
	movq	%rbx, %rax
	mulq	%r11
	movq	%rdx, %rax
	shrq	$29, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rbx, %rax
	popq	%rbx
	.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
	subq	%rdx, %rax
	ret
	.cfi_endproc
.LFE58:
	.size	grouping, .-grouping
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%llu\n"
	.text
	.p2align 4
	.globl	solve
	.type	solve, @function
solve:
.LFB59:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%edi, %edi
	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
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	time@PLT
	movq	n(%rip), %rdi
	movq	$1, amazing(%rip)
	testq	%rdi, %rdi
	je	.L71
	leaq	1(%rdi), %r10
	movl	$1, %edx
	movl	$1, %ecx
	movabsq	$-8543223828751151131, %r8
	leaq	amazing(%rip), %r9
	.p2align 4,,10
	.p2align 3
.L59:
	movq	%rdx, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	mulq	%r8
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rsi
	movq	%rsi, (%r9,%rcx,8)
	addq	$1, %rcx
	movq	%rsi, %rdx
	cmpq	%r10, %rcx
	jne	.L59
	movq	%rdi, 8(%rsp)
	movq	%rdi, %rax
.L58:
	movq	vua(%rip), %r13
	movq	vub(%rip), %rcx
	leaq	dp(%rip), %rbp
	movq	$1, 0(%rbp,%rax,8)
	movq	vuc(%rip), %r9
	movq	vud(%rip), %rax
	cmpq	%rcx, %r13
	ja	.L70
	.p2align 4,,10
	.p2align 3
.L69:
	movq	%r13, %rdx
	imulq	%rax, %rdx
	subq	%rdx, 8(%rsp)
	movq	8(%rsp), %rsi
	xorl	%edx, %edx
	testq	%rsi, %rsi
	cmovns	%rsi, %rdx
	movq	%rdx, %rsi
	movq	%rdx, 8(%rsp)
	movq	%r13, %rdx
	imulq	%r9, %rdx
	addq	%rsi, %rdx
	cmpq	%rdi, %rdx
	ja	.L61
	movq	%rsi, (%rsp)
	leaq	0(%rbp,%rsi,8), %r12
	.p2align 4,,10
	.p2align 3
.L68:
	movq	%r9, %r15
	cmpq	%rax, %r9
	ja	.L62
	movq	%r9, %r14
	imulq	%r13, %r14
	addq	(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L67:
	cmpq	%rdi, %r14
	ja	.L66
	movq	0(%rbp,%r14,8), %rbx
	testq	%rbx, %rbx
	je	.L64
	movq	%r15, %rdx
	movq	%r14, %rdi
	movq	%r13, %rsi
	addq	$1, %r15
	call	grouping
	addq	%r13, %r14
	movq	n(%rip), %rdi
	imulq	%rax, %rbx
	addq	(%r12), %rbx
	movabsq	$-8543223828751151131, %rax
	mulq	%rbx
	movq	vud(%rip), %rax
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rbx
	movq	%rbx, (%r12)
	cmpq	%r15, %rax
	jnb	.L67
.L66:
	movq	vuc(%rip), %r9
.L62:
	movq	%r13, %rdx
	addq	$1, (%rsp)
	movq	(%rsp), %rcx
	addq	$8, %r12
	imulq	%r9, %rdx
	addq	%rcx, %rdx
	cmpq	%rdi, %rdx
	jbe	.L68
	movq	vub(%rip), %rcx
.L61:
	addq	$1, %r13
	cmpq	%rcx, %r13
	jbe	.L69
.L70:
	movq	dp(%rip), %rdx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	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
	.p2align 4,,10
	.p2align 3
.L64:
	.cfi_restore_state
	addq	$1, %r15
	addq	%r13, %r14
	cmpq	%rax, %r15
	jbe	.L67
	jmp	.L66
.L71:
	movq	$0, 8(%rsp)
	xorl	%eax, %eax
	jmp	.L58
	.cfi_endproc
.LFE59:
	.size	solve, .-solve
	.section	.rodata.str1.1
.LC1:
	.string	"%llu"
.LC2:
	.string	"%llu%llu%llu%llu"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB60:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	leaq	m(%rip), %rdx
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	subq	$8, %rsp
	.cfi_def_cfa_offset 24
	leaq	vuf(%rip), %rax
	leaq	vue(%rip), %r9
	pushq	%rax
	.cfi_def_cfa_offset 32
	leaq	vud(%rip), %r8
	xorl	%eax, %eax
	leaq	vuc(%rip), %rcx
	leaq	vub(%rip), %rdx
	leaq	vua(%rip), %rsi
	leaq	.LC2(%rip), %rdi
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	call	solve
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE60:
	.size	main, .-main
	.globl	division
	.bss
	.align 32
	.type	division, @object
	.size	division, 32032008
division:
	.zero	32032008
	.globl	npkdp
	.align 32
	.type	npkdp, @object
	.size	npkdp, 32032008
npkdp:
	.zero	32032008
	.globl	amazing
	.align 32
	.type	amazing, @object
	.size	amazing, 16800
amazing:
	.zero	16800
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 16008
dp:
	.zero	16008
	.globl	dh
	.type	dh, @object
	.size	dh, 1
dh:
	.zero	1
	.globl	ch
	.type	ch, @object
	.size	ch, 1
ch:
	.zero	1
	.globl	tlen
	.align 8
	.type	tlen, @object
	.size	tlen, 8
tlen:
	.zero	8
	.globl	slen
	.align 8
	.type	slen, @object
	.size	slen, 8
slen:
	.zero	8
	.globl	vdc
	.align 8
	.type	vdc, @object
	.size	vdc, 8
vdc:
	.zero	8
	.globl	vdb
	.align 8
	.type	vdb, @object
	.size	vdb, 8
vdb:
	.zero	8
	.globl	vda
	.align 8
	.type	vda, @object
	.size	vda, 8
vda:
	.zero	8
	.globl	vrc
	.align 16
	.type	vrc, @object
	.size	vrc, 16
vrc:
	.zero	16
	.globl	vrb
	.align 16
	.type	vrb, @object
	.size	vrb, 16
vrb:
	.zero	16
	.globl	vra
	.align 16
	.type	vra, @object
	.size	vra, 16
vra:
	.zero	16
	.globl	vsf
	.align 8
	.type	vsf, @object
	.size	vsf, 8
vsf:
	.zero	8
	.globl	vse
	.align 8
	.type	vse, @object
	.size	vse, 8
vse:
	.zero	8
	.globl	vsd
	.align 8
	.type	vsd, @object
	.size	vsd, 8
vsd:
	.zero	8
	.globl	vsc
	.align 8
	.type	vsc, @object
	.size	vsc, 8
vsc:
	.zero	8
	.globl	vsb
	.align 8
	.type	vsb, @object
	.size	vsb, 8
vsb:
	.zero	8
	.globl	vsa
	.align 8
	.type	vsa, @object
	.size	vsa, 8
vsa:
	.zero	8
	.globl	vuf
	.align 8
	.type	vuf, @object
	.size	vuf, 8
vuf:
	.zero	8
	.globl	vue
	.align 8
	.type	vue, @object
	.size	vue, 8
vue:
	.zero	8
	.globl	vud
	.align 8
	.type	vud, @object
	.size	vud, 8
vud:
	.zero	8
	.globl	vuc
	.align 8
	.type	vuc, @object
	.size	vuc, 8
vuc:
	.zero	8
	.globl	vub
	.align 8
	.type	vub, @object
	.size	vub, 8
vub:
	.zero	8
	.globl	vua
	.align 8
	.type	vua, @object
	.size	vua, 8
vua:
	.zero	8
	.globl	q
	.align 8
	.type	q, @object
	.size	q, 8
q:
	.zero	8
	.globl	k
	.align 8
	.type	k, @object
	.size	k, 8
k:
	.zero	8
	.globl	w
	.align 8
	.type	w, @object
	.size	w, 8
w:
	.zero	8
	.globl	h
	.align 8
	.type	h, @object
	.size	h, 8
h:
	.zero	8
	.globl	m
	.align 8
	.type	m, @object
	.size	m, 8
m:
	.zero	8
	.globl	n
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.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:

/*
cat <<EOF >mistaken-paste
*/

#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"

#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#include <time.h>

#define BIG 2000000007
#define VERYBIG 200000000000007LL

#define MOD 1000000007
typedef uint64_t ull;
typedef  int64_t sll;

#define N_MAX 2000
#define M_MAX 200000

typedef struct {
	int32_t a;
	int32_t b;
} hw;

typedef struct {
	sll a;
	sll b;
} hwll;

typedef struct {
	hwll a;
	hwll b;
} linell;


typedef struct {
	ull s;
	ull t;
	int32_t c;
} struct_a;

typedef struct {
	int32_t from;
	int32_t to;
	sll cost;
} struct_b;

ull n, m;
ull h, w;
ull k;
ull q;
ull vua, vub, vuc, vud, vue, vuf;
sll vsa, vsb, vsc, vsd, vse, vsf;
long double vra, vrb, vrc;
double vda, vdb, vdc;
size_t slen;
size_t tlen;
char ch, dh;

ull umin (ull x, ull y) {
	return (x < y) ? x : y;
}

ull umax (ull x, ull y) {
	return (x > y) ? x : y;
}

sll smin (sll x, sll y) {
	return (x < y) ? x : y;
}

sll smax (sll x, sll y) {
	return (x > y) ? x : y;
}

ull bitpow (ull a, ull x, ull modulo) {
	ull result = 1;
	while (x) {
		if (x & 1) {
			result *= a;
			result %= modulo;
		}
		x /= 2;
		a = (a * a) % modulo;
	}
	return result;
}

ull divide (ull a, ull b, ull modulo) {
	return (a * bitpow(b, modulo - 2, modulo)) % modulo;
}

ull dp[N_MAX + 1];
ull amazing[N_MAX + 100];
ull npkdp[N_MAX + 1][N_MAX + 1];
ull division[N_MAX + 1][N_MAX + 1];

ull npk (ull n, ull k) {
	return divide(amazing[n], amazing[n - k], MOD);
}

ull grouping (sll whole, sll members, sll parts) {
	// whole_P_(mem*par)/(members!)^parts / parts!
	if (!division[members][parts]) {
		division[members][parts] = (bitpow(amazing[members], parts, MOD) * amazing[parts]) % MOD;
	}
	return divide(npk(whole, members * parts), division[members][parts], MOD);
}

ull solve () {
	sll i, j, ki;
	// ull result = 0;
	sll result = 0;
	// double result = 0;
	ull maybe = 0;
	// sll maybe = 0;
	ull sum = 0;
	// sll sum = 0;
	ull item;
	ull *dpcell;

	time_t start = time(NULL);

	amazing[0] = 1;
	for (i = 1; i <= n; i++) {
		amazing[i] = (amazing[i - 1] * i) % MOD;
	}
	// printf("%u...\n", time(NULL) - start);

	sll latest = n;
	dp[n] = 1;

	for (i = vua; i <= vub; i++) {
		latest = smax(latest - i * vud, 0);
		for (j = latest; j + i * vuc <= n; j++) {

			for (ki = vuc; ki <= vud; ki++) {
				sll xi = j + i * ki;
				if (xi > n) break;
				if (!dp[xi]) continue;

				dp[j] += dp[xi] * grouping(xi, i, ki);
				dp[j] %= MOD;
			}
			// printf("[%lld]; %llu\n", j, dp[j]);
		}
		// if (i <= 50 || i % 50 == 0) {
		// 	printf("(time: %u) ", time(NULL) - start);
		// 	printf("%lld... [0]:%llu\n", i, dp[0]);
		// 	fflush(stdout);
		// }
	}
	result = dp[0];

	printf("%llu\n", result);

	return 0;
}

int32_t main (void) {
	int32_t i, j;
	int32_t x, y;

	scanf("%llu", &n, &m);
	scanf("%llu%llu%llu%llu", &vua, &vub, &vuc, &vud, &vue, &vuf);

	solve();

	return 0;
}

7 3 4 2 5
 8 2 3 1 3
 1000 1 1000 2 1000
 1000 1 1000 3 1000
 10 3 7 2 5
 7 1 3 1 3
 1000 1 1000 1 1001
 7 1 6 2 5
 0 3 8 2 7
 2 1 3 1 2

0
 280
 860178665
 980205027
 126
 595
 465231251
 105
 1
 2

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

```c
/*
cat <<EOF >mistaken-paste
*/

#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"

#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#include <time.h>

#define BIG 2000000007
#define VERYBIG 200000000000007LL

#define MOD 1000000007
typedef uint64_t ull;
typedef  int64_t sll;

#define N_MAX 2000
#define M_MAX 200000

typedef struct {
	int32_t a;
	int32_t b;
} hw;

typedef struct {
	sll a;
	sll b;
} hwll;

typedef struct {
	hwll a;
	hwll b;
} linell;


typedef struct {
	ull s;
	ull t;
	int32_t c;
} struct_a;

typedef struct {
	int32_t from;
	int32_t to;
	sll cost;
} struct_b;

ull n, m;
ull h, w;
ull k;
ull q;
ull vua, vub, vuc, vud, vue, vuf;
sll vsa, vsb, vsc, vsd, vse, vsf;
long double vra, vrb, vrc;
double vda, vdb, vdc;
size_t slen;
size_t tlen;
char ch, dh;

ull umin (ull x, ull y) {
	return (x < y) ? x : y;
}

ull umax (ull x, ull y) {
	return (x > y) ? x : y;
}

sll smin (sll x, sll y) {
	return (x < y) ? x : y;
}

sll smax (sll x, sll y) {
	return (x > y) ? x : y;
}

ull bitpow (ull a, ull x, ull modulo) {
	ull result = 1;
	while (x) {
		if (x & 1) {
			result *= a;
			result %= modulo;
		}
		x /= 2;
		a = (a * a) % modulo;
	}
	return result;
}

ull divide (ull a, ull b, ull modulo) {
	return (a * bitpow(b, modulo - 2, modulo)) % modulo;
}

ull dp[N_MAX + 1];
ull amazing[N_MAX + 100];
ull npkdp[N_MAX + 1][N_MAX + 1];
ull division[N_MAX + 1][N_MAX + 1];

ull npk (ull n, ull k) {
	return divide(amazing[n], amazing[n - k], MOD);
}

ull grouping (sll whole, sll members, sll parts) {
	// whole_P_(mem*par)/(members!)^parts / parts!
	if (!division[members][parts]) {
		division[members][parts] = (bitpow(amazing[members], parts, MOD) * amazing[parts]) % MOD;
	}
	return divide(npk(whole, members * parts), division[members][parts], MOD);
}

ull solve () {
	sll i, j, ki;
	// ull result = 0;
	sll result = 0;
	// double result = 0;
	ull maybe = 0;
	// sll maybe = 0;
	ull sum = 0;
	// sll sum = 0;
	ull item;
	ull *dpcell;

	time_t start = time(NULL);

	amazing[0] = 1;
	for (i = 1; i <= n; i++) {
		amazing[i] = (amazing[i - 1] * i) % MOD;
	}
	// printf("%u...\n", time(NULL) - start);

	sll latest = n;
	dp[n] = 1;

	for (i = vua; i <= vub; i++) {
		latest = smax(latest - i * vud, 0);
		for (j = latest; j + i * vuc <= n; j++) {

			for (ki = vuc; ki <= vud; ki++) {
				sll xi = j + i * ki;
				if (xi > n) break;
				if (!dp[xi]) continue;

				dp[j] += dp[xi] * grouping(xi, i, ki);
				dp[j] %= MOD;
			}
			// printf("[%lld]; %llu\n", j, dp[j]);
		}
		// if (i <= 50 || i % 50 == 0) {
		// 	printf("(time: %u) ", time(NULL) - start);
		// 	printf("%lld... [0]:%llu\n", i, dp[0]);
		// 	fflush(stdout);
		// }
	}
	result = dp[0];

	printf("%llu\n", result);

	return 0;
}

int32_t main (void) {
	int32_t i, j;
	int32_t x, y;

	scanf("%llu", &n, &m);
	scanf("%llu%llu%llu%llu", &vua, &vub, &vuc, &vud, &vue, &vuf);

	solve();

	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.globl	m
	.align 8
	.type	m, @object
	.size	m, 8
m:
	.zero	8
	.globl	h
	.align 8
	.type	h, @object
	.size	h, 8
h:
	.zero	8
	.globl	w
	.align 8
	.type	w, @object
	.size	w, 8
w:
	.zero	8
	.globl	k
	.align 8
	.type	k, @object
	.size	k, 8
k:
	.zero	8
	.globl	q
	.align 8
	.type	q, @object
	.size	q, 8
q:
	.zero	8
	.globl	vua
	.align 8
	.type	vua, @object
	.size	vua, 8
vua:
	.zero	8
	.globl	vub
	.align 8
	.type	vub, @object
	.size	vub, 8
vub:
	.zero	8
	.globl	vuc
	.align 8
	.type	vuc, @object
	.size	vuc, 8
vuc:
	.zero	8
	.globl	vud
	.align 8
	.type	vud, @object
	.size	vud, 8
vud:
	.zero	8
	.globl	vue
	.align 8
	.type	vue, @object
	.size	vue, 8
vue:
	.zero	8
	.globl	vuf
	.align 8
	.type	vuf, @object
	.size	vuf, 8
vuf:
	.zero	8
	.globl	vsa
	.align 8
	.type	vsa, @object
	.size	vsa, 8
vsa:
	.zero	8
	.globl	vsb
	.align 8
	.type	vsb, @object
	.size	vsb, 8
vsb:
	.zero	8
	.globl	vsc
	.align 8
	.type	vsc, @object
	.size	vsc, 8
vsc:
	.zero	8
	.globl	vsd
	.align 8
	.type	vsd, @object
	.size	vsd, 8
vsd:
	.zero	8
	.globl	vse
	.align 8
	.type	vse, @object
	.size	vse, 8
vse:
	.zero	8
	.globl	vsf
	.align 8
	.type	vsf, @object
	.size	vsf, 8
vsf:
	.zero	8
	.globl	vra
	.align 16
	.type	vra, @object
	.size	vra, 16
vra:
	.zero	16
	.globl	vrb
	.align 16
	.type	vrb, @object
	.size	vrb, 16
vrb:
	.zero	16
	.globl	vrc
	.align 16
	.type	vrc, @object
	.size	vrc, 16
vrc:
	.zero	16
	.globl	vda
	.align 8
	.type	vda, @object
	.size	vda, 8
vda:
	.zero	8
	.globl	vdb
	.align 8
	.type	vdb, @object
	.size	vdb, 8
vdb:
	.zero	8
	.globl	vdc
	.align 8
	.type	vdc, @object
	.size	vdc, 8
vdc:
	.zero	8
	.globl	slen
	.align 8
	.type	slen, @object
	.size	slen, 8
slen:
	.zero	8
	.globl	tlen
	.align 8
	.type	tlen, @object
	.size	tlen, 8
tlen:
	.zero	8
	.globl	ch
	.type	ch, @object
	.size	ch, 1
ch:
	.zero	1
	.globl	dh
	.type	dh, @object
	.size	dh, 1
dh:
	.zero	1
	.text
	.globl	umin
	.type	umin, @function
umin:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovbe	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	umin, .-umin
	.globl	umax
	.type	umax, @function
umax:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovnb	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	umax, .-umax
	.globl	smin
	.type	smin, @function
smin:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	smin, .-smin
	.globl	smax
	.type	smax, @function
smax:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	smax, .-smax
	.globl	bitpow
	.type	bitpow, @function
bitpow:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movq	$1, -8(%rbp)
	jmp	.L10
.L12:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L11
	movq	-8(%rbp), %rax
	imulq	-24(%rbp), %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	$0, %edx
	divq	-40(%rbp)
	movq	%rdx, -8(%rbp)
.L11:
	movq	-32(%rbp), %rax
	shrq	%rax
	movq	%rax, -32(%rbp)
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	movl	$0, %edx
	divq	-40(%rbp)
	movq	%rdx, -24(%rbp)
.L10:
	cmpq	$0, -32(%rbp)
	jne	.L12
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	bitpow, .-bitpow
	.globl	divide
	.type	divide, @function
divide:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	%rdx, -24(%rbp)
	movq	-24(%rbp), %rax
	leaq	-2(%rax), %rcx
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	bitpow
	imulq	-8(%rbp), %rax
	movl	$0, %edx
	divq	-24(%rbp)
	movq	%rdx, %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	divide, .-divide
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 16008
dp:
	.zero	16008
	.globl	amazing
	.align 32
	.type	amazing, @object
	.size	amazing, 16800
amazing:
	.zero	16800
	.globl	npkdp
	.align 32
	.type	npkdp, @object
	.size	npkdp, 32032008
npkdp:
	.zero	32032008
	.globl	division
	.align 32
	.type	division, @object
	.size	division, 32032008
division:
	.zero	32032008
	.text
	.globl	npk
	.type	npk, @function
npk:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	subq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	amazing(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	amazing(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	$1000000007, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	divide
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	npk, .-npk
	.globl	grouping
	.type	grouping, @function
grouping:
.LFB13:
	.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	$24, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -16(%rbp)
	movq	%rsi, -24(%rbp)
	movq	%rdx, -32(%rbp)
	movq	-24(%rbp), %rax
	imulq	$2001, %rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	division(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	jne	.L19
	movq	-32(%rbp), %rcx
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	amazing(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	$1000000007, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	bitpow
	movq	-32(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	amazing(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	imulq	%rdx, %rax
	movq	%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
	movq	-24(%rbp), %rdx
	imulq	$2001, %rdx, %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	division(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L19:
	movq	-24(%rbp), %rax
	imulq	$2001, %rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	division(%rip), %rax
	movq	(%rdx,%rax), %rbx
	movq	-24(%rbp), %rax
	imulq	-32(%rbp), %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	npk
	movl	$1000000007, %edx
	movq	%rbx, %rsi
	movq	%rax, %rdi
	call	divide
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	grouping, .-grouping
	.section	.rodata
.LC0:
	.string	"%llu\n"
	.text
	.globl	solve
	.type	solve, @function
solve:
.LFB14:
	.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	$88, %rsp
	.cfi_offset 3, -24
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movl	$0, %edi
	call	time@PLT
	movq	%rax, -32(%rbp)
	movq	$1, amazing(%rip)
	movq	$1, -88(%rbp)
	jmp	.L22
.L23:
	movq	-88(%rbp), %rax
	subq	$1, %rax
	leaq	0(,%rax,8), %rdx
	leaq	amazing(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-88(%rbp), %rax
	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
	movq	-88(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	amazing(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addq	$1, -88(%rbp)
.L22:
	movq	-88(%rbp), %rdx
	movq	n(%rip), %rax
	cmpq	%rax, %rdx
	jbe	.L23
	movq	n(%rip), %rax
	movq	%rax, -64(%rbp)
	movq	n(%rip), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	$1, (%rdx,%rax)
	movq	vua(%rip), %rax
	movq	%rax, -88(%rbp)
	jmp	.L24
.L33:
	movq	-64(%rbp), %rax
	movq	-88(%rbp), %rcx
	movq	vud(%rip), %rdx
	imulq	%rcx, %rdx
	subq	%rdx, %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	smax
	movq	%rax, -64(%rbp)
	movq	-64(%rbp), %rax
	movq	%rax, -80(%rbp)
	jmp	.L25
.L32:
	movq	vuc(%rip), %rax
	movq	%rax, -72(%rbp)
	jmp	.L26
.L31:
	movq	-88(%rbp), %rax
	imulq	-72(%rbp), %rax
	movq	%rax, %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -24(%rbp)
	movq	-24(%rbp), %rdx
	movq	n(%rip), %rax
	cmpq	%rax, %rdx
	ja	.L35
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	je	.L36
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rbx
	movq	-72(%rbp), %rdx
	movq	-88(%rbp), %rcx
	movq	-24(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	grouping
	imulq	%rax, %rbx
	movq	%rbx, %rcx
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%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
	movq	-80(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	dp(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	jmp	.L30
.L36:
	nop
.L30:
	addq	$1, -72(%rbp)
.L26:
	movq	-72(%rbp), %rdx
	movq	vud(%rip), %rax
	cmpq	%rax, %rdx
	jbe	.L31
	jmp	.L28
.L35:
	nop
.L28:
	addq	$1, -80(%rbp)
.L25:
	movq	-88(%rbp), %rdx
	movq	vuc(%rip), %rax
	imulq	%rax, %rdx
	movq	-80(%rbp), %rax
	addq	%rax, %rdx
	movq	n(%rip), %rax
	cmpq	%rax, %rdx
	jbe	.L32
	addq	$1, -88(%rbp)
.L24:
	movq	-88(%rbp), %rdx
	movq	vub(%rip), %rax
	cmpq	%rax, %rdx
	jbe	.L33
	movq	dp(%rip), %rax
	movq	%rax, -56(%rbp)
	movq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	solve, .-solve
	.section	.rodata
.LC1:
	.string	"%llu"
.LC2:
	.string	"%llu%llu%llu%llu"
	.text
	.globl	main
	.type	main, @function
main:
.LFB15:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	m(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	subq	$8, %rsp
	leaq	vuf(%rip), %rax
	pushq	%rax
	leaq	vue(%rip), %r9
	leaq	vud(%rip), %r8
	leaq	vuc(%rip), %rax
	movq	%rax, %rcx
	leaq	vub(%rip), %rax
	movq	%rax, %rdx
	leaq	vua(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$16, %rsp
	movl	$0, %eax
	call	solve
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.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	n
	.bss
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.globl	m
	.align 8
	.type	m, @object
	.size	m, 8
m:
	.zero	8
	.globl	h
	.align 8
	.type	h, @object
	.size	h, 8
h:
	.zero	8
	.globl	w
	.align 8
	.type	w, @object
	.size	w, 8
w:
	.zero	8
	.globl	k
	.align 8
	.type	k, @object
	.size	k, 8
k:
	.zero	8
	.globl	q
	.align 8
	.type	q, @object
	.size	q, 8
q:
	.zero	8
	.globl	vua
	.align 8
	.type	vua, @object
	.size	vua, 8
vua:
	.zero	8
	.globl	vub
	.align 8
	.type	vub, @object
	.size	vub, 8
vub:
	.zero	8
	.globl	vuc
	.align 8
	.type	vuc, @object
	.size	vuc, 8
vuc:
	.zero	8
	.globl	vud
	.align 8
	.type	vud, @object
	.size	vud, 8
vud:
	.zero	8
	.globl	vue
	.align 8
	.type	vue, @object
	.size	vue, 8
vue:
	.zero	8
	.globl	vuf
	.align 8
	.type	vuf, @object
	.size	vuf, 8
vuf:
	.zero	8
	.globl	vsa
	.align 8
	.type	vsa, @object
	.size	vsa, 8
vsa:
	.zero	8
	.globl	vsb
	.align 8
	.type	vsb, @object
	.size	vsb, 8
vsb:
	.zero	8
	.globl	vsc
	.align 8
	.type	vsc, @object
	.size	vsc, 8
vsc:
	.zero	8
	.globl	vsd
	.align 8
	.type	vsd, @object
	.size	vsd, 8
vsd:
	.zero	8
	.globl	vse
	.align 8
	.type	vse, @object
	.size	vse, 8
vse:
	.zero	8
	.globl	vsf
	.align 8
	.type	vsf, @object
	.size	vsf, 8
vsf:
	.zero	8
	.globl	vra
	.align 16
	.type	vra, @object
	.size	vra, 16
vra:
	.zero	16
	.globl	vrb
	.align 16
	.type	vrb, @object
	.size	vrb, 16
vrb:
	.zero	16
	.globl	vrc
	.align 16
	.type	vrc, @object
	.size	vrc, 16
vrc:
	.zero	16
	.globl	vda
	.align 8
	.type	vda, @object
	.size	vda, 8
vda:
	.zero	8
	.globl	vdb
	.align 8
	.type	vdb, @object
	.size	vdb, 8
vdb:
	.zero	8
	.globl	vdc
	.align 8
	.type	vdc, @object
	.size	vdc, 8
vdc:
	.zero	8
	.globl	slen
	.align 8
	.type	slen, @object
	.size	slen, 8
slen:
	.zero	8
	.globl	tlen
	.align 8
	.type	tlen, @object
	.size	tlen, 8
tlen:
	.zero	8
	.globl	ch
	.type	ch, @object
	.size	ch, 1
ch:
	.zero	1
	.globl	dh
	.type	dh, @object
	.size	dh, 1
dh:
	.zero	1
	.text
	.globl	umin
	.type	umin, @function
umin:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovbe	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	umin, .-umin
	.globl	umax
	.type	umax, @function
umax:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovnb	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	umax, .-umax
	.globl	smin
	.type	smin, @function
smin:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	smin, .-smin
	.globl	smax
	.type	smax, @function
smax:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	smax, .-smax
	.globl	bitpow
	.type	bitpow, @function
bitpow:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movq	$1, -8(%rbp)
	jmp	.L10
.L12:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L11
	movq	-8(%rbp), %rax
	imulq	-24(%rbp), %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	$0, %edx
	divq	-40(%rbp)
	movq	%rdx, -8(%rbp)
.L11:
	movq	-32(%rbp), %rax
	shrq	%rax
	movq	%rax, -32(%rbp)
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	movl	$0, %edx
	divq	-40(%rbp)
	movq	%rdx, -24(%rbp)
.L10:
	cmpq	$0, -32(%rbp)
	jne	.L12
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	bitpow, .-bitpow
	.globl	divide
	.type	divide, @function
divide:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	%rdx, -24(%rbp)
	movq	-24(%rbp), %rax
	leaq	-2(%rax), %rcx
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	bitpow
	imulq	-8(%rbp), %rax
	movl	$0, %edx
	divq	-24(%rbp)
	movq	%rdx, %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	divide, .-divide
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 16008
dp:
	.zero	16008
	.globl	amazing
	.align 32
	.type	amazing, @object
	.size	amazing, 16800
amazing:
	.zero	16800
	.globl	npkdp
	.align 32
	.type	npkdp, @object
	.size	npkdp, 32032008
npkdp:
	.zero	32032008
	.globl	division
	.align 32
	.type	division, @object
	.size	division, 32032008
division:
	.zero	32032008
	.text
	.globl	npk
	.type	npk, @function
npk:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	subq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	amazing(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	amazing(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	$1000000007, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	divide
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	npk, .-npk
	.globl	grouping
	.type	grouping, @function
grouping:
.LFB13:
	.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	$24, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -16(%rbp)
	movq	%rsi, -24(%rbp)
	movq	%rdx, -32(%rbp)
	movq	-24(%rbp), %rax
	imulq	$2001, %rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	division(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	jne	.L19
	movq	-32(%rbp), %rcx
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	amazing(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	$1000000007, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	bitpow
	movq	-32(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	amazing(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	imulq	%rdx, %rax
	movq	%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
	movq	-24(%rbp), %rdx
	imulq	$2001, %rdx, %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	division(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L19:
	movq	-24(%rbp), %rax
	imulq	$2001, %rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	division(%rip), %rax
	movq	(%rdx,%rax), %rbx
	movq	-24(%rbp), %rax
	imulq	-32(%rbp), %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	npk
	movl	$1000000007, %edx
	movq	%rbx, %rsi
	movq	%rax, %rdi
	call	divide
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	grouping, .-grouping
	.section	.rodata
.LC0:
	.string	"%llu\n"
	.text
	.globl	solve
	.type	solve, @function
solve:
.LFB14:
	.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	$88, %rsp
	.cfi_offset 3, -24
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movl	$0, %edi
	call	time@PLT
	movq	%rax, -32(%rbp)
	movq	$1, amazing(%rip)
	movq	$1, -88(%rbp)
	jmp	.L22
.L23:
	movq	-88(%rbp), %rax
	subq	$1, %rax
	leaq	0(,%rax,8), %rdx
	leaq	amazing(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-88(%rbp), %rax
	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
	movq	-88(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	amazing(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addq	$1, -88(%rbp)
.L22:
	movq	-88(%rbp), %rdx
	movq	n(%rip), %rax
	cmpq	%rax, %rdx
	jbe	.L23
	movq	n(%rip), %rax
	movq	%rax, -64(%rbp)
	movq	n(%rip), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	$1, (%rdx,%rax)
	movq	vua(%rip), %rax
	movq	%rax, -88(%rbp)
	jmp	.L24
.L33:
	movq	-64(%rbp), %rax
	movq	-88(%rbp), %rcx
	movq	vud(%rip), %rdx
	imulq	%rcx, %rdx
	subq	%rdx, %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	smax
	movq	%rax, -64(%rbp)
	movq	-64(%rbp), %rax
	movq	%rax, -80(%rbp)
	jmp	.L25
.L32:
	movq	vuc(%rip), %rax
	movq	%rax, -72(%rbp)
	jmp	.L26
.L31:
	movq	-88(%rbp), %rax
	imulq	-72(%rbp), %rax
	movq	%rax, %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -24(%rbp)
	movq	-24(%rbp), %rdx
	movq	n(%rip), %rax
	cmpq	%rax, %rdx
	ja	.L35
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	je	.L36
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rbx
	movq	-72(%rbp), %rdx
	movq	-88(%rbp), %rcx
	movq	-24(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	grouping
	imulq	%rax, %rbx
	movq	%rbx, %rcx
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%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
	movq	-80(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	dp(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	jmp	.L30
.L36:
	nop
.L30:
	addq	$1, -72(%rbp)
.L26:
	movq	-72(%rbp), %rdx
	movq	vud(%rip), %rax
	cmpq	%rax, %rdx
	jbe	.L31
	jmp	.L28
.L35:
	nop
.L28:
	addq	$1, -80(%rbp)
.L25:
	movq	-88(%rbp), %rdx
	movq	vuc(%rip), %rax
	imulq	%rax, %rdx
	movq	-80(%rbp), %rax
	addq	%rax, %rdx
	movq	n(%rip), %rax
	cmpq	%rax, %rdx
	jbe	.L32
	addq	$1, -88(%rbp)
.L24:
	movq	-88(%rbp), %rdx
	movq	vub(%rip), %rax
	cmpq	%rax, %rdx
	jbe	.L33
	movq	dp(%rip), %rax
	movq	%rax, -56(%rbp)
	movq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	solve, .-solve
	.section	.rodata
.LC1:
	.string	"%llu"
.LC2:
	.string	"%llu%llu%llu%llu"
	.text
	.globl	main
	.type	main, @function
main:
.LFB15:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	m(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	subq	$8, %rsp
	leaq	vuf(%rip), %rax
	pushq	%rax
	leaq	vue(%rip), %r9
	leaq	vud(%rip), %r8
	leaq	vuc(%rip), %rax
	movq	%rax, %rcx
	leaq	vub(%rip), %rax
	movq	%rax, %rdx
	leaq	vua(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$16, %rsp
	movl	$0, %eax
	call	solve
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.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:
