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,i=1,j,k,arr1[1000],arr2[1000],count=-1;
          do
          {
                    scanf("%d%d",&h,&w);
                    arr1[i]=h;
                    arr2[i]=w;
                    i++;
                    count++;

          }while((h!=0)&&(w!=0));
          for(i=1;i<=count;i++)
          {
                    k=1;
                    while(k<=arr1[i])
                    {
                              if(k%2!=0){
                              for(j=1;j<=arr2[i];j++)
                              {
                                        if(j%2!=0)
                                                  printf("#");
                                        else if(j%2==0)
                                                  printf(".");
                              }}
                              if(k%2==0){
                              for(j=1;j<=arr2[i];j++)
                              {
                                        if(j%2==0)
                                                  printf("#");
                                        else if(j%2!=0)
                                                  printf(".");
                              }}
                              printf("\n");
                              k++;
                    }
                    printf("\n");
          }
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
	.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	$3952, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -8032(%rbp)
	movl	$-1, -8020(%rbp)
.L3:
	leaq	-8036(%rbp), %rdx
	leaq	-8040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-8040(%rbp), %edx
	movl	-8032(%rbp), %eax
	cltq
	movl	%edx, -8016(%rbp,%rax,4)
	movl	-8036(%rbp), %edx
	movl	-8032(%rbp), %eax
	cltq
	movl	%edx, -4016(%rbp,%rax,4)
	addl	$1, -8032(%rbp)
	addl	$1, -8020(%rbp)
	movl	-8040(%rbp), %eax
	testl	%eax, %eax
	je	.L2
	movl	-8036(%rbp), %eax
	testl	%eax, %eax
	jne	.L3
.L2:
	movl	$1, -8032(%rbp)
	jmp	.L4
.L17:
	movl	$1, -8024(%rbp)
	jmp	.L5
.L16:
	movl	-8024(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L6
	movl	$1, -8028(%rbp)
	jmp	.L7
.L10:
	movl	-8028(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L8
	movl	$35, %edi
	call	putchar@PLT
	jmp	.L9
.L8:
	movl	-8028(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L9
	movl	$46, %edi
	call	putchar@PLT
.L9:
	addl	$1, -8028(%rbp)
.L7:
	movl	-8032(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	cmpl	%eax, -8028(%rbp)
	jle	.L10
.L6:
	movl	-8024(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L11
	movl	$1, -8028(%rbp)
	jmp	.L12
.L15:
	movl	-8028(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L13
	movl	$35, %edi
	call	putchar@PLT
	jmp	.L14
.L13:
	movl	-8028(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L14
	movl	$46, %edi
	call	putchar@PLT
.L14:
	addl	$1, -8028(%rbp)
.L12:
	movl	-8032(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	cmpl	%eax, -8028(%rbp)
	jle	.L15
.L11:
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -8024(%rbp)
.L5:
	movl	-8032(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	cmpl	%eax, -8024(%rbp)
	jle	.L16
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -8032(%rbp)
.L4:
	movl	-8032(%rbp), %eax
	cmpl	-8020(%rbp), %eax
	jle	.L17
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$3960, %rsp
	.cfi_def_cfa_offset 8112
	xorl	%r14d, %r14d
	leaq	.LC0(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 8040(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rax
	leaq	28(%rsp), %r13
	movq	%rax, (%rsp)
	leaq	24(%rsp), %r12
	leaq	4032(%rsp), %rbx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L34:
	testl	%edx, %edx
	je	.L19
.L2:
	leal	-1(%r14), %eax
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	movl	%eax, 12(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	movq	(%rsp), %rsi
	movl	%r14d, %ecx
	movl	28(%rsp), %edx
	movl	%eax, 4(%rsi,%r14,4)
	movl	%edx, 4(%rbx,%r14,4)
	addq	$1, %r14
	testl	%eax, %eax
	jne	.L34
.L19:
	testl	%ecx, %ecx
	je	.L4
	leaq	4036(%rsp), %r12
	xorl	%r14d, %r14d
	.p2align 4,,10
	.p2align 3
.L5:
	movq	(%rsp), %rax
	movl	$1, %ebp
	movl	4(%rax,%r14,4), %r13d
	testl	%r13d, %r13d
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%r12), %ebx
	testb	$1, %bpl
	jne	.L6
	movl	$1, %r15d
	testl	%ebx, %ebx
	jg	.L7
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L35:
	movl	$35, %edi
	addl	$1, %r15d
	call	putchar@PLT
	cmpl	%ebx, %r15d
	jg	.L10
.L7:
	testb	$1, %r15b
	je	.L35
	movl	$46, %edi
	addl	$1, %r15d
	call	putchar@PLT
	cmpl	%ebx, %r15d
	jle	.L7
.L10:
	movl	$10, %edi
	addl	$1, %ebp
	call	putchar@PLT
	cmpl	%r13d, %ebp
	jle	.L8
.L9:
	movl	$10, %edi
	addq	$1, %r14
	addq	$4, %r12
	call	putchar@PLT
	cmpl	%r14d, 12(%rsp)
	jge	.L5
.L4:
	movq	8040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L36
	addq	$8056, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	testl	%ebx, %ebx
	jle	.L10
	movl	$1, %r15d
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L37:
	movl	$35, %edi
	call	putchar@PLT
.L12:
	addl	$1, %r15d
	cmpl	%ebx, %r15d
	jg	.L10
.L13:
	testb	$1, %r15b
	jne	.L37
	movl	$46, %edi
	call	putchar@PLT
	jmp	.L12
.L36:
	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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$3960, %rsp
	.cfi_def_cfa_offset 8112
	xorl	%r14d, %r14d
	leaq	.LC0(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 8040(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rax
	leaq	28(%rsp), %r13
	movq	%rax, (%rsp)
	leaq	24(%rsp), %r12
	leaq	4032(%rsp), %rbx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L34:
	testl	%edx, %edx
	je	.L19
.L2:
	leal	-1(%r14), %eax
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	movl	%eax, 12(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	movq	(%rsp), %rsi
	movl	%r14d, %ecx
	movl	28(%rsp), %edx
	movl	%eax, 4(%rsi,%r14,4)
	movl	%edx, 4(%rbx,%r14,4)
	addq	$1, %r14
	testl	%eax, %eax
	jne	.L34
.L19:
	testl	%ecx, %ecx
	je	.L4
	leaq	4036(%rsp), %r12
	xorl	%r14d, %r14d
	.p2align 4,,10
	.p2align 3
.L5:
	movq	(%rsp), %rax
	movl	$1, %ebp
	movl	4(%rax,%r14,4), %r13d
	testl	%r13d, %r13d
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%r12), %ebx
	testb	$1, %bpl
	jne	.L6
	movl	$1, %r15d
	testl	%ebx, %ebx
	jg	.L7
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L35:
	movl	$35, %edi
	addl	$1, %r15d
	call	putchar@PLT
	cmpl	%ebx, %r15d
	jg	.L10
.L7:
	testb	$1, %r15b
	je	.L35
	movl	$46, %edi
	addl	$1, %r15d
	call	putchar@PLT
	cmpl	%ebx, %r15d
	jle	.L7
.L10:
	movl	$10, %edi
	addl	$1, %ebp
	call	putchar@PLT
	cmpl	%r13d, %ebp
	jle	.L8
.L9:
	movl	$10, %edi
	addq	$1, %r14
	addq	$4, %r12
	call	putchar@PLT
	cmpl	%r14d, 12(%rsp)
	jge	.L5
.L4:
	movq	8040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L36
	addq	$8056, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	testl	%ebx, %ebx
	jle	.L10
	movl	$1, %r15d
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L37:
	movl	$35, %edi
	call	putchar@PLT
.L12:
	addl	$1, %r15d
	cmpl	%ebx, %r15d
	jg	.L10
.L13:
	testb	$1, %r15b
	jne	.L37
	movl	$46, %edi
	call	putchar@PLT
	jmp	.L12
.L36:
	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,i=1,j,k,arr1[1000],arr2[1000],count=-1;
          do
          {
                    scanf("%d%d",&h,&w);
                    arr1[i]=h;
                    arr2[i]=w;
                    i++;
                    count++;

          }while((h!=0)&&(w!=0));
          for(i=1;i<=count;i++)
          {
                    k=1;
                    while(k<=arr1[i])
                    {
                              if(k%2!=0){
                              for(j=1;j<=arr2[i];j++)
                              {
                                        if(j%2!=0)
                                                  printf("#");
                                        else if(j%2==0)
                                                  printf(".");
                              }}
                              if(k%2==0){
                              for(j=1;j<=arr2[i];j++)
                              {
                                        if(j%2==0)
                                                  printf("#");
                                        else if(j%2!=0)
                                                  printf(".");
                              }}
                              printf("\n");
                              k++;
                    }
                    printf("\n");
          }
}


3 4
5 6
3 3
2 2
1 0
0 0
 3 7
5 6
3 3
2 2
1 0
0 0
 3 7
5 6
3 0
2 2
1 0
0 0
 6 7
5 6
3 0
2 2
1 0
0 0
 6 11
5 6
3 0
2 2
1 0
0 0
 3 4
5 6
2 3
2 2
1 1
0 0
 3 4
5 6
3 3
2 4
1 0
0 0
 3 7
5 6
4 3
2 2
1 0
0 0
 3 7
5 5
3 0
2 2
1 0
0 0
 6 7
5 6
3 0
0 2
1 0
0 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,i=1,j,k,arr1[1000],arr2[1000],count=-1;
          do
          {
                    scanf("%d%d",&h,&w);
                    arr1[i]=h;
                    arr2[i]=w;
                    i++;
                    count++;

          }while((h!=0)&&(w!=0));
          for(i=1;i<=count;i++)
          {
                    k=1;
                    while(k<=arr1[i])
                    {
                              if(k%2!=0){
                              for(j=1;j<=arr2[i];j++)
                              {
                                        if(j%2!=0)
                                                  printf("#");
                                        else if(j%2==0)
                                                  printf(".");
                              }}
                              if(k%2==0){
                              for(j=1;j<=arr2[i];j++)
                              {
                                        if(j%2==0)
                                                  printf("#");
                                        else if(j%2!=0)
                                                  printf(".");
                              }}
                              printf("\n");
                              k++;
                    }
                    printf("\n");
          }
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
	.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	$3952, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -8032(%rbp)
	movl	$-1, -8020(%rbp)
.L3:
	leaq	-8036(%rbp), %rdx
	leaq	-8040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-8040(%rbp), %edx
	movl	-8032(%rbp), %eax
	cltq
	movl	%edx, -8016(%rbp,%rax,4)
	movl	-8036(%rbp), %edx
	movl	-8032(%rbp), %eax
	cltq
	movl	%edx, -4016(%rbp,%rax,4)
	addl	$1, -8032(%rbp)
	addl	$1, -8020(%rbp)
	movl	-8040(%rbp), %eax
	testl	%eax, %eax
	je	.L2
	movl	-8036(%rbp), %eax
	testl	%eax, %eax
	jne	.L3
.L2:
	movl	$1, -8032(%rbp)
	jmp	.L4
.L17:
	movl	$1, -8024(%rbp)
	jmp	.L5
.L16:
	movl	-8024(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L6
	movl	$1, -8028(%rbp)
	jmp	.L7
.L10:
	movl	-8028(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L8
	movl	$35, %edi
	call	putchar@PLT
	jmp	.L9
.L8:
	movl	-8028(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L9
	movl	$46, %edi
	call	putchar@PLT
.L9:
	addl	$1, -8028(%rbp)
.L7:
	movl	-8032(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	cmpl	%eax, -8028(%rbp)
	jle	.L10
.L6:
	movl	-8024(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L11
	movl	$1, -8028(%rbp)
	jmp	.L12
.L15:
	movl	-8028(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L13
	movl	$35, %edi
	call	putchar@PLT
	jmp	.L14
.L13:
	movl	-8028(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L14
	movl	$46, %edi
	call	putchar@PLT
.L14:
	addl	$1, -8028(%rbp)
.L12:
	movl	-8032(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	cmpl	%eax, -8028(%rbp)
	jle	.L15
.L11:
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -8024(%rbp)
.L5:
	movl	-8032(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	cmpl	%eax, -8024(%rbp)
	jle	.L16
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -8032(%rbp)
.L4:
	movl	-8032(%rbp), %eax
	cmpl	-8020(%rbp), %eax
	jle	.L17
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	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"
	.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	$3952, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -8032(%rbp)
	movl	$-1, -8020(%rbp)
.L3:
	leaq	-8036(%rbp), %rdx
	leaq	-8040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-8040(%rbp), %edx
	movl	-8032(%rbp), %eax
	cltq
	movl	%edx, -8016(%rbp,%rax,4)
	movl	-8036(%rbp), %edx
	movl	-8032(%rbp), %eax
	cltq
	movl	%edx, -4016(%rbp,%rax,4)
	addl	$1, -8032(%rbp)
	addl	$1, -8020(%rbp)
	movl	-8040(%rbp), %eax
	testl	%eax, %eax
	je	.L2
	movl	-8036(%rbp), %eax
	testl	%eax, %eax
	jne	.L3
.L2:
	movl	$1, -8032(%rbp)
	jmp	.L4
.L17:
	movl	$1, -8024(%rbp)
	jmp	.L5
.L16:
	movl	-8024(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L6
	movl	$1, -8028(%rbp)
	jmp	.L7
.L10:
	movl	-8028(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L8
	movl	$35, %edi
	call	putchar@PLT
	jmp	.L9
.L8:
	movl	-8028(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L9
	movl	$46, %edi
	call	putchar@PLT
.L9:
	addl	$1, -8028(%rbp)
.L7:
	movl	-8032(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	cmpl	%eax, -8028(%rbp)
	jle	.L10
.L6:
	movl	-8024(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L11
	movl	$1, -8028(%rbp)
	jmp	.L12
.L15:
	movl	-8028(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L13
	movl	$35, %edi
	call	putchar@PLT
	jmp	.L14
.L13:
	movl	-8028(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L14
	movl	$46, %edi
	call	putchar@PLT
.L14:
	addl	$1, -8028(%rbp)
.L12:
	movl	-8032(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	cmpl	%eax, -8028(%rbp)
	jle	.L15
.L11:
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -8024(%rbp)
.L5:
	movl	-8032(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	cmpl	%eax, -8024(%rbp)
	jle	.L16
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -8032(%rbp)
.L4:
	movl	-8032(%rbp), %eax
	cmpl	-8020(%rbp), %eax
	jle	.L17
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	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:
