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

```c
/*
  AOJ 0610
  Title:Weather Forecaster
  @kankichi573
*/
#include <stdio.h>

int H,W;
char result[100][101];
char tenki[101];

main()
{
  int i,j,flag;
  char weather;
  

  scanf("%d %d",&H,&W);
  for(i=0;i<H;i++)
    {
      scanf("%s",tenki);
      for(j=0,flag=-1;j<=W;j++)
	{
	  weather=tenki[j];
	  if(weather=='.')
	    {
	      if(flag>=0)
		flag++;
	    }
	  else if (weather=='c')
	    flag=0;
	  result[i][j]=flag;
	}
    }
  for(i=0;i<H;i++)
    {
      for(j=0;j<W;j++)
	{
	  printf("%d",result[i][j]);
	  if(j<W-1)
	    printf(" ");
	  else
	    printf("\n");
	}
    }
  return(0);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d"
	.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
	leaq	W(%rip), %rdx
	leaq	H(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %rdi
	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	$8, %rsp
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movl	H(%rip), %eax
	testl	%eax, %eax
	jle	.L21
	leaq	result(%rip), %rbp
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	movq	%rbp, %r12
	leaq	tenki(%rip), %r13
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movl	$-1, %edx
	xorl	%r8d, %r8d
	movslq	W(%rip), %rdi
	movq	%rdi, %rsi
	testl	%edi, %edi
	jns	.L8
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	cmpb	$99, %cl
	movl	%r8d, %ecx
	cmovne	%edx, %ecx
	cmove	%r14d, %edx
.L7:
	movb	%cl, (%r12,%rax)
	leaq	1(%rax), %rcx
	cmpq	%rax, %rdi
	je	.L9
.L18:
	movq	%rcx, %rax
.L8:
	movzbl	0(%r13,%rax), %ecx
	cmpb	$46, %cl
	jne	.L6
	movl	$-1, %ecx
	cmpl	$-1, %edx
	je	.L7
	addl	$1, %edx
	movl	%edx, %ecx
	movb	%cl, (%r12,%rax)
	leaq	1(%rax), %rcx
	cmpq	%rax, %rdi
	jne	.L18
	.p2align 4,,10
	.p2align 3
.L9:
	movl	H(%rip), %eax
	addl	$1, %r15d
	addq	$101, %r12
	cmpl	%r15d, %eax
	jg	.L4
	testl	%eax, %eax
	jle	.L21
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %r12
	testl	%esi, %esi
	jle	.L21
	.p2align 4,,10
	.p2align 3
.L20:
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L14:
	movsbl	0(%rbp,%rbx), %edx
	movl	$1, %edi
	movq	%r12, %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	W(%rip), %eax
	movl	$32, %edi
	subl	$1, %eax
	cmpl	%ebx, %eax
	jg	.L27
	movl	$10, %edi
.L27:
	call	putchar@PLT
	movl	W(%rip), %esi
	addq	$1, %rbx
	cmpl	%ebx, %esi
	jg	.L14
	addl	$1, %r13d
	cmpl	%r13d, H(%rip)
	jle	.L21
	addq	$101, %rbp
	testl	%esi, %esi
	jg	.L20
.L21:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	tenki
	.bss
	.align 32
	.type	tenki, @object
	.size	tenki, 101
tenki:
	.zero	101
	.globl	result
	.align 32
	.type	result, @object
	.size	result, 10100
result:
	.zero	10100
	.globl	W
	.align 4
	.type	W, @object
	.size	W, 4
W:
	.zero	4
	.globl	H
	.align 4
	.type	H, @object
	.size	H, 4
H:
	.zero	4
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d"
	.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
	leaq	W(%rip), %rdx
	leaq	H(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %rdi
	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	$8, %rsp
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movl	H(%rip), %eax
	testl	%eax, %eax
	jle	.L21
	leaq	result(%rip), %rbp
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	movq	%rbp, %r12
	leaq	tenki(%rip), %r13
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movl	$-1, %edx
	xorl	%r8d, %r8d
	movslq	W(%rip), %rdi
	movq	%rdi, %rsi
	testl	%edi, %edi
	jns	.L8
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	cmpb	$99, %cl
	movl	%r8d, %ecx
	cmovne	%edx, %ecx
	cmove	%r14d, %edx
.L7:
	movb	%cl, (%r12,%rax)
	leaq	1(%rax), %rcx
	cmpq	%rax, %rdi
	je	.L9
.L18:
	movq	%rcx, %rax
.L8:
	movzbl	0(%r13,%rax), %ecx
	cmpb	$46, %cl
	jne	.L6
	movl	$-1, %ecx
	cmpl	$-1, %edx
	je	.L7
	addl	$1, %edx
	movl	%edx, %ecx
	movb	%cl, (%r12,%rax)
	leaq	1(%rax), %rcx
	cmpq	%rax, %rdi
	jne	.L18
	.p2align 4,,10
	.p2align 3
.L9:
	movl	H(%rip), %eax
	addl	$1, %r15d
	addq	$101, %r12
	cmpl	%r15d, %eax
	jg	.L4
	testl	%eax, %eax
	jle	.L21
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %r12
	testl	%esi, %esi
	jle	.L21
	.p2align 4,,10
	.p2align 3
.L20:
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L14:
	movsbl	0(%rbp,%rbx), %edx
	movl	$1, %edi
	movq	%r12, %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	W(%rip), %eax
	movl	$32, %edi
	subl	$1, %eax
	cmpl	%ebx, %eax
	jg	.L27
	movl	$10, %edi
.L27:
	call	putchar@PLT
	movl	W(%rip), %esi
	addq	$1, %rbx
	cmpl	%ebx, %esi
	jg	.L14
	addl	$1, %r13d
	cmpl	%r13d, H(%rip)
	jle	.L21
	addq	$101, %rbp
	testl	%esi, %esi
	jg	.L20
.L21:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	tenki
	.bss
	.align 32
	.type	tenki, @object
	.size	tenki, 101
tenki:
	.zero	101
	.globl	result
	.align 32
	.type	result, @object
	.size	result, 10100
result:
	.zero	10100
	.globl	W
	.align 4
	.type	W, @object
	.size	W, 4
W:
	.zero	4
	.globl	H
	.align 4
	.type	H, @object
	.size	H, 4
H:
	.zero	4
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d"
	.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
	leaq	W(%rip), %rdx
	leaq	H(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %rdi
	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	$8, %rsp
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movl	H(%rip), %eax
	testl	%eax, %eax
	jle	.L21
	leaq	result(%rip), %rbp
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	movq	%rbp, %r12
	leaq	tenki(%rip), %r13
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movl	$-1, %edx
	xorl	%r8d, %r8d
	movslq	W(%rip), %rdi
	movq	%rdi, %rsi
	testl	%edi, %edi
	jns	.L8
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	cmpb	$99, %cl
	movl	%r8d, %ecx
	cmovne	%edx, %ecx
	cmove	%r14d, %edx
.L7:
	movb	%cl, (%r12,%rax)
	leaq	1(%rax), %rcx
	cmpq	%rax, %rdi
	je	.L9
.L18:
	movq	%rcx, %rax
.L8:
	movzbl	0(%r13,%rax), %ecx
	cmpb	$46, %cl
	jne	.L6
	movl	$-1, %ecx
	cmpl	$-1, %edx
	je	.L7
	addl	$1, %edx
	movl	%edx, %ecx
	movb	%cl, (%r12,%rax)
	leaq	1(%rax), %rcx
	cmpq	%rax, %rdi
	jne	.L18
	.p2align 4,,10
	.p2align 3
.L9:
	movl	H(%rip), %eax
	addl	$1, %r15d
	addq	$101, %r12
	cmpl	%r15d, %eax
	jg	.L4
	testl	%eax, %eax
	jle	.L21
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %r12
	testl	%esi, %esi
	jle	.L21
	.p2align 4,,10
	.p2align 3
.L20:
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L14:
	movsbl	0(%rbp,%rbx), %edx
	movl	$1, %edi
	movq	%r12, %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	W(%rip), %eax
	movl	$32, %edi
	subl	$1, %eax
	cmpl	%ebx, %eax
	jg	.L27
	movl	$10, %edi
.L27:
	call	putchar@PLT
	movl	W(%rip), %esi
	addq	$1, %rbx
	cmpl	%ebx, %esi
	jg	.L14
	addl	$1, %r13d
	cmpl	%r13d, H(%rip)
	jle	.L21
	addq	$101, %rbp
	testl	%esi, %esi
	jg	.L20
.L21:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	tenki
	.bss
	.align 32
	.type	tenki, @object
	.size	tenki, 101
tenki:
	.zero	101
	.globl	result
	.align 32
	.type	result, @object
	.size	result, 10100
result:
	.zero	10100
	.globl	W
	.align 4
	.type	W, @object
	.size	W, 4
W:
	.zero	4
	.globl	H
	.align 4
	.type	H, @object
	.size	H, 4
H:
	.zero	4
	.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:
```
```c
/*
  AOJ 0610
  Title:Weather Forecaster
  @kankichi573
*/
#include <stdio.h>

int H,W;
char result[100][101];
char tenki[101];

main()
{
  int i,j,flag;
  char weather;
  

  scanf("%d %d",&H,&W);
  for(i=0;i<H;i++)
    {
      scanf("%s",tenki);
      for(j=0,flag=-1;j<=W;j++)
	{
	  weather=tenki[j];
	  if(weather=='.')
	    {
	      if(flag>=0)
		flag++;
	    }
	  else if (weather=='c')
	    flag=0;
	  result[i][j]=flag;
	}
    }
  for(i=0;i<H;i++)
    {
      for(j=0;j<W;j++)
	{
	  printf("%d",result[i][j]);
	  if(j<W-1)
	    printf(" ");
	  else
	    printf("\n");
	}
    }
  return(0);
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
/*
  AOJ 0610
  Title:Weather Forecaster
  @kankichi573
*/
#include <stdio.h>

int H,W;
char result[100][101];
char tenki[101];

main()
{
  int i,j,flag;
  char weather;
  

  scanf("%d %d",&H,&W);
  for(i=0;i<H;i++)
    {
      scanf("%s",tenki);
      for(j=0,flag=-1;j<=W;j++)
	{
	  weather=tenki[j];
	  if(weather=='.')
	    {
	      if(flag>=0)
		flag++;
	    }
	  else if (weather=='c')
	    flag=0;
	  result[i][j]=flag;
	}
    }
  for(i=0;i<H;i++)
    {
      for(j=0;j<W;j++)
	{
	  printf("%d",result[i][j]);
	  if(j<W-1)
	    printf(" ");
	  else
	    printf("\n");
	}
    }
  return(0);
}```

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.
Optimized Assembly Code:

3 4
c..c
..c.
....

0 1 2 0
-1 -1 0 1
-1 -1 -1 -1

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

```c
/*
  AOJ 0610
  Title:Weather Forecaster
  @kankichi573
*/
#include <stdio.h>

int H,W;
char result[100][101];
char tenki[101];

main()
{
  int i,j,flag;
  char weather;
  

  scanf("%d %d",&H,&W);
  for(i=0;i<H;i++)
    {
      scanf("%s",tenki);
      for(j=0,flag=-1;j<=W;j++)
	{
	  weather=tenki[j];
	  if(weather=='.')
	    {
	      if(flag>=0)
		flag++;
	    }
	  else if (weather=='c')
	    flag=0;
	  result[i][j]=flag;
	}
    }
  for(i=0;i<H;i++)
    {
      for(j=0;j<W;j++)
	{
	  printf("%d",result[i][j]);
	  if(j<W-1)
	    printf(" ");
	  else
	    printf("\n");
	}
    }
  return(0);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d"
	.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
	leaq	W(%rip), %rdx
	leaq	H(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %rdi
	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	$8, %rsp
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movl	H(%rip), %eax
	testl	%eax, %eax
	jle	.L21
	leaq	result(%rip), %rbp
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	movq	%rbp, %r12
	leaq	tenki(%rip), %r13
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movl	$-1, %edx
	xorl	%r8d, %r8d
	movslq	W(%rip), %rdi
	movq	%rdi, %rsi
	testl	%edi, %edi
	jns	.L8
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	cmpb	$99, %cl
	movl	%r8d, %ecx
	cmovne	%edx, %ecx
	cmove	%r14d, %edx
.L7:
	movb	%cl, (%r12,%rax)
	leaq	1(%rax), %rcx
	cmpq	%rax, %rdi
	je	.L9
.L18:
	movq	%rcx, %rax
.L8:
	movzbl	0(%r13,%rax), %ecx
	cmpb	$46, %cl
	jne	.L6
	movl	$-1, %ecx
	cmpl	$-1, %edx
	je	.L7
	addl	$1, %edx
	movl	%edx, %ecx
	movb	%cl, (%r12,%rax)
	leaq	1(%rax), %rcx
	cmpq	%rax, %rdi
	jne	.L18
	.p2align 4,,10
	.p2align 3
.L9:
	movl	H(%rip), %eax
	addl	$1, %r15d
	addq	$101, %r12
	cmpl	%r15d, %eax
	jg	.L4
	testl	%eax, %eax
	jle	.L21
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %r12
	testl	%esi, %esi
	jle	.L21
	.p2align 4,,10
	.p2align 3
.L20:
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L14:
	movsbl	0(%rbp,%rbx), %edx
	movl	$1, %edi
	movq	%r12, %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	W(%rip), %eax
	movl	$32, %edi
	subl	$1, %eax
	cmpl	%ebx, %eax
	jg	.L27
	movl	$10, %edi
.L27:
	call	putchar@PLT
	movl	W(%rip), %esi
	addq	$1, %rbx
	cmpl	%ebx, %esi
	jg	.L14
	addl	$1, %r13d
	cmpl	%r13d, H(%rip)
	jle	.L21
	addq	$101, %rbp
	testl	%esi, %esi
	jg	.L20
.L21:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	tenki
	.bss
	.align 32
	.type	tenki, @object
	.size	tenki, 101
tenki:
	.zero	101
	.globl	result
	.align 32
	.type	result, @object
	.size	result, 10100
result:
	.zero	10100
	.globl	W
	.align 4
	.type	W, @object
	.size	W, 4
W:
	.zero	4
	.globl	H
	.align 4
	.type	H, @object
	.size	H, 4
H:
	.zero	4
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d"
	.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
	leaq	W(%rip), %rdx
	leaq	H(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %rdi
	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	$8, %rsp
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movl	H(%rip), %eax
	testl	%eax, %eax
	jle	.L21
	leaq	result(%rip), %rbp
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	movq	%rbp, %r12
	leaq	tenki(%rip), %r13
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movl	$-1, %edx
	xorl	%r8d, %r8d
	movslq	W(%rip), %rdi
	movq	%rdi, %rsi
	testl	%edi, %edi
	jns	.L8
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	cmpb	$99, %cl
	movl	%r8d, %ecx
	cmovne	%edx, %ecx
	cmove	%r14d, %edx
.L7:
	movb	%cl, (%r12,%rax)
	leaq	1(%rax), %rcx
	cmpq	%rax, %rdi
	je	.L9
.L18:
	movq	%rcx, %rax
.L8:
	movzbl	0(%r13,%rax), %ecx
	cmpb	$46, %cl
	jne	.L6
	movl	$-1, %ecx
	cmpl	$-1, %edx
	je	.L7
	addl	$1, %edx
	movl	%edx, %ecx
	movb	%cl, (%r12,%rax)
	leaq	1(%rax), %rcx
	cmpq	%rax, %rdi
	jne	.L18
	.p2align 4,,10
	.p2align 3
.L9:
	movl	H(%rip), %eax
	addl	$1, %r15d
	addq	$101, %r12
	cmpl	%r15d, %eax
	jg	.L4
	testl	%eax, %eax
	jle	.L21
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %r12
	testl	%esi, %esi
	jle	.L21
	.p2align 4,,10
	.p2align 3
.L20:
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L14:
	movsbl	0(%rbp,%rbx), %edx
	movl	$1, %edi
	movq	%r12, %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	W(%rip), %eax
	movl	$32, %edi
	subl	$1, %eax
	cmpl	%ebx, %eax
	jg	.L27
	movl	$10, %edi
.L27:
	call	putchar@PLT
	movl	W(%rip), %esi
	addq	$1, %rbx
	cmpl	%ebx, %esi
	jg	.L14
	addl	$1, %r13d
	cmpl	%r13d, H(%rip)
	jle	.L21
	addq	$101, %rbp
	testl	%esi, %esi
	jg	.L20
.L21:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	tenki
	.bss
	.align 32
	.type	tenki, @object
	.size	tenki, 101
tenki:
	.zero	101
	.globl	result
	.align 32
	.type	result, @object
	.size	result, 10100
result:
	.zero	10100
	.globl	W
	.align 4
	.type	W, @object
	.size	W, 4
W:
	.zero	4
	.globl	H
	.align 4
	.type	H, @object
	.size	H, 4
H:
	.zero	4
	.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:
```