// File: 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
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x1c0(%rbp)
addq $0x8, %rdi
movq %rdi, -0x1b8(%rbp)
callq 0x3c710
movl $0x0, -0xc(%rbp)
jmp 0x3b7c3
movl -0xc(%rbp), %esi
leaq -0x70(%rbp), %rdi
callq 0x34330
jmp 0x3b7d1
leaq 0x5da9(%rip), %rsi      # 0x41581
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0x342e0
jmp 0x3b7e7
leaq 0x5a38(%rip), %rdx      # 0x41226
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x34290
jmp 0x3b7fd
movq -0x1c0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3bc30
movb %al, -0x1c1(%rbp)
jmp 0x3b815
movb -0x1c1(%rbp), %al
xorb $-0x1, %al
movb %al, -0x1c2(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x6340
leaq -0x50(%rbp), %rdi
callq 0x6340
leaq -0x70(%rbp), %rdi
callq 0x6340
movb -0x1c2(%rbp), %al
testb $0x1, %al
jne 0x3b84a
jmp 0x3b8a8
jmp 0x3bb8e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x3bc1b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x3b89a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x3b891
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x6340
leaq -0x50(%rbp), %rdi
callq 0x6340
leaq -0x70(%rbp), %rdi
callq 0x6340
jmp 0x3bc1b
movl $0x468, %edi            # imm = 0x468
callq 0x64f0
movq %rax, -0x1d0(%rbp)
jmp 0x3b8bb
movb $0x1, -0x1a9(%rbp)
movl -0xc(%rbp), %esi
leaq -0xe8(%rbp), %rdi
callq 0x34330
jmp 0x3b8d3
leaq 0x5ca7(%rip), %rsi      # 0x41581
leaq -0xc8(%rbp), %rdi
leaq -0xe8(%rbp), %rdx
callq 0x342e0
jmp 0x3b8ef
leaq 0x5930(%rip), %rdx      # 0x41226
leaq -0xa8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x34290
jmp 0x3b90b
movl -0xc(%rbp), %esi
leaq -0x148(%rbp), %rdi
callq 0x34330
jmp 0x3b91c
leaq 0x5c6b(%rip), %rsi      # 0x4158e
leaq -0x128(%rbp), %rdi
leaq -0x148(%rbp), %rdx
callq 0x342e0
jmp 0x3b938
leaq 0x58e7(%rip), %rdx      # 0x41226
leaq -0x108(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x34290
jmp 0x3b954
movl -0xc(%rbp), %esi
leaq -0x1a8(%rbp), %rdi
callq 0x34330
jmp 0x3b965
leaq 0x5c15(%rip), %rsi      # 0x41581
leaq -0x188(%rbp), %rdi
leaq -0x1a8(%rbp), %rdx
callq 0x342e0
jmp 0x3b981
leaq 0x5c17(%rip), %rdx      # 0x4159f
leaq -0x168(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0x34290
jmp 0x3b99d
movq -0x1d0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
leaq -0x108(%rbp), %rdx
leaq -0x168(%rbp), %rcx
callq 0x38300
jmp 0x3b9c0
movb $0x0, -0x1a9(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x6340
leaq -0x188(%rbp), %rdi
callq 0x6340
leaq -0x1a8(%rbp), %rdi
callq 0x6340
leaq -0x108(%rbp), %rdi
callq 0x6340
leaq -0x128(%rbp), %rdi
callq 0x6340
leaq -0x148(%rbp), %rdi
callq 0x6340
leaq -0xa8(%rbp), %rdi
callq 0x6340
leaq -0xc8(%rbp), %rdi
callq 0x6340
leaq -0xe8(%rbp), %rdi
callq 0x6340
movq -0x1d0(%rbp), %rax
movq -0x1c0(%rbp), %rdi
movq %rax, -0x88(%rbp)
addq $0x8, %rdi
leaq -0x88(%rbp), %rsi
callq 0x3c730
jmp 0x3ba5a
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3b7c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x3bb6d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x3bb61
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x3bb55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x3bb49
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x3bb3d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x3bb31
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x3bb25
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x3bb19
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x3bb0d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x6340
leaq -0x188(%rbp), %rdi
callq 0x6340
leaq -0x1a8(%rbp), %rdi
callq 0x6340
leaq -0x108(%rbp), %rdi
callq 0x6340
leaq -0x128(%rbp), %rdi
callq 0x6340
leaq -0x148(%rbp), %rdi
callq 0x6340
leaq -0xa8(%rbp), %rdi
callq 0x6340
leaq -0xc8(%rbp), %rdi
callq 0x6340
leaq -0xe8(%rbp), %rdi
callq 0x6340
testb $0x1, -0x1a9(%rbp)
jne 0x3bb78
jmp 0x3bb89
movq -0x1d0(%rbp), %rdi
movl $0x468, %esi            # imm = 0x468
callq 0x6500
jmp 0x3bc1b
movl $0x4, %edi
callq 0x66b0
movq %rax, %rcx
movq -0x1c0(%rbp), %rax
movq %rcx, (%rax)
movl -0xc(%rbp), %ecx
movq (%rax), %rax
movl %ecx, (%rax)
movq 0x2340c(%rip), %rdi     # 0x5efc0
leaq 0x59ef(%rip), %rsi      # 0x415aa
callq 0x64e0
movq %rax, -0x1d8(%rbp)
jmp 0x3bbc9
movq -0x1d8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6880
movq %rax, -0x1e0(%rbp)
jmp 0x3bbe1
movq -0x1e0(%rbp), %rdi
leaq 0x59c3(%rip), %rsi      # 0x415b2
callq 0x64e0
movq %rax, -0x1e8(%rbp)
jmp 0x3bbfd
movq -0x1e8(%rbp), %rdi
movq 0x23385(%rip), %rsi     # 0x5ef90
callq 0x6540
jmp 0x3bc12
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
movq -0x1b8(%rbp), %rdi
callq 0x3c770
movq -0x78(%rbp), %rdi
callq 0x68c0