// File: /workspace/github_cpp_makefile_star2_O3/obliviousram[P]PathOHeap/src/OHeapReadPathEviction.cpp
// Function: operator<<(std::ostream&, OHeapReadPathEviction const&)
std::ostream& operator<<(std::ostream& out, const OHeapReadPathEviction& oheap) {
  out << "==========" << std::endl;
  for (int i = 0; i < oheap.num_buckets; i++) {
    std::vector<Block> blocks = oheap.storage->readBucket(i).getBlocks();
    bool all_dummy = true;
    for (const Block& bl : blocks) {
      if (bl.leaf_id != -1) {
        all_dummy = false;
        break;
      }
    }
    if (!all_dummy) {
      out << "Bucket " << i << " contains:" << std::endl;
    
      for (int j = 0; j < oheap.bucket_size; j++) {
        const Block& bl = blocks.at(j);
        if (bl.leaf_id != -1) {
          out << bl << std::endl;
        }
      }

      out << std::endl;
    }
  }
  out << "==========" << std::endl;
  return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x21db(%rip), %rsi      # 0x7248
movl $0xa, %edx
callq 0x2190
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
cmpl $0x0, 0x18(%r14)
jle 0x5243
xorl %r15d, %r15d
leaq 0x18(%rsp), %r12
movq 0x30(%r14), %rsi
movq (%rsi), %rax
movq %r12, %rdi
movl %r15d, %edx
callq *0x8(%rax)
movq %r12, %rdi
callq 0x2918
movq %rsp, %rdi
movq %rax, %rsi
callq 0x52da
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x50eb
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq (%rsp), %rdi
movq 0x8(%rsp), %rax
movq %rdi, %rcx
cmpq %rax, %rdi
je 0x5224
cmpl $-0x1, (%rcx)
jne 0x5113
addq $0x38, %rcx
cmpq %rax, %rcx
jne 0x5100
jmp 0x5224
movl $0x7, %edx
movq %rbx, %rdi
leaq 0x22e0(%rip), %rsi      # 0x7402
callq 0x2190
movq %rbx, %rdi
movl %r15d, %esi
callq 0x2240
movq %rax, %rbp
movl $0xa, %edx
movq %rax, %rdi
leaq 0x210f(%rip), %rsi      # 0x7253
callq 0x2190
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbp, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movl 0x8(%r14), %eax
testl %eax, %eax
jle 0x51f4
xorl %r12d, %r12d
xorl %ebp, %ebp
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
subq %rsi, %rdx
sarq $0x3, %rdx
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rcx, %rdx
cmpq %rbp, %rdx
jbe 0x5290
cmpl $-0x1, (%rsi,%r12)
je 0x51e5
addq %r12, %rsi
movq %rbx, %rdi
callq 0x2668
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movl 0x8(%r14), %eax
incq %rbp
movslq %eax, %rcx
addq $0x38, %r12
cmpq %rcx, %rbp
jl 0x517e
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movq (%rsp), %rdi
leaq 0x18(%rsp), %r12
testq %rdi, %rdi
je 0x5236
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
incl %r15d
cmpl 0x18(%r14), %r15d
jl 0x50b1
leaq 0x1ffe(%rip), %rsi      # 0x7248
movl $0xa, %edx
movq %rbx, %rdi
callq 0x2190
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1e86(%rip), %rdi      # 0x711d
movq %rbp, %rsi
xorl %eax, %eax
callq 0x21d0
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x52d2
movq 0x60(%rsp), %rsi
jmp 0x52ca
jmp 0x52b9
jmp 0x52b9
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x52d2
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x2250