// File: /workspace/github_cpp_makefile_star2_O3/devanshdalal[P]cloud-computing-concepts-part-2/MP2Node.cpp
// Function: MP2Node::clientDelete(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void MP2Node::clientDelete(string key)
{
	int current = g_transID++;
	// std::cout << "Start clientDelete " << key << " " << current << "\n";
	auto nodes = findNodes(key);
	for (auto node_id = 0; node_id < nodes.size(); ++node_id)
	{
		auto req = Message(current, memberNode->addr, MessageType::DELETE, key);
		emulNet->ENsend(&(memberNode->addr), nodes[node_id].getAddress(), req.toString());
	}
	local_state_[current] = {MessageType::DELETE, key, "", par->getcurrtime() + WRITE_TIMEOUT, 0};
	// std::cout << "End clientDelete\n";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rsi, %rcx
movq %rdi, %rbx
movl 0x17df3(%rip), %edx     # 0x288ac
leal 0x1(%rdx), %eax
movl %eax, 0x17dea(%rip)     # 0x288ac
movq %rdx, 0x58(%rsp)
movl %edx, 0xc(%rsp)
leaq 0x108(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rsi), %rsi
movq %rcx, 0x10(%rsp)
movq 0x8(%rcx), %rdx
addq %rsi, %rdx
leaq 0xf8(%rsp), %r15
movq %r15, %rdi
callq 0xba52
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x100fa
movq %rbx, (%rsp)
movq 0xf8(%rsp), %rdi
cmpq %r14, %rdi
je 0x10b27
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
je 0x10ca0
xorl %r15d, %r15d
leaq 0xd8(%rsp), %rbx
xorl %r14d, %r14d
movq (%rsp), %rax
movq 0x60(%rax), %rsi
addq $0x8, %rsi
leaq 0x32(%rsp), %rdi
callq 0xcd2c
leaq 0x38(%rsp), %r12
leaq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0xba52
leaq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
leaq 0x32(%rsp), %rdx
movl $0x3, %ecx
movq %r12, %r8
callq 0x16654
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x10bb9
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3280
movq (%rsp), %rax
movq 0x60(%rax), %r12
movq 0x70(%rax), %r13
movq 0x18(%rsp), %rdi
addq %r15, %rdi
callq 0x14a0c
movq %rax, %rbp
movq %rbx, %rdi
leaq 0x60(%rsp), %rsi
callq 0x16918
addq $0x8, %r12
movq %r13, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x6b44
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x10c1c
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x10c41
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x10c66
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x10c82
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x20(%rsp), %rax
subq 0x18(%rsp), %rax
incq %r14
sarq $0x5, %rax
addq $0x20, %r15
cmpq %r14, %rax
ja 0x10b45
leaq 0x68(%rsp), %r15
movl $0x3, -0x8(%r15)
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x10(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0xba52
leaq 0x88(%rsp), %r14
leaq 0x98(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x760d(%rip), %rdx      # 0x182f6
movq %r14, %rdi
movq %rdx, %rsi
callq 0xbe94
movq (%rsp), %rbx
movq 0x68(%rbx), %rdi
callq 0xcd1e
addl $0xf, %eax
movl %eax, 0xa8(%rsp)
movq $0x0, 0xb0(%rsp)
subq $-0x80, %rbx
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x13778
movq %rax, %rbx
leaq 0xa8(%rsp), %rbp
movl -0x48(%rbp), %eax
movl %eax, (%rbx)
leaq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x3340
movq %rbx, %rdi
addq $0x28, %rdi
movq %r14, %rsi
callq 0x3340
movups (%rbp), %xmm0
movups %xmm0, 0x48(%rbx)
movq -0x20(%rbp), %rdi
cmpq %r13, %rdi
je 0x10d74
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x10d8b
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3280
leaq 0x18(%rsp), %rdi
callq 0xb770
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x137de
jmp 0x10e74
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x10dde
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x10dde
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x10e74
movq 0x78(%rsp), %rsi
jmp 0x10e2e
jmp 0x10e62
movq %rax, %rbx
movq 0xf8(%rsp), %rdi
cmpq %r14, %rdi
je 0x10e7e
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x10e7e
movq %rax, %rbx
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x10e74
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x10e74
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x10e6a
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x10e6a
movq %rax, %rbx
jmp 0x10e74
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x13728
leaq 0x18(%rsp), %rdi
callq 0xb770
movq %rbx, %rdi
callq 0x3470