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;
  scanf("%d%d",&H,&W);
  char S[H+2][W+2];
  for (int i = 0; i < H+2; i++){
    for (int j = 0; j < W+2; j++){
      S[i][j]=0;
    }
  }
  for (int i = 1; i < H+1; i++){
    getchar();
    for (int j = 1; j < W+1; j++){
      scanf("%c[^\n]",&S[i][j]);
    }
  }
  
  for (int i = 1; i<H+1; i++){
    for (int j = 1; j<W+1; j++){
      if (S[i][j]=='#')
      {
        for (int a = 0; a < 3; a++){
          for (int b = 0; b < 3; b++){
            if (S[a+i-1][b+j-1]=='.')
            {
              S[a+i-1][b+j-1]=49;
            }else if (S[a+i-1][b+j-1]>=49)
            {
              S[a+i-1][b+j-1]++;
            }
          }
        }
      }
    }
  }

  for (int i = 1; i < H+1; i++){
    for (int j = 1; j < W+1; j++){
      if (S[i][j]=='.')
      {
        printf("%c",'0');
      }else
      {
        printf("%c",S[i][j]);
      }
    }
    printf("\n");
  }

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%c[^\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	$152, %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, -184(%rbp)
	leaq	-124(%rbp), %rdx
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-124(%rbp), %eax
	leal	2(%rax), %ecx
	movl	-128(%rbp), %eax
	leal	2(%rax), %esi
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -80(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movslq	%ecx, %rbx
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -72(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%esi, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movq	-144(%rbp), %r8
	movq	-136(%rbp), %r9
	movq	%r9, %rdx
	movq	-160(%rbp), %r10
	movq	-152(%rbp), %r11
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r8, %rax
	mulq	%r10
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movslq	%ecx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movslq	%esi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%r15, %rdx
	imulq	%r12, %rdx
	movq	%r13, %rax
	imulq	%r14, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r14, %rax
	mulq	%r12
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movslq	%ecx, %rdx
	movslq	%esi, %rax
	imulq	%rdx, %rax
	movl	$16, %edx
	subq	$1, %rdx
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	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	$0, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -120(%rbp)
	jmp	.L5
.L8:
	movl	$0, -116(%rbp)
	jmp	.L6
.L7:
	movq	-64(%rbp), %rcx
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	movl	-120(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movb	$0, (%rax)
	addl	$1, -116(%rbp)
.L6:
	movl	-124(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -116(%rbp)
	jle	.L7
	addl	$1, -120(%rbp)
.L5:
	movl	-128(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -120(%rbp)
	jle	.L8
	movl	$1, -112(%rbp)
	jmp	.L9
.L12:
	call	getchar@PLT
	movl	$1, -108(%rbp)
	jmp	.L10
.L11:
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	movl	-112(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rax, %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -108(%rbp)
.L10:
	movl	-124(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jle	.L11
	addl	$1, -112(%rbp)
.L9:
	movl	-128(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jle	.L12
	movl	$1, -104(%rbp)
	jmp	.L13
.L23:
	movl	$1, -100(%rbp)
	jmp	.L14
.L22:
	movq	-64(%rbp), %rcx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movl	-104(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$35, %al
	jne	.L15
	movl	$0, -96(%rbp)
	jmp	.L16
.L21:
	movl	$0, -92(%rbp)
	jmp	.L17
.L20:
	movl	-96(%rbp), %edx
	movl	-104(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	-92(%rbp), %ecx
	movl	-100(%rbp), %edx
	addl	%ecx, %edx
	subl	$1, %edx
	movq	-64(%rbp), %rcx
	movslq	%edx, %rdx
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L18
	movl	-96(%rbp), %edx
	movl	-104(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	-92(%rbp), %ecx
	movl	-100(%rbp), %edx
	addl	%ecx, %edx
	subl	$1, %edx
	movq	-64(%rbp), %rcx
	movslq	%edx, %rdx
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movb	$49, (%rax)
	jmp	.L19
.L18:
	movl	-96(%rbp), %edx
	movl	-104(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	-92(%rbp), %ecx
	movl	-100(%rbp), %edx
	addl	%ecx, %edx
	subl	$1, %edx
	movq	-64(%rbp), %rcx
	movslq	%edx, %rdx
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$48, %al
	jle	.L19
	movl	-96(%rbp), %edx
	movl	-104(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	-92(%rbp), %ecx
	movl	-100(%rbp), %edx
	addl	%ecx, %edx
	subl	$1, %edx
	movq	-64(%rbp), %rdi
	movslq	%edx, %rsi
	movslq	%eax, %rcx
	imulq	%rbx, %rcx
	addq	%rdi, %rsi
	addq	%rsi, %rcx
	movzbl	(%rcx), %ecx
	addl	$1, %ecx
	movq	-64(%rbp), %rsi
	movslq	%edx, %rdx
	cltq
	imulq	%rbx, %rax
	addq	%rsi, %rdx
	addq	%rdx, %rax
	movb	%cl, (%rax)
.L19:
	addl	$1, -92(%rbp)
.L17:
	cmpl	$2, -92(%rbp)
	jle	.L20
	addl	$1, -96(%rbp)
.L16:
	cmpl	$2, -96(%rbp)
	jle	.L21
.L15:
	addl	$1, -100(%rbp)
.L14:
	movl	-124(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jle	.L22
	addl	$1, -104(%rbp)
.L13:
	movl	-128(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jle	.L23
	movl	$1, -88(%rbp)
	jmp	.L24
.L29:
	movl	$1, -84(%rbp)
	jmp	.L25
.L28:
	movq	-64(%rbp), %rcx
	movl	-84(%rbp), %eax
	movslq	%eax, %rdx
	movl	-88(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L26
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L27
.L26:
	movq	-64(%rbp), %rcx
	movl	-84(%rbp), %eax
	movslq	%eax, %rdx
	movl	-88(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
.L27:
	addl	$1, -84(%rbp)
.L25:
	movl	-124(%rbp), %eax
	cmpl	%eax, -84(%rbp)
	jle	.L28
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -88(%rbp)
.L24:
	movl	-128(%rbp), %eax
	cmpl	%eax, -88(%rbp)
	jle	.L29
	movl	$0, %eax
	movq	-184(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	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"
.LC1:
	.string	"%c[^\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), %rdx
	leaq	-64(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %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	-60(%rbp), %edx
	movl	-64(%rbp), %r14d
	movq	%rsp, %rsi
	leal	2(%r14), %r12d
	leal	2(%rdx), %r13d
	movslq	%r13d, %r13
	movslq	%r12d, %rax
	imulq	%r13, %rax
	addq	$15, %rax
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L3
.L54:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L54
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L55
.L4:
	movq	%rsp, -80(%rbp)
	cmpl	$-1, %r14d
	jl	.L5
	addl	$1, %edx
	js	.L5
	movslq	%edx, %rdx
	movq	%rsp, %rcx
	xorl	%r15d, %r15d
	leaq	1(%rdx), %rbx
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rcx, %rdi
	movq	%rbx, %rdx
	xorl	%esi, %esi
	addl	$1, %r15d
	call	memset@PLT
	movq	%rax, %rcx
	addq	%r13, %rcx
	cmpl	%r15d, %r12d
	jne	.L7
.L5:
	testl	%r14d, %r14d
	jle	.L40
	movq	-80(%rbp), %rax
	movl	$1, -68(%rbp)
	leaq	.LC1(%rip), %r12
	leaq	1(%rax,%r13), %rax
	movq	%rax, -88(%rbp)
	movq	%rax, %r14
	.p2align 4,,10
	.p2align 3
.L11:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	movl	-60(%rbp), %esi
	testl	%esi, %esi
	jle	.L9
	movl	$1, %ebx
	movq	%r14, %r15
	subl	%r14d, %ebx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%r15, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$1, %r15
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %esi
	leal	(%rbx,%r15), %eax
	cmpl	%eax, %esi
	jge	.L10
.L9:
	addl	$1, -68(%rbp)
	movl	-64(%rbp), %r10d
	addq	%r13, %r14
	movl	-68(%rbp), %eax
	cmpl	%eax, %r10d
	jge	.L11
	testl	%r10d, %r10d
	jle	.L40
	testl	%esi, %esi
	jle	.L12
	movq	-80(%rbp), %r9
	leal	-1(%rsi), %edi
	addl	$1, %r10d
	addq	-88(%rbp), %rdi
	leaq	(%r13,%r13), %rbx
	movl	$1, %r11d
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r9, %rdx
	addq	%r13, %r9
	addl	$1, %r11d
	leaq	(%rdx,%rbx), %rcx
	movq	%r9, %rax
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L15:
	addq	$1, %rax
	addq	$1, %rcx
	addq	$1, %rdx
	cmpq	%rax, %rdi
	je	.L56
.L34:
	cmpb	$35, 1(%rax)
	jne	.L15
	movzbl	(%rdx), %r8d
	cmpb	$46, %r8b
	je	.L16
	cmpb	$48, %r8b
	jle	.L17
	addl	$1, %r8d
	movb	%r8b, (%rdx)
.L17:
	movzbl	1(%rdx), %r8d
	cmpb	$46, %r8b
	je	.L18
.L59:
	cmpb	$48, %r8b
	jle	.L19
	addl	$1, %r8d
	movb	%r8b, 1(%rdx)
.L19:
	movzbl	2(%rdx), %r8d
	cmpb	$46, %r8b
	je	.L20
.L60:
	cmpb	$48, %r8b
	jle	.L21
	addl	$1, %r8d
	movb	%r8b, 2(%rdx)
.L21:
	movzbl	(%rax), %r8d
	cmpb	$46, %r8b
	je	.L22
	cmpb	$48, %r8b
	jle	.L23
	addl	$1, %r8d
	movb	%r8b, (%rax)
.L23:
	movzbl	1(%rax), %r8d
	cmpb	$46, %r8b
	je	.L24
	cmpb	$48, %r8b
	jle	.L25
	addl	$1, %r8d
	movb	%r8b, 1(%rax)
.L25:
	movzbl	2(%rax), %r8d
	cmpb	$46, %r8b
	je	.L26
	cmpb	$48, %r8b
	jle	.L27
	addl	$1, %r8d
	movb	%r8b, 2(%rax)
.L27:
	movzbl	(%rcx), %r8d
	cmpb	$46, %r8b
	je	.L28
	cmpb	$48, %r8b
	jle	.L29
	addl	$1, %r8d
	movb	%r8b, (%rcx)
.L29:
	movzbl	1(%rcx), %r8d
	cmpb	$46, %r8b
	je	.L30
	cmpb	$48, %r8b
	jle	.L31
	addl	$1, %r8d
	movb	%r8b, 1(%rcx)
.L31:
	movzbl	2(%rcx), %r8d
	cmpb	$46, %r8b
	je	.L32
.L58:
	cmpb	$48, %r8b
	jle	.L15
	addl	$1, %r8d
	movb	%r8b, 2(%rcx)
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L56:
	addq	%r13, %rdi
	cmpl	%r10d, %r11d
	jne	.L13
.L12:
	movq	-80(%rbp), %r12
	movl	$1, %r14d
	addq	%r13, %r12
	.p2align 4,,10
	.p2align 3
.L35:
	movl	$1, %ebx
	testl	%esi, %esi
	jle	.L38
	.p2align 4,,10
	.p2align 3
.L39:
	movsbl	(%r12,%rbx), %edi
	cmpb	$46, %dil
	je	.L57
	call	putchar@PLT
	addq	$1, %rbx
	cmpl	%ebx, -60(%rbp)
	jge	.L39
.L38:
	movl	$10, %edi
	addl	$1, %r14d
	addq	%r13, %r12
	call	putchar@PLT
	cmpl	%r14d, -64(%rbp)
	jl	.L40
	movl	-60(%rbp), %esi
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L57:
	movl	$48, %edi
	addq	$1, %rbx
	call	putchar@PLT
	cmpl	%ebx, -60(%rbp)
	jge	.L39
	jmp	.L38
	.p2align 4,,10
	.p2align 3
.L30:
	movzbl	2(%rcx), %r8d
	movb	$49, 1(%rcx)
	cmpb	$46, %r8b
	jne	.L58
.L32:
	movb	$49, 2(%rcx)
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L28:
	movb	$49, (%rcx)
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L26:
	movb	$49, 2(%rax)
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L24:
	movb	$49, 1(%rax)
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L22:
	movb	$49, (%rax)
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L16:
	movzbl	1(%rdx), %r8d
	movb	$49, (%rdx)
	cmpb	$46, %r8b
	jne	.L59
.L18:
	movzbl	2(%rdx), %r8d
	movb	$49, 1(%rdx)
	cmpb	$46, %r8b
	jne	.L60
.L20:
	movb	$49, 2(%rdx)
	jmp	.L21
.L40:
	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
.L55:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.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"
.LC1:
	.string	"%c[^\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), %rdx
	leaq	-64(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %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	-60(%rbp), %edx
	movl	-64(%rbp), %r14d
	movq	%rsp, %rsi
	leal	2(%r14), %r12d
	leal	2(%rdx), %r13d
	movslq	%r13d, %r13
	movslq	%r12d, %rax
	imulq	%r13, %rax
	addq	$15, %rax
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L3
.L54:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L54
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L55
.L4:
	movq	%rsp, -80(%rbp)
	cmpl	$-1, %r14d
	jl	.L5
	addl	$1, %edx
	js	.L5
	movslq	%edx, %rdx
	movq	%rsp, %rcx
	xorl	%r15d, %r15d
	leaq	1(%rdx), %rbx
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rcx, %rdi
	movq	%rbx, %rdx
	xorl	%esi, %esi
	addl	$1, %r15d
	call	memset@PLT
	movq	%rax, %rcx
	addq	%r13, %rcx
	cmpl	%r15d, %r12d
	jne	.L7
.L5:
	testl	%r14d, %r14d
	jle	.L40
	movq	-80(%rbp), %rax
	movl	$1, -68(%rbp)
	leaq	.LC1(%rip), %r12
	leaq	1(%rax,%r13), %rax
	movq	%rax, -88(%rbp)
	movq	%rax, %r14
	.p2align 4,,10
	.p2align 3
.L11:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	movl	-60(%rbp), %esi
	testl	%esi, %esi
	jle	.L9
	movl	$1, %ebx
	movq	%r14, %r15
	subl	%r14d, %ebx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%r15, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$1, %r15
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %esi
	leal	(%rbx,%r15), %eax
	cmpl	%eax, %esi
	jge	.L10
.L9:
	addl	$1, -68(%rbp)
	movl	-64(%rbp), %r10d
	addq	%r13, %r14
	movl	-68(%rbp), %eax
	cmpl	%eax, %r10d
	jge	.L11
	testl	%r10d, %r10d
	jle	.L40
	testl	%esi, %esi
	jle	.L12
	movq	-80(%rbp), %r9
	leal	-1(%rsi), %edi
	addl	$1, %r10d
	addq	-88(%rbp), %rdi
	leaq	(%r13,%r13), %rbx
	movl	$1, %r11d
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r9, %rdx
	addq	%r13, %r9
	addl	$1, %r11d
	leaq	(%rdx,%rbx), %rcx
	movq	%r9, %rax
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L15:
	addq	$1, %rax
	addq	$1, %rcx
	addq	$1, %rdx
	cmpq	%rax, %rdi
	je	.L56
.L34:
	cmpb	$35, 1(%rax)
	jne	.L15
	movzbl	(%rdx), %r8d
	cmpb	$46, %r8b
	je	.L16
	cmpb	$48, %r8b
	jle	.L17
	addl	$1, %r8d
	movb	%r8b, (%rdx)
.L17:
	movzbl	1(%rdx), %r8d
	cmpb	$46, %r8b
	je	.L18
.L59:
	cmpb	$48, %r8b
	jle	.L19
	addl	$1, %r8d
	movb	%r8b, 1(%rdx)
.L19:
	movzbl	2(%rdx), %r8d
	cmpb	$46, %r8b
	je	.L20
.L60:
	cmpb	$48, %r8b
	jle	.L21
	addl	$1, %r8d
	movb	%r8b, 2(%rdx)
.L21:
	movzbl	(%rax), %r8d
	cmpb	$46, %r8b
	je	.L22
	cmpb	$48, %r8b
	jle	.L23
	addl	$1, %r8d
	movb	%r8b, (%rax)
.L23:
	movzbl	1(%rax), %r8d
	cmpb	$46, %r8b
	je	.L24
	cmpb	$48, %r8b
	jle	.L25
	addl	$1, %r8d
	movb	%r8b, 1(%rax)
.L25:
	movzbl	2(%rax), %r8d
	cmpb	$46, %r8b
	je	.L26
	cmpb	$48, %r8b
	jle	.L27
	addl	$1, %r8d
	movb	%r8b, 2(%rax)
.L27:
	movzbl	(%rcx), %r8d
	cmpb	$46, %r8b
	je	.L28
	cmpb	$48, %r8b
	jle	.L29
	addl	$1, %r8d
	movb	%r8b, (%rcx)
.L29:
	movzbl	1(%rcx), %r8d
	cmpb	$46, %r8b
	je	.L30
	cmpb	$48, %r8b
	jle	.L31
	addl	$1, %r8d
	movb	%r8b, 1(%rcx)
.L31:
	movzbl	2(%rcx), %r8d
	cmpb	$46, %r8b
	je	.L32
.L58:
	cmpb	$48, %r8b
	jle	.L15
	addl	$1, %r8d
	movb	%r8b, 2(%rcx)
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L56:
	addq	%r13, %rdi
	cmpl	%r10d, %r11d
	jne	.L13
.L12:
	movq	-80(%rbp), %r12
	movl	$1, %r14d
	addq	%r13, %r12
	.p2align 4,,10
	.p2align 3
.L35:
	movl	$1, %ebx
	testl	%esi, %esi
	jle	.L38
	.p2align 4,,10
	.p2align 3
.L39:
	movsbl	(%r12,%rbx), %edi
	cmpb	$46, %dil
	je	.L57
	call	putchar@PLT
	addq	$1, %rbx
	cmpl	%ebx, -60(%rbp)
	jge	.L39
.L38:
	movl	$10, %edi
	addl	$1, %r14d
	addq	%r13, %r12
	call	putchar@PLT
	cmpl	%r14d, -64(%rbp)
	jl	.L40
	movl	-60(%rbp), %esi
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L57:
	movl	$48, %edi
	addq	$1, %rbx
	call	putchar@PLT
	cmpl	%ebx, -60(%rbp)
	jge	.L39
	jmp	.L38
	.p2align 4,,10
	.p2align 3
.L30:
	movzbl	2(%rcx), %r8d
	movb	$49, 1(%rcx)
	cmpb	$46, %r8b
	jne	.L58
.L32:
	movb	$49, 2(%rcx)
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L28:
	movb	$49, (%rcx)
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L26:
	movb	$49, 2(%rax)
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L24:
	movb	$49, 1(%rax)
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L22:
	movb	$49, (%rax)
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L16:
	movzbl	1(%rdx), %r8d
	movb	$49, (%rdx)
	cmpb	$46, %r8b
	jne	.L59
.L18:
	movzbl	2(%rdx), %r8d
	movb	$49, 1(%rdx)
	cmpb	$46, %r8b
	jne	.L60
.L20:
	movb	$49, 2(%rdx)
	jmp	.L21
.L40:
	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
.L55:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.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>

int main(){

  int H,W;
  scanf("%d%d",&H,&W);
  char S[H+2][W+2];
  for (int i = 0; i < H+2; i++){
    for (int j = 0; j < W+2; j++){
      S[i][j]=0;
    }
  }
  for (int i = 1; i < H+1; i++){
    getchar();
    for (int j = 1; j < W+1; j++){
      scanf("%c[^\n]",&S[i][j]);
    }
  }
  
  for (int i = 1; i<H+1; i++){
    for (int j = 1; j<W+1; j++){
      if (S[i][j]=='#')
      {
        for (int a = 0; a < 3; a++){
          for (int b = 0; b < 3; b++){
            if (S[a+i-1][b+j-1]=='.')
            {
              S[a+i-1][b+j-1]=49;
            }else if (S[a+i-1][b+j-1]>=49)
            {
              S[a+i-1][b+j-1]++;
            }
          }
        }
      }
    }
  }

  for (int i = 1; i < H+1; i++){
    for (int j = 1; j < W+1; j++){
      if (S[i][j]=='.')
      {
        printf("%c",'0');
      }else
      {
        printf("%c",S[i][j]);
      }
    }
    printf("\n");
  }

  return 0;
}
3 7
.....
.#.#.
.....
 6 8
.
.#.##
.#
.#..#.
.##..
.#...
 12 8
.
.#.##
.#
.#..#.
.##..
.#...
 11 6
.
.#.##
.#
.#..#.
.##..
.#...
 2 5
.....
.#.#.
.....
 21 6
.
.#.##
.#
.#..#.
.##..
.#...
 16 6
.
.#.##
.#
.#..#.
.##..
.#...
 7 8
.
.#.##
.#
.#..#.
.##..
.#...
 4 5
.....
.#.#.
.....
 1 7
.....
.#.#.
.....

11100
0
1#1
000
1

 1
2#3##

#
4#33#3
2##21
2#
12



 1
2#3##

#
4#33#3
2##21
2#
12









 0
2#3#

2#
4#
1#2
3#
11
1#2
0







 11211
1#2#1
 0
2#3#

2#
4#
1#2
3#
11
1#2
0

















 0
2#3#

2#
4#
1#2
3#
11
1#2
0












 1
2#3##

#
4#33#3
2##21
2#
12




 11211
1#2#1
11211

 00000
0

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;
  scanf("%d%d",&H,&W);
  char S[H+2][W+2];
  for (int i = 0; i < H+2; i++){
    for (int j = 0; j < W+2; j++){
      S[i][j]=0;
    }
  }
  for (int i = 1; i < H+1; i++){
    getchar();
    for (int j = 1; j < W+1; j++){
      scanf("%c[^\n]",&S[i][j]);
    }
  }
  
  for (int i = 1; i<H+1; i++){
    for (int j = 1; j<W+1; j++){
      if (S[i][j]=='#')
      {
        for (int a = 0; a < 3; a++){
          for (int b = 0; b < 3; b++){
            if (S[a+i-1][b+j-1]=='.')
            {
              S[a+i-1][b+j-1]=49;
            }else if (S[a+i-1][b+j-1]>=49)
            {
              S[a+i-1][b+j-1]++;
            }
          }
        }
      }
    }
  }

  for (int i = 1; i < H+1; i++){
    for (int j = 1; j < W+1; j++){
      if (S[i][j]=='.')
      {
        printf("%c",'0');
      }else
      {
        printf("%c",S[i][j]);
      }
    }
    printf("\n");
  }

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%c[^\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	$152, %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, -184(%rbp)
	leaq	-124(%rbp), %rdx
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-124(%rbp), %eax
	leal	2(%rax), %ecx
	movl	-128(%rbp), %eax
	leal	2(%rax), %esi
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -80(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movslq	%ecx, %rbx
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -72(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%esi, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movq	-144(%rbp), %r8
	movq	-136(%rbp), %r9
	movq	%r9, %rdx
	movq	-160(%rbp), %r10
	movq	-152(%rbp), %r11
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r8, %rax
	mulq	%r10
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movslq	%ecx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movslq	%esi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%r15, %rdx
	imulq	%r12, %rdx
	movq	%r13, %rax
	imulq	%r14, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r14, %rax
	mulq	%r12
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movslq	%ecx, %rdx
	movslq	%esi, %rax
	imulq	%rdx, %rax
	movl	$16, %edx
	subq	$1, %rdx
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	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	$0, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -120(%rbp)
	jmp	.L5
.L8:
	movl	$0, -116(%rbp)
	jmp	.L6
.L7:
	movq	-64(%rbp), %rcx
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	movl	-120(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movb	$0, (%rax)
	addl	$1, -116(%rbp)
.L6:
	movl	-124(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -116(%rbp)
	jle	.L7
	addl	$1, -120(%rbp)
.L5:
	movl	-128(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -120(%rbp)
	jle	.L8
	movl	$1, -112(%rbp)
	jmp	.L9
.L12:
	call	getchar@PLT
	movl	$1, -108(%rbp)
	jmp	.L10
.L11:
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	movl	-112(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rax, %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -108(%rbp)
.L10:
	movl	-124(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jle	.L11
	addl	$1, -112(%rbp)
.L9:
	movl	-128(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jle	.L12
	movl	$1, -104(%rbp)
	jmp	.L13
.L23:
	movl	$1, -100(%rbp)
	jmp	.L14
.L22:
	movq	-64(%rbp), %rcx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movl	-104(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$35, %al
	jne	.L15
	movl	$0, -96(%rbp)
	jmp	.L16
.L21:
	movl	$0, -92(%rbp)
	jmp	.L17
.L20:
	movl	-96(%rbp), %edx
	movl	-104(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	-92(%rbp), %ecx
	movl	-100(%rbp), %edx
	addl	%ecx, %edx
	subl	$1, %edx
	movq	-64(%rbp), %rcx
	movslq	%edx, %rdx
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L18
	movl	-96(%rbp), %edx
	movl	-104(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	-92(%rbp), %ecx
	movl	-100(%rbp), %edx
	addl	%ecx, %edx
	subl	$1, %edx
	movq	-64(%rbp), %rcx
	movslq	%edx, %rdx
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movb	$49, (%rax)
	jmp	.L19
.L18:
	movl	-96(%rbp), %edx
	movl	-104(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	-92(%rbp), %ecx
	movl	-100(%rbp), %edx
	addl	%ecx, %edx
	subl	$1, %edx
	movq	-64(%rbp), %rcx
	movslq	%edx, %rdx
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$48, %al
	jle	.L19
	movl	-96(%rbp), %edx
	movl	-104(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	-92(%rbp), %ecx
	movl	-100(%rbp), %edx
	addl	%ecx, %edx
	subl	$1, %edx
	movq	-64(%rbp), %rdi
	movslq	%edx, %rsi
	movslq	%eax, %rcx
	imulq	%rbx, %rcx
	addq	%rdi, %rsi
	addq	%rsi, %rcx
	movzbl	(%rcx), %ecx
	addl	$1, %ecx
	movq	-64(%rbp), %rsi
	movslq	%edx, %rdx
	cltq
	imulq	%rbx, %rax
	addq	%rsi, %rdx
	addq	%rdx, %rax
	movb	%cl, (%rax)
.L19:
	addl	$1, -92(%rbp)
.L17:
	cmpl	$2, -92(%rbp)
	jle	.L20
	addl	$1, -96(%rbp)
.L16:
	cmpl	$2, -96(%rbp)
	jle	.L21
.L15:
	addl	$1, -100(%rbp)
.L14:
	movl	-124(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jle	.L22
	addl	$1, -104(%rbp)
.L13:
	movl	-128(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jle	.L23
	movl	$1, -88(%rbp)
	jmp	.L24
.L29:
	movl	$1, -84(%rbp)
	jmp	.L25
.L28:
	movq	-64(%rbp), %rcx
	movl	-84(%rbp), %eax
	movslq	%eax, %rdx
	movl	-88(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L26
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L27
.L26:
	movq	-64(%rbp), %rcx
	movl	-84(%rbp), %eax
	movslq	%eax, %rdx
	movl	-88(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
.L27:
	addl	$1, -84(%rbp)
.L25:
	movl	-124(%rbp), %eax
	cmpl	%eax, -84(%rbp)
	jle	.L28
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -88(%rbp)
.L24:
	movl	-128(%rbp), %eax
	cmpl	%eax, -88(%rbp)
	jle	.L29
	movl	$0, %eax
	movq	-184(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	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"
.LC1:
	.string	"%c[^\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	$152, %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, -184(%rbp)
	leaq	-124(%rbp), %rdx
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-124(%rbp), %eax
	leal	2(%rax), %ecx
	movl	-128(%rbp), %eax
	leal	2(%rax), %esi
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -80(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movslq	%ecx, %rbx
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -72(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%esi, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movq	-144(%rbp), %r8
	movq	-136(%rbp), %r9
	movq	%r9, %rdx
	movq	-160(%rbp), %r10
	movq	-152(%rbp), %r11
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r8, %rax
	mulq	%r10
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movslq	%ecx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movslq	%esi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%r15, %rdx
	imulq	%r12, %rdx
	movq	%r13, %rax
	imulq	%r14, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r14, %rax
	mulq	%r12
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movslq	%ecx, %rdx
	movslq	%esi, %rax
	imulq	%rdx, %rax
	movl	$16, %edx
	subq	$1, %rdx
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	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	$0, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -120(%rbp)
	jmp	.L5
.L8:
	movl	$0, -116(%rbp)
	jmp	.L6
.L7:
	movq	-64(%rbp), %rcx
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	movl	-120(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movb	$0, (%rax)
	addl	$1, -116(%rbp)
.L6:
	movl	-124(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -116(%rbp)
	jle	.L7
	addl	$1, -120(%rbp)
.L5:
	movl	-128(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -120(%rbp)
	jle	.L8
	movl	$1, -112(%rbp)
	jmp	.L9
.L12:
	call	getchar@PLT
	movl	$1, -108(%rbp)
	jmp	.L10
.L11:
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	movl	-112(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rax, %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -108(%rbp)
.L10:
	movl	-124(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jle	.L11
	addl	$1, -112(%rbp)
.L9:
	movl	-128(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jle	.L12
	movl	$1, -104(%rbp)
	jmp	.L13
.L23:
	movl	$1, -100(%rbp)
	jmp	.L14
.L22:
	movq	-64(%rbp), %rcx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movl	-104(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$35, %al
	jne	.L15
	movl	$0, -96(%rbp)
	jmp	.L16
.L21:
	movl	$0, -92(%rbp)
	jmp	.L17
.L20:
	movl	-96(%rbp), %edx
	movl	-104(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	-92(%rbp), %ecx
	movl	-100(%rbp), %edx
	addl	%ecx, %edx
	subl	$1, %edx
	movq	-64(%rbp), %rcx
	movslq	%edx, %rdx
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L18
	movl	-96(%rbp), %edx
	movl	-104(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	-92(%rbp), %ecx
	movl	-100(%rbp), %edx
	addl	%ecx, %edx
	subl	$1, %edx
	movq	-64(%rbp), %rcx
	movslq	%edx, %rdx
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movb	$49, (%rax)
	jmp	.L19
.L18:
	movl	-96(%rbp), %edx
	movl	-104(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	-92(%rbp), %ecx
	movl	-100(%rbp), %edx
	addl	%ecx, %edx
	subl	$1, %edx
	movq	-64(%rbp), %rcx
	movslq	%edx, %rdx
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$48, %al
	jle	.L19
	movl	-96(%rbp), %edx
	movl	-104(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	-92(%rbp), %ecx
	movl	-100(%rbp), %edx
	addl	%ecx, %edx
	subl	$1, %edx
	movq	-64(%rbp), %rdi
	movslq	%edx, %rsi
	movslq	%eax, %rcx
	imulq	%rbx, %rcx
	addq	%rdi, %rsi
	addq	%rsi, %rcx
	movzbl	(%rcx), %ecx
	addl	$1, %ecx
	movq	-64(%rbp), %rsi
	movslq	%edx, %rdx
	cltq
	imulq	%rbx, %rax
	addq	%rsi, %rdx
	addq	%rdx, %rax
	movb	%cl, (%rax)
.L19:
	addl	$1, -92(%rbp)
.L17:
	cmpl	$2, -92(%rbp)
	jle	.L20
	addl	$1, -96(%rbp)
.L16:
	cmpl	$2, -96(%rbp)
	jle	.L21
.L15:
	addl	$1, -100(%rbp)
.L14:
	movl	-124(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jle	.L22
	addl	$1, -104(%rbp)
.L13:
	movl	-128(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jle	.L23
	movl	$1, -88(%rbp)
	jmp	.L24
.L29:
	movl	$1, -84(%rbp)
	jmp	.L25
.L28:
	movq	-64(%rbp), %rcx
	movl	-84(%rbp), %eax
	movslq	%eax, %rdx
	movl	-88(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L26
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L27
.L26:
	movq	-64(%rbp), %rcx
	movl	-84(%rbp), %eax
	movslq	%eax, %rdx
	movl	-88(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
.L27:
	addl	$1, -84(%rbp)
.L25:
	movl	-124(%rbp), %eax
	cmpl	%eax, -84(%rbp)
	jle	.L28
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -88(%rbp)
.L24:
	movl	-128(%rbp), %eax
	cmpl	%eax, -88(%rbp)
	jle	.L29
	movl	$0, %eax
	movq	-184(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	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:
