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

```c
#include <stdio.h>
#include <stdlib.h>

#define MOD_BY 1000000007

int add(int a, int b) {
	return a + b - MOD_BY * (a + b >= MOD_BY);
}

int sub(int a, int b) {
	return b == 0 ? a : add(a, MOD_BY - b);
}

int mul(int a, int b) {
	int r = 0;
	while (b > 0) {
		if (b & 1) r = add(r, a);
		a = add(a, a);
		b >>= 1;
	}
	return r;
}

int ruizyou(int a, int b) {
	int r = 1;
	while (b > 0) {
		if (b & 1) r = mul(r, a);
		a = mul(a, a);
		b >>= 1;
	}
	return r;
}

int inv(int a) {
	return ruizyou(a, MOD_BY - 2);
}

int waru(int a, int b) {
	return mul(a, inv(b));
}

int cmp(const void* x, const void* y) {
	int a = *(const int*)x, b = *(const int*)y;
	return a < b ? -1 : a > b;
}

int N, K;
int A[114514];

int nyan[114514];

int nCr(int n, int r) {
	int ans = 1, i;
	if (n < 0) return 0;
	if (r < 0 || n < r) return 0;
	for (i = 0; i < r; i++) {
		ans = mul(ans, n - i);
	}
	for (i = 1; i <= r; i++) {
		ans = waru(ans, i);
	}
	return ans;
}

int main(void) {
	int i;
	int answer = 0;
	if (scanf("%d%d", &N, &K) != 2) return 1;
	for (i = 0; i < N; i++) {
		if (scanf("%d", &A[i]) != 1) return 1;
	}
	qsort(A, N, sizeof(*A), cmp);
	for (i = 0; i < N; i++) {
		if (A[i] < 0) A[i] += MOD_BY;
	}
	if (K > 1) {
		for (i = 1; i < N; i++) {
			nyan[i] = nCr(i + 1 - 2, K - 2);
			if (nyan[i] > 0) break;
		}
		for (i++; i < N; i++) {
			nyan[i] = waru(mul(nyan[i - 1], i + 1 - 2), i + 1 - 2 - (K - 2));
		}
		for (i = 1; i < N; i++) {\
			nyan[i] = add(nyan[i - 1], nyan[i]);
		}
		for (i = K - 1; i < N; i++) {
			answer =
				add(
					answer,
					mul(
						sub(A[N - 1 - (i - (K - 1))], A[i - (K - 1)]),
						nyan[N - 1 - (i - (K - 1))]
					)
				);
		}
	}
	printf("%d\n", answer);
	return 0;
}

/*

       12345678
       ABCDEFGH
      ABCDEFGH
     ABCDEFGH
    ABCDEFGH
   ABCDEFGH
  ABCDEFGH
 ABCDEFGH
ABCDEFGH

  (3-1)*C + (4-1)*D + (5-1)*E + (6-1)*F + (7-1)*G + (8-1)*H
+ (4-2)*C + (5-2)*D + (6-2)*E + (7-2)*F + (8-2)*G
+ (5-3)*C + (6-3)*D + (7-3)*E + (8-3)*F
+ (6-4)*C + (7-4)*D + (8-4)*E
+ (7-5)*C + (8-5)*D
+ (8-6)*C

=   8*(H+G+F+E+D+C) + 7*(G+F+E+D+C) + 6*(F+E+D+C) + 5*(E+D+C) + 4*(D+C) + 3*C
  - 1*(C+D+E+F+G+H) - 2*(C+D+E+F+G) - 3*(C+D+E+F) - 4*(C+D+E) - 5*(C+D) - 6*C

*/
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	add
	.type	add, @function
add:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	-4(%rbp), %ecx
	movl	-8(%rbp), %edx
	addl	%ecx, %edx
	cmpl	$1000000006, %edx
	jle	.L2
	movl	$1000000007, %edx
	jmp	.L3
.L2:
	movl	$0, %edx
.L3:
	subl	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	add, .-add
	.globl	sub
	.type	sub, @function
sub:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	cmpl	$0, -8(%rbp)
	je	.L6
	movl	$1000000007, %eax
	subl	-8(%rbp), %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	jmp	.L8
.L6:
	movl	-4(%rbp), %eax
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sub, .-sub
	.globl	mul
	.type	mul, @function
mul:
.LFB8:
	.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
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L10
.L12:
	movl	-24(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L11
	movl	-20(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -4(%rbp)
.L11:
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -20(%rbp)
	sarl	-24(%rbp)
.L10:
	cmpl	$0, -24(%rbp)
	jg	.L12
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	mul, .-mul
	.globl	ruizyou
	.type	ruizyou, @function
ruizyou:
.LFB9:
	.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
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$1, -4(%rbp)
	jmp	.L15
.L17:
	movl	-24(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L16
	movl	-20(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, -4(%rbp)
.L16:
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, -20(%rbp)
	sarl	-24(%rbp)
.L15:
	cmpl	$0, -24(%rbp)
	jg	.L17
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	ruizyou, .-ruizyou
	.globl	inv
	.type	inv, @function
inv:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	movl	$1000000005, %esi
	movl	%eax, %edi
	call	ruizyou
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	inv, .-inv
	.globl	waru
	.type	waru, @function
waru:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, %edi
	call	inv
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	waru, .-waru
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB12:
	.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	-24(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jl	.L24
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	setg	%al
	movzbl	%al, %eax
	jmp	.L26
.L24:
	movl	$-1, %eax
.L26:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	cmp, .-cmp
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	K
	.align 4
	.type	K, @object
	.size	K, 4
K:
	.zero	4
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 458056
A:
	.zero	458056
	.globl	nyan
	.align 32
	.type	nyan, @object
	.size	nyan, 458056
nyan:
	.zero	458056
	.text
	.globl	nCr
	.type	nCr, @function
nCr:
.LFB13:
	.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
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$1, -8(%rbp)
	cmpl	$0, -20(%rbp)
	jns	.L28
	movl	$0, %eax
	jmp	.L29
.L28:
	cmpl	$0, -24(%rbp)
	js	.L30
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jge	.L31
.L30:
	movl	$0, %eax
	jmp	.L29
.L31:
	movl	$0, -4(%rbp)
	jmp	.L32
.L33:
	movl	-20(%rbp), %eax
	subl	-4(%rbp), %eax
	movl	%eax, %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, -8(%rbp)
	addl	$1, -4(%rbp)
.L32:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L33
	movl	$1, -4(%rbp)
	jmp	.L34
.L35:
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	waru
	movl	%eax, -8(%rbp)
	addl	$1, -4(%rbp)
.L34:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L35
	movl	-8(%rbp), %eax
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	nCr, .-nCr
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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	$24, %rsp
	.cfi_offset 3, -24
	movl	$0, -20(%rbp)
	leaq	K(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L37
	movl	$1, %eax
	jmp	.L38
.L37:
	movl	$0, -24(%rbp)
	jmp	.L39
.L41:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L40
	movl	$1, %eax
	jmp	.L38
.L40:
	addl	$1, -24(%rbp)
.L39:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L41
	movl	N(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	A(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -24(%rbp)
	jmp	.L42
.L44:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jns	.L43
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1000000007(%rax), %ecx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L43:
	addl	$1, -24(%rbp)
.L42:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L44
	movl	K(%rip), %eax
	cmpl	$1, %eax
	jle	.L45
	movl	$1, -24(%rbp)
	jmp	.L46
.L49:
	movl	K(%rip), %eax
	leal	-2(%rax), %edx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	nCr
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nyan(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nyan(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jg	.L56
	addl	$1, -24(%rbp)
.L46:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L49
	jmp	.L48
.L56:
	nop
.L48:
	addl	$1, -24(%rbp)
	jmp	.L50
.L51:
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	K(%rip), %eax
	subl	$2, %eax
	movl	%edx, %ebx
	subl	%eax, %ebx
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	nyan(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	movl	%ebx, %esi
	movl	%eax, %edi
	call	waru
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nyan(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -24(%rbp)
.L50:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L51
	movl	$1, -24(%rbp)
	jmp	.L52
.L53:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nyan(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	nyan(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nyan(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -24(%rbp)
.L52:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L53
	movl	K(%rip), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	jmp	.L54
.L55:
	movl	N(%rip), %eax
	leal	-1(%rax), %edx
	movl	K(%rip), %eax
	leal	-1(%rax), %esi
	movl	-24(%rbp), %eax
	subl	%esi, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nyan(%rip), %rax
	movl	(%rdx,%rax), %ebx
	movl	K(%rip), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	subl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	N(%rip), %eax
	leal	-1(%rax), %ecx
	movl	K(%rip), %eax
	leal	-1(%rax), %edi
	movl	-24(%rbp), %eax
	subl	%edi, %eax
	movl	%eax, %esi
	movl	%ecx, %eax
	subl	%esi, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	sub
	movl	%ebx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -20(%rbp)
	addl	$1, -24(%rbp)
.L54:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L55
.L45:
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L38:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.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	cmp
	.type	cmp, @function
cmp:
.LFB45:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE45:
	.size	cmp, .-cmp
	.p2align 4
	.globl	add
	.type	add, @function
add:
.LFB39:
	.cfi_startproc
	endbr64
	leal	(%rdi,%rsi), %eax
	leal	-1000000007(%rax), %edx
	cmpl	$1000000006, %eax
	cmovg	%edx, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	add, .-add
	.p2align 4
	.globl	sub
	.type	sub, @function
sub:
.LFB40:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	testl	%esi, %esi
	je	.L8
	subl	%esi, %eax
	movl	%eax, %edx
	leal	1000000007(%rax), %eax
	cmpl	$1000000006, %eax
	cmovg	%edx, %eax
.L8:
	ret
	.cfi_endproc
.LFE40:
	.size	sub, .-sub
	.p2align 4
	.globl	mul
	.type	mul, @function
mul:
.LFB41:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	testl	%esi, %esi
	jle	.L19
	.p2align 4,,10
	.p2align 3
.L18:
	testb	$1, %sil
	je	.L15
	addl	%edi, %eax
	leal	-1000000007(%rax), %edx
	cmpl	$1000000006, %eax
	cmovg	%edx, %eax
.L15:
	addl	%edi, %edi
	cmpl	$1000000006, %edi
	leal	-1000000007(%rdi), %edx
	cmovg	%edx, %edi
	sarl	%esi
	jne	.L18
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	ret
	.cfi_endproc
.LFE41:
	.size	mul, .-mul
	.p2align 4
	.globl	ruizyou
	.type	ruizyou, @function
ruizyou:
.LFB42:
	.cfi_startproc
	endbr64
	movl	$1, %r8d
	testl	%esi, %esi
	jle	.L24
	.p2align 4,,10
	.p2align 3
.L37:
	testb	$1, %sil
	jne	.L50
	testl	%edi, %edi
	jle	.L40
.L32:
	movl	%edi, %eax
	movl	%edi, %edx
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L36:
	testb	$1, %dl
	je	.L33
	addl	%eax, %edi
	leal	-1000000007(%rdi), %ecx
	cmpl	$1000000006, %edi
	cmovg	%ecx, %edi
.L33:
	addl	%eax, %eax
	cmpl	$1000000006, %eax
	leal	-1000000007(%rax), %ecx
	cmovg	%ecx, %eax
	sarl	%edx
	jne	.L36
	sarl	%esi
	jne	.L37
.L24:
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L50:
	testl	%edi, %edi
	jle	.L39
	movl	%r8d, %eax
	movl	%edi, %edx
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L31:
	testb	$1, %dl
	je	.L28
	addl	%eax, %r8d
	leal	-1000000007(%r8), %ecx
	cmpl	$1000000006, %r8d
	cmovg	%ecx, %r8d
.L28:
	addl	%eax, %eax
	cmpl	$1000000006, %eax
	leal	-1000000007(%rax), %ecx
	cmovg	%ecx, %eax
	sarl	%edx
	jne	.L31
	jmp	.L32
.L40:
	xorl	%edi, %edi
	sarl	%esi
	jne	.L37
	jmp	.L24
.L39:
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	sarl	%esi
	jne	.L37
	jmp	.L24
	.cfi_endproc
.LFE42:
	.size	ruizyou, .-ruizyou
	.p2align 4
	.type	nCr.part.0, @function
nCr.part.0:
.LFB49:
	.cfi_startproc
	movl	%esi, %r10d
	testl	%esi, %esi
	jle	.L65
	movl	%edi, %esi
	movl	$1, %r9d
	subl	%r10d, %esi
	.p2align 4,,10
	.p2align 3
.L58:
	movl	%edi, %edx
	testl	%edi, %edi
	jle	.L66
	movl	%r9d, %eax
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L57:
	testb	$1, %dl
	je	.L54
	addl	%eax, %r9d
	leal	-1000000007(%r9), %ecx
	cmpl	$1000000006, %r9d
	cmovg	%ecx, %r9d
.L54:
	addl	%eax, %eax
	cmpl	$1000000006, %eax
	leal	-1000000007(%rax), %ecx
	cmovg	%ecx, %eax
	sarl	%edx
	jne	.L57
	subl	$1, %edi
	cmpl	%edi, %esi
	jne	.L58
.L78:
	movl	$1, %r11d
	.p2align 4,,10
	.p2align 3
.L64:
	movl	$1000000005, %esi
	movl	%r11d, %edi
	call	ruizyou
	testl	%eax, %eax
	jle	.L67
	movl	%r9d, %edx
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L63:
	testb	$1, %al
	je	.L60
	addl	%edx, %r9d
	leal	-1000000007(%r9), %ecx
	cmpl	$1000000006, %r9d
	cmovg	%ecx, %r9d
.L60:
	addl	%edx, %edx
	cmpl	$1000000006, %edx
	leal	-1000000007(%rdx), %ecx
	cmovg	%ecx, %edx
	sarl	%eax
	jne	.L63
	addl	$1, %r11d
	cmpl	%r11d, %r10d
	jge	.L64
.L51:
	movl	%r9d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L67:
	addl	$1, %r11d
	xorl	%r9d, %r9d
	cmpl	%r11d, %r10d
	jge	.L64
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L66:
	subl	$1, %edi
	xorl	%r9d, %r9d
	cmpl	%edi, %esi
	jne	.L58
	jmp	.L78
.L65:
	movl	$1, %r9d
	movl	%r9d, %eax
	ret
	.cfi_endproc
.LFE49:
	.size	nCr.part.0, .-nCr.part.0
	.p2align 4
	.globl	inv
	.type	inv, @function
inv:
.LFB43:
	.cfi_startproc
	endbr64
	movl	$1000000005, %esi
	jmp	ruizyou
	.cfi_endproc
.LFE43:
	.size	inv, .-inv
	.p2align 4
	.globl	waru
	.type	waru, @function
waru:
.LFB44:
	.cfi_startproc
	endbr64
	movl	%edi, %r9d
	movl	%esi, %edi
	movl	$1000000005, %esi
	call	ruizyou
	xorl	%r8d, %r8d
	testl	%eax, %eax
	jle	.L80
	.p2align 4,,10
	.p2align 3
.L85:
	testb	$1, %al
	je	.L82
	addl	%r9d, %r8d
	leal	-1000000007(%r8), %edx
	cmpl	$1000000006, %r8d
	cmovg	%edx, %r8d
.L82:
	addl	%r9d, %r9d
	cmpl	$1000000006, %r9d
	leal	-1000000007(%r9), %edx
	cmovg	%edx, %r9d
	sarl	%eax
	jne	.L85
.L80:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE44:
	.size	waru, .-waru
	.p2align 4
	.globl	nCr
	.type	nCr, @function
nCr:
.LFB46:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	orl	%esi, %eax
	js	.L91
	cmpl	%esi, %edi
	jl	.L91
	jmp	nCr.part.0
	.p2align 4,,10
	.p2align 3
.L91:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE46:
	.size	nCr, .-nCr
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB47:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	leaq	K(%rip), %rdx
	leaq	N(%rip), %rsi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %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	$24, %rsp
	.cfi_def_cfa_offset 80
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	jne	.L99
	movslq	N(%rip), %rsi
	leaq	A(%rip), %rbx
	testl	%esi, %esi
	jle	.L98
	movq	%rbx, %rbp
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %r13
	jmp	.L100
	.p2align 4,,10
	.p2align 3
.L156:
	movslq	N(%rip), %rsi
	addl	$1, %r12d
	addq	$4, %rbp
	cmpl	%r12d, %esi
	jle	.L98
.L100:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L156
.L99:
	movl	$1, %eax
.L95:
	addq	$24, %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
.L98:
	.cfi_restore_state
	leaq	cmp(%rip), %rcx
	movl	$4, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	N(%rip), %ebp
	testl	%ebp, %ebp
	jle	.L106
	leaq	A(%rip), %rax
	leal	-1(%rbp), %edx
	leaq	4(%rax), %rcx
	leaq	(%rcx,%rdx,4), %rcx
	.p2align 4,,10
	.p2align 3
.L105:
	movl	(%rax), %edx
	testl	%edx, %edx
	jns	.L104
	addl	$1000000007, %edx
	movl	%edx, (%rax)
.L104:
	addq	$4, %rax
	cmpq	%rcx, %rax
	jne	.L105
.L106:
	movl	K(%rip), %eax
	movl	%eax, 12(%rsp)
	subl	$1, %eax
	jle	.L103
	cmpl	$1, %ebp
	jle	.L103
	movl	12(%rsp), %eax
	xorl	%r13d, %r13d
	leal	-2(%rax), %r15d
	leal	-1(%rbp), %eax
	movq	%rax, (%rsp)
	jmp	.L111
	.p2align 4,,10
	.p2align 3
.L108:
	movl	%r13d, %edi
	movl	%r15d, %esi
	call	nCr.part.0
	leaq	4+nyan(%rip), %rdi
	movl	%eax, (%rdi,%r13,4)
	testl	%eax, %eax
	jg	.L110
.L109:
	leal	2(%r14), %r12d
	addq	$1, %r13
	cmpq	%r13, (%rsp)
	je	.L110
.L111:
	movl	%r13d, %r14d
	leal	1(%r13), %r12d
	cmpl	%r13d, %r15d
	jle	.L108
	leaq	4+nyan(%rip), %rax
	movl	$0, (%rax,%r13,4)
	jmp	.L109
.L103:
	xorl	%r8d, %r8d
.L107:
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	jmp	.L95
.L110:
	leal	1(%r12), %ecx
	leaq	-4+nyan(%rip), %r11
	movl	$1, %r10d
	subl	12(%rsp), %r10d
	movslq	%ecx, %r14
	leaq	4(%r11), %r13
	cmpl	%ebp, %ecx
	jge	.L133
	.p2align 4,,10
	.p2align 3
.L117:
	movl	(%r11,%r14,4), %eax
	leal	-1(%r14), %edx
	leal	(%r10,%r14), %esi
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L116:
	testb	$1, %dl
	je	.L112
	addl	%eax, %edi
	leal	-1000000007(%rdi), %ecx
	cmpl	$1000000006, %edi
	cmovg	%ecx, %edi
.L112:
	addl	%eax, %eax
	cmpl	$1000000006, %eax
	leal	-1000000007(%rax), %ecx
	cmovg	%ecx, %eax
	sarl	%edx
	jne	.L116
	call	waru
	movl	%eax, 0(%r13,%r14,4)
	addq	$1, %r14
	cmpl	%r14d, %ebp
	jg	.L117
.L133:
	movl	nyan(%rip), %edx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L121:
	addl	0(%r13,%rax,4), %edx
	cmpl	$1000000006, %edx
	jle	.L155
	subl	$1000000007, %edx
.L155:
	movl	%edx, 0(%r13,%rax,4)
	addq	$1, %rax
	cmpl	%eax, %ebp
	jg	.L121
	movl	12(%rsp), %esi
	cmpl	%ebp, %esi
	jg	.L103
	movslq	%ebp, %rax
	subl	%esi, %ebp
	xorl	%r8d, %r8d
	movl	$1000000007, %r10d
	leaq	-4(,%rax,4), %rdi
	subq	%rbp, %rax
	leaq	A(%rip), %r9
	xorl	%ebp, %ebp
	leaq	-8(,%rax,4), %r11
	.p2align 4,,10
	.p2align 3
.L131:
	movl	(%r9), %esi
	movl	0(%r13,%rdi), %edx
	movl	(%rbx,%rdi), %eax
	testl	%esi, %esi
	je	.L122
	movl	%r10d, %ecx
	subl	%esi, %ecx
	addl	%ecx, %eax
	movl	%ebp, %ecx
	cmpl	$1000000006, %eax
	cmovg	%r10d, %ecx
	subl	%ecx, %eax
.L122:
	xorl	%ecx, %ecx
	testl	%edx, %edx
	jle	.L124
	.p2align 4,,10
	.p2align 3
.L128:
	testb	$1, %dl
	je	.L125
	addl	%eax, %ecx
	leal	-1000000007(%rcx), %esi
	cmpl	$1000000006, %ecx
	cmovg	%esi, %ecx
.L125:
	addl	%eax, %eax
	cmpl	$1000000006, %eax
	leal	-1000000007(%rax), %esi
	cmovg	%esi, %eax
	sarl	%edx
	jne	.L128
.L124:
	addl	%ecx, %r8d
	cmpl	$1000000006, %r8d
	jg	.L129
	subq	$4, %rdi
	addq	$4, %r9
	cmpq	%rdi, %r11
	jne	.L131
	jmp	.L107
.L129:
	subq	$4, %rdi
	subl	$1000000007, %r8d
	addq	$4, %r9
	cmpq	%r11, %rdi
	jne	.L131
	jmp	.L107
	.cfi_endproc
.LFE47:
	.size	main, .-main
	.globl	nyan
	.bss
	.align 32
	.type	nyan, @object
	.size	nyan, 458056
nyan:
	.zero	458056
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 458056
A:
	.zero	458056
	.globl	K
	.align 4
	.type	K, @object
	.size	K, 4
K:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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	cmp
	.type	cmp, @function
cmp:
.LFB45:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE45:
	.size	cmp, .-cmp
	.p2align 4
	.globl	add
	.type	add, @function
add:
.LFB39:
	.cfi_startproc
	endbr64
	leal	(%rdi,%rsi), %eax
	leal	-1000000007(%rax), %edx
	cmpl	$1000000006, %eax
	cmovg	%edx, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	add, .-add
	.p2align 4
	.globl	sub
	.type	sub, @function
sub:
.LFB40:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	testl	%esi, %esi
	je	.L8
	subl	%esi, %eax
	movl	%eax, %edx
	leal	1000000007(%rax), %eax
	cmpl	$1000000006, %eax
	cmovg	%edx, %eax
.L8:
	ret
	.cfi_endproc
.LFE40:
	.size	sub, .-sub
	.p2align 4
	.globl	mul
	.type	mul, @function
mul:
.LFB41:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	testl	%esi, %esi
	jle	.L19
	.p2align 4,,10
	.p2align 3
.L18:
	testb	$1, %sil
	je	.L15
	addl	%edi, %eax
	leal	-1000000007(%rax), %edx
	cmpl	$1000000006, %eax
	cmovg	%edx, %eax
.L15:
	addl	%edi, %edi
	cmpl	$1000000006, %edi
	leal	-1000000007(%rdi), %edx
	cmovg	%edx, %edi
	sarl	%esi
	jne	.L18
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	ret
	.cfi_endproc
.LFE41:
	.size	mul, .-mul
	.p2align 4
	.globl	ruizyou
	.type	ruizyou, @function
ruizyou:
.LFB42:
	.cfi_startproc
	endbr64
	movl	$1, %r8d
	testl	%esi, %esi
	jle	.L24
	.p2align 4,,10
	.p2align 3
.L37:
	testb	$1, %sil
	jne	.L50
	testl	%edi, %edi
	jle	.L40
.L32:
	movl	%edi, %eax
	movl	%edi, %edx
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L36:
	testb	$1, %dl
	je	.L33
	addl	%eax, %edi
	leal	-1000000007(%rdi), %ecx
	cmpl	$1000000006, %edi
	cmovg	%ecx, %edi
.L33:
	addl	%eax, %eax
	cmpl	$1000000006, %eax
	leal	-1000000007(%rax), %ecx
	cmovg	%ecx, %eax
	sarl	%edx
	jne	.L36
	sarl	%esi
	jne	.L37
.L24:
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L50:
	testl	%edi, %edi
	jle	.L39
	movl	%r8d, %eax
	movl	%edi, %edx
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L31:
	testb	$1, %dl
	je	.L28
	addl	%eax, %r8d
	leal	-1000000007(%r8), %ecx
	cmpl	$1000000006, %r8d
	cmovg	%ecx, %r8d
.L28:
	addl	%eax, %eax
	cmpl	$1000000006, %eax
	leal	-1000000007(%rax), %ecx
	cmovg	%ecx, %eax
	sarl	%edx
	jne	.L31
	jmp	.L32
.L40:
	xorl	%edi, %edi
	sarl	%esi
	jne	.L37
	jmp	.L24
.L39:
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	sarl	%esi
	jne	.L37
	jmp	.L24
	.cfi_endproc
.LFE42:
	.size	ruizyou, .-ruizyou
	.p2align 4
	.type	nCr.part.0, @function
nCr.part.0:
.LFB49:
	.cfi_startproc
	movl	%esi, %r10d
	testl	%esi, %esi
	jle	.L65
	movl	%edi, %esi
	movl	$1, %r9d
	subl	%r10d, %esi
	.p2align 4,,10
	.p2align 3
.L58:
	movl	%edi, %edx
	testl	%edi, %edi
	jle	.L66
	movl	%r9d, %eax
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L57:
	testb	$1, %dl
	je	.L54
	addl	%eax, %r9d
	leal	-1000000007(%r9), %ecx
	cmpl	$1000000006, %r9d
	cmovg	%ecx, %r9d
.L54:
	addl	%eax, %eax
	cmpl	$1000000006, %eax
	leal	-1000000007(%rax), %ecx
	cmovg	%ecx, %eax
	sarl	%edx
	jne	.L57
	subl	$1, %edi
	cmpl	%edi, %esi
	jne	.L58
.L78:
	movl	$1, %r11d
	.p2align 4,,10
	.p2align 3
.L64:
	movl	$1000000005, %esi
	movl	%r11d, %edi
	call	ruizyou
	testl	%eax, %eax
	jle	.L67
	movl	%r9d, %edx
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L63:
	testb	$1, %al
	je	.L60
	addl	%edx, %r9d
	leal	-1000000007(%r9), %ecx
	cmpl	$1000000006, %r9d
	cmovg	%ecx, %r9d
.L60:
	addl	%edx, %edx
	cmpl	$1000000006, %edx
	leal	-1000000007(%rdx), %ecx
	cmovg	%ecx, %edx
	sarl	%eax
	jne	.L63
	addl	$1, %r11d
	cmpl	%r11d, %r10d
	jge	.L64
.L51:
	movl	%r9d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L67:
	addl	$1, %r11d
	xorl	%r9d, %r9d
	cmpl	%r11d, %r10d
	jge	.L64
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L66:
	subl	$1, %edi
	xorl	%r9d, %r9d
	cmpl	%edi, %esi
	jne	.L58
	jmp	.L78
.L65:
	movl	$1, %r9d
	movl	%r9d, %eax
	ret
	.cfi_endproc
.LFE49:
	.size	nCr.part.0, .-nCr.part.0
	.p2align 4
	.globl	inv
	.type	inv, @function
inv:
.LFB43:
	.cfi_startproc
	endbr64
	movl	$1000000005, %esi
	jmp	ruizyou
	.cfi_endproc
.LFE43:
	.size	inv, .-inv
	.p2align 4
	.globl	waru
	.type	waru, @function
waru:
.LFB44:
	.cfi_startproc
	endbr64
	movl	%edi, %r9d
	movl	%esi, %edi
	movl	$1000000005, %esi
	call	ruizyou
	xorl	%r8d, %r8d
	testl	%eax, %eax
	jle	.L80
	.p2align 4,,10
	.p2align 3
.L85:
	testb	$1, %al
	je	.L82
	addl	%r9d, %r8d
	leal	-1000000007(%r8), %edx
	cmpl	$1000000006, %r8d
	cmovg	%edx, %r8d
.L82:
	addl	%r9d, %r9d
	cmpl	$1000000006, %r9d
	leal	-1000000007(%r9), %edx
	cmovg	%edx, %r9d
	sarl	%eax
	jne	.L85
.L80:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE44:
	.size	waru, .-waru
	.p2align 4
	.globl	nCr
	.type	nCr, @function
nCr:
.LFB46:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	orl	%esi, %eax
	js	.L91
	cmpl	%esi, %edi
	jl	.L91
	jmp	nCr.part.0
	.p2align 4,,10
	.p2align 3
.L91:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE46:
	.size	nCr, .-nCr
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB47:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	leaq	K(%rip), %rdx
	leaq	N(%rip), %rsi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %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	$24, %rsp
	.cfi_def_cfa_offset 80
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	jne	.L99
	movslq	N(%rip), %rsi
	leaq	A(%rip), %rbx
	testl	%esi, %esi
	jle	.L98
	movq	%rbx, %rbp
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %r13
	jmp	.L100
	.p2align 4,,10
	.p2align 3
.L156:
	movslq	N(%rip), %rsi
	addl	$1, %r12d
	addq	$4, %rbp
	cmpl	%r12d, %esi
	jle	.L98
.L100:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L156
.L99:
	movl	$1, %eax
.L95:
	addq	$24, %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
.L98:
	.cfi_restore_state
	leaq	cmp(%rip), %rcx
	movl	$4, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	N(%rip), %ebp
	testl	%ebp, %ebp
	jle	.L106
	leaq	A(%rip), %rax
	leal	-1(%rbp), %edx
	leaq	4(%rax), %rcx
	leaq	(%rcx,%rdx,4), %rcx
	.p2align 4,,10
	.p2align 3
.L105:
	movl	(%rax), %edx
	testl	%edx, %edx
	jns	.L104
	addl	$1000000007, %edx
	movl	%edx, (%rax)
.L104:
	addq	$4, %rax
	cmpq	%rcx, %rax
	jne	.L105
.L106:
	movl	K(%rip), %eax
	movl	%eax, 12(%rsp)
	subl	$1, %eax
	jle	.L103
	cmpl	$1, %ebp
	jle	.L103
	movl	12(%rsp), %eax
	xorl	%r13d, %r13d
	leal	-2(%rax), %r15d
	leal	-1(%rbp), %eax
	movq	%rax, (%rsp)
	jmp	.L111
	.p2align 4,,10
	.p2align 3
.L108:
	movl	%r13d, %edi
	movl	%r15d, %esi
	call	nCr.part.0
	leaq	4+nyan(%rip), %rdi
	movl	%eax, (%rdi,%r13,4)
	testl	%eax, %eax
	jg	.L110
.L109:
	leal	2(%r14), %r12d
	addq	$1, %r13
	cmpq	%r13, (%rsp)
	je	.L110
.L111:
	movl	%r13d, %r14d
	leal	1(%r13), %r12d
	cmpl	%r13d, %r15d
	jle	.L108
	leaq	4+nyan(%rip), %rax
	movl	$0, (%rax,%r13,4)
	jmp	.L109
.L103:
	xorl	%r8d, %r8d
.L107:
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	jmp	.L95
.L110:
	leal	1(%r12), %ecx
	leaq	-4+nyan(%rip), %r11
	movl	$1, %r10d
	subl	12(%rsp), %r10d
	movslq	%ecx, %r14
	leaq	4(%r11), %r13
	cmpl	%ebp, %ecx
	jge	.L133
	.p2align 4,,10
	.p2align 3
.L117:
	movl	(%r11,%r14,4), %eax
	leal	-1(%r14), %edx
	leal	(%r10,%r14), %esi
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L116:
	testb	$1, %dl
	je	.L112
	addl	%eax, %edi
	leal	-1000000007(%rdi), %ecx
	cmpl	$1000000006, %edi
	cmovg	%ecx, %edi
.L112:
	addl	%eax, %eax
	cmpl	$1000000006, %eax
	leal	-1000000007(%rax), %ecx
	cmovg	%ecx, %eax
	sarl	%edx
	jne	.L116
	call	waru
	movl	%eax, 0(%r13,%r14,4)
	addq	$1, %r14
	cmpl	%r14d, %ebp
	jg	.L117
.L133:
	movl	nyan(%rip), %edx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L121:
	addl	0(%r13,%rax,4), %edx
	cmpl	$1000000006, %edx
	jle	.L155
	subl	$1000000007, %edx
.L155:
	movl	%edx, 0(%r13,%rax,4)
	addq	$1, %rax
	cmpl	%eax, %ebp
	jg	.L121
	movl	12(%rsp), %esi
	cmpl	%ebp, %esi
	jg	.L103
	movslq	%ebp, %rax
	subl	%esi, %ebp
	xorl	%r8d, %r8d
	movl	$1000000007, %r10d
	leaq	-4(,%rax,4), %rdi
	subq	%rbp, %rax
	leaq	A(%rip), %r9
	xorl	%ebp, %ebp
	leaq	-8(,%rax,4), %r11
	.p2align 4,,10
	.p2align 3
.L131:
	movl	(%r9), %esi
	movl	0(%r13,%rdi), %edx
	movl	(%rbx,%rdi), %eax
	testl	%esi, %esi
	je	.L122
	movl	%r10d, %ecx
	subl	%esi, %ecx
	addl	%ecx, %eax
	movl	%ebp, %ecx
	cmpl	$1000000006, %eax
	cmovg	%r10d, %ecx
	subl	%ecx, %eax
.L122:
	xorl	%ecx, %ecx
	testl	%edx, %edx
	jle	.L124
	.p2align 4,,10
	.p2align 3
.L128:
	testb	$1, %dl
	je	.L125
	addl	%eax, %ecx
	leal	-1000000007(%rcx), %esi
	cmpl	$1000000006, %ecx
	cmovg	%esi, %ecx
.L125:
	addl	%eax, %eax
	cmpl	$1000000006, %eax
	leal	-1000000007(%rax), %esi
	cmovg	%esi, %eax
	sarl	%edx
	jne	.L128
.L124:
	addl	%ecx, %r8d
	cmpl	$1000000006, %r8d
	jg	.L129
	subq	$4, %rdi
	addq	$4, %r9
	cmpq	%rdi, %r11
	jne	.L131
	jmp	.L107
.L129:
	subq	$4, %rdi
	subl	$1000000007, %r8d
	addq	$4, %r9
	cmpq	%r11, %rdi
	jne	.L131
	jmp	.L107
	.cfi_endproc
.LFE47:
	.size	main, .-main
	.globl	nyan
	.bss
	.align 32
	.type	nyan, @object
	.size	nyan, 458056
nyan:
	.zero	458056
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 458056
A:
	.zero	458056
	.globl	K
	.align 4
	.type	K, @object
	.size	K, 4
K:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>
#include <stdlib.h>

#define MOD_BY 1000000007

int add(int a, int b) {
	return a + b - MOD_BY * (a + b >= MOD_BY);
}

int sub(int a, int b) {
	return b == 0 ? a : add(a, MOD_BY - b);
}

int mul(int a, int b) {
	int r = 0;
	while (b > 0) {
		if (b & 1) r = add(r, a);
		a = add(a, a);
		b >>= 1;
	}
	return r;
}

int ruizyou(int a, int b) {
	int r = 1;
	while (b > 0) {
		if (b & 1) r = mul(r, a);
		a = mul(a, a);
		b >>= 1;
	}
	return r;
}

int inv(int a) {
	return ruizyou(a, MOD_BY - 2);
}

int waru(int a, int b) {
	return mul(a, inv(b));
}

int cmp(const void* x, const void* y) {
	int a = *(const int*)x, b = *(const int*)y;
	return a < b ? -1 : a > b;
}

int N, K;
int A[114514];

int nyan[114514];

int nCr(int n, int r) {
	int ans = 1, i;
	if (n < 0) return 0;
	if (r < 0 || n < r) return 0;
	for (i = 0; i < r; i++) {
		ans = mul(ans, n - i);
	}
	for (i = 1; i <= r; i++) {
		ans = waru(ans, i);
	}
	return ans;
}

int main(void) {
	int i;
	int answer = 0;
	if (scanf("%d%d", &N, &K) != 2) return 1;
	for (i = 0; i < N; i++) {
		if (scanf("%d", &A[i]) != 1) return 1;
	}
	qsort(A, N, sizeof(*A), cmp);
	for (i = 0; i < N; i++) {
		if (A[i] < 0) A[i] += MOD_BY;
	}
	if (K > 1) {
		for (i = 1; i < N; i++) {
			nyan[i] = nCr(i + 1 - 2, K - 2);
			if (nyan[i] > 0) break;
		}
		for (i++; i < N; i++) {
			nyan[i] = waru(mul(nyan[i - 1], i + 1 - 2), i + 1 - 2 - (K - 2));
		}
		for (i = 1; i < N; i++) {\
			nyan[i] = add(nyan[i - 1], nyan[i]);
		}
		for (i = K - 1; i < N; i++) {
			answer =
				add(
					answer,
					mul(
						sub(A[N - 1 - (i - (K - 1))], A[i - (K - 1)]),
						nyan[N - 1 - (i - (K - 1))]
					)
				);
		}
	}
	printf("%d\n", answer);
	return 0;
}

/*

       12345678
       ABCDEFGH
      ABCDEFGH
     ABCDEFGH
    ABCDEFGH
   ABCDEFGH
  ABCDEFGH
 ABCDEFGH
ABCDEFGH

  (3-1)*C + (4-1)*D + (5-1)*E + (6-1)*F + (7-1)*G + (8-1)*H
+ (4-2)*C + (5-2)*D + (6-2)*E + (7-2)*F + (8-2)*G
+ (5-3)*C + (6-3)*D + (7-3)*E + (8-3)*F
+ (6-4)*C + (7-4)*D + (8-4)*E
+ (7-5)*C + (8-5)*D
+ (8-6)*C

=   8*(H+G+F+E+D+C) + 7*(G+F+E+D+C) + 6*(F+E+D+C) + 5*(E+D+C) + 4*(D+C) + 3*C
  - 1*(C+D+E+F+G+H) - 2*(C+D+E+F+G) - 3*(C+D+E+F) - 4*(C+D+E) - 5*(C+D) - 6*C

*/

3 1
1 1 2
 4 2
1 1 2 4
 10 5
1000000000 1000000000 1000000000 1000000000 1000000000 0 0 0 0 0
 6 4
10 10 10 -10 -10 -10
 4 2
1 1 1 4
 6 4
10 10 10 -10 -10 -13
 6 4
10 10 10 -10 -10 0
 6 4
10 10 10 -10 -10 -1
 6 4
10 4 10 -10 -10 -1
 6 4
10 4 10 -9 -10 -1

0
 10
 999998257
 300
 9
 330
 290
 291
 285
 281

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

```c
#include <stdio.h>
#include <stdlib.h>

#define MOD_BY 1000000007

int add(int a, int b) {
	return a + b - MOD_BY * (a + b >= MOD_BY);
}

int sub(int a, int b) {
	return b == 0 ? a : add(a, MOD_BY - b);
}

int mul(int a, int b) {
	int r = 0;
	while (b > 0) {
		if (b & 1) r = add(r, a);
		a = add(a, a);
		b >>= 1;
	}
	return r;
}

int ruizyou(int a, int b) {
	int r = 1;
	while (b > 0) {
		if (b & 1) r = mul(r, a);
		a = mul(a, a);
		b >>= 1;
	}
	return r;
}

int inv(int a) {
	return ruizyou(a, MOD_BY - 2);
}

int waru(int a, int b) {
	return mul(a, inv(b));
}

int cmp(const void* x, const void* y) {
	int a = *(const int*)x, b = *(const int*)y;
	return a < b ? -1 : a > b;
}

int N, K;
int A[114514];

int nyan[114514];

int nCr(int n, int r) {
	int ans = 1, i;
	if (n < 0) return 0;
	if (r < 0 || n < r) return 0;
	for (i = 0; i < r; i++) {
		ans = mul(ans, n - i);
	}
	for (i = 1; i <= r; i++) {
		ans = waru(ans, i);
	}
	return ans;
}

int main(void) {
	int i;
	int answer = 0;
	if (scanf("%d%d", &N, &K) != 2) return 1;
	for (i = 0; i < N; i++) {
		if (scanf("%d", &A[i]) != 1) return 1;
	}
	qsort(A, N, sizeof(*A), cmp);
	for (i = 0; i < N; i++) {
		if (A[i] < 0) A[i] += MOD_BY;
	}
	if (K > 1) {
		for (i = 1; i < N; i++) {
			nyan[i] = nCr(i + 1 - 2, K - 2);
			if (nyan[i] > 0) break;
		}
		for (i++; i < N; i++) {
			nyan[i] = waru(mul(nyan[i - 1], i + 1 - 2), i + 1 - 2 - (K - 2));
		}
		for (i = 1; i < N; i++) {\
			nyan[i] = add(nyan[i - 1], nyan[i]);
		}
		for (i = K - 1; i < N; i++) {
			answer =
				add(
					answer,
					mul(
						sub(A[N - 1 - (i - (K - 1))], A[i - (K - 1)]),
						nyan[N - 1 - (i - (K - 1))]
					)
				);
		}
	}
	printf("%d\n", answer);
	return 0;
}

/*

       12345678
       ABCDEFGH
      ABCDEFGH
     ABCDEFGH
    ABCDEFGH
   ABCDEFGH
  ABCDEFGH
 ABCDEFGH
ABCDEFGH

  (3-1)*C + (4-1)*D + (5-1)*E + (6-1)*F + (7-1)*G + (8-1)*H
+ (4-2)*C + (5-2)*D + (6-2)*E + (7-2)*F + (8-2)*G
+ (5-3)*C + (6-3)*D + (7-3)*E + (8-3)*F
+ (6-4)*C + (7-4)*D + (8-4)*E
+ (7-5)*C + (8-5)*D
+ (8-6)*C

=   8*(H+G+F+E+D+C) + 7*(G+F+E+D+C) + 6*(F+E+D+C) + 5*(E+D+C) + 4*(D+C) + 3*C
  - 1*(C+D+E+F+G+H) - 2*(C+D+E+F+G) - 3*(C+D+E+F) - 4*(C+D+E) - 5*(C+D) - 6*C

*/
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	add
	.type	add, @function
add:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	-4(%rbp), %ecx
	movl	-8(%rbp), %edx
	addl	%ecx, %edx
	cmpl	$1000000006, %edx
	jle	.L2
	movl	$1000000007, %edx
	jmp	.L3
.L2:
	movl	$0, %edx
.L3:
	subl	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	add, .-add
	.globl	sub
	.type	sub, @function
sub:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	cmpl	$0, -8(%rbp)
	je	.L6
	movl	$1000000007, %eax
	subl	-8(%rbp), %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	jmp	.L8
.L6:
	movl	-4(%rbp), %eax
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sub, .-sub
	.globl	mul
	.type	mul, @function
mul:
.LFB8:
	.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
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L10
.L12:
	movl	-24(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L11
	movl	-20(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -4(%rbp)
.L11:
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -20(%rbp)
	sarl	-24(%rbp)
.L10:
	cmpl	$0, -24(%rbp)
	jg	.L12
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	mul, .-mul
	.globl	ruizyou
	.type	ruizyou, @function
ruizyou:
.LFB9:
	.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
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$1, -4(%rbp)
	jmp	.L15
.L17:
	movl	-24(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L16
	movl	-20(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, -4(%rbp)
.L16:
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, -20(%rbp)
	sarl	-24(%rbp)
.L15:
	cmpl	$0, -24(%rbp)
	jg	.L17
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	ruizyou, .-ruizyou
	.globl	inv
	.type	inv, @function
inv:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	movl	$1000000005, %esi
	movl	%eax, %edi
	call	ruizyou
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	inv, .-inv
	.globl	waru
	.type	waru, @function
waru:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, %edi
	call	inv
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	waru, .-waru
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB12:
	.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	-24(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jl	.L24
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	setg	%al
	movzbl	%al, %eax
	jmp	.L26
.L24:
	movl	$-1, %eax
.L26:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	cmp, .-cmp
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	K
	.align 4
	.type	K, @object
	.size	K, 4
K:
	.zero	4
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 458056
A:
	.zero	458056
	.globl	nyan
	.align 32
	.type	nyan, @object
	.size	nyan, 458056
nyan:
	.zero	458056
	.text
	.globl	nCr
	.type	nCr, @function
nCr:
.LFB13:
	.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
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$1, -8(%rbp)
	cmpl	$0, -20(%rbp)
	jns	.L28
	movl	$0, %eax
	jmp	.L29
.L28:
	cmpl	$0, -24(%rbp)
	js	.L30
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jge	.L31
.L30:
	movl	$0, %eax
	jmp	.L29
.L31:
	movl	$0, -4(%rbp)
	jmp	.L32
.L33:
	movl	-20(%rbp), %eax
	subl	-4(%rbp), %eax
	movl	%eax, %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, -8(%rbp)
	addl	$1, -4(%rbp)
.L32:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L33
	movl	$1, -4(%rbp)
	jmp	.L34
.L35:
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	waru
	movl	%eax, -8(%rbp)
	addl	$1, -4(%rbp)
.L34:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L35
	movl	-8(%rbp), %eax
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	nCr, .-nCr
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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	$24, %rsp
	.cfi_offset 3, -24
	movl	$0, -20(%rbp)
	leaq	K(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L37
	movl	$1, %eax
	jmp	.L38
.L37:
	movl	$0, -24(%rbp)
	jmp	.L39
.L41:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L40
	movl	$1, %eax
	jmp	.L38
.L40:
	addl	$1, -24(%rbp)
.L39:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L41
	movl	N(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	A(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -24(%rbp)
	jmp	.L42
.L44:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jns	.L43
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1000000007(%rax), %ecx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L43:
	addl	$1, -24(%rbp)
.L42:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L44
	movl	K(%rip), %eax
	cmpl	$1, %eax
	jle	.L45
	movl	$1, -24(%rbp)
	jmp	.L46
.L49:
	movl	K(%rip), %eax
	leal	-2(%rax), %edx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	nCr
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nyan(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nyan(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jg	.L56
	addl	$1, -24(%rbp)
.L46:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L49
	jmp	.L48
.L56:
	nop
.L48:
	addl	$1, -24(%rbp)
	jmp	.L50
.L51:
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	K(%rip), %eax
	subl	$2, %eax
	movl	%edx, %ebx
	subl	%eax, %ebx
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	nyan(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	movl	%ebx, %esi
	movl	%eax, %edi
	call	waru
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nyan(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -24(%rbp)
.L50:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L51
	movl	$1, -24(%rbp)
	jmp	.L52
.L53:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nyan(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	nyan(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nyan(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -24(%rbp)
.L52:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L53
	movl	K(%rip), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	jmp	.L54
.L55:
	movl	N(%rip), %eax
	leal	-1(%rax), %edx
	movl	K(%rip), %eax
	leal	-1(%rax), %esi
	movl	-24(%rbp), %eax
	subl	%esi, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nyan(%rip), %rax
	movl	(%rdx,%rax), %ebx
	movl	K(%rip), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	subl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	N(%rip), %eax
	leal	-1(%rax), %ecx
	movl	K(%rip), %eax
	leal	-1(%rax), %edi
	movl	-24(%rbp), %eax
	subl	%edi, %eax
	movl	%eax, %esi
	movl	%ecx, %eax
	subl	%esi, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	sub
	movl	%ebx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -20(%rbp)
	addl	$1, -24(%rbp)
.L54:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L55
.L45:
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L38:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.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	add
	.type	add, @function
add:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	-4(%rbp), %ecx
	movl	-8(%rbp), %edx
	addl	%ecx, %edx
	cmpl	$1000000006, %edx
	jle	.L2
	movl	$1000000007, %edx
	jmp	.L3
.L2:
	movl	$0, %edx
.L3:
	subl	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	add, .-add
	.globl	sub
	.type	sub, @function
sub:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	cmpl	$0, -8(%rbp)
	je	.L6
	movl	$1000000007, %eax
	subl	-8(%rbp), %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	jmp	.L8
.L6:
	movl	-4(%rbp), %eax
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sub, .-sub
	.globl	mul
	.type	mul, @function
mul:
.LFB8:
	.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
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L10
.L12:
	movl	-24(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L11
	movl	-20(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -4(%rbp)
.L11:
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -20(%rbp)
	sarl	-24(%rbp)
.L10:
	cmpl	$0, -24(%rbp)
	jg	.L12
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	mul, .-mul
	.globl	ruizyou
	.type	ruizyou, @function
ruizyou:
.LFB9:
	.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
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$1, -4(%rbp)
	jmp	.L15
.L17:
	movl	-24(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L16
	movl	-20(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, -4(%rbp)
.L16:
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, -20(%rbp)
	sarl	-24(%rbp)
.L15:
	cmpl	$0, -24(%rbp)
	jg	.L17
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	ruizyou, .-ruizyou
	.globl	inv
	.type	inv, @function
inv:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	movl	$1000000005, %esi
	movl	%eax, %edi
	call	ruizyou
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	inv, .-inv
	.globl	waru
	.type	waru, @function
waru:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, %edi
	call	inv
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	waru, .-waru
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB12:
	.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	-24(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jl	.L24
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	setg	%al
	movzbl	%al, %eax
	jmp	.L26
.L24:
	movl	$-1, %eax
.L26:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	cmp, .-cmp
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	K
	.align 4
	.type	K, @object
	.size	K, 4
K:
	.zero	4
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 458056
A:
	.zero	458056
	.globl	nyan
	.align 32
	.type	nyan, @object
	.size	nyan, 458056
nyan:
	.zero	458056
	.text
	.globl	nCr
	.type	nCr, @function
nCr:
.LFB13:
	.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
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$1, -8(%rbp)
	cmpl	$0, -20(%rbp)
	jns	.L28
	movl	$0, %eax
	jmp	.L29
.L28:
	cmpl	$0, -24(%rbp)
	js	.L30
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jge	.L31
.L30:
	movl	$0, %eax
	jmp	.L29
.L31:
	movl	$0, -4(%rbp)
	jmp	.L32
.L33:
	movl	-20(%rbp), %eax
	subl	-4(%rbp), %eax
	movl	%eax, %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, -8(%rbp)
	addl	$1, -4(%rbp)
.L32:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L33
	movl	$1, -4(%rbp)
	jmp	.L34
.L35:
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	waru
	movl	%eax, -8(%rbp)
	addl	$1, -4(%rbp)
.L34:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L35
	movl	-8(%rbp), %eax
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	nCr, .-nCr
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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	$24, %rsp
	.cfi_offset 3, -24
	movl	$0, -20(%rbp)
	leaq	K(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L37
	movl	$1, %eax
	jmp	.L38
.L37:
	movl	$0, -24(%rbp)
	jmp	.L39
.L41:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L40
	movl	$1, %eax
	jmp	.L38
.L40:
	addl	$1, -24(%rbp)
.L39:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L41
	movl	N(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	A(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -24(%rbp)
	jmp	.L42
.L44:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jns	.L43
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1000000007(%rax), %ecx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L43:
	addl	$1, -24(%rbp)
.L42:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L44
	movl	K(%rip), %eax
	cmpl	$1, %eax
	jle	.L45
	movl	$1, -24(%rbp)
	jmp	.L46
.L49:
	movl	K(%rip), %eax
	leal	-2(%rax), %edx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	nCr
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nyan(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nyan(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jg	.L56
	addl	$1, -24(%rbp)
.L46:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L49
	jmp	.L48
.L56:
	nop
.L48:
	addl	$1, -24(%rbp)
	jmp	.L50
.L51:
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	K(%rip), %eax
	subl	$2, %eax
	movl	%edx, %ebx
	subl	%eax, %ebx
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	nyan(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	movl	%ebx, %esi
	movl	%eax, %edi
	call	waru
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nyan(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -24(%rbp)
.L50:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L51
	movl	$1, -24(%rbp)
	jmp	.L52
.L53:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nyan(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	nyan(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nyan(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -24(%rbp)
.L52:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L53
	movl	K(%rip), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	jmp	.L54
.L55:
	movl	N(%rip), %eax
	leal	-1(%rax), %edx
	movl	K(%rip), %eax
	leal	-1(%rax), %esi
	movl	-24(%rbp), %eax
	subl	%esi, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nyan(%rip), %rax
	movl	(%rdx,%rax), %ebx
	movl	K(%rip), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	subl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	N(%rip), %eax
	leal	-1(%rax), %ecx
	movl	K(%rip), %eax
	leal	-1(%rax), %edi
	movl	-24(%rbp), %eax
	subl	%edi, %eax
	movl	%eax, %esi
	movl	%ecx, %eax
	subl	%esi, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	sub
	movl	%ebx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -20(%rbp)
	addl	$1, -24(%rbp)
.L54:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L55
.L45:
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L38:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.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:
