// File: /workspace/github_cpp_makefile_star2_O2/cpottamus[P]btree_lab/btree_ds.cc
// Function: BTreeNode::Print(std::ostream&) const
ostream & BTreeNode::Print(ostream &os) const 
{
  os << "BTreeNode(info="<<info;
  if (info.nodetype!=BTREE_UNALLOCATED_BLOCK && info.nodetype!=BTREE_SUPERBLOCK) { 
    os <<", ";
    if (info.nodetype==BTREE_INTERIOR_NODE || info.nodetype==BTREE_ROOT_NODE) {
      SIZE_T ptr;
      KEY_T key;
      os << "pointers_and_values=(";
      if (info.numkeys>0) { // ==0 implies an empty root node
	for (SIZE_T i=0;i<info.numkeys;i++) {
	  GetPtr(i,ptr);
	  os<<ptr<<", ";
	  GetKey(i,key);
	  os<<key<<", ";
	}
	GetPtr(info.numkeys,ptr);
	os <<ptr;
      } 
      os << ")";
	
    }
    if (info.nodetype==BTREE_LEAF_NODE) { 
      KEY_T key;
      VALUE_T val;
      os << "keys_and_values=(";
      for (SIZE_T i=0;i<info.numkeys;i++) {
	if (i>0) { 
	  os<<", ";
	}
	GetKey(i,key);
	os<<key<<", ";
	GetVal(i,val);
	os<<val;
      }
      os <<")";
    }
  }
  os <<")";
  return os;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1374(%rip), %rsi      # 0x8b51
movq %rbx, %rdi
callq 0x21b0
movq %r14, %rdi
movq %rax, %rsi
callq 0x714e
cmpl $0x2, (%r14)
jb 0x7992
leaq 0xe72(%rip), %rsi       # 0x8673
movq %rbx, %rdi
callq 0x21b0
movl (%r14), %eax
movl %eax, %ecx
andl $-0x2, %ecx
cmpl $0x2, %ecx
jne 0x78dc
leaq 0x8(%rsp), %rdi
callq 0x2ac4
leaq 0x1336(%rip), %rsi      # 0x8b61
movq %rbx, %rdi
callq 0x21b0
movl 0x18(%r14), %esi
testl %esi, %esi
je 0x78c0
xorl %ebp, %ebp
leaq 0x30(%rsp), %r15
leaq 0xe26(%rip), %r12       # 0x8673
leaq 0x8(%rsp), %r13
cmpl %esi, %ebp
jae 0x78a5
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x766e
movl 0x30(%rsp), %esi
movq %rbx, %rdi
callq 0x2120
movq %rax, %rdi
movq %r12, %rsi
callq 0x21b0
movq %r14, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x7622
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2d16
movq %rax, %rdi
movq %r12, %rsi
callq 0x21b0
incl %ebp
movl 0x18(%r14), %esi
jmp 0x7852
leaq 0x30(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x766e
movl (%r15), %esi
movq %rbx, %rdi
callq 0x2120
leaq 0xe9e(%rip), %rsi       # 0x8765
movq %rbx, %rdi
callq 0x21b0
leaq 0x8(%rsp), %rdi
callq 0x2c6e
movl (%r14), %eax
cmpl $0x4, %eax
jne 0x7992
leaq 0x8(%rsp), %rdi
callq 0x2ac4
leaq 0x30(%rsp), %rdi
callq 0x2ac4
leaq 0x1277(%rip), %rsi      # 0x8b77
movq %rbx, %rdi
callq 0x21b0
xorl %ebp, %ebp
leaq 0x8(%rsp), %r15
leaq 0xd5d(%rip), %r12       # 0x8673
leaq 0x30(%rsp), %r13
cmpl 0x18(%r14), %ebp
jae 0x796f
testl %ebp, %ebp
je 0x7930
movq %rbx, %rdi
movq %r12, %rsi
callq 0x21b0
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x7622
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2d16
movq %rax, %rdi
movq %r12, %rsi
callq 0x21b0
movq %r14, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x768a
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2d16
incl %ebp
jmp 0x791b
leaq 0xdef(%rip), %rsi       # 0x8765
movq %rbx, %rdi
callq 0x21b0
leaq 0x30(%rsp), %rdi
callq 0x2c6e
leaq 0x8(%rsp), %rdi
callq 0x2c6e
leaq 0xdcc(%rip), %rsi       # 0x8765
movq %rbx, %rdi
callq 0x21b0
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x79b9
jmp 0x79be
jmp 0x79b9
movq %rax, %rbx
jmp 0x79cb
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2c6e
leaq 0x8(%rsp), %rdi
callq 0x2c6e
movq %rbx, %rdi
callq 0x2380