// File: /workspace/github_cpp_makefile_star2_O1/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 $0x78, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x20d5(%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, 0x8(%rsp)
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
cmpl $0x0, 0x18(%r14)
jle 0x536f
xorl %r15d, %r15d
leaq 0x28(%rsp), %rbx
xorl %r13d, %r13d
movq 0x30(%r14), %rsi
movq (%rsi), %rax
movq %rbx, %rdi
movl %r13d, %edx
callq *0x8(%rax)
movq %rbx, %rdi
callq 0x2946
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x540c
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x51fb
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
cmpq %rax, %rcx
je 0x534b
addq $0x38, %rcx
movb $0x1, %dl
cmpl $-0x1, -0x38(%rcx)
movzbl %dl, %edx
cmovnel %r15d, %edx
jne 0x522d
leaq 0x38(%rcx), %rsi
cmpq %rax, %rcx
movq %rsi, %rcx
jne 0x5214
testb $0x1, %dl
jne 0x534b
movl $0x7, %edx
movq 0x8(%rsp), %rdi
leaq 0x21bb(%rip), %rsi      # 0x7402
callq 0x2190
movq 0x8(%rsp), %rdi
movl %r13d, %esi
callq 0x2240
movq %rax, %rbp
movl $0xa, %edx
movq %rax, %rdi
leaq 0x1fe8(%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
cmpl $0x0, 0x8(%r14)
jle 0x5318
xorl %ebx, %ebx
xorl %ebp, %ebp
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
subq %rsi, %rdx
sarq $0x3, %rdx
movabsq $0x6db6db6db6db6db7, %rax # imm = 0x6DB6DB6DB6DB6DB7
imulq %rax, %rdx
cmpq %rbp, %rdx
jbe 0x53c1
cmpl $-0x1, (%rsi,%rbx)
je 0x5308
addq %rbx, %rsi
movq 0x8(%rsp), %rdi
callq 0x266f
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
incq %rbp
movslq 0x8(%r14), %rax
addq $0x38, %rbx
cmpq %rax, %rbp
jl 0x52a3
movq 0x8(%rsp), %rcx
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x2150
leaq 0x28(%rsp), %rbx
movsbl %al, %esi
movq 0x8(%rsp), %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x5362
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
incl %r13d
cmpl 0x18(%r14), %r13d
jl 0x51bf
leaq 0x1ed2(%rip), %rsi      # 0x7248
movl $0xa, %edx
movq 0x8(%rsp), %rbx
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 $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1cd1(%rip), %rdi      # 0x7099
movq %rbp, %rsi
xorl %eax, %eax
callq 0x21d0
movq %rax, %rbx
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x5404
movq 0x70(%rsp), %rsi
jmp 0x53fc
jmp 0x53ea
jmp 0x53ea
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x5404
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x2250