// File: /workspace/github_cpp_makefile_star2_O1/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, %rdx
movq %rdi, %rbx
movl 0x17b2f(%rip), %eax     # 0x288ac
leal 0x1(%rax), %ecx
movl %ecx, 0x17b26(%rip)     # 0x288ac
movl %eax, 0xc(%rsp)
leaq 0x108(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rsi), %rsi
movq %rdx, 0x18(%rsp)
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
leaq 0xf8(%rsp), %r15
movq %r15, %rdi
callq 0xbb34
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x103c0
movq %rbx, 0x10(%rsp)
movq 0xf8(%rsp), %rdi
cmpq %r14, %rdi
je 0x10de7
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x28(%rsp), %rax
cmpq 0x20(%rsp), %rax
je 0x10f64
xorl %ebp, %ebp
leaq 0xd8(%rsp), %rbx
xorl %r14d, %r14d
movl 0xc(%rsp), %r15d
movq 0x10(%rsp), %rax
movq 0x60(%rax), %rsi
addq $0x8, %rsi
leaq 0x3a(%rsp), %rdi
callq 0xce50
leaq 0x40(%rsp), %r12
leaq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0xbb34
leaq 0x60(%rsp), %rdi
movl %r15d, %esi
leaq 0x3a(%rsp), %rdx
movl $0x3, %ecx
movq %r12, %r8
callq 0x16930
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x10e7c
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x10(%rsp), %rax
movq 0x60(%rax), %r15
movq 0x70(%rax), %r12
movq 0x20(%rsp), %rdi
addq %rbp, %rdi
callq 0x14cc4
movq %rax, %r13
movq %rbx, %rdi
leaq 0x60(%rsp), %rsi
callq 0x16bf4
addq $0x8, %r15
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x6b8c
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x10ee0
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x10f05
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x10f2a
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x10f46
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x28(%rsp), %rax
subq 0x20(%rsp), %rax
incq %r14
sarq $0x5, %rax
addq $0x20, %rbp
cmpq %r14, %rax
ja 0x10e04
leaq 0x68(%rsp), %r15
movl $0x3, -0x8(%r15)
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x18(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0xbb34
leaq 0x88(%rsp), %r14
leaq 0x98(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x7349(%rip), %rdx      # 0x182f6
movq %r14, %rdi
movq %rdx, %rsi
callq 0xbf70
movq 0x10(%rsp), %rbx
movq 0x68(%rbx), %rdi
callq 0xce42
addl $0xf, %eax
movl %eax, 0xa8(%rsp)
movq $0x0, 0xb0(%rsp)
subq $-0x80, %rbx
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x13a48
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 0x11039
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x11050
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3280
leaq 0x20(%rsp), %rdi
callq 0xb860
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 0x13aac
xorl %ebp, %ebp
jmp 0x110a8
movq %rax, %rbx
movq 0x88(%rsp), %rdi
movb $0x1, %bpl
cmpq %r13, %rdi
je 0x110a8
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x110a8
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x11147
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x11147
movq 0x78(%rsp), %rsi
jmp 0x11101
jmp 0x11135
movq %rax, %rbx
movq 0xf8(%rsp), %rdi
cmpq %r14, %rdi
je 0x11151
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x11151
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x11147
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x11147
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x1113d
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x1113d
movq %rax, %rbx
jmp 0x11147
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x139f8
leaq 0x20(%rsp), %rdi
callq 0xb860
movq %rbx, %rdi
callq 0x3470
nop