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>

long long div_mod(long long x, long long y, long long z)
{
	if (x % y == 0) return x / y;
	else return (div_mod((1 + x / y) * y - x, (z % y), y) * z + x) / y;
}

int main()
{
	long long K, N;
	scanf("%lld %lld", &N, &K);
	
	long long i, j, ans[2001] = {};
	for (i = 1; i <= K && i <= N - K + 1; i++) {
		for (j = K - 1, ans[i] = 1; j >= K - i + 1; j--) ans[i] = ans[i] * j % 1000000007;
		for (j = i - 1; j >= 2; j--) ans[i] = div_mod(ans[i], j, 1000000007);
		for (j = N - K + 1; j >= N - K - i + 2; j--) ans[i] = ans[i] * j % 1000000007;
		for (j = i; j >= 2; j--) ans[i] = div_mod(ans[i], j, 1000000007);
	}
	
	for (i = 1; i <= K; i++) printf("%lld\n", ans[i]);
	fflush(stdout);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	div_mod
	.type	div_mod, @function
div_mod:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	%rdx, -24(%rbp)
	movq	-8(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L2
	movq	-8(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	jmp	.L3
.L2:
	movq	-24(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	movq	%rdx, %rcx
	movq	-8(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	addq	$1, %rax
	imulq	-16(%rbp), %rax
	subq	-8(%rbp), %rax
	movq	-16(%rbp), %rdx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	div_mod
	imulq	-24(%rbp), %rax
	movq	%rax, %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	cqto
	idivq	-16(%rbp)
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	div_mod, .-div_mod
	.section	.rodata
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3760, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16048(%rbp), %rdx
	leaq	-16040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-16016(%rbp), %rax
	movl	$16008, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$1, -16032(%rbp)
	jmp	.L5
.L15:
	movq	-16048(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -16024(%rbp)
	movq	-16032(%rbp), %rax
	movq	$1, -16016(%rbp,%rax,8)
	jmp	.L6
.L7:
	movq	-16032(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	imulq	-16024(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	-16032(%rbp), %rdx
	movq	%rax, -16016(%rbp,%rdx,8)
	subq	$1, -16024(%rbp)
.L6:
	movq	-16048(%rbp), %rax
	subq	-16032(%rbp), %rax
	cmpq	%rax, -16024(%rbp)
	jg	.L7
	movq	-16032(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -16024(%rbp)
	jmp	.L8
.L9:
	movq	-16032(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	movq	-16024(%rbp), %rcx
	movl	$1000000007, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	div_mod
	movq	-16032(%rbp), %rdx
	movq	%rax, -16016(%rbp,%rdx,8)
	subq	$1, -16024(%rbp)
.L8:
	cmpq	$1, -16024(%rbp)
	jg	.L9
	movq	-16040(%rbp), %rax
	movq	-16048(%rbp), %rdx
	subq	%rdx, %rax
	addq	$1, %rax
	movq	%rax, -16024(%rbp)
	jmp	.L10
.L11:
	movq	-16032(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	imulq	-16024(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	-16032(%rbp), %rdx
	movq	%rax, -16016(%rbp,%rdx,8)
	subq	$1, -16024(%rbp)
.L10:
	movq	-16040(%rbp), %rax
	movq	-16048(%rbp), %rdx
	subq	%rdx, %rax
	subq	-16032(%rbp), %rax
	addq	$1, %rax
	cmpq	%rax, -16024(%rbp)
	jg	.L11
	movq	-16032(%rbp), %rax
	movq	%rax, -16024(%rbp)
	jmp	.L12
.L13:
	movq	-16032(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	movq	-16024(%rbp), %rcx
	movl	$1000000007, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	div_mod
	movq	-16032(%rbp), %rdx
	movq	%rax, -16016(%rbp,%rdx,8)
	subq	$1, -16024(%rbp)
.L12:
	cmpq	$1, -16024(%rbp)
	jg	.L13
	addq	$1, -16032(%rbp)
.L5:
	movq	-16048(%rbp), %rax
	cmpq	%rax, -16032(%rbp)
	jg	.L14
	movq	-16040(%rbp), %rax
	movq	-16048(%rbp), %rdx
	subq	%rdx, %rax
	addq	$1, %rax
	cmpq	%rax, -16032(%rbp)
	jle	.L15
.L14:
	movq	$1, -16032(%rbp)
	jmp	.L16
.L17:
	movq	-16032(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -16032(%rbp)
.L16:
	movq	-16048(%rbp), %rax
	cmpq	%rax, -16032(%rbp)
	jle	.L17
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.type	div_mod.part.0, @function
div_mod.part.0:
.LFB25:
	.cfi_startproc
	movq	%rdx, %rax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdx, %rbx
	cqto
	idivq	%rsi
	movq	%rdi, %rax
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%rdx, %r14
	cqto
	idivq	%rsi
	leaq	1(%rax), %r12
	imulq	%rsi, %r12
	subq	%rdi, %r12
	movq	%r12, %rax
	cqto
	idivq	%r14
	testq	%rdx, %rdx
	jne	.L14
.L2:
	imulq	%rax, %rbx
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	leaq	(%rbx,%r13), %rax
	popq	%rbx
	.cfi_def_cfa_offset 48
	cqto
	idivq	%rbp
	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
.L14:
	.cfi_restore_state
	movq	%rax, %rcx
	movq	%rsi, %rax
	cqto
	addq	$1, %rcx
	idivq	%r14
	imulq	%r14, %rcx
	subq	%r12, %rcx
	movq	%rcx, %rax
	movq	%rdx, %r15
	cqto
	idivq	%r15
	movq	%rax, %rdi
	testq	%rdx, %rdx
	jne	.L15
.L3:
	imulq	%rbp, %rax
	addq	%r12, %rax
	cqto
	idivq	%r14
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%r14, %rax
	addq	$1, %rdi
	cqto
	imulq	%r15, %rdi
	idivq	%r15
	subq	%rcx, %rdi
	movq	%rdi, %rax
	movq	%rdx, %r8
	cqto
	idivq	%r8
	testq	%rdx, %rdx
	jne	.L16
.L5:
	imulq	%r14, %rax
	addq	%rcx, %rax
	cqto
	idivq	%r15
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%r15, %rdx
	movq	%r8, %rsi
	movq	%rcx, 8(%rsp)
	call	div_mod.part.0
	movq	8(%rsp), %rcx
	jmp	.L5
	.cfi_endproc
.LFE25:
	.size	div_mod.part.0, .-div_mod.part.0
	.p2align 4
	.globl	div_mod
	.type	div_mod, @function
div_mod:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movq	%rdx, %r8
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L21
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%r8, %rdx
	jmp	div_mod.part.0
	.cfi_endproc
.LFE23:
	.size	div_mod, .-div_mod
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 12344
	orq	$0, (%rsp)
	subq	$3800, %rsp
	.cfi_def_cfa_offset 16144
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 16072(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rdx
	leaq	56(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	64(%rsp), %rax
	movl	$16008, %edx
	xorl	%esi, %esi
	movq	%rax, %rdi
	movq	%rax, 24(%rsp)
	call	memset@PLT
	movq	48(%rsp), %rax
	movq	%rax, 8(%rsp)
	testq	%rax, %rax
	jle	.L45
	movq	56(%rsp), %r14
	leaq	72(%rsp), %rbx
	movl	$1, %r15d
	movabsq	$-8543223828751151131, %rbp
	subq	%rax, %r14
	subq	$1, %rax
	leaq	1(%r14), %rdi
	movq	%rax, 16(%rsp)
	movq	%rax, %r13
	movq	%rdi, (%rsp)
	.p2align 4,,10
	.p2align 3
.L24:
	cmpq	%r15, (%rsp)
	jl	.L36
	movq	16(%rsp), %rsi
	movq	$1, (%rbx)
	movl	$1, %r9d
	cmpq	%r13, %rsi
	jle	.L25
	.p2align 4,,10
	.p2align 3
.L26:
	movq	%r9, %rcx
	imulq	%rsi, %rcx
	subq	$1, %rsi
	movq	%rcx, %rax
	imulq	%rbp
	movq	%rcx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %r9
	sarq	$29, %r9
	subq	%rax, %r9
	imulq	$1000000007, %r9, %rax
	subq	%rax, %rcx
	movq	%rcx, %r9
	cmpq	%r13, %rsi
	jne	.L26
	movq	%rcx, (%rbx)
.L25:
	leaq	-1(%r15), %r10
	cmpq	$1, %r10
	ja	.L33
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L48:
	movq	%rax, %r9
	subq	$1, %r10
	movq	%r9, (%rbx)
	cmpq	$1, %r10
	je	.L27
.L33:
	movq	%r9, %rax
	cqto
	idivq	%r10
	movq	%rax, %r11
	testq	%rdx, %rdx
	je	.L48
	movl	$1000000007, %eax
	addq	$1, %r11
	cqto
	imulq	%r10, %r11
	idivq	%r10
	subq	%r9, %r11
	movq	%r11, %rax
	movq	%rdx, %r12
	cqto
	idivq	%r12
	movq	%rax, %rcx
	testq	%rdx, %rdx
	jne	.L73
.L29:
	imulq	$1000000007, %rax, %rax
	addq	%r9, %rax
	cqto
	idivq	%r10
	subq	$1, %r10
	movq	%rax, %r9
	movq	%r9, (%rbx)
	cmpq	$1, %r10
	jne	.L33
.L27:
	movq	(%rsp), %rsi
	.p2align 4,,10
	.p2align 3
.L34:
	movq	%r9, %rcx
	imulq	%rsi, %rcx
	subq	$1, %rsi
	movq	%rcx, %rax
	imulq	%rbp
	movq	%rcx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %r9
	sarq	$29, %r9
	subq	%rax, %r9
	imulq	$1000000007, %r9, %rax
	subq	%rax, %rcx
	movq	%rcx, %r9
	cmpq	%r14, %rsi
	jg	.L34
	movq	%rcx, (%rbx)
	movq	%r15, %r10
	cmpq	$1, %r15
	jne	.L35
	jmp	.L42
	.p2align 4,,10
	.p2align 3
.L50:
	movq	%rax, %r9
	subq	$1, %r10
	movq	%r9, (%rbx)
	cmpq	$1, %r10
	je	.L42
.L35:
	movq	%r9, %rax
	cqto
	idivq	%r10
	movq	%rax, %r11
	testq	%rdx, %rdx
	je	.L50
	movl	$1000000007, %eax
	addq	$1, %r11
	cqto
	imulq	%r10, %r11
	idivq	%r10
	subq	%r9, %r11
	movq	%r11, %rax
	movq	%rdx, %r12
	cqto
	idivq	%r12
	movq	%rax, %rcx
	testq	%rdx, %rdx
	jne	.L74
.L38:
	imulq	$1000000007, %rax, %rax
	addq	%r9, %rax
	cqto
	idivq	%r10
	subq	$1, %r10
	movq	%rax, %r9
	movq	%r9, (%rbx)
	cmpq	$1, %r10
	jne	.L35
.L42:
	addq	$1, %r15
	addq	$8, %rbx
	subq	$1, %r13
	subq	$1, %r14
	cmpq	8(%rsp), %r15
	jle	.L24
.L36:
	movq	24(%rsp), %r12
	movl	$1, %ebx
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L44:
	movq	(%r12,%rbx,8), %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpq	%rbx, 48(%rsp)
	jge	.L44
.L45:
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	16072(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L75
	addq	$16088, %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
.L73:
	.cfi_restore_state
	movq	%r10, %rax
	addq	$1, %rcx
	cqto
	imulq	%r12, %rcx
	idivq	%r12
	subq	%r11, %rcx
	movq	%rcx, %rax
	movq	%rdx, %r8
	cqto
	idivq	%r8
	movq	%rax, %rdi
	testq	%rdx, %rdx
	jne	.L76
.L30:
	imulq	%r10, %rax
	addq	%r11, %rax
	cqto
	idivq	%r12
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L74:
	movq	%r10, %rax
	addq	$1, %rcx
	cqto
	imulq	%r12, %rcx
	idivq	%r12
	subq	%r11, %rcx
	movq	%rcx, %rax
	movq	%rdx, %r8
	cqto
	idivq	%r8
	movq	%rax, %rdi
	testq	%rdx, %rdx
	jne	.L77
.L39:
	imulq	%r10, %rax
	addq	%r11, %rax
	cqto
	idivq	%r12
	jmp	.L38
	.p2align 4,,10
	.p2align 3
.L76:
	movq	%r12, %rax
	addq	$1, %rdi
	cqto
	imulq	%r8, %rdi
	idivq	%r8
	subq	%rcx, %rdi
	movq	%rdi, %rax
	movq	%rdx, %rsi
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L78
.L32:
	imulq	%r12, %rax
	addq	%rcx, %rax
	cqto
	idivq	%r8
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L77:
	movq	%r12, %rax
	addq	$1, %rdi
	cqto
	imulq	%r8, %rdi
	idivq	%r8
	subq	%rcx, %rdi
	movq	%rdi, %rax
	movq	%rdx, %rsi
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L79
.L41:
	imulq	%r12, %rax
	addq	%rcx, %rax
	cqto
	idivq	%r8
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L78:
	movq	%r8, %rdx
	movq	%rcx, 40(%rsp)
	movq	%r8, 32(%rsp)
	call	div_mod.part.0
	movq	40(%rsp), %rcx
	movq	32(%rsp), %r8
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L79:
	movq	%r8, %rdx
	movq	%rcx, 40(%rsp)
	movq	%r8, 32(%rsp)
	call	div_mod.part.0
	movq	40(%rsp), %rcx
	movq	32(%rsp), %r8
	jmp	.L41
.L75:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.type	div_mod.part.0, @function
div_mod.part.0:
.LFB25:
	.cfi_startproc
	movq	%rdx, %rax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdx, %rbx
	cqto
	idivq	%rsi
	movq	%rdi, %rax
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%rdx, %r14
	cqto
	idivq	%rsi
	leaq	1(%rax), %r12
	imulq	%rsi, %r12
	subq	%rdi, %r12
	movq	%r12, %rax
	cqto
	idivq	%r14
	testq	%rdx, %rdx
	jne	.L14
.L2:
	imulq	%rax, %rbx
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	leaq	(%rbx,%r13), %rax
	popq	%rbx
	.cfi_def_cfa_offset 48
	cqto
	idivq	%rbp
	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
.L14:
	.cfi_restore_state
	movq	%rax, %rcx
	movq	%rsi, %rax
	cqto
	addq	$1, %rcx
	idivq	%r14
	imulq	%r14, %rcx
	subq	%r12, %rcx
	movq	%rcx, %rax
	movq	%rdx, %r15
	cqto
	idivq	%r15
	movq	%rax, %rdi
	testq	%rdx, %rdx
	jne	.L15
.L3:
	imulq	%rbp, %rax
	addq	%r12, %rax
	cqto
	idivq	%r14
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%r14, %rax
	addq	$1, %rdi
	cqto
	imulq	%r15, %rdi
	idivq	%r15
	subq	%rcx, %rdi
	movq	%rdi, %rax
	movq	%rdx, %r8
	cqto
	idivq	%r8
	testq	%rdx, %rdx
	jne	.L16
.L5:
	imulq	%r14, %rax
	addq	%rcx, %rax
	cqto
	idivq	%r15
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%r15, %rdx
	movq	%r8, %rsi
	movq	%rcx, 8(%rsp)
	call	div_mod.part.0
	movq	8(%rsp), %rcx
	jmp	.L5
	.cfi_endproc
.LFE25:
	.size	div_mod.part.0, .-div_mod.part.0
	.p2align 4
	.globl	div_mod
	.type	div_mod, @function
div_mod:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movq	%rdx, %r8
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L21
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%r8, %rdx
	jmp	div_mod.part.0
	.cfi_endproc
.LFE23:
	.size	div_mod, .-div_mod
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 12344
	orq	$0, (%rsp)
	subq	$3800, %rsp
	.cfi_def_cfa_offset 16144
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 16072(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rdx
	leaq	56(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	64(%rsp), %rax
	movl	$16008, %edx
	xorl	%esi, %esi
	movq	%rax, %rdi
	movq	%rax, 24(%rsp)
	call	memset@PLT
	movq	48(%rsp), %rax
	movq	%rax, 8(%rsp)
	testq	%rax, %rax
	jle	.L45
	movq	56(%rsp), %r14
	leaq	72(%rsp), %rbx
	movl	$1, %r15d
	movabsq	$-8543223828751151131, %rbp
	subq	%rax, %r14
	subq	$1, %rax
	leaq	1(%r14), %rdi
	movq	%rax, 16(%rsp)
	movq	%rax, %r13
	movq	%rdi, (%rsp)
	.p2align 4,,10
	.p2align 3
.L24:
	cmpq	%r15, (%rsp)
	jl	.L36
	movq	16(%rsp), %rsi
	movq	$1, (%rbx)
	movl	$1, %r9d
	cmpq	%r13, %rsi
	jle	.L25
	.p2align 4,,10
	.p2align 3
.L26:
	movq	%r9, %rcx
	imulq	%rsi, %rcx
	subq	$1, %rsi
	movq	%rcx, %rax
	imulq	%rbp
	movq	%rcx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %r9
	sarq	$29, %r9
	subq	%rax, %r9
	imulq	$1000000007, %r9, %rax
	subq	%rax, %rcx
	movq	%rcx, %r9
	cmpq	%r13, %rsi
	jne	.L26
	movq	%rcx, (%rbx)
.L25:
	leaq	-1(%r15), %r10
	cmpq	$1, %r10
	ja	.L33
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L48:
	movq	%rax, %r9
	subq	$1, %r10
	movq	%r9, (%rbx)
	cmpq	$1, %r10
	je	.L27
.L33:
	movq	%r9, %rax
	cqto
	idivq	%r10
	movq	%rax, %r11
	testq	%rdx, %rdx
	je	.L48
	movl	$1000000007, %eax
	addq	$1, %r11
	cqto
	imulq	%r10, %r11
	idivq	%r10
	subq	%r9, %r11
	movq	%r11, %rax
	movq	%rdx, %r12
	cqto
	idivq	%r12
	movq	%rax, %rcx
	testq	%rdx, %rdx
	jne	.L73
.L29:
	imulq	$1000000007, %rax, %rax
	addq	%r9, %rax
	cqto
	idivq	%r10
	subq	$1, %r10
	movq	%rax, %r9
	movq	%r9, (%rbx)
	cmpq	$1, %r10
	jne	.L33
.L27:
	movq	(%rsp), %rsi
	.p2align 4,,10
	.p2align 3
.L34:
	movq	%r9, %rcx
	imulq	%rsi, %rcx
	subq	$1, %rsi
	movq	%rcx, %rax
	imulq	%rbp
	movq	%rcx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %r9
	sarq	$29, %r9
	subq	%rax, %r9
	imulq	$1000000007, %r9, %rax
	subq	%rax, %rcx
	movq	%rcx, %r9
	cmpq	%r14, %rsi
	jg	.L34
	movq	%rcx, (%rbx)
	movq	%r15, %r10
	cmpq	$1, %r15
	jne	.L35
	jmp	.L42
	.p2align 4,,10
	.p2align 3
.L50:
	movq	%rax, %r9
	subq	$1, %r10
	movq	%r9, (%rbx)
	cmpq	$1, %r10
	je	.L42
.L35:
	movq	%r9, %rax
	cqto
	idivq	%r10
	movq	%rax, %r11
	testq	%rdx, %rdx
	je	.L50
	movl	$1000000007, %eax
	addq	$1, %r11
	cqto
	imulq	%r10, %r11
	idivq	%r10
	subq	%r9, %r11
	movq	%r11, %rax
	movq	%rdx, %r12
	cqto
	idivq	%r12
	movq	%rax, %rcx
	testq	%rdx, %rdx
	jne	.L74
.L38:
	imulq	$1000000007, %rax, %rax
	addq	%r9, %rax
	cqto
	idivq	%r10
	subq	$1, %r10
	movq	%rax, %r9
	movq	%r9, (%rbx)
	cmpq	$1, %r10
	jne	.L35
.L42:
	addq	$1, %r15
	addq	$8, %rbx
	subq	$1, %r13
	subq	$1, %r14
	cmpq	8(%rsp), %r15
	jle	.L24
.L36:
	movq	24(%rsp), %r12
	movl	$1, %ebx
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L44:
	movq	(%r12,%rbx,8), %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpq	%rbx, 48(%rsp)
	jge	.L44
.L45:
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	16072(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L75
	addq	$16088, %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
.L73:
	.cfi_restore_state
	movq	%r10, %rax
	addq	$1, %rcx
	cqto
	imulq	%r12, %rcx
	idivq	%r12
	subq	%r11, %rcx
	movq	%rcx, %rax
	movq	%rdx, %r8
	cqto
	idivq	%r8
	movq	%rax, %rdi
	testq	%rdx, %rdx
	jne	.L76
.L30:
	imulq	%r10, %rax
	addq	%r11, %rax
	cqto
	idivq	%r12
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L74:
	movq	%r10, %rax
	addq	$1, %rcx
	cqto
	imulq	%r12, %rcx
	idivq	%r12
	subq	%r11, %rcx
	movq	%rcx, %rax
	movq	%rdx, %r8
	cqto
	idivq	%r8
	movq	%rax, %rdi
	testq	%rdx, %rdx
	jne	.L77
.L39:
	imulq	%r10, %rax
	addq	%r11, %rax
	cqto
	idivq	%r12
	jmp	.L38
	.p2align 4,,10
	.p2align 3
.L76:
	movq	%r12, %rax
	addq	$1, %rdi
	cqto
	imulq	%r8, %rdi
	idivq	%r8
	subq	%rcx, %rdi
	movq	%rdi, %rax
	movq	%rdx, %rsi
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L78
.L32:
	imulq	%r12, %rax
	addq	%rcx, %rax
	cqto
	idivq	%r8
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L77:
	movq	%r12, %rax
	addq	$1, %rdi
	cqto
	imulq	%r8, %rdi
	idivq	%r8
	subq	%rcx, %rdi
	movq	%rdi, %rax
	movq	%rdx, %rsi
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L79
.L41:
	imulq	%r12, %rax
	addq	%rcx, %rax
	cqto
	idivq	%r8
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L78:
	movq	%r8, %rdx
	movq	%rcx, 40(%rsp)
	movq	%r8, 32(%rsp)
	call	div_mod.part.0
	movq	40(%rsp), %rcx
	movq	32(%rsp), %r8
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L79:
	movq	%r8, %rdx
	movq	%rcx, 40(%rsp)
	movq	%r8, 32(%rsp)
	call	div_mod.part.0
	movq	40(%rsp), %rcx
	movq	32(%rsp), %r8
	jmp	.L41
.L75:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>

long long div_mod(long long x, long long y, long long z)
{
	if (x % y == 0) return x / y;
	else return (div_mod((1 + x / y) * y - x, (z % y), y) * z + x) / y;
}

int main()
{
	long long K, N;
	scanf("%lld %lld", &N, &K);
	
	long long i, j, ans[2001] = {};
	for (i = 1; i <= K && i <= N - K + 1; i++) {
		for (j = K - 1, ans[i] = 1; j >= K - i + 1; j--) ans[i] = ans[i] * j % 1000000007;
		for (j = i - 1; j >= 2; j--) ans[i] = div_mod(ans[i], j, 1000000007);
		for (j = N - K + 1; j >= N - K - i + 2; j--) ans[i] = ans[i] * j % 1000000007;
		for (j = i; j >= 2; j--) ans[i] = div_mod(ans[i], j, 1000000007);
	}
	
	for (i = 1; i <= K; i++) printf("%lld\n", ans[i]);
	fflush(stdout);
	return 0;
}
7 3
 1776 3
 7 5
 195 3
 5 5
 206 3
 96 3
 96 2
 2000 1
 7 4

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

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

```c
#include <stdio.h>

long long div_mod(long long x, long long y, long long z)
{
	if (x % y == 0) return x / y;
	else return (div_mod((1 + x / y) * y - x, (z % y), y) * z + x) / y;
}

int main()
{
	long long K, N;
	scanf("%lld %lld", &N, &K);
	
	long long i, j, ans[2001] = {};
	for (i = 1; i <= K && i <= N - K + 1; i++) {
		for (j = K - 1, ans[i] = 1; j >= K - i + 1; j--) ans[i] = ans[i] * j % 1000000007;
		for (j = i - 1; j >= 2; j--) ans[i] = div_mod(ans[i], j, 1000000007);
		for (j = N - K + 1; j >= N - K - i + 2; j--) ans[i] = ans[i] * j % 1000000007;
		for (j = i; j >= 2; j--) ans[i] = div_mod(ans[i], j, 1000000007);
	}
	
	for (i = 1; i <= K; i++) printf("%lld\n", ans[i]);
	fflush(stdout);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	div_mod
	.type	div_mod, @function
div_mod:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	%rdx, -24(%rbp)
	movq	-8(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L2
	movq	-8(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	jmp	.L3
.L2:
	movq	-24(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	movq	%rdx, %rcx
	movq	-8(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	addq	$1, %rax
	imulq	-16(%rbp), %rax
	subq	-8(%rbp), %rax
	movq	-16(%rbp), %rdx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	div_mod
	imulq	-24(%rbp), %rax
	movq	%rax, %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	cqto
	idivq	-16(%rbp)
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	div_mod, .-div_mod
	.section	.rodata
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3760, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16048(%rbp), %rdx
	leaq	-16040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-16016(%rbp), %rax
	movl	$16008, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$1, -16032(%rbp)
	jmp	.L5
.L15:
	movq	-16048(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -16024(%rbp)
	movq	-16032(%rbp), %rax
	movq	$1, -16016(%rbp,%rax,8)
	jmp	.L6
.L7:
	movq	-16032(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	imulq	-16024(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	-16032(%rbp), %rdx
	movq	%rax, -16016(%rbp,%rdx,8)
	subq	$1, -16024(%rbp)
.L6:
	movq	-16048(%rbp), %rax
	subq	-16032(%rbp), %rax
	cmpq	%rax, -16024(%rbp)
	jg	.L7
	movq	-16032(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -16024(%rbp)
	jmp	.L8
.L9:
	movq	-16032(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	movq	-16024(%rbp), %rcx
	movl	$1000000007, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	div_mod
	movq	-16032(%rbp), %rdx
	movq	%rax, -16016(%rbp,%rdx,8)
	subq	$1, -16024(%rbp)
.L8:
	cmpq	$1, -16024(%rbp)
	jg	.L9
	movq	-16040(%rbp), %rax
	movq	-16048(%rbp), %rdx
	subq	%rdx, %rax
	addq	$1, %rax
	movq	%rax, -16024(%rbp)
	jmp	.L10
.L11:
	movq	-16032(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	imulq	-16024(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	-16032(%rbp), %rdx
	movq	%rax, -16016(%rbp,%rdx,8)
	subq	$1, -16024(%rbp)
.L10:
	movq	-16040(%rbp), %rax
	movq	-16048(%rbp), %rdx
	subq	%rdx, %rax
	subq	-16032(%rbp), %rax
	addq	$1, %rax
	cmpq	%rax, -16024(%rbp)
	jg	.L11
	movq	-16032(%rbp), %rax
	movq	%rax, -16024(%rbp)
	jmp	.L12
.L13:
	movq	-16032(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	movq	-16024(%rbp), %rcx
	movl	$1000000007, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	div_mod
	movq	-16032(%rbp), %rdx
	movq	%rax, -16016(%rbp,%rdx,8)
	subq	$1, -16024(%rbp)
.L12:
	cmpq	$1, -16024(%rbp)
	jg	.L13
	addq	$1, -16032(%rbp)
.L5:
	movq	-16048(%rbp), %rax
	cmpq	%rax, -16032(%rbp)
	jg	.L14
	movq	-16040(%rbp), %rax
	movq	-16048(%rbp), %rdx
	subq	%rdx, %rax
	addq	$1, %rax
	cmpq	%rax, -16032(%rbp)
	jle	.L15
.L14:
	movq	$1, -16032(%rbp)
	jmp	.L16
.L17:
	movq	-16032(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -16032(%rbp)
.L16:
	movq	-16048(%rbp), %rax
	cmpq	%rax, -16032(%rbp)
	jle	.L17
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	div_mod
	.type	div_mod, @function
div_mod:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	%rdx, -24(%rbp)
	movq	-8(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L2
	movq	-8(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	jmp	.L3
.L2:
	movq	-24(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	movq	%rdx, %rcx
	movq	-8(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	addq	$1, %rax
	imulq	-16(%rbp), %rax
	subq	-8(%rbp), %rax
	movq	-16(%rbp), %rdx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	div_mod
	imulq	-24(%rbp), %rax
	movq	%rax, %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	cqto
	idivq	-16(%rbp)
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	div_mod, .-div_mod
	.section	.rodata
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3760, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16048(%rbp), %rdx
	leaq	-16040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-16016(%rbp), %rax
	movl	$16008, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$1, -16032(%rbp)
	jmp	.L5
.L15:
	movq	-16048(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -16024(%rbp)
	movq	-16032(%rbp), %rax
	movq	$1, -16016(%rbp,%rax,8)
	jmp	.L6
.L7:
	movq	-16032(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	imulq	-16024(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	-16032(%rbp), %rdx
	movq	%rax, -16016(%rbp,%rdx,8)
	subq	$1, -16024(%rbp)
.L6:
	movq	-16048(%rbp), %rax
	subq	-16032(%rbp), %rax
	cmpq	%rax, -16024(%rbp)
	jg	.L7
	movq	-16032(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -16024(%rbp)
	jmp	.L8
.L9:
	movq	-16032(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	movq	-16024(%rbp), %rcx
	movl	$1000000007, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	div_mod
	movq	-16032(%rbp), %rdx
	movq	%rax, -16016(%rbp,%rdx,8)
	subq	$1, -16024(%rbp)
.L8:
	cmpq	$1, -16024(%rbp)
	jg	.L9
	movq	-16040(%rbp), %rax
	movq	-16048(%rbp), %rdx
	subq	%rdx, %rax
	addq	$1, %rax
	movq	%rax, -16024(%rbp)
	jmp	.L10
.L11:
	movq	-16032(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	imulq	-16024(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	-16032(%rbp), %rdx
	movq	%rax, -16016(%rbp,%rdx,8)
	subq	$1, -16024(%rbp)
.L10:
	movq	-16040(%rbp), %rax
	movq	-16048(%rbp), %rdx
	subq	%rdx, %rax
	subq	-16032(%rbp), %rax
	addq	$1, %rax
	cmpq	%rax, -16024(%rbp)
	jg	.L11
	movq	-16032(%rbp), %rax
	movq	%rax, -16024(%rbp)
	jmp	.L12
.L13:
	movq	-16032(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	movq	-16024(%rbp), %rcx
	movl	$1000000007, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	div_mod
	movq	-16032(%rbp), %rdx
	movq	%rax, -16016(%rbp,%rdx,8)
	subq	$1, -16024(%rbp)
.L12:
	cmpq	$1, -16024(%rbp)
	jg	.L13
	addq	$1, -16032(%rbp)
.L5:
	movq	-16048(%rbp), %rax
	cmpq	%rax, -16032(%rbp)
	jg	.L14
	movq	-16040(%rbp), %rax
	movq	-16048(%rbp), %rdx
	subq	%rdx, %rax
	addq	$1, %rax
	cmpq	%rax, -16032(%rbp)
	jle	.L15
.L14:
	movq	$1, -16032(%rbp)
	jmp	.L16
.L17:
	movq	-16032(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -16032(%rbp)
.L16:
	movq	-16048(%rbp), %rax
	cmpq	%rax, -16032(%rbp)
	jle	.L17
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
