// File: /workspace/github_c_makefile_star2_O0/mvermeulen[P]wspy/proctree.c
// Function: print_tree
static void print_tree(struct process_info *pinfo,int level){
  int i;
  int comm_width;
  int print_width;
  struct process_info *eldest;
  // print the node
  for (i=0;i<level;i++) printf("  ");
  printf("%d)",pinfo->pid);

  if (print_cmdline && pinfo->cmdline){
    print_width = output_width - 8 - 2*level;
    printf(" %.*s",print_width,pinfo->cmdline);
  } else if (pinfo->comm){
    printf(" %-16s",pinfo->comm);
  } else {
    printf(" ??");
  }
  printf(" cpu=%d",pinfo->processor);
  if (fflag){
    printf(" start=%-5.2f finish=%-5.2f",pinfo->start,pinfo->finish);
  }
  if (mflag){
    printf(" vmsize=%uk",(pinfo->vsize+512)/1024);
  }
  if (uflag){
    printf(" utime=%-4.2f stime=%-4.2f",
	   ((double) pinfo->utime/clocks_per_second),
	   ((double) pinfo->stime/clocks_per_second));
  }

  printf("\n");

  if (!pinfo->children) return;
  
  // find the eldest child and print the children
  for (eldest=pinfo->children;eldest->older_sibling != NULL;eldest=eldest->older_sibling);

  while (eldest){
    print_tree(eldest,level+1);
    eldest = eldest->younger_sibling;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x1f97
leaq 0x14ec(%rip), %rdi      # 0x3471
movb $0x0, %al
callq 0x1080
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x1f76
movq -0x8(%rbp), %rax
movl (%rax), %esi
leaq 0x14d0(%rip), %rdi      # 0x3474
movb $0x0, %al
callq 0x1080
cmpl $0x0, 0x3162(%rip)      # 0x5114
je 0x1fed
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1fed
movl 0x311f(%rip), %eax      # 0x50e4
subl $0x8, %eax
movl -0xc(%rbp), %ecx
shll %ecx
subl %ecx, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %esi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x1494(%rip), %rdi      # 0x3478
movb $0x0, %al
callq 0x1080
jmp 0x2020
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2010
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x1477(%rip), %rdi      # 0x347e
movb $0x0, %al
callq 0x1080
jmp 0x201e
leaq 0x146e(%rip), %rdi      # 0x3485
movb $0x0, %al
callq 0x1080
jmp 0x2020
movq -0x8(%rbp), %rax
movl 0x3c(%rax), %esi
leaq 0x145b(%rip), %rdi      # 0x3489
movb $0x0, %al
callq 0x1080
cmpl $0x0, 0x30a4(%rip)      # 0x50e0
je 0x205e
movq -0x8(%rbp), %rax
movsd 0x18(%rax), %xmm0
movq -0x8(%rbp), %rax
movsd 0x20(%rax), %xmm1
leaq 0x143a(%rip), %rdi      # 0x3491
movb $0x2, %al
callq 0x1080
cmpl $0x0, 0x30a3(%rip)      # 0x5108
je 0x2085
movq -0x8(%rbp), %rax
movl 0x38(%rax), %esi
addl $0x200, %esi            # imm = 0x200
shrl $0xa, %esi
leaq 0x142f(%rip), %rdi      # 0x34ad
movb $0x0, %al
callq 0x1080
cmpl $0x0, 0x3080(%rip)      # 0x510c
je 0x20c8
movq -0x8(%rbp), %rax
movl 0x28(%rax), %ecx
movl 0x2c(%rax), %eax
cvtsi2sd %rcx, %xmm0
cvtsi2sdl 0x33bb(%rip), %xmm1 # 0x5460
divsd %xmm1, %xmm0
cvtsi2sd %rax, %xmm1
cvtsi2sdl 0x33aa(%rip), %xmm2 # 0x5460
divsd %xmm2, %xmm1
leaq 0x13f8(%rip), %rdi      # 0x34b9
movb $0x2, %al
callq 0x1080
leaq 0x103f(%rip), %rdi      # 0x310e
movb $0x0, %al
callq 0x1080
movq -0x8(%rbp), %rax
cmpq $0x0, 0x50(%rax)
jne 0x20e3
jmp 0x2130
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x210a
jmp 0x20fc
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x20ef
jmp 0x210c
cmpq $0x0, -0x20(%rbp)
je 0x2130
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x1f60
movq -0x20(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x210c
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)