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);
  
  int grid[h + 1][w + 1];
  
  for(int i = 0; i < h; i++){
    for(int j = 0; j < w; j++){
      char c;
      scanf("%c ", &c);
      
      grid[i][j] = (c == '#') ? -1 : 0;
    }
  }
  
  for(int i = 0; i <= h; i++){
    grid[i][w] = 0;
  }
  
  for(int j = 0; j < w; j++){
    grid[h][j] = 0;
  }
  
  int result = 1;
  for(int i = 0; i < h; i++){
    for(int j = 0; j < w; j++){
      if(grid[i][j] == -1){
        if(grid[i + 1][j] == 0 && grid[i][j + 1] == 0){
          result = 0;
          break;
        }else{
          if(grid[i + 1][j] == -1) grid[i + 1][j] = 1;
          if(grid[i][j + 1] == -1) grid[i][j + 1] = 1;
        }
      }else if(grid[i][j] == 1){
        if(grid[i + 1][j] == -1) grid[i + 1][j] = 1;
        if(grid[i][j + 1] == -1) grid[i][j + 1] = 1;
      }
    }
    
    if(!result) break;
  }
  
  if(result) puts("Yes");
  else puts("No");
  
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d "
.LC1:
	.string	"%c "
.LC2:
	.string	"Yes"
.LC3:
	.string	"No"
	.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	-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), %esi
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -80(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movslq	%ecx, %rax
	leaq	0(,%rax,4), %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
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L5
.L10:
	movl	$0, -104(%rbp)
	jmp	.L6
.L9:
	leaq	-117(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-117(%rbp), %eax
	cmpb	$35, %al
	jne	.L7
	movl	$-1, %esi
	jmp	.L8
.L7:
	movl	$0, %esi
.L8:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdi
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	%esi, (%rax,%rdx,4)
	addl	$1, -104(%rbp)
.L6:
	movl	-112(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L9
	addl	$1, -108(%rbp)
.L5:
	movl	-116(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jl	.L10
	movl	$0, -100(%rbp)
	jmp	.L11
.L12:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-112(%rbp), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rsi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$0, (%rax,%rdx,4)
	addl	$1, -100(%rbp)
.L11:
	movl	-116(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jle	.L12
	movl	$0, -96(%rbp)
	jmp	.L13
.L14:
	movq	%rbx, %rsi
	shrq	$2, %rsi
	movl	-116(%rbp), %edx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %ecx
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	imulq	%rsi, %rdx
	addq	%rcx, %rdx
	movl	$0, (%rax,%rdx,4)
	addl	$1, -96(%rbp)
.L13:
	movl	-112(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L14
	movl	$1, -92(%rbp)
	movl	$0, -88(%rbp)
	jmp	.L15
.L26:
	movl	$0, -84(%rbp)
	jmp	.L16
.L23:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rsi
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	jne	.L17
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-88(%rbp), %eax
	leal	1(%rax), %esi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%esi, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %eax
	testl	%eax, %eax
	jne	.L18
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rsi
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	testl	%eax, %eax
	jne	.L18
	movl	$0, -92(%rbp)
	jmp	.L19
.L18:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-88(%rbp), %eax
	leal	1(%rax), %esi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%esi, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	jne	.L20
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-88(%rbp), %eax
	leal	1(%rax), %esi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%esi, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	$1, (%rax,%rdx,4)
.L20:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rsi
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	jne	.L21
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rsi
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$1, (%rax,%rdx,4)
	jmp	.L21
.L17:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rsi
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$1, %eax
	jne	.L21
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-88(%rbp), %eax
	leal	1(%rax), %esi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%esi, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	jne	.L22
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-88(%rbp), %eax
	leal	1(%rax), %esi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%esi, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	$1, (%rax,%rdx,4)
.L22:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rsi
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	jne	.L21
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rsi
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$1, (%rax,%rdx,4)
.L21:
	addl	$1, -84(%rbp)
.L16:
	movl	-112(%rbp), %eax
	cmpl	%eax, -84(%rbp)
	jl	.L23
.L19:
	cmpl	$0, -92(%rbp)
	je	.L31
	addl	$1, -88(%rbp)
.L15:
	movl	-116(%rbp), %eax
	cmpl	%eax, -88(%rbp)
	jl	.L26
	jmp	.L25
.L31:
	nop
.L25:
	cmpl	$0, -92(%rbp)
	je	.L27
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L28
.L27:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L28:
	movl	$0, %eax
	movq	-184(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	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 "
.LC2:
	.string	"Yes"
.LC3:
	.string	"No"
	.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	$72, %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), %r8d
	movl	-64(%rbp), %r12d
	movq	%rsp, %rcx
	leal	1(%r8), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rax
	movq	%rax, -88(%rbp)
	leal	1(%r12), %eax
	cltq
	imulq	%rdx, %rax
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L46:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L46
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L47
.L4:
	movq	%rsp, %rbx
	movq	%rbx, -96(%rbp)
	testl	%r12d, %r12d
	jle	.L5
	xorl	%r14d, %r14d
	leaq	.LC1(%rip), %r13
	testl	%r8d, %r8d
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L33:
	xorl	%r15d, %r15d
	leaq	-65(%rbp), %r12
	.p2align 4,,10
	.p2align 3
.L7:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	cmpb	$35, -65(%rbp)
	movl	-60(%rbp), %r8d
	sete	%al
	negl	%eax
	movl	%eax, (%rbx,%r15,4)
	addq	$1, %r15
	cmpl	%r15d, %r8d
	jg	.L7
	movl	-64(%rbp), %r12d
	addl	$1, %r14d
	cmpl	%r14d, %r12d
	jle	.L5
	addq	-88(%rbp), %rbx
	testl	%r8d, %r8d
	jg	.L33
.L9:
	movq	-88(%rbp), %rdi
	leal	1(%r12), %esi
	xorl	%edx, %edx
	movslq	%r8d, %rcx
	shrq	$2, %rdi
	.p2align 4,,10
	.p2align 3
.L14:
	movslq	%edx, %rax
	movq	-96(%rbp), %rbx
	addl	$1, %edx
	imulq	%rdi, %rax
	addq	%rcx, %rax
	movl	$0, (%rbx,%rax,4)
	cmpl	%esi, %edx
	jne	.L14
.L15:
	testl	%r8d, %r8d
	jle	.L13
	movslq	%r8d, %rdx
	movslq	%r12d, %rdi
	xorl	%esi, %esi
	movl	%r8d, -100(%rbp)
	imulq	-88(%rbp), %rdi
	salq	$2, %rdx
	addq	-96(%rbp), %rdi
	call	memset@PLT
	movl	-100(%rbp), %r8d
.L13:
	testl	%r12d, %r12d
	jle	.L17
	movq	-88(%rbp), %r10
	leal	-1(%r8), %eax
	movq	-96(%rbp), %rbx
	xorl	%edi, %edi
	salq	$2, %rax
	movq	$-4, %r9
	subq	%rax, %r10
	leaq	8(%rbx,%rax), %rsi
	subq	%rax, %r9
	subq	$8, %r10
	.p2align 4,,10
	.p2align 3
.L31:
	addl	$1, %edi
	leaq	(%r10,%rsi), %rdx
	leaq	(%r9,%rsi), %rax
	testl	%r8d, %r8d
	jg	.L27
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L18:
	cmpl	$1, %ecx
	je	.L48
.L24:
	addq	$4, %rax
	addq	$4, %rdx
	cmpq	%rsi, %rax
	je	.L28
.L27:
	movl	-4(%rax), %ecx
	cmpl	$-1, %ecx
	jne	.L18
	movl	(%rdx), %ecx
	testl	%ecx, %ecx
	jne	.L19
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	je	.L49
.L21:
	cmpl	$-1, %ecx
	jne	.L24
.L44:
	movl	$1, (%rax)
	addq	$4, %rax
	addq	$4, %rdx
	cmpq	%rsi, %rax
	jne	.L27
	.p2align 4,,10
	.p2align 3
.L28:
	addq	-88(%rbp), %rsi
	cmpl	%r12d, %edi
	jne	.L31
.L17:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L30:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L50
	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
.L48:
	.cfi_restore_state
	cmpl	$-1, (%rdx)
	jne	.L26
	movl	$1, (%rdx)
.L26:
	cmpl	$-1, (%rax)
	jne	.L24
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L19:
	cmpl	$-1, %ecx
	jne	.L43
	movl	$1, (%rdx)
.L43:
	movl	(%rax), %ecx
	jmp	.L21
.L49:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L30
.L47:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L5:
	testl	%r12d, %r12d
	js	.L15
	jmp	.L9
.L50:
	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	"Yes"
.LC3:
	.string	"No"
	.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	$72, %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), %r8d
	movl	-64(%rbp), %r12d
	movq	%rsp, %rcx
	leal	1(%r8), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rax
	movq	%rax, -88(%rbp)
	leal	1(%r12), %eax
	cltq
	imulq	%rdx, %rax
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L46:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L46
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L47
.L4:
	movq	%rsp, %rbx
	movq	%rbx, -96(%rbp)
	testl	%r12d, %r12d
	jle	.L5
	xorl	%r14d, %r14d
	leaq	.LC1(%rip), %r13
	testl	%r8d, %r8d
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L33:
	xorl	%r15d, %r15d
	leaq	-65(%rbp), %r12
	.p2align 4,,10
	.p2align 3
.L7:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	cmpb	$35, -65(%rbp)
	movl	-60(%rbp), %r8d
	sete	%al
	negl	%eax
	movl	%eax, (%rbx,%r15,4)
	addq	$1, %r15
	cmpl	%r15d, %r8d
	jg	.L7
	movl	-64(%rbp), %r12d
	addl	$1, %r14d
	cmpl	%r14d, %r12d
	jle	.L5
	addq	-88(%rbp), %rbx
	testl	%r8d, %r8d
	jg	.L33
.L9:
	movq	-88(%rbp), %rdi
	leal	1(%r12), %esi
	xorl	%edx, %edx
	movslq	%r8d, %rcx
	shrq	$2, %rdi
	.p2align 4,,10
	.p2align 3
.L14:
	movslq	%edx, %rax
	movq	-96(%rbp), %rbx
	addl	$1, %edx
	imulq	%rdi, %rax
	addq	%rcx, %rax
	movl	$0, (%rbx,%rax,4)
	cmpl	%esi, %edx
	jne	.L14
.L15:
	testl	%r8d, %r8d
	jle	.L13
	movslq	%r8d, %rdx
	movslq	%r12d, %rdi
	xorl	%esi, %esi
	movl	%r8d, -100(%rbp)
	imulq	-88(%rbp), %rdi
	salq	$2, %rdx
	addq	-96(%rbp), %rdi
	call	memset@PLT
	movl	-100(%rbp), %r8d
.L13:
	testl	%r12d, %r12d
	jle	.L17
	movq	-88(%rbp), %r10
	leal	-1(%r8), %eax
	movq	-96(%rbp), %rbx
	xorl	%edi, %edi
	salq	$2, %rax
	movq	$-4, %r9
	subq	%rax, %r10
	leaq	8(%rbx,%rax), %rsi
	subq	%rax, %r9
	subq	$8, %r10
	.p2align 4,,10
	.p2align 3
.L31:
	addl	$1, %edi
	leaq	(%r10,%rsi), %rdx
	leaq	(%r9,%rsi), %rax
	testl	%r8d, %r8d
	jg	.L27
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L18:
	cmpl	$1, %ecx
	je	.L48
.L24:
	addq	$4, %rax
	addq	$4, %rdx
	cmpq	%rsi, %rax
	je	.L28
.L27:
	movl	-4(%rax), %ecx
	cmpl	$-1, %ecx
	jne	.L18
	movl	(%rdx), %ecx
	testl	%ecx, %ecx
	jne	.L19
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	je	.L49
.L21:
	cmpl	$-1, %ecx
	jne	.L24
.L44:
	movl	$1, (%rax)
	addq	$4, %rax
	addq	$4, %rdx
	cmpq	%rsi, %rax
	jne	.L27
	.p2align 4,,10
	.p2align 3
.L28:
	addq	-88(%rbp), %rsi
	cmpl	%r12d, %edi
	jne	.L31
.L17:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L30:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L50
	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
.L48:
	.cfi_restore_state
	cmpl	$-1, (%rdx)
	jne	.L26
	movl	$1, (%rdx)
.L26:
	cmpl	$-1, (%rax)
	jne	.L24
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L19:
	cmpl	$-1, %ecx
	jne	.L43
	movl	$1, (%rdx)
.L43:
	movl	(%rax), %ecx
	jmp	.L21
.L49:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L30
.L47:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L5:
	testl	%r12d, %r12d
	js	.L15
	jmp	.L9
.L50:
	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);
  
  int grid[h + 1][w + 1];
  
  for(int i = 0; i < h; i++){
    for(int j = 0; j < w; j++){
      char c;
      scanf("%c ", &c);
      
      grid[i][j] = (c == '#') ? -1 : 0;
    }
  }
  
  for(int i = 0; i <= h; i++){
    grid[i][w] = 0;
  }
  
  for(int j = 0; j < w; j++){
    grid[h][j] = 0;
  }
  
  int result = 1;
  for(int i = 0; i < h; i++){
    for(int j = 0; j < w; j++){
      if(grid[i][j] == -1){
        if(grid[i + 1][j] == 0 && grid[i][j + 1] == 0){
          result = 0;
          break;
        }else{
          if(grid[i + 1][j] == -1) grid[i + 1][j] = 1;
          if(grid[i][j + 1] == -1) grid[i][j + 1] = 1;
        }
      }else if(grid[i][j] == 1){
        if(grid[i + 1][j] == -1) grid[i + 1][j] = 1;
        if(grid[i][j + 1] == -1) grid[i][j + 1] = 1;
      }
    }
    
    if(!result) break;
  }
  
  if(result) puts("Yes");
  else puts("No");
  
  return 0;
}
3 5
.#.
###
.#.
 5 5
.#.#
.#.#.
-#.#
.#.#.
.#.#
 11 11
...#####...
.##.....##.
..##.##..#
..##.##..#
.........#
...###...#
.#########.
.#.#.#.#.#.
.#.#.#.#$
..##.#.##..
.##..#..##.
 3 6
.#.
###
.#.
 11 11
...#####...
.##.....##.
..##.##..#
..##.##..#
.........#
...###...#
.#########.
.#.#.#.#.#.
.$.#.#.#$
..##.#.##..
.##..#..##.
 5 6
.#.
###
.#.
 11 11
...#####...
.##.....##.
..##.##..#
..##.##..#
.........#
...###...#
.#########.
.#...#.###.
.$.#.#.#$
..##.#.##..
.##..#..##.
 6 6
.#.
###
.#.
 11 15
...#####...
.##.....##.
..##.##..#
..##.##..#
.........#
...###...#
.#########.
.#...#.###.
.$.#.#.#$
..##.#.##..
.##..#..##.
 6 6
#..
###
.#.

No
 No
 No
 Yes
 No
 Yes
 No
 Yes
 No
 No

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);
  
  int grid[h + 1][w + 1];
  
  for(int i = 0; i < h; i++){
    for(int j = 0; j < w; j++){
      char c;
      scanf("%c ", &c);
      
      grid[i][j] = (c == '#') ? -1 : 0;
    }
  }
  
  for(int i = 0; i <= h; i++){
    grid[i][w] = 0;
  }
  
  for(int j = 0; j < w; j++){
    grid[h][j] = 0;
  }
  
  int result = 1;
  for(int i = 0; i < h; i++){
    for(int j = 0; j < w; j++){
      if(grid[i][j] == -1){
        if(grid[i + 1][j] == 0 && grid[i][j + 1] == 0){
          result = 0;
          break;
        }else{
          if(grid[i + 1][j] == -1) grid[i + 1][j] = 1;
          if(grid[i][j + 1] == -1) grid[i][j + 1] = 1;
        }
      }else if(grid[i][j] == 1){
        if(grid[i + 1][j] == -1) grid[i + 1][j] = 1;
        if(grid[i][j + 1] == -1) grid[i][j + 1] = 1;
      }
    }
    
    if(!result) break;
  }
  
  if(result) puts("Yes");
  else puts("No");
  
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d "
.LC1:
	.string	"%c "
.LC2:
	.string	"Yes"
.LC3:
	.string	"No"
	.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	-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), %esi
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -80(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movslq	%ecx, %rax
	leaq	0(,%rax,4), %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
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L5
.L10:
	movl	$0, -104(%rbp)
	jmp	.L6
.L9:
	leaq	-117(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-117(%rbp), %eax
	cmpb	$35, %al
	jne	.L7
	movl	$-1, %esi
	jmp	.L8
.L7:
	movl	$0, %esi
.L8:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdi
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	%esi, (%rax,%rdx,4)
	addl	$1, -104(%rbp)
.L6:
	movl	-112(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L9
	addl	$1, -108(%rbp)
.L5:
	movl	-116(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jl	.L10
	movl	$0, -100(%rbp)
	jmp	.L11
.L12:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-112(%rbp), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rsi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$0, (%rax,%rdx,4)
	addl	$1, -100(%rbp)
.L11:
	movl	-116(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jle	.L12
	movl	$0, -96(%rbp)
	jmp	.L13
.L14:
	movq	%rbx, %rsi
	shrq	$2, %rsi
	movl	-116(%rbp), %edx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %ecx
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	imulq	%rsi, %rdx
	addq	%rcx, %rdx
	movl	$0, (%rax,%rdx,4)
	addl	$1, -96(%rbp)
.L13:
	movl	-112(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L14
	movl	$1, -92(%rbp)
	movl	$0, -88(%rbp)
	jmp	.L15
.L26:
	movl	$0, -84(%rbp)
	jmp	.L16
.L23:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rsi
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	jne	.L17
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-88(%rbp), %eax
	leal	1(%rax), %esi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%esi, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %eax
	testl	%eax, %eax
	jne	.L18
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rsi
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	testl	%eax, %eax
	jne	.L18
	movl	$0, -92(%rbp)
	jmp	.L19
.L18:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-88(%rbp), %eax
	leal	1(%rax), %esi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%esi, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	jne	.L20
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-88(%rbp), %eax
	leal	1(%rax), %esi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%esi, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	$1, (%rax,%rdx,4)
.L20:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rsi
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	jne	.L21
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rsi
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$1, (%rax,%rdx,4)
	jmp	.L21
.L17:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rsi
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$1, %eax
	jne	.L21
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-88(%rbp), %eax
	leal	1(%rax), %esi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%esi, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	jne	.L22
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-88(%rbp), %eax
	leal	1(%rax), %esi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%esi, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	$1, (%rax,%rdx,4)
.L22:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rsi
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	jne	.L21
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rsi
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$1, (%rax,%rdx,4)
.L21:
	addl	$1, -84(%rbp)
.L16:
	movl	-112(%rbp), %eax
	cmpl	%eax, -84(%rbp)
	jl	.L23
.L19:
	cmpl	$0, -92(%rbp)
	je	.L31
	addl	$1, -88(%rbp)
.L15:
	movl	-116(%rbp), %eax
	cmpl	%eax, -88(%rbp)
	jl	.L26
	jmp	.L25
.L31:
	nop
.L25:
	cmpl	$0, -92(%rbp)
	je	.L27
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L28
.L27:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L28:
	movl	$0, %eax
	movq	-184(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	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 "
.LC2:
	.string	"Yes"
.LC3:
	.string	"No"
	.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	-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), %esi
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -80(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movslq	%ecx, %rax
	leaq	0(,%rax,4), %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
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L5
.L10:
	movl	$0, -104(%rbp)
	jmp	.L6
.L9:
	leaq	-117(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-117(%rbp), %eax
	cmpb	$35, %al
	jne	.L7
	movl	$-1, %esi
	jmp	.L8
.L7:
	movl	$0, %esi
.L8:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdi
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	%esi, (%rax,%rdx,4)
	addl	$1, -104(%rbp)
.L6:
	movl	-112(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L9
	addl	$1, -108(%rbp)
.L5:
	movl	-116(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jl	.L10
	movl	$0, -100(%rbp)
	jmp	.L11
.L12:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-112(%rbp), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rsi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$0, (%rax,%rdx,4)
	addl	$1, -100(%rbp)
.L11:
	movl	-116(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jle	.L12
	movl	$0, -96(%rbp)
	jmp	.L13
.L14:
	movq	%rbx, %rsi
	shrq	$2, %rsi
	movl	-116(%rbp), %edx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %ecx
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	imulq	%rsi, %rdx
	addq	%rcx, %rdx
	movl	$0, (%rax,%rdx,4)
	addl	$1, -96(%rbp)
.L13:
	movl	-112(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L14
	movl	$1, -92(%rbp)
	movl	$0, -88(%rbp)
	jmp	.L15
.L26:
	movl	$0, -84(%rbp)
	jmp	.L16
.L23:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rsi
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	jne	.L17
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-88(%rbp), %eax
	leal	1(%rax), %esi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%esi, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %eax
	testl	%eax, %eax
	jne	.L18
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rsi
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	testl	%eax, %eax
	jne	.L18
	movl	$0, -92(%rbp)
	jmp	.L19
.L18:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-88(%rbp), %eax
	leal	1(%rax), %esi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%esi, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	jne	.L20
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-88(%rbp), %eax
	leal	1(%rax), %esi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%esi, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	$1, (%rax,%rdx,4)
.L20:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rsi
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	jne	.L21
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rsi
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$1, (%rax,%rdx,4)
	jmp	.L21
.L17:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rsi
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$1, %eax
	jne	.L21
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-88(%rbp), %eax
	leal	1(%rax), %esi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%esi, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	jne	.L22
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-88(%rbp), %eax
	leal	1(%rax), %esi
	movq	-64(%rbp), %rax
	movl	-84(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%esi, %rdx
	imulq	%rcx, %rdx
	addq	%rdi, %rdx
	movl	$1, (%rax,%rdx,4)
.L22:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rsi
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	jne	.L21
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-84(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rsi
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$1, (%rax,%rdx,4)
.L21:
	addl	$1, -84(%rbp)
.L16:
	movl	-112(%rbp), %eax
	cmpl	%eax, -84(%rbp)
	jl	.L23
.L19:
	cmpl	$0, -92(%rbp)
	je	.L31
	addl	$1, -88(%rbp)
.L15:
	movl	-116(%rbp), %eax
	cmpl	%eax, -88(%rbp)
	jl	.L26
	jmp	.L25
.L31:
	nop
.L25:
	cmpl	$0, -92(%rbp)
	je	.L27
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L28
.L27:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L28:
	movl	$0, %eax
	movq	-184(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	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:
