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

typedef struct Node{ int parent,left,right;}Node;

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

void setDepth(int u,int d){
  if(u==NIL) return;
  D[u] = d;
  setDepth(T[u].left,d+1);
  setDepth(T[u].right,d+1);
}

int setHeight(int u){
  int h1 = 0,h2 = 0;
  if(T[u].left !=NIL) h1=setHeight(T[u].left)+1;
  if(T[u].right !=NIL) h2=setHeight(T[u].right)+1;
  return H[u] = (h1>h2?h1:h2);
}

int getSibling(int u){
  if(T[u].parent == NIL) return NIL;
  if(T[T[u].parent].left!=u&&T[T[u].parent].left!=NIL) return T[T[u].parent].left;
  if(T[T[u].parent].right!=u&&T[T[u].parent].right!=NIL) return T[T[u].parent].right;
  return NIL;
}

void print(int u){
  printf("node %d: ",u);
  printf("parent = %d, ",T[u].parent);
  printf("sibling = %d, ",getSibling(u));
  int deg=0;
  if(T[u].left != NIL) deg++;
  if(T[u].right != NIL) deg++;
  printf("degree = %d, ",deg);
  printf("depth = %d, ",D[u]);
  printf("height = %d, ",H[u]);

  if(T[u].parent == NIL){
    printf("root\n");
  }else if(T[u].left == NIL && T[u].right == NIL){
    printf("leaf\n");
  }else{
    printf("internal node\n");
  }
}

int main(){
  int v,l,r,i,root=0;
  scanf("%d",&n);

  for(i = 0;i<n;i++) T[i].parent = NIL;

  for(i=0;i<n;i++){
    scanf("%d %d %d",&v,&l,&r);
    T[v].left = l;
    T[v].right = r;
    if(l!=NIL) T[l].parent = v;
    if(r!=NIL) T[r].parent = v;
  }

  for(i = 0; i < n; i++) if(T[i].parent == NIL) root = i;

  setDepth(root,0);
  setHeight(root);

  for(i=0;i<n;i++) print(i);

  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	T
	.bss
	.align 32
	.type	T, @object
	.size	T, 120000
T:
	.zero	120000
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	D
	.align 32
	.type	D, @object
	.size	D, 40000
D:
	.zero	40000
	.globl	H
	.align 32
	.type	H, @object
	.size	H, 40000
H:
	.zero	40000
	.text
	.globl	setDepth
	.type	setDepth, @function
setDepth:
.LFB0:
	.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)
	cmpl	$-1, -4(%rbp)
	je	.L4
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	D(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	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	setDepth
	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	8+T(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	setDepth
	jmp	.L1
.L4:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	setDepth, .-setDepth
	.globl	setHeight
	.type	setHeight, @function
setHeight:
.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	$0, -8(%rbp)
	movl	$0, -4(%rbp)
	movl	-20(%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	.L6
	movl	-20(%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, %edi
	call	setHeight
	addl	$1, %eax
	movl	%eax, -8(%rbp)
.L6:
	movl	-20(%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	.L7
	movl	-20(%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, %edi
	call	setHeight
	addl	$1, %eax
	movl	%eax, -4(%rbp)
.L7:
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	H(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	H(%rip), %rax
	movl	(%rdx,%rax), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	setHeight, .-setHeight
	.globl	getSibling
	.type	getSibling, @function
getSibling:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	-4(%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	.L10
	movl	$-1, %eax
	jmp	.L11
.L10:
	movl	-4(%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
	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	%eax, -4(%rbp)
	je	.L12
	movl	-4(%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
	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	.L12
	movl	-4(%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
	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
	jmp	.L11
.L12:
	movl	-4(%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
	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	%eax, -4(%rbp)
	je	.L13
	movl	-4(%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
	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	.L13
	movl	-4(%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
	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
	jmp	.L11
.L13:
	movl	$-1, %eax
.L11:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	getSibling, .-getSibling
	.section	.rodata
.LC0:
	.string	"node %d: "
.LC1:
	.string	"parent = %d, "
.LC2:
	.string	"sibling = %d, "
.LC3:
	.string	"degree = %d, "
.LC4:
	.string	"depth = %d, "
.LC5:
	.string	"height = %d, "
.LC6:
	.string	"root"
.LC7:
	.string	"leaf"
.LC8:
	.string	"internal node"
	.text
	.globl	print
	.type	print, @function
print:
.LFB3:
	.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	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-20(%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	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	getSibling
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -4(%rbp)
	movl	-20(%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	.L15
	addl	$1, -4(%rbp)
.L15:
	movl	-20(%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	.L16
	addl	$1, -4(%rbp)
.L16:
	movl	-4(%rbp), %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	H(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-20(%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	.L17
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L20
.L17:
	movl	-20(%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	.L19
	movl	-20(%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
	jne	.L19
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L20
.L19:
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L20:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	print, .-print
	.section	.rodata
.LC9:
	.string	"%d"
.LC10:
	.string	"%d %d %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB4:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -12(%rbp)
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L22
.L23:
	movl	-16(%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	$-1, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L22:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L23
	movl	$0, -16(%rbp)
	jmp	.L24
.L27:
	leaq	-20(%rbp), %rcx
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC10(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	movl	-24(%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)
	movl	-28(%rbp), %eax
	movl	-20(%rbp), %edx
	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)
	movl	-24(%rbp), %eax
	cmpl	$-1, %eax
	je	.L25
	movl	-24(%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	T(%rip), %rax
	movl	%edx, (%rcx,%rax)
.L25:
	movl	-20(%rbp), %eax
	cmpl	$-1, %eax
	je	.L26
	movl	-20(%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	T(%rip), %rax
	movl	%edx, (%rcx,%rax)
.L26:
	addl	$1, -16(%rbp)
.L24:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L27
	movl	$0, -16(%rbp)
	jmp	.L28
.L30:
	movl	-16(%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	.L29
	movl	-16(%rbp), %eax
	movl	%eax, -12(%rbp)
.L29:
	addl	$1, -16(%rbp)
.L28:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L30
	movl	-12(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	setDepth
	movl	-12(%rbp), %eax
	movl	%eax, %edi
	call	setHeight
	movl	$0, -16(%rbp)
	jmp	.L31
.L32:
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	print
	addl	$1, -16(%rbp)
.L31:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L32
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	setDepth
	.type	setDepth, @function
setDepth:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movl	%esi, 20(%rsp)
	cmpl	$-1, %edi
	je	.L1
	movl	%edi, %r15d
	leaq	D(%rip), %r10
	leaq	T(%rip), %r11
.L2:
	movslq	%r15d, %r9
	movl	20(%rsp), %edi
	leaq	(%r9,%r9,2), %rax
	movl	4(%r11,%rax,4), %eax
	movl	%edi, (%r10,%r9,4)
	addl	$1, %edi
	movl	%edi, 20(%rsp)
	cmpl	$-1, %eax
	je	.L3
	movl	%edi, 12(%rsp)
	movq	%r9, 24(%rsp)
.L18:
	movslq	%eax, %r9
	movl	12(%rsp), %esi
	leaq	(%r9,%r9,2), %rax
	movl	4(%r11,%rax,4), %edx
	movl	%esi, (%r10,%r9,4)
	addl	$1, %esi
	movl	%esi, 12(%rsp)
	cmpl	$-1, %edx
	je	.L4
	movl	%esi, 16(%rsp)
	movq	%r9, 32(%rsp)
.L17:
	movslq	%edx, %rcx
	movl	16(%rsp), %r9d
	leaq	(%rcx,%rcx,2), %rax
	movslq	4(%r11,%rax,4), %rdx
	movl	%r9d, (%r10,%rcx,4)
	addl	$1, %r9d
	movl	%r9d, 16(%rsp)
	cmpl	$-1, %edx
	je	.L5
	movq	%rcx, 40(%rsp)
.L16:
	leaq	(%rdx,%rdx,2), %rax
	movl	%r9d, (%r10,%rdx,4)
	addl	$1, %r9d
	movl	4(%r11,%rax,4), %ebx
	cmpl	$-1, %ebx
	je	.L6
	movl	%r9d, %r13d
.L15:
	movslq	%ebx, %rbp
	leaq	0(%rbp,%rbp,2), %rax
	movl	%r13d, (%r10,%rbp,4)
	addl	$1, %r13d
	movl	4(%r11,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L7
	movl	%r13d, %ecx
.L14:
	movslq	%eax, %r12
	leaq	(%r12,%r12,2), %rax
	movl	%ecx, (%r10,%r12,4)
	addl	$1, %ecx
	movslq	4(%r11,%rax,4), %r15
	cmpl	$-1, %r15d
	je	.L8
	movl	%ecx, %eax
.L13:
	leaq	(%r15,%r15,2), %rsi
	movl	%eax, (%r10,%r15,4)
	addl	$1, %eax
	movslq	4(%r11,%rsi,4), %rbx
	cmpl	$-1, %ebx
	je	.L9
	movl	%eax, %r14d
.L12:
	leaq	(%rbx,%rbx,2), %rsi
	movl	%r14d, (%r10,%rbx,4)
	addl	$1, %r14d
	movslq	4(%r11,%rsi,4), %rdi
	cmpl	$-1, %edi
	je	.L10
	movl	%r14d, %esi
	movq	%rbx, %r8
.L11:
	movl	%esi, (%r10,%rdi,4)
	leaq	(%rdi,%rdi,2), %rdi
	addl	$1, %esi
	leaq	(%r11,%rdi,4), %rbx
	movq	%r8, 72(%rsp)
	movl	4(%rbx), %edi
	movq	%rdx, 64(%rsp)
	movl	%eax, 60(%rsp)
	movl	%ecx, 56(%rsp)
	movl	%r9d, 52(%rsp)
	movl	%esi, 48(%rsp)
	call	setDepth
	movslq	8(%rbx), %rdi
	movl	48(%rsp), %esi
	leaq	T(%rip), %r11
	movl	52(%rsp), %r9d
	movl	56(%rsp), %ecx
	leaq	D(%rip), %r10
	cmpl	$-1, %edi
	movl	60(%rsp), %eax
	movq	64(%rsp), %rdx
	movq	72(%rsp), %r8
	jne	.L11
	movq	%r8, %rbx
.L10:
	leaq	(%rbx,%rbx,2), %rsi
	movslq	8(%r11,%rsi,4), %rbx
	cmpl	$-1, %ebx
	jne	.L12
.L9:
	leaq	(%r15,%r15,2), %rsi
	movslq	8(%r11,%rsi,4), %r15
	cmpl	$-1, %r15d
	jne	.L13
.L8:
	leaq	(%r12,%r12,2), %rax
	movl	8(%r11,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L14
.L7:
	leaq	0(%rbp,%rbp,2), %rax
	movl	8(%r11,%rax,4), %ebx
	cmpl	$-1, %ebx
	jne	.L15
.L6:
	leaq	(%rdx,%rdx,2), %rax
	movslq	8(%r11,%rax,4), %rdx
	cmpl	$-1, %edx
	jne	.L16
	movq	40(%rsp), %rcx
.L5:
	leaq	(%rcx,%rcx,2), %rax
	movl	8(%r11,%rax,4), %edx
	cmpl	$-1, %edx
	jne	.L17
	movq	32(%rsp), %r9
.L4:
	leaq	(%r9,%r9,2), %rax
	movl	8(%r11,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L18
	movq	24(%rsp), %r9
.L3:
	leaq	(%r9,%r9,2), %rax
	movl	8(%r11,%rax,4), %r15d
	cmpl	$-1, %r15d
	jne	.L2
.L1:
	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
.LFE23:
	.size	setDepth, .-setDepth
	.p2align 4
	.globl	setHeight
	.type	setHeight, @function
setHeight:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	T(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	H(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movslq	%edi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	(%r12,%r12,2), %rax
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movl	4(%r15,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L151
	leaq	(%r12,%r12,2), %rax
	movslq	8(%r15,%rax,4), %rdx
	xorl	%eax, %eax
	cmpl	$-1, %edx
	jne	.L152
.L75:
	cmpl	%eax, %ebx
	cmovge	%ebx, %eax
	movl	%eax, 0(%r13,%r12,4)
	addq	$40, %rsp
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L151:
	.cfi_restore_state
	movslq	%eax, %rdx
	leaq	(%rdx,%rdx,2), %rax
	movl	4(%r15,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L61
	movslq	%eax, %rcx
	leaq	(%rcx,%rcx,2), %rax
	movslq	4(%r15,%rax,4), %rbp
	cmpl	$-1, %ebp
	jne	.L153
.L62:
	leaq	(%rcx,%rcx,2), %rax
	movslq	8(%r15,%rax,4), %r14
	xorl	%eax, %eax
	cmpl	$-1, %r14d
	jne	.L154
.L65:
	cmpl	%eax, %ebx
	cmovl	%eax, %ebx
	movl	%ebx, 0(%r13,%rcx,4)
	addl	$1, %ebx
.L61:
	leaq	(%rdx,%rdx,2), %rax
	movslq	8(%r15,%rax,4), %r14
	xorl	%eax, %eax
	cmpl	$-1, %r14d
	je	.L68
	leaq	(%r14,%r14,2), %rax
	xorl	%ebp, %ebp
	movl	4(%r15,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L155
	leaq	(%r14,%r14,2), %rax
	movslq	8(%r15,%rax,4), %rsi
	xorl	%eax, %eax
	cmpl	$-1, %esi
	jne	.L156
.L72:
	cmpl	%eax, %ebp
	cmovge	%ebp, %eax
	movl	%eax, 0(%r13,%r14,4)
	addl	$1, %eax
.L68:
	cmpl	%eax, %ebx
	cmovl	%eax, %ebx
	leaq	(%r12,%r12,2), %rax
	movl	%ebx, 0(%r13,%rdx,4)
	movslq	8(%r15,%rax,4), %rdx
	addl	$1, %ebx
	xorl	%eax, %eax
	cmpl	$-1, %edx
	je	.L75
.L152:
	leaq	(%rdx,%rdx,2), %rax
	xorl	%ebp, %ebp
	movslq	4(%r15,%rax,4), %r14
	cmpl	$-1, %r14d
	je	.L76
	leaq	(%r14,%r14,2), %rax
	xorl	%esi, %esi
	movslq	4(%r15,%rax,4), %rbp
	cmpl	$-1, %ebp
	jne	.L157
	leaq	(%r14,%r14,2), %rax
	movslq	8(%r15,%rax,4), %rcx
	xorl	%eax, %eax
	cmpl	$-1, %ecx
	jne	.L158
.L80:
	cmpl	%eax, %esi
	cmovge	%esi, %eax
	movl	%eax, 0(%r13,%r14,4)
	movl	%eax, %ebp
	addl	$1, %ebp
.L76:
	leaq	(%rdx,%rdx,2), %rax
	movslq	8(%r15,%rax,4), %rsi
	xorl	%eax, %eax
	cmpl	$-1, %esi
	je	.L83
	leaq	(%rsi,%rsi,2), %rax
	xorl	%r14d, %r14d
	movl	4(%r15,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L159
.L84:
	leaq	(%rsi,%rsi,2), %rax
	movslq	8(%r15,%rax,4), %r8
	xorl	%eax, %eax
	cmpl	$-1, %r8d
	jne	.L160
.L87:
	cmpl	%eax, %r14d
	cmovge	%r14d, %eax
	movl	%eax, 0(%r13,%rsi,4)
	addl	$1, %eax
.L83:
	cmpl	%eax, %ebp
	cmovge	%ebp, %eax
	movl	%eax, 0(%r13,%rdx,4)
	addl	$1, %eax
	jmp	.L75
	.p2align 4,,10
	.p2align 3
.L160:
	leaq	(%r8,%r8,2), %rax
	xorl	%ecx, %ecx
	movl	4(%r15,%rax,4), %edi
	cmpl	$-1, %edi
	je	.L88
	movq	%rdx, 16(%rsp)
	movq	%r8, 8(%rsp)
	movq	%rsi, (%rsp)
	call	setHeight
	movq	16(%rsp), %rdx
	movq	8(%rsp), %r8
	movq	(%rsp), %rsi
	leal	1(%rax), %ecx
.L88:
	leaq	(%r8,%r8,2), %rax
	movl	8(%r15,%rax,4), %edi
	xorl	%eax, %eax
	cmpl	$-1, %edi
	je	.L89
	movq	%rdx, 24(%rsp)
	movq	%r8, 16(%rsp)
	movq	%rsi, 8(%rsp)
	movl	%ecx, (%rsp)
	call	setHeight
	movq	24(%rsp), %rdx
	movq	16(%rsp), %r8
	movq	8(%rsp), %rsi
	movl	(%rsp), %ecx
	addl	$1, %eax
.L89:
	cmpl	%eax, %ecx
	cmovge	%ecx, %eax
	movl	%eax, 0(%r13,%r8,4)
	addl	$1, %eax
	jmp	.L87
	.p2align 4,,10
	.p2align 3
.L159:
	movslq	%eax, %r14
	xorl	%ecx, %ecx
	leaq	(%r14,%r14,2), %rax
	movl	4(%r15,%rax,4), %edi
	cmpl	$-1, %edi
	je	.L85
	movq	%rdx, 8(%rsp)
	movq	%rsi, (%rsp)
	call	setHeight
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	leal	1(%rax), %ecx
.L85:
	leaq	(%r14,%r14,2), %rax
	movl	8(%r15,%rax,4), %edi
	xorl	%eax, %eax
	cmpl	$-1, %edi
	je	.L86
	movq	%rdx, 16(%rsp)
	movq	%rsi, 8(%rsp)
	movl	%ecx, (%rsp)
	call	setHeight
	movq	16(%rsp), %rdx
	movq	8(%rsp), %rsi
	movl	(%rsp), %ecx
	addl	$1, %eax
.L86:
	cmpl	%eax, %ecx
	cmovge	%ecx, %eax
	movl	%eax, 0(%r13,%r14,4)
	leal	1(%rax), %r14d
	jmp	.L84
	.p2align 4,,10
	.p2align 3
.L158:
	leaq	(%rcx,%rcx,2), %rax
	xorl	%ebp, %ebp
	movl	4(%r15,%rax,4), %edi
	cmpl	$-1, %edi
	je	.L81
	movq	%rdx, 16(%rsp)
	movq	%rcx, 8(%rsp)
	movl	%esi, (%rsp)
	call	setHeight
	movq	16(%rsp), %rdx
	movq	8(%rsp), %rcx
	movl	(%rsp), %esi
	leal	1(%rax), %ebp
.L81:
	leaq	(%rcx,%rcx,2), %rax
	movl	8(%r15,%rax,4), %edi
	xorl	%eax, %eax
	cmpl	$-1, %edi
	je	.L82
	movq	%rdx, 16(%rsp)
	movq	%rcx, 8(%rsp)
	movl	%esi, (%rsp)
	call	setHeight
	movq	16(%rsp), %rdx
	movq	8(%rsp), %rcx
	movl	(%rsp), %esi
	addl	$1, %eax
.L82:
	cmpl	%eax, %ebp
	cmovge	%ebp, %eax
	movl	%eax, 0(%r13,%rcx,4)
	addl	$1, %eax
	jmp	.L80
	.p2align 4,,10
	.p2align 3
.L157:
	leaq	0(%rbp,%rbp,2), %rax
	xorl	%ecx, %ecx
	movl	4(%r15,%rax,4), %edi
	cmpl	$-1, %edi
	je	.L78
	movq	%rdx, (%rsp)
	call	setHeight
	movq	(%rsp), %rdx
	leal	1(%rax), %ecx
.L78:
	leaq	0(%rbp,%rbp,2), %rax
	movl	8(%r15,%rax,4), %edi
	xorl	%eax, %eax
	cmpl	$-1, %edi
	je	.L79
	movq	%rdx, 8(%rsp)
	movl	%ecx, (%rsp)
	call	setHeight
	movq	8(%rsp), %rdx
	movl	(%rsp), %ecx
	addl	$1, %eax
.L79:
	cmpl	%eax, %ecx
	cmovl	%eax, %ecx
	leaq	(%r14,%r14,2), %rax
	movl	%ecx, 0(%r13,%rbp,4)
	leal	1(%rcx), %esi
	movslq	8(%r15,%rax,4), %rcx
	xorl	%eax, %eax
	cmpl	$-1, %ecx
	je	.L80
	jmp	.L158
	.p2align 4,,10
	.p2align 3
.L156:
	leaq	(%rsi,%rsi,2), %rax
	xorl	%ecx, %ecx
	movl	4(%r15,%rax,4), %edi
	cmpl	$-1, %edi
	je	.L73
	movq	%rsi, 8(%rsp)
	movq	%rdx, (%rsp)
	call	setHeight
	movq	8(%rsp), %rsi
	movq	(%rsp), %rdx
	leal	1(%rax), %ecx
.L73:
	leaq	(%rsi,%rsi,2), %rax
	movl	8(%r15,%rax,4), %edi
	xorl	%eax, %eax
	cmpl	$-1, %edi
	je	.L74
	movq	%rsi, 16(%rsp)
	movq	%rdx, 8(%rsp)
	movl	%ecx, (%rsp)
	call	setHeight
	movq	16(%rsp), %rsi
	movq	8(%rsp), %rdx
	movl	(%rsp), %ecx
	addl	$1, %eax
.L74:
	cmpl	%eax, %ecx
	cmovge	%ecx, %eax
	movl	%eax, 0(%r13,%rsi,4)
	addl	$1, %eax
	jmp	.L72
	.p2align 4,,10
	.p2align 3
.L155:
	movslq	%eax, %rbp
	xorl	%ecx, %ecx
	leaq	0(%rbp,%rbp,2), %rax
	movl	4(%r15,%rax,4), %edi
	cmpl	$-1, %edi
	je	.L70
	movq	%rdx, (%rsp)
	call	setHeight
	movq	(%rsp), %rdx
	leal	1(%rax), %ecx
.L70:
	leaq	0(%rbp,%rbp,2), %rax
	movl	8(%r15,%rax,4), %edi
	xorl	%eax, %eax
	cmpl	$-1, %edi
	je	.L71
	movq	%rdx, 8(%rsp)
	movl	%ecx, (%rsp)
	call	setHeight
	movq	8(%rsp), %rdx
	movl	(%rsp), %ecx
	addl	$1, %eax
.L71:
	cmpl	%eax, %ecx
	cmovl	%eax, %ecx
	leaq	(%r14,%r14,2), %rax
	movslq	8(%r15,%rax,4), %rsi
	xorl	%eax, %eax
	movl	%ecx, 0(%r13,%rbp,4)
	leal	1(%rcx), %ebp
	cmpl	$-1, %esi
	je	.L72
	jmp	.L156
	.p2align 4,,10
	.p2align 3
.L154:
	leaq	(%r14,%r14,2), %rax
	xorl	%ebp, %ebp
	movl	4(%r15,%rax,4), %edi
	cmpl	$-1, %edi
	je	.L66
	movq	%rcx, 8(%rsp)
	movq	%rdx, (%rsp)
	call	setHeight
	movq	8(%rsp), %rcx
	movq	(%rsp), %rdx
	leal	1(%rax), %ebp
.L66:
	leaq	(%r14,%r14,2), %rax
	movl	8(%r15,%rax,4), %edi
	xorl	%eax, %eax
	cmpl	$-1, %edi
	je	.L67
	movq	%rcx, 8(%rsp)
	movq	%rdx, (%rsp)
	call	setHeight
	movq	8(%rsp), %rcx
	movq	(%rsp), %rdx
	addl	$1, %eax
.L67:
	cmpl	%eax, %ebp
	cmovge	%ebp, %eax
	movl	%eax, 0(%r13,%r14,4)
	addl	$1, %eax
	jmp	.L65
	.p2align 4,,10
	.p2align 3
.L153:
	leaq	0(%rbp,%rbp,2), %rax
	movl	4(%r15,%rax,4), %edi
	cmpl	$-1, %edi
	je	.L63
	movq	%rcx, 8(%rsp)
	movq	%rdx, (%rsp)
	call	setHeight
	movq	8(%rsp), %rcx
	movq	(%rsp), %rdx
	leal	1(%rax), %ebx
.L63:
	leaq	0(%rbp,%rbp,2), %rax
	movl	8(%r15,%rax,4), %edi
	xorl	%eax, %eax
	cmpl	$-1, %edi
	je	.L64
	movq	%rcx, 8(%rsp)
	movq	%rdx, (%rsp)
	call	setHeight
	movq	8(%rsp), %rcx
	movq	(%rsp), %rdx
	addl	$1, %eax
.L64:
	cmpl	%eax, %ebx
	leaq	H(%rip), %r13
	cmovl	%eax, %ebx
	movl	%ebx, 0(%r13,%rbp,4)
	addl	$1, %ebx
	jmp	.L62
	.cfi_endproc
.LFE24:
	.size	setHeight, .-setHeight
	.p2align 4
	.globl	getSibling
	.type	getSibling, @function
getSibling:
.LFB25:
	.cfi_startproc
	endbr64
	movslq	%edi, %rax
	leaq	T(%rip), %rdx
	leaq	(%rax,%rax,2), %rax
	movslq	(%rdx,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L165
	leaq	(%rax,%rax,2), %rcx
	movl	4(%rdx,%rcx,4), %r8d
	cmpl	$-1, %r8d
	je	.L166
	cmpl	%edi, %r8d
	jne	.L161
.L166:
	leaq	(%rax,%rax,2), %rax
	movl	8(%rdx,%rax,4), %r8d
	cmpl	%edi, %r8d
	je	.L165
	cmpl	$-1, %r8d
	je	.L165
.L161:
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L165:
	movl	$-1, %r8d
	jmp	.L161
	.cfi_endproc
.LFE25:
	.size	getSibling, .-getSibling
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"node %d: "
.LC1:
	.string	"parent = %d, "
.LC2:
	.string	"sibling = %d, "
.LC3:
	.string	"degree = %d, "
.LC4:
	.string	"depth = %d, "
.LC5:
	.string	"height = %d, "
.LC6:
	.string	"root"
.LC7:
	.string	"leaf"
.LC8:
	.string	"internal node"
	.text
	.p2align 4
	.globl	print
	.type	print, @function
print:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rsi
	xorl	%eax, %eax
	leaq	T(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	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
	leaq	(%rbx,%rbx,2), %rax
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	leaq	0(%r13,%rax,4), %r12
	xorl	%eax, %eax
	movl	(%r12), %edx
	call	__printf_chk@PLT
	movslq	(%r12), %rax
	cmpl	$-1, %eax
	je	.L181
	leaq	(%rax,%rax,2), %rdx
	movq	%rbx, %rbp
	movl	4(%r13,%rdx,4), %edx
	cmpl	$-1, %edx
	je	.L182
	cmpl	%edx, %ebx
	jne	.L175
.L182:
	leaq	(%rax,%rax,2), %rax
	movl	8(%r13,%rax,4), %edx
	cmpl	$-1, %edx
	je	.L181
	cmpl	%edx, %ebp
	je	.L181
.L175:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	(%rbx,%rbx,2), %rax
	xorl	%edx, %edx
	movl	$1, %edi
	leaq	0(%r13,%rax,4), %rbp
	leaq	.LC3(%rip), %rsi
	cmpl	$-1, 4(%rbp)
	setne	%dl
	xorl	%eax, %eax
	cmpl	$-1, 8(%rbp)
	setne	%al
	addl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	D(%rip), %rax
	movl	$1, %edi
	leaq	.LC4(%rip), %rsi
	movl	(%rax,%rbx,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	H(%rip), %rax
	movl	$1, %edi
	leaq	.LC5(%rip), %rsi
	movl	(%rax,%rbx,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	$-1, 0(%rbp)
	leaq	.LC6(%rip), %rdi
	je	.L191
	cmpl	$-1, 4(%rbp)
	jne	.L180
	cmpl	$-1, 8(%rbp)
	leaq	.LC7(%rip), %rdi
	je	.L191
.L180:
	leaq	.LC8(%rip), %rdi
.L191:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
.L181:
	.cfi_restore_state
	movl	$-1, %edx
	jmp	.L175
	.cfi_endproc
.LFE26:
	.size	print, .-print
	.section	.rodata.str1.1
.LC9:
	.string	"%d"
.LC10:
	.string	"%d %d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB27:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	n(%rip), %rsi
	leaq	.LC9(%rip), %rdi
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L193
	leaq	T(%rip), %rbx
	subl	$1, %eax
	leaq	(%rax,%rax,2), %rdx
	leaq	12(%rbx), %rax
	leaq	(%rax,%rdx,4), %rdx
	movq	%rbx, %rax
	.p2align 4,,10
	.p2align 3
.L194:
	movl	$-1, (%rax)
	addq	$12, %rax
	cmpq	%rdx, %rax
	jne	.L194
	xorl	%ebp, %ebp
	leaq	20(%rsp), %r15
	leaq	16(%rsp), %r14
	leaq	12(%rsp), %r13
	leaq	.LC10(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L199:
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rdx
	movslq	20(%rsp), %rax
	leaq	4+T(%rip), %rdi
	movslq	12(%rsp), %rsi
	movd	%edx, %xmm0
	movd	%eax, %xmm1
	movq	%rsi, %rcx
	punpckldq	%xmm1, %xmm0
	leaq	(%rsi,%rsi,2), %rsi
	movq	%xmm0, (%rdi,%rsi,4)
	cmpl	$-1, %edx
	je	.L195
	leaq	(%rdx,%rdx,2), %rdx
	subq	$4, %rdi
	movl	%ecx, (%rdi,%rdx,4)
.L195:
	cmpl	$-1, %eax
	je	.L196
	movl	n(%rip), %edx
	leaq	(%rax,%rax,2), %rax
	leaq	T(%rip), %rsi
	addl	$1, %ebp
	movl	%ecx, (%rsi,%rax,4)
	cmpl	%edx, %ebp
	jl	.L199
.L198:
	testl	%edx, %edx
	jle	.L193
	xorl	%ebp, %ebp
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L201:
	cmpl	$-1, (%rbx)
	cmove	%eax, %ebp
	addl	$1, %eax
	addq	$12, %rbx
	cmpl	%edx, %eax
	jne	.L201
.L202:
	xorl	%esi, %esi
	movl	%ebp, %edi
	call	setDepth
	movl	%ebp, %edi
	call	setHeight
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L203
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L204:
	movl	%ebx, %edi
	addl	$1, %ebx
	call	print
	cmpl	%ebx, n(%rip)
	jg	.L204
.L203:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L213
	addq	$40, %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
.L196:
	.cfi_restore_state
	movl	n(%rip), %edx
	addl	$1, %ebp
	cmpl	%ebp, %edx
	jg	.L199
	jmp	.L198
.L193:
	xorl	%ebp, %ebp
	jmp	.L202
.L213:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE27:
	.size	main, .-main
	.globl	H
	.bss
	.align 32
	.type	H, @object
	.size	H, 40000
H:
	.zero	40000
	.globl	D
	.align 32
	.type	D, @object
	.size	D, 40000
D:
	.zero	40000
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	T
	.align 32
	.type	T, @object
	.size	T, 120000
T:
	.zero	120000
	.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	setDepth
	.type	setDepth, @function
setDepth:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movl	%esi, 20(%rsp)
	cmpl	$-1, %edi
	je	.L1
	movl	%edi, %r15d
	leaq	D(%rip), %r10
	leaq	T(%rip), %r11
.L2:
	movslq	%r15d, %r9
	movl	20(%rsp), %edi
	leaq	(%r9,%r9,2), %rax
	movl	4(%r11,%rax,4), %eax
	movl	%edi, (%r10,%r9,4)
	addl	$1, %edi
	movl	%edi, 20(%rsp)
	cmpl	$-1, %eax
	je	.L3
	movl	%edi, 12(%rsp)
	movq	%r9, 24(%rsp)
.L18:
	movslq	%eax, %r9
	movl	12(%rsp), %esi
	leaq	(%r9,%r9,2), %rax
	movl	4(%r11,%rax,4), %edx
	movl	%esi, (%r10,%r9,4)
	addl	$1, %esi
	movl	%esi, 12(%rsp)
	cmpl	$-1, %edx
	je	.L4
	movl	%esi, 16(%rsp)
	movq	%r9, 32(%rsp)
.L17:
	movslq	%edx, %rcx
	movl	16(%rsp), %r9d
	leaq	(%rcx,%rcx,2), %rax
	movslq	4(%r11,%rax,4), %rdx
	movl	%r9d, (%r10,%rcx,4)
	addl	$1, %r9d
	movl	%r9d, 16(%rsp)
	cmpl	$-1, %edx
	je	.L5
	movq	%rcx, 40(%rsp)
.L16:
	leaq	(%rdx,%rdx,2), %rax
	movl	%r9d, (%r10,%rdx,4)
	addl	$1, %r9d
	movl	4(%r11,%rax,4), %ebx
	cmpl	$-1, %ebx
	je	.L6
	movl	%r9d, %r13d
.L15:
	movslq	%ebx, %rbp
	leaq	0(%rbp,%rbp,2), %rax
	movl	%r13d, (%r10,%rbp,4)
	addl	$1, %r13d
	movl	4(%r11,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L7
	movl	%r13d, %ecx
.L14:
	movslq	%eax, %r12
	leaq	(%r12,%r12,2), %rax
	movl	%ecx, (%r10,%r12,4)
	addl	$1, %ecx
	movslq	4(%r11,%rax,4), %r15
	cmpl	$-1, %r15d
	je	.L8
	movl	%ecx, %eax
.L13:
	leaq	(%r15,%r15,2), %rsi
	movl	%eax, (%r10,%r15,4)
	addl	$1, %eax
	movslq	4(%r11,%rsi,4), %rbx
	cmpl	$-1, %ebx
	je	.L9
	movl	%eax, %r14d
.L12:
	leaq	(%rbx,%rbx,2), %rsi
	movl	%r14d, (%r10,%rbx,4)
	addl	$1, %r14d
	movslq	4(%r11,%rsi,4), %rdi
	cmpl	$-1, %edi
	je	.L10
	movl	%r14d, %esi
	movq	%rbx, %r8
.L11:
	movl	%esi, (%r10,%rdi,4)
	leaq	(%rdi,%rdi,2), %rdi
	addl	$1, %esi
	leaq	(%r11,%rdi,4), %rbx
	movq	%r8, 72(%rsp)
	movl	4(%rbx), %edi
	movq	%rdx, 64(%rsp)
	movl	%eax, 60(%rsp)
	movl	%ecx, 56(%rsp)
	movl	%r9d, 52(%rsp)
	movl	%esi, 48(%rsp)
	call	setDepth
	movslq	8(%rbx), %rdi
	movl	48(%rsp), %esi
	leaq	T(%rip), %r11
	movl	52(%rsp), %r9d
	movl	56(%rsp), %ecx
	leaq	D(%rip), %r10
	cmpl	$-1, %edi
	movl	60(%rsp), %eax
	movq	64(%rsp), %rdx
	movq	72(%rsp), %r8
	jne	.L11
	movq	%r8, %rbx
.L10:
	leaq	(%rbx,%rbx,2), %rsi
	movslq	8(%r11,%rsi,4), %rbx
	cmpl	$-1, %ebx
	jne	.L12
.L9:
	leaq	(%r15,%r15,2), %rsi
	movslq	8(%r11,%rsi,4), %r15
	cmpl	$-1, %r15d
	jne	.L13
.L8:
	leaq	(%r12,%r12,2), %rax
	movl	8(%r11,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L14
.L7:
	leaq	0(%rbp,%rbp,2), %rax
	movl	8(%r11,%rax,4), %ebx
	cmpl	$-1, %ebx
	jne	.L15
.L6:
	leaq	(%rdx,%rdx,2), %rax
	movslq	8(%r11,%rax,4), %rdx
	cmpl	$-1, %edx
	jne	.L16
	movq	40(%rsp), %rcx
.L5:
	leaq	(%rcx,%rcx,2), %rax
	movl	8(%r11,%rax,4), %edx
	cmpl	$-1, %edx
	jne	.L17
	movq	32(%rsp), %r9
.L4:
	leaq	(%r9,%r9,2), %rax
	movl	8(%r11,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L18
	movq	24(%rsp), %r9
.L3:
	leaq	(%r9,%r9,2), %rax
	movl	8(%r11,%rax,4), %r15d
	cmpl	$-1, %r15d
	jne	.L2
.L1:
	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
.LFE23:
	.size	setDepth, .-setDepth
	.p2align 4
	.globl	setHeight
	.type	setHeight, @function
setHeight:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	T(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	H(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movslq	%edi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	(%r12,%r12,2), %rax
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movl	4(%r15,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L151
	leaq	(%r12,%r12,2), %rax
	movslq	8(%r15,%rax,4), %rdx
	xorl	%eax, %eax
	cmpl	$-1, %edx
	jne	.L152
.L75:
	cmpl	%eax, %ebx
	cmovge	%ebx, %eax
	movl	%eax, 0(%r13,%r12,4)
	addq	$40, %rsp
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L151:
	.cfi_restore_state
	movslq	%eax, %rdx
	leaq	(%rdx,%rdx,2), %rax
	movl	4(%r15,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L61
	movslq	%eax, %rcx
	leaq	(%rcx,%rcx,2), %rax
	movslq	4(%r15,%rax,4), %rbp
	cmpl	$-1, %ebp
	jne	.L153
.L62:
	leaq	(%rcx,%rcx,2), %rax
	movslq	8(%r15,%rax,4), %r14
	xorl	%eax, %eax
	cmpl	$-1, %r14d
	jne	.L154
.L65:
	cmpl	%eax, %ebx
	cmovl	%eax, %ebx
	movl	%ebx, 0(%r13,%rcx,4)
	addl	$1, %ebx
.L61:
	leaq	(%rdx,%rdx,2), %rax
	movslq	8(%r15,%rax,4), %r14
	xorl	%eax, %eax
	cmpl	$-1, %r14d
	je	.L68
	leaq	(%r14,%r14,2), %rax
	xorl	%ebp, %ebp
	movl	4(%r15,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L155
	leaq	(%r14,%r14,2), %rax
	movslq	8(%r15,%rax,4), %rsi
	xorl	%eax, %eax
	cmpl	$-1, %esi
	jne	.L156
.L72:
	cmpl	%eax, %ebp
	cmovge	%ebp, %eax
	movl	%eax, 0(%r13,%r14,4)
	addl	$1, %eax
.L68:
	cmpl	%eax, %ebx
	cmovl	%eax, %ebx
	leaq	(%r12,%r12,2), %rax
	movl	%ebx, 0(%r13,%rdx,4)
	movslq	8(%r15,%rax,4), %rdx
	addl	$1, %ebx
	xorl	%eax, %eax
	cmpl	$-1, %edx
	je	.L75
.L152:
	leaq	(%rdx,%rdx,2), %rax
	xorl	%ebp, %ebp
	movslq	4(%r15,%rax,4), %r14
	cmpl	$-1, %r14d
	je	.L76
	leaq	(%r14,%r14,2), %rax
	xorl	%esi, %esi
	movslq	4(%r15,%rax,4), %rbp
	cmpl	$-1, %ebp
	jne	.L157
	leaq	(%r14,%r14,2), %rax
	movslq	8(%r15,%rax,4), %rcx
	xorl	%eax, %eax
	cmpl	$-1, %ecx
	jne	.L158
.L80:
	cmpl	%eax, %esi
	cmovge	%esi, %eax
	movl	%eax, 0(%r13,%r14,4)
	movl	%eax, %ebp
	addl	$1, %ebp
.L76:
	leaq	(%rdx,%rdx,2), %rax
	movslq	8(%r15,%rax,4), %rsi
	xorl	%eax, %eax
	cmpl	$-1, %esi
	je	.L83
	leaq	(%rsi,%rsi,2), %rax
	xorl	%r14d, %r14d
	movl	4(%r15,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L159
.L84:
	leaq	(%rsi,%rsi,2), %rax
	movslq	8(%r15,%rax,4), %r8
	xorl	%eax, %eax
	cmpl	$-1, %r8d
	jne	.L160
.L87:
	cmpl	%eax, %r14d
	cmovge	%r14d, %eax
	movl	%eax, 0(%r13,%rsi,4)
	addl	$1, %eax
.L83:
	cmpl	%eax, %ebp
	cmovge	%ebp, %eax
	movl	%eax, 0(%r13,%rdx,4)
	addl	$1, %eax
	jmp	.L75
	.p2align 4,,10
	.p2align 3
.L160:
	leaq	(%r8,%r8,2), %rax
	xorl	%ecx, %ecx
	movl	4(%r15,%rax,4), %edi
	cmpl	$-1, %edi
	je	.L88
	movq	%rdx, 16(%rsp)
	movq	%r8, 8(%rsp)
	movq	%rsi, (%rsp)
	call	setHeight
	movq	16(%rsp), %rdx
	movq	8(%rsp), %r8
	movq	(%rsp), %rsi
	leal	1(%rax), %ecx
.L88:
	leaq	(%r8,%r8,2), %rax
	movl	8(%r15,%rax,4), %edi
	xorl	%eax, %eax
	cmpl	$-1, %edi
	je	.L89
	movq	%rdx, 24(%rsp)
	movq	%r8, 16(%rsp)
	movq	%rsi, 8(%rsp)
	movl	%ecx, (%rsp)
	call	setHeight
	movq	24(%rsp), %rdx
	movq	16(%rsp), %r8
	movq	8(%rsp), %rsi
	movl	(%rsp), %ecx
	addl	$1, %eax
.L89:
	cmpl	%eax, %ecx
	cmovge	%ecx, %eax
	movl	%eax, 0(%r13,%r8,4)
	addl	$1, %eax
	jmp	.L87
	.p2align 4,,10
	.p2align 3
.L159:
	movslq	%eax, %r14
	xorl	%ecx, %ecx
	leaq	(%r14,%r14,2), %rax
	movl	4(%r15,%rax,4), %edi
	cmpl	$-1, %edi
	je	.L85
	movq	%rdx, 8(%rsp)
	movq	%rsi, (%rsp)
	call	setHeight
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	leal	1(%rax), %ecx
.L85:
	leaq	(%r14,%r14,2), %rax
	movl	8(%r15,%rax,4), %edi
	xorl	%eax, %eax
	cmpl	$-1, %edi
	je	.L86
	movq	%rdx, 16(%rsp)
	movq	%rsi, 8(%rsp)
	movl	%ecx, (%rsp)
	call	setHeight
	movq	16(%rsp), %rdx
	movq	8(%rsp), %rsi
	movl	(%rsp), %ecx
	addl	$1, %eax
.L86:
	cmpl	%eax, %ecx
	cmovge	%ecx, %eax
	movl	%eax, 0(%r13,%r14,4)
	leal	1(%rax), %r14d
	jmp	.L84
	.p2align 4,,10
	.p2align 3
.L158:
	leaq	(%rcx,%rcx,2), %rax
	xorl	%ebp, %ebp
	movl	4(%r15,%rax,4), %edi
	cmpl	$-1, %edi
	je	.L81
	movq	%rdx, 16(%rsp)
	movq	%rcx, 8(%rsp)
	movl	%esi, (%rsp)
	call	setHeight
	movq	16(%rsp), %rdx
	movq	8(%rsp), %rcx
	movl	(%rsp), %esi
	leal	1(%rax), %ebp
.L81:
	leaq	(%rcx,%rcx,2), %rax
	movl	8(%r15,%rax,4), %edi
	xorl	%eax, %eax
	cmpl	$-1, %edi
	je	.L82
	movq	%rdx, 16(%rsp)
	movq	%rcx, 8(%rsp)
	movl	%esi, (%rsp)
	call	setHeight
	movq	16(%rsp), %rdx
	movq	8(%rsp), %rcx
	movl	(%rsp), %esi
	addl	$1, %eax
.L82:
	cmpl	%eax, %ebp
	cmovge	%ebp, %eax
	movl	%eax, 0(%r13,%rcx,4)
	addl	$1, %eax
	jmp	.L80
	.p2align 4,,10
	.p2align 3
.L157:
	leaq	0(%rbp,%rbp,2), %rax
	xorl	%ecx, %ecx
	movl	4(%r15,%rax,4), %edi
	cmpl	$-1, %edi
	je	.L78
	movq	%rdx, (%rsp)
	call	setHeight
	movq	(%rsp), %rdx
	leal	1(%rax), %ecx
.L78:
	leaq	0(%rbp,%rbp,2), %rax
	movl	8(%r15,%rax,4), %edi
	xorl	%eax, %eax
	cmpl	$-1, %edi
	je	.L79
	movq	%rdx, 8(%rsp)
	movl	%ecx, (%rsp)
	call	setHeight
	movq	8(%rsp), %rdx
	movl	(%rsp), %ecx
	addl	$1, %eax
.L79:
	cmpl	%eax, %ecx
	cmovl	%eax, %ecx
	leaq	(%r14,%r14,2), %rax
	movl	%ecx, 0(%r13,%rbp,4)
	leal	1(%rcx), %esi
	movslq	8(%r15,%rax,4), %rcx
	xorl	%eax, %eax
	cmpl	$-1, %ecx
	je	.L80
	jmp	.L158
	.p2align 4,,10
	.p2align 3
.L156:
	leaq	(%rsi,%rsi,2), %rax
	xorl	%ecx, %ecx
	movl	4(%r15,%rax,4), %edi
	cmpl	$-1, %edi
	je	.L73
	movq	%rsi, 8(%rsp)
	movq	%rdx, (%rsp)
	call	setHeight
	movq	8(%rsp), %rsi
	movq	(%rsp), %rdx
	leal	1(%rax), %ecx
.L73:
	leaq	(%rsi,%rsi,2), %rax
	movl	8(%r15,%rax,4), %edi
	xorl	%eax, %eax
	cmpl	$-1, %edi
	je	.L74
	movq	%rsi, 16(%rsp)
	movq	%rdx, 8(%rsp)
	movl	%ecx, (%rsp)
	call	setHeight
	movq	16(%rsp), %rsi
	movq	8(%rsp), %rdx
	movl	(%rsp), %ecx
	addl	$1, %eax
.L74:
	cmpl	%eax, %ecx
	cmovge	%ecx, %eax
	movl	%eax, 0(%r13,%rsi,4)
	addl	$1, %eax
	jmp	.L72
	.p2align 4,,10
	.p2align 3
.L155:
	movslq	%eax, %rbp
	xorl	%ecx, %ecx
	leaq	0(%rbp,%rbp,2), %rax
	movl	4(%r15,%rax,4), %edi
	cmpl	$-1, %edi
	je	.L70
	movq	%rdx, (%rsp)
	call	setHeight
	movq	(%rsp), %rdx
	leal	1(%rax), %ecx
.L70:
	leaq	0(%rbp,%rbp,2), %rax
	movl	8(%r15,%rax,4), %edi
	xorl	%eax, %eax
	cmpl	$-1, %edi
	je	.L71
	movq	%rdx, 8(%rsp)
	movl	%ecx, (%rsp)
	call	setHeight
	movq	8(%rsp), %rdx
	movl	(%rsp), %ecx
	addl	$1, %eax
.L71:
	cmpl	%eax, %ecx
	cmovl	%eax, %ecx
	leaq	(%r14,%r14,2), %rax
	movslq	8(%r15,%rax,4), %rsi
	xorl	%eax, %eax
	movl	%ecx, 0(%r13,%rbp,4)
	leal	1(%rcx), %ebp
	cmpl	$-1, %esi
	je	.L72
	jmp	.L156
	.p2align 4,,10
	.p2align 3
.L154:
	leaq	(%r14,%r14,2), %rax
	xorl	%ebp, %ebp
	movl	4(%r15,%rax,4), %edi
	cmpl	$-1, %edi
	je	.L66
	movq	%rcx, 8(%rsp)
	movq	%rdx, (%rsp)
	call	setHeight
	movq	8(%rsp), %rcx
	movq	(%rsp), %rdx
	leal	1(%rax), %ebp
.L66:
	leaq	(%r14,%r14,2), %rax
	movl	8(%r15,%rax,4), %edi
	xorl	%eax, %eax
	cmpl	$-1, %edi
	je	.L67
	movq	%rcx, 8(%rsp)
	movq	%rdx, (%rsp)
	call	setHeight
	movq	8(%rsp), %rcx
	movq	(%rsp), %rdx
	addl	$1, %eax
.L67:
	cmpl	%eax, %ebp
	cmovge	%ebp, %eax
	movl	%eax, 0(%r13,%r14,4)
	addl	$1, %eax
	jmp	.L65
	.p2align 4,,10
	.p2align 3
.L153:
	leaq	0(%rbp,%rbp,2), %rax
	movl	4(%r15,%rax,4), %edi
	cmpl	$-1, %edi
	je	.L63
	movq	%rcx, 8(%rsp)
	movq	%rdx, (%rsp)
	call	setHeight
	movq	8(%rsp), %rcx
	movq	(%rsp), %rdx
	leal	1(%rax), %ebx
.L63:
	leaq	0(%rbp,%rbp,2), %rax
	movl	8(%r15,%rax,4), %edi
	xorl	%eax, %eax
	cmpl	$-1, %edi
	je	.L64
	movq	%rcx, 8(%rsp)
	movq	%rdx, (%rsp)
	call	setHeight
	movq	8(%rsp), %rcx
	movq	(%rsp), %rdx
	addl	$1, %eax
.L64:
	cmpl	%eax, %ebx
	leaq	H(%rip), %r13
	cmovl	%eax, %ebx
	movl	%ebx, 0(%r13,%rbp,4)
	addl	$1, %ebx
	jmp	.L62
	.cfi_endproc
.LFE24:
	.size	setHeight, .-setHeight
	.p2align 4
	.globl	getSibling
	.type	getSibling, @function
getSibling:
.LFB25:
	.cfi_startproc
	endbr64
	movslq	%edi, %rax
	leaq	T(%rip), %rdx
	leaq	(%rax,%rax,2), %rax
	movslq	(%rdx,%rax,4), %rax
	cmpl	$-1, %eax
	je	.L165
	leaq	(%rax,%rax,2), %rcx
	movl	4(%rdx,%rcx,4), %r8d
	cmpl	$-1, %r8d
	je	.L166
	cmpl	%edi, %r8d
	jne	.L161
.L166:
	leaq	(%rax,%rax,2), %rax
	movl	8(%rdx,%rax,4), %r8d
	cmpl	%edi, %r8d
	je	.L165
	cmpl	$-1, %r8d
	je	.L165
.L161:
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L165:
	movl	$-1, %r8d
	jmp	.L161
	.cfi_endproc
.LFE25:
	.size	getSibling, .-getSibling
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"node %d: "
.LC1:
	.string	"parent = %d, "
.LC2:
	.string	"sibling = %d, "
.LC3:
	.string	"degree = %d, "
.LC4:
	.string	"depth = %d, "
.LC5:
	.string	"height = %d, "
.LC6:
	.string	"root"
.LC7:
	.string	"leaf"
.LC8:
	.string	"internal node"
	.text
	.p2align 4
	.globl	print
	.type	print, @function
print:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rsi
	xorl	%eax, %eax
	leaq	T(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	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
	leaq	(%rbx,%rbx,2), %rax
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	leaq	0(%r13,%rax,4), %r12
	xorl	%eax, %eax
	movl	(%r12), %edx
	call	__printf_chk@PLT
	movslq	(%r12), %rax
	cmpl	$-1, %eax
	je	.L181
	leaq	(%rax,%rax,2), %rdx
	movq	%rbx, %rbp
	movl	4(%r13,%rdx,4), %edx
	cmpl	$-1, %edx
	je	.L182
	cmpl	%edx, %ebx
	jne	.L175
.L182:
	leaq	(%rax,%rax,2), %rax
	movl	8(%r13,%rax,4), %edx
	cmpl	$-1, %edx
	je	.L181
	cmpl	%edx, %ebp
	je	.L181
.L175:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	(%rbx,%rbx,2), %rax
	xorl	%edx, %edx
	movl	$1, %edi
	leaq	0(%r13,%rax,4), %rbp
	leaq	.LC3(%rip), %rsi
	cmpl	$-1, 4(%rbp)
	setne	%dl
	xorl	%eax, %eax
	cmpl	$-1, 8(%rbp)
	setne	%al
	addl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	D(%rip), %rax
	movl	$1, %edi
	leaq	.LC4(%rip), %rsi
	movl	(%rax,%rbx,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	H(%rip), %rax
	movl	$1, %edi
	leaq	.LC5(%rip), %rsi
	movl	(%rax,%rbx,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	$-1, 0(%rbp)
	leaq	.LC6(%rip), %rdi
	je	.L191
	cmpl	$-1, 4(%rbp)
	jne	.L180
	cmpl	$-1, 8(%rbp)
	leaq	.LC7(%rip), %rdi
	je	.L191
.L180:
	leaq	.LC8(%rip), %rdi
.L191:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
.L181:
	.cfi_restore_state
	movl	$-1, %edx
	jmp	.L175
	.cfi_endproc
.LFE26:
	.size	print, .-print
	.section	.rodata.str1.1
.LC9:
	.string	"%d"
.LC10:
	.string	"%d %d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB27:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	n(%rip), %rsi
	leaq	.LC9(%rip), %rdi
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L193
	leaq	T(%rip), %rbx
	subl	$1, %eax
	leaq	(%rax,%rax,2), %rdx
	leaq	12(%rbx), %rax
	leaq	(%rax,%rdx,4), %rdx
	movq	%rbx, %rax
	.p2align 4,,10
	.p2align 3
.L194:
	movl	$-1, (%rax)
	addq	$12, %rax
	cmpq	%rdx, %rax
	jne	.L194
	xorl	%ebp, %ebp
	leaq	20(%rsp), %r15
	leaq	16(%rsp), %r14
	leaq	12(%rsp), %r13
	leaq	.LC10(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L199:
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rdx
	movslq	20(%rsp), %rax
	leaq	4+T(%rip), %rdi
	movslq	12(%rsp), %rsi
	movd	%edx, %xmm0
	movd	%eax, %xmm1
	movq	%rsi, %rcx
	punpckldq	%xmm1, %xmm0
	leaq	(%rsi,%rsi,2), %rsi
	movq	%xmm0, (%rdi,%rsi,4)
	cmpl	$-1, %edx
	je	.L195
	leaq	(%rdx,%rdx,2), %rdx
	subq	$4, %rdi
	movl	%ecx, (%rdi,%rdx,4)
.L195:
	cmpl	$-1, %eax
	je	.L196
	movl	n(%rip), %edx
	leaq	(%rax,%rax,2), %rax
	leaq	T(%rip), %rsi
	addl	$1, %ebp
	movl	%ecx, (%rsi,%rax,4)
	cmpl	%edx, %ebp
	jl	.L199
.L198:
	testl	%edx, %edx
	jle	.L193
	xorl	%ebp, %ebp
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L201:
	cmpl	$-1, (%rbx)
	cmove	%eax, %ebp
	addl	$1, %eax
	addq	$12, %rbx
	cmpl	%edx, %eax
	jne	.L201
.L202:
	xorl	%esi, %esi
	movl	%ebp, %edi
	call	setDepth
	movl	%ebp, %edi
	call	setHeight
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L203
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L204:
	movl	%ebx, %edi
	addl	$1, %ebx
	call	print
	cmpl	%ebx, n(%rip)
	jg	.L204
.L203:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L213
	addq	$40, %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
.L196:
	.cfi_restore_state
	movl	n(%rip), %edx
	addl	$1, %ebp
	cmpl	%ebp, %edx
	jg	.L199
	jmp	.L198
.L193:
	xorl	%ebp, %ebp
	jmp	.L202
.L213:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE27:
	.size	main, .-main
	.globl	H
	.bss
	.align 32
	.type	H, @object
	.size	H, 40000
H:
	.zero	40000
	.globl	D
	.align 32
	.type	D, @object
	.size	D, 40000
D:
	.zero	40000
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	T
	.align 32
	.type	T, @object
	.size	T, 120000
T:
	.zero	120000
	.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 10000
#define NIL -1

typedef struct Node{ int parent,left,right;}Node;

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

void setDepth(int u,int d){
  if(u==NIL) return;
  D[u] = d;
  setDepth(T[u].left,d+1);
  setDepth(T[u].right,d+1);
}

int setHeight(int u){
  int h1 = 0,h2 = 0;
  if(T[u].left !=NIL) h1=setHeight(T[u].left)+1;
  if(T[u].right !=NIL) h2=setHeight(T[u].right)+1;
  return H[u] = (h1>h2?h1:h2);
}

int getSibling(int u){
  if(T[u].parent == NIL) return NIL;
  if(T[T[u].parent].left!=u&&T[T[u].parent].left!=NIL) return T[T[u].parent].left;
  if(T[T[u].parent].right!=u&&T[T[u].parent].right!=NIL) return T[T[u].parent].right;
  return NIL;
}

void print(int u){
  printf("node %d: ",u);
  printf("parent = %d, ",T[u].parent);
  printf("sibling = %d, ",getSibling(u));
  int deg=0;
  if(T[u].left != NIL) deg++;
  if(T[u].right != NIL) deg++;
  printf("degree = %d, ",deg);
  printf("depth = %d, ",D[u]);
  printf("height = %d, ",H[u]);

  if(T[u].parent == NIL){
    printf("root\n");
  }else if(T[u].left == NIL && T[u].right == NIL){
    printf("leaf\n");
  }else{
    printf("internal node\n");
  }
}

int main(){
  int v,l,r,i,root=0;
  scanf("%d",&n);

  for(i = 0;i<n;i++) T[i].parent = NIL;

  for(i=0;i<n;i++){
    scanf("%d %d %d",&v,&l,&r);
    T[v].left = l;
    T[v].right = r;
    if(l!=NIL) T[l].parent = v;
    if(r!=NIL) T[r].parent = v;
  }

  for(i = 0; i < n; i++) if(T[i].parent == NIL) root = i;

  setDepth(root,0);
  setHeight(root);

  for(i=0;i<n;i++) print(i);

  return 0;
}


9
0 1 4
1 2 3
2 -1 -1
3 -1 -1
4 5 8
5 6 7
6 -1 -1
7 -1 -1
8 -1 -1
 9
0 1 4
1 2 3
2 -1 -1
3 -1 -1
4 5 8
5 6 7
6 -1 -1
7 -1 -1
8 -1 -1

node 0: parent = -1, sibling = -1, degree = 2, depth = 0, height = 3, root
node 1: parent = 0, sibling = 4, degree = 2, depth = 1, height = 1, internal node
node 2: parent = 1, sibling = 3, degree = 0, depth = 2, height = 0, leaf
node 3: parent = 1, sibling = 2, degree = 0, depth = 2, height = 0, leaf
node 4: parent = 0, sibling = 1, degree = 2, depth = 1, height = 2, internal node
node 5: parent = 4, sibling = 8, degree = 2, depth = 2, height = 1, internal node
node 6: parent = 5, sibling = 7, degree = 0, depth = 3, height = 0, leaf
node 7: parent = 5, sibling = 6, degree = 0, depth = 3, height = 0, leaf
node 8: parent = 4, sibling = 5, degree = 0, depth = 2, height = 0, leaf
 node 0: parent = -1, sibling = -1, degree = 2, depth = 0, height = 3, root
node 1: parent = 0, sibling = 4, degree = 2, depth = 1, height = 1, internal node
node 2: parent = 1, sibling = 3, degree = 0, depth = 2, height = 0, leaf
node 3: parent = 1, sibling = 2, degree = 0, depth = 2, height = 0, leaf
node 4: parent = 0, sibling = 1, degree = 2, depth = 1, height = 2, internal node
node 5: parent = 4, sibling = 8, degree = 2, depth = 2, height = 1, internal node
node 6: parent = 5, sibling = 7, degree = 0, depth = 3, height = 0, leaf
node 7: parent = 5, sibling = 6, degree = 0, depth = 3, height = 0, leaf
node 8: parent = 4, sibling = 5, degree = 0, depth = 2, height = 0, 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 10000
#define NIL -1

typedef struct Node{ int parent,left,right;}Node;

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

void setDepth(int u,int d){
  if(u==NIL) return;
  D[u] = d;
  setDepth(T[u].left,d+1);
  setDepth(T[u].right,d+1);
}

int setHeight(int u){
  int h1 = 0,h2 = 0;
  if(T[u].left !=NIL) h1=setHeight(T[u].left)+1;
  if(T[u].right !=NIL) h2=setHeight(T[u].right)+1;
  return H[u] = (h1>h2?h1:h2);
}

int getSibling(int u){
  if(T[u].parent == NIL) return NIL;
  if(T[T[u].parent].left!=u&&T[T[u].parent].left!=NIL) return T[T[u].parent].left;
  if(T[T[u].parent].right!=u&&T[T[u].parent].right!=NIL) return T[T[u].parent].right;
  return NIL;
}

void print(int u){
  printf("node %d: ",u);
  printf("parent = %d, ",T[u].parent);
  printf("sibling = %d, ",getSibling(u));
  int deg=0;
  if(T[u].left != NIL) deg++;
  if(T[u].right != NIL) deg++;
  printf("degree = %d, ",deg);
  printf("depth = %d, ",D[u]);
  printf("height = %d, ",H[u]);

  if(T[u].parent == NIL){
    printf("root\n");
  }else if(T[u].left == NIL && T[u].right == NIL){
    printf("leaf\n");
  }else{
    printf("internal node\n");
  }
}

int main(){
  int v,l,r,i,root=0;
  scanf("%d",&n);

  for(i = 0;i<n;i++) T[i].parent = NIL;

  for(i=0;i<n;i++){
    scanf("%d %d %d",&v,&l,&r);
    T[v].left = l;
    T[v].right = r;
    if(l!=NIL) T[l].parent = v;
    if(r!=NIL) T[r].parent = v;
  }

  for(i = 0; i < n; i++) if(T[i].parent == NIL) root = i;

  setDepth(root,0);
  setHeight(root);

  for(i=0;i<n;i++) print(i);

  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	T
	.bss
	.align 32
	.type	T, @object
	.size	T, 120000
T:
	.zero	120000
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	D
	.align 32
	.type	D, @object
	.size	D, 40000
D:
	.zero	40000
	.globl	H
	.align 32
	.type	H, @object
	.size	H, 40000
H:
	.zero	40000
	.text
	.globl	setDepth
	.type	setDepth, @function
setDepth:
.LFB0:
	.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)
	cmpl	$-1, -4(%rbp)
	je	.L4
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	D(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	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	setDepth
	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	8+T(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	setDepth
	jmp	.L1
.L4:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	setDepth, .-setDepth
	.globl	setHeight
	.type	setHeight, @function
setHeight:
.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	$0, -8(%rbp)
	movl	$0, -4(%rbp)
	movl	-20(%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	.L6
	movl	-20(%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, %edi
	call	setHeight
	addl	$1, %eax
	movl	%eax, -8(%rbp)
.L6:
	movl	-20(%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	.L7
	movl	-20(%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, %edi
	call	setHeight
	addl	$1, %eax
	movl	%eax, -4(%rbp)
.L7:
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	H(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	H(%rip), %rax
	movl	(%rdx,%rax), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	setHeight, .-setHeight
	.globl	getSibling
	.type	getSibling, @function
getSibling:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	-4(%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	.L10
	movl	$-1, %eax
	jmp	.L11
.L10:
	movl	-4(%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
	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	%eax, -4(%rbp)
	je	.L12
	movl	-4(%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
	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	.L12
	movl	-4(%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
	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
	jmp	.L11
.L12:
	movl	-4(%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
	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	%eax, -4(%rbp)
	je	.L13
	movl	-4(%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
	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	.L13
	movl	-4(%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
	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
	jmp	.L11
.L13:
	movl	$-1, %eax
.L11:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	getSibling, .-getSibling
	.section	.rodata
.LC0:
	.string	"node %d: "
.LC1:
	.string	"parent = %d, "
.LC2:
	.string	"sibling = %d, "
.LC3:
	.string	"degree = %d, "
.LC4:
	.string	"depth = %d, "
.LC5:
	.string	"height = %d, "
.LC6:
	.string	"root"
.LC7:
	.string	"leaf"
.LC8:
	.string	"internal node"
	.text
	.globl	print
	.type	print, @function
print:
.LFB3:
	.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	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-20(%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	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	getSibling
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -4(%rbp)
	movl	-20(%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	.L15
	addl	$1, -4(%rbp)
.L15:
	movl	-20(%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	.L16
	addl	$1, -4(%rbp)
.L16:
	movl	-4(%rbp), %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	H(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-20(%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	.L17
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L20
.L17:
	movl	-20(%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	.L19
	movl	-20(%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
	jne	.L19
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L20
.L19:
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L20:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	print, .-print
	.section	.rodata
.LC9:
	.string	"%d"
.LC10:
	.string	"%d %d %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB4:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -12(%rbp)
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L22
.L23:
	movl	-16(%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	$-1, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L22:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L23
	movl	$0, -16(%rbp)
	jmp	.L24
.L27:
	leaq	-20(%rbp), %rcx
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC10(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	movl	-24(%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)
	movl	-28(%rbp), %eax
	movl	-20(%rbp), %edx
	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)
	movl	-24(%rbp), %eax
	cmpl	$-1, %eax
	je	.L25
	movl	-24(%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	T(%rip), %rax
	movl	%edx, (%rcx,%rax)
.L25:
	movl	-20(%rbp), %eax
	cmpl	$-1, %eax
	je	.L26
	movl	-20(%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	T(%rip), %rax
	movl	%edx, (%rcx,%rax)
.L26:
	addl	$1, -16(%rbp)
.L24:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L27
	movl	$0, -16(%rbp)
	jmp	.L28
.L30:
	movl	-16(%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	.L29
	movl	-16(%rbp), %eax
	movl	%eax, -12(%rbp)
.L29:
	addl	$1, -16(%rbp)
.L28:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L30
	movl	-12(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	setDepth
	movl	-12(%rbp), %eax
	movl	%eax, %edi
	call	setHeight
	movl	$0, -16(%rbp)
	jmp	.L31
.L32:
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	print
	addl	$1, -16(%rbp)
.L31:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L32
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	T
	.bss
	.align 32
	.type	T, @object
	.size	T, 120000
T:
	.zero	120000
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	D
	.align 32
	.type	D, @object
	.size	D, 40000
D:
	.zero	40000
	.globl	H
	.align 32
	.type	H, @object
	.size	H, 40000
H:
	.zero	40000
	.text
	.globl	setDepth
	.type	setDepth, @function
setDepth:
.LFB0:
	.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)
	cmpl	$-1, -4(%rbp)
	je	.L4
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	D(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	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	setDepth
	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	8+T(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	setDepth
	jmp	.L1
.L4:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	setDepth, .-setDepth
	.globl	setHeight
	.type	setHeight, @function
setHeight:
.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	$0, -8(%rbp)
	movl	$0, -4(%rbp)
	movl	-20(%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	.L6
	movl	-20(%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, %edi
	call	setHeight
	addl	$1, %eax
	movl	%eax, -8(%rbp)
.L6:
	movl	-20(%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	.L7
	movl	-20(%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, %edi
	call	setHeight
	addl	$1, %eax
	movl	%eax, -4(%rbp)
.L7:
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	H(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	H(%rip), %rax
	movl	(%rdx,%rax), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	setHeight, .-setHeight
	.globl	getSibling
	.type	getSibling, @function
getSibling:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	-4(%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	.L10
	movl	$-1, %eax
	jmp	.L11
.L10:
	movl	-4(%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
	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	%eax, -4(%rbp)
	je	.L12
	movl	-4(%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
	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	.L12
	movl	-4(%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
	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
	jmp	.L11
.L12:
	movl	-4(%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
	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	%eax, -4(%rbp)
	je	.L13
	movl	-4(%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
	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	.L13
	movl	-4(%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
	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
	jmp	.L11
.L13:
	movl	$-1, %eax
.L11:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	getSibling, .-getSibling
	.section	.rodata
.LC0:
	.string	"node %d: "
.LC1:
	.string	"parent = %d, "
.LC2:
	.string	"sibling = %d, "
.LC3:
	.string	"degree = %d, "
.LC4:
	.string	"depth = %d, "
.LC5:
	.string	"height = %d, "
.LC6:
	.string	"root"
.LC7:
	.string	"leaf"
.LC8:
	.string	"internal node"
	.text
	.globl	print
	.type	print, @function
print:
.LFB3:
	.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	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-20(%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	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	getSibling
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -4(%rbp)
	movl	-20(%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	.L15
	addl	$1, -4(%rbp)
.L15:
	movl	-20(%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	.L16
	addl	$1, -4(%rbp)
.L16:
	movl	-4(%rbp), %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	H(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-20(%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	.L17
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L20
.L17:
	movl	-20(%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	.L19
	movl	-20(%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
	jne	.L19
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L20
.L19:
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L20:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	print, .-print
	.section	.rodata
.LC9:
	.string	"%d"
.LC10:
	.string	"%d %d %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB4:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -12(%rbp)
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L22
.L23:
	movl	-16(%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	$-1, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L22:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L23
	movl	$0, -16(%rbp)
	jmp	.L24
.L27:
	leaq	-20(%rbp), %rcx
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC10(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	movl	-24(%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)
	movl	-28(%rbp), %eax
	movl	-20(%rbp), %edx
	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)
	movl	-24(%rbp), %eax
	cmpl	$-1, %eax
	je	.L25
	movl	-24(%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	T(%rip), %rax
	movl	%edx, (%rcx,%rax)
.L25:
	movl	-20(%rbp), %eax
	cmpl	$-1, %eax
	je	.L26
	movl	-20(%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	T(%rip), %rax
	movl	%edx, (%rcx,%rax)
.L26:
	addl	$1, -16(%rbp)
.L24:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L27
	movl	$0, -16(%rbp)
	jmp	.L28
.L30:
	movl	-16(%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	.L29
	movl	-16(%rbp), %eax
	movl	%eax, -12(%rbp)
.L29:
	addl	$1, -16(%rbp)
.L28:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L30
	movl	-12(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	setDepth
	movl	-12(%rbp), %eax
	movl	%eax, %edi
	call	setHeight
	movl	$0, -16(%rbp)
	jmp	.L31
.L32:
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	print
	addl	$1, -16(%rbp)
.L31:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L32
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
