// File: /workspace/github_cpp_makefile_star2_O1/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 0x1824(%rip), %rsi      # 0x9b39
movl $0xf, %edx
movq %rbx, %rdi
callq 0x2230
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7bda
cmpl $0x2, (%r14)
jb 0x8503
leaq 0x1335(%rip), %rsi      # 0x9673
movl $0x2, %edx
movq %rbx, %rdi
callq 0x2230
movl (%r14), %eax
andl $-0x2, %eax
cmpl $0x2, %eax
jne 0x8433
leaq 0x8(%rsp), %rdi
callq 0x2c54
leaq 0x17de(%rip), %rsi      # 0x9b49
movl $0x15, %edx
movq %rbx, %rdi
callq 0x2230
cmpl $0x0, 0x18(%r14)
je 0x8415
movl 0x18(%r14), %esi
testl %esi, %esi
je 0x83fa
xorl %ebp, %ebp
leaq 0x12df(%rip), %r15      # 0x9673
leaq 0x8(%rsp), %r12
movq %r14, %rdi
movl %ebp, %esi
callq 0x8056
testq %rax, %rax
je 0x83ab
movl (%rax), %r13d
movl %r13d, %esi
movq %rbx, %rdi
callq 0x2120
movl $0x2, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2230
movq %r14, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x8114
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2f06
movl $0x2, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2230
incl %ebp
movl 0x18(%r14), %esi
cmpl %esi, %ebp
jb 0x8399
jmp 0x83fa
movq %r14, %rdi
callq 0x8056
testq %rax, %rax
je 0x840a
movl (%rax), %r13d
movl %r13d, %esi
movq %rbx, %rdi
callq 0x2120
leaq 0x1331(%rip), %rsi      # 0x974d
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2230
leaq 0x8(%rsp), %rdi
callq 0x2e22
cmpl $0x4, (%r14)
jne 0x8503
leaq 0x8(%rsp), %rdi
callq 0x2c54
leaq 0x30(%rsp), %rdi
callq 0x2c54
leaq 0x1707(%rip), %rsi      # 0x9b5f
movl $0x11, %edx
movq %rbx, %rdi
callq 0x2230
cmpl $0x0, 0x18(%r14)
je 0x84db
xorl %ebp, %ebp
leaq 0x8(%rsp), %r15
leaq 0x11f9(%rip), %r12      # 0x9673
leaq 0x30(%rsp), %r13
testl %ebp, %ebp
je 0x8493
movl $0x2, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2230
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x8114
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2f06
movl $0x2, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2230
movq %r14, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x8180
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2f06
incl %ebp
cmpl 0x18(%r14), %ebp
jb 0x847f
leaq 0x126b(%rip), %rsi      # 0x974d
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2230
leaq 0x30(%rsp), %rdi
callq 0x2e22
leaq 0x8(%rsp), %rdi
callq 0x2e22
leaq 0x1243(%rip), %rsi      # 0x974d
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2230
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x852f
jmp 0x8534
jmp 0x852f
movq %rax, %rbx
jmp 0x8541
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2e22
leaq 0x8(%rsp), %rdi
callq 0x2e22
movq %rbx, %rdi
callq 0x2370