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

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

#define NEW(p,n){p=malloc((n)*sizeof(p[0]));if(p==NULL){printf("not enough memory\n");exit(1);};}
//pの型の変数n個の要素分のメモリを確保し、そのアドレスをpに代入するマクロ

#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))

#define N 1000000007

int main(void){
    int H,W,K;
    scanf("%d%d%d",&H,&W,&K);

    //ans[H][W]は、縦の長さがH,終点がWのあみだくじの本数
    long ans[H+1][W+1];
    //初期値のans[0]を格納
    ans[0][1]=1;
    for(int i=2;i<=W;i++) ans[0][i]=0;

    //DP表を更新する
    for(int i=1;i<=H;i++){
        for(int j=1;j<=W;j++){
            ans[i][j]=0;
            //ans[i][j]がどう変わるのかを考える
            for(int k=0;k<(1<<(W-1));k++){
                //amida...あみだくじとして成立するなら0,しないなら1
                int amida=0;
                for(int l=0;l<(W-2);l++){
                    if(k&(1<<l) && k&(1<<(l+1))) amida=1;
                }

                //あみだくじとして成立しないならスキップ
                if(amida) continue;

                //左にずれて来るのを受け入れる
                if(j<W && (k>>(j-1))&1) ans[i][j]=(ans[i][j]+ans[i-1][j+1])%N;
                //右にずれて来るのを受け入れる
                else if(j>1 && (k>>(j-2))&1) ans[i][j]=(ans[i][j]+ans[i-1][j-1])%N;
                //そのまま
                else ans[i][j]=(ans[i][j]+ans[i-1][j])%N;
            }
        }
    }
    
    printf("%ld\n",ans[H][K]);

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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	-108(%rbp), %rcx
	leaq	-112(%rbp), %rdx
	leaq	-116(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-112(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-116(%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,8), %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,8), %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	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movq	-64(%rbp), %rax
	movq	$1, 8(%rax)
	movl	$2, -104(%rbp)
	jmp	.L5
.L6:
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movq	$0, (%rax,%rdx,8)
	addl	$1, -104(%rbp)
.L5:
	movl	-112(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jle	.L6
	movl	$1, -100(%rbp)
	jmp	.L7
.L19:
	movl	$1, -96(%rbp)
	jmp	.L8
.L18:
	movq	%rsi, %rcx
	shrq	$3, %rcx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movq	$0, (%rax,%rdx,8)
	movl	$0, -92(%rbp)
	jmp	.L9
.L17:
	movl	$0, -88(%rbp)
	movl	$0, -84(%rbp)
	jmp	.L10
.L12:
	movl	-84(%rbp), %eax
	movl	-92(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L11
	movl	-84(%rbp), %eax
	addl	$1, %eax
	movl	-92(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L11
	movl	$1, -88(%rbp)
.L11:
	addl	$1, -84(%rbp)
.L10:
	movl	-112(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -84(%rbp)
	jl	.L12
	cmpl	$0, -88(%rbp)
	jne	.L22
	movl	-112(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jge	.L15
	movl	-96(%rbp), %eax
	subl	$1, %eax
	movl	-92(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L15
	movq	%rsi, %rcx
	shrq	$3, %rcx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movq	(%rax,%rdx,8), %r8
	movq	%rsi, %rcx
	shrq	$3, %rcx
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-96(%rbp), %eax
	leal	1(%rax), %edi
	movq	-64(%rbp), %rax
	movslq	%edi, %rdi
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movq	(%rax,%rdx,8), %rax
	leaq	(%r8,%rax), %rcx
	movq	%rsi, %rdi
	shrq	$3, %rdi
	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	-64(%rbp), %rdx
	movl	-96(%rbp), %ecx
	movslq	%ecx, %r8
	movl	-100(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	addq	%r8, %rcx
	movq	%rax, (%rdx,%rcx,8)
	jmp	.L14
.L15:
	cmpl	$1, -96(%rbp)
	jle	.L16
	movl	-96(%rbp), %eax
	subl	$2, %eax
	movl	-92(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L16
	movq	%rsi, %rcx
	shrq	$3, %rcx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movq	(%rax,%rdx,8), %r8
	movq	%rsi, %rcx
	shrq	$3, %rcx
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-96(%rbp), %eax
	leal	-1(%rax), %edi
	movq	-64(%rbp), %rax
	movslq	%edi, %rdi
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movq	(%rax,%rdx,8), %rax
	leaq	(%r8,%rax), %rcx
	movq	%rsi, %rdi
	shrq	$3, %rdi
	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	-64(%rbp), %rdx
	movl	-96(%rbp), %ecx
	movslq	%ecx, %r8
	movl	-100(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	addq	%r8, %rcx
	movq	%rax, (%rdx,%rcx,8)
	jmp	.L14
.L16:
	movq	%rsi, %rcx
	shrq	$3, %rcx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movq	(%rax,%rdx,8), %r8
	movq	%rsi, %rcx
	shrq	$3, %rcx
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edi
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %r9
	movslq	%edi, %rdx
	imulq	%rcx, %rdx
	addq	%r9, %rdx
	movq	(%rax,%rdx,8), %rax
	leaq	(%r8,%rax), %rcx
	movq	%rsi, %rdi
	shrq	$3, %rdi
	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	-64(%rbp), %rdx
	movl	-96(%rbp), %ecx
	movslq	%ecx, %r8
	movl	-100(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	addq	%r8, %rcx
	movq	%rax, (%rdx,%rcx,8)
	jmp	.L14
.L22:
	nop
.L14:
	addl	$1, -92(%rbp)
.L9:
	movl	-112(%rbp), %eax
	subl	$1, %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cmpl	%eax, -92(%rbp)
	jl	.L17
	addl	$1, -96(%rbp)
.L8:
	movl	-112(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jle	.L18
	addl	$1, -100(%rbp)
.L7:
	movl	-116(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jle	.L19
	shrq	$3, %rsi
	movl	-116(%rbp), %edx
	movl	-108(%rbp), %ecx
	movq	-64(%rbp), %rax
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	imulq	%rsi, %rdx
	addq	%rcx, %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, %rsi
	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	.L21
	call	__stack_chk_fail@PLT
.L21:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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	$120, %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	-64(%rbp), %eax
	movl	-68(%rbp), %ebx
	movq	%rsp, %rcx
	leal	1(%rax), %edx
	movl	%eax, -92(%rbp)
	movslq	%edx, %rdx
	movl	%ebx, -96(%rbp)
	leaq	0(,%rdx,8), %rax
	movq	%rax, -128(%rbp)
	leal	1(%rbx), %eax
	cltq
	imulq	%rdx, %rax
	leaq	15(,%rax,8), %rdx
	movq	%rdx, %rax
	andq	$-4096, %rdx
	subq	%rdx, %rcx
	andq	$-16, %rax
	cmpq	%rcx, %rsp
	je	.L3
.L61:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L61
.L3:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L62
.L4:
	leaq	7(%rsp), %rax
	movq	%rax, %rdx
	andq	$-8, %rax
	movq	%rax, -88(%rbp)
	movq	-128(%rbp), %rax
	shrq	$3, %rdx
	movq	$1, 8(,%rdx,8)
	shrq	$3, %rax
	cmpl	$1, -92(%rbp)
	movq	%rax, -112(%rbp)
	jle	.L63
	movl	-92(%rbp), %r14d
	movq	-88(%rbp), %rax
	xorl	%esi, %esi
	leal	-1(%r14), %edx
	leaq	16(%rax), %rdi
	movq	%rdx, %rbx
	salq	$3, %rdx
	call	memset@PLT
	movl	-96(%rbp), %eax
	movl	$1, %r9d
	movl	%ebx, %ecx
	sall	%cl, %r9d
	leal	-2(%r14), %edi
	testl	%eax, %eax
	jle	.L7
.L30:
	movq	-88(%rbp), %rax
	movq	-128(%rbp), %rbx
	movl	$1, %esi
	movq	$0, -120(%rbp)
	leaq	8(%rax,%rbx), %rax
	movq	%rax, -144(%rbp)
	movl	-96(%rbp), %eax
	movq	%rax, -152(%rbp)
	movq	-112(%rbp), %rax
	movq	%rax, -136(%rbp)
	negq	%rax
	movq	%rax, %r14
.L10:
	cmpl	$1, -92(%rbp)
	jg	.L28
	movl	$1, %r11d
.L29:
	movq	-136(%rbp), %rax
	movq	-88(%rbp), %rbx
	movslq	%r11d, %r11
	addq	%r11, %rax
	leaq	(%rbx,%rax,8), %r10
	movslq	-120(%rbp), %rax
	imulq	-112(%rbp), %rax
	movq	%rax, -104(%rbp)
	.p2align 4,,10
	.p2align 3
.L27:
	movq	$0, (%r10)
	testl	%r9d, %r9d
	jle	.L20
	leal	-2(%r11), %ecx
	movl	%esi, %r13d
	leal	-1(%r11), %r12d
	movl	%r11d, %ebx
	movslq	%r12d, %r12
	sall	%cl, %r13d
	xorl	%r8d, %r8d
	addq	-104(%rbp), %r12
	.p2align 4,,10
	.p2align 3
.L26:
	testl	%edi, %edi
	jle	.L21
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L23:
	movl	%eax, %ecx
	movl	%esi, %edx
	addl	$1, %eax
	sall	%cl, %edx
	btsl	%eax, %edx
	movl	%edx, %ecx
	andl	%r8d, %ecx
	cmpl	%ecx, %edx
	cmove	%esi, %r15d
	cmpl	%edi, %eax
	jne	.L23
	testl	%r15d, %r15d
	jne	.L24
.L21:
	movq	(%r10), %rcx
	cmpl	$1, %ebx
	je	.L25
	testl	%r13d, %r8d
	je	.L25
	movq	-88(%rbp), %rax
	addq	(%rax,%r12,8), %rcx
.L59:
	movabsq	$-8543223828751151131, %rax
	imulq	%rcx
	leaq	(%rdx,%rcx), %rax
	movq	%rcx, %rdx
	sarq	$29, %rax
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rcx
	movq	%rcx, (%r10)
.L24:
	addl	$1, %r8d
	cmpl	%r9d, %r8d
	jne	.L26
.L20:
	addq	$1, %r11
	addq	$8, %r10
	cmpl	%r11d, -92(%rbp)
	jge	.L27
	movq	-112(%rbp), %rcx
	addq	$1, -120(%rbp)
	addq	%rcx, -136(%rbp)
	movq	-120(%rbp), %rax
	movq	-128(%rbp), %rcx
	addq	%rcx, -144(%rbp)
	cmpq	-152(%rbp), %rax
	jne	.L10
.L7:
	movslq	-96(%rbp), %rax
	movslq	-60(%rbp), %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	imulq	-112(%rbp), %rax
	movq	-88(%rbp), %rbx
	addq	%rdx, %rax
	movq	(%rbx,%rax,8), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L64
	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
.L25:
	.cfi_restore_state
	addq	(%r10,%r14,8), %rcx
	jmp	.L59
.L28:
	movq	-144(%rbp), %r10
	movl	-92(%rbp), %r13d
	movl	$1, %r11d
	.p2align 4,,10
	.p2align 3
.L19:
	movl	%r11d, %eax
	movq	$0, (%r10)
	addl	$1, %r11d
	testl	%r9d, %r9d
	jle	.L11
	leal	-1(%rax), %ecx
	movl	%esi, %ebx
	movl	%esi, %r12d
	xorl	%r8d, %r8d
	sall	%cl, %ebx
	leal	-2(%rax), %ecx
	sall	%cl, %r12d
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	testl	%edi, %edi
	jle	.L18
	.p2align 4,,10
	.p2align 3
.L14:
	movl	%eax, %ecx
	movl	%esi, %edx
	addl	$1, %eax
	sall	%cl, %edx
	movl	%r8d, %ecx
	btsl	%eax, %edx
	andl	%edx, %ecx
	cmpl	%ecx, %edx
	cmove	%esi, %r15d
	cmpl	%edi, %eax
	jne	.L14
	testl	%r15d, %r15d
	jne	.L15
.L18:
	movq	(%r10), %rcx
	testl	%r8d, %ebx
	je	.L16
	addq	8(%r10,%r14,8), %rcx
.L58:
	movabsq	$-8543223828751151131, %rax
	imulq	%rcx
	leaq	(%rdx,%rcx), %rax
	movq	%rcx, %rdx
	sarq	$29, %rax
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rcx
	movq	%rcx, (%r10)
.L15:
	addl	$1, %r8d
	cmpl	%r9d, %r8d
	jne	.L12
.L11:
	addq	$8, %r10
	cmpl	%r11d, %r13d
	jne	.L19
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L16:
	cmpl	$2, %r11d
	je	.L17
	testl	%r8d, %r12d
	je	.L17
	addq	-8(%r10,%r14,8), %rcx
	jmp	.L58
	.p2align 4,,10
	.p2align 3
.L17:
	addq	(%r10,%r14,8), %rcx
	jmp	.L58
.L63:
	movl	-96(%rbp), %edx
	testl	%edx, %edx
	jle	.L7
	movl	-92(%rbp), %eax
	leal	-2(%rax), %edi
	cmpl	$1, %eax
	jne	.L7
	movl	$1, %r9d
	jmp	.L30
.L62:
	orq	$0, -8(%rsp,%rax)
	jmp	.L4
.L64:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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	$120, %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	-64(%rbp), %eax
	movl	-68(%rbp), %ebx
	movq	%rsp, %rcx
	leal	1(%rax), %edx
	movl	%eax, -92(%rbp)
	movslq	%edx, %rdx
	movl	%ebx, -96(%rbp)
	leaq	0(,%rdx,8), %rax
	movq	%rax, -128(%rbp)
	leal	1(%rbx), %eax
	cltq
	imulq	%rdx, %rax
	leaq	15(,%rax,8), %rdx
	movq	%rdx, %rax
	andq	$-4096, %rdx
	subq	%rdx, %rcx
	andq	$-16, %rax
	cmpq	%rcx, %rsp
	je	.L3
.L61:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L61
.L3:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L62
.L4:
	leaq	7(%rsp), %rax
	movq	%rax, %rdx
	andq	$-8, %rax
	movq	%rax, -88(%rbp)
	movq	-128(%rbp), %rax
	shrq	$3, %rdx
	movq	$1, 8(,%rdx,8)
	shrq	$3, %rax
	cmpl	$1, -92(%rbp)
	movq	%rax, -112(%rbp)
	jle	.L63
	movl	-92(%rbp), %r14d
	movq	-88(%rbp), %rax
	xorl	%esi, %esi
	leal	-1(%r14), %edx
	leaq	16(%rax), %rdi
	movq	%rdx, %rbx
	salq	$3, %rdx
	call	memset@PLT
	movl	-96(%rbp), %eax
	movl	$1, %r9d
	movl	%ebx, %ecx
	sall	%cl, %r9d
	leal	-2(%r14), %edi
	testl	%eax, %eax
	jle	.L7
.L30:
	movq	-88(%rbp), %rax
	movq	-128(%rbp), %rbx
	movl	$1, %esi
	movq	$0, -120(%rbp)
	leaq	8(%rax,%rbx), %rax
	movq	%rax, -144(%rbp)
	movl	-96(%rbp), %eax
	movq	%rax, -152(%rbp)
	movq	-112(%rbp), %rax
	movq	%rax, -136(%rbp)
	negq	%rax
	movq	%rax, %r14
.L10:
	cmpl	$1, -92(%rbp)
	jg	.L28
	movl	$1, %r11d
.L29:
	movq	-136(%rbp), %rax
	movq	-88(%rbp), %rbx
	movslq	%r11d, %r11
	addq	%r11, %rax
	leaq	(%rbx,%rax,8), %r10
	movslq	-120(%rbp), %rax
	imulq	-112(%rbp), %rax
	movq	%rax, -104(%rbp)
	.p2align 4,,10
	.p2align 3
.L27:
	movq	$0, (%r10)
	testl	%r9d, %r9d
	jle	.L20
	leal	-2(%r11), %ecx
	movl	%esi, %r13d
	leal	-1(%r11), %r12d
	movl	%r11d, %ebx
	movslq	%r12d, %r12
	sall	%cl, %r13d
	xorl	%r8d, %r8d
	addq	-104(%rbp), %r12
	.p2align 4,,10
	.p2align 3
.L26:
	testl	%edi, %edi
	jle	.L21
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L23:
	movl	%eax, %ecx
	movl	%esi, %edx
	addl	$1, %eax
	sall	%cl, %edx
	btsl	%eax, %edx
	movl	%edx, %ecx
	andl	%r8d, %ecx
	cmpl	%ecx, %edx
	cmove	%esi, %r15d
	cmpl	%edi, %eax
	jne	.L23
	testl	%r15d, %r15d
	jne	.L24
.L21:
	movq	(%r10), %rcx
	cmpl	$1, %ebx
	je	.L25
	testl	%r13d, %r8d
	je	.L25
	movq	-88(%rbp), %rax
	addq	(%rax,%r12,8), %rcx
.L59:
	movabsq	$-8543223828751151131, %rax
	imulq	%rcx
	leaq	(%rdx,%rcx), %rax
	movq	%rcx, %rdx
	sarq	$29, %rax
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rcx
	movq	%rcx, (%r10)
.L24:
	addl	$1, %r8d
	cmpl	%r9d, %r8d
	jne	.L26
.L20:
	addq	$1, %r11
	addq	$8, %r10
	cmpl	%r11d, -92(%rbp)
	jge	.L27
	movq	-112(%rbp), %rcx
	addq	$1, -120(%rbp)
	addq	%rcx, -136(%rbp)
	movq	-120(%rbp), %rax
	movq	-128(%rbp), %rcx
	addq	%rcx, -144(%rbp)
	cmpq	-152(%rbp), %rax
	jne	.L10
.L7:
	movslq	-96(%rbp), %rax
	movslq	-60(%rbp), %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	imulq	-112(%rbp), %rax
	movq	-88(%rbp), %rbx
	addq	%rdx, %rax
	movq	(%rbx,%rax,8), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L64
	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
.L25:
	.cfi_restore_state
	addq	(%r10,%r14,8), %rcx
	jmp	.L59
.L28:
	movq	-144(%rbp), %r10
	movl	-92(%rbp), %r13d
	movl	$1, %r11d
	.p2align 4,,10
	.p2align 3
.L19:
	movl	%r11d, %eax
	movq	$0, (%r10)
	addl	$1, %r11d
	testl	%r9d, %r9d
	jle	.L11
	leal	-1(%rax), %ecx
	movl	%esi, %ebx
	movl	%esi, %r12d
	xorl	%r8d, %r8d
	sall	%cl, %ebx
	leal	-2(%rax), %ecx
	sall	%cl, %r12d
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	testl	%edi, %edi
	jle	.L18
	.p2align 4,,10
	.p2align 3
.L14:
	movl	%eax, %ecx
	movl	%esi, %edx
	addl	$1, %eax
	sall	%cl, %edx
	movl	%r8d, %ecx
	btsl	%eax, %edx
	andl	%edx, %ecx
	cmpl	%ecx, %edx
	cmove	%esi, %r15d
	cmpl	%edi, %eax
	jne	.L14
	testl	%r15d, %r15d
	jne	.L15
.L18:
	movq	(%r10), %rcx
	testl	%r8d, %ebx
	je	.L16
	addq	8(%r10,%r14,8), %rcx
.L58:
	movabsq	$-8543223828751151131, %rax
	imulq	%rcx
	leaq	(%rdx,%rcx), %rax
	movq	%rcx, %rdx
	sarq	$29, %rax
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rcx
	movq	%rcx, (%r10)
.L15:
	addl	$1, %r8d
	cmpl	%r9d, %r8d
	jne	.L12
.L11:
	addq	$8, %r10
	cmpl	%r11d, %r13d
	jne	.L19
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L16:
	cmpl	$2, %r11d
	je	.L17
	testl	%r8d, %r12d
	je	.L17
	addq	-8(%r10,%r14,8), %rcx
	jmp	.L58
	.p2align 4,,10
	.p2align 3
.L17:
	addq	(%r10,%r14,8), %rcx
	jmp	.L58
.L63:
	movl	-96(%rbp), %edx
	testl	%edx, %edx
	jle	.L7
	movl	-92(%rbp), %eax
	leal	-2(%rax), %edi
	cmpl	$1, %eax
	jne	.L7
	movl	$1, %r9d
	jmp	.L30
.L62:
	orq	$0, -8(%rsp,%rax)
	jmp	.L4
.L64:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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>
#include<stdlib.h>

#define NEW(p,n){p=malloc((n)*sizeof(p[0]));if(p==NULL){printf("not enough memory\n");exit(1);};}
//pの型の変数n個の要素分のメモリを確保し、そのアドレスをpに代入するマクロ

#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))

#define N 1000000007

int main(void){
    int H,W,K;
    scanf("%d%d%d",&H,&W,&K);

    //ans[H][W]は、縦の長さがH,終点がWのあみだくじの本数
    long ans[H+1][W+1];
    //初期値のans[0]を格納
    ans[0][1]=1;
    for(int i=2;i<=W;i++) ans[0][i]=0;

    //DP表を更新する
    for(int i=1;i<=H;i++){
        for(int j=1;j<=W;j++){
            ans[i][j]=0;
            //ans[i][j]がどう変わるのかを考える
            for(int k=0;k<(1<<(W-1));k++){
                //amida...あみだくじとして成立するなら0,しないなら1
                int amida=0;
                for(int l=0;l<(W-2);l++){
                    if(k&(1<<l) && k&(1<<(l+1))) amida=1;
                }

                //あみだくじとして成立しないならスキップ
                if(amida) continue;

                //左にずれて来るのを受け入れる
                if(j<W && (k>>(j-1))&1) ans[i][j]=(ans[i][j]+ans[i-1][j+1])%N;
                //右にずれて来るのを受け入れる
                else if(j>1 && (k>>(j-2))&1) ans[i][j]=(ans[i][j]+ans[i-1][j-1])%N;
                //そのまま
                else ans[i][j]=(ans[i][j]+ans[i-1][j])%N;
            }
        }
    }
    
    printf("%ld\n",ans[H][K]);

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

#define NEW(p,n){p=malloc((n)*sizeof(p[0]));if(p==NULL){printf("not enough memory\n");exit(1);};}
//pの型の変数n個の要素分のメモリを確保し、そのアドレスをpに代入するマクロ

#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))

#define N 1000000007

int main(void){
    int H,W,K;
    scanf("%d%d%d",&H,&W,&K);

    //ans[H][W]は、縦の長さがH,終点がWのあみだくじの本数
    long ans[H+1][W+1];
    //初期値のans[0]を格納
    ans[0][1]=1;
    for(int i=2;i<=W;i++) ans[0][i]=0;

    //DP表を更新する
    for(int i=1;i<=H;i++){
        for(int j=1;j<=W;j++){
            ans[i][j]=0;
            //ans[i][j]がどう変わるのかを考える
            for(int k=0;k<(1<<(W-1));k++){
                //amida...あみだくじとして成立するなら0,しないなら1
                int amida=0;
                for(int l=0;l<(W-2);l++){
                    if(k&(1<<l) && k&(1<<(l+1))) amida=1;
                }

                //あみだくじとして成立しないならスキップ
                if(amida) continue;

                //左にずれて来るのを受け入れる
                if(j<W && (k>>(j-1))&1) ans[i][j]=(ans[i][j]+ans[i-1][j+1])%N;
                //右にずれて来るのを受け入れる
                else if(j>1 && (k>>(j-2))&1) ans[i][j]=(ans[i][j]+ans[i-1][j-1])%N;
                //そのまま
                else ans[i][j]=(ans[i][j]+ans[i-1][j])%N;
            }
        }
    }
    
    printf("%ld\n",ans[H][K]);

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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	-108(%rbp), %rcx
	leaq	-112(%rbp), %rdx
	leaq	-116(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-112(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-116(%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,8), %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,8), %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	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movq	-64(%rbp), %rax
	movq	$1, 8(%rax)
	movl	$2, -104(%rbp)
	jmp	.L5
.L6:
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movq	$0, (%rax,%rdx,8)
	addl	$1, -104(%rbp)
.L5:
	movl	-112(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jle	.L6
	movl	$1, -100(%rbp)
	jmp	.L7
.L19:
	movl	$1, -96(%rbp)
	jmp	.L8
.L18:
	movq	%rsi, %rcx
	shrq	$3, %rcx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movq	$0, (%rax,%rdx,8)
	movl	$0, -92(%rbp)
	jmp	.L9
.L17:
	movl	$0, -88(%rbp)
	movl	$0, -84(%rbp)
	jmp	.L10
.L12:
	movl	-84(%rbp), %eax
	movl	-92(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L11
	movl	-84(%rbp), %eax
	addl	$1, %eax
	movl	-92(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L11
	movl	$1, -88(%rbp)
.L11:
	addl	$1, -84(%rbp)
.L10:
	movl	-112(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -84(%rbp)
	jl	.L12
	cmpl	$0, -88(%rbp)
	jne	.L22
	movl	-112(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jge	.L15
	movl	-96(%rbp), %eax
	subl	$1, %eax
	movl	-92(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L15
	movq	%rsi, %rcx
	shrq	$3, %rcx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movq	(%rax,%rdx,8), %r8
	movq	%rsi, %rcx
	shrq	$3, %rcx
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-96(%rbp), %eax
	leal	1(%rax), %edi
	movq	-64(%rbp), %rax
	movslq	%edi, %rdi
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movq	(%rax,%rdx,8), %rax
	leaq	(%r8,%rax), %rcx
	movq	%rsi, %rdi
	shrq	$3, %rdi
	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	-64(%rbp), %rdx
	movl	-96(%rbp), %ecx
	movslq	%ecx, %r8
	movl	-100(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	addq	%r8, %rcx
	movq	%rax, (%rdx,%rcx,8)
	jmp	.L14
.L15:
	cmpl	$1, -96(%rbp)
	jle	.L16
	movl	-96(%rbp), %eax
	subl	$2, %eax
	movl	-92(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L16
	movq	%rsi, %rcx
	shrq	$3, %rcx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movq	(%rax,%rdx,8), %r8
	movq	%rsi, %rcx
	shrq	$3, %rcx
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-96(%rbp), %eax
	leal	-1(%rax), %edi
	movq	-64(%rbp), %rax
	movslq	%edi, %rdi
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movq	(%rax,%rdx,8), %rax
	leaq	(%r8,%rax), %rcx
	movq	%rsi, %rdi
	shrq	$3, %rdi
	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	-64(%rbp), %rdx
	movl	-96(%rbp), %ecx
	movslq	%ecx, %r8
	movl	-100(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	addq	%r8, %rcx
	movq	%rax, (%rdx,%rcx,8)
	jmp	.L14
.L16:
	movq	%rsi, %rcx
	shrq	$3, %rcx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movq	(%rax,%rdx,8), %r8
	movq	%rsi, %rcx
	shrq	$3, %rcx
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edi
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %r9
	movslq	%edi, %rdx
	imulq	%rcx, %rdx
	addq	%r9, %rdx
	movq	(%rax,%rdx,8), %rax
	leaq	(%r8,%rax), %rcx
	movq	%rsi, %rdi
	shrq	$3, %rdi
	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	-64(%rbp), %rdx
	movl	-96(%rbp), %ecx
	movslq	%ecx, %r8
	movl	-100(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	addq	%r8, %rcx
	movq	%rax, (%rdx,%rcx,8)
	jmp	.L14
.L22:
	nop
.L14:
	addl	$1, -92(%rbp)
.L9:
	movl	-112(%rbp), %eax
	subl	$1, %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cmpl	%eax, -92(%rbp)
	jl	.L17
	addl	$1, -96(%rbp)
.L8:
	movl	-112(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jle	.L18
	addl	$1, -100(%rbp)
.L7:
	movl	-116(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jle	.L19
	shrq	$3, %rsi
	movl	-116(%rbp), %edx
	movl	-108(%rbp), %ecx
	movq	-64(%rbp), %rax
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	imulq	%rsi, %rdx
	addq	%rcx, %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, %rsi
	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	.L21
	call	__stack_chk_fail@PLT
.L21:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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	-108(%rbp), %rcx
	leaq	-112(%rbp), %rdx
	leaq	-116(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-112(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-116(%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,8), %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,8), %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	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movq	-64(%rbp), %rax
	movq	$1, 8(%rax)
	movl	$2, -104(%rbp)
	jmp	.L5
.L6:
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movq	$0, (%rax,%rdx,8)
	addl	$1, -104(%rbp)
.L5:
	movl	-112(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jle	.L6
	movl	$1, -100(%rbp)
	jmp	.L7
.L19:
	movl	$1, -96(%rbp)
	jmp	.L8
.L18:
	movq	%rsi, %rcx
	shrq	$3, %rcx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movq	$0, (%rax,%rdx,8)
	movl	$0, -92(%rbp)
	jmp	.L9
.L17:
	movl	$0, -88(%rbp)
	movl	$0, -84(%rbp)
	jmp	.L10
.L12:
	movl	-84(%rbp), %eax
	movl	-92(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L11
	movl	-84(%rbp), %eax
	addl	$1, %eax
	movl	-92(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L11
	movl	$1, -88(%rbp)
.L11:
	addl	$1, -84(%rbp)
.L10:
	movl	-112(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -84(%rbp)
	jl	.L12
	cmpl	$0, -88(%rbp)
	jne	.L22
	movl	-112(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jge	.L15
	movl	-96(%rbp), %eax
	subl	$1, %eax
	movl	-92(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L15
	movq	%rsi, %rcx
	shrq	$3, %rcx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movq	(%rax,%rdx,8), %r8
	movq	%rsi, %rcx
	shrq	$3, %rcx
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-96(%rbp), %eax
	leal	1(%rax), %edi
	movq	-64(%rbp), %rax
	movslq	%edi, %rdi
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movq	(%rax,%rdx,8), %rax
	leaq	(%r8,%rax), %rcx
	movq	%rsi, %rdi
	shrq	$3, %rdi
	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	-64(%rbp), %rdx
	movl	-96(%rbp), %ecx
	movslq	%ecx, %r8
	movl	-100(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	addq	%r8, %rcx
	movq	%rax, (%rdx,%rcx,8)
	jmp	.L14
.L15:
	cmpl	$1, -96(%rbp)
	jle	.L16
	movl	-96(%rbp), %eax
	subl	$2, %eax
	movl	-92(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L16
	movq	%rsi, %rcx
	shrq	$3, %rcx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movq	(%rax,%rdx,8), %r8
	movq	%rsi, %rcx
	shrq	$3, %rcx
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-96(%rbp), %eax
	leal	-1(%rax), %edi
	movq	-64(%rbp), %rax
	movslq	%edi, %rdi
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movq	(%rax,%rdx,8), %rax
	leaq	(%r8,%rax), %rcx
	movq	%rsi, %rdi
	shrq	$3, %rdi
	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	-64(%rbp), %rdx
	movl	-96(%rbp), %ecx
	movslq	%ecx, %r8
	movl	-100(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	addq	%r8, %rcx
	movq	%rax, (%rdx,%rcx,8)
	jmp	.L14
.L16:
	movq	%rsi, %rcx
	shrq	$3, %rcx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movq	(%rax,%rdx,8), %r8
	movq	%rsi, %rcx
	shrq	$3, %rcx
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edi
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %r9
	movslq	%edi, %rdx
	imulq	%rcx, %rdx
	addq	%r9, %rdx
	movq	(%rax,%rdx,8), %rax
	leaq	(%r8,%rax), %rcx
	movq	%rsi, %rdi
	shrq	$3, %rdi
	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	-64(%rbp), %rdx
	movl	-96(%rbp), %ecx
	movslq	%ecx, %r8
	movl	-100(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	addq	%r8, %rcx
	movq	%rax, (%rdx,%rcx,8)
	jmp	.L14
.L22:
	nop
.L14:
	addl	$1, -92(%rbp)
.L9:
	movl	-112(%rbp), %eax
	subl	$1, %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cmpl	%eax, -92(%rbp)
	jl	.L17
	addl	$1, -96(%rbp)
.L8:
	movl	-112(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jle	.L18
	addl	$1, -100(%rbp)
.L7:
	movl	-116(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jle	.L19
	shrq	$3, %rsi
	movl	-116(%rbp), %edx
	movl	-108(%rbp), %ecx
	movq	-64(%rbp), %rax
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	imulq	%rsi, %rdx
	addq	%rcx, %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, %rsi
	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	.L21
	call	__stack_chk_fail@PLT
.L21:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
