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

```c
#include<stdio.h>
int main(){
  int n,m,b,i,j;
  int N[10][7]={
    {0,1,1,1,1,1,1},
    {0,0,0,0,1,1,0},
    {1,0,1,1,0,1,1},
    {1,0,0,1,1,1,1},
    {1,1,0,0,1,1,0},
    {1,1,0,1,1,0,1},
    {1,1,1,1,1,0,1},
    {0,1,0,0,1,1,1},
    {1,1,1,1,1,1,1},
    {1,1,0,1,1,1,1}
  };
  while(1){
    scanf("%d",&n);
    if(n==-1)break;
    for(i=0;i<n;i++){
      scanf("%d",&m);
      for(j=0;j<7;j++){
	if(i==0)printf("%d",N[m][j]);
	else{
	  if(N[m][j]==N[b][j])printf("0");
	  else                printf("1");
	}
      }
      b=m;
      printf("\n");
    }
  }
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
	.section	.rodata
	.align 32
.LC0:
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	0
	.long	0
	.long	0
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	1
	.long	0
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	0
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	0
	.long	1
	.long	0
	.long	1
	.long	0
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.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	.LC0(%rip), %rsi
	movl	$35, %ecx
	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
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$328, %rsp
	.cfi_def_cfa_offset 384
	movq	%fs:40, %rax
	movq	%rax, 312(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %r14
	leaq	24(%rsp), %rax
	movq	%r14, %rdi
	movq	%rax, 8(%rsp)
	leaq	28(%rsp), %r13
	rep movsq
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	cmpl	$-1, %eax
	je	.L2
	testl	%eax, %eax
	jle	.L10
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L9:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	testl	%ebp, %ebp
	je	.L12
	movslq	%ebx, %rdx
	xorl	%r15d, %r15d
	leaq	0(,%rdx,8), %rax
	subq	%rdx, %rax
	leaq	(%r14,%rax,4), %rbx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L18:
	movl	$49, %edi
	addq	$1, %r15
	call	putchar@PLT
	cmpq	$7, %r15
	je	.L8
.L7:
	movslq	28(%rsp), %rcx
	movslq	%r15d, %rax
	leaq	(%rax,%rcx,8), %rax
	subq	%rcx, %rax
	movl	32(%rsp,%rax,4), %eax
	cmpl	%eax, (%rbx,%r15,4)
	jne	.L18
	movl	$48, %edi
	addq	$1, %r15
	call	putchar@PLT
	cmpq	$7, %r15
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$10, %edi
	movl	28(%rsp), %ebx
	addl	$1, %ebp
	call	putchar@PLT
	cmpl	%ebp, 24(%rsp)
	jg	.L9
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	28(%rsp), %rdx
	movslq	%ebx, %rax
	movq	%r12, %rsi
	movl	$1, %edi
	addl	$1, %ebx
	leaq	(%rax,%rdx,8), %rax
	subq	%rdx, %rax
	movl	32(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	$7, %ebx
	jne	.L4
	jmp	.L8
.L2:
	movq	312(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$328, %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
.L19:
	.cfi_restore_state
	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:
```

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
.LC1:
	.string	"%d"
	.section	.rodata
	.align 32
.LC0:
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	0
	.long	0
	.long	0
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	1
	.long	0
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	0
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	0
	.long	1
	.long	0
	.long	1
	.long	0
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.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	.LC0(%rip), %rsi
	movl	$35, %ecx
	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
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$328, %rsp
	.cfi_def_cfa_offset 384
	movq	%fs:40, %rax
	movq	%rax, 312(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %r14
	leaq	24(%rsp), %rax
	movq	%r14, %rdi
	movq	%rax, 8(%rsp)
	leaq	28(%rsp), %r13
	rep movsq
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	cmpl	$-1, %eax
	je	.L2
	testl	%eax, %eax
	jle	.L10
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L9:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	testl	%ebp, %ebp
	je	.L12
	movslq	%ebx, %rdx
	xorl	%r15d, %r15d
	leaq	0(,%rdx,8), %rax
	subq	%rdx, %rax
	leaq	(%r14,%rax,4), %rbx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L18:
	movl	$49, %edi
	addq	$1, %r15
	call	putchar@PLT
	cmpq	$7, %r15
	je	.L8
.L7:
	movslq	28(%rsp), %rcx
	movslq	%r15d, %rax
	leaq	(%rax,%rcx,8), %rax
	subq	%rcx, %rax
	movl	32(%rsp,%rax,4), %eax
	cmpl	%eax, (%rbx,%r15,4)
	jne	.L18
	movl	$48, %edi
	addq	$1, %r15
	call	putchar@PLT
	cmpq	$7, %r15
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$10, %edi
	movl	28(%rsp), %ebx
	addl	$1, %ebp
	call	putchar@PLT
	cmpl	%ebp, 24(%rsp)
	jg	.L9
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	28(%rsp), %rdx
	movslq	%ebx, %rax
	movq	%r12, %rsi
	movl	$1, %edi
	addl	$1, %ebx
	leaq	(%rax,%rdx,8), %rax
	subq	%rdx, %rax
	movl	32(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	$7, %ebx
	jne	.L4
	jmp	.L8
.L2:
	movq	312(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$328, %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
.L19:
	.cfi_restore_state
	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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
	.section	.rodata
	.align 32
.LC0:
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	0
	.long	0
	.long	0
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	1
	.long	0
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	0
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	0
	.long	1
	.long	0
	.long	1
	.long	0
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.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	.LC0(%rip), %rsi
	movl	$35, %ecx
	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
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$328, %rsp
	.cfi_def_cfa_offset 384
	movq	%fs:40, %rax
	movq	%rax, 312(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %r14
	leaq	24(%rsp), %rax
	movq	%r14, %rdi
	movq	%rax, 8(%rsp)
	leaq	28(%rsp), %r13
	rep movsq
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	cmpl	$-1, %eax
	je	.L2
	testl	%eax, %eax
	jle	.L10
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L9:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	testl	%ebp, %ebp
	je	.L12
	movslq	%ebx, %rdx
	xorl	%r15d, %r15d
	leaq	0(,%rdx,8), %rax
	subq	%rdx, %rax
	leaq	(%r14,%rax,4), %rbx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L18:
	movl	$49, %edi
	addq	$1, %r15
	call	putchar@PLT
	cmpq	$7, %r15
	je	.L8
.L7:
	movslq	28(%rsp), %rcx
	movslq	%r15d, %rax
	leaq	(%rax,%rcx,8), %rax
	subq	%rcx, %rax
	movl	32(%rsp,%rax,4), %eax
	cmpl	%eax, (%rbx,%r15,4)
	jne	.L18
	movl	$48, %edi
	addq	$1, %r15
	call	putchar@PLT
	cmpq	$7, %r15
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$10, %edi
	movl	28(%rsp), %ebx
	addl	$1, %ebp
	call	putchar@PLT
	cmpl	%ebp, 24(%rsp)
	jg	.L9
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	28(%rsp), %rdx
	movslq	%ebx, %rax
	movq	%r12, %rsi
	movl	$1, %edi
	addl	$1, %ebx
	leaq	(%rax,%rdx,8), %rax
	subq	%rdx, %rax
	movl	32(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	$7, %ebx
	jne	.L4
	jmp	.L8
.L2:
	movq	312(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$328, %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
.L19:
	.cfi_restore_state
	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:
```
```c
#include<stdio.h>
int main(){
  int n,m,b,i,j;
  int N[10][7]={
    {0,1,1,1,1,1,1},
    {0,0,0,0,1,1,0},
    {1,0,1,1,0,1,1},
    {1,0,0,1,1,1,1},
    {1,1,0,0,1,1,0},
    {1,1,0,1,1,0,1},
    {1,1,1,1,1,0,1},
    {0,1,0,0,1,1,1},
    {1,1,1,1,1,1,1},
    {1,1,0,1,1,1,1}
  };
  while(1){
    scanf("%d",&n);
    if(n==-1)break;
    for(i=0;i<n;i++){
      scanf("%d",&m);
      for(j=0;j<7;j++){
	if(i==0)printf("%d",N[m][j]);
	else{
	  if(N[m][j]==N[b][j])printf("0");
	  else                printf("1");
	}
      }
      b=m;
      printf("\n");
    }
  }
  return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int main(){
  int n,m,b,i,j;
  int N[10][7]={
    {0,1,1,1,1,1,1},
    {0,0,0,0,1,1,0},
    {1,0,1,1,0,1,1},
    {1,0,0,1,1,1,1},
    {1,1,0,0,1,1,0},
    {1,1,0,1,1,0,1},
    {1,1,1,1,1,0,1},
    {0,1,0,0,1,1,1},
    {1,1,1,1,1,1,1},
    {1,1,0,1,1,1,1}
  };
  while(1){
    scanf("%d",&n);
    if(n==-1)break;
    for(i=0;i<n;i++){
      scanf("%d",&m);
      for(j=0;j<7;j++){
	if(i==0)printf("%d",N[m][j]);
	else{
	  if(N[m][j]==N[b][j])printf("0");
	  else                printf("1");
	}
      }
      b=m;
      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
0
5
1
1
1
-1
 3
0
9
1
1
0
-1
 3
0
5
1
1
2
-1
 3
1
9
1
1
0
-1
 3
0
6
1
1
2
-1
 3
1
9
0
1
0
-1
 3
0
5
0
1
0
-1
 3
1
5
1
1
0
-1
 3
0
6
1
1
1
-1
 3
0
7
1
1
0
-1

0111111
1010010
1101011
0000110
 0111111
1010000
1101001
0111111
 0111111
1010010
1101011
1011011
 0000110
1101001
1101001
0111111
 0111111
1000010
1111011
1011011
 0000110
1101001
1010000
0111111
 0111111
1010010
1010010
0111111
 0000110
1101011
1101011
0111111
 0111111
1000010
1111011
0000110
 0111111
0011000
0100001
0111111

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

```c
#include<stdio.h>
int main(){
  int n,m,b,i,j;
  int N[10][7]={
    {0,1,1,1,1,1,1},
    {0,0,0,0,1,1,0},
    {1,0,1,1,0,1,1},
    {1,0,0,1,1,1,1},
    {1,1,0,0,1,1,0},
    {1,1,0,1,1,0,1},
    {1,1,1,1,1,0,1},
    {0,1,0,0,1,1,1},
    {1,1,1,1,1,1,1},
    {1,1,0,1,1,1,1}
  };
  while(1){
    scanf("%d",&n);
    if(n==-1)break;
    for(i=0;i<n;i++){
      scanf("%d",&m);
      for(j=0;j<7;j++){
	if(i==0)printf("%d",N[m][j]);
	else{
	  if(N[m][j]==N[b][j])printf("0");
	  else                printf("1");
	}
      }
      b=m;
      printf("\n");
    }
  }
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
	.section	.rodata
	.align 32
.LC0:
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	0
	.long	0
	.long	0
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	1
	.long	0
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	0
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	0
	.long	1
	.long	0
	.long	1
	.long	0
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.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	.LC0(%rip), %rsi
	movl	$35, %ecx
	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
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$328, %rsp
	.cfi_def_cfa_offset 384
	movq	%fs:40, %rax
	movq	%rax, 312(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %r14
	leaq	24(%rsp), %rax
	movq	%r14, %rdi
	movq	%rax, 8(%rsp)
	leaq	28(%rsp), %r13
	rep movsq
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	cmpl	$-1, %eax
	je	.L2
	testl	%eax, %eax
	jle	.L10
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L9:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	testl	%ebp, %ebp
	je	.L12
	movslq	%ebx, %rdx
	xorl	%r15d, %r15d
	leaq	0(,%rdx,8), %rax
	subq	%rdx, %rax
	leaq	(%r14,%rax,4), %rbx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L18:
	movl	$49, %edi
	addq	$1, %r15
	call	putchar@PLT
	cmpq	$7, %r15
	je	.L8
.L7:
	movslq	28(%rsp), %rcx
	movslq	%r15d, %rax
	leaq	(%rax,%rcx,8), %rax
	subq	%rcx, %rax
	movl	32(%rsp,%rax,4), %eax
	cmpl	%eax, (%rbx,%r15,4)
	jne	.L18
	movl	$48, %edi
	addq	$1, %r15
	call	putchar@PLT
	cmpq	$7, %r15
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$10, %edi
	movl	28(%rsp), %ebx
	addl	$1, %ebp
	call	putchar@PLT
	cmpl	%ebp, 24(%rsp)
	jg	.L9
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	28(%rsp), %rdx
	movslq	%ebx, %rax
	movq	%r12, %rsi
	movl	$1, %edi
	addl	$1, %ebx
	leaq	(%rax,%rdx,8), %rax
	subq	%rdx, %rax
	movl	32(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	$7, %ebx
	jne	.L4
	jmp	.L8
.L2:
	movq	312(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$328, %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
.L19:
	.cfi_restore_state
	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:
```

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
.LC1:
	.string	"%d"
	.section	.rodata
	.align 32
.LC0:
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	0
	.long	0
	.long	0
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	1
	.long	0
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	0
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	0
	.long	1
	.long	0
	.long	1
	.long	0
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	1
	.long	1
	.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	.LC0(%rip), %rsi
	movl	$35, %ecx
	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
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$328, %rsp
	.cfi_def_cfa_offset 384
	movq	%fs:40, %rax
	movq	%rax, 312(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %r14
	leaq	24(%rsp), %rax
	movq	%r14, %rdi
	movq	%rax, 8(%rsp)
	leaq	28(%rsp), %r13
	rep movsq
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	cmpl	$-1, %eax
	je	.L2
	testl	%eax, %eax
	jle	.L10
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L9:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	testl	%ebp, %ebp
	je	.L12
	movslq	%ebx, %rdx
	xorl	%r15d, %r15d
	leaq	0(,%rdx,8), %rax
	subq	%rdx, %rax
	leaq	(%r14,%rax,4), %rbx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L18:
	movl	$49, %edi
	addq	$1, %r15
	call	putchar@PLT
	cmpq	$7, %r15
	je	.L8
.L7:
	movslq	28(%rsp), %rcx
	movslq	%r15d, %rax
	leaq	(%rax,%rcx,8), %rax
	subq	%rcx, %rax
	movl	32(%rsp,%rax,4), %eax
	cmpl	%eax, (%rbx,%r15,4)
	jne	.L18
	movl	$48, %edi
	addq	$1, %r15
	call	putchar@PLT
	cmpq	$7, %r15
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$10, %edi
	movl	28(%rsp), %ebx
	addl	$1, %ebp
	call	putchar@PLT
	cmpl	%ebp, 24(%rsp)
	jg	.L9
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	28(%rsp), %rdx
	movslq	%ebx, %rax
	movq	%r12, %rsi
	movl	$1, %edi
	addl	$1, %ebx
	leaq	(%rax,%rdx,8), %rax
	subq	%rdx, %rax
	movl	32(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	$7, %ebx
	jne	.L4
	jmp	.L8
.L2:
	movq	312(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$328, %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
.L19:
	.cfi_restore_state
	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:
```