// File: /workspace/github_cpp_makefile_star2_O2/cpottamus[P]btree_lab/btree.cc
// Function: BTreeIndex::DisplayInternal(unsigned int const&, std::ostream&, BTreeDisplayType) const
ERROR_T BTreeIndex::DisplayInternal(const SIZE_T &node,
  ostream &o,
  BTreeDisplayType display_type) const
{
  KEY_T testkey;
  SIZE_T ptr;
  BTreeNode b;
  ERROR_T rc;
  SIZE_T offset;

  rc= b.Unserialize(buffercache,node);

  if (rc!=ERROR_NOERROR) { 
    return rc;
  }

  rc = PrintNode(o,node,b,display_type);
  
  if (rc) { return rc; }

  if (display_type==BTREE_DEPTH_DOT) { 
    o << ";";
  }

  if (display_type!=BTREE_SORTED_KEYVAL) {
    o << endl;
  }

  switch (b.info.nodetype) { 
    case BTREE_ROOT_NODE:
    case BTREE_INTERIOR_NODE:
    if (b.info.numkeys>0) { 
      for (offset=0;offset<=b.info.numkeys;offset++) { 
       rc=b.GetPtr(offset,ptr);
       if (rc) { return rc; }
       if (display_type==BTREE_DEPTH_DOT) { 
         o << node << " -> "<<ptr<<";\n";
       }
       rc=DisplayInternal(ptr,o,display_type);
       if (rc) { return rc; }
     }
   }
   return ERROR_NOERROR;
   break;
   case BTREE_LEAF_NODE:
   return ERROR_NOERROR;
   break;
   default:
   if (display_type==BTREE_DEPTH_DOT) { 
   } else {
    o << "Unsupported Node Type " << b.info.nodetype ;
  }
  return ERROR_INSANE;
}

return ERROR_NOERROR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %ecx, %r14d
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
leaq 0xa0(%rsp), %rdi
callq 0x2ac4
leaq 0x10(%rsp), %rdi
callq 0x725a
movq %r12, 0x48(%rsp)
movq 0x8(%r12), %rsi
movq %r15, 0x40(%rsp)
movl (%r15), %edx
leaq 0x10(%rsp), %rdi
callq 0x73fc
movl %eax, %r15d
testl %eax, %eax
jne 0x69ed
movq 0x40(%rsp), %rax
movl (%rax), %r15d
leaq 0x50(%rsp), %rdi
callq 0x2ac4
leaq 0x78(%rsp), %rdi
callq 0x2ac4
cmpl $0x1, %r14d
jne 0x670a
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2120
leaq 0x21da(%rip), %rsi      # 0x88d7
movq %rax, %rdi
callq 0x21b0
movq %rax, %rdi
jmp 0x6712
testl %r14d, %r14d
jne 0x6729
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2120
leaq 0x21d0(%rip), %rsi      # 0x88f1
movq %rax, %rdi
callq 0x21b0
movl 0x10(%rsp), %eax
leal -0x2(%rax), %ecx
cmpl $0x2, %ecx
jae 0x680f
cmpl $0x2, %r14d
je 0x69d1
cmpl $0x1, %r14d
je 0x6758
leaq 0x2192(%rip), %rsi      # 0x88e2
movq %rbx, %rdi
callq 0x21b0
xorl %r12d, %r12d
leaq 0x10(%rsp), %r13
leaq 0x1f0d(%rip), %rbp      # 0x8674
cmpl 0x28(%rsp), %r12d
ja 0x699f
movq %r13, %rdi
movl %r12d, %esi
leaq 0xc(%rsp), %rdx
callq 0x766e
movl %eax, %r15d
testl %eax, %eax
jne 0x69d4
movq %rbx, %rdi
leaq 0x1e32(%rip), %rsi      # 0x85c9
callq 0x21b0
movl 0xc(%rsp), %esi
movq %rax, %rdi
callq 0x2120
movq %rax, %rdi
movq %rbp, %rsi
callq 0x21b0
cmpl 0x28(%rsp), %r12d
je 0x699f
movq %r13, %rdi
movl %r12d, %esi
leaq 0x50(%rsp), %rdx
callq 0x7622
movl %eax, %r15d
testl %eax, %eax
jne 0x69d4
xorl %r15d, %r15d
movl 0x14(%rsp), %eax
cmpq %rax, %r15
jae 0x67fc
movq 0x58(%rsp), %rax
movsbl (%rax,%r15), %esi
movq %rbx, %rdi
callq 0x2240
incq %r15
jmp 0x67dc
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x21b0
incl %r12d
jmp 0x6767
cmpl $0x4, %eax
jne 0x696d
leal -0x1(%r14), %eax
cmpl $0x2, %eax
jb 0x6830
leaq 0x20c5(%rip), %rsi      # 0x88ed
movq %rbx, %rdi
callq 0x21b0
cmpl $0x2, %r14d
leaq 0x20b9(%rip), %r13      # 0x88f4
leaq 0x1e32(%rip), %rax      # 0x8674
cmovneq %rax, %r13
leaq 0x20a9(%rip), %rbp      # 0x88f6
cmovneq %rax, %rbp
xorl %r12d, %r12d
cmpl 0x28(%rsp), %r12d
jae 0x699f
testl %r12d, %r12d
je 0x6876
movq %rbx, %rdi
leaq 0x2307(%rip), %rsi      # 0x8b75
cmpl $0x2, %r14d
je 0x68c7
jmp 0x68cc
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
leaq 0xc(%rsp), %rdx
callq 0x766e
movl %eax, %r15d
testl %eax, %eax
jne 0x69d4
movq %rbx, %rdi
leaq 0x22d9(%rip), %rsi      # 0x8b75
cmpl $0x2, %r14d
je 0x68c7
movq %rbx, %rdi
leaq 0x1d1d(%rip), %rsi      # 0x85c9
callq 0x21b0
movl 0xc(%rsp), %esi
movq %rax, %rdi
callq 0x2120
movq %rax, %rdi
leaq 0x1dad(%rip), %rsi      # 0x8674
callq 0x21b0
leaq 0x10(%rsp), %rdi
movl %r12d, %esi
leaq 0x50(%rsp), %rdx
callq 0x7622
movl %eax, %r15d
testl %eax, %eax
jne 0x69d4
xorl %r15d, %r15d
movl 0x14(%rsp), %eax
cmpq %rax, %r15
jae 0x690c
movq 0x58(%rsp), %rax
movsbl (%rax,%r15), %esi
movq %rbx, %rdi
callq 0x2240
incq %r15
jmp 0x68ec
movq %rbx, %rdi
movq %r13, %rsi
callq 0x21b0
leaq 0x10(%rsp), %rdi
movl %r12d, %esi
leaq 0x78(%rsp), %rdx
callq 0x768a
movl %eax, %r15d
testl %eax, %eax
jne 0x69d4
xorl %r15d, %r15d
movl 0x18(%rsp), %eax
cmpq %rax, %r15
jae 0x695a
movq 0x80(%rsp), %rax
movsbl (%rax,%r15), %esi
movq %rbx, %rdi
callq 0x2240
incq %r15
jmp 0x6937
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x21b0
incl %r12d
jmp 0x6854
cmpl $0x1, %r14d
jne 0x69b6
leaq 0x1f7f(%rip), %rsi      # 0x88f9
movq %rbx, %rdi
callq 0x21b0
movl 0x10(%rsp), %esi
movq %rax, %rdi
callq 0x2370
leaq 0x1dd0(%rip), %rsi      # 0x8765
movq %rax, %rdi
callq 0x21b0
jmp 0x69a5
cmpl $0x1, %r14d
jne 0x69d1
leaq 0x1f56(%rip), %rsi      # 0x8902
movq %rbx, %rdi
callq 0x21b0
jmp 0x69d1
leaq 0x1dfd(%rip), %rsi      # 0x87ba
movq %rbx, %rdi
callq 0x21b0
movl 0x10(%rsp), %esi
movq %rax, %rdi
callq 0x2370
xorl %r15d, %r15d
leaq 0x78(%rsp), %rdi
callq 0x2c6e
leaq 0x50(%rsp), %rdi
callq 0x2c6e
testl %r15d, %r15d
je 0x6a19
leaq 0x10(%rsp), %rdi
callq 0x7264
leaq 0xa0(%rsp), %rdi
callq 0x2c6e
movl %r15d, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x1, %r14d
jne 0x6a30
leaq 0x1d8a(%rip), %rsi      # 0x87b0
movq %rbx, %rdi
callq 0x21b0
jmp 0x6a36
cmpl $0x2, %r14d
je 0x6a3e
movq %rbx, %rdi
callq 0x20c0
xorl %r15d, %r15d
movl 0x10(%rsp), %eax
leal -0x2(%rax), %ecx
cmpl $0x2, %ecx
jae 0x6ae6
cmpl $0x0, 0x28(%rsp)
je 0x69ed
leaq 0x10(%rsp), %r12
leaq 0x3c(%rsp), %r13
xorl %ebp, %ebp
cmpl 0x28(%rsp), %ebp
ja 0x6b1d
movq %r12, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x766e
movl %eax, %r15d
testl %eax, %eax
jne 0x69ed
cmpl $0x1, %r14d
jne 0x6ac5
movq 0x40(%rsp), %rax
movl (%rax), %esi
movq %rbx, %rdi
callq 0x2120
movq %rax, %rdi
leaq 0x1d0d(%rip), %rsi      # 0x87b2
callq 0x21b0
movl 0x3c(%rsp), %esi
movq %rax, %rdi
callq 0x2120
movq %rax, %rdi
leaq 0x1cf7(%rip), %rsi      # 0x87b7
callq 0x21b0
movq 0x48(%rsp), %rdi
movq %r13, %rsi
movq %rbx, %rdx
movl %r14d, %ecx
callq 0x666e
movl %eax, %r15d
incl %ebp
testl %eax, %eax
je 0x6a64
jmp 0x69ed
cmpl $0x4, %eax
je 0x69ed
pushq $-0xf
popq %r15
cmpl $0x1, %r14d
je 0x69ed
leaq 0x1cb6(%rip), %rsi      # 0x87ba
movq %rbx, %rdi
callq 0x21b0
movl 0x10(%rsp), %esi
movq %rax, %rdi
callq 0x2370
jmp 0x69ed
xorl %r15d, %r15d
jmp 0x69ed
movq %rax, %rbx
jmp 0x6b4d
movq %rax, %rbx
jmp 0x6b61
jmp 0x6b40
jmp 0x6b33
movq %rax, %rbx
jmp 0x6b57
jmp 0x6b40
jmp 0x6b40
jmp 0x6b40
jmp 0x6b40
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x2c6e
leaq 0x50(%rsp), %rdi
callq 0x2c6e
leaq 0x10(%rsp), %rdi
callq 0x7264
leaq 0xa0(%rsp), %rdi
callq 0x2c6e
movq %rbx, %rdi
callq 0x2380