// File: /workspace/github_cpp_makefile_star2_O2/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 $0x128, %rsp            # imm = 0x128
movq %rdi, %rbx
movl 0x15d34(%rip), %ecx     # 0x238bc
leal 0x1(%rcx), %eax
movl %eax, 0x15d2b(%rip)     # 0x238bc
movq %rcx, 0x28(%rsp)
movl %ecx, 0xc(%rsp)
leaq 0x50(%rsp), %r14
movq %r14, %rdi
movq %rsi, 0x10(%rsp)
callq 0x3370
leaq 0x38(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xd54e
leaq 0x50(%rsp), %rdi
callq 0x3110
movq $0x0, 0x18(%rsp)
leaq 0x108(%rsp), %r15
leaq 0xe8(%rsp), %r12
xorl %ecx, %ecx
movq 0x40(%rsp), %rax
subq 0x38(%rsp), %rax
sarq $0x5, %rax
cmpq %rcx, %rax
jbe 0xdca5
movq %rcx, 0x30(%rsp)
movq 0x60(%rbx), %rsi
addq $0x8, %rsi
leaq 0x22(%rsp), %rdi
callq 0xa4e4
movq %r15, %rdi
movq 0x10(%rsp), %rsi
callq 0x3370
leaq 0x70(%rsp), %rdi
movq 0x28(%rsp), %rsi
leaq 0x22(%rsp), %rdx
pushq $0x3
popq %rcx
movq %r15, %r8
callq 0x119f8
movq %r15, %rbp
movq %r15, %rdi
callq 0x3110
movq 0x60(%rbx), %r15
movq 0x70(%rbx), %r14
movq 0x38(%rsp), %rdi
addq 0x18(%rsp), %rdi
callq 0x107d2
movq %rax, %r13
movq %r12, %rdi
leaq 0x70(%rsp), %rsi
callq 0x11c40
addq $0x8, %r15
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x5d28
movq %r12, %rdi
callq 0x3110
leaq 0x70(%rsp), %rdi
callq 0xf466
movq 0x30(%rsp), %rcx
incq %rcx
addq $0x20, 0x18(%rsp)
movq %rbp, %r15
jmp 0xdbe1
leaq 0x78(%rsp), %r14
movl $0x3, -0x8(%r14)
movq %r14, %rdi
movq 0x10(%rsp), %rsi
callq 0x3370
leaq 0x98(%rsp), %r15
leaq 0x4628(%rip), %rsi      # 0x122f6
leaq 0xb(%rsp), %rdx
movq %r15, %rdi
callq 0x8ed6
movq 0x68(%rbx), %rdi
callq 0xa4d8
addl $0xf, %eax
movl %eax, 0xb8(%rsp)
andq $0x0, 0xc0(%rsp)
subq $-0x80, %rbx
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0xf48a
leaq 0x70(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xf4d8
movq %rbx, %rdi
callq 0xf514
leaq 0x38(%rsp), %rdi
callq 0x8f1a
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0xf514
jmp 0xdda7
movq %rax, %rbx
movq %r15, %rdi
callq 0x3110
jmp 0xdd5b
movq %rax, %rbx
movq %r14, %rdi
jmp 0xdd7c
jmp 0xdda4
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x3110
jmp 0xddb1
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
callq 0x3110
jmp 0xdda7
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0x3110
jmp 0xdd98
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0xf466
jmp 0xdda7
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x8f1a
movq %rbx, %rdi
callq 0x3450
nop