// File: /workspace/github_cpp_makefile_star2_O3/zkl94[P]distributed-key-value-store/MP2Node.cpp
// Function: MP2Node::createKeyValue(Address, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ReplicaType, int, MessageType)
bool MP2Node::createKeyValue(Address fromAddr, string key, string value, ReplicaType replica, int transID, MessageType t) {
    // Insert key, value, replicaType into the hash table
    // the transID is used for logging and response
    this->ht->create(key, value);
    // create must will succeed
    log->logCreateSuccess(&(this->memberNode->addr), false, transID, key, value);

    // reply
    Message *message = new Message(transID, this->memberNode->addr, REPLY, true);
    string _string = message->toString();
    emulNet->ENsend(&(this->memberNode->addr), &fromAddr, (char *)_string.c_str(), _string.size());

    delete message;

    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movl %r9d, %ebp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, 0x50(%rsp)
movq %rdi, %r14
movq 0x48(%rdi), %rbx
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %rdi
callq 0x6790
leaq 0x88(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x78(%rsp), %rdi
callq 0x6790
leaq 0x30(%rsp), %rsi
leaq 0x78(%rsp), %rdx
movq %rbx, %rdi
callq 0x1420a
movq 0x78(%rsp), %rdi
cmpq %r13, %rdi
je 0x10abd
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x10ad9
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x50(%r14), %r13
movq 0x68(%r14), %rbx
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x6790
leaq 0x68(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %rdi
callq 0x6790
addq $0x8, %r13
leaq 0x10(%rsp), %r8
leaq 0x58(%rsp), %r9
movq %rbx, %rdi
movq %r13, %rsi
xorl %edx, %edx
movl %ebp, %ecx
callq 0xc754
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x10b52
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x10b6e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3280
movl $0x78, %edi
callq 0x3270
movq %rax, %r15
movq 0x50(%r14), %rsi
addq $0x8, %rsi
leaq 0xa(%rsp), %rdi
callq 0xd01c
leaq 0xa(%rsp), %rdx
movq %r15, %rdi
movl %ebp, %esi
movl $0x4, %ecx
movl $0x1, %r8d
callq 0x15f04
leaq 0x98(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x160dc
movq 0x50(%r14), %rsi
movq 0x60(%r14), %rdi
addq $0x8, %rsi
movq (%rbx), %rcx
movl 0x8(%rbx), %r8d
movq 0x50(%rsp), %rdx
callq 0x6e4c
movq 0x58(%r15), %rdi
leaq 0x68(%r15), %rax
cmpq %rax, %rdi
je 0x10bef
movq (%rax), %rsi
incq %rsi
callq 0x3280
movq 0x28(%r15), %rdi
leaq 0x38(%r15), %rax
cmpq %rax, %rdi
je 0x10c07
movq (%rax), %rsi
incq %rsi
callq 0x3280
movq 0x8(%r15), %rdi
movq %r15, %rax
addq $0x18, %rax
cmpq %rax, %rdi
je 0x10c22
movq (%rax), %rsi
incq %rsi
callq 0x3280
movl $0x78, %esi
movq %r15, %rdi
callq 0x3280
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10c50
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x3280
movb $0x1, %al
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10d06
movq 0xa8(%rsp), %rsi
jmp 0x10cf1
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x10ca5
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x10ca5
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x10d06
movq 0x20(%rsp), %rsi
jmp 0x10cf1
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r13, %rdi
je 0x10cdd
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x10cdd
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x10d06
movq 0x40(%rsp), %rsi
incq %rsi
jmp 0x10d01
movq %rax, %rbx
movl $0x78, %esi
movq %r15, %rdi
callq 0x3280
movq %rbx, %rdi
callq 0x3450