// File: /workspace/github_cpp_makefile_star2_O3/tonymuu[P]distributed-kv-store/MP2Node.cpp
// Function: MP2Node::handleReadMessage(Message)
void MP2Node::handleReadMessage(Message msg) {
    string res = readKey(msg.key);
    Message reply(msg.transID, memberNode->addr, READREPLY, msg.key, res, msg.replica);
    if (res.empty()) {
        log->logReadFail(&msg.fromAddr, false, msg.transID, msg.key);
        reply.success = false;
    } else {
        log->logReadSuccess(&msg.fromAddr, false, msg.transID, msg.key, res);
        reply.success = true;
    }
    sendMessage(msg.fromAddr, reply);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xe8(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x8(%rsi), %rsi
movq 0x10(%r14), %rdx
addq %rsi, %rdx
leaq 0xd8(%rsp), %r15
movq %r15, %rdi
callq 0x5a4e
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x109b0
movq 0xd8(%rsp), %rdi
cmpq %r12, %rdi
je 0x11c3c
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x32c0
movl 0x50(%r14), %ebp
movq 0x50(%rbx), %rsi
addq $0x8, %rsi
leaq 0x12(%rsp), %rdi
callq 0xc8c4
leaq 0x88(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
addq %rsi, %rdx
leaq 0x78(%rsp), %rdi
callq 0x5a4e
leaq 0x68(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %rdi
callq 0x5a4e
movl 0x4(%r14), %eax
movl %eax, (%rsp)
leaq 0xf8(%rsp), %rdi
leaq 0x12(%rsp), %rdx
leaq 0x78(%rsp), %r8
leaq 0x58(%rsp), %r9
movl %ebp, %esi
movl $0x5, %ecx
callq 0x15c3a
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x11cd5
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x78(%rsp), %rdi
cmpq %r15, %rdi
je 0x11cef
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x32c0
cmpq $0x0, 0x20(%rsp)
movq 0x68(%rbx), %r15
je 0x11d89
movl 0x50(%r14), %ebp
leaq 0xa8(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
addq %rsi, %rdx
leaq 0x98(%rsp), %rdi
callq 0x5a4e
leaq 0x48(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %rdi
callq 0x5a4e
leaq 0x48(%r14), %rsi
leaq 0x98(%rsp), %r8
leaq 0x38(%rsp), %r9
movq %r15, %rdi
xorl %edx, %edx
movl %ebp, %ecx
callq 0xc05a
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x11d7c
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x98(%rsp), %rdi
movb $0x1, %bpl
jmp 0x11dd4
movl 0x50(%r14), %ebp
leaq 0xc8(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
addq %rsi, %rdx
leaq 0xb8(%rsp), %rdi
callq 0x5a4e
leaq 0x48(%r14), %rsi
leaq 0xb8(%rsp), %r8
movq %r15, %rdi
xorl %edx, %edx
movl %ebp, %ecx
callq 0xc414
movq 0xb8(%rsp), %rdi
xorl %ebp, %ebp
cmpq %r12, %rdi
je 0x11de5
movq (%r12), %rsi
incq %rsi
callq 0x32c0
movb %bpl, 0x14c(%rsp)
addq $0x48, %r14
leaq 0xc(%rsp), %rdi
movq %r14, %rsi
callq 0xc8c4
leaq 0x170(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x15d5a
leaq 0xc(%rsp), %rsi
leaq 0x170(%rsp), %rdx
movq %rbx, %rdi
callq 0xfbc4
leaq 0x1d8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11e49
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0x32c0
leaq 0x1a8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11e6a
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x32c0
leaq 0x188(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11e8b
movq 0x188(%rsp), %rsi
incq %rsi
callq 0x32c0
leaq 0x160(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11eac
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x32c0
leaq 0x130(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11ecd
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x32c0
leaq 0x110(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11eee
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x32c0
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11f09
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x32c0
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
cmpq %r12, %rdi
je 0x11fd9
movq 0xc8(%rsp), %rsi
jmp 0x11f6d
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x11f58
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0x11f58
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %r12, %rdi
je 0x11fd9
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0x11fd9
movq %rax, %rbx
leaq 0x170(%rsp), %rdi
callq 0x1263c
jmp 0x11fd9
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x11fa8
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0x11fa8
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r15, %rdi
je 0x11fe6
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0x11fe6
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
jmp 0x11ff0
movq %rax, %rbx
jmp 0x11fe6
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0x1263c
leaq 0x28(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x12001
movq (%r12), %rsi
incq %rsi
callq 0x32c0
movq %rbx, %rdi
callq 0x34b0
nop