// File: /workspace/github_cpp_makefile_star2_O3/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 $0xd8, %rsp
movq %rcx, 0x8(%rsp)
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0xb0(%rsp), %rdi
callq 0x2c58
leaq 0x18(%rsp), %rdi
callq 0x7c4a
movq %r15, 0x58(%rsp)
movq 0x8(%r15), %rsi
movq %r14, 0x48(%rsp)
movl (%r14), %edx
leaq 0x18(%rsp), %rdi
callq 0x7e00
movl %eax, %r15d
testl %eax, %eax
jne 0x7288
movq 0x48(%rsp), %rax
movl (%rax), %r14d
leaq 0x60(%rsp), %rdi
callq 0x2c58
leaq 0x88(%rsp), %rdi
callq 0x2c58
movq 0x8(%rsp), %rax
cmpl $0x1, %eax
jne 0x6efd
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2120
movq %rax, %r15
leaq 0x29e9(%rip), %rsi      # 0x98d7
movl $0xa, %edx
movq %rax, %rdi
callq 0x2230
jmp 0x6f04
testl %eax, %eax
jne 0x6f23
movq %rbx, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x2120
leaq 0x29db(%rip), %rsi      # 0x98f1
movl $0x2, %edx
movq %rax, %rdi
callq 0x2230
movl 0x18(%rsp), %eax
leal -0x2(%rax), %ecx
cmpl $0x2, %ecx
jae 0x7035
movq 0x8(%rsp), %rax
cmpl $0x2, %eax
je 0x7269
cmpl $0x1, %eax
je 0x6f5a
leaq 0x2995(%rip), %rsi      # 0x98e2
movl $0xa, %edx
movq %rbx, %rdi
callq 0x2230
xorl %r12d, %r12d
leaq 0x18(%rsp), %r13
leaq 0x270b(%rip), %rbp      # 0x9674
leaq 0x7(%rsp), %r14
movq %r13, %rdi
movl %r12d, %esi
leaq 0x14(%rsp), %rdx
callq 0x8078
movl %eax, %r15d
testl %eax, %eax
jne 0x726c
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x2631(%rip), %rsi      # 0x95c9
callq 0x2230
movl 0x14(%rsp), %esi
movq %rbx, %rdi
callq 0x2120
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x2230
cmpl 0x30(%rsp), %r12d
je 0x71ef
movq %r13, %rdi
movl %r12d, %esi
leaq 0x60(%rsp), %rdx
callq 0x802a
movl %eax, %r15d
testl %eax, %eax
jne 0x726c
cmpl $0x0, 0x1c(%rsp)
je 0x7012
xorl %r15d, %r15d
movq 0x68(%rsp), %rax
movb (%rax,%r15), %al
movb %al, 0x7(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2230
incq %r15
movl 0x1c(%rsp), %eax
cmpq %rax, %r15
jb 0x6fe9
movl $0x1, %edx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2230
incl %r12d
cmpl 0x30(%rsp), %r12d
jbe 0x6f6e
jmp 0x71ef
cmpl $0x4, %eax
jne 0x71f8
movq 0x8(%rsp), %rax
decl %eax
cmpl $0x2, %eax
jb 0x705e
leaq 0x289c(%rip), %rsi      # 0x98ed
movl $0x6, %edx
movq %rbx, %rdi
callq 0x2230
cmpl $0x0, 0x30(%rsp)
je 0x71ef
xorl %r13d, %r13d
cmpl $0x2, 0x8(%rsp)
sete %r13b
leaq 0x2878(%rip), %r14      # 0x98f4
leaq 0x25f1(%rip), %rax      # 0x9674
cmovneq %rax, %r14
leaq 0x2868(%rip), %rcx      # 0x98f6
cmovneq %rax, %rcx
movq %rcx, 0x50(%rsp)
incq %r13
xorl %r12d, %r12d
leaq 0x7(%rsp), %rbp
testl %r12d, %r12d
je 0x70ba
movq %rbx, %rdi
leaq 0x2ac4(%rip), %rsi      # 0x9b75
cmpl $0x2, 0x8(%rsp)
je 0x7111
jmp 0x711b
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
leaq 0x14(%rsp), %rdx
callq 0x8078
movl %eax, %r15d
testl %eax, %eax
jne 0x726c
movq %rbx, %rdi
leaq 0x2a95(%rip), %rsi      # 0x9b75
cmpl $0x2, 0x8(%rsp)
je 0x7111
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x24d3(%rip), %rsi      # 0x95c9
callq 0x2230
movl 0x14(%rsp), %esi
movq %rbx, %rdi
callq 0x2120
movq %rax, %rdi
leaq 0x2563(%rip), %rsi      # 0x9674
movl $0x1, %edx
callq 0x2230
leaq 0x18(%rsp), %rdi
movl %r12d, %esi
leaq 0x60(%rsp), %rdx
callq 0x802a
movl %eax, %r15d
testl %eax, %eax
jne 0x726c
cmpl $0x0, 0x1c(%rsp)
je 0x716b
xorl %r15d, %r15d
movq 0x68(%rsp), %rax
movb (%rax,%r15), %al
movb %al, 0x7(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2230
incq %r15
movl 0x1c(%rsp), %eax
cmpq %rax, %r15
jb 0x7142
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2230
leaq 0x18(%rsp), %rdi
movl %r12d, %esi
leaq 0x88(%rsp), %rdx
callq 0x8096
movl %eax, %r15d
testl %eax, %eax
jne 0x726c
cmpl $0x0, 0x20(%rsp)
je 0x71d1
xorl %r15d, %r15d
movq 0x90(%rsp), %rax
movb (%rax,%r15), %al
movb %al, 0x7(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2230
incq %r15
movl 0x20(%rsp), %eax
cmpq %rax, %r15
jb 0x71a5
movq %rbx, %rdi
movq 0x50(%rsp), %rsi
movq %r13, %rdx
callq 0x2230
incl %r12d
cmpl 0x30(%rsp), %r12d
jb 0x70a2
cmpl $0x1, 0x8(%rsp)
je 0x7233
jmp 0x7269
cmpl $0x1, 0x8(%rsp)
jne 0x7249
leaq 0x26f3(%rip), %rsi      # 0x98f9
movl $0x8, %edx
movq %rbx, %rdi
callq 0x2230
movl 0x18(%rsp), %esi
movq %rbx, %rdi
callq 0x2360
leaq 0x253f(%rip), %rsi      # 0x9765
movl $0x1, %edx
movq %rax, %rdi
callq 0x2230
leaq 0x26c8(%rip), %rsi      # 0x9902
movl $0x3, %edx
movq %rbx, %rdi
callq 0x2230
jmp 0x7269
leaq 0x256a(%rip), %rsi      # 0x97ba
movl $0x16, %edx
movq %rbx, %rdi
callq 0x2230
movl 0x18(%rsp), %esi
movq %rbx, %rdi
callq 0x2360
xorl %r15d, %r15d
leaq 0x88(%rsp), %rdi
callq 0x2e26
leaq 0x60(%rsp), %rdi
callq 0x2e26
testl %r15d, %r15d
je 0x72b4
leaq 0x18(%rsp), %rdi
callq 0x7c5a
leaq 0xb0(%rsp), %rdi
callq 0x2e26
movl %r15d, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rax
cmpl $0x1, %eax
jne 0x72d4
leaq 0x24eb(%rip), %rsi      # 0x97b0
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2230
jmp 0x72d9
cmpl $0x2, %eax
je 0x7300
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2130
xorl %r15d, %r15d
movl 0x18(%rsp), %eax
leal -0x2(%rax), %ecx
cmpl $0x2, %ecx
jae 0x73c6
cmpl $0x0, 0x30(%rsp)
je 0x7288
xorl %ebp, %ebp
leaq 0x18(%rsp), %r14
leaq 0x44(%rsp), %r12
leaq 0x2486(%rip), %r13      # 0x97b7
movq %r14, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x8078
movl %eax, %r15d
testl %eax, %eax
jne 0x7288
cmpl $0x1, 0x8(%rsp)
jne 0x7392
movq 0x48(%rsp), %rax
movl (%rax), %esi
movq %rbx, %rdi
callq 0x2120
movq %rax, %r15
movl $0x4, %edx
movq %rax, %rdi
leaq 0x2441(%rip), %rsi      # 0x97b2
callq 0x2230
movl 0x44(%rsp), %esi
movq %r15, %rdi
callq 0x2120
movl $0x2, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x2230
movq 0x58(%rsp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq 0x8(%rsp), %rcx
callq 0x6e54
movl %eax, %r15d
testl %eax, %eax
jne 0x7288
incl %ebp
xorl %r15d, %r15d
cmpl 0x30(%rsp), %ebp
jbe 0x7331
jmp 0x7288
cmpl $0x4, %eax
je 0x7288
movl $0xfffffff1, %r15d      # imm = 0xFFFFFFF1
cmpl $0x1, 0x8(%rsp)
je 0x7288
leaq 0x23d3(%rip), %rsi      # 0x97ba
movl $0x16, %edx
movq %rbx, %rdi
callq 0x2230
movl 0x18(%rsp), %esi
movq %rbx, %rdi
callq 0x2360
jmp 0x7288
movq %rax, %rbx
jmp 0x7430
movq %rax, %rbx
jmp 0x7444
jmp 0x7420
jmp 0x7413
movq %rax, %rbx
jmp 0x743a
jmp 0x7420
jmp 0x7420
jmp 0x7420
jmp 0x7420
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x2e26
leaq 0x60(%rsp), %rdi
callq 0x2e26
leaq 0x18(%rsp), %rdi
callq 0x7c5a
leaq 0xb0(%rsp), %rdi
callq 0x2e26
movq %rbx, %rdi
callq 0x2370
nop