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(void){
  int n,u,k,v[10000],i,j,Adj[1000][1000];

  for(i=0;i<n;i++){
    for(j=0;j<n;j++){
      Adj[i][j]=0;
    }
  }
    
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d%d",&u,&k);
    for(j=0;j<k;j++){
      scanf("%d",&v[k]);
    Adj[i][v[k]-1]=1;
    }
  }

  for(i=0;i<n;i++){
    for(j=0;j<n;j++){  
    if(j==n-1)
      printf("%d\n",Adj[i][j]);
    else
     printf("%d ",Adj[i][j]);
  }
  }
  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%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
	leaq	-4038656(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1392, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -4040024(%rbp)
	jmp	.L2
.L5:
	movl	$0, -4040020(%rbp)
	jmp	.L3
.L4:
	movl	-4040020(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4040024(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	movl	$0, -4000016(%rbp,%rax,4)
	addl	$1, -4040020(%rbp)
.L3:
	movl	-4040036(%rbp), %eax
	cmpl	%eax, -4040020(%rbp)
	jl	.L4
	addl	$1, -4040024(%rbp)
.L2:
	movl	-4040036(%rbp), %eax
	cmpl	%eax, -4040024(%rbp)
	jl	.L5
	leaq	-4040036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4040024(%rbp)
	jmp	.L6
.L9:
	leaq	-4040028(%rbp), %rdx
	leaq	-4040032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4040020(%rbp)
	jmp	.L7
.L8:
	movl	-4040028(%rbp), %eax
	leaq	-4040016(%rbp), %rdx
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-4040028(%rbp), %eax
	cltq
	movl	-4040016(%rbp,%rax,4), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-4040024(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	movl	$1, -4000016(%rbp,%rax,4)
	addl	$1, -4040020(%rbp)
.L7:
	movl	-4040028(%rbp), %eax
	cmpl	%eax, -4040020(%rbp)
	jl	.L8
	addl	$1, -4040024(%rbp)
.L6:
	movl	-4040036(%rbp), %eax
	cmpl	%eax, -4040024(%rbp)
	jl	.L9
	movl	$0, -4040024(%rbp)
	jmp	.L10
.L15:
	movl	$0, -4040020(%rbp)
	jmp	.L11
.L14:
	movl	-4040036(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -4040020(%rbp)
	jne	.L12
	movl	-4040020(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4040024(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	movl	-4000016(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L12:
	movl	-4040020(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4040024(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	movl	-4000016(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L13:
	addl	$1, -4040020(%rbp)
.L11:
	movl	-4040036(%rbp), %eax
	cmpl	%eax, -4040020(%rbp)
	jl	.L14
	addl	$1, -4040024(%rbp)
.L10:
	movl	-4040036(%rbp), %eax
	cmpl	%eax, -4040024(%rbp)
	jl	.L15
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
.LC3:
	.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
	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
	leaq	-4038656(%rsp), %r11
	.cfi_def_cfa 11, 4038712
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1400, %rsp
	.cfi_def_cfa_offset 4040112
	movq	%fs:40, %rax
	movq	%rax, 4040040(%rsp)
	xorl	%eax, %eax
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	leal	-1(%rax), %edx
	leaq	40032(%rsp), %rcx
	imulq	$4000, %rdx, %rdx
	leaq	0(,%rax,4), %rbx
	leaq	44032(%rsp,%rdx), %rbp
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rcx, %rdi
	movq	%rbx, %rdx
	xorl	%esi, %esi
	call	memset@PLT
	movq	%rax, %rcx
	addq	$4000, %rcx
	cmpq	%rbp, %rcx
	jne	.L5
.L6:
	leaq	.LC0(%rip), %rbp
	leaq	20(%rsp), %rsi
	xorl	%eax, %eax
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	leaq	24(%rsp), %rax
	xorl	%r13d, %r13d
	leaq	28(%rsp), %r15
	movq	%rax, 8(%rsp)
	leaq	32(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	8(%rsp), %rsi
	movq	%r15, %rdx
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %edx
	testl	%edx, %edx
	jle	.L9
	movslq	%r13d, %rbx
	xorl	%r14d, %r14d
	movslq	%edx, %rcx
	imulq	$1000, %rbx, %rbx
	.p2align 4,,10
	.p2align 3
.L7:
	leaq	(%r12,%rcx,4), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rcx
	movl	32(%rsp,%rcx,4), %eax
	subl	$1, %eax
	cltq
	addq	%rbx, %rax
	movl	$1, 40032(%rsp,%rax,4)
	cmpl	%r14d, %ecx
	jg	.L7
.L9:
	movl	20(%rsp), %eax
	addl	$1, %r13d
	cmpl	%r13d, %eax
	jg	.L3
	testl	%eax, %eax
	jle	.L4
	leaq	40032(%rsp), %rbx
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	leaq	.LC3(%rip), %rbp
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L15:
	subl	$1, %eax
	movl	(%rbx,%r14,4), %edx
	movq	%r12, %rsi
	cmpl	%r14d, %eax
	je	.L27
	movq	%rbp, %rsi
.L27:
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %r14
	call	__printf_chk@PLT
	movl	20(%rsp), %eax
	cmpl	%r14d, %eax
	jg	.L15
	addl	$1, %r13d
	cmpl	%eax, %r13d
	jge	.L4
	addq	$4000, %rbx
	testl	%eax, %eax
	jle	.L4
	xorl	%r14d, %r14d
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L4:
	movq	4040040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$4040056, %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
.L29:
	.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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
.LC3:
	.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
	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
	leaq	-4038656(%rsp), %r11
	.cfi_def_cfa 11, 4038712
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1400, %rsp
	.cfi_def_cfa_offset 4040112
	movq	%fs:40, %rax
	movq	%rax, 4040040(%rsp)
	xorl	%eax, %eax
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	leal	-1(%rax), %edx
	leaq	40032(%rsp), %rcx
	imulq	$4000, %rdx, %rdx
	leaq	0(,%rax,4), %rbx
	leaq	44032(%rsp,%rdx), %rbp
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rcx, %rdi
	movq	%rbx, %rdx
	xorl	%esi, %esi
	call	memset@PLT
	movq	%rax, %rcx
	addq	$4000, %rcx
	cmpq	%rbp, %rcx
	jne	.L5
.L6:
	leaq	.LC0(%rip), %rbp
	leaq	20(%rsp), %rsi
	xorl	%eax, %eax
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	leaq	24(%rsp), %rax
	xorl	%r13d, %r13d
	leaq	28(%rsp), %r15
	movq	%rax, 8(%rsp)
	leaq	32(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	8(%rsp), %rsi
	movq	%r15, %rdx
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %edx
	testl	%edx, %edx
	jle	.L9
	movslq	%r13d, %rbx
	xorl	%r14d, %r14d
	movslq	%edx, %rcx
	imulq	$1000, %rbx, %rbx
	.p2align 4,,10
	.p2align 3
.L7:
	leaq	(%r12,%rcx,4), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rcx
	movl	32(%rsp,%rcx,4), %eax
	subl	$1, %eax
	cltq
	addq	%rbx, %rax
	movl	$1, 40032(%rsp,%rax,4)
	cmpl	%r14d, %ecx
	jg	.L7
.L9:
	movl	20(%rsp), %eax
	addl	$1, %r13d
	cmpl	%r13d, %eax
	jg	.L3
	testl	%eax, %eax
	jle	.L4
	leaq	40032(%rsp), %rbx
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	leaq	.LC3(%rip), %rbp
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L15:
	subl	$1, %eax
	movl	(%rbx,%r14,4), %edx
	movq	%r12, %rsi
	cmpl	%r14d, %eax
	je	.L27
	movq	%rbp, %rsi
.L27:
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %r14
	call	__printf_chk@PLT
	movl	20(%rsp), %eax
	cmpl	%r14d, %eax
	jg	.L15
	addl	$1, %r13d
	cmpl	%eax, %r13d
	jge	.L4
	addq	$4000, %rbx
	testl	%eax, %eax
	jle	.L4
	xorl	%r14d, %r14d
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L4:
	movq	4040040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$4040056, %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
.L29:
	.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:

#include<stdio.h>

int main(void){
  int n,u,k,v[10000],i,j,Adj[1000][1000];

  for(i=0;i<n;i++){
    for(j=0;j<n;j++){
      Adj[i][j]=0;
    }
  }
    
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d%d",&u,&k);
    for(j=0;j<k;j++){
      scanf("%d",&v[k]);
    Adj[i][v[k]-1]=1;
    }
  }

  for(i=0;i<n;i++){
    for(j=0;j<n;j++){  
    if(j==n-1)
      printf("%d\n",Adj[i][j]);
    else
     printf("%d ",Adj[i][j]);
  }
  }
  return 0;
}


4
1 2 2 4
2 1 1
3 0
4 1 3
 4
1 2 0 4
2 1 1
3 0
4 1 3
 4
1 2 1 4
2 1 1
3 0
4 1 3
 4
1 2 2 4
2 1 4
3 -1
4 1 3
 4
1 2 1 4
2 1 2
3 0
4 1 3
 4
1 2 1 4
2 1 4
1 -1
4 1 3
 4
1 2 2 4
2 1 4
3 -1
4 1 1
 4
1 2 0 4
2 1 2
3 0
4 1 3
 4
1 2 0 4
2 1 4
3 0
0 1 3
 4
1 2 0 4
2 1 3
3 0
4 1 3

0 1 0 1
1 0 0 0
0 0 0 0
0 0 1 0
 0 0 0 1
1 0 0 0
0 0 0 0
0 0 1 0
 1 0 0 1
1 0 0 0
0 0 0 0
0 0 1 0
 0 1 0 1
0 0 0 1
0 0 0 0
0 0 1 0
 1 0 0 1
0 1 0 0
0 0 0 0
0 0 1 0
 1 0 0 1
0 0 0 1
0 0 0 0
0 0 1 0
 0 1 0 1
0 0 0 1
0 0 0 0
1 0 0 0
 0 0 0 1
0 1 0 0
0 0 0 0
0 0 1 0
 0 0 0 1
0 0 0 1
0 0 0 0
0 0 1 0
 0 0 0 1
0 0 1 0
0 0 0 0
0 0 1 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(void){
  int n,u,k,v[10000],i,j,Adj[1000][1000];

  for(i=0;i<n;i++){
    for(j=0;j<n;j++){
      Adj[i][j]=0;
    }
  }
    
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d%d",&u,&k);
    for(j=0;j<k;j++){
      scanf("%d",&v[k]);
    Adj[i][v[k]-1]=1;
    }
  }

  for(i=0;i<n;i++){
    for(j=0;j<n;j++){  
    if(j==n-1)
      printf("%d\n",Adj[i][j]);
    else
     printf("%d ",Adj[i][j]);
  }
  }
  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%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
	leaq	-4038656(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1392, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -4040024(%rbp)
	jmp	.L2
.L5:
	movl	$0, -4040020(%rbp)
	jmp	.L3
.L4:
	movl	-4040020(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4040024(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	movl	$0, -4000016(%rbp,%rax,4)
	addl	$1, -4040020(%rbp)
.L3:
	movl	-4040036(%rbp), %eax
	cmpl	%eax, -4040020(%rbp)
	jl	.L4
	addl	$1, -4040024(%rbp)
.L2:
	movl	-4040036(%rbp), %eax
	cmpl	%eax, -4040024(%rbp)
	jl	.L5
	leaq	-4040036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4040024(%rbp)
	jmp	.L6
.L9:
	leaq	-4040028(%rbp), %rdx
	leaq	-4040032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4040020(%rbp)
	jmp	.L7
.L8:
	movl	-4040028(%rbp), %eax
	leaq	-4040016(%rbp), %rdx
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-4040028(%rbp), %eax
	cltq
	movl	-4040016(%rbp,%rax,4), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-4040024(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	movl	$1, -4000016(%rbp,%rax,4)
	addl	$1, -4040020(%rbp)
.L7:
	movl	-4040028(%rbp), %eax
	cmpl	%eax, -4040020(%rbp)
	jl	.L8
	addl	$1, -4040024(%rbp)
.L6:
	movl	-4040036(%rbp), %eax
	cmpl	%eax, -4040024(%rbp)
	jl	.L9
	movl	$0, -4040024(%rbp)
	jmp	.L10
.L15:
	movl	$0, -4040020(%rbp)
	jmp	.L11
.L14:
	movl	-4040036(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -4040020(%rbp)
	jne	.L12
	movl	-4040020(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4040024(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	movl	-4000016(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L12:
	movl	-4040020(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4040024(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	movl	-4000016(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L13:
	addl	$1, -4040020(%rbp)
.L11:
	movl	-4040036(%rbp), %eax
	cmpl	%eax, -4040020(%rbp)
	jl	.L14
	addl	$1, -4040024(%rbp)
.L10:
	movl	-4040036(%rbp), %eax
	cmpl	%eax, -4040024(%rbp)
	jl	.L15
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%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
	leaq	-4038656(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1392, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -4040024(%rbp)
	jmp	.L2
.L5:
	movl	$0, -4040020(%rbp)
	jmp	.L3
.L4:
	movl	-4040020(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4040024(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	movl	$0, -4000016(%rbp,%rax,4)
	addl	$1, -4040020(%rbp)
.L3:
	movl	-4040036(%rbp), %eax
	cmpl	%eax, -4040020(%rbp)
	jl	.L4
	addl	$1, -4040024(%rbp)
.L2:
	movl	-4040036(%rbp), %eax
	cmpl	%eax, -4040024(%rbp)
	jl	.L5
	leaq	-4040036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4040024(%rbp)
	jmp	.L6
.L9:
	leaq	-4040028(%rbp), %rdx
	leaq	-4040032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4040020(%rbp)
	jmp	.L7
.L8:
	movl	-4040028(%rbp), %eax
	leaq	-4040016(%rbp), %rdx
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-4040028(%rbp), %eax
	cltq
	movl	-4040016(%rbp,%rax,4), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-4040024(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	movl	$1, -4000016(%rbp,%rax,4)
	addl	$1, -4040020(%rbp)
.L7:
	movl	-4040028(%rbp), %eax
	cmpl	%eax, -4040020(%rbp)
	jl	.L8
	addl	$1, -4040024(%rbp)
.L6:
	movl	-4040036(%rbp), %eax
	cmpl	%eax, -4040024(%rbp)
	jl	.L9
	movl	$0, -4040024(%rbp)
	jmp	.L10
.L15:
	movl	$0, -4040020(%rbp)
	jmp	.L11
.L14:
	movl	-4040036(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -4040020(%rbp)
	jne	.L12
	movl	-4040020(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4040024(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	movl	-4000016(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L12:
	movl	-4040020(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4040024(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	movl	-4000016(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L13:
	addl	$1, -4040020(%rbp)
.L11:
	movl	-4040036(%rbp), %eax
	cmpl	%eax, -4040020(%rbp)
	jl	.L14
	addl	$1, -4040024(%rbp)
.L10:
	movl	-4040036(%rbp), %eax
	cmpl	%eax, -4040024(%rbp)
	jl	.L15
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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:
