// File: /workspace/github_cpp_makefile_star2_O3/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 $0xf0, %rsp
movq %rdx, 0xa8(%rsp)
movl %esi, 0x8(%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 0x7d1f
movq %rdi, %r13
movl $0x7, %ebx
leaq 0xb0(%rsp), %r12
movslq %ebx, %rax
movq (%r13), %rcx
movsbq (%rcx,%rax), %rbp
leaq (%rax,%rbp), %rbx
movsbl 0x1(%rcx,%rbx), %ecx
movl %ecx, 0xc(%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 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x7be3
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x5390
addl $0x2, %ebx
movslq %ebx, %rdx
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rcx
callq 0x53c0
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x5480
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
leaq 0x80(%rsp), %rbp
je 0x7c31
movq 0xc0(%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 0x72f4
leaq 0x90(%rsp), %rdi
movq %r12, %rsi
callq 0x15432
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x7cb6
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x5390
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x7cdb
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x5390
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x7cf7
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5390
movq 0x70(%rsp), %rdi
cmpq %rbp, %rdi
je 0x7d11
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x5390
addl 0xc(%rsp), %ebx
cmpl 0x8(%r13), %ebx
jl 0x7b85
leaq 0x90(%rsp), %rsi
movq 0xa8(%rsp), %rdi
movl 0x8(%rsp), %edx
callq 0x6f82
movl %eax, %ebx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x7d56
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5390
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x7d72
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x5390
leaq 0x90(%rsp), %rdi
callq 0x810a
movl %ebx, %eax
addq $0xf0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r15
popq %rbp
retq
jmp 0x7d97
jmp 0x7d97
jmp 0x7d97
movq %rax, %rbx
jmp 0x7df4
movq %rax, %rbx
jmp 0x7dd2
movq %rax, %rbx
jmp 0x7db6
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x72be
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x7dd2
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5390
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x7df4
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x5390
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x7e10
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5390
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x7e2c
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x5390
leaq 0x90(%rsp), %rdi
callq 0x810a
movq %rbx, %rdi
callq 0x5670