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>
int main(){
  int h,w,n,i,j,k,nk,M=1e9+7,d[110][10]={1};
  scanf("%d %d %d",&h,&w,&n);
  for(i=0;i<h;i++){
    for(j=0;j<(1<<(w-1));j++){
      for(k=0;k<w-1;k++){
	if((j&(1<<k))&&(j&(1<<(k+1))))goto NEXT;
      }
      //if(i==0)printf("%d\n",j);
      for(k=0;k<w;k++){
	nk=k;
	if(   j&(1<< k   ))nk=k+1;
	if(k&&j&(1<<(k-1)))nk=k-1;
	//printf("%d %d\n",nk,k);
	d[i+1][nk]=(d[i+1][nk]+d[i][k])%M;
      }
    NEXT:;
    }
  }
  /*for(i=0;i<=h;i++){
    for(j=0;j<w;j++)printf("%d ",d[i][j]);printf("\n");
    }
    printf("%d\n",n);//*/
  printf("%d\n",d[h][n-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
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$352, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1000000007, -4420(%rbp)
	leaq	-4416(%rbp), %rdx
	movl	$0, %eax
	movl	$550, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$1, -4416(%rbp)
	leaq	-4440(%rbp), %rcx
	leaq	-4444(%rbp), %rdx
	leaq	-4448(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4436(%rbp)
	jmp	.L2
.L13:
	movl	$0, -4432(%rbp)
	jmp	.L3
.L12:
	movl	$0, -4428(%rbp)
	jmp	.L4
.L7:
	movl	-4428(%rbp), %eax
	movl	-4432(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L5
	movl	-4428(%rbp), %eax
	addl	$1, %eax
	movl	-4432(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L16
.L5:
	addl	$1, -4428(%rbp)
.L4:
	movl	-4444(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -4428(%rbp)
	jl	.L7
	movl	$0, -4428(%rbp)
	jmp	.L8
.L11:
	movl	-4428(%rbp), %eax
	movl	%eax, -4424(%rbp)
	movl	-4428(%rbp), %eax
	movl	-4432(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L9
	movl	-4428(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -4424(%rbp)
.L9:
	cmpl	$0, -4428(%rbp)
	je	.L10
	movl	-4428(%rbp), %eax
	subl	$1, %eax
	movl	-4432(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L10
	movl	-4428(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -4424(%rbp)
.L10:
	movl	-4436(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4424(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-4416(%rbp,%rax,4), %ecx
	movl	-4428(%rbp), %eax
	movslq	%eax, %rsi
	movl	-4436(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-4416(%rbp,%rax,4), %eax
	addl	%ecx, %eax
	movl	-4436(%rbp), %edx
	leal	1(%rdx), %ecx
	cltd
	idivl	-4420(%rbp)
	movl	%edx, %esi
	movl	-4424(%rbp), %eax
	movslq	%eax, %rdi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	%esi, -4416(%rbp,%rax,4)
	addl	$1, -4428(%rbp)
.L8:
	movl	-4444(%rbp), %eax
	cmpl	%eax, -4428(%rbp)
	jl	.L11
	jmp	.L6
.L16:
	nop
.L6:
	addl	$1, -4432(%rbp)
.L3:
	movl	-4444(%rbp), %eax
	subl	$1, %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cmpl	%eax, -4432(%rbp)
	jl	.L12
	addl	$1, -4436(%rbp)
.L2:
	movl	-4448(%rbp), %eax
	cmpl	%eax, -4436(%rbp)
	jl	.L13
	movl	-4448(%rbp), %eax
	movl	-4440(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-4416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.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	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$360, %rsp
	.cfi_def_cfa_offset 4512
	movl	$550, %ecx
	movq	%fs:40, %rax
	movq	%rax, 4440(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rbx
	leaq	24(%rsp), %rdx
	movq	%rbx, %rdi
	leaq	20(%rsp), %rsi
	rep stosq
	leaq	28(%rsp), %rcx
	leaq	.LC0(%rip), %rdi
	movl	$1, 32(%rsp)
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L2
	movl	24(%rsp), %edi
	movl	$1, %ebp
	leal	-1(%rdi), %edx
	movl	%edx, %ecx
	sall	%cl, %ebp
	testl	%ebp, %ebp
	jle	.L2
	movq	%rbx, %r9
	xorl	%r14d, %r14d
	movl	$1, %esi
	xorl	%r12d, %r12d
	movl	$2, %r13d
.L4:
	addl	$1, %r14d
	xorl	%eax, %eax
	movslq	%r14d, %rcx
	leaq	(%rcx,%rcx,4), %r10
	addq	%r10, %r10
	.p2align 4,,10
	.p2align 3
.L6:
	testl	%edx, %edx
	jle	.L20
	movl	%eax, %ecx
	andl	$3, %ecx
	cmpl	$3, %ecx
	je	.L9
	xorl	%ecx, %ecx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L8:
	leal	2(%r8), %r11d
	movl	%esi, %r8d
	sall	%cl, %r8d
	btsl	%r11d, %r8d
	movl	%r8d, %r11d
	andl	%eax, %r11d
	cmpl	%r11d, %r8d
	je	.L9
.L5:
	movl	%ecx, %r8d
	addl	$1, %ecx
	cmpl	%edx, %ecx
	jne	.L8
.L20:
	testl	%edi, %edi
	jle	.L9
	movl	%eax, %r11d
	movl	(%r9), %r8d
	movl	%eax, %ebx
	andl	$1, %r11d
	andl	$1, %ebx
	addq	%r10, %r11
	addl	32(%rsp,%r11,4), %r8d
	movslq	%r8d, %rcx
	movl	%r8d, %r15d
	imulq	$1152921497, %rcx, %rcx
	sarl	$31, %r15d
	sarq	$60, %rcx
	subl	%r15d, %ecx
	imull	$1000000007, %ecx, %ecx
	subl	%ecx, %r8d
	movl	%r8d, 32(%rsp,%r11,4)
	cmpl	$1, %edi
	je	.L9
	movl	%eax, %r11d
	sarl	%r11d
	andl	$1, %r11d
	testl	%ebx, %ebx
	leal	1(%r11), %r8d
	cmovne	%r12d, %r8d
	movslq	%r8d, %r8
	addq	%r10, %r8
	movl	32(%rsp,%r8,4), %ebx
	addl	4(%r9), %ebx
	movslq	%ebx, %rcx
	movl	%ebx, %r15d
	imulq	$1152921497, %rcx, %rcx
	sarl	$31, %r15d
	sarq	$60, %rcx
	subl	%r15d, %ecx
	imull	$1000000007, %ecx, %ecx
	subl	%ecx, %ebx
	movl	%ebx, 32(%rsp,%r8,4)
	cmpl	$2, %edi
	je	.L9
	movl	%eax, %ebx
	sarl	$2, %ebx
	andl	$1, %ebx
	testl	%r11d, %r11d
	leal	2(%rbx), %r8d
	cmovne	%r11d, %r8d
	movl	8(%r9), %r11d
	movslq	%r8d, %r8
	addq	%r10, %r8
	addl	32(%rsp,%r8,4), %r11d
	movslq	%r11d, %rcx
	movl	%r11d, %r15d
	imulq	$1152921497, %rcx, %rcx
	sarl	$31, %r15d
	sarq	$60, %rcx
	subl	%r15d, %ecx
	imull	$1000000007, %ecx, %ecx
	subl	%ecx, %r11d
	movl	%r11d, 32(%rsp,%r8,4)
	cmpl	$3, %edi
	je	.L9
	movl	%eax, %r11d
	sarl	$3, %r11d
	andl	$1, %r11d
	testl	%ebx, %ebx
	movl	12(%r9), %ebx
	leal	3(%r11), %r8d
	cmovne	%r13d, %r8d
	movslq	%r8d, %r8
	addq	%r10, %r8
	addl	32(%rsp,%r8,4), %ebx
	movslq	%ebx, %rcx
	movl	%ebx, %r15d
	imulq	$1152921497, %rcx, %rcx
	sarl	$31, %r15d
	sarq	$60, %rcx
	subl	%r15d, %ecx
	imull	$1000000007, %ecx, %ecx
	subl	%ecx, %ebx
	movl	%ebx, 32(%rsp,%r8,4)
	cmpl	$4, %edi
	je	.L9
	movl	%eax, %ebx
	movl	$3, %ecx
	sarl	$4, %ebx
	andl	$1, %ebx
	testl	%r11d, %r11d
	movl	16(%r9), %r11d
	leal	4(%rbx), %r8d
	cmovne	%ecx, %r8d
	movslq	%r8d, %r8
	addq	%r10, %r8
	addl	32(%rsp,%r8,4), %r11d
	movslq	%r11d, %rcx
	movl	%r11d, %r15d
	imulq	$1152921497, %rcx, %rcx
	sarl	$31, %r15d
	sarq	$60, %rcx
	subl	%r15d, %ecx
	imull	$1000000007, %ecx, %ecx
	subl	%ecx, %r11d
	movl	%r11d, 32(%rsp,%r8,4)
	cmpl	$5, %edi
	je	.L9
	movl	%eax, %r11d
	sarl	$5, %r11d
	andl	$1, %r11d
	testl	%ebx, %ebx
	movl	$4, %ebx
	leal	5(%r11), %r8d
	cmovne	%ebx, %r8d
	movl	20(%r9), %ebx
	movslq	%r8d, %r8
	addq	%r10, %r8
	addl	32(%rsp,%r8,4), %ebx
	movslq	%ebx, %rcx
	movl	%ebx, %r15d
	imulq	$1152921497, %rcx, %rcx
	sarl	$31, %r15d
	sarq	$60, %rcx
	subl	%r15d, %ecx
	imull	$1000000007, %ecx, %ecx
	subl	%ecx, %ebx
	movl	%ebx, 32(%rsp,%r8,4)
	cmpl	$6, %edi
	je	.L9
	movl	%eax, %ebx
	movl	$5, %ecx
	sarl	$6, %ebx
	andl	$1, %ebx
	testl	%r11d, %r11d
	movl	24(%r9), %r11d
	leal	6(%rbx), %r8d
	cmovne	%ecx, %r8d
	movslq	%r8d, %r8
	addq	%r10, %r8
	addl	32(%rsp,%r8,4), %r11d
	movslq	%r11d, %rcx
	movl	%r11d, %r15d
	imulq	$1152921497, %rcx, %rcx
	sarl	$31, %r15d
	sarq	$60, %rcx
	subl	%r15d, %ecx
	imull	$1000000007, %ecx, %ecx
	subl	%ecx, %r11d
	movl	%r11d, 32(%rsp,%r8,4)
	cmpl	$7, %edi
	je	.L9
	movl	%eax, %r11d
	movl	$6, %ecx
	sarl	$7, %r11d
	andl	$1, %r11d
	testl	%ebx, %ebx
	movl	28(%r9), %ebx
	leal	7(%r11), %r8d
	cmovne	%ecx, %r8d
	movslq	%r8d, %r8
	addq	%r10, %r8
	addl	32(%rsp,%r8,4), %ebx
	movslq	%ebx, %rcx
	movl	%ebx, %r15d
	imulq	$1152921497, %rcx, %rcx
	sarl	$31, %r15d
	sarq	$60, %rcx
	subl	%r15d, %ecx
	imull	$1000000007, %ecx, %ecx
	subl	%ecx, %ebx
	movl	%ebx, 32(%rsp,%r8,4)
	cmpl	$8, %edi
	je	.L9
	movl	%eax, %ebx
	movl	$7, %ecx
	sarl	$8, %ebx
	andl	$1, %ebx
	testl	%r11d, %r11d
	movl	32(%r9), %r11d
	leal	8(%rbx), %r8d
	cmovne	%ecx, %r8d
	movslq	%r8d, %r8
	addq	%r10, %r8
	addl	32(%rsp,%r8,4), %r11d
	movslq	%r11d, %rcx
	movl	%r11d, %r15d
	imulq	$1152921497, %rcx, %rcx
	sarl	$31, %r15d
	sarq	$60, %rcx
	subl	%r15d, %ecx
	imull	$1000000007, %ecx, %ecx
	subl	%ecx, %r11d
	movl	%r11d, 32(%rsp,%r8,4)
	cmpl	$9, %edi
	je	.L9
	xorl	%ecx, %ecx
	testb	$2, %ah
	movl	$8, %r8d
	movl	36(%r9), %r11d
	setne	%cl
	addl	$9, %ecx
	testl	%ebx, %ebx
	cmovne	%r8d, %ecx
	movslq	%ecx, %rcx
	addq	%r10, %rcx
	addl	32(%rsp,%rcx,4), %r11d
	movslq	%r11d, %r8
	movl	%r11d, %ebx
	imulq	$1152921497, %r8, %r8
	sarl	$31, %ebx
	sarq	$60, %r8
	subl	%ebx, %r8d
	imull	$1000000007, %r8d, %r8d
	subl	%r8d, %r11d
	movl	%r11d, 32(%rsp,%rcx,4)
.L9:
	addl	$1, %eax
	cmpl	%ebp, %eax
	jne	.L6
	addq	$40, %r9
	cmpl	%r14d, 12(%rsp)
	jne	.L4
.L2:
	movl	28(%rsp), %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	leal	-1(%rax), %edx
	movslq	12(%rsp), %rax
	movslq	%edx, %rdx
	leaq	(%rax,%rax,4), %rax
	leaq	(%rdx,%rax,2), %rax
	movl	32(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	4440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L76
	addq	$4456, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L76:
	.cfi_restore_state
	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	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$360, %rsp
	.cfi_def_cfa_offset 4512
	movl	$550, %ecx
	movq	%fs:40, %rax
	movq	%rax, 4440(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rbx
	leaq	24(%rsp), %rdx
	movq	%rbx, %rdi
	leaq	20(%rsp), %rsi
	rep stosq
	leaq	28(%rsp), %rcx
	leaq	.LC0(%rip), %rdi
	movl	$1, 32(%rsp)
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L2
	movl	24(%rsp), %edi
	movl	$1, %ebp
	leal	-1(%rdi), %edx
	movl	%edx, %ecx
	sall	%cl, %ebp
	testl	%ebp, %ebp
	jle	.L2
	movq	%rbx, %r9
	xorl	%r14d, %r14d
	movl	$1, %esi
	xorl	%r12d, %r12d
	movl	$2, %r13d
.L4:
	addl	$1, %r14d
	xorl	%eax, %eax
	movslq	%r14d, %rcx
	leaq	(%rcx,%rcx,4), %r10
	addq	%r10, %r10
	.p2align 4,,10
	.p2align 3
.L6:
	testl	%edx, %edx
	jle	.L20
	movl	%eax, %ecx
	andl	$3, %ecx
	cmpl	$3, %ecx
	je	.L9
	xorl	%ecx, %ecx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L8:
	leal	2(%r8), %r11d
	movl	%esi, %r8d
	sall	%cl, %r8d
	btsl	%r11d, %r8d
	movl	%r8d, %r11d
	andl	%eax, %r11d
	cmpl	%r11d, %r8d
	je	.L9
.L5:
	movl	%ecx, %r8d
	addl	$1, %ecx
	cmpl	%edx, %ecx
	jne	.L8
.L20:
	testl	%edi, %edi
	jle	.L9
	movl	%eax, %r11d
	movl	(%r9), %r8d
	movl	%eax, %ebx
	andl	$1, %r11d
	andl	$1, %ebx
	addq	%r10, %r11
	addl	32(%rsp,%r11,4), %r8d
	movslq	%r8d, %rcx
	movl	%r8d, %r15d
	imulq	$1152921497, %rcx, %rcx
	sarl	$31, %r15d
	sarq	$60, %rcx
	subl	%r15d, %ecx
	imull	$1000000007, %ecx, %ecx
	subl	%ecx, %r8d
	movl	%r8d, 32(%rsp,%r11,4)
	cmpl	$1, %edi
	je	.L9
	movl	%eax, %r11d
	sarl	%r11d
	andl	$1, %r11d
	testl	%ebx, %ebx
	leal	1(%r11), %r8d
	cmovne	%r12d, %r8d
	movslq	%r8d, %r8
	addq	%r10, %r8
	movl	32(%rsp,%r8,4), %ebx
	addl	4(%r9), %ebx
	movslq	%ebx, %rcx
	movl	%ebx, %r15d
	imulq	$1152921497, %rcx, %rcx
	sarl	$31, %r15d
	sarq	$60, %rcx
	subl	%r15d, %ecx
	imull	$1000000007, %ecx, %ecx
	subl	%ecx, %ebx
	movl	%ebx, 32(%rsp,%r8,4)
	cmpl	$2, %edi
	je	.L9
	movl	%eax, %ebx
	sarl	$2, %ebx
	andl	$1, %ebx
	testl	%r11d, %r11d
	leal	2(%rbx), %r8d
	cmovne	%r11d, %r8d
	movl	8(%r9), %r11d
	movslq	%r8d, %r8
	addq	%r10, %r8
	addl	32(%rsp,%r8,4), %r11d
	movslq	%r11d, %rcx
	movl	%r11d, %r15d
	imulq	$1152921497, %rcx, %rcx
	sarl	$31, %r15d
	sarq	$60, %rcx
	subl	%r15d, %ecx
	imull	$1000000007, %ecx, %ecx
	subl	%ecx, %r11d
	movl	%r11d, 32(%rsp,%r8,4)
	cmpl	$3, %edi
	je	.L9
	movl	%eax, %r11d
	sarl	$3, %r11d
	andl	$1, %r11d
	testl	%ebx, %ebx
	movl	12(%r9), %ebx
	leal	3(%r11), %r8d
	cmovne	%r13d, %r8d
	movslq	%r8d, %r8
	addq	%r10, %r8
	addl	32(%rsp,%r8,4), %ebx
	movslq	%ebx, %rcx
	movl	%ebx, %r15d
	imulq	$1152921497, %rcx, %rcx
	sarl	$31, %r15d
	sarq	$60, %rcx
	subl	%r15d, %ecx
	imull	$1000000007, %ecx, %ecx
	subl	%ecx, %ebx
	movl	%ebx, 32(%rsp,%r8,4)
	cmpl	$4, %edi
	je	.L9
	movl	%eax, %ebx
	movl	$3, %ecx
	sarl	$4, %ebx
	andl	$1, %ebx
	testl	%r11d, %r11d
	movl	16(%r9), %r11d
	leal	4(%rbx), %r8d
	cmovne	%ecx, %r8d
	movslq	%r8d, %r8
	addq	%r10, %r8
	addl	32(%rsp,%r8,4), %r11d
	movslq	%r11d, %rcx
	movl	%r11d, %r15d
	imulq	$1152921497, %rcx, %rcx
	sarl	$31, %r15d
	sarq	$60, %rcx
	subl	%r15d, %ecx
	imull	$1000000007, %ecx, %ecx
	subl	%ecx, %r11d
	movl	%r11d, 32(%rsp,%r8,4)
	cmpl	$5, %edi
	je	.L9
	movl	%eax, %r11d
	sarl	$5, %r11d
	andl	$1, %r11d
	testl	%ebx, %ebx
	movl	$4, %ebx
	leal	5(%r11), %r8d
	cmovne	%ebx, %r8d
	movl	20(%r9), %ebx
	movslq	%r8d, %r8
	addq	%r10, %r8
	addl	32(%rsp,%r8,4), %ebx
	movslq	%ebx, %rcx
	movl	%ebx, %r15d
	imulq	$1152921497, %rcx, %rcx
	sarl	$31, %r15d
	sarq	$60, %rcx
	subl	%r15d, %ecx
	imull	$1000000007, %ecx, %ecx
	subl	%ecx, %ebx
	movl	%ebx, 32(%rsp,%r8,4)
	cmpl	$6, %edi
	je	.L9
	movl	%eax, %ebx
	movl	$5, %ecx
	sarl	$6, %ebx
	andl	$1, %ebx
	testl	%r11d, %r11d
	movl	24(%r9), %r11d
	leal	6(%rbx), %r8d
	cmovne	%ecx, %r8d
	movslq	%r8d, %r8
	addq	%r10, %r8
	addl	32(%rsp,%r8,4), %r11d
	movslq	%r11d, %rcx
	movl	%r11d, %r15d
	imulq	$1152921497, %rcx, %rcx
	sarl	$31, %r15d
	sarq	$60, %rcx
	subl	%r15d, %ecx
	imull	$1000000007, %ecx, %ecx
	subl	%ecx, %r11d
	movl	%r11d, 32(%rsp,%r8,4)
	cmpl	$7, %edi
	je	.L9
	movl	%eax, %r11d
	movl	$6, %ecx
	sarl	$7, %r11d
	andl	$1, %r11d
	testl	%ebx, %ebx
	movl	28(%r9), %ebx
	leal	7(%r11), %r8d
	cmovne	%ecx, %r8d
	movslq	%r8d, %r8
	addq	%r10, %r8
	addl	32(%rsp,%r8,4), %ebx
	movslq	%ebx, %rcx
	movl	%ebx, %r15d
	imulq	$1152921497, %rcx, %rcx
	sarl	$31, %r15d
	sarq	$60, %rcx
	subl	%r15d, %ecx
	imull	$1000000007, %ecx, %ecx
	subl	%ecx, %ebx
	movl	%ebx, 32(%rsp,%r8,4)
	cmpl	$8, %edi
	je	.L9
	movl	%eax, %ebx
	movl	$7, %ecx
	sarl	$8, %ebx
	andl	$1, %ebx
	testl	%r11d, %r11d
	movl	32(%r9), %r11d
	leal	8(%rbx), %r8d
	cmovne	%ecx, %r8d
	movslq	%r8d, %r8
	addq	%r10, %r8
	addl	32(%rsp,%r8,4), %r11d
	movslq	%r11d, %rcx
	movl	%r11d, %r15d
	imulq	$1152921497, %rcx, %rcx
	sarl	$31, %r15d
	sarq	$60, %rcx
	subl	%r15d, %ecx
	imull	$1000000007, %ecx, %ecx
	subl	%ecx, %r11d
	movl	%r11d, 32(%rsp,%r8,4)
	cmpl	$9, %edi
	je	.L9
	xorl	%ecx, %ecx
	testb	$2, %ah
	movl	$8, %r8d
	movl	36(%r9), %r11d
	setne	%cl
	addl	$9, %ecx
	testl	%ebx, %ebx
	cmovne	%r8d, %ecx
	movslq	%ecx, %rcx
	addq	%r10, %rcx
	addl	32(%rsp,%rcx,4), %r11d
	movslq	%r11d, %r8
	movl	%r11d, %ebx
	imulq	$1152921497, %r8, %r8
	sarl	$31, %ebx
	sarq	$60, %r8
	subl	%ebx, %r8d
	imull	$1000000007, %r8d, %r8d
	subl	%r8d, %r11d
	movl	%r11d, 32(%rsp,%rcx,4)
.L9:
	addl	$1, %eax
	cmpl	%ebp, %eax
	jne	.L6
	addq	$40, %r9
	cmpl	%r14d, 12(%rsp)
	jne	.L4
.L2:
	movl	28(%rsp), %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	leal	-1(%rax), %edx
	movslq	12(%rsp), %rax
	movslq	%edx, %rdx
	leaq	(%rax,%rax,4), %rax
	leaq	(%rdx,%rax,2), %rax
	movl	32(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	4440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L76
	addq	$4456, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L76:
	.cfi_restore_state
	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>
int main(){
  int h,w,n,i,j,k,nk,M=1e9+7,d[110][10]={1};
  scanf("%d %d %d",&h,&w,&n);
  for(i=0;i<h;i++){
    for(j=0;j<(1<<(w-1));j++){
      for(k=0;k<w-1;k++){
	if((j&(1<<k))&&(j&(1<<(k+1))))goto NEXT;
      }
      //if(i==0)printf("%d\n",j);
      for(k=0;k<w;k++){
	nk=k;
	if(   j&(1<< k   ))nk=k+1;
	if(k&&j&(1<<(k-1)))nk=k-1;
	//printf("%d %d\n",nk,k);
	d[i+1][nk]=(d[i+1][nk]+d[i][k])%M;
      }
    NEXT:;
    }
  }
  /*for(i=0;i<=h;i++){
    for(j=0;j<w;j++)printf("%d ",d[i][j]);printf("\n");
    }
    printf("%d\n",n);//*/
  printf("%d\n",d[h][n-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>
int main(){
  int h,w,n,i,j,k,nk,M=1e9+7,d[110][10]={1};
  scanf("%d %d %d",&h,&w,&n);
  for(i=0;i<h;i++){
    for(j=0;j<(1<<(w-1));j++){
      for(k=0;k<w-1;k++){
	if((j&(1<<k))&&(j&(1<<(k+1))))goto NEXT;
      }
      //if(i==0)printf("%d\n",j);
      for(k=0;k<w;k++){
	nk=k;
	if(   j&(1<< k   ))nk=k+1;
	if(k&&j&(1<<(k-1)))nk=k-1;
	//printf("%d %d\n",nk,k);
	d[i+1][nk]=(d[i+1][nk]+d[i][k])%M;
      }
    NEXT:;
    }
  }
  /*for(i=0;i<=h;i++){
    for(j=0;j<w;j++)printf("%d ",d[i][j]);printf("\n");
    }
    printf("%d\n",n);//*/
  printf("%d\n",d[h][n-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
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$352, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1000000007, -4420(%rbp)
	leaq	-4416(%rbp), %rdx
	movl	$0, %eax
	movl	$550, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$1, -4416(%rbp)
	leaq	-4440(%rbp), %rcx
	leaq	-4444(%rbp), %rdx
	leaq	-4448(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4436(%rbp)
	jmp	.L2
.L13:
	movl	$0, -4432(%rbp)
	jmp	.L3
.L12:
	movl	$0, -4428(%rbp)
	jmp	.L4
.L7:
	movl	-4428(%rbp), %eax
	movl	-4432(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L5
	movl	-4428(%rbp), %eax
	addl	$1, %eax
	movl	-4432(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L16
.L5:
	addl	$1, -4428(%rbp)
.L4:
	movl	-4444(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -4428(%rbp)
	jl	.L7
	movl	$0, -4428(%rbp)
	jmp	.L8
.L11:
	movl	-4428(%rbp), %eax
	movl	%eax, -4424(%rbp)
	movl	-4428(%rbp), %eax
	movl	-4432(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L9
	movl	-4428(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -4424(%rbp)
.L9:
	cmpl	$0, -4428(%rbp)
	je	.L10
	movl	-4428(%rbp), %eax
	subl	$1, %eax
	movl	-4432(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L10
	movl	-4428(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -4424(%rbp)
.L10:
	movl	-4436(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4424(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-4416(%rbp,%rax,4), %ecx
	movl	-4428(%rbp), %eax
	movslq	%eax, %rsi
	movl	-4436(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-4416(%rbp,%rax,4), %eax
	addl	%ecx, %eax
	movl	-4436(%rbp), %edx
	leal	1(%rdx), %ecx
	cltd
	idivl	-4420(%rbp)
	movl	%edx, %esi
	movl	-4424(%rbp), %eax
	movslq	%eax, %rdi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	%esi, -4416(%rbp,%rax,4)
	addl	$1, -4428(%rbp)
.L8:
	movl	-4444(%rbp), %eax
	cmpl	%eax, -4428(%rbp)
	jl	.L11
	jmp	.L6
.L16:
	nop
.L6:
	addl	$1, -4432(%rbp)
.L3:
	movl	-4444(%rbp), %eax
	subl	$1, %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cmpl	%eax, -4432(%rbp)
	jl	.L12
	addl	$1, -4436(%rbp)
.L2:
	movl	-4448(%rbp), %eax
	cmpl	%eax, -4436(%rbp)
	jl	.L13
	movl	-4448(%rbp), %eax
	movl	-4440(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-4416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.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
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$352, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1000000007, -4420(%rbp)
	leaq	-4416(%rbp), %rdx
	movl	$0, %eax
	movl	$550, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$1, -4416(%rbp)
	leaq	-4440(%rbp), %rcx
	leaq	-4444(%rbp), %rdx
	leaq	-4448(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4436(%rbp)
	jmp	.L2
.L13:
	movl	$0, -4432(%rbp)
	jmp	.L3
.L12:
	movl	$0, -4428(%rbp)
	jmp	.L4
.L7:
	movl	-4428(%rbp), %eax
	movl	-4432(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L5
	movl	-4428(%rbp), %eax
	addl	$1, %eax
	movl	-4432(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L16
.L5:
	addl	$1, -4428(%rbp)
.L4:
	movl	-4444(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -4428(%rbp)
	jl	.L7
	movl	$0, -4428(%rbp)
	jmp	.L8
.L11:
	movl	-4428(%rbp), %eax
	movl	%eax, -4424(%rbp)
	movl	-4428(%rbp), %eax
	movl	-4432(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L9
	movl	-4428(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -4424(%rbp)
.L9:
	cmpl	$0, -4428(%rbp)
	je	.L10
	movl	-4428(%rbp), %eax
	subl	$1, %eax
	movl	-4432(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L10
	movl	-4428(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -4424(%rbp)
.L10:
	movl	-4436(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4424(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-4416(%rbp,%rax,4), %ecx
	movl	-4428(%rbp), %eax
	movslq	%eax, %rsi
	movl	-4436(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-4416(%rbp,%rax,4), %eax
	addl	%ecx, %eax
	movl	-4436(%rbp), %edx
	leal	1(%rdx), %ecx
	cltd
	idivl	-4420(%rbp)
	movl	%edx, %esi
	movl	-4424(%rbp), %eax
	movslq	%eax, %rdi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	%esi, -4416(%rbp,%rax,4)
	addl	$1, -4428(%rbp)
.L8:
	movl	-4444(%rbp), %eax
	cmpl	%eax, -4428(%rbp)
	jl	.L11
	jmp	.L6
.L16:
	nop
.L6:
	addl	$1, -4432(%rbp)
.L3:
	movl	-4444(%rbp), %eax
	subl	$1, %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cmpl	%eax, -4432(%rbp)
	jl	.L12
	addl	$1, -4436(%rbp)
.L2:
	movl	-4448(%rbp), %eax
	cmpl	%eax, -4436(%rbp)
	jl	.L13
	movl	-4448(%rbp), %eax
	movl	-4440(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-4416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.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:
