// File: /workspace/github_cpp_makefile_star2_O3/tonymuu[P]distributed-kv-store/MP2Node.cpp
// Function: MP2Node::clientDelete(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void MP2Node::clientDelete(string key){
    // start a transaction
    Transaction transaction(DELETE, par->getcurrtime());
    transaction.key = key;
    txMap.emplace(transaction.txId, transaction);

    // send messages to all nodes who should hold the key
    auto nodes = findNodes(key);
    int txId = transaction.txId;
    for (int i = 0; i < nodes.size(); i++) {
        auto node = nodes[i];
        Message msg(txId, memberNode->addr, DELETE, key);
        msg.replica = static_cast<ReplicaType>(i);
        sendMessage(node.nodeAddress, msg);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rsi, %rbx
movq %rdi, %r14
movq 0x58(%rdi), %rdi
callq 0xc87e
leaq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rdx
movq %rdx, -0x10(%rdx)
xorl %ecx, %ecx
movq %rcx, -0x8(%rdx)
movb %cl, (%rdx)
leaq 0xb8(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq %rcx, -0x8(%rsi)
movb %cl, (%rsi)
movq %rcx, -0x48(%rsi)
movl $0x3, -0x38(%rsi)
movl 0x1b439(%rip), %ecx     # 0x2b900
leal 0x1(%rcx), %edx
movl %edx, 0x1b430(%rip)     # 0x2b900
movl %ecx, -0x40(%rsi)
movl %eax, -0x3c(%rsi)
movq %rbx, %rsi
callq 0x3160
leaq 0x78(%rsp), %rsi
leaq 0xc0(%r14), %rdi
leaq 0x70(%rsp), %rdx
callq 0x1348a
leaq 0x60(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %rdi
callq 0x5a4e
leaq 0x18(%rsp), %rdi
leaq 0x50(%rsp), %rdx
movq %r14, %rsi
callq 0xf940
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x1053a
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x18(%rsp), %rsi
cmpq %rsi, 0x20(%rsp)
je 0x10722
movl 0x78(%rsp), %eax
movl %eax, 0x8(%rsp)
xorl %r15d, %r15d
leaq 0x140(%rsp), %rdi
xorl %ebp, %ebp
addq %r15, %rsi
movq %rdi, %r12
callq 0x13914
movq 0x50(%r14), %rsi
addq $0x8, %rsi
leaq 0x12(%rsp), %rdi
callq 0xc8c4
leaq 0x30(%rsp), %r13
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x5a4e
leaq 0xc8(%rsp), %rdi
movl 0x8(%rsp), %esi
leaq 0x12(%rsp), %rdx
movl $0x3, %ecx
movq %r13, %r8
callq 0x15f6c
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x105d7
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x32c0
movl %ebp, 0xcc(%rsp)
leaq 0xc(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0xc8c4
leaq 0x160(%rsp), %r13
movq %r13, %rdi
leaq 0xc8(%rsp), %rsi
callq 0x15d5a
movq %r14, %rdi
leaq 0xc(%rsp), %rsi
movq %r13, %rdx
callq 0xfbc4
movq 0x1b8(%rsp), %rdi
leaq 0x1c8(%rsp), %rax
cmpq %rax, %rdi
je 0x1063d
movq 0x1c8(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x188(%rsp), %rdi
leaq 0x198(%rsp), %rax
cmpq %rax, %rdi
je 0x10662
movq 0x198(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x168(%rsp), %rdi
leaq 0x178(%rsp), %rax
cmpq %rax, %rdi
je 0x10687
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x120(%rsp), %rdi
leaq 0x130(%rsp), %rax
cmpq %rax, %rdi
je 0x106ac
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0xf0(%rsp), %rdi
leaq 0x100(%rsp), %rax
cmpq %rax, %rdi
je 0x106d1
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x106f6
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x32c0
movq %r12, %rdi
callq 0x13908
movq %r12, %rdi
incq %rbp
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
addq $0x20, %r15
cmpq %rbp, %rax
ja 0x1055f
leaq 0x18(%rsp), %rdi
callq 0xb4a6
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x10751
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x10776
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x32c0
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x1080f
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0x1080f
jmp 0x107a6
movq %rax, %rbx
jmp 0x1080f
movq %rax, %rbx
jmp 0x10805
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x107f8
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0x107f8
movq %rax, %rbx
leaq 0x160(%rsp), %rdi
callq 0x1263c
jmp 0x107eb
movq %rax, %rbx
jmp 0x107f8
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x1263c
leaq 0x140(%rsp), %rdi
callq 0x13908
leaq 0x18(%rsp), %rdi
callq 0xb4a6
leaq 0x70(%rsp), %rdi
callq 0x1268c
movq %rbx, %rdi
callq 0x34b0
nop