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 w,h,i,j,m,d[51][51]={0};
  char c;
  for(i=0;i<51;i++)d[0][i]=d[i][0]=1000;
  scanf("%d %d",&h,&w);
  for(i=1;i<=h;i++){
    for(j=1;j<=w;j++){
      scanf(" %c",&c);
      d[i][j]=c-'0';
    }
  }
  for(j=1;j<h+w;j++){
    for(i=0;i<h;i++){
      if(j-i<0||w<=j-i)continue;
      m=d[i][j-i+1];
      if(m>d[i+1][j-i])m=d[i+1][j-i];
      d[i+1][j-i+1]+=m;
    }
  }
  /*for(i=0;i<h;i++){
    for(j=0;j<w;j++)printf("%2d ",d[i+1][j+1]);
    printf("\n");
    }*/
  printf("%d\n",d[h][w]);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	" %c"
.LC2:
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$2256, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-10416(%rbp), %rax
	movl	$10404, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -10428(%rbp)
	jmp	.L2
.L3:
	movl	-10428(%rbp), %eax
	cltq
	imulq	$204, %rax, %rax
	addq	%rbp, %rax
	subq	$10416, %rax
	movl	$1000, (%rax)
	movl	-10428(%rbp), %eax
	cltq
	imulq	$204, %rax, %rax
	addq	%rbp, %rax
	subq	$10416, %rax
	movl	(%rax), %edx
	movl	-10428(%rbp), %eax
	cltq
	movl	%edx, -10416(%rbp,%rax,4)
	addl	$1, -10428(%rbp)
.L2:
	cmpl	$50, -10428(%rbp)
	jle	.L3
	leaq	-10436(%rbp), %rdx
	leaq	-10432(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -10428(%rbp)
	jmp	.L4
.L7:
	movl	$1, -10424(%rbp)
	jmp	.L5
.L6:
	leaq	-10437(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-10437(%rbp), %eax
	movsbl	%al, %eax
	leal	-48(%rax), %ecx
	movl	-10424(%rbp), %eax
	movslq	%eax, %rsi
	movl	-10428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -10416(%rbp,%rax,4)
	addl	$1, -10424(%rbp)
.L5:
	movl	-10436(%rbp), %eax
	cmpl	%eax, -10424(%rbp)
	jle	.L6
	addl	$1, -10428(%rbp)
.L4:
	movl	-10432(%rbp), %eax
	cmpl	%eax, -10428(%rbp)
	jle	.L7
	movl	$1, -10424(%rbp)
	jmp	.L8
.L15:
	movl	$0, -10428(%rbp)
	jmp	.L9
.L14:
	movl	-10424(%rbp), %eax
	subl	-10428(%rbp), %eax
	testl	%eax, %eax
	js	.L18
	movl	-10424(%rbp), %eax
	subl	-10428(%rbp), %eax
	movl	%eax, %edx
	movl	-10436(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L18
	movl	-10424(%rbp), %eax
	subl	-10428(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movl	-10428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-10416(%rbp,%rax,4), %eax
	movl	%eax, -10420(%rbp)
	movl	-10428(%rbp), %eax
	leal	1(%rax), %edx
	movl	-10424(%rbp), %eax
	subl	-10428(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-10416(%rbp,%rax,4), %eax
	cmpl	%eax, -10420(%rbp)
	jle	.L13
	movl	-10428(%rbp), %eax
	leal	1(%rax), %edx
	movl	-10424(%rbp), %eax
	subl	-10428(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-10416(%rbp,%rax,4), %eax
	movl	%eax, -10420(%rbp)
.L13:
	movl	-10428(%rbp), %eax
	leal	1(%rax), %edx
	movl	-10424(%rbp), %eax
	subl	-10428(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-10416(%rbp,%rax,4), %esi
	movl	-10428(%rbp), %eax
	leal	1(%rax), %edx
	movl	-10424(%rbp), %eax
	subl	-10428(%rbp), %eax
	addl	$1, %eax
	movl	-10420(%rbp), %ecx
	addl	%esi, %ecx
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -10416(%rbp,%rax,4)
	jmp	.L12
.L18:
	nop
.L12:
	addl	$1, -10428(%rbp)
.L9:
	movl	-10432(%rbp), %eax
	cmpl	%eax, -10428(%rbp)
	jl	.L14
	addl	$1, -10424(%rbp)
.L8:
	movl	-10432(%rbp), %edx
	movl	-10436(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -10424(%rbp)
	jl	.L15
	movl	-10432(%rbp), %eax
	movl	-10436(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-10416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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"
.LC1:
	.string	" %c"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4144
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8240
	orq	$0, (%rsp)
	subq	$2240, %rsp
	.cfi_def_cfa_offset 10480
	movl	$10404, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 10424(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	movq	%rcx, %rdi
	call	memset@PLT
	leaq	10420(%rsp), %rcx
	movq	%rax, %rdx
	.p2align 4,,10
	.p2align 3
.L2:
	movl	$1000, (%rax)
	addq	$204, %rax
	addq	$4, %rdx
	movl	$1000, -4(%rdx)
	cmpq	%rcx, %rax
	jne	.L2
	leaq	.LC0(%rip), %rdi
	leaq	8(%rsp), %rdx
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %r10
	movslq	8(%rsp), %rdi
	testl	%r10d, %r10d
	jle	.L8
	leaq	220(%rsp), %rbp
	movl	$1, %r14d
	leaq	.LC1(%rip), %r13
	testl	%edi, %edi
	jle	.L25
	.p2align 4,,10
	.p2align 3
.L16:
	movl	$1, %ebx
	leaq	7(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r13, %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movsbl	7(%rsp), %eax
	movslq	8(%rsp), %rdi
	subl	$48, %eax
	movl	%eax, 0(%rbp,%rbx,4)
	addq	$1, %rbx
	cmpl	%ebx, %edi
	jge	.L5
	movslq	12(%rsp), %r10
	addl	$1, %r14d
	cmpl	%r14d, %r10d
	jl	.L26
	addq	$204, %rbp
	testl	%edi, %edi
	jg	.L16
.L25:
	leal	(%r10,%rdi), %ebp
	cmpl	$1, %ebp
	jle	.L8
.L14:
	leaq	20(%rsp), %rbx
	movl	$1, %r11d
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%r11d, %edx
	movq	%rbx, %r8
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	movslq	%eax, %rsi
	addl	$1, %eax
	cmpl	%edi, %edx
	jge	.L12
	testl	%edx, %edx
	js	.L12
	movslq	%eax, %rcx
	leaq	(%rsi,%rsi,2), %rsi
	leal	1(%rdx), %r9d
	leaq	(%rcx,%rcx,2), %rcx
	movslq	%r9d, %r9
	movq	%rcx, %r12
	salq	$4, %r12
	addq	%r12, %rcx
	movq	%rsi, %r12
	salq	$4, %r12
	addq	%r9, %rcx
	addq	%r12, %rsi
	addq	%r9, %rsi
	movl	204(%r8), %r9d
	movl	16(%rsp,%rsi,4), %esi
	cmpl	%esi, %r9d
	cmovg	%esi, %r9d
	addl	%r9d, 16(%rsp,%rcx,4)
.L12:
	subl	$1, %edx
	addq	$200, %r8
	cmpl	%r10d, %eax
	jne	.L13
	addl	$1, %r11d
	addq	$4, %rbx
	cmpl	%ebp, %r11d
	jne	.L11
.L8:
	leaq	(%r10,%r10,2), %rax
	leaq	.LC2(%rip), %rsi
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rdi, %rax
	movl	$1, %edi
	movl	16(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	10424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$10432, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L26:
	.cfi_restore_state
	leal	(%rdi,%r10), %ebp
	cmpl	$1, %ebp
	jle	.L8
	testl	%r10d, %r10d
	jg	.L14
	jmp	.L8
.L27:
	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"
.LC1:
	.string	" %c"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4144
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8240
	orq	$0, (%rsp)
	subq	$2240, %rsp
	.cfi_def_cfa_offset 10480
	movl	$10404, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 10424(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	movq	%rcx, %rdi
	call	memset@PLT
	leaq	10420(%rsp), %rcx
	movq	%rax, %rdx
	.p2align 4,,10
	.p2align 3
.L2:
	movl	$1000, (%rax)
	addq	$204, %rax
	addq	$4, %rdx
	movl	$1000, -4(%rdx)
	cmpq	%rcx, %rax
	jne	.L2
	leaq	.LC0(%rip), %rdi
	leaq	8(%rsp), %rdx
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %r10
	movslq	8(%rsp), %rdi
	testl	%r10d, %r10d
	jle	.L8
	leaq	220(%rsp), %rbp
	movl	$1, %r14d
	leaq	.LC1(%rip), %r13
	testl	%edi, %edi
	jle	.L25
	.p2align 4,,10
	.p2align 3
.L16:
	movl	$1, %ebx
	leaq	7(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r13, %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movsbl	7(%rsp), %eax
	movslq	8(%rsp), %rdi
	subl	$48, %eax
	movl	%eax, 0(%rbp,%rbx,4)
	addq	$1, %rbx
	cmpl	%ebx, %edi
	jge	.L5
	movslq	12(%rsp), %r10
	addl	$1, %r14d
	cmpl	%r14d, %r10d
	jl	.L26
	addq	$204, %rbp
	testl	%edi, %edi
	jg	.L16
.L25:
	leal	(%r10,%rdi), %ebp
	cmpl	$1, %ebp
	jle	.L8
.L14:
	leaq	20(%rsp), %rbx
	movl	$1, %r11d
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%r11d, %edx
	movq	%rbx, %r8
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	movslq	%eax, %rsi
	addl	$1, %eax
	cmpl	%edi, %edx
	jge	.L12
	testl	%edx, %edx
	js	.L12
	movslq	%eax, %rcx
	leaq	(%rsi,%rsi,2), %rsi
	leal	1(%rdx), %r9d
	leaq	(%rcx,%rcx,2), %rcx
	movslq	%r9d, %r9
	movq	%rcx, %r12
	salq	$4, %r12
	addq	%r12, %rcx
	movq	%rsi, %r12
	salq	$4, %r12
	addq	%r9, %rcx
	addq	%r12, %rsi
	addq	%r9, %rsi
	movl	204(%r8), %r9d
	movl	16(%rsp,%rsi,4), %esi
	cmpl	%esi, %r9d
	cmovg	%esi, %r9d
	addl	%r9d, 16(%rsp,%rcx,4)
.L12:
	subl	$1, %edx
	addq	$200, %r8
	cmpl	%r10d, %eax
	jne	.L13
	addl	$1, %r11d
	addq	$4, %rbx
	cmpl	%ebp, %r11d
	jne	.L11
.L8:
	leaq	(%r10,%r10,2), %rax
	leaq	.LC2(%rip), %rsi
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rdi, %rax
	movl	$1, %edi
	movl	16(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	10424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$10432, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L26:
	.cfi_restore_state
	leal	(%rdi,%r10), %ebp
	cmpl	$1, %ebp
	jle	.L8
	testl	%r10d, %r10d
	jg	.L14
	jmp	.L8
.L27:
	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 w,h,i,j,m,d[51][51]={0};
  char c;
  for(i=0;i<51;i++)d[0][i]=d[i][0]=1000;
  scanf("%d %d",&h,&w);
  for(i=1;i<=h;i++){
    for(j=1;j<=w;j++){
      scanf(" %c",&c);
      d[i][j]=c-'0';
    }
  }
  for(j=1;j<h+w;j++){
    for(i=0;i<h;i++){
      if(j-i<0||w<=j-i)continue;
      m=d[i][j-i+1];
      if(m>d[i+1][j-i])m=d[i+1][j-i];
      d[i+1][j-i+1]+=m;
    }
  }
  /*for(i=0;i<h;i++){
    for(j=0;j<w;j++)printf("%2d ",d[i+1][j+1]);
    printf("\n");
    }*/
  printf("%d\n",d[h][w]);
  return 0;
}
3 3
023
321
120

5

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 w,h,i,j,m,d[51][51]={0};
  char c;
  for(i=0;i<51;i++)d[0][i]=d[i][0]=1000;
  scanf("%d %d",&h,&w);
  for(i=1;i<=h;i++){
    for(j=1;j<=w;j++){
      scanf(" %c",&c);
      d[i][j]=c-'0';
    }
  }
  for(j=1;j<h+w;j++){
    for(i=0;i<h;i++){
      if(j-i<0||w<=j-i)continue;
      m=d[i][j-i+1];
      if(m>d[i+1][j-i])m=d[i+1][j-i];
      d[i+1][j-i+1]+=m;
    }
  }
  /*for(i=0;i<h;i++){
    for(j=0;j<w;j++)printf("%2d ",d[i+1][j+1]);
    printf("\n");
    }*/
  printf("%d\n",d[h][w]);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	" %c"
.LC2:
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$2256, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-10416(%rbp), %rax
	movl	$10404, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -10428(%rbp)
	jmp	.L2
.L3:
	movl	-10428(%rbp), %eax
	cltq
	imulq	$204, %rax, %rax
	addq	%rbp, %rax
	subq	$10416, %rax
	movl	$1000, (%rax)
	movl	-10428(%rbp), %eax
	cltq
	imulq	$204, %rax, %rax
	addq	%rbp, %rax
	subq	$10416, %rax
	movl	(%rax), %edx
	movl	-10428(%rbp), %eax
	cltq
	movl	%edx, -10416(%rbp,%rax,4)
	addl	$1, -10428(%rbp)
.L2:
	cmpl	$50, -10428(%rbp)
	jle	.L3
	leaq	-10436(%rbp), %rdx
	leaq	-10432(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -10428(%rbp)
	jmp	.L4
.L7:
	movl	$1, -10424(%rbp)
	jmp	.L5
.L6:
	leaq	-10437(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-10437(%rbp), %eax
	movsbl	%al, %eax
	leal	-48(%rax), %ecx
	movl	-10424(%rbp), %eax
	movslq	%eax, %rsi
	movl	-10428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -10416(%rbp,%rax,4)
	addl	$1, -10424(%rbp)
.L5:
	movl	-10436(%rbp), %eax
	cmpl	%eax, -10424(%rbp)
	jle	.L6
	addl	$1, -10428(%rbp)
.L4:
	movl	-10432(%rbp), %eax
	cmpl	%eax, -10428(%rbp)
	jle	.L7
	movl	$1, -10424(%rbp)
	jmp	.L8
.L15:
	movl	$0, -10428(%rbp)
	jmp	.L9
.L14:
	movl	-10424(%rbp), %eax
	subl	-10428(%rbp), %eax
	testl	%eax, %eax
	js	.L18
	movl	-10424(%rbp), %eax
	subl	-10428(%rbp), %eax
	movl	%eax, %edx
	movl	-10436(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L18
	movl	-10424(%rbp), %eax
	subl	-10428(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movl	-10428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-10416(%rbp,%rax,4), %eax
	movl	%eax, -10420(%rbp)
	movl	-10428(%rbp), %eax
	leal	1(%rax), %edx
	movl	-10424(%rbp), %eax
	subl	-10428(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-10416(%rbp,%rax,4), %eax
	cmpl	%eax, -10420(%rbp)
	jle	.L13
	movl	-10428(%rbp), %eax
	leal	1(%rax), %edx
	movl	-10424(%rbp), %eax
	subl	-10428(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-10416(%rbp,%rax,4), %eax
	movl	%eax, -10420(%rbp)
.L13:
	movl	-10428(%rbp), %eax
	leal	1(%rax), %edx
	movl	-10424(%rbp), %eax
	subl	-10428(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-10416(%rbp,%rax,4), %esi
	movl	-10428(%rbp), %eax
	leal	1(%rax), %edx
	movl	-10424(%rbp), %eax
	subl	-10428(%rbp), %eax
	addl	$1, %eax
	movl	-10420(%rbp), %ecx
	addl	%esi, %ecx
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -10416(%rbp,%rax,4)
	jmp	.L12
.L18:
	nop
.L12:
	addl	$1, -10428(%rbp)
.L9:
	movl	-10432(%rbp), %eax
	cmpl	%eax, -10428(%rbp)
	jl	.L14
	addl	$1, -10424(%rbp)
.L8:
	movl	-10432(%rbp), %edx
	movl	-10436(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -10424(%rbp)
	jl	.L15
	movl	-10432(%rbp), %eax
	movl	-10436(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-10416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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"
.LC1:
	.string	" %c"
.LC2:
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$2256, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-10416(%rbp), %rax
	movl	$10404, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -10428(%rbp)
	jmp	.L2
.L3:
	movl	-10428(%rbp), %eax
	cltq
	imulq	$204, %rax, %rax
	addq	%rbp, %rax
	subq	$10416, %rax
	movl	$1000, (%rax)
	movl	-10428(%rbp), %eax
	cltq
	imulq	$204, %rax, %rax
	addq	%rbp, %rax
	subq	$10416, %rax
	movl	(%rax), %edx
	movl	-10428(%rbp), %eax
	cltq
	movl	%edx, -10416(%rbp,%rax,4)
	addl	$1, -10428(%rbp)
.L2:
	cmpl	$50, -10428(%rbp)
	jle	.L3
	leaq	-10436(%rbp), %rdx
	leaq	-10432(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -10428(%rbp)
	jmp	.L4
.L7:
	movl	$1, -10424(%rbp)
	jmp	.L5
.L6:
	leaq	-10437(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-10437(%rbp), %eax
	movsbl	%al, %eax
	leal	-48(%rax), %ecx
	movl	-10424(%rbp), %eax
	movslq	%eax, %rsi
	movl	-10428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -10416(%rbp,%rax,4)
	addl	$1, -10424(%rbp)
.L5:
	movl	-10436(%rbp), %eax
	cmpl	%eax, -10424(%rbp)
	jle	.L6
	addl	$1, -10428(%rbp)
.L4:
	movl	-10432(%rbp), %eax
	cmpl	%eax, -10428(%rbp)
	jle	.L7
	movl	$1, -10424(%rbp)
	jmp	.L8
.L15:
	movl	$0, -10428(%rbp)
	jmp	.L9
.L14:
	movl	-10424(%rbp), %eax
	subl	-10428(%rbp), %eax
	testl	%eax, %eax
	js	.L18
	movl	-10424(%rbp), %eax
	subl	-10428(%rbp), %eax
	movl	%eax, %edx
	movl	-10436(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L18
	movl	-10424(%rbp), %eax
	subl	-10428(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movl	-10428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-10416(%rbp,%rax,4), %eax
	movl	%eax, -10420(%rbp)
	movl	-10428(%rbp), %eax
	leal	1(%rax), %edx
	movl	-10424(%rbp), %eax
	subl	-10428(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-10416(%rbp,%rax,4), %eax
	cmpl	%eax, -10420(%rbp)
	jle	.L13
	movl	-10428(%rbp), %eax
	leal	1(%rax), %edx
	movl	-10424(%rbp), %eax
	subl	-10428(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-10416(%rbp,%rax,4), %eax
	movl	%eax, -10420(%rbp)
.L13:
	movl	-10428(%rbp), %eax
	leal	1(%rax), %edx
	movl	-10424(%rbp), %eax
	subl	-10428(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-10416(%rbp,%rax,4), %esi
	movl	-10428(%rbp), %eax
	leal	1(%rax), %edx
	movl	-10424(%rbp), %eax
	subl	-10428(%rbp), %eax
	addl	$1, %eax
	movl	-10420(%rbp), %ecx
	addl	%esi, %ecx
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -10416(%rbp,%rax,4)
	jmp	.L12
.L18:
	nop
.L12:
	addl	$1, -10428(%rbp)
.L9:
	movl	-10432(%rbp), %eax
	cmpl	%eax, -10428(%rbp)
	jl	.L14
	addl	$1, -10424(%rbp)
.L8:
	movl	-10432(%rbp), %edx
	movl	-10436(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -10424(%rbp)
	jl	.L15
	movl	-10432(%rbp), %eax
	movl	-10436(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-10416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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:
