// File: prakhar2808[P]DBEngine/dbengine/dbops.cc
// Function: evalOp(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, database*, int)
opStatus evalOp(std::string& inBuffer, database* dbObject, int clientSocket) {
  // Put op
  if(regex_match(inBuffer, putRegex)) {
    keyValuePair_t keyValuePair = getKeyValuePair(inBuffer);
    return putOp(keyValuePair, clientSocket, dbObject);
  }
  // File put op
  if(inBuffer.substr(0,7) == "FILEPUT") {
    return filePutOp(inBuffer, clientSocket, dbObject); 
  }
  // Get op
  else if(regex_match(inBuffer, getRegex)) {
    std::string key = getKey(inBuffer);
    return getOp(key, clientSocket, dbObject);
  }
  // Delete op
  else if(regex_match(inBuffer, deleteRegex)) {
    std::string key = getKey(inBuffer);
    return deleteOp(key, clientSocket, dbObject);
  }
  //List all
  else if(regex_match(inBuffer, listAllRegex)) {
    return listAllOp(clientSocket, dbObject);
  }
  // No op
  return opStatus::opInvalid;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2c0, %rsp            # imm = 0x2C0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x248(%rbp)
leaq 0x363ec(%rip), %rsi     # 0x402a4
leaq -0x40(%rbp), %rdi
movq %rdi, -0x240(%rbp)
movl $0x10, %edx
callq 0xa9b0
movq -0x248(%rbp), %rdi
movq -0x240(%rbp), %rsi
xorl %edx, %edx
callq 0xa960
movb %al, -0x231(%rbp)
jmp 0x9eea
leaq -0x40(%rbp), %rdi
callq 0xaa50
movb -0x231(%rbp), %al
testb $0x1, %al
jne 0x9f02
jmp 0x9ffe
movq -0x10(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x250(%rbp)
callq 0x6210
movq -0x250(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x3d680
jmp 0x9f2e
leaq -0xb0(%rbp), %rdi
callq 0x6340
leaq -0xf0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x9830
jmp 0x9f4f
movl -0x1c(%rbp), %esi
movq -0x18(%rbp), %rdx
leaq -0xf0(%rbp), %rdi
callq 0xa400
movl %eax, -0x254(%rbp)
jmp 0x9f6a
movl -0x254(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x9890
leaq -0x90(%rbp), %rdi
callq 0x9890
jmp 0xa3df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0xaa50
jmp 0xa3eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x6340
jmp 0xa3eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x9fed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x9890
leaq -0x90(%rbp), %rdi
callq 0x9890
jmp 0xa3eb
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
leaq -0x110(%rbp), %rdi
movq %rdi, -0x260(%rbp)
movl $0x7, %ecx
callq 0x6520
movq -0x260(%rbp), %rdi
leaq 0x362ba(%rip), %rsi     # 0x402e6
callq 0xaa80
movb %al, -0x255(%rbp)
jmp 0xa039
leaq -0x110(%rbp), %rdi
callq 0x6340
movb -0x255(%rbp), %al
testb $0x1, %al
jne 0xa051
jmp 0xa086
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0xa4e0
movl %eax, -0x4(%rbp)
jmp 0xa3df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x6340
jmp 0xa3eb
movq -0x10(%rbp), %rax
movq %rax, -0x278(%rbp)
leaq 0x36256(%rip), %rsi     # 0x402ee
leaq -0x130(%rbp), %rdi
movq %rdi, -0x270(%rbp)
movl $0x10, %edx
callq 0xa9b0
movq -0x278(%rbp), %rdi
movq -0x270(%rbp), %rsi
xorl %edx, %edx
callq 0xa960
movb %al, -0x261(%rbp)
jmp 0xa0cd
leaq -0x130(%rbp), %rdi
callq 0xaa50
movb -0x261(%rbp), %al
testb $0x1, %al
jne 0xa0e8
jmp 0xa1e7
movq -0x10(%rbp), %rsi
leaq -0x170(%rbp), %rdi
movq %rdi, -0x280(%rbp)
callq 0x6210
movq -0x280(%rbp), %rsi
leaq -0x150(%rbp), %rdi
callq 0x3d960
jmp 0xa114
leaq -0x170(%rbp), %rdi
callq 0x6340
leaq -0x190(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x6210
jmp 0xa135
movl -0x1c(%rbp), %esi
movq -0x18(%rbp), %rdx
leaq -0x190(%rbp), %rdi
callq 0xa790
movl %eax, -0x284(%rbp)
jmp 0xa150
movl -0x284(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x6340
leaq -0x150(%rbp), %rdi
callq 0x6340
jmp 0xa3df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x130(%rbp), %rdi
callq 0xaa50
jmp 0xa3eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x6340
jmp 0xa3eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xa1d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x6340
leaq -0x150(%rbp), %rdi
callq 0x6340
jmp 0xa3eb
movq -0x10(%rbp), %rax
movq %rax, -0x298(%rbp)
leaq 0x36123(%rip), %rsi     # 0x4031c
leaq -0x1b0(%rbp), %rdi
movq %rdi, -0x290(%rbp)
movl $0x10, %edx
callq 0xa9b0
movq -0x298(%rbp), %rdi
movq -0x290(%rbp), %rsi
xorl %edx, %edx
callq 0xa960
movb %al, -0x285(%rbp)
jmp 0xa22e
leaq -0x1b0(%rbp), %rdi
callq 0xaa50
movb -0x285(%rbp), %al
testb $0x1, %al
jne 0xa249
jmp 0xa348
movq -0x10(%rbp), %rsi
leaq -0x1f0(%rbp), %rdi
movq %rdi, -0x2a0(%rbp)
callq 0x6210
movq -0x2a0(%rbp), %rsi
leaq -0x1d0(%rbp), %rdi
callq 0x3d960
jmp 0xa275
leaq -0x1f0(%rbp), %rdi
callq 0x6340
leaq -0x210(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
callq 0x6210
jmp 0xa296
movl -0x1c(%rbp), %esi
movq -0x18(%rbp), %rdx
leaq -0x210(%rbp), %rdi
callq 0xa850
movl %eax, -0x2a4(%rbp)
jmp 0xa2b1
movl -0x2a4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x6340
leaq -0x1d0(%rbp), %rdi
callq 0x6340
jmp 0xa3df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0xaa50
jmp 0xa3eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0x6340
jmp 0xa3eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xa337
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x6340
leaq -0x1d0(%rbp), %rdi
callq 0x6340
jmp 0xa3eb
movq -0x10(%rbp), %rax
movq %rax, -0x2b8(%rbp)
leaq 0x35ff6(%rip), %rsi     # 0x40350
leaq -0x230(%rbp), %rdi
movq %rdi, -0x2b0(%rbp)
movl $0x10, %edx
callq 0xa9b0
movq -0x2b8(%rbp), %rdi
movq -0x2b0(%rbp), %rsi
xorl %edx, %edx
callq 0xa960
movb %al, -0x2a5(%rbp)
jmp 0xa38f
leaq -0x230(%rbp), %rdi
callq 0xaa50
movb -0x2a5(%rbp), %al
testb $0x1, %al
jne 0xa3a7
jmp 0xa3d2
movl -0x1c(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0xa910
movl %eax, -0x4(%rbp)
jmp 0xa3df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x230(%rbp), %rdi
callq 0xaa50
jmp 0xa3eb
jmp 0xa3d4
jmp 0xa3d6
jmp 0xa3d8
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x2c0, %rsp            # imm = 0x2C0
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x68c0
nopw %cs:(%rax,%rax)