// File: prakhar2808[P]DBEngine/dbengine/sstable.cc
// Function: sstable::getAllValues(int)
opStatus sstable::getAllValues(int clientSocket) {
  std::ifstream readfd;
  openFileToRead(readfd);
  unsigned char ch;
  while(readfd.peek() != EOF) {
    readfd >> ch;
    std::string data((int)ch, '\0');
    readfd.read(&data[0], (int)ch);
    std::cout << "Read key : " << data << " from SSTable!" << std::endl;
    readfd >> ch;
    std::string val((int)ch, '\0');
    readfd.read(&val[0], (int)ch);
    sendToClient(clientSocket, data+" -------> "+val+"\n");
  }
  closeFileAfterRead(readfd);
  return opStatus::opSuccess;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x340, %rsp            # imm = 0x340
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x2e8(%rbp)
leaq -0x218(%rbp), %rdi
movq %rdi, -0x2e0(%rbp)
callq 0x65e0
movq -0x2e8(%rbp), %rdi
movq -0x2e0(%rbp), %rsi
callq 0x38d20
jmp 0x392f5
jmp 0x392f7
leaq -0x218(%rbp), %rdi
callq 0x61d0
movl %eax, -0x2ec(%rbp)
jmp 0x3930b
movl -0x2ec(%rbp), %eax
cmpl $-0x1, %eax
je 0x39660
leaq -0x218(%rbp), %rdi
leaq -0x225(%rbp), %rsi
callq 0x65d0
jmp 0x3932f
movzbl -0x225(%rbp), %eax
movq %rax, -0x300(%rbp)
leaq -0x249(%rbp), %rdi
movq %rdi, -0x2f8(%rbp)
callq 0x68d0
movq -0x300(%rbp), %rsi
movq -0x2f8(%rbp), %rcx
leaq -0x248(%rbp), %rdi
xorl %edx, %edx
callq 0x17140
jmp 0x3936e
leaq -0x249(%rbp), %rdi
callq 0x6560
xorl %eax, %eax
movl %eax, %esi
leaq -0x248(%rbp), %rdi
callq 0x69b0
movq %rax, -0x308(%rbp)
jmp 0x39393
movq -0x308(%rbp), %rsi
movzbl -0x225(%rbp), %eax
movl %eax, %edx
leaq -0x218(%rbp), %rdi
callq 0x6660
jmp 0x393b1
movq 0x25c08(%rip), %rdi     # 0x5efc0
leaq 0x7e7f(%rip), %rsi      # 0x4123e
callq 0x64e0
movq %rax, -0x310(%rbp)
jmp 0x393cd
movq -0x310(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x6480
movq %rax, -0x318(%rbp)
jmp 0x393e9
movq -0x318(%rbp), %rdi
leaq 0x817b(%rip), %rsi      # 0x41572
callq 0x64e0
movq %rax, -0x320(%rbp)
jmp 0x39405
movq -0x320(%rbp), %rdi
movq 0x25b7d(%rip), %rsi     # 0x5ef90
callq 0x6540
jmp 0x3941a
leaq -0x218(%rbp), %rdi
leaq -0x225(%rbp), %rsi
callq 0x65d0
jmp 0x3942f
movzbl -0x225(%rbp), %eax
movq %rax, -0x330(%rbp)
leaq -0x271(%rbp), %rdi
movq %rdi, -0x328(%rbp)
callq 0x68d0
movq -0x330(%rbp), %rsi
movq -0x328(%rbp), %rcx
leaq -0x270(%rbp), %rdi
xorl %edx, %edx
callq 0x17140
jmp 0x3946e
leaq -0x271(%rbp), %rdi
callq 0x6560
xorl %eax, %eax
movl %eax, %esi
leaq -0x270(%rbp), %rdi
callq 0x69b0
movq %rax, -0x338(%rbp)
jmp 0x39493
movq -0x338(%rbp), %rsi
movzbl -0x225(%rbp), %eax
movl %eax, %edx
leaq -0x218(%rbp), %rdi
callq 0x6660
jmp 0x394b1
movl -0xc(%rbp), %eax
movl %eax, -0x33c(%rbp)
leaq 0x7d94(%rip), %rdx      # 0x41255
leaq -0x2d8(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x346b0
jmp 0x394d6
leaq -0x2b8(%rbp), %rdi
leaq -0x2d8(%rbp), %rsi
leaq -0x270(%rbp), %rdx
callq 0x34660
jmp 0x394f2
leaq 0x8184(%rip), %rdx      # 0x4167d
leaq -0x298(%rbp), %rdi
leaq -0x2b8(%rbp), %rsi
callq 0x34290
jmp 0x3950e
movl -0x33c(%rbp), %edi
leaq -0x298(%rbp), %rsi
callq 0x3e3a0
jmp 0x39522
leaq -0x298(%rbp), %rdi
callq 0x6340
leaq -0x2b8(%rbp), %rdi
callq 0x6340
leaq -0x2d8(%rbp), %rdi
callq 0x6340
leaq -0x270(%rbp), %rdi
callq 0x6340
leaq -0x248(%rbp), %rdi
callq 0x6340
jmp 0x392f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x3968c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x249(%rbp), %rdi
callq 0x6560
jmp 0x3968c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x39652
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x271(%rbp), %rdi
callq 0x6560
jmp 0x39652
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x39646
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x3963a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x3962e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x298(%rbp), %rdi
callq 0x6340
leaq -0x2b8(%rbp), %rdi
callq 0x6340
leaq -0x2d8(%rbp), %rdi
callq 0x6340
leaq -0x270(%rbp), %rdi
callq 0x6340
leaq -0x248(%rbp), %rdi
callq 0x6340
jmp 0x3968c
movq -0x2e8(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x38d60
jmp 0x39675
leaq -0x218(%rbp), %rdi
callq 0x6130
xorl %eax, %eax
addq $0x340, %rsp            # imm = 0x340
popq %rbp
retq
leaq -0x218(%rbp), %rdi
callq 0x6130
movq -0x220(%rbp), %rdi
callq 0x68c0
nopw %cs:(%rax,%rax)