// File: /workspace/github_cpp_makefile_star2_O3/zkl94[P]distributed-key-value-store/MP2Node.cpp
// Function: MP2Node::updateKeyValue(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::updateKeyValue(Address fromAddr, string key, string value, ReplicaType replica, int transID, MessageType t) {
    // Update key in local hash table and return true or false
    bool success = this->ht->update(key, value);
    Message *message;
    if (success) {
        log->logUpdateSuccess(&(this->memberNode->addr), false, transID, key, value);
        message = new Message(transID, this->memberNode->addr, REPLY, true);
    } else {
        log->logUpdateFail(&(this->memberNode->addr), false, transID, key, value);
        message = new Message(transID, this->memberNode->addr, REPLY, false);
    }

    string _string = message->toString();
    emulNet->ENsend(&(this->memberNode->addr), &fromAddr, (char *)_string.c_str(), _string.size());

    delete message;

    return success;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movl %r9d, (%rsp)
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, 0x50(%rsp)
movq %rdi, %r15
movq 0x48(%rdi), %rbx
leaq 0xc8(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
leaq 0xb8(%rsp), %rdi
callq 0x6790
leaq 0xa8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0x98(%rsp), %rdi
callq 0x6790
leaq 0xb8(%rsp), %rsi
leaq 0x98(%rsp), %rdx
movq %rbx, %rdi
callq 0x14278
movl %eax, %ebx
movq 0x98(%rsp), %rdi
cmpq %rbp, %rdi
je 0x111d2
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0xb8(%rsp), %rdi
cmpq %r14, %rdi
movl %ebx, %ebp
je 0x111f1
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x50(%r15), %r14
movq 0x68(%r15), %rbx
testb %bpl, %bpl
je 0x112d6
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %rdi
callq 0x6790
leaq 0x88(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0x78(%rsp), %rdi
callq 0x6790
addq $0x8, %r14
leaq 0x30(%rsp), %r8
leaq 0x78(%rsp), %r9
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movl (%rsp), %ebx
movl %ebx, %ecx
callq 0xc938
movq 0x78(%rsp), %rdi
cmpq %r13, %rdi
je 0x1127c
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x11298
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3280
movl $0x78, %edi
callq 0x3270
movq %rax, %r12
movq 0x50(%r15), %rsi
addq $0x8, %rsi
leaq 0xa(%rsp), %rdi
callq 0xd01c
leaq 0xa(%rsp), %rdx
movq %r12, %rdi
movl %ebx, %esi
movl $0x4, %ecx
movl $0x1, %r8d
callq 0x15f04
jmp 0x1139c
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x6790
leaq 0x68(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %rdi
callq 0x6790
addq $0x8, %r14
leaq 0x10(%rsp), %r8
leaq 0x58(%rsp), %r9
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movl (%rsp), %ebx
movl %ebx, %ecx
callq 0xcce4
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x1134a
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x11366
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3280
movl $0x78, %edi
callq 0x3270
movq %rax, %r12
movq 0x50(%r15), %rsi
addq $0x8, %rsi
leaq 0x4(%rsp), %rdi
callq 0xd01c
leaq 0x4(%rsp), %rdx
movq %r12, %rdi
movl %ebx, %esi
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0x15f04
leaq 0xd8(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x160dc
movq 0x50(%r15), %rsi
movq 0x60(%r15), %rdi
addq $0x8, %rsi
movq (%rbx), %rcx
movl 0x8(%rbx), %r8d
movq 0x50(%rsp), %rdx
callq 0x6e4c
movq 0x58(%r12), %rdi
leaq 0x68(%r12), %rax
cmpq %rax, %rdi
je 0x113e6
movq (%rax), %rsi
incq %rsi
callq 0x3280
movq 0x28(%r12), %rdi
leaq 0x38(%r12), %rax
cmpq %rax, %rdi
je 0x11400
movq (%rax), %rsi
incq %rsi
callq 0x3280
movq 0x8(%r12), %rdi
leaq 0x18(%r12), %rax
cmpq %rax, %rdi
je 0x1141a
movq (%rax), %rsi
incq %rsi
callq 0x3280
movl $0x78, %esi
movq %r12, %rdi
callq 0x3280
leaq 0xe8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11448
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x3280
movl %ebp, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x1149a
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x1149a
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r13, %rdi
je 0x114ba
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x114ba
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x1153f
movq 0x20(%rsp), %rsi
jmp 0x11537
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x1153f
movq 0x40(%rsp), %rsi
jmp 0x11537
movq %rax, %rbx
leaq 0xe8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1153f
movq 0xe8(%rsp), %rsi
jmp 0x11537
jmp 0x114f0
movq %rax, %rbx
movl $0x78, %esi
movq %r12, %rdi
jmp 0x1153a
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %rbp, %rdi
je 0x11522
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x11522
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1153f
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x3280
movq %rbx, %rdi
callq 0x3450
nop