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>
#define MAX 100005
#define NIL -1

typedef struct{
  int p;
  int l;
  int r;
}Node;

int rec(int,int);

Node T[MAX];
int n,D[MAX];

int main(){

  int n,i,j,d,v,c,l,r;

  scanf("%d",&n);
  for(i=0;i<n;i++) T[i].p=T[i].l=T[i].r=NIL;

  for(i=0;i<n;i++){
    scanf("%d%d",&v,&d);
    
    for(j=0;j<d;j++){
      scanf("%d",&c);

      if(j==0) T[v].l=c;
      else T[l].r=c;
      
      l=c;
      T[c].p=v;
    }
  }
  for(i=0;i<n;i++){
    if(T[i].p==NIL) r=i;
  }

  rec(r,0);
  
  for(i=0;i<n;i++){
    printf("node %d: ",i);
    printf("parent = %d, ",T[i].p);
    printf("depth = %d, ",D[i]);
    
    if(T[i].p==NIL) printf("root, ");
    else if(T[i].l==NIL)printf("leaf, ");
    else printf("internal node, ");

    printf("[");
    for(j=0,c=T[i].l;c!=NIL;j++,c=T[c].r){
      if(j) printf(", ");
      printf("%d",c);
    }
    
    printf("]\n");
  }
  
    return 0;
}

int rec(int u,int p){

  D[u]=p;
  if(T[u].r!=NIL) rec(T[u].r,p);
  if(T[u].l!=NIL) rec(T[u].l,p+1);
}



/*
#include<stdio.h>
#define MAX 100005
#define NIL -1
  
typedef struct{
  int p;
  int l;
  int r;
}Node;
  
int rec(int,int);
  
Node T[MAX];
int n,D[MAX];
  
int main(){
  
  int n,i,j,d,v,c,l,r;
  
  scanf("%d",&n);
  for(i=0;i<n;i++) T[i].p=T[i].l=T[i].r=NIL;
  
  for(i=0;i<n;i++){
    scanf("%d%d",&v,&d);
      
    for(j=0;j<d;j++){
      scanf("%d",&c);
  
      if(j==0) T[v].l=c;
      else T[l].r=c;
        
      l=c;
      T[c].p=v;
    }
  }
  for(i=0;i<n;i++){
    if(T[i].p==NIL) r=i;
  }
  
  rec(r,0);
    
  for(i=0;i<n;i++){
    printf("node %d: ",i);
    printf("parent = %d, ",T[i].p);
    printf("depth = %d, ",D[i]);
      
    if(T[i].p==NIL) printf("root, ");
    else if(T[i].l==NIL)printf("leaf, ");
    else printf("internal node, ");
  
    printf("[");
    for(j=0,c=T[i].l;c!=NIL;j++,c=T[c].r){
      if(j!=0) printf(", ");
      printf("%d",c);
    }
      
    printf("]\n");
  }
    
    return 0;
}
  
int rec(int u,int p){
  
  D[u]=p;
  if(T[u].r!=NIL) rec(T[u].r,p);
  if(T[u].l!=NIL) rec(T[u].l,p+1);
}
*/

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	T
	.bss
	.align 32
	.type	T, @object
	.size	T, 1200060
T:
	.zero	1200060
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	D
	.align 32
	.type	D, @object
	.size	D, 400020
D:
	.zero	400020
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"node %d: "
.LC3:
	.string	"parent = %d, "
.LC4:
	.string	"depth = %d, "
.LC5:
	.string	"root, "
.LC6:
	.string	"leaf, "
.LC7:
	.string	"internal node, "
.LC8:
	.string	", "
.LC9:
	.string	"]"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -24(%rbp)
	jmp	.L2
.L3:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+T(%rip), %rax
	movl	$-1, (%rdx,%rax)
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+T(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+T(%rip), %rax
	movl	%edx, (%rcx,%rax)
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+T(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	T(%rip), %rax
	movl	%edx, (%rcx,%rax)
	addl	$1, -24(%rbp)
.L2:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L3
	movl	$0, -24(%rbp)
	jmp	.L4
.L9:
	leaq	-36(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L5
.L8:
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$0, -20(%rbp)
	jne	.L6
	movl	-32(%rbp), %eax
	movl	-28(%rbp), %edx
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+T(%rip), %rax
	movl	%edx, (%rcx,%rax)
	jmp	.L7
.L6:
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+T(%rip), %rax
	movl	%edx, (%rcx,%rax)
.L7:
	movl	-28(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-28(%rbp), %eax
	movl	-32(%rbp), %edx
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	T(%rip), %rax
	movl	%edx, (%rcx,%rax)
	addl	$1, -20(%rbp)
.L5:
	movl	-36(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L8
	addl	$1, -24(%rbp)
.L4:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L9
	movl	$0, -24(%rbp)
	jmp	.L10
.L12:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	T(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L11
	movl	-24(%rbp), %eax
	movl	%eax, -12(%rbp)
.L11:
	addl	$1, -24(%rbp)
.L10:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L12
	movl	-12(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	rec
	movl	$0, -24(%rbp)
	jmp	.L13
.L20:
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	T(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	T(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L14
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L15
.L14:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+T(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L16
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L15
.L16:
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L15:
	movl	$91, %edi
	call	putchar@PLT
	movl	$0, -20(%rbp)
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+T(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -28(%rbp)
	jmp	.L17
.L19:
	cmpl	$0, -20(%rbp)
	je	.L18
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L18:
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -20(%rbp)
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+T(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -28(%rbp)
.L17:
	movl	-28(%rbp), %eax
	cmpl	$-1, %eax
	jne	.L19
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	addl	$1, -24(%rbp)
.L13:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L20
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	rec
	.type	rec, @function
rec:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	D(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+T(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	je	.L24
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+T(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movl	%edx, %esi
	movl	%eax, %edi
	call	rec
.L24:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+T(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	je	.L25
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+T(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	rec
.L25:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	rec, .-rec
	.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
	.p2align 4
	.globl	rec
	.type	rec, @function
rec:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%edi, %rax
	leaq	D(%rip), %r10
	leaq	T(%rip), %r11
	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	$72, %rsp
	.cfi_def_cfa_offset 128
	movl	%esi, 28(%rsp)
.L21:
	movl	28(%rsp), %edi
	movq	%rax, 32(%rsp)
	movl	%edi, (%r10,%rax,4)
	leaq	(%rax,%rax,2), %rax
	movslq	8(%r11,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L2
	movl	%edi, 24(%rsp)
.L19:
	movl	24(%rsp), %esi
	movq	%rax, 16(%rsp)
	movl	%esi, (%r10,%rax,4)
	leaq	(%rax,%rax,2), %rax
	movslq	8(%r11,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L3
	movl	%esi, 12(%rsp)
.L18:
	movl	12(%rsp), %edi
	movq	%rax, (%rsp)
	movl	%edi, (%r10,%rax,4)
	leaq	(%rax,%rax,2), %rax
	movslq	8(%r11,%rax,4), %r8
	cmpl	$-1, %r8d
	je	.L4
	movl	%edi, 8(%rsp)
.L17:
	leaq	(%r8,%r8,2), %rax
	movl	8(%rsp), %r9d
	movslq	8(%r11,%rax,4), %r15
	movl	%r9d, (%r10,%r8,4)
	cmpl	$-1, %r15d
	jne	.L16
.L5:
	leaq	(%r8,%r8,2), %rax
	movslq	4(%r11,%rax,4), %r8
	cmpl	$-1, %r8d
	je	.L4
	addl	$1, 8(%rsp)
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	(%r15,%r15,2), %rax
	movslq	4(%r11,%rax,4), %r15
	cmpl	$-1, %r15d
	je	.L5
	addl	$1, %r9d
.L16:
	leaq	(%r15,%r15,2), %rax
	movl	%r9d, (%r10,%r15,4)
	movslq	8(%r11,%rax,4), %rbp
	cmpl	$-1, %ebp
	je	.L6
	movl	%r9d, %edx
.L15:
	leaq	0(%rbp,%rbp,2), %rax
	movl	%edx, (%r10,%rbp,4)
	movslq	8(%r11,%rax,4), %rbx
	cmpl	$-1, %ebx
	je	.L7
	movl	%edx, %r12d
.L14:
	leaq	(%rbx,%rbx,2), %rax
	movl	%r12d, (%r10,%rbx,4)
	movslq	8(%r11,%rax,4), %r13
	cmpl	$-1, %r13d
	je	.L8
	movl	%r12d, %ecx
.L13:
	leaq	0(%r13,%r13,2), %rax
	movl	%ecx, (%r10,%r13,4)
	movslq	8(%r11,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L9
	movl	%ecx, %esi
.L12:
	movl	%esi, (%r10,%rax,4)
	leaq	(%rax,%rax,2), %rax
	leaq	(%r11,%rax,4), %r14
	movl	8(%r14), %edi
	cmpl	$-1, %edi
	je	.L10
	movq	%r8, 56(%rsp)
	movl	%ecx, 52(%rsp)
	movl	%edx, 48(%rsp)
	movl	%r9d, 44(%rsp)
	movl	%esi, 40(%rsp)
	call	rec
	movslq	4(%r14), %rax
	movl	40(%rsp), %esi
	leaq	D(%rip), %r10
	movl	44(%rsp), %r9d
	movl	48(%rsp), %edx
	leaq	T(%rip), %r11
	cmpl	$-1, %eax
	movl	52(%rsp), %ecx
	movq	56(%rsp), %r8
	je	.L9
	.p2align 4,,10
	.p2align 3
.L11:
	addl	$1, %esi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L8:
	leaq	(%rbx,%rbx,2), %rax
	movslq	4(%r11,%rax,4), %rbx
	cmpl	$-1, %ebx
	je	.L7
	addl	$1, %r12d
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	4(%r14), %rax
	cmpl	$-1, %eax
	jne	.L11
.L9:
	leaq	0(%r13,%r13,2), %rax
	movslq	4(%r11,%rax,4), %r13
	cmpl	$-1, %r13d
	je	.L8
	addl	$1, %ecx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L7:
	leaq	0(%rbp,%rbp,2), %rax
	movslq	4(%r11,%rax,4), %rbp
	cmpl	$-1, %ebp
	je	.L6
	addl	$1, %edx
	jmp	.L15
.L4:
	movq	(%rsp), %rax
	leaq	(%rax,%rax,2), %rax
	movslq	4(%r11,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L3
	addl	$1, 12(%rsp)
	jmp	.L18
.L3:
	movq	16(%rsp), %rax
	leaq	(%rax,%rax,2), %rax
	movslq	4(%r11,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L2
	addl	$1, 24(%rsp)
	jmp	.L19
.L2:
	movq	32(%rsp), %rax
	leaq	(%rax,%rax,2), %rax
	movslq	4(%r11,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L20
	addl	$1, 28(%rsp)
	jmp	.L21
.L20:
	addq	$72, %rsp
	.cfi_def_cfa_offset 56
	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
.LFE24:
	.size	rec, .-rec
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"node %d: "
.LC4:
	.string	"parent = %d, "
.LC5:
	.string	"depth = %d, "
.LC6:
	.string	"root, "
.LC7:
	.string	"leaf, "
.LC8:
	.string	"internal node, "
.LC9:
	.string	"]"
.LC10:
	.string	", "
	.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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %rdi
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %esi
	testl	%esi, %esi
	jle	.L79
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L100
	movl	%esi, %edx
	leaq	T(%rip), %rbx
	pcmpeqd	%xmm0, %xmm0
	shrl	$2, %edx
	leaq	48(%rbx), %rdi
	movq	%rbx, %rax
	subl	$1, %edx
	leaq	(%rdx,%rdx,2), %rdx
	salq	$4, %rdx
	addq	%rdi, %rdx
	.p2align 4,,10
	.p2align 3
.L81:
	movaps	%xmm0, (%rax)
	addq	$48, %rax
	movaps	%xmm0, -32(%rax)
	movaps	%xmm0, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L81
	movl	%esi, %eax
	andl	$-4, %eax
	testb	$3, %sil
	je	.L82
.L80:
	movslq	%eax, %rdx
	movq	.LC1(%rip), %rdi
	leaq	(%rdx,%rdx,2), %rdx
	salq	$2, %rdx
	movl	$-1, 8(%rbx,%rdx)
	movq	%rdi, (%rbx,%rdx)
	leal	1(%rax), %edx
	cmpl	%edx, %esi
	jle	.L82
	movslq	%edx, %rdx
	addl	$2, %eax
	imulq	$12, %rdx, %rdx
	movl	$-1, 8(%rbx,%rdx)
	movq	%rdi, (%rbx,%rdx)
	cmpl	%esi, %eax
	jge	.L82
	cltq
	imulq	$12, %rax, %rax
	movl	$-1, 8(%rbx,%rax)
	movq	%rdi, (%rbx,%rax)
.L82:
	leaq	44(%rsp), %rax
	movl	$0, 24(%rsp)
	leaq	52(%rsp), %r12
	movl	%r15d, %r14d
	movq	%rax, 8(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L86:
	movq	8(%rsp), %rdx
	movq	16(%rsp), %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %edx
	testl	%edx, %edx
	jle	.L83
	xorl	%r15d, %r15d
	jmp	.L85
	.p2align 4,,10
	.p2align 3
.L113:
	movslq	48(%rsp), %rdx
	movslq	52(%rsp), %r13
	cmpl	$1, 44(%rsp)
	movq	%rdx, %rax
	leaq	0(%r13,%r13,2), %rsi
	leaq	(%rdx,%rdx,2), %rdx
	movl	%r13d, 4(%rbx,%rdx,4)
	movl	%eax, (%rbx,%rsi,4)
	jle	.L102
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	movl	$1, %r15d
	call	__isoc99_scanf@PLT
.L84:
	movl	52(%rsp), %r14d
	leaq	0(%r13,%r13,2), %rax
	movl	48(%rsp), %edx
	addl	$1, %r15d
	movl	%r14d, 8(%rbx,%rax,4)
	movslq	%r14d, %rax
	leaq	(%rax,%rax,2), %rax
	movl	%edx, (%rbx,%rax,4)
	cmpl	%r15d, 44(%rsp)
	jle	.L83
.L85:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	testl	%r15d, %r15d
	je	.L113
	movslq	%r14d, %r13
	jmp	.L84
	.p2align 4,,10
	.p2align 3
.L102:
	movl	%r13d, %r14d
.L83:
	addl	$1, 24(%rsp)
	movl	40(%rsp), %esi
	movl	24(%rsp), %eax
	cmpl	%eax, %esi
	jg	.L86
	testl	%esi, %esi
	jle	.L79
	movl	28(%rsp), %ecx
	leaq	T(%rip), %rdx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L89:
	cmpl	$-1, (%rdx)
	cmove	%eax, %ecx
	addl	$1, %eax
	addq	$12, %rdx
	cmpl	%eax, %esi
	jne	.L89
	movl	%ecx, 28(%rsp)
.L79:
	movl	28(%rsp), %edi
	xorl	%esi, %esi
	leaq	T(%rip), %rbx
	xorl	%r14d, %r14d
	movq	%rbx, %r13
	leaq	D(%rip), %r15
	leaq	.LC10(%rip), %r12
	call	rec
	movl	40(%rsp), %eax
	testl	%eax, %eax
	jle	.L96
	.p2align 4,,10
	.p2align 3
.L95:
	movl	%r14d, %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	0(%r13), %edx
	movl	$1, %edi
	xorl	%eax, %eax
	leaq	.LC4(%rip), %rsi
	call	__printf_chk@PLT
	movl	(%r15,%r14,4), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC5(%rip), %rsi
	call	__printf_chk@PLT
	cmpl	$-1, 0(%r13)
	je	.L114
	cmpl	$-1, 4(%r13)
	je	.L115
	leaq	.LC8(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L92:
	movl	$91, %edi
	call	putchar@PLT
	movl	4(%r13), %edx
	movl	%edx, 52(%rsp)
	cmpl	$-1, %edx
	jne	.L94
	jmp	.L98
	.p2align 4,,10
	.p2align 3
.L97:
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	52(%rsp), %edx
.L94:
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movslq	52(%rsp), %rax
	leaq	(%rax,%rax,2), %rax
	movl	8(%rbx,%rax,4), %eax
	movl	%eax, 52(%rsp)
	cmpl	$-1, %eax
	jne	.L97
.L98:
	leaq	.LC9(%rip), %rdi
	addq	$1, %r14
	addq	$12, %r13
	call	puts@PLT
	cmpl	%r14d, 40(%rsp)
	jg	.L95
.L96:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L116
	addq	$72, %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
.L115:
	.cfi_restore_state
	leaq	.LC7(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L92
	.p2align 4,,10
	.p2align 3
.L114:
	leaq	.LC6(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L92
.L100:
	xorl	%eax, %eax
	leaq	T(%rip), %rbx
	jmp	.L80
.L116:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	D
	.bss
	.align 32
	.type	D, @object
	.size	D, 400020
D:
	.zero	400020
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	T
	.align 32
	.type	T, @object
	.size	T, 1200060
T:
	.zero	1200060
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	-1
	.long	-1
	.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
	.p2align 4
	.globl	rec
	.type	rec, @function
rec:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%edi, %rax
	leaq	D(%rip), %r10
	leaq	T(%rip), %r11
	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	$72, %rsp
	.cfi_def_cfa_offset 128
	movl	%esi, 28(%rsp)
.L21:
	movl	28(%rsp), %edi
	movq	%rax, 32(%rsp)
	movl	%edi, (%r10,%rax,4)
	leaq	(%rax,%rax,2), %rax
	movslq	8(%r11,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L2
	movl	%edi, 24(%rsp)
.L19:
	movl	24(%rsp), %esi
	movq	%rax, 16(%rsp)
	movl	%esi, (%r10,%rax,4)
	leaq	(%rax,%rax,2), %rax
	movslq	8(%r11,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L3
	movl	%esi, 12(%rsp)
.L18:
	movl	12(%rsp), %edi
	movq	%rax, (%rsp)
	movl	%edi, (%r10,%rax,4)
	leaq	(%rax,%rax,2), %rax
	movslq	8(%r11,%rax,4), %r8
	cmpl	$-1, %r8d
	je	.L4
	movl	%edi, 8(%rsp)
.L17:
	leaq	(%r8,%r8,2), %rax
	movl	8(%rsp), %r9d
	movslq	8(%r11,%rax,4), %r15
	movl	%r9d, (%r10,%r8,4)
	cmpl	$-1, %r15d
	jne	.L16
.L5:
	leaq	(%r8,%r8,2), %rax
	movslq	4(%r11,%rax,4), %r8
	cmpl	$-1, %r8d
	je	.L4
	addl	$1, 8(%rsp)
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	(%r15,%r15,2), %rax
	movslq	4(%r11,%rax,4), %r15
	cmpl	$-1, %r15d
	je	.L5
	addl	$1, %r9d
.L16:
	leaq	(%r15,%r15,2), %rax
	movl	%r9d, (%r10,%r15,4)
	movslq	8(%r11,%rax,4), %rbp
	cmpl	$-1, %ebp
	je	.L6
	movl	%r9d, %edx
.L15:
	leaq	0(%rbp,%rbp,2), %rax
	movl	%edx, (%r10,%rbp,4)
	movslq	8(%r11,%rax,4), %rbx
	cmpl	$-1, %ebx
	je	.L7
	movl	%edx, %r12d
.L14:
	leaq	(%rbx,%rbx,2), %rax
	movl	%r12d, (%r10,%rbx,4)
	movslq	8(%r11,%rax,4), %r13
	cmpl	$-1, %r13d
	je	.L8
	movl	%r12d, %ecx
.L13:
	leaq	0(%r13,%r13,2), %rax
	movl	%ecx, (%r10,%r13,4)
	movslq	8(%r11,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L9
	movl	%ecx, %esi
.L12:
	movl	%esi, (%r10,%rax,4)
	leaq	(%rax,%rax,2), %rax
	leaq	(%r11,%rax,4), %r14
	movl	8(%r14), %edi
	cmpl	$-1, %edi
	je	.L10
	movq	%r8, 56(%rsp)
	movl	%ecx, 52(%rsp)
	movl	%edx, 48(%rsp)
	movl	%r9d, 44(%rsp)
	movl	%esi, 40(%rsp)
	call	rec
	movslq	4(%r14), %rax
	movl	40(%rsp), %esi
	leaq	D(%rip), %r10
	movl	44(%rsp), %r9d
	movl	48(%rsp), %edx
	leaq	T(%rip), %r11
	cmpl	$-1, %eax
	movl	52(%rsp), %ecx
	movq	56(%rsp), %r8
	je	.L9
	.p2align 4,,10
	.p2align 3
.L11:
	addl	$1, %esi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L8:
	leaq	(%rbx,%rbx,2), %rax
	movslq	4(%r11,%rax,4), %rbx
	cmpl	$-1, %ebx
	je	.L7
	addl	$1, %r12d
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	4(%r14), %rax
	cmpl	$-1, %eax
	jne	.L11
.L9:
	leaq	0(%r13,%r13,2), %rax
	movslq	4(%r11,%rax,4), %r13
	cmpl	$-1, %r13d
	je	.L8
	addl	$1, %ecx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L7:
	leaq	0(%rbp,%rbp,2), %rax
	movslq	4(%r11,%rax,4), %rbp
	cmpl	$-1, %ebp
	je	.L6
	addl	$1, %edx
	jmp	.L15
.L4:
	movq	(%rsp), %rax
	leaq	(%rax,%rax,2), %rax
	movslq	4(%r11,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L3
	addl	$1, 12(%rsp)
	jmp	.L18
.L3:
	movq	16(%rsp), %rax
	leaq	(%rax,%rax,2), %rax
	movslq	4(%r11,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L2
	addl	$1, 24(%rsp)
	jmp	.L19
.L2:
	movq	32(%rsp), %rax
	leaq	(%rax,%rax,2), %rax
	movslq	4(%r11,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L20
	addl	$1, 28(%rsp)
	jmp	.L21
.L20:
	addq	$72, %rsp
	.cfi_def_cfa_offset 56
	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
.LFE24:
	.size	rec, .-rec
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"node %d: "
.LC4:
	.string	"parent = %d, "
.LC5:
	.string	"depth = %d, "
.LC6:
	.string	"root, "
.LC7:
	.string	"leaf, "
.LC8:
	.string	"internal node, "
.LC9:
	.string	"]"
.LC10:
	.string	", "
	.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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %rdi
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %esi
	testl	%esi, %esi
	jle	.L79
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L100
	movl	%esi, %edx
	leaq	T(%rip), %rbx
	pcmpeqd	%xmm0, %xmm0
	shrl	$2, %edx
	leaq	48(%rbx), %rdi
	movq	%rbx, %rax
	subl	$1, %edx
	leaq	(%rdx,%rdx,2), %rdx
	salq	$4, %rdx
	addq	%rdi, %rdx
	.p2align 4,,10
	.p2align 3
.L81:
	movaps	%xmm0, (%rax)
	addq	$48, %rax
	movaps	%xmm0, -32(%rax)
	movaps	%xmm0, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L81
	movl	%esi, %eax
	andl	$-4, %eax
	testb	$3, %sil
	je	.L82
.L80:
	movslq	%eax, %rdx
	movq	.LC1(%rip), %rdi
	leaq	(%rdx,%rdx,2), %rdx
	salq	$2, %rdx
	movl	$-1, 8(%rbx,%rdx)
	movq	%rdi, (%rbx,%rdx)
	leal	1(%rax), %edx
	cmpl	%edx, %esi
	jle	.L82
	movslq	%edx, %rdx
	addl	$2, %eax
	imulq	$12, %rdx, %rdx
	movl	$-1, 8(%rbx,%rdx)
	movq	%rdi, (%rbx,%rdx)
	cmpl	%esi, %eax
	jge	.L82
	cltq
	imulq	$12, %rax, %rax
	movl	$-1, 8(%rbx,%rax)
	movq	%rdi, (%rbx,%rax)
.L82:
	leaq	44(%rsp), %rax
	movl	$0, 24(%rsp)
	leaq	52(%rsp), %r12
	movl	%r15d, %r14d
	movq	%rax, 8(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L86:
	movq	8(%rsp), %rdx
	movq	16(%rsp), %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %edx
	testl	%edx, %edx
	jle	.L83
	xorl	%r15d, %r15d
	jmp	.L85
	.p2align 4,,10
	.p2align 3
.L113:
	movslq	48(%rsp), %rdx
	movslq	52(%rsp), %r13
	cmpl	$1, 44(%rsp)
	movq	%rdx, %rax
	leaq	0(%r13,%r13,2), %rsi
	leaq	(%rdx,%rdx,2), %rdx
	movl	%r13d, 4(%rbx,%rdx,4)
	movl	%eax, (%rbx,%rsi,4)
	jle	.L102
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	movl	$1, %r15d
	call	__isoc99_scanf@PLT
.L84:
	movl	52(%rsp), %r14d
	leaq	0(%r13,%r13,2), %rax
	movl	48(%rsp), %edx
	addl	$1, %r15d
	movl	%r14d, 8(%rbx,%rax,4)
	movslq	%r14d, %rax
	leaq	(%rax,%rax,2), %rax
	movl	%edx, (%rbx,%rax,4)
	cmpl	%r15d, 44(%rsp)
	jle	.L83
.L85:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	testl	%r15d, %r15d
	je	.L113
	movslq	%r14d, %r13
	jmp	.L84
	.p2align 4,,10
	.p2align 3
.L102:
	movl	%r13d, %r14d
.L83:
	addl	$1, 24(%rsp)
	movl	40(%rsp), %esi
	movl	24(%rsp), %eax
	cmpl	%eax, %esi
	jg	.L86
	testl	%esi, %esi
	jle	.L79
	movl	28(%rsp), %ecx
	leaq	T(%rip), %rdx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L89:
	cmpl	$-1, (%rdx)
	cmove	%eax, %ecx
	addl	$1, %eax
	addq	$12, %rdx
	cmpl	%eax, %esi
	jne	.L89
	movl	%ecx, 28(%rsp)
.L79:
	movl	28(%rsp), %edi
	xorl	%esi, %esi
	leaq	T(%rip), %rbx
	xorl	%r14d, %r14d
	movq	%rbx, %r13
	leaq	D(%rip), %r15
	leaq	.LC10(%rip), %r12
	call	rec
	movl	40(%rsp), %eax
	testl	%eax, %eax
	jle	.L96
	.p2align 4,,10
	.p2align 3
.L95:
	movl	%r14d, %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	0(%r13), %edx
	movl	$1, %edi
	xorl	%eax, %eax
	leaq	.LC4(%rip), %rsi
	call	__printf_chk@PLT
	movl	(%r15,%r14,4), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC5(%rip), %rsi
	call	__printf_chk@PLT
	cmpl	$-1, 0(%r13)
	je	.L114
	cmpl	$-1, 4(%r13)
	je	.L115
	leaq	.LC8(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L92:
	movl	$91, %edi
	call	putchar@PLT
	movl	4(%r13), %edx
	movl	%edx, 52(%rsp)
	cmpl	$-1, %edx
	jne	.L94
	jmp	.L98
	.p2align 4,,10
	.p2align 3
.L97:
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	52(%rsp), %edx
.L94:
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movslq	52(%rsp), %rax
	leaq	(%rax,%rax,2), %rax
	movl	8(%rbx,%rax,4), %eax
	movl	%eax, 52(%rsp)
	cmpl	$-1, %eax
	jne	.L97
.L98:
	leaq	.LC9(%rip), %rdi
	addq	$1, %r14
	addq	$12, %r13
	call	puts@PLT
	cmpl	%r14d, 40(%rsp)
	jg	.L95
.L96:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L116
	addq	$72, %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
.L115:
	.cfi_restore_state
	leaq	.LC7(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L92
	.p2align 4,,10
	.p2align 3
.L114:
	leaq	.LC6(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L92
.L100:
	xorl	%eax, %eax
	leaq	T(%rip), %rbx
	jmp	.L80
.L116:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	D
	.bss
	.align 32
	.type	D, @object
	.size	D, 400020
D:
	.zero	400020
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	T
	.align 32
	.type	T, @object
	.size	T, 1200060
T:
	.zero	1200060
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	-1
	.long	-1
	.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>
#define MAX 100005
#define NIL -1

typedef struct{
  int p;
  int l;
  int r;
}Node;

int rec(int,int);

Node T[MAX];
int n,D[MAX];

int main(){

  int n,i,j,d,v,c,l,r;

  scanf("%d",&n);
  for(i=0;i<n;i++) T[i].p=T[i].l=T[i].r=NIL;

  for(i=0;i<n;i++){
    scanf("%d%d",&v,&d);
    
    for(j=0;j<d;j++){
      scanf("%d",&c);

      if(j==0) T[v].l=c;
      else T[l].r=c;
      
      l=c;
      T[c].p=v;
    }
  }
  for(i=0;i<n;i++){
    if(T[i].p==NIL) r=i;
  }

  rec(r,0);
  
  for(i=0;i<n;i++){
    printf("node %d: ",i);
    printf("parent = %d, ",T[i].p);
    printf("depth = %d, ",D[i]);
    
    if(T[i].p==NIL) printf("root, ");
    else if(T[i].l==NIL)printf("leaf, ");
    else printf("internal node, ");

    printf("[");
    for(j=0,c=T[i].l;c!=NIL;j++,c=T[c].r){
      if(j) printf(", ");
      printf("%d",c);
    }
    
    printf("]\n");
  }
  
    return 0;
}

int rec(int u,int p){

  D[u]=p;
  if(T[u].r!=NIL) rec(T[u].r,p);
  if(T[u].l!=NIL) rec(T[u].l,p+1);
}



/*
#include<stdio.h>
#define MAX 100005
#define NIL -1
  
typedef struct{
  int p;
  int l;
  int r;
}Node;
  
int rec(int,int);
  
Node T[MAX];
int n,D[MAX];
  
int main(){
  
  int n,i,j,d,v,c,l,r;
  
  scanf("%d",&n);
  for(i=0;i<n;i++) T[i].p=T[i].l=T[i].r=NIL;
  
  for(i=0;i<n;i++){
    scanf("%d%d",&v,&d);
      
    for(j=0;j<d;j++){
      scanf("%d",&c);
  
      if(j==0) T[v].l=c;
      else T[l].r=c;
        
      l=c;
      T[c].p=v;
    }
  }
  for(i=0;i<n;i++){
    if(T[i].p==NIL) r=i;
  }
  
  rec(r,0);
    
  for(i=0;i<n;i++){
    printf("node %d: ",i);
    printf("parent = %d, ",T[i].p);
    printf("depth = %d, ",D[i]);
      
    if(T[i].p==NIL) printf("root, ");
    else if(T[i].l==NIL)printf("leaf, ");
    else printf("internal node, ");
  
    printf("[");
    for(j=0,c=T[i].l;c!=NIL;j++,c=T[c].r){
      if(j!=0) printf(", ");
      printf("%d",c);
    }
      
    printf("]\n");
  }
    
    return 0;
}
  
int rec(int u,int p){
  
  D[u]=p;
  if(T[u].r!=NIL) rec(T[u].r,p);
  if(T[u].l!=NIL) rec(T[u].l,p+1);
}
*/


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

node 0: parent = 1, depth = 1, leaf, []
node 1: parent = -1, depth = 0, root, [2, 3, 0]
node 2: parent = 1, depth = 1, leaf, []
node 3: parent = 1, depth = 1, leaf, []
 node 0: parent = 1, depth = 1, leaf, []
node 1: parent = -1, depth = 0, root, [2, 3, 0]
node 2: parent = 1, depth = 1, leaf, []
node 3: parent = 1, depth = 1, leaf, []

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>
#define MAX 100005
#define NIL -1

typedef struct{
  int p;
  int l;
  int r;
}Node;

int rec(int,int);

Node T[MAX];
int n,D[MAX];

int main(){

  int n,i,j,d,v,c,l,r;

  scanf("%d",&n);
  for(i=0;i<n;i++) T[i].p=T[i].l=T[i].r=NIL;

  for(i=0;i<n;i++){
    scanf("%d%d",&v,&d);
    
    for(j=0;j<d;j++){
      scanf("%d",&c);

      if(j==0) T[v].l=c;
      else T[l].r=c;
      
      l=c;
      T[c].p=v;
    }
  }
  for(i=0;i<n;i++){
    if(T[i].p==NIL) r=i;
  }

  rec(r,0);
  
  for(i=0;i<n;i++){
    printf("node %d: ",i);
    printf("parent = %d, ",T[i].p);
    printf("depth = %d, ",D[i]);
    
    if(T[i].p==NIL) printf("root, ");
    else if(T[i].l==NIL)printf("leaf, ");
    else printf("internal node, ");

    printf("[");
    for(j=0,c=T[i].l;c!=NIL;j++,c=T[c].r){
      if(j) printf(", ");
      printf("%d",c);
    }
    
    printf("]\n");
  }
  
    return 0;
}

int rec(int u,int p){

  D[u]=p;
  if(T[u].r!=NIL) rec(T[u].r,p);
  if(T[u].l!=NIL) rec(T[u].l,p+1);
}



/*
#include<stdio.h>
#define MAX 100005
#define NIL -1
  
typedef struct{
  int p;
  int l;
  int r;
}Node;
  
int rec(int,int);
  
Node T[MAX];
int n,D[MAX];
  
int main(){
  
  int n,i,j,d,v,c,l,r;
  
  scanf("%d",&n);
  for(i=0;i<n;i++) T[i].p=T[i].l=T[i].r=NIL;
  
  for(i=0;i<n;i++){
    scanf("%d%d",&v,&d);
      
    for(j=0;j<d;j++){
      scanf("%d",&c);
  
      if(j==0) T[v].l=c;
      else T[l].r=c;
        
      l=c;
      T[c].p=v;
    }
  }
  for(i=0;i<n;i++){
    if(T[i].p==NIL) r=i;
  }
  
  rec(r,0);
    
  for(i=0;i<n;i++){
    printf("node %d: ",i);
    printf("parent = %d, ",T[i].p);
    printf("depth = %d, ",D[i]);
      
    if(T[i].p==NIL) printf("root, ");
    else if(T[i].l==NIL)printf("leaf, ");
    else printf("internal node, ");
  
    printf("[");
    for(j=0,c=T[i].l;c!=NIL;j++,c=T[c].r){
      if(j!=0) printf(", ");
      printf("%d",c);
    }
      
    printf("]\n");
  }
    
    return 0;
}
  
int rec(int u,int p){
  
  D[u]=p;
  if(T[u].r!=NIL) rec(T[u].r,p);
  if(T[u].l!=NIL) rec(T[u].l,p+1);
}
*/

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	T
	.bss
	.align 32
	.type	T, @object
	.size	T, 1200060
T:
	.zero	1200060
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	D
	.align 32
	.type	D, @object
	.size	D, 400020
D:
	.zero	400020
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"node %d: "
.LC3:
	.string	"parent = %d, "
.LC4:
	.string	"depth = %d, "
.LC5:
	.string	"root, "
.LC6:
	.string	"leaf, "
.LC7:
	.string	"internal node, "
.LC8:
	.string	", "
.LC9:
	.string	"]"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -24(%rbp)
	jmp	.L2
.L3:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+T(%rip), %rax
	movl	$-1, (%rdx,%rax)
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+T(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+T(%rip), %rax
	movl	%edx, (%rcx,%rax)
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+T(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	T(%rip), %rax
	movl	%edx, (%rcx,%rax)
	addl	$1, -24(%rbp)
.L2:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L3
	movl	$0, -24(%rbp)
	jmp	.L4
.L9:
	leaq	-36(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L5
.L8:
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$0, -20(%rbp)
	jne	.L6
	movl	-32(%rbp), %eax
	movl	-28(%rbp), %edx
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+T(%rip), %rax
	movl	%edx, (%rcx,%rax)
	jmp	.L7
.L6:
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+T(%rip), %rax
	movl	%edx, (%rcx,%rax)
.L7:
	movl	-28(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-28(%rbp), %eax
	movl	-32(%rbp), %edx
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	T(%rip), %rax
	movl	%edx, (%rcx,%rax)
	addl	$1, -20(%rbp)
.L5:
	movl	-36(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L8
	addl	$1, -24(%rbp)
.L4:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L9
	movl	$0, -24(%rbp)
	jmp	.L10
.L12:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	T(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L11
	movl	-24(%rbp), %eax
	movl	%eax, -12(%rbp)
.L11:
	addl	$1, -24(%rbp)
.L10:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L12
	movl	-12(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	rec
	movl	$0, -24(%rbp)
	jmp	.L13
.L20:
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	T(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	T(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L14
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L15
.L14:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+T(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L16
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L15
.L16:
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L15:
	movl	$91, %edi
	call	putchar@PLT
	movl	$0, -20(%rbp)
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+T(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -28(%rbp)
	jmp	.L17
.L19:
	cmpl	$0, -20(%rbp)
	je	.L18
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L18:
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -20(%rbp)
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+T(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -28(%rbp)
.L17:
	movl	-28(%rbp), %eax
	cmpl	$-1, %eax
	jne	.L19
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	addl	$1, -24(%rbp)
.L13:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L20
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	rec
	.type	rec, @function
rec:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	D(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+T(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	je	.L24
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+T(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movl	%edx, %esi
	movl	%eax, %edi
	call	rec
.L24:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+T(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	je	.L25
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+T(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	rec
.L25:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	rec, .-rec
	.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
	.globl	T
	.bss
	.align 32
	.type	T, @object
	.size	T, 1200060
T:
	.zero	1200060
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	D
	.align 32
	.type	D, @object
	.size	D, 400020
D:
	.zero	400020
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"node %d: "
.LC3:
	.string	"parent = %d, "
.LC4:
	.string	"depth = %d, "
.LC5:
	.string	"root, "
.LC6:
	.string	"leaf, "
.LC7:
	.string	"internal node, "
.LC8:
	.string	", "
.LC9:
	.string	"]"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -24(%rbp)
	jmp	.L2
.L3:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+T(%rip), %rax
	movl	$-1, (%rdx,%rax)
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+T(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+T(%rip), %rax
	movl	%edx, (%rcx,%rax)
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+T(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	T(%rip), %rax
	movl	%edx, (%rcx,%rax)
	addl	$1, -24(%rbp)
.L2:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L3
	movl	$0, -24(%rbp)
	jmp	.L4
.L9:
	leaq	-36(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L5
.L8:
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$0, -20(%rbp)
	jne	.L6
	movl	-32(%rbp), %eax
	movl	-28(%rbp), %edx
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+T(%rip), %rax
	movl	%edx, (%rcx,%rax)
	jmp	.L7
.L6:
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+T(%rip), %rax
	movl	%edx, (%rcx,%rax)
.L7:
	movl	-28(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-28(%rbp), %eax
	movl	-32(%rbp), %edx
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	T(%rip), %rax
	movl	%edx, (%rcx,%rax)
	addl	$1, -20(%rbp)
.L5:
	movl	-36(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L8
	addl	$1, -24(%rbp)
.L4:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L9
	movl	$0, -24(%rbp)
	jmp	.L10
.L12:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	T(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L11
	movl	-24(%rbp), %eax
	movl	%eax, -12(%rbp)
.L11:
	addl	$1, -24(%rbp)
.L10:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L12
	movl	-12(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	rec
	movl	$0, -24(%rbp)
	jmp	.L13
.L20:
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	T(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	T(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L14
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L15
.L14:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+T(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L16
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L15
.L16:
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L15:
	movl	$91, %edi
	call	putchar@PLT
	movl	$0, -20(%rbp)
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+T(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -28(%rbp)
	jmp	.L17
.L19:
	cmpl	$0, -20(%rbp)
	je	.L18
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L18:
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -20(%rbp)
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+T(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -28(%rbp)
.L17:
	movl	-28(%rbp), %eax
	cmpl	$-1, %eax
	jne	.L19
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	addl	$1, -24(%rbp)
.L13:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L20
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	rec
	.type	rec, @function
rec:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	D(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+T(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	je	.L24
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+T(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movl	%edx, %esi
	movl	%eax, %edi
	call	rec
.L24:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+T(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	je	.L25
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+T(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	rec
.L25:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	rec, .-rec
	.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:
