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 100000
#define NIL -1
void depth(int a, int i);
void print(int a,int i);

int parent[MAX],left[MAX],right[MAX],D[MAX];

int main(){
  int i,j,n1,n2,le,ri,c,a,b;

  scanf("%d",&n1);
  for(i=0;i<n1;i++){parent[i]=left[i]=right[i]=NIL;}

  for(i=0;i<n1;i++){
    scanf("%d%d",&a,&n2);
    for(j=0;j<n2;j++){
      scanf("%d",&c);
      if(j==0){left[a]=c;}
      else{right[le]=c;}
      le=c;
      parent[c]=a;
    }
  }
  for(i=0;i<n1;i++){if(parent[i]==NIL)ri=i;}

  depth(ri,0);
  for(i=0;i<n1;i++){print(i,n1);}

  return 0;
}

void print(int a,int n){
  int i,b;
  printf("node %d: ",a);
  printf("parent = %d, ",parent[a]);
  printf("depth = %d, ",D[a]);
  if(parent[a] == NIL) printf("root, ");
  else if(left[a] == NIL) printf("leaf, ");
  else printf("internal node, ");
  printf("[");
  for(i=0,b=left[a];b!=NIL;i++,b=right[b]){
    if(i != 0) printf(", ");
    printf("%d",b);
  }

  printf("]\n");
}

void depth(int a, int i){
  D[a] = i;
  if(right[a] != NIL) depth(right[a],i);
  if(left[a] != NIL) depth(left[a],i+1);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	parent
	.bss
	.align 32
	.type	parent, @object
	.size	parent, 400000
parent:
	.zero	400000
	.globl	left
	.align 32
	.type	left, @object
	.size	left, 400000
left:
	.zero	400000
	.globl	right
	.align 32
	.type	right, @object
	.size	right, 400000
right:
	.zero	400000
	.globl	D
	.align 32
	.type	D, @object
	.size	D, 400000
D:
	.zero	400000
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.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	$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
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	right(%rip), %rax
	movl	$-1, (%rdx,%rax)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	right(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	left(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	left(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	parent(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	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	-28(%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	-32(%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	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	left(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	jmp	.L7
.L6:
	movl	-32(%rbp), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	right(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L7:
	movl	-32(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	parent(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	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
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	parent(%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	depth
	movl	$0, -24(%rbp)
	jmp	.L13
.L14:
	movl	-40(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	print
	addl	$1, -24(%rbp)
.L13:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.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	print
	.type	print, @function
print:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	parent(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-20(%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	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	parent(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L18
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L19
.L18:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	left(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L20
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L19
.L20:
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L19:
	movl	$91, %edi
	call	putchar@PLT
	movl	$0, -8(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	left(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	jmp	.L21
.L23:
	cmpl	$0, -8(%rbp)
	je	.L22
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L22:
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -8(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	right(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
.L21:
	cmpl	$-1, -4(%rbp)
	jne	.L23
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	print, .-print
	.globl	depth
	.type	depth, @function
depth:
.LFB2:
	.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
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	right(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	je	.L25
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	right(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movl	%edx, %esi
	movl	%eax, %edi
	call	depth
.L25:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	left(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	je	.L27
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	left(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	depth
.L27:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	depth, .-depth
	.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	"node %d: "
.LC1:
	.string	"parent = %d, "
.LC2:
	.string	"depth = %d, "
.LC3:
	.string	"root, "
.LC4:
	.string	"leaf, "
.LC5:
	.string	"internal node, "
.LC6:
	.string	"]"
.LC7:
	.string	", "
.LC8:
	.string	"%d"
	.text
	.p2align 4
	.globl	print
	.type	print, @function
print:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	parent(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movslq	%edi, %rbx
	movl	$1, %edi
	movl	%ebx, %edx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__printf_chk@PLT
	movl	0(%rbp,%rbx,4), %edx
	movl	$1, %edi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	leaq	D(%rip), %rax
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	movl	(%rax,%rbx,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	$-1, 0(%rbp,%rbx,4)
	je	.L12
	leaq	left(%rip), %rbp
	cmpl	$-1, 0(%rbp,%rbx,4)
	je	.L13
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L3:
	movl	$91, %edi
	leaq	.LC8(%rip), %r12
	leaq	.LC7(%rip), %r13
	call	putchar@PLT
	movslq	0(%rbp,%rbx,4), %rbx
	leaq	right(%rip), %rbp
	cmpl	$-1, %ebx
	jne	.L5
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	movl	%ebx, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movslq	0(%rbp,%rbx,4), %rbx
	cmpl	$-1, %ebx
	jne	.L6
.L7:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	leaq	.LC6(%rip), %rdi
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	jmp	puts@PLT
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	left(%rip), %rbp
	jmp	.L3
	.cfi_endproc
.LFE24:
	.size	print, .-print
	.p2align 4
	.globl	depth
	.type	depth, @function
depth:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%edi, %rax
	leaq	D(%rip), %r9
	leaq	right(%rip), %r10
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	left(%rip), %r11
	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	$88, %rsp
	.cfi_def_cfa_offset 144
	movl	%esi, 48(%rsp)
.L34:
	movl	48(%rsp), %edi
	movq	%rax, 40(%rsp)
	movl	%edi, (%r9,%rax,4)
	movslq	(%r10,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L15
	movl	%edi, 28(%rsp)
.L32:
	movl	28(%rsp), %esi
	movq	%rax, 32(%rsp)
	movl	%esi, (%r9,%rax,4)
	movslq	(%r10,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L16
	movl	%esi, 24(%rsp)
.L31:
	movl	24(%rsp), %edi
	movl	(%r10,%rax,4), %ecx
	movq	%rax, 16(%rsp)
	movl	%edi, (%r9,%rax,4)
	cmpl	$-1, %ecx
	je	.L17
	movl	%edi, 12(%rsp)
.L30:
	movslq	%ecx, %r8
	movl	12(%rsp), %ecx
	movslq	(%r10,%r8,4), %rax
	movl	%ecx, (%r9,%r8,4)
	cmpl	$-1, %eax
	jne	.L29
.L18:
	movl	(%r11,%r8,4), %ecx
	cmpl	$-1, %ecx
	je	.L17
	addl	$1, 12(%rsp)
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L19:
	movslq	(%r11,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L18
	addl	$1, %ecx
.L29:
	movl	(%r10,%rax,4), %r12d
	movl	%ecx, (%r9,%rax,4)
	cmpl	$-1, %r12d
	je	.L19
	movl	%ecx, %r15d
.L28:
	movslq	%r12d, %r13
	movslq	(%r10,%r13,4), %rbx
	movl	%r15d, (%r9,%r13,4)
	cmpl	$-1, %ebx
	je	.L20
	movl	%r15d, %r12d
.L27:
	movslq	(%r10,%rbx,4), %r14
	movl	%r12d, (%r9,%rbx,4)
	cmpl	$-1, %r14d
	je	.L21
	movl	%r12d, %edx
.L26:
	movslq	(%r10,%r14,4), %rbp
	movl	%edx, (%r9,%r14,4)
	cmpl	$-1, %ebp
	je	.L22
	movl	(%r10,%rbp,4), %edi
	movl	%edx, %esi
	movl	%esi, (%r9,%rbp,4)
	cmpl	$-1, %edi
	je	.L23
.L89:
	movq	%rax, 72(%rsp)
	movq	%r8, 64(%rsp)
	movl	%edx, 60(%rsp)
	movl	%ecx, 56(%rsp)
	movl	%esi, 52(%rsp)
	call	depth
	leaq	left(%rip), %r11
	movl	52(%rsp), %esi
	movl	56(%rsp), %ecx
	movslq	(%r11,%rbp,4), %rbp
	movl	60(%rsp), %edx
	leaq	D(%rip), %r9
	leaq	right(%rip), %r10
	movq	64(%rsp), %r8
	movq	72(%rsp), %rax
	cmpl	$-1, %ebp
	je	.L22
	.p2align 4,,10
	.p2align 3
.L24:
	movl	(%r10,%rbp,4), %edi
	addl	$1, %esi
	movl	%esi, (%r9,%rbp,4)
	cmpl	$-1, %edi
	jne	.L89
.L23:
	movslq	(%r11,%rbp,4), %rbp
	cmpl	$-1, %ebp
	jne	.L24
.L22:
	movslq	(%r11,%r14,4), %r14
	cmpl	$-1, %r14d
	je	.L21
	addl	$1, %edx
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L21:
	movslq	(%r11,%rbx,4), %rbx
	cmpl	$-1, %ebx
	je	.L20
	addl	$1, %r12d
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L20:
	movl	(%r11,%r13,4), %r12d
	cmpl	$-1, %r12d
	je	.L19
	addl	$1, %r15d
	jmp	.L28
.L17:
	movq	16(%rsp), %rax
	movslq	(%r11,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L16
	addl	$1, 24(%rsp)
	jmp	.L31
.L16:
	movq	32(%rsp), %rax
	movslq	(%r11,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L15
	addl	$1, 28(%rsp)
	jmp	.L32
.L15:
	movq	40(%rsp), %rax
	movslq	(%r11,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L14
	addl	$1, 48(%rsp)
	jmp	.L34
.L14:
	addq	$88, %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
.LFE25:
	.size	depth, .-depth
	.section	.rodata.str1.1
.LC10:
	.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
	leaq	.LC8(%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
	movslq	40(%rsp), %rax
	testl	%eax, %eax
	jle	.L92
	leaq	0(,%rax,4), %r12
	movl	$255, %esi
	leaq	right(%rip), %rdi
	movq	%r12, %rdx
	leaq	parent(%rip), %rbx
	call	memset@PLT
	movq	%r12, %rdx
	movl	$255, %esi
	leaq	left(%rip), %rdi
	call	memset@PLT
	movq	%r12, %rdx
	movl	$255, %esi
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	44(%rsp), %rax
	leaq	48(%rsp), %r12
	movl	$0, 24(%rsp)
	movq	%rax, 8(%rsp)
	leaq	52(%rsp), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L96:
	movq	8(%rsp), %rdx
	movq	16(%rsp), %rsi
	leaq	.LC10(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	testl	%eax, %eax
	jle	.L93
	xorl	%r13d, %r13d
	jmp	.L95
	.p2align 4,,10
	.p2align 3
.L118:
	movslq	52(%rsp), %rdx
	movslq	48(%rsp), %r14
	leaq	left(%rip), %rdi
	cmpl	$1, 44(%rsp)
	movl	%r14d, (%rdi,%rdx,4)
	movl	%edx, (%rbx,%r14,4)
	jle	.L108
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	movl	$1, %r13d
	call	__isoc99_scanf@PLT
.L94:
	movl	48(%rsp), %r15d
	leaq	right(%rip), %rax
	movl	52(%rsp), %esi
	addl	$1, %r13d
	movl	%r15d, (%rax,%r14,4)
	movslq	%r15d, %rax
	movl	%esi, (%rbx,%rax,4)
	cmpl	%r13d, 44(%rsp)
	jle	.L93
.L95:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	testl	%r13d, %r13d
	je	.L118
	movslq	%r15d, %r14
	jmp	.L94
	.p2align 4,,10
	.p2align 3
.L108:
	movl	%r14d, %r15d
.L93:
	addl	$1, 24(%rsp)
	movl	40(%rsp), %eax
	movl	24(%rsp), %edx
	cmpl	%edx, %eax
	jg	.L96
	testl	%eax, %eax
	jle	.L92
	leal	-1(%rax), %edx
	cmpl	$2, %edx
	jbe	.L109
	movl	%eax, %ecx
	leaq	parent(%rip), %rdx
	pcmpeqd	%xmm3, %xmm3
	movdqa	.LC9(%rip), %xmm2
	shrl	$2, %ecx
	leaq	16(%rdx), %rsi
	movdqa	.LC11(%rip), %xmm5
	movdqa	%xmm3, %xmm4
	subl	$1, %ecx
	salq	$4, %rcx
	addq	%rsi, %rcx
	.p2align 4,,10
	.p2align 3
.L99:
	movdqa	%xmm4, %xmm0
	movdqa	%xmm2, %xmm1
	paddd	%xmm5, %xmm2
	addq	$16, %rdx
	pcmpeqd	-16(%rdx), %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm3, %xmm0
	movdqa	%xmm0, %xmm3
	por	%xmm1, %xmm3
	cmpq	%rcx, %rdx
	jne	.L99
	movdqa	%xmm3, %xmm0
	movl	$0, %ecx
	psrldq	$8, %xmm0
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm3, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm3, %xmm1
	por	%xmm0, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %edx
	cmpl	$-1, %edx
	cmove	%ecx, %edx
	movl	%edx, 28(%rsp)
	movl	%eax, %edx
	andl	$-4, %edx
	testb	$3, %al
	je	.L92
.L98:
	movl	28(%rsp), %edi
	movslq	%edx, %rcx
	cmpl	$-1, (%rbx,%rcx,4)
	leal	1(%rdx), %ecx
	cmove	%edx, %edi
	movl	%edi, 28(%rsp)
	cmpl	%ecx, %eax
	jle	.L92
	movslq	%ecx, %rsi
	cmpl	$-1, (%rbx,%rsi,4)
	cmovne	%edi, %ecx
	addl	$2, %edx
	movl	%ecx, 28(%rsp)
	cmpl	%edx, %eax
	jle	.L92
	movslq	%edx, %rax
	cmpl	$-1, (%rbx,%rax,4)
	cmovne	%ecx, %edx
	movl	%edx, 28(%rsp)
.L92:
	movl	28(%rsp), %edi
	xorl	%esi, %esi
	xorl	%ebx, %ebx
	call	depth
	movl	40(%rsp), %esi
	testl	%esi, %esi
	jle	.L105
	.p2align 4,,10
	.p2align 3
.L104:
	movl	%ebx, %edi
	addl	$1, %ebx
	call	print
	movl	40(%rsp), %esi
	cmpl	%ebx, %esi
	jg	.L104
.L105:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L119
	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
.L109:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L98
.L119:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	D
	.bss
	.align 32
	.type	D, @object
	.size	D, 400000
D:
	.zero	400000
	.globl	right
	.align 32
	.type	right, @object
	.size	right, 400000
right:
	.zero	400000
	.globl	left
	.align 32
	.type	left, @object
	.size	left, 400000
left:
	.zero	400000
	.globl	parent
	.align 32
	.type	parent, @object
	.size	parent, 400000
parent:
	.zero	400000
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC9:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC11:
	.long	4
	.long	4
	.long	4
	.long	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"node %d: "
.LC1:
	.string	"parent = %d, "
.LC2:
	.string	"depth = %d, "
.LC3:
	.string	"root, "
.LC4:
	.string	"leaf, "
.LC5:
	.string	"internal node, "
.LC6:
	.string	"]"
.LC7:
	.string	", "
.LC8:
	.string	"%d"
	.text
	.p2align 4
	.globl	print
	.type	print, @function
print:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	parent(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movslq	%edi, %rbx
	movl	$1, %edi
	movl	%ebx, %edx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__printf_chk@PLT
	movl	0(%rbp,%rbx,4), %edx
	movl	$1, %edi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	leaq	D(%rip), %rax
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	movl	(%rax,%rbx,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	$-1, 0(%rbp,%rbx,4)
	je	.L12
	leaq	left(%rip), %rbp
	cmpl	$-1, 0(%rbp,%rbx,4)
	je	.L13
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L3:
	movl	$91, %edi
	leaq	.LC8(%rip), %r12
	leaq	.LC7(%rip), %r13
	call	putchar@PLT
	movslq	0(%rbp,%rbx,4), %rbx
	leaq	right(%rip), %rbp
	cmpl	$-1, %ebx
	jne	.L5
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	movl	%ebx, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movslq	0(%rbp,%rbx,4), %rbx
	cmpl	$-1, %ebx
	jne	.L6
.L7:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	leaq	.LC6(%rip), %rdi
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	jmp	puts@PLT
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	left(%rip), %rbp
	jmp	.L3
	.cfi_endproc
.LFE24:
	.size	print, .-print
	.p2align 4
	.globl	depth
	.type	depth, @function
depth:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%edi, %rax
	leaq	D(%rip), %r9
	leaq	right(%rip), %r10
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	left(%rip), %r11
	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	$88, %rsp
	.cfi_def_cfa_offset 144
	movl	%esi, 48(%rsp)
.L34:
	movl	48(%rsp), %edi
	movq	%rax, 40(%rsp)
	movl	%edi, (%r9,%rax,4)
	movslq	(%r10,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L15
	movl	%edi, 28(%rsp)
.L32:
	movl	28(%rsp), %esi
	movq	%rax, 32(%rsp)
	movl	%esi, (%r9,%rax,4)
	movslq	(%r10,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L16
	movl	%esi, 24(%rsp)
.L31:
	movl	24(%rsp), %edi
	movl	(%r10,%rax,4), %ecx
	movq	%rax, 16(%rsp)
	movl	%edi, (%r9,%rax,4)
	cmpl	$-1, %ecx
	je	.L17
	movl	%edi, 12(%rsp)
.L30:
	movslq	%ecx, %r8
	movl	12(%rsp), %ecx
	movslq	(%r10,%r8,4), %rax
	movl	%ecx, (%r9,%r8,4)
	cmpl	$-1, %eax
	jne	.L29
.L18:
	movl	(%r11,%r8,4), %ecx
	cmpl	$-1, %ecx
	je	.L17
	addl	$1, 12(%rsp)
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L19:
	movslq	(%r11,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L18
	addl	$1, %ecx
.L29:
	movl	(%r10,%rax,4), %r12d
	movl	%ecx, (%r9,%rax,4)
	cmpl	$-1, %r12d
	je	.L19
	movl	%ecx, %r15d
.L28:
	movslq	%r12d, %r13
	movslq	(%r10,%r13,4), %rbx
	movl	%r15d, (%r9,%r13,4)
	cmpl	$-1, %ebx
	je	.L20
	movl	%r15d, %r12d
.L27:
	movslq	(%r10,%rbx,4), %r14
	movl	%r12d, (%r9,%rbx,4)
	cmpl	$-1, %r14d
	je	.L21
	movl	%r12d, %edx
.L26:
	movslq	(%r10,%r14,4), %rbp
	movl	%edx, (%r9,%r14,4)
	cmpl	$-1, %ebp
	je	.L22
	movl	(%r10,%rbp,4), %edi
	movl	%edx, %esi
	movl	%esi, (%r9,%rbp,4)
	cmpl	$-1, %edi
	je	.L23
.L89:
	movq	%rax, 72(%rsp)
	movq	%r8, 64(%rsp)
	movl	%edx, 60(%rsp)
	movl	%ecx, 56(%rsp)
	movl	%esi, 52(%rsp)
	call	depth
	leaq	left(%rip), %r11
	movl	52(%rsp), %esi
	movl	56(%rsp), %ecx
	movslq	(%r11,%rbp,4), %rbp
	movl	60(%rsp), %edx
	leaq	D(%rip), %r9
	leaq	right(%rip), %r10
	movq	64(%rsp), %r8
	movq	72(%rsp), %rax
	cmpl	$-1, %ebp
	je	.L22
	.p2align 4,,10
	.p2align 3
.L24:
	movl	(%r10,%rbp,4), %edi
	addl	$1, %esi
	movl	%esi, (%r9,%rbp,4)
	cmpl	$-1, %edi
	jne	.L89
.L23:
	movslq	(%r11,%rbp,4), %rbp
	cmpl	$-1, %ebp
	jne	.L24
.L22:
	movslq	(%r11,%r14,4), %r14
	cmpl	$-1, %r14d
	je	.L21
	addl	$1, %edx
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L21:
	movslq	(%r11,%rbx,4), %rbx
	cmpl	$-1, %ebx
	je	.L20
	addl	$1, %r12d
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L20:
	movl	(%r11,%r13,4), %r12d
	cmpl	$-1, %r12d
	je	.L19
	addl	$1, %r15d
	jmp	.L28
.L17:
	movq	16(%rsp), %rax
	movslq	(%r11,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L16
	addl	$1, 24(%rsp)
	jmp	.L31
.L16:
	movq	32(%rsp), %rax
	movslq	(%r11,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L15
	addl	$1, 28(%rsp)
	jmp	.L32
.L15:
	movq	40(%rsp), %rax
	movslq	(%r11,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L14
	addl	$1, 48(%rsp)
	jmp	.L34
.L14:
	addq	$88, %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
.LFE25:
	.size	depth, .-depth
	.section	.rodata.str1.1
.LC10:
	.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
	leaq	.LC8(%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
	movslq	40(%rsp), %rax
	testl	%eax, %eax
	jle	.L92
	leaq	0(,%rax,4), %r12
	movl	$255, %esi
	leaq	right(%rip), %rdi
	movq	%r12, %rdx
	leaq	parent(%rip), %rbx
	call	memset@PLT
	movq	%r12, %rdx
	movl	$255, %esi
	leaq	left(%rip), %rdi
	call	memset@PLT
	movq	%r12, %rdx
	movl	$255, %esi
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	44(%rsp), %rax
	leaq	48(%rsp), %r12
	movl	$0, 24(%rsp)
	movq	%rax, 8(%rsp)
	leaq	52(%rsp), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L96:
	movq	8(%rsp), %rdx
	movq	16(%rsp), %rsi
	leaq	.LC10(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	testl	%eax, %eax
	jle	.L93
	xorl	%r13d, %r13d
	jmp	.L95
	.p2align 4,,10
	.p2align 3
.L118:
	movslq	52(%rsp), %rdx
	movslq	48(%rsp), %r14
	leaq	left(%rip), %rdi
	cmpl	$1, 44(%rsp)
	movl	%r14d, (%rdi,%rdx,4)
	movl	%edx, (%rbx,%r14,4)
	jle	.L108
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	movl	$1, %r13d
	call	__isoc99_scanf@PLT
.L94:
	movl	48(%rsp), %r15d
	leaq	right(%rip), %rax
	movl	52(%rsp), %esi
	addl	$1, %r13d
	movl	%r15d, (%rax,%r14,4)
	movslq	%r15d, %rax
	movl	%esi, (%rbx,%rax,4)
	cmpl	%r13d, 44(%rsp)
	jle	.L93
.L95:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	testl	%r13d, %r13d
	je	.L118
	movslq	%r15d, %r14
	jmp	.L94
	.p2align 4,,10
	.p2align 3
.L108:
	movl	%r14d, %r15d
.L93:
	addl	$1, 24(%rsp)
	movl	40(%rsp), %eax
	movl	24(%rsp), %edx
	cmpl	%edx, %eax
	jg	.L96
	testl	%eax, %eax
	jle	.L92
	leal	-1(%rax), %edx
	cmpl	$2, %edx
	jbe	.L109
	movl	%eax, %ecx
	leaq	parent(%rip), %rdx
	pcmpeqd	%xmm3, %xmm3
	movdqa	.LC9(%rip), %xmm2
	shrl	$2, %ecx
	leaq	16(%rdx), %rsi
	movdqa	.LC11(%rip), %xmm5
	movdqa	%xmm3, %xmm4
	subl	$1, %ecx
	salq	$4, %rcx
	addq	%rsi, %rcx
	.p2align 4,,10
	.p2align 3
.L99:
	movdqa	%xmm4, %xmm0
	movdqa	%xmm2, %xmm1
	paddd	%xmm5, %xmm2
	addq	$16, %rdx
	pcmpeqd	-16(%rdx), %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm3, %xmm0
	movdqa	%xmm0, %xmm3
	por	%xmm1, %xmm3
	cmpq	%rcx, %rdx
	jne	.L99
	movdqa	%xmm3, %xmm0
	movl	$0, %ecx
	psrldq	$8, %xmm0
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm3, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm3, %xmm1
	por	%xmm0, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %edx
	cmpl	$-1, %edx
	cmove	%ecx, %edx
	movl	%edx, 28(%rsp)
	movl	%eax, %edx
	andl	$-4, %edx
	testb	$3, %al
	je	.L92
.L98:
	movl	28(%rsp), %edi
	movslq	%edx, %rcx
	cmpl	$-1, (%rbx,%rcx,4)
	leal	1(%rdx), %ecx
	cmove	%edx, %edi
	movl	%edi, 28(%rsp)
	cmpl	%ecx, %eax
	jle	.L92
	movslq	%ecx, %rsi
	cmpl	$-1, (%rbx,%rsi,4)
	cmovne	%edi, %ecx
	addl	$2, %edx
	movl	%ecx, 28(%rsp)
	cmpl	%edx, %eax
	jle	.L92
	movslq	%edx, %rax
	cmpl	$-1, (%rbx,%rax,4)
	cmovne	%ecx, %edx
	movl	%edx, 28(%rsp)
.L92:
	movl	28(%rsp), %edi
	xorl	%esi, %esi
	xorl	%ebx, %ebx
	call	depth
	movl	40(%rsp), %esi
	testl	%esi, %esi
	jle	.L105
	.p2align 4,,10
	.p2align 3
.L104:
	movl	%ebx, %edi
	addl	$1, %ebx
	call	print
	movl	40(%rsp), %esi
	cmpl	%ebx, %esi
	jg	.L104
.L105:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L119
	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
.L109:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L98
.L119:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	D
	.bss
	.align 32
	.type	D, @object
	.size	D, 400000
D:
	.zero	400000
	.globl	right
	.align 32
	.type	right, @object
	.size	right, 400000
right:
	.zero	400000
	.globl	left
	.align 32
	.type	left, @object
	.size	left, 400000
left:
	.zero	400000
	.globl	parent
	.align 32
	.type	parent, @object
	.size	parent, 400000
parent:
	.zero	400000
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC9:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC11:
	.long	4
	.long	4
	.long	4
	.long	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>
#define MAX 100000
#define NIL -1
void depth(int a, int i);
void print(int a,int i);

int parent[MAX],left[MAX],right[MAX],D[MAX];

int main(){
  int i,j,n1,n2,le,ri,c,a,b;

  scanf("%d",&n1);
  for(i=0;i<n1;i++){parent[i]=left[i]=right[i]=NIL;}

  for(i=0;i<n1;i++){
    scanf("%d%d",&a,&n2);
    for(j=0;j<n2;j++){
      scanf("%d",&c);
      if(j==0){left[a]=c;}
      else{right[le]=c;}
      le=c;
      parent[c]=a;
    }
  }
  for(i=0;i<n1;i++){if(parent[i]==NIL)ri=i;}

  depth(ri,0);
  for(i=0;i<n1;i++){print(i,n1);}

  return 0;
}

void print(int a,int n){
  int i,b;
  printf("node %d: ",a);
  printf("parent = %d, ",parent[a]);
  printf("depth = %d, ",D[a]);
  if(parent[a] == NIL) printf("root, ");
  else if(left[a] == NIL) printf("leaf, ");
  else printf("internal node, ");
  printf("[");
  for(i=0,b=left[a];b!=NIL;i++,b=right[b]){
    if(i != 0) printf(", ");
    printf("%d",b);
  }

  printf("]\n");
}

void depth(int a, int i){
  D[a] = i;
  if(right[a] != NIL) depth(right[a],i);
  if(left[a] != NIL) depth(left[a],i+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 100000
#define NIL -1
void depth(int a, int i);
void print(int a,int i);

int parent[MAX],left[MAX],right[MAX],D[MAX];

int main(){
  int i,j,n1,n2,le,ri,c,a,b;

  scanf("%d",&n1);
  for(i=0;i<n1;i++){parent[i]=left[i]=right[i]=NIL;}

  for(i=0;i<n1;i++){
    scanf("%d%d",&a,&n2);
    for(j=0;j<n2;j++){
      scanf("%d",&c);
      if(j==0){left[a]=c;}
      else{right[le]=c;}
      le=c;
      parent[c]=a;
    }
  }
  for(i=0;i<n1;i++){if(parent[i]==NIL)ri=i;}

  depth(ri,0);
  for(i=0;i<n1;i++){print(i,n1);}

  return 0;
}

void print(int a,int n){
  int i,b;
  printf("node %d: ",a);
  printf("parent = %d, ",parent[a]);
  printf("depth = %d, ",D[a]);
  if(parent[a] == NIL) printf("root, ");
  else if(left[a] == NIL) printf("leaf, ");
  else printf("internal node, ");
  printf("[");
  for(i=0,b=left[a];b!=NIL;i++,b=right[b]){
    if(i != 0) printf(", ");
    printf("%d",b);
  }

  printf("]\n");
}

void depth(int a, int i){
  D[a] = i;
  if(right[a] != NIL) depth(right[a],i);
  if(left[a] != NIL) depth(left[a],i+1);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	parent
	.bss
	.align 32
	.type	parent, @object
	.size	parent, 400000
parent:
	.zero	400000
	.globl	left
	.align 32
	.type	left, @object
	.size	left, 400000
left:
	.zero	400000
	.globl	right
	.align 32
	.type	right, @object
	.size	right, 400000
right:
	.zero	400000
	.globl	D
	.align 32
	.type	D, @object
	.size	D, 400000
D:
	.zero	400000
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.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	$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
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	right(%rip), %rax
	movl	$-1, (%rdx,%rax)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	right(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	left(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	left(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	parent(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	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	-28(%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	-32(%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	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	left(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	jmp	.L7
.L6:
	movl	-32(%rbp), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	right(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L7:
	movl	-32(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	parent(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	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
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	parent(%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	depth
	movl	$0, -24(%rbp)
	jmp	.L13
.L14:
	movl	-40(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	print
	addl	$1, -24(%rbp)
.L13:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.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	print
	.type	print, @function
print:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	parent(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-20(%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	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	parent(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L18
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L19
.L18:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	left(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L20
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L19
.L20:
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L19:
	movl	$91, %edi
	call	putchar@PLT
	movl	$0, -8(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	left(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	jmp	.L21
.L23:
	cmpl	$0, -8(%rbp)
	je	.L22
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L22:
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -8(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	right(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
.L21:
	cmpl	$-1, -4(%rbp)
	jne	.L23
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	print, .-print
	.globl	depth
	.type	depth, @function
depth:
.LFB2:
	.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
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	right(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	je	.L25
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	right(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movl	%edx, %esi
	movl	%eax, %edi
	call	depth
.L25:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	left(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	je	.L27
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	left(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	depth
.L27:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	depth, .-depth
	.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	parent
	.bss
	.align 32
	.type	parent, @object
	.size	parent, 400000
parent:
	.zero	400000
	.globl	left
	.align 32
	.type	left, @object
	.size	left, 400000
left:
	.zero	400000
	.globl	right
	.align 32
	.type	right, @object
	.size	right, 400000
right:
	.zero	400000
	.globl	D
	.align 32
	.type	D, @object
	.size	D, 400000
D:
	.zero	400000
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.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	$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
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	right(%rip), %rax
	movl	$-1, (%rdx,%rax)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	right(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	left(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	left(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	parent(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	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	-28(%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	-32(%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	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	left(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	jmp	.L7
.L6:
	movl	-32(%rbp), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	right(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L7:
	movl	-32(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	parent(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	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
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	parent(%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	depth
	movl	$0, -24(%rbp)
	jmp	.L13
.L14:
	movl	-40(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	print
	addl	$1, -24(%rbp)
.L13:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.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	print
	.type	print, @function
print:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	parent(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-20(%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	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	parent(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L18
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L19
.L18:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	left(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L20
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L19
.L20:
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L19:
	movl	$91, %edi
	call	putchar@PLT
	movl	$0, -8(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	left(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	jmp	.L21
.L23:
	cmpl	$0, -8(%rbp)
	je	.L22
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L22:
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -8(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	right(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
.L21:
	cmpl	$-1, -4(%rbp)
	jne	.L23
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	print, .-print
	.globl	depth
	.type	depth, @function
depth:
.LFB2:
	.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
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	right(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	je	.L25
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	right(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movl	%edx, %esi
	movl	%eax, %edi
	call	depth
.L25:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	left(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	je	.L27
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	left(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	depth
.L27:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	depth, .-depth
	.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:
