// File: /workspace/github_cpp_makefile_star2_O1/prakhar2808[P]DBEngine/dbengine/dbops.cc
// Function: filePutOp(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int, database*)
opStatus filePutOp(std::string& inBuffer,
                   int clientSocket,
                   database* dbObject) {
  std::vector<keyValuePair_t> keyValuePairVec;
  int keylen, valuelen;
  std::string key, value;
  // Starting after "FILEPUT".
  for(int i = 7; i < (int)inBuffer.length(); ++i) {
    // Parse key value pairs and put in vector.
    keylen = inBuffer[i];
    valuelen = inBuffer[i + keylen + 1];
    key = inBuffer.substr(i+1, keylen);
    value = inBuffer.substr(i + keylen + 2, keylen);
    keyValuePairVec.push_back(keyValuePair_t(key, value));
    //std::cout << key << " -- " << value << std::endl;
    i = i + keylen + valuelen + 1;
  }
  return dbObject->writeKeyValuePair(keyValuePairVec, clientSocket);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r13
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdx, 0xb0(%rsp)
movl %esi, 0xc(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
xorl %eax, %eax
movq %rax, 0xa0(%rsp)
leaq 0x40(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x20(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
cmpl $0x8, 0x8(%rdi)
jl 0x7cdf
movq %rdi, %r13
movl $0x7, %eax
leaq 0xc0(%rsp), %r12
cltq
movq (%r13), %rcx
movsbq (%rcx,%rax), %rbp
leaq (%rax,%rbp), %rbx
movsbl 0x1(%rcx,%rbx), %ecx
movq %rcx, 0xb8(%rsp)
incl %eax
movslq %eax, %rdx
movq %r13, %rsi
movq %r12, %rdi
movq %rbp, %rcx
callq 0x53c0
leaq 0x30(%rsp), %rdi
movq %r12, %rsi
callq 0x5480
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x7b9a
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x5390
leal 0x2(%rbx), %eax
movslq %eax, %rdx
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rcx
callq 0x53c0
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x5480
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
leaq 0x80(%rsp), %rbp
je 0x7be8
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x5390
movq %rbp, 0x70(%rsp)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x70(%rsp), %rdi
callq 0x6924
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %r15
movq %r15, %rdi
callq 0x6924
movq %r12, %rdi
leaq 0x70(%rsp), %rsi
movq %r15, %rdx
callq 0x72ae
leaq 0x90(%rsp), %rdi
movq %r12, %rsi
callq 0x153d4
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x7c6d
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x5390
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x7c92
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x5390
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x7cae
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5390
movq 0x70(%rsp), %rdi
cmpq %rbp, %rdi
je 0x7cc8
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x5390
movq 0xb8(%rsp), %rax
addl %ebx, %eax
addl $0x2, %eax
cmpl 0x8(%r13), %eax
jl 0x7b39
leaq 0x90(%rsp), %rsi
movq 0xb0(%rsp), %rdi
movl 0xc(%rsp), %edx
callq 0x6f36
movl %eax, %ebx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x7d16
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5390
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x7d32
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x5390
leaq 0x90(%rsp), %rdi
callq 0x80ca
movl %ebx, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r13
popq %r15
popq %rbp
retq
jmp 0x7d57
jmp 0x7d57
jmp 0x7d57
movq %rax, %rbx
jmp 0x7db4
movq %rax, %rbx
jmp 0x7d92
movq %rax, %rbx
jmp 0x7d76
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x7278
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x7d92
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5390
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x7db4
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x5390
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x7dd0
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5390
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x7dec
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x5390
leaq 0x90(%rsp), %rdi
callq 0x80ca
movq %rbx, %rdi
callq 0x5670