// File: /workspace/github_cpp_makefile_star2_O2/prakhar2808[P]DBEngine/dbengine/sstableWrapper.cc
// Function: sstableWrapper::sstableWrapper()
sstableWrapper::sstableWrapper() {
  int i = 0;
  while(true) {
    if(!SSTableExists("SSTablesDir/" + std::to_string(i) + ".txt")) {
      break;
    }
    sstable* sstableObjRef = new sstable(
        "SSTablesDir/" + std::to_string(i) + ".txt",
        "bloomFiltersDir/" + std::to_string(i) + ".txt",
        "SSTablesDir/" + std::to_string(i) + ".txt.index");
    sstableObjRefList.push_back(sstableObjRef);
    ++i;
  }
  sstable_no = (int*)malloc(sizeof(int));
  *sstable_no = i;
  std::cout << "Loaded " << i << " SSTables from the disk!" << std::endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
leaq 0x8(%rdi), %rax
movq %rax, 0x10(%rdi)
movq %rax, 0x10(%rsp)
movq %rax, 0x8(%rdi)
movq %rdi, 0x18(%rsp)
andq $0x0, 0x18(%rdi)
xorl %esi, %esi
leaq 0xe8(%rsp), %r15
leaq 0x28(%rsp), %rbp
leaq 0x128(%rsp), %r13
movq %r15, %rdi
movl %esi, 0x4(%rsp)
callq 0x133b8
movq %rbp, %rdi
leaq 0x2e90(%rip), %rsi      # 0x18521
movq %r15, %rdx
callq 0x13394
leaq 0x148(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rsi
leaq 0x2b10(%rip), %rdx      # 0x181be
callq 0x13375
movq %rbx, %rsi
callq 0x159b6
movl %eax, %r14d
movq %rbx, %rdi
callq 0x51d0
movq %rbp, %rdi
callq 0x51d0
movq %r15, %rdi
callq 0x51d0
testb %r14b, %r14b
je 0x1584a
movl $0x468, %edi            # imm = 0x468
callq 0x53c0
movq %rax, 0x8(%rsp)
movq %r15, %rbx
movq %r15, %rdi
movl 0x4(%rsp), %esi
callq 0x133b8
leaq 0x28(%rsp), %rbp
movq %rbp, %rdi
leaq 0x2e15(%rip), %rsi      # 0x18521
movq %rbx, %rdx
callq 0x13394
movq %r13, %rdi
movq %rbp, %rsi
leaq 0x2a9d(%rip), %rdx      # 0x181be
callq 0x13375
leaq 0x88(%rsp), %rbx
movq %rbx, %rdi
movl 0x4(%rsp), %esi
callq 0x133b8
leaq 0xa8(%rsp), %rbp
movq %rbp, %rdi
leaq 0x2de2(%rip), %rsi      # 0x1852e
movq %rbx, %rdx
callq 0x13394
leaq 0xc8(%rsp), %rdi
movq %rbp, %rsi
leaq 0x2a58(%rip), %rdx      # 0x181be
callq 0x13375
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
movl 0x4(%rsp), %esi
callq 0x133b8
leaq 0x68(%rsp), %rbp
movq %rbp, %rdi
leaq 0x2d96(%rip), %rsi      # 0x18521
movq %rbx, %rdx
callq 0x13394
leaq 0x108(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rsi
leaq 0x2d97(%rip), %rdx      # 0x1853f
callq 0x13375
movq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r13, %rbx
movq %r13, %rsi
leaq 0xc8(%rsp), %rbp
movq %rbp, %rdx
movq %r14, %rcx
callq 0x14598
movq %r14, %rdi
callq 0x51d0
leaq 0x68(%rsp), %rdi
callq 0x51d0
leaq 0x48(%rsp), %rdi
callq 0x51d0
movq %rbp, %rdi
callq 0x51d0
leaq 0xa8(%rsp), %rdi
callq 0x51d0
leaq 0x88(%rsp), %rdi
callq 0x51d0
movq %rbx, %rdi
callq 0x51d0
leaq 0x28(%rsp), %rdi
callq 0x51d0
movq %r15, %rdi
callq 0x51d0
movq %r12, 0x20(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x15f3c
movl 0x4(%rsp), %esi
incl %esi
leaq 0x28(%rsp), %rbp
jmp 0x1567b
pushq $0x4
popq %rdi
callq 0x5520
movq 0x18(%rsp), %rcx
movq %rax, (%rcx)
movl 0x4(%rsp), %ebx
movl %ebx, (%rax)
movq 0xf759(%rip), %rdi      # 0x24fc0
leaq 0x2cdc(%rip), %rsi      # 0x1854a
callq 0x53b0
movq %rax, %rdi
movl %ebx, %esi
callq 0x5690
leaq 0x2cce(%rip), %rsi      # 0x18552
movq %rax, %rdi
callq 0x53b0
movq %rax, %rdi
callq 0x5210
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x159a0
movq %rax, %rbx
movq 0x8(%rsp), %r14
jmp 0x1596e
movq %rax, %rbx
movq 0x8(%rsp), %r14
jmp 0x1594a
movq %rax, %rbx
movq 0x8(%rsp), %r14
jmp 0x15961
movq %rax, %rbx
movq 0x8(%rsp), %r14
jmp 0x15957
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
callq 0x51d0
jmp 0x158f1
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x51d0
jmp 0x1590f
movq %rax, %rbx
movq 0x8(%rsp), %r14
jmp 0x1593d
movq %rax, %rbx
jmp 0x1592b
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x51d0
jmp 0x1591e
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x51d0
movq 0x8(%rsp), %r14
leaq 0xa8(%rsp), %rdi
callq 0x51d0
leaq 0x88(%rsp), %rdi
callq 0x51d0
leaq 0x128(%rsp), %rdi
callq 0x51d0
leaq 0x28(%rsp), %rdi
callq 0x51d0
leaq 0xe8(%rsp), %rdi
callq 0x51d0
movl $0x468, %esi            # imm = 0x468
movq %r14, %rdi
callq 0x53d0
jmp 0x159a3
jmp 0x159a0
movq %rax, %rbx
jmp 0x15991
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x51d0
leaq 0xe8(%rsp), %rdi
callq 0x51d0
jmp 0x159a3
movq %rax, %rbx
movq 0x10(%rsp), %rdi
callq 0x15f60
movq %rbx, %rdi
callq 0x56c0
nop