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>

#define MOD 1000000007

int main() {
  int h, w, k;
  scanf("%d%d%d", &h, &w, &k);
  int dp[h+1][w];
  for (int i=0; i<h+1; i++) {
    for (int j=0; j<w; j++) {
      dp[i][j] = 0;
    }
  }
  dp[0][0] = 1;
  for (int i=1; i<h+1; i++) {
    for (int k=0; k<(1<<(w-1)); k++) {
      int check = 1;
      for (int l=0; l<w-2; l++) {
        if (((k>>l)&3) == 3) {
          check = 0;
          break;
        }
      }
      if (check == 0) continue;
      for (int j=0; j<w; j++) {
        if (j<w-1 && ((k>>j)&1) == 1) {
          dp[i][j+1] += dp[i-1][j];
          dp[i][j+1] %= MOD;
        }else if (j>0 && ((k>>(j-1))&1) == 1) {
          dp[i][j-1] += dp[i-1][j];
          dp[i][j-1] %= MOD;
        }else {
          dp[i][j] += dp[i-1][j];
          dp[i][j] %= MOD;
        }
      }
    }
  }
  printf("%d\n", dp[h][k-1]);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$136, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-112(%rbp), %rcx
	leaq	-116(%rbp), %rdx
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-116(%rbp), %ecx
	movl	-120(%rbp), %eax
	leal	1(%rax), %edi
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -80(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movslq	%ecx, %rax
	leaq	0(,%rax,4), %rsi
	movslq	%edi, %rax
	subq	$1, %rax
	movq	%rax, -72(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%edi, %rax
	movq	%rax, -144(%rbp)
	movq	$0, -136(%rbp)
	movq	-160(%rbp), %r10
	movq	-152(%rbp), %r11
	movq	%r11, %rdx
	movq	-144(%rbp), %r8
	movq	-136(%rbp), %r9
	imulq	%r8, %rdx
	movq	%r8, -144(%rbp)
	movq	%r9, -136(%rbp)
	movq	%r9, %rax
	imulq	%r10, %rax
	leaq	(%rdx,%rax), %r8
	movq	%r10, %rax
	mulq	-144(%rbp)
	addq	%rdx, %r8
	movq	%r8, %rdx
	movslq	%ecx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movslq	%edi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%r15, %rdx
	imulq	%r12, %rdx
	movq	%r13, %rax
	imulq	%r14, %rax
	leaq	(%rdx,%rax), %r8
	movq	%r14, %rax
	mulq	%r12
	addq	%rdx, %r8
	movq	%r8, %rdx
	movslq	%ecx, %rdx
	movslq	%edi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L5
.L8:
	movl	$0, -104(%rbp)
	jmp	.L6
.L7:
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdi
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	$0, (%rax,%rdx,4)
	addl	$1, -104(%rbp)
.L6:
	movl	-116(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L7
	addl	$1, -108(%rbp)
.L5:
	movl	-120(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jle	.L8
	movq	-64(%rbp), %rax
	movl	$1, (%rax)
	movl	$1, -100(%rbp)
	jmp	.L9
.L23:
	movl	$0, -96(%rbp)
	jmp	.L10
.L22:
	movl	$1, -92(%rbp)
	movl	$0, -88(%rbp)
	jmp	.L11
.L14:
	movl	-88(%rbp), %eax
	movl	-96(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$3, %eax
	cmpl	$3, %eax
	jne	.L12
	movl	$0, -92(%rbp)
	jmp	.L13
.L12:
	addl	$1, -88(%rbp)
.L11:
	movl	-116(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -88(%rbp)
	jl	.L14
.L13:
	cmpl	$0, -92(%rbp)
	je	.L26
	movl	$0, -84(%rbp)
	jmp	.L17
.L21:
	movl	-116(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -84(%rbp)
	jge	.L18
	movl	-84(%rbp), %eax
	movl	-96(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L18
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %r8d
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %r9
	movslq	%edi, %rdx
	imulq	%rcx, %rdx
	addq	%r9, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	%rsi, %rdi
	shrq	$2, %rdi
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	addl	%r8d, %ecx
	movq	-64(%rbp), %rax
	movslq	%edx, %r8
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rdi, %rdx
	addq	%r8, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	%rsi, %rdi
	shrq	$2, %rdi
	movl	-84(%rbp), %eax
	leal	1(%rax), %ecx
	movslq	%edx, %rax
	imulq	$1152921497, %rax, %rax
	shrq	$32, %rax
	sarl	$28, %eax
	movl	%edx, %r8d
	sarl	$31, %r8d
	subl	%r8d, %eax
	imull	$1000000007, %eax, %r8d
	movl	%edx, %eax
	subl	%r8d, %eax
	movq	-64(%rbp), %rdx
	movslq	%ecx, %r8
	movl	-100(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	addq	%r8, %rcx
	movl	%eax, (%rdx,%rcx,4)
	jmp	.L19
.L18:
	cmpl	$0, -84(%rbp)
	jle	.L20
	movl	-84(%rbp), %eax
	subl	$1, %eax
	movl	-96(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L20
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %r8d
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %r9
	movslq	%edi, %rdx
	imulq	%rcx, %rdx
	addq	%r9, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	%rsi, %rdi
	shrq	$2, %rdi
	movl	-84(%rbp), %eax
	leal	-1(%rax), %edx
	addl	%r8d, %ecx
	movq	-64(%rbp), %rax
	movslq	%edx, %r8
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rdi, %rdx
	addq	%r8, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	%rsi, %rdi
	shrq	$2, %rdi
	movl	-84(%rbp), %eax
	leal	-1(%rax), %ecx
	movslq	%edx, %rax
	imulq	$1152921497, %rax, %rax
	shrq	$32, %rax
	sarl	$28, %eax
	movl	%edx, %r8d
	sarl	$31, %r8d
	subl	%r8d, %eax
	imull	$1000000007, %eax, %r8d
	movl	%edx, %eax
	subl	%r8d, %eax
	movq	-64(%rbp), %rdx
	movslq	%ecx, %r8
	movl	-100(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	addq	%r8, %rcx
	movl	%eax, (%rdx,%rcx,4)
	jmp	.L19
.L20:
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %r8d
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %r9
	movslq	%edi, %rdx
	imulq	%rcx, %rdx
	addq	%r9, %rdx
	movl	(%rax,%rdx,4), %eax
	movq	%rsi, %rdi
	shrq	$2, %rdi
	leal	(%r8,%rax), %ecx
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %r8
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rdi, %rdx
	addq	%r8, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	%rsi, %rdi
	shrq	$2, %rdi
	movslq	%edx, %rax
	imulq	$1152921497, %rax, %rax
	shrq	$32, %rax
	sarl	$28, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$1000000007, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movq	-64(%rbp), %rdx
	movl	-84(%rbp), %ecx
	movslq	%ecx, %r8
	movl	-100(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	addq	%r8, %rcx
	movl	%eax, (%rdx,%rcx,4)
.L19:
	addl	$1, -84(%rbp)
.L17:
	movl	-116(%rbp), %eax
	cmpl	%eax, -84(%rbp)
	jl	.L21
	jmp	.L16
.L26:
	nop
.L16:
	addl	$1, -96(%rbp)
.L10:
	movl	-116(%rbp), %eax
	subl	$1, %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cmpl	%eax, -96(%rbp)
	jl	.L22
	addl	$1, -100(%rbp)
.L9:
	movl	-120(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jle	.L23
	shrq	$2, %rsi
	movq	%rsi, %rcx
	movl	-120(%rbp), %edx
	movl	-112(%rbp), %eax
	leal	-1(%rax), %esi
	movq	-64(%rbp), %rax
	movslq	%esi, %rsi
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-60(%rbp), %rcx
	leaq	-64(%rbp), %rdx
	pushq	%r13
	leaq	-68(%rbp), %rsi
	pushq	%r12
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-68(%rbp), %eax
	movslq	-64(%rbp), %r13
	movq	%rsp, %rcx
	movl	%eax, -132(%rbp)
	addl	$1, %eax
	leaq	0(,%r13,4), %r12
	movq	%r13, %rbx
	movl	%eax, -88(%rbp)
	cltq
	imulq	%r12, %rax
	addq	$15, %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L57:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L57
.L3:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L58
.L4:
	leaq	3(%rsp), %r8
	movl	-132(%rbp), %eax
	movq	%r8, %r15
	andq	$-4, %r8
	shrq	$2, %r15
	testl	%eax, %eax
	js	.L5
	movq	%r12, %rdi
	shrq	$2, %rdi
	movq	%rdi, -112(%rbp)
	testl	%ebx, %ebx
	jle	.L6
	movq	%r8, -104(%rbp)
	movq	%r8, %rdi
	salq	$2, %r13
	xorl	%r14d, %r14d
	movl	%ebx, -96(%rbp)
	movl	%eax, %ebx
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rdx
	xorl	%esi, %esi
	call	memset@PLT
	movq	%rax, %rdi
	movl	%r14d, %eax
	addl	$1, %r14d
	addq	%r12, %rdi
	cmpl	%eax, %ebx
	jne	.L7
	movl	-96(%rbp), %ebx
	movq	-104(%rbp), %r8
.L6:
	movl	-132(%rbp), %eax
	movl	$1, 0(,%r15,4)
	testl	%eax, %eax
	je	.L9
	leal	-1(%rbx), %r12d
	movl	$1, %eax
	leal	-2(%rbx), %edi
	movl	%r12d, %ecx
	sall	%cl, %eax
	movl	%eax, %r14d
	testl	%eax, %eax
	jle	.L9
	movl	-88(%rbp), %eax
	movq	$1, -104(%rbp)
	movq	$0, -120(%rbp)
	movq	%rax, -128(%rbp)
	movq	-112(%rbp), %rax
	movq	%rax, -88(%rbp)
	.p2align 4,,10
	.p2align 3
.L11:
	movq	-88(%rbp), %rax
	movq	-104(%rbp), %rdx
	xorl	%esi, %esi
	movq	-120(%rbp), %r11
	leaq	(%r8,%rax,4), %rax
	movslq	%edx, %r13
	movq	%rax, -96(%rbp)
	movq	-112(%rbp), %rax
	subq	%rdx, %r11
	imulq	%rax, %r11
	imulq	%rax, %r13
	.p2align 4,,10
	.p2align 3
.L13:
	testl	%edi, %edi
	jle	.L26
	movl	%esi, %eax
	andl	$3, %eax
	cmpl	$3, %eax
	je	.L16
	xorl	%ecx, %ecx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%esi, %eax
	sarl	%cl, %eax
	andl	$3, %eax
	cmpl	$3, %eax
	je	.L16
.L12:
	addl	$1, %ecx
	cmpl	%edi, %ecx
	jne	.L15
.L26:
	testl	%ebx, %ebx
	jle	.L16
	testl	%r12d, %r12d
	jle	.L28
	movq	-96(%rbp), %rcx
	xorl	%eax, %eax
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L60:
	addl	4(%rcx), %edx
	movslq	%edx, %r9
	movl	%edx, %r10d
	imulq	$1152921497, %r9, %r9
	sarl	$31, %r10d
	sarq	$60, %r9
	subl	%r10d, %r9d
	imull	$1000000007, %r9d, %r9d
	subl	%r9d, %edx
	movl	%edx, 4(%rcx)
.L19:
	addl	$1, %eax
	addq	$4, %rcx
	cmpl	%eax, %r12d
	jle	.L59
.L21:
	btl	%eax, %esi
	movl	(%rcx,%r11,4), %edx
	jc	.L60
	testl	%eax, %eax
	je	.L20
	leal	-1(%rax), %r9d
	btl	%r9d, %esi
	jnc	.L20
	addl	-4(%rcx), %edx
	addl	$1, %eax
	addq	$4, %rcx
	movslq	%edx, %r9
	movl	%edx, %r10d
	imulq	$1152921497, %r9, %r9
	sarl	$31, %r10d
	sarq	$60, %r9
	subl	%r10d, %r9d
	imull	$1000000007, %r9d, %r9d
	subl	%r9d, %edx
	movl	%edx, -8(%rcx)
	cmpl	%eax, %r12d
	jg	.L21
.L59:
	cmpl	%eax, %ebx
	jg	.L17
	.p2align 4,,10
	.p2align 3
.L16:
	addl	$1, %esi
	cmpl	%r14d, %esi
	jne	.L13
	addq	$1, -104(%rbp)
	movq	-112(%rbp), %rdx
	addq	$1, -120(%rbp)
	movq	-104(%rbp), %rax
	addq	%rdx, -88(%rbp)
	cmpq	-128(%rbp), %rax
	jne	.L11
.L9:
	movl	-60(%rbp), %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	subl	$1, %eax
	movslq	%eax, %rdx
	movslq	-132(%rbp), %rax
	imulq	-112(%rbp), %rax
	addq	%rdx, %rax
	movl	(%r8,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L61
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	addl	(%rcx), %edx
	movslq	%edx, %r9
	movl	%edx, %r10d
	imulq	$1152921497, %r9, %r9
	sarl	$31, %r10d
	sarq	$60, %r9
	subl	%r10d, %r9d
	imull	$1000000007, %r9d, %r9d
	subl	%r9d, %edx
	movl	%edx, (%rcx)
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L28:
	xorl	%eax, %eax
.L17:
	movslq	%eax, %rdx
	addq	-88(%rbp), %rdx
	leaq	(%r8,%rdx,4), %rcx
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L62:
	leal	-1(%rax), %r9d
	btl	%r9d, %esi
	jnc	.L22
	movslq	%r9d, %r9
	addq	%r13, %r9
	addl	(%r8,%r9,4), %edx
	movslq	%edx, %r10
	movl	%edx, %r15d
	imulq	$1152921497, %r10, %r10
	sarl	$31, %r15d
	sarq	$60, %r10
	subl	%r15d, %r10d
	imull	$1000000007, %r10d, %r10d
	subl	%r10d, %edx
	movl	%edx, (%r8,%r9,4)
.L23:
	addl	$1, %eax
	addq	$4, %rcx
	cmpl	%eax, %ebx
	jle	.L16
.L24:
	movl	(%rcx,%r11,4), %edx
	testl	%eax, %eax
	jne	.L62
.L22:
	addl	(%rcx), %edx
	movslq	%edx, %r9
	movl	%edx, %r10d
	imulq	$1152921497, %r9, %r9
	sarl	$31, %r10d
	sarq	$60, %r9
	subl	%r10d, %r9d
	imull	$1000000007, %r9d, %r9d
	subl	%r9d, %edx
	movl	%edx, (%rcx)
	jmp	.L23
.L58:
	orq	$0, -8(%rsp,%rax)
	jmp	.L4
.L5:
	movl	$1, 0(,%r15,4)
	shrq	$2, %r12
	movq	%r12, -112(%rbp)
	jmp	.L9
.L61:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-60(%rbp), %rcx
	leaq	-64(%rbp), %rdx
	pushq	%r13
	leaq	-68(%rbp), %rsi
	pushq	%r12
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-68(%rbp), %eax
	movslq	-64(%rbp), %r13
	movq	%rsp, %rcx
	movl	%eax, -132(%rbp)
	addl	$1, %eax
	leaq	0(,%r13,4), %r12
	movq	%r13, %rbx
	movl	%eax, -88(%rbp)
	cltq
	imulq	%r12, %rax
	addq	$15, %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L57:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L57
.L3:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L58
.L4:
	leaq	3(%rsp), %r8
	movl	-132(%rbp), %eax
	movq	%r8, %r15
	andq	$-4, %r8
	shrq	$2, %r15
	testl	%eax, %eax
	js	.L5
	movq	%r12, %rdi
	shrq	$2, %rdi
	movq	%rdi, -112(%rbp)
	testl	%ebx, %ebx
	jle	.L6
	movq	%r8, -104(%rbp)
	movq	%r8, %rdi
	salq	$2, %r13
	xorl	%r14d, %r14d
	movl	%ebx, -96(%rbp)
	movl	%eax, %ebx
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rdx
	xorl	%esi, %esi
	call	memset@PLT
	movq	%rax, %rdi
	movl	%r14d, %eax
	addl	$1, %r14d
	addq	%r12, %rdi
	cmpl	%eax, %ebx
	jne	.L7
	movl	-96(%rbp), %ebx
	movq	-104(%rbp), %r8
.L6:
	movl	-132(%rbp), %eax
	movl	$1, 0(,%r15,4)
	testl	%eax, %eax
	je	.L9
	leal	-1(%rbx), %r12d
	movl	$1, %eax
	leal	-2(%rbx), %edi
	movl	%r12d, %ecx
	sall	%cl, %eax
	movl	%eax, %r14d
	testl	%eax, %eax
	jle	.L9
	movl	-88(%rbp), %eax
	movq	$1, -104(%rbp)
	movq	$0, -120(%rbp)
	movq	%rax, -128(%rbp)
	movq	-112(%rbp), %rax
	movq	%rax, -88(%rbp)
	.p2align 4,,10
	.p2align 3
.L11:
	movq	-88(%rbp), %rax
	movq	-104(%rbp), %rdx
	xorl	%esi, %esi
	movq	-120(%rbp), %r11
	leaq	(%r8,%rax,4), %rax
	movslq	%edx, %r13
	movq	%rax, -96(%rbp)
	movq	-112(%rbp), %rax
	subq	%rdx, %r11
	imulq	%rax, %r11
	imulq	%rax, %r13
	.p2align 4,,10
	.p2align 3
.L13:
	testl	%edi, %edi
	jle	.L26
	movl	%esi, %eax
	andl	$3, %eax
	cmpl	$3, %eax
	je	.L16
	xorl	%ecx, %ecx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%esi, %eax
	sarl	%cl, %eax
	andl	$3, %eax
	cmpl	$3, %eax
	je	.L16
.L12:
	addl	$1, %ecx
	cmpl	%edi, %ecx
	jne	.L15
.L26:
	testl	%ebx, %ebx
	jle	.L16
	testl	%r12d, %r12d
	jle	.L28
	movq	-96(%rbp), %rcx
	xorl	%eax, %eax
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L60:
	addl	4(%rcx), %edx
	movslq	%edx, %r9
	movl	%edx, %r10d
	imulq	$1152921497, %r9, %r9
	sarl	$31, %r10d
	sarq	$60, %r9
	subl	%r10d, %r9d
	imull	$1000000007, %r9d, %r9d
	subl	%r9d, %edx
	movl	%edx, 4(%rcx)
.L19:
	addl	$1, %eax
	addq	$4, %rcx
	cmpl	%eax, %r12d
	jle	.L59
.L21:
	btl	%eax, %esi
	movl	(%rcx,%r11,4), %edx
	jc	.L60
	testl	%eax, %eax
	je	.L20
	leal	-1(%rax), %r9d
	btl	%r9d, %esi
	jnc	.L20
	addl	-4(%rcx), %edx
	addl	$1, %eax
	addq	$4, %rcx
	movslq	%edx, %r9
	movl	%edx, %r10d
	imulq	$1152921497, %r9, %r9
	sarl	$31, %r10d
	sarq	$60, %r9
	subl	%r10d, %r9d
	imull	$1000000007, %r9d, %r9d
	subl	%r9d, %edx
	movl	%edx, -8(%rcx)
	cmpl	%eax, %r12d
	jg	.L21
.L59:
	cmpl	%eax, %ebx
	jg	.L17
	.p2align 4,,10
	.p2align 3
.L16:
	addl	$1, %esi
	cmpl	%r14d, %esi
	jne	.L13
	addq	$1, -104(%rbp)
	movq	-112(%rbp), %rdx
	addq	$1, -120(%rbp)
	movq	-104(%rbp), %rax
	addq	%rdx, -88(%rbp)
	cmpq	-128(%rbp), %rax
	jne	.L11
.L9:
	movl	-60(%rbp), %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	subl	$1, %eax
	movslq	%eax, %rdx
	movslq	-132(%rbp), %rax
	imulq	-112(%rbp), %rax
	addq	%rdx, %rax
	movl	(%r8,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L61
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	addl	(%rcx), %edx
	movslq	%edx, %r9
	movl	%edx, %r10d
	imulq	$1152921497, %r9, %r9
	sarl	$31, %r10d
	sarq	$60, %r9
	subl	%r10d, %r9d
	imull	$1000000007, %r9d, %r9d
	subl	%r9d, %edx
	movl	%edx, (%rcx)
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L28:
	xorl	%eax, %eax
.L17:
	movslq	%eax, %rdx
	addq	-88(%rbp), %rdx
	leaq	(%r8,%rdx,4), %rcx
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L62:
	leal	-1(%rax), %r9d
	btl	%r9d, %esi
	jnc	.L22
	movslq	%r9d, %r9
	addq	%r13, %r9
	addl	(%r8,%r9,4), %edx
	movslq	%edx, %r10
	movl	%edx, %r15d
	imulq	$1152921497, %r10, %r10
	sarl	$31, %r15d
	sarq	$60, %r10
	subl	%r15d, %r10d
	imull	$1000000007, %r10d, %r10d
	subl	%r10d, %edx
	movl	%edx, (%r8,%r9,4)
.L23:
	addl	$1, %eax
	addq	$4, %rcx
	cmpl	%eax, %ebx
	jle	.L16
.L24:
	movl	(%rcx,%r11,4), %edx
	testl	%eax, %eax
	jne	.L62
.L22:
	addl	(%rcx), %edx
	movslq	%edx, %r9
	movl	%edx, %r10d
	imulq	$1152921497, %r9, %r9
	sarl	$31, %r10d
	sarq	$60, %r9
	subl	%r10d, %r9d
	imull	$1000000007, %r9d, %r9d
	subl	%r9d, %edx
	movl	%edx, (%rcx)
	jmp	.L23
.L58:
	orq	$0, -8(%rsp,%rax)
	jmp	.L4
.L5:
	movl	$1, 0(,%r15,4)
	shrq	$2, %r12
	movq	%r12, -112(%rbp)
	jmp	.L9
.L61:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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>

#define MOD 1000000007

int main() {
  int h, w, k;
  scanf("%d%d%d", &h, &w, &k);
  int dp[h+1][w];
  for (int i=0; i<h+1; i++) {
    for (int j=0; j<w; j++) {
      dp[i][j] = 0;
    }
  }
  dp[0][0] = 1;
  for (int i=1; i<h+1; i++) {
    for (int k=0; k<(1<<(w-1)); k++) {
      int check = 1;
      for (int l=0; l<w-2; l++) {
        if (((k>>l)&3) == 3) {
          check = 0;
          break;
        }
      }
      if (check == 0) continue;
      for (int j=0; j<w; j++) {
        if (j<w-1 && ((k>>j)&1) == 1) {
          dp[i][j+1] += dp[i-1][j];
          dp[i][j+1] %= MOD;
        }else if (j>0 && ((k>>(j-1))&1) == 1) {
          dp[i][j-1] += dp[i-1][j];
          dp[i][j-1] %= MOD;
        }else {
          dp[i][j] += dp[i-1][j];
          dp[i][j] %= MOD;
        }
      }
    }
  }
  printf("%d\n", dp[h][k-1]);
  return 0;
}

4 3 1
 1 2 2
 1 5 1
 16 8 5
 4 6 1
 1 9 1
 16 8 3
 8 6 1
 1 9 2
 15 8 3

35
 1
 5
 698231265
 12371
 34
 59172019
 276953291
 21
 978283490

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>

#define MOD 1000000007

int main() {
  int h, w, k;
  scanf("%d%d%d", &h, &w, &k);
  int dp[h+1][w];
  for (int i=0; i<h+1; i++) {
    for (int j=0; j<w; j++) {
      dp[i][j] = 0;
    }
  }
  dp[0][0] = 1;
  for (int i=1; i<h+1; i++) {
    for (int k=0; k<(1<<(w-1)); k++) {
      int check = 1;
      for (int l=0; l<w-2; l++) {
        if (((k>>l)&3) == 3) {
          check = 0;
          break;
        }
      }
      if (check == 0) continue;
      for (int j=0; j<w; j++) {
        if (j<w-1 && ((k>>j)&1) == 1) {
          dp[i][j+1] += dp[i-1][j];
          dp[i][j+1] %= MOD;
        }else if (j>0 && ((k>>(j-1))&1) == 1) {
          dp[i][j-1] += dp[i-1][j];
          dp[i][j-1] %= MOD;
        }else {
          dp[i][j] += dp[i-1][j];
          dp[i][j] %= MOD;
        }
      }
    }
  }
  printf("%d\n", dp[h][k-1]);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$136, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-112(%rbp), %rcx
	leaq	-116(%rbp), %rdx
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-116(%rbp), %ecx
	movl	-120(%rbp), %eax
	leal	1(%rax), %edi
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -80(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movslq	%ecx, %rax
	leaq	0(,%rax,4), %rsi
	movslq	%edi, %rax
	subq	$1, %rax
	movq	%rax, -72(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%edi, %rax
	movq	%rax, -144(%rbp)
	movq	$0, -136(%rbp)
	movq	-160(%rbp), %r10
	movq	-152(%rbp), %r11
	movq	%r11, %rdx
	movq	-144(%rbp), %r8
	movq	-136(%rbp), %r9
	imulq	%r8, %rdx
	movq	%r8, -144(%rbp)
	movq	%r9, -136(%rbp)
	movq	%r9, %rax
	imulq	%r10, %rax
	leaq	(%rdx,%rax), %r8
	movq	%r10, %rax
	mulq	-144(%rbp)
	addq	%rdx, %r8
	movq	%r8, %rdx
	movslq	%ecx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movslq	%edi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%r15, %rdx
	imulq	%r12, %rdx
	movq	%r13, %rax
	imulq	%r14, %rax
	leaq	(%rdx,%rax), %r8
	movq	%r14, %rax
	mulq	%r12
	addq	%rdx, %r8
	movq	%r8, %rdx
	movslq	%ecx, %rdx
	movslq	%edi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L5
.L8:
	movl	$0, -104(%rbp)
	jmp	.L6
.L7:
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdi
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	$0, (%rax,%rdx,4)
	addl	$1, -104(%rbp)
.L6:
	movl	-116(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L7
	addl	$1, -108(%rbp)
.L5:
	movl	-120(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jle	.L8
	movq	-64(%rbp), %rax
	movl	$1, (%rax)
	movl	$1, -100(%rbp)
	jmp	.L9
.L23:
	movl	$0, -96(%rbp)
	jmp	.L10
.L22:
	movl	$1, -92(%rbp)
	movl	$0, -88(%rbp)
	jmp	.L11
.L14:
	movl	-88(%rbp), %eax
	movl	-96(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$3, %eax
	cmpl	$3, %eax
	jne	.L12
	movl	$0, -92(%rbp)
	jmp	.L13
.L12:
	addl	$1, -88(%rbp)
.L11:
	movl	-116(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -88(%rbp)
	jl	.L14
.L13:
	cmpl	$0, -92(%rbp)
	je	.L26
	movl	$0, -84(%rbp)
	jmp	.L17
.L21:
	movl	-116(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -84(%rbp)
	jge	.L18
	movl	-84(%rbp), %eax
	movl	-96(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L18
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %r8d
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %r9
	movslq	%edi, %rdx
	imulq	%rcx, %rdx
	addq	%r9, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	%rsi, %rdi
	shrq	$2, %rdi
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	addl	%r8d, %ecx
	movq	-64(%rbp), %rax
	movslq	%edx, %r8
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rdi, %rdx
	addq	%r8, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	%rsi, %rdi
	shrq	$2, %rdi
	movl	-84(%rbp), %eax
	leal	1(%rax), %ecx
	movslq	%edx, %rax
	imulq	$1152921497, %rax, %rax
	shrq	$32, %rax
	sarl	$28, %eax
	movl	%edx, %r8d
	sarl	$31, %r8d
	subl	%r8d, %eax
	imull	$1000000007, %eax, %r8d
	movl	%edx, %eax
	subl	%r8d, %eax
	movq	-64(%rbp), %rdx
	movslq	%ecx, %r8
	movl	-100(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	addq	%r8, %rcx
	movl	%eax, (%rdx,%rcx,4)
	jmp	.L19
.L18:
	cmpl	$0, -84(%rbp)
	jle	.L20
	movl	-84(%rbp), %eax
	subl	$1, %eax
	movl	-96(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L20
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %r8d
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %r9
	movslq	%edi, %rdx
	imulq	%rcx, %rdx
	addq	%r9, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	%rsi, %rdi
	shrq	$2, %rdi
	movl	-84(%rbp), %eax
	leal	-1(%rax), %edx
	addl	%r8d, %ecx
	movq	-64(%rbp), %rax
	movslq	%edx, %r8
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rdi, %rdx
	addq	%r8, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	%rsi, %rdi
	shrq	$2, %rdi
	movl	-84(%rbp), %eax
	leal	-1(%rax), %ecx
	movslq	%edx, %rax
	imulq	$1152921497, %rax, %rax
	shrq	$32, %rax
	sarl	$28, %eax
	movl	%edx, %r8d
	sarl	$31, %r8d
	subl	%r8d, %eax
	imull	$1000000007, %eax, %r8d
	movl	%edx, %eax
	subl	%r8d, %eax
	movq	-64(%rbp), %rdx
	movslq	%ecx, %r8
	movl	-100(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	addq	%r8, %rcx
	movl	%eax, (%rdx,%rcx,4)
	jmp	.L19
.L20:
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %r8d
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %r9
	movslq	%edi, %rdx
	imulq	%rcx, %rdx
	addq	%r9, %rdx
	movl	(%rax,%rdx,4), %eax
	movq	%rsi, %rdi
	shrq	$2, %rdi
	leal	(%r8,%rax), %ecx
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %r8
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rdi, %rdx
	addq	%r8, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	%rsi, %rdi
	shrq	$2, %rdi
	movslq	%edx, %rax
	imulq	$1152921497, %rax, %rax
	shrq	$32, %rax
	sarl	$28, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$1000000007, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movq	-64(%rbp), %rdx
	movl	-84(%rbp), %ecx
	movslq	%ecx, %r8
	movl	-100(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	addq	%r8, %rcx
	movl	%eax, (%rdx,%rcx,4)
.L19:
	addl	$1, -84(%rbp)
.L17:
	movl	-116(%rbp), %eax
	cmpl	%eax, -84(%rbp)
	jl	.L21
	jmp	.L16
.L26:
	nop
.L16:
	addl	$1, -96(%rbp)
.L10:
	movl	-116(%rbp), %eax
	subl	$1, %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cmpl	%eax, -96(%rbp)
	jl	.L22
	addl	$1, -100(%rbp)
.L9:
	movl	-120(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jle	.L23
	shrq	$2, %rsi
	movq	%rsi, %rcx
	movl	-120(%rbp), %edx
	movl	-112(%rbp), %eax
	leal	-1(%rax), %esi
	movq	-64(%rbp), %rax
	movslq	%esi, %rsi
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$136, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-112(%rbp), %rcx
	leaq	-116(%rbp), %rdx
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-116(%rbp), %ecx
	movl	-120(%rbp), %eax
	leal	1(%rax), %edi
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -80(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movslq	%ecx, %rax
	leaq	0(,%rax,4), %rsi
	movslq	%edi, %rax
	subq	$1, %rax
	movq	%rax, -72(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%edi, %rax
	movq	%rax, -144(%rbp)
	movq	$0, -136(%rbp)
	movq	-160(%rbp), %r10
	movq	-152(%rbp), %r11
	movq	%r11, %rdx
	movq	-144(%rbp), %r8
	movq	-136(%rbp), %r9
	imulq	%r8, %rdx
	movq	%r8, -144(%rbp)
	movq	%r9, -136(%rbp)
	movq	%r9, %rax
	imulq	%r10, %rax
	leaq	(%rdx,%rax), %r8
	movq	%r10, %rax
	mulq	-144(%rbp)
	addq	%rdx, %r8
	movq	%r8, %rdx
	movslq	%ecx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movslq	%edi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%r15, %rdx
	imulq	%r12, %rdx
	movq	%r13, %rax
	imulq	%r14, %rax
	leaq	(%rdx,%rax), %r8
	movq	%r14, %rax
	mulq	%r12
	addq	%rdx, %r8
	movq	%r8, %rdx
	movslq	%ecx, %rdx
	movslq	%edi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L5
.L8:
	movl	$0, -104(%rbp)
	jmp	.L6
.L7:
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdi
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	$0, (%rax,%rdx,4)
	addl	$1, -104(%rbp)
.L6:
	movl	-116(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L7
	addl	$1, -108(%rbp)
.L5:
	movl	-120(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jle	.L8
	movq	-64(%rbp), %rax
	movl	$1, (%rax)
	movl	$1, -100(%rbp)
	jmp	.L9
.L23:
	movl	$0, -96(%rbp)
	jmp	.L10
.L22:
	movl	$1, -92(%rbp)
	movl	$0, -88(%rbp)
	jmp	.L11
.L14:
	movl	-88(%rbp), %eax
	movl	-96(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$3, %eax
	cmpl	$3, %eax
	jne	.L12
	movl	$0, -92(%rbp)
	jmp	.L13
.L12:
	addl	$1, -88(%rbp)
.L11:
	movl	-116(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -88(%rbp)
	jl	.L14
.L13:
	cmpl	$0, -92(%rbp)
	je	.L26
	movl	$0, -84(%rbp)
	jmp	.L17
.L21:
	movl	-116(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -84(%rbp)
	jge	.L18
	movl	-84(%rbp), %eax
	movl	-96(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L18
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %r8d
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %r9
	movslq	%edi, %rdx
	imulq	%rcx, %rdx
	addq	%r9, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	%rsi, %rdi
	shrq	$2, %rdi
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	addl	%r8d, %ecx
	movq	-64(%rbp), %rax
	movslq	%edx, %r8
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rdi, %rdx
	addq	%r8, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	%rsi, %rdi
	shrq	$2, %rdi
	movl	-84(%rbp), %eax
	leal	1(%rax), %ecx
	movslq	%edx, %rax
	imulq	$1152921497, %rax, %rax
	shrq	$32, %rax
	sarl	$28, %eax
	movl	%edx, %r8d
	sarl	$31, %r8d
	subl	%r8d, %eax
	imull	$1000000007, %eax, %r8d
	movl	%edx, %eax
	subl	%r8d, %eax
	movq	-64(%rbp), %rdx
	movslq	%ecx, %r8
	movl	-100(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	addq	%r8, %rcx
	movl	%eax, (%rdx,%rcx,4)
	jmp	.L19
.L18:
	cmpl	$0, -84(%rbp)
	jle	.L20
	movl	-84(%rbp), %eax
	subl	$1, %eax
	movl	-96(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L20
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %r8d
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %r9
	movslq	%edi, %rdx
	imulq	%rcx, %rdx
	addq	%r9, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	%rsi, %rdi
	shrq	$2, %rdi
	movl	-84(%rbp), %eax
	leal	-1(%rax), %edx
	addl	%r8d, %ecx
	movq	-64(%rbp), %rax
	movslq	%edx, %r8
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rdi, %rdx
	addq	%r8, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	%rsi, %rdi
	shrq	$2, %rdi
	movl	-84(%rbp), %eax
	leal	-1(%rax), %ecx
	movslq	%edx, %rax
	imulq	$1152921497, %rax, %rax
	shrq	$32, %rax
	sarl	$28, %eax
	movl	%edx, %r8d
	sarl	$31, %r8d
	subl	%r8d, %eax
	imull	$1000000007, %eax, %r8d
	movl	%edx, %eax
	subl	%r8d, %eax
	movq	-64(%rbp), %rdx
	movslq	%ecx, %r8
	movl	-100(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	addq	%r8, %rcx
	movl	%eax, (%rdx,%rcx,4)
	jmp	.L19
.L20:
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %r8d
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %r9
	movslq	%edi, %rdx
	imulq	%rcx, %rdx
	addq	%r9, %rdx
	movl	(%rax,%rdx,4), %eax
	movq	%rsi, %rdi
	shrq	$2, %rdi
	leal	(%r8,%rax), %ecx
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %r8
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rdi, %rdx
	addq	%r8, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movq	%rsi, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	%rsi, %rdi
	shrq	$2, %rdi
	movslq	%edx, %rax
	imulq	$1152921497, %rax, %rax
	shrq	$32, %rax
	sarl	$28, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$1000000007, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movq	-64(%rbp), %rdx
	movl	-84(%rbp), %ecx
	movslq	%ecx, %r8
	movl	-100(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	addq	%r8, %rcx
	movl	%eax, (%rdx,%rcx,4)
.L19:
	addl	$1, -84(%rbp)
.L17:
	movl	-116(%rbp), %eax
	cmpl	%eax, -84(%rbp)
	jl	.L21
	jmp	.L16
.L26:
	nop
.L16:
	addl	$1, -96(%rbp)
.L10:
	movl	-116(%rbp), %eax
	subl	$1, %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cmpl	%eax, -96(%rbp)
	jl	.L22
	addl	$1, -100(%rbp)
.L9:
	movl	-120(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jle	.L23
	shrq	$2, %rsi
	movq	%rsi, %rcx
	movl	-120(%rbp), %edx
	movl	-112(%rbp), %eax
	leal	-1(%rax), %esi
	movq	-64(%rbp), %rax
	movslq	%esi, %rsi
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
