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<stdint.h>
#include<inttypes.h>

typedef int32_t i32;
typedef int64_t i64;

const i32 mod = 1000000007;

i32 inv (i32 a) {
  i32 t = 1;
  while (a > 1) {
    t = (i64) t * (mod - mod / a) % mod;
    a = mod % a;
  }
  return t;
}

i32 comb (i64 n, i64 k) {
  if (k > n - k) k = n - k;
  i64 nu = 1;
  i64 de = 1;
  for (i32 i = 1; i <= k; ++i) {
    nu = nu * (n + 1 - i) % mod;
    de = de * i % mod;
  }
  return nu * inv (de) % mod;
}

void run (void) {
  i64 n, m, k;
  scanf ("%" SCNi64 "%" SCNi64 "%" SCNi64, &n, &m, &k);
  i64 ans = 0;
  i64 c = comb (n * m - 2, k - 2);
  for (i32 d = 1; d < m; ++d) {
    ans = (ans + c * d % mod * (m - d) % mod * n % mod * n) % mod;
  }
  for (i32 d = 1; d < n; ++d) {
    ans = (ans + c * d % mod * (n - d) % mod * m % mod * m) % mod;
  }
  printf ("%" PRIi64 "\n", ans);
}

void gen (void) {
  
}

int main (void) {
  run();
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	mod
	.section	.rodata
	.align 4
	.type	mod, @object
	.size	mod, 4
mod:
	.long	1000000007
	.text
	.globl	inv
	.type	inv, @function
inv:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$1, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	$1000000007, %esi
	movl	$1000000007, %eax
	cltd
	idivl	-20(%rbp)
	movl	%eax, %edx
	movl	%esi, %eax
	subl	%edx, %eax
	cltq
	imulq	%rcx, %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	movl	%eax, -4(%rbp)
	movl	$1000000007, %eax
	cltd
	idivl	-20(%rbp)
	movl	%edx, -20(%rbp)
.L2:
	cmpl	$1, -20(%rbp)
	jg	.L3
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	inv, .-inv
	.globl	comb
	.type	comb, @function
comb:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	-40(%rbp), %rax
	subq	-48(%rbp), %rax
	cmpq	%rax, -48(%rbp)
	jle	.L6
	movq	-40(%rbp), %rax
	subq	-48(%rbp), %rax
	movq	%rax, -48(%rbp)
.L6:
	movq	$1, -16(%rbp)
	movq	$1, -8(%rbp)
	movl	$1, -20(%rbp)
	jmp	.L7
.L8:
	movq	-40(%rbp), %rax
	leaq	1(%rax), %rdx
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	imulq	-16(%rbp), %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -16(%rbp)
	movl	-20(%rbp), %eax
	cltq
	imulq	-8(%rbp), %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -8(%rbp)
	addl	$1, -20(%rbp)
.L7:
	movl	-20(%rbp), %eax
	cltq
	cmpq	%rax, -48(%rbp)
	jge	.L8
	movq	-8(%rbp), %rax
	movl	%eax, %edi
	call	inv
	cltq
	imulq	-16(%rbp), %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	comb, .-comb
	.section	.rodata
.LC0:
	.string	"%li%li%li"
.LC1:
	.string	"%li\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -24(%rbp)
	movq	-32(%rbp), %rax
	leaq	-2(%rax), %rdx
	movq	-48(%rbp), %rcx
	movq	-40(%rbp), %rax
	imulq	%rcx, %rax
	subq	$2, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	comb
	cltq
	movq	%rax, -16(%rbp)
	movl	$1, -56(%rbp)
	jmp	.L11
.L12:
	movl	-56(%rbp), %eax
	cltq
	imulq	-16(%rbp), %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rcx
	movq	-40(%rbp), %rax
	movl	-56(%rbp), %edx
	movslq	%edx, %rdx
	subq	%rdx, %rax
	imulq	%rcx, %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	-48(%rbp), %rax
	imulq	%rdx, %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	-48(%rbp), %rax
	imulq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -24(%rbp)
	addl	$1, -56(%rbp)
.L11:
	movl	-56(%rbp), %eax
	movslq	%eax, %rdx
	movq	-40(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L12
	movl	$1, -52(%rbp)
	jmp	.L13
.L14:
	movl	-52(%rbp), %eax
	cltq
	imulq	-16(%rbp), %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rcx
	movq	-48(%rbp), %rax
	movl	-52(%rbp), %edx
	movslq	%edx, %rdx
	subq	%rdx, %rax
	imulq	%rcx, %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	-40(%rbp), %rax
	imulq	%rdx, %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	-40(%rbp), %rax
	imulq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -24(%rbp)
	addl	$1, -52(%rbp)
.L13:
	movl	-52(%rbp), %eax
	movslq	%eax, %rdx
	movq	-48(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L14
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	run, .-run
	.globl	gen
	.type	gen, @function
gen:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	gen, .-gen
	.globl	main
	.type	main, @function
main:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	call	run
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.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	inv
	.type	inv, @function
inv:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%edi, %esi
	movl	$1, %r8d
	cmpl	$1, %edi
	jle	.L1
	movl	$-1000000007, %r9d
	movl	$1000000007, %edi
	movabsq	$-8543223828751151131, %r10
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%r9d, %eax
	movslq	%r8d, %r8
	cltd
	idivl	%esi
	leal	1000000007(%rax), %ecx
	movslq	%ecx, %rcx
	imulq	%r8, %rcx
	movq	%rcx, %rax
	movl	%ecx, %r8d
	mulq	%r10
	movl	%edi, %eax
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rdx
	subl	%edx, %r8d
	cltd
	idivl	%esi
	movl	%edx, %esi
	cmpl	$1, %edx
	jg	.L3
.L1:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	inv, .-inv
	.p2align 4
	.globl	comb
	.type	comb, @function
comb:
.LFB24:
	.cfi_startproc
	endbr64
	movq	%rdi, %r10
	subq	%rsi, %r10
	cmpq	%rsi, %r10
	cmovg	%rsi, %r10
	testq	%r10, %r10
	jle	.L11
	leaq	1(%rdi), %r11
	addq	$1, %r10
	movl	$1, %ecx
	movl	$1, %r8d
	movabsq	$-8543223828751151131, %rdi
	movl	$1, %r9d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r11, %rsi
	imulq	%r9, %rcx
	subq	%r9, %rsi
	addq	$1, %r9
	imulq	%r8, %rsi
	movq	%rsi, %rax
	imulq	%rdi
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %r8
	sarq	$29, %r8
	subq	%rax, %r8
	imulq	$1000000007, %r8, %rax
	subq	%rax, %rsi
	movq	%rcx, %rax
	imulq	%rdi
	movq	%rsi, %r8
	movq	%rcx, %rsi
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%rsi, %rcx
	subq	%rax, %rcx
	cmpq	%r10, %r9
	jne	.L9
	movl	%ecx, %esi
	cmpq	$1, %rcx
	jle	.L15
	movl	$1, %edi
	movl	$-1000000007, %r11d
	movabsq	$-8543223828751151131, %r9
	movl	$1000000007, %r10d
	.p2align 4,,10
	.p2align 3
.L10:
	movl	%r11d, %eax
	movslq	%edi, %rdi
	cltd
	idivl	%esi
	leal	1000000007(%rax), %ecx
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	movq	%rcx, %rax
	movl	%ecx, %edi
	mulq	%r9
	movl	%r10d, %eax
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rdx
	subl	%edx, %edi
	cltd
	idivl	%esi
	movl	%edx, %esi
	cmpl	$1, %edx
	jg	.L10
	movslq	%edi, %rdi
	imulq	%r8, %rdi
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	addq	%rdi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movl	%edi, %eax
	imulq	$1000000007, %rdx, %rdx
	subl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	movl	$1, %eax
	ret
.L15:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	comb, .-comb
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%li%li%li"
.LC1:
	.string	"%li\n"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$40, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	16(%rsp), %rcx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rdi
	movq	8(%rsp), %r10
	movq	16(%rsp), %rdx
	movq	%rdi, %r8
	imulq	%r10, %r8
	leaq	-2(%rdx), %r9
	movq	%r8, %rax
	subq	%rdx, %rax
	cmpq	%rax, %r9
	cmovg	%rax, %r9
	testq	%r9, %r9
	jle	.L25
	leaq	-1(%r8), %r11
	addq	$1, %r9
	movl	$1, %ebx
	movl	$1, %esi
	movabsq	$-8543223828751151131, %r8
	movl	$1, %ecx
	.p2align 4,,10
	.p2align 3
.L18:
	movq	%r11, %rbp
	imulq	%rcx, %rbx
	subq	%rcx, %rbp
	addq	$1, %rcx
	imulq	%rsi, %rbp
	movq	%rbp, %rax
	imulq	%r8
	movq	%rbp, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rbp), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rbp, %rsi
	movq	%rbx, %rbp
	subq	%rax, %rsi
	movq	%rbx, %rax
	imulq	%r8
	movq	%rbx, %rax
	sarq	$63, %rax
	addq	%rbx, %rdx
	sarq	$29, %rdx
	movq	%rdx, %rbx
	subq	%rax, %rbx
	imulq	$1000000007, %rbx, %rax
	movq	%rbp, %rbx
	subq	%rax, %rbx
	cmpq	%r9, %rcx
	jne	.L18
	movl	%ebx, %r8d
	cmpq	$1, %rbx
	jle	.L17
	movl	$1, %ebp
	movl	$-1000000007, %r11d
	movabsq	$-8543223828751151131, %rbx
	movl	$1000000007, %r9d
	.p2align 4,,10
	.p2align 3
.L19:
	movl	%r11d, %eax
	movslq	%ebp, %rbp
	cltd
	idivl	%r8d
	leal	1000000007(%rax), %ecx
	movslq	%ecx, %rcx
	imulq	%rbp, %rcx
	movq	%rcx, %rax
	movl	%ecx, %ebp
	mulq	%rbx
	movl	%r9d, %eax
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rdx
	subl	%edx, %ebp
	cltd
	idivl	%r8d
	movl	%edx, %r8d
	cmpl	$1, %edx
	jg	.L19
	movslq	%ebp, %rbp
	imulq	%rsi, %rbp
	movq	%rbp, %rax
	imulq	%rbx
	movq	%rbp, %rax
	sarq	$63, %rax
	addq	%rbp, %rdx
	sarq	$29, %rdx
	movq	%rdx, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rbp, %rsi
	subq	%rax, %rsi
.L17:
	cmpq	$1, %r10
	jle	.L26
.L33:
	leaq	-1(%r10), %rbx
	movq	%rsi, %r9
	xorl	%r8d, %r8d
	movabsq	$-8543223828751151131, %r11
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%r9, %rax
	movq	%r9, %rcx
	imulq	%r11
	movq	%r9, %rax
	sarq	$63, %rax
	addq	%r9, %rdx
	addq	%rsi, %r9
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	imulq	%rbx, %rcx
	movq	%rcx, %rax
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	imulq	%rdi, %rcx
	movq	%rcx, %rax
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	imulq	%rdi, %rcx
	addq	%r8, %rcx
	movq	%rcx, %rax
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %r8
	sarq	$29, %r8
	subq	%rax, %r8
	imulq	$1000000007, %r8, %rax
	subq	%rax, %rcx
	movq	%rcx, %r8
	subq	$1, %rbx
	jne	.L21
.L20:
	cmpq	$1, %rdi
	jle	.L22
	subq	$1, %rdi
	movq	%rsi, %r9
	movabsq	$-8543223828751151131, %r11
	.p2align 4,,10
	.p2align 3
.L23:
	movq	%r9, %rax
	movq	%r9, %rcx
	imulq	%r11
	movq	%r9, %rax
	sarq	$63, %rax
	addq	%r9, %rdx
	addq	%rsi, %r9
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	imulq	%rdi, %rcx
	movq	%rcx, %rax
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	imulq	%r10, %rcx
	movq	%rcx, %rax
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	imulq	%r10, %rcx
	addq	%r8, %rcx
	movq	%rcx, %rax
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %r8
	sarq	$29, %r8
	subq	%rax, %r8
	imulq	$1000000007, %r8, %rax
	subq	%rax, %rcx
	movq	%rcx, %r8
	subq	$1, %rdi
	jne	.L23
.L22:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	movl	$1, %esi
	cmpq	$1, %r10
	jg	.L33
	.p2align 4,,10
	.p2align 3
.L26:
	xorl	%r8d, %r8d
	jmp	.L20
.L32:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	run, .-run
	.p2align 4
	.globl	gen
	.type	gen, @function
gen:
.LFB26:
	.cfi_startproc
	endbr64
	ret
	.cfi_endproc
.LFE26:
	.size	gen, .-gen
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB27:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	run
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE27:
	.size	main, .-main
	.globl	mod
	.section	.rodata
	.align 4
	.type	mod, @object
	.size	mod, 4
mod:
	.long	1000000007
	.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	inv
	.type	inv, @function
inv:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%edi, %esi
	movl	$1, %r8d
	cmpl	$1, %edi
	jle	.L1
	movl	$-1000000007, %r9d
	movl	$1000000007, %edi
	movabsq	$-8543223828751151131, %r10
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%r9d, %eax
	movslq	%r8d, %r8
	cltd
	idivl	%esi
	leal	1000000007(%rax), %ecx
	movslq	%ecx, %rcx
	imulq	%r8, %rcx
	movq	%rcx, %rax
	movl	%ecx, %r8d
	mulq	%r10
	movl	%edi, %eax
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rdx
	subl	%edx, %r8d
	cltd
	idivl	%esi
	movl	%edx, %esi
	cmpl	$1, %edx
	jg	.L3
.L1:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	inv, .-inv
	.p2align 4
	.globl	comb
	.type	comb, @function
comb:
.LFB24:
	.cfi_startproc
	endbr64
	movq	%rdi, %r10
	subq	%rsi, %r10
	cmpq	%rsi, %r10
	cmovg	%rsi, %r10
	testq	%r10, %r10
	jle	.L11
	leaq	1(%rdi), %r11
	addq	$1, %r10
	movl	$1, %ecx
	movl	$1, %r8d
	movabsq	$-8543223828751151131, %rdi
	movl	$1, %r9d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r11, %rsi
	imulq	%r9, %rcx
	subq	%r9, %rsi
	addq	$1, %r9
	imulq	%r8, %rsi
	movq	%rsi, %rax
	imulq	%rdi
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %r8
	sarq	$29, %r8
	subq	%rax, %r8
	imulq	$1000000007, %r8, %rax
	subq	%rax, %rsi
	movq	%rcx, %rax
	imulq	%rdi
	movq	%rsi, %r8
	movq	%rcx, %rsi
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%rsi, %rcx
	subq	%rax, %rcx
	cmpq	%r10, %r9
	jne	.L9
	movl	%ecx, %esi
	cmpq	$1, %rcx
	jle	.L15
	movl	$1, %edi
	movl	$-1000000007, %r11d
	movabsq	$-8543223828751151131, %r9
	movl	$1000000007, %r10d
	.p2align 4,,10
	.p2align 3
.L10:
	movl	%r11d, %eax
	movslq	%edi, %rdi
	cltd
	idivl	%esi
	leal	1000000007(%rax), %ecx
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	movq	%rcx, %rax
	movl	%ecx, %edi
	mulq	%r9
	movl	%r10d, %eax
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rdx
	subl	%edx, %edi
	cltd
	idivl	%esi
	movl	%edx, %esi
	cmpl	$1, %edx
	jg	.L10
	movslq	%edi, %rdi
	imulq	%r8, %rdi
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	addq	%rdi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movl	%edi, %eax
	imulq	$1000000007, %rdx, %rdx
	subl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	movl	$1, %eax
	ret
.L15:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	comb, .-comb
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%li%li%li"
.LC1:
	.string	"%li\n"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$40, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	16(%rsp), %rcx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rdi
	movq	8(%rsp), %r10
	movq	16(%rsp), %rdx
	movq	%rdi, %r8
	imulq	%r10, %r8
	leaq	-2(%rdx), %r9
	movq	%r8, %rax
	subq	%rdx, %rax
	cmpq	%rax, %r9
	cmovg	%rax, %r9
	testq	%r9, %r9
	jle	.L25
	leaq	-1(%r8), %r11
	addq	$1, %r9
	movl	$1, %ebx
	movl	$1, %esi
	movabsq	$-8543223828751151131, %r8
	movl	$1, %ecx
	.p2align 4,,10
	.p2align 3
.L18:
	movq	%r11, %rbp
	imulq	%rcx, %rbx
	subq	%rcx, %rbp
	addq	$1, %rcx
	imulq	%rsi, %rbp
	movq	%rbp, %rax
	imulq	%r8
	movq	%rbp, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rbp), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rbp, %rsi
	movq	%rbx, %rbp
	subq	%rax, %rsi
	movq	%rbx, %rax
	imulq	%r8
	movq	%rbx, %rax
	sarq	$63, %rax
	addq	%rbx, %rdx
	sarq	$29, %rdx
	movq	%rdx, %rbx
	subq	%rax, %rbx
	imulq	$1000000007, %rbx, %rax
	movq	%rbp, %rbx
	subq	%rax, %rbx
	cmpq	%r9, %rcx
	jne	.L18
	movl	%ebx, %r8d
	cmpq	$1, %rbx
	jle	.L17
	movl	$1, %ebp
	movl	$-1000000007, %r11d
	movabsq	$-8543223828751151131, %rbx
	movl	$1000000007, %r9d
	.p2align 4,,10
	.p2align 3
.L19:
	movl	%r11d, %eax
	movslq	%ebp, %rbp
	cltd
	idivl	%r8d
	leal	1000000007(%rax), %ecx
	movslq	%ecx, %rcx
	imulq	%rbp, %rcx
	movq	%rcx, %rax
	movl	%ecx, %ebp
	mulq	%rbx
	movl	%r9d, %eax
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rdx
	subl	%edx, %ebp
	cltd
	idivl	%r8d
	movl	%edx, %r8d
	cmpl	$1, %edx
	jg	.L19
	movslq	%ebp, %rbp
	imulq	%rsi, %rbp
	movq	%rbp, %rax
	imulq	%rbx
	movq	%rbp, %rax
	sarq	$63, %rax
	addq	%rbp, %rdx
	sarq	$29, %rdx
	movq	%rdx, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rbp, %rsi
	subq	%rax, %rsi
.L17:
	cmpq	$1, %r10
	jle	.L26
.L33:
	leaq	-1(%r10), %rbx
	movq	%rsi, %r9
	xorl	%r8d, %r8d
	movabsq	$-8543223828751151131, %r11
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%r9, %rax
	movq	%r9, %rcx
	imulq	%r11
	movq	%r9, %rax
	sarq	$63, %rax
	addq	%r9, %rdx
	addq	%rsi, %r9
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	imulq	%rbx, %rcx
	movq	%rcx, %rax
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	imulq	%rdi, %rcx
	movq	%rcx, %rax
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	imulq	%rdi, %rcx
	addq	%r8, %rcx
	movq	%rcx, %rax
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %r8
	sarq	$29, %r8
	subq	%rax, %r8
	imulq	$1000000007, %r8, %rax
	subq	%rax, %rcx
	movq	%rcx, %r8
	subq	$1, %rbx
	jne	.L21
.L20:
	cmpq	$1, %rdi
	jle	.L22
	subq	$1, %rdi
	movq	%rsi, %r9
	movabsq	$-8543223828751151131, %r11
	.p2align 4,,10
	.p2align 3
.L23:
	movq	%r9, %rax
	movq	%r9, %rcx
	imulq	%r11
	movq	%r9, %rax
	sarq	$63, %rax
	addq	%r9, %rdx
	addq	%rsi, %r9
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	imulq	%rdi, %rcx
	movq	%rcx, %rax
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	imulq	%r10, %rcx
	movq	%rcx, %rax
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	imulq	%r10, %rcx
	addq	%r8, %rcx
	movq	%rcx, %rax
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %r8
	sarq	$29, %r8
	subq	%rax, %r8
	imulq	$1000000007, %r8, %rax
	subq	%rax, %rcx
	movq	%rcx, %r8
	subq	$1, %rdi
	jne	.L23
.L22:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	movl	$1, %esi
	cmpq	$1, %r10
	jg	.L33
	.p2align 4,,10
	.p2align 3
.L26:
	xorl	%r8d, %r8d
	jmp	.L20
.L32:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	run, .-run
	.p2align 4
	.globl	gen
	.type	gen, @function
gen:
.LFB26:
	.cfi_startproc
	endbr64
	ret
	.cfi_endproc
.LFE26:
	.size	gen, .-gen
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB27:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	run
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE27:
	.size	main, .-main
	.globl	mod
	.section	.rodata
	.align 4
	.type	mod, @object
	.size	mod, 4
mod:
	.long	1000000007
	.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<stdint.h>
#include<inttypes.h>

typedef int32_t i32;
typedef int64_t i64;

const i32 mod = 1000000007;

i32 inv (i32 a) {
  i32 t = 1;
  while (a > 1) {
    t = (i64) t * (mod - mod / a) % mod;
    a = mod % a;
  }
  return t;
}

i32 comb (i64 n, i64 k) {
  if (k > n - k) k = n - k;
  i64 nu = 1;
  i64 de = 1;
  for (i32 i = 1; i <= k; ++i) {
    nu = nu * (n + 1 - i) % mod;
    de = de * i % mod;
  }
  return nu * inv (de) % mod;
}

void run (void) {
  i64 n, m, k;
  scanf ("%" SCNi64 "%" SCNi64 "%" SCNi64, &n, &m, &k);
  i64 ans = 0;
  i64 c = comb (n * m - 2, k - 2);
  for (i32 d = 1; d < m; ++d) {
    ans = (ans + c * d % mod * (m - d) % mod * n % mod * n) % mod;
  }
  for (i32 d = 1; d < n; ++d) {
    ans = (ans + c * d % mod * (n - d) % mod * m % mod * m) % mod;
  }
  printf ("%" PRIi64 "\n", ans);
}

void gen (void) {
  
}

int main (void) {
  run();
  return 0;
}

100 100 4270
 100 100 619
 100 101 619
 110 101 619
 110 101 767
 110 111 767
 110 111 32
 110 111 3
 100 111 3
 110 101 3

600569999
 22903271
 540551573
 276779273
 629598785
 235468303
 100550006
 864350703
 25289126
 105547536

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<stdint.h>
#include<inttypes.h>

typedef int32_t i32;
typedef int64_t i64;

const i32 mod = 1000000007;

i32 inv (i32 a) {
  i32 t = 1;
  while (a > 1) {
    t = (i64) t * (mod - mod / a) % mod;
    a = mod % a;
  }
  return t;
}

i32 comb (i64 n, i64 k) {
  if (k > n - k) k = n - k;
  i64 nu = 1;
  i64 de = 1;
  for (i32 i = 1; i <= k; ++i) {
    nu = nu * (n + 1 - i) % mod;
    de = de * i % mod;
  }
  return nu * inv (de) % mod;
}

void run (void) {
  i64 n, m, k;
  scanf ("%" SCNi64 "%" SCNi64 "%" SCNi64, &n, &m, &k);
  i64 ans = 0;
  i64 c = comb (n * m - 2, k - 2);
  for (i32 d = 1; d < m; ++d) {
    ans = (ans + c * d % mod * (m - d) % mod * n % mod * n) % mod;
  }
  for (i32 d = 1; d < n; ++d) {
    ans = (ans + c * d % mod * (n - d) % mod * m % mod * m) % mod;
  }
  printf ("%" PRIi64 "\n", ans);
}

void gen (void) {
  
}

int main (void) {
  run();
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	mod
	.section	.rodata
	.align 4
	.type	mod, @object
	.size	mod, 4
mod:
	.long	1000000007
	.text
	.globl	inv
	.type	inv, @function
inv:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$1, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	$1000000007, %esi
	movl	$1000000007, %eax
	cltd
	idivl	-20(%rbp)
	movl	%eax, %edx
	movl	%esi, %eax
	subl	%edx, %eax
	cltq
	imulq	%rcx, %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	movl	%eax, -4(%rbp)
	movl	$1000000007, %eax
	cltd
	idivl	-20(%rbp)
	movl	%edx, -20(%rbp)
.L2:
	cmpl	$1, -20(%rbp)
	jg	.L3
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	inv, .-inv
	.globl	comb
	.type	comb, @function
comb:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	-40(%rbp), %rax
	subq	-48(%rbp), %rax
	cmpq	%rax, -48(%rbp)
	jle	.L6
	movq	-40(%rbp), %rax
	subq	-48(%rbp), %rax
	movq	%rax, -48(%rbp)
.L6:
	movq	$1, -16(%rbp)
	movq	$1, -8(%rbp)
	movl	$1, -20(%rbp)
	jmp	.L7
.L8:
	movq	-40(%rbp), %rax
	leaq	1(%rax), %rdx
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	imulq	-16(%rbp), %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -16(%rbp)
	movl	-20(%rbp), %eax
	cltq
	imulq	-8(%rbp), %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -8(%rbp)
	addl	$1, -20(%rbp)
.L7:
	movl	-20(%rbp), %eax
	cltq
	cmpq	%rax, -48(%rbp)
	jge	.L8
	movq	-8(%rbp), %rax
	movl	%eax, %edi
	call	inv
	cltq
	imulq	-16(%rbp), %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	comb, .-comb
	.section	.rodata
.LC0:
	.string	"%li%li%li"
.LC1:
	.string	"%li\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -24(%rbp)
	movq	-32(%rbp), %rax
	leaq	-2(%rax), %rdx
	movq	-48(%rbp), %rcx
	movq	-40(%rbp), %rax
	imulq	%rcx, %rax
	subq	$2, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	comb
	cltq
	movq	%rax, -16(%rbp)
	movl	$1, -56(%rbp)
	jmp	.L11
.L12:
	movl	-56(%rbp), %eax
	cltq
	imulq	-16(%rbp), %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rcx
	movq	-40(%rbp), %rax
	movl	-56(%rbp), %edx
	movslq	%edx, %rdx
	subq	%rdx, %rax
	imulq	%rcx, %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	-48(%rbp), %rax
	imulq	%rdx, %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	-48(%rbp), %rax
	imulq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -24(%rbp)
	addl	$1, -56(%rbp)
.L11:
	movl	-56(%rbp), %eax
	movslq	%eax, %rdx
	movq	-40(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L12
	movl	$1, -52(%rbp)
	jmp	.L13
.L14:
	movl	-52(%rbp), %eax
	cltq
	imulq	-16(%rbp), %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rcx
	movq	-48(%rbp), %rax
	movl	-52(%rbp), %edx
	movslq	%edx, %rdx
	subq	%rdx, %rax
	imulq	%rcx, %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	-40(%rbp), %rax
	imulq	%rdx, %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	-40(%rbp), %rax
	imulq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -24(%rbp)
	addl	$1, -52(%rbp)
.L13:
	movl	-52(%rbp), %eax
	movslq	%eax, %rdx
	movq	-48(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L14
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	run, .-run
	.globl	gen
	.type	gen, @function
gen:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	gen, .-gen
	.globl	main
	.type	main, @function
main:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	call	run
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.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	mod
	.section	.rodata
	.align 4
	.type	mod, @object
	.size	mod, 4
mod:
	.long	1000000007
	.text
	.globl	inv
	.type	inv, @function
inv:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$1, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	$1000000007, %esi
	movl	$1000000007, %eax
	cltd
	idivl	-20(%rbp)
	movl	%eax, %edx
	movl	%esi, %eax
	subl	%edx, %eax
	cltq
	imulq	%rcx, %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	movl	%eax, -4(%rbp)
	movl	$1000000007, %eax
	cltd
	idivl	-20(%rbp)
	movl	%edx, -20(%rbp)
.L2:
	cmpl	$1, -20(%rbp)
	jg	.L3
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	inv, .-inv
	.globl	comb
	.type	comb, @function
comb:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	-40(%rbp), %rax
	subq	-48(%rbp), %rax
	cmpq	%rax, -48(%rbp)
	jle	.L6
	movq	-40(%rbp), %rax
	subq	-48(%rbp), %rax
	movq	%rax, -48(%rbp)
.L6:
	movq	$1, -16(%rbp)
	movq	$1, -8(%rbp)
	movl	$1, -20(%rbp)
	jmp	.L7
.L8:
	movq	-40(%rbp), %rax
	leaq	1(%rax), %rdx
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	imulq	-16(%rbp), %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -16(%rbp)
	movl	-20(%rbp), %eax
	cltq
	imulq	-8(%rbp), %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -8(%rbp)
	addl	$1, -20(%rbp)
.L7:
	movl	-20(%rbp), %eax
	cltq
	cmpq	%rax, -48(%rbp)
	jge	.L8
	movq	-8(%rbp), %rax
	movl	%eax, %edi
	call	inv
	cltq
	imulq	-16(%rbp), %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	comb, .-comb
	.section	.rodata
.LC0:
	.string	"%li%li%li"
.LC1:
	.string	"%li\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -24(%rbp)
	movq	-32(%rbp), %rax
	leaq	-2(%rax), %rdx
	movq	-48(%rbp), %rcx
	movq	-40(%rbp), %rax
	imulq	%rcx, %rax
	subq	$2, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	comb
	cltq
	movq	%rax, -16(%rbp)
	movl	$1, -56(%rbp)
	jmp	.L11
.L12:
	movl	-56(%rbp), %eax
	cltq
	imulq	-16(%rbp), %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rcx
	movq	-40(%rbp), %rax
	movl	-56(%rbp), %edx
	movslq	%edx, %rdx
	subq	%rdx, %rax
	imulq	%rcx, %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	-48(%rbp), %rax
	imulq	%rdx, %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	-48(%rbp), %rax
	imulq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -24(%rbp)
	addl	$1, -56(%rbp)
.L11:
	movl	-56(%rbp), %eax
	movslq	%eax, %rdx
	movq	-40(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L12
	movl	$1, -52(%rbp)
	jmp	.L13
.L14:
	movl	-52(%rbp), %eax
	cltq
	imulq	-16(%rbp), %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rcx
	movq	-48(%rbp), %rax
	movl	-52(%rbp), %edx
	movslq	%edx, %rdx
	subq	%rdx, %rax
	imulq	%rcx, %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	-40(%rbp), %rax
	imulq	%rdx, %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	-40(%rbp), %rax
	imulq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	$1000000007, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -24(%rbp)
	addl	$1, -52(%rbp)
.L13:
	movl	-52(%rbp), %eax
	movslq	%eax, %rdx
	movq	-48(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L14
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	run, .-run
	.globl	gen
	.type	gen, @function
gen:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	gen, .-gen
	.globl	main
	.type	main, @function
main:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	call	run
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.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:
