// File: devanshdalal[P]cloud-computing-concepts-part-2/MP2Node.cpp
// Function: MP2Node::stabilizationProtocol()
void MP2Node::stabilizationProtocol()
{
	PrintRing(ring);
	std::cout << "Rehashing primary " << ht->currentSize() << "\n";
	for (auto it = ht->hashTable.begin(); it != ht->hashTable.end();)
	{
		const auto &key = it->first;
		const auto &value = it->second;
		int current = g_transID++;
		auto nodes = findNodes(key);
		bool belongs_here = false;
		for (auto node_id = 0; node_id < nodes.size(); ++node_id)
		{
			if (node_id == 0 and *(nodes[node_id].getAddress()) == memberNode->addr)
			{
				belongs_here = true;
			}
			else
			{
				auto req = Message(-current, memberNode->addr, MessageType::CREATE, key, value,
								   static_cast<ReplicaType>(node_id));
				emulNet->ENsend(&(memberNode->addr), nodes[node_id].getAddress(), req.toString());
				// local_state_[current] = {MessageType::CREATE, key, value, par->getcurrtime() + WRITE_TIMEOUT, 0};
			}
		}
		if (belongs_here)
		{
			++it;
		}
		else
		{
			it = ht->hashTable.erase(it);
		}
	}
	std::cout << "Rehashing secondary " << secondary->currentSize() << "\n";
	for (auto it = secondary->hashTable.begin(); it != secondary->hashTable.end();)
	{
		const auto &key = it->first;
		const auto &value = it->second;
		int current = g_transID++;
		auto nodes = findNodes(key);
		bool belongs_here = false;
		for (auto node_id = 0; node_id < nodes.size(); ++node_id)
		{
			if (node_id == 1 and *(nodes[node_id].getAddress()) == memberNode->addr)
			{
				belongs_here = true;
			}
			else
			{
				auto req = Message(-current, memberNode->addr, MessageType::CREATE, key, value,
								   static_cast<ReplicaType>(node_id));
				emulNet->ENsend(&(memberNode->addr), nodes[node_id].getAddress(), req.toString());
			}
		}
		if (belongs_here)
		{
			++it;
		}
		else
		{
			it = secondary->hashTable.erase(it);
		}
	}
	std::cout << "Rehashing tertiary " << tertiary->currentSize() << "\n";
	for (auto it = tertiary->hashTable.begin(); it != tertiary->hashTable.end();)
	{
		const auto &key = it->first;
		const auto &value = it->second;
		int current = g_transID++;
		auto nodes = findNodes(key);
		bool belongs_here = false;
		for (auto node_id = 0; node_id < nodes.size(); ++node_id)
		{
			if (node_id == 2 and *(nodes[node_id].getAddress()) == memberNode->addr)
			{
				belongs_here = true;
			}
			else
			{
				auto req = Message(-current, memberNode->addr, MessageType::CREATE, key, value,
								   static_cast<ReplicaType>(node_id));
				emulNet->ENsend(&(memberNode->addr), nodes[node_id].getAddress(), req.toString());
			}
		}
		if (belongs_here)
		{
			++it;
		}
		else
		{
			it = tertiary->hashTable.erase(it);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x540, %rsp            # imm = 0x540
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x448(%rbp)
addq $0x30, %rsi
leaq -0x20(%rbp), %rdi
movq %rdi, -0x440(%rbp)
callq 0x21440
movq -0x440(%rbp), %rdi
callq 0x1be40
jmp 0x1c7bc
leaq -0x20(%rbp), %rdi
callq 0x12c30
movq 0x1d7fc(%rip), %rdi     # 0x39fc8
leaq 0xe587(%rip), %rsi      # 0x2ad5a
callq 0x42f0
movq %rax, %rcx
movq -0x448(%rbp), %rax
movq %rcx, -0x450(%rbp)
movq 0x48(%rax), %rdi
callq 0x25ec0
movq -0x450(%rbp), %rdi
movq %rax, %rsi
callq 0x40c0
movq %rax, %rdi
leaq 0xdb3a(%rip), %rsi      # 0x2a345
callq 0x42f0
movq -0x448(%rbp), %rax
movq 0x48(%rax), %rdi
addq $0x8, %rdi
callq 0x129f0
movq %rax, -0x38(%rbp)
movq -0x448(%rbp), %rax
movq 0x48(%rax), %rdi
addq $0x8, %rdi
callq 0x12a50
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x12a20
testb $0x1, %al
jne 0x1c856
jmp 0x1cbe3
leaq -0x38(%rbp), %rdi
movq %rdi, -0x460(%rbp)
callq 0x12a80
movq -0x460(%rbp), %rdi
movq %rax, -0x48(%rbp)
callq 0x12a80
addq $0x20, %rax
movq %rax, -0x50(%rbp)
movl 0x260d8(%rip), %eax     # 0x4295c
movl %eax, %ecx
incl %ecx
movl %ecx, 0x260ce(%rip)     # 0x4295c
movl %eax, -0x54(%rbp)
movq -0x48(%rbp), %rsi
leaq -0x90(%rbp), %rdi
movq %rdi, -0x458(%rbp)
callq 0x4150
movq -0x448(%rbp), %rsi
movq -0x458(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0x1d870
jmp 0x1c8c1
leaq -0x90(%rbp), %rdi
callq 0x41e0
movb $0x0, -0x91(%rbp)
movl $0x0, -0x98(%rbp)
movslq -0x98(%rbp), %rax
movq %rax, -0x468(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x12c90
movq %rax, %rcx
movq -0x468(%rbp), %rax
cmpq %rcx, %rax
jae 0x1cb6b
cmpl $0x0, -0x98(%rbp)
jne 0x1c9b9
movslq -0x98(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x15460
movq %rax, %rdi
callq 0x25a90
movq %rax, -0x470(%rbp)
jmp 0x1c936
movq -0x470(%rbp), %rdi
movq -0x448(%rbp), %rax
movq 0x60(%rax), %rsi
addq $0x8, %rsi
callq 0x17130
movb %al, -0x471(%rbp)
jmp 0x1c959
movb -0x471(%rbp), %al
testb $0x1, %al
jne 0x1c965
jmp 0x1c9b9
movb $0x1, -0x91(%rbp)
jmp 0x1cb55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x12c30
jmp 0x1d46f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x41e0
jmp 0x1d46f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1cbd5
movq -0x448(%rbp), %rax
movl -0x54(%rbp), %ecx
negl %ecx
movl %ecx, -0x478(%rbp)
movq 0x60(%rax), %rsi
addq $0x8, %rsi
leaq -0x116(%rbp), %rdi
callq 0x170d0
jmp 0x1c9e1
movq -0x48(%rbp), %rsi
leaq -0x138(%rbp), %rdi
callq 0x4150
jmp 0x1c9f3
movq -0x50(%rbp), %rsi
leaq -0x158(%rbp), %rdi
callq 0x4150
jmp 0x1ca05
movl -0x478(%rbp), %esi
movl -0x98(%rbp), %ecx
movq %rsp, %rax
movl %ecx, (%rax)
leaq -0x110(%rbp), %rdi
leaq -0x116(%rbp), %rdx
xorl %ecx, %ecx
leaq -0x138(%rbp), %r8
leaq -0x158(%rbp), %r9
callq 0x28590
jmp 0x1ca3b
leaq -0x158(%rbp), %rdi
callq 0x41e0
leaq -0x138(%rbp), %rdi
callq 0x41e0
movq -0x448(%rbp), %rcx
movq 0x60(%rcx), %rax
movq 0x70(%rcx), %rcx
movq %rcx, -0x490(%rbp)
addq $0x8, %rax
movq %rax, -0x488(%rbp)
movslq -0x98(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x15460
movq %rax, %rdi
callq 0x25a90
movq %rax, -0x480(%rbp)
jmp 0x1ca95
leaq -0x178(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x28bb0
jmp 0x1caaa
movq -0x480(%rbp), %rdx
movq -0x488(%rbp), %rsi
movq -0x490(%rbp), %rdi
leaq -0x178(%rbp), %rcx
callq 0xcce0
jmp 0x1cacd
leaq -0x178(%rbp), %rdi
callq 0x41e0
leaq -0x110(%rbp), %rdi
callq 0x21280
jmp 0x1cb55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1cb0d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x158(%rbp), %rdi
callq 0x41e0
leaq -0x138(%rbp), %rdi
callq 0x41e0
jmp 0x1cbd5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1cb44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x178(%rbp), %rdi
callq 0x41e0
leaq -0x110(%rbp), %rdi
callq 0x21280
jmp 0x1cbd5
jmp 0x1cb57
movl -0x98(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x98(%rbp)
jmp 0x1c8de
testb $0x1, -0x91(%rbp)
je 0x1cb7f
leaq -0x38(%rbp), %rdi
callq 0x12aa0
jmp 0x1cbc7
movq -0x448(%rbp), %rax
movq 0x48(%rax), %rdi
addq $0x8, %rdi
movq -0x38(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rsi
callq 0x21770
movq %rax, -0x498(%rbp)
jmp 0x1cbae
movq -0x498(%rbp), %rax
movq %rax, -0x180(%rbp)
movq -0x180(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x12c30
jmp 0x1c828
leaq -0x70(%rbp), %rdi
callq 0x12c30
jmp 0x1d46f
movq 0x1d3de(%rip), %rdi     # 0x39fc8
leaq 0xe17c(%rip), %rsi      # 0x2ad6d
callq 0x42f0
movq %rax, %rcx
movq -0x448(%rbp), %rax
movq %rcx, -0x4a0(%rbp)
movq 0x50(%rax), %rdi
callq 0x25ec0
movq -0x4a0(%rbp), %rdi
movq %rax, %rsi
callq 0x40c0
movq %rax, %rdi
leaq 0xd71c(%rip), %rsi      # 0x2a345
callq 0x42f0
movq -0x448(%rbp), %rax
movq 0x50(%rax), %rdi
addq $0x8, %rdi
callq 0x129f0
movq %rax, -0x190(%rbp)
movq -0x448(%rbp), %rax
movq 0x50(%rax), %rdi
addq $0x8, %rdi
callq 0x12a50
movq %rax, -0x198(%rbp)
leaq -0x190(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x12a20
testb $0x1, %al
jne 0x1cc80
jmp 0x1d026
leaq -0x190(%rbp), %rdi
movq %rdi, -0x4b0(%rbp)
callq 0x12a80
movq -0x4b0(%rbp), %rdi
movq %rax, -0x1a0(%rbp)
callq 0x12a80
addq $0x20, %rax
movq %rax, -0x1a8(%rbp)
movl 0x25ca5(%rip), %eax     # 0x4295c
movl %eax, %ecx
incl %ecx
movl %ecx, 0x25c9b(%rip)     # 0x4295c
movl %eax, -0x1ac(%rbp)
movq -0x1a0(%rbp), %rsi
leaq -0x1e8(%rbp), %rdi
movq %rdi, -0x4a8(%rbp)
callq 0x4150
movq -0x448(%rbp), %rsi
movq -0x4a8(%rbp), %rdx
leaq -0x1c8(%rbp), %rdi
callq 0x1d870
jmp 0x1ccfd
leaq -0x1e8(%rbp), %rdi
callq 0x41e0
movb $0x0, -0x1e9(%rbp)
movl $0x0, -0x1f0(%rbp)
movslq -0x1f0(%rbp), %rax
movq %rax, -0x4b8(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x12c90
movq %rax, %rcx
movq -0x4b8(%rbp), %rax
cmpq %rcx, %rax
jae 0x1cf9f
cmpl $0x1, -0x1f0(%rbp)
jne 0x1cde1
movslq -0x1f0(%rbp), %rsi
leaq -0x1c8(%rbp), %rdi
callq 0x15460
movq %rax, %rdi
callq 0x25a90
movq %rax, -0x4c0(%rbp)
jmp 0x1cd78
movq -0x4c0(%rbp), %rdi
movq -0x448(%rbp), %rax
movq 0x60(%rax), %rsi
addq $0x8, %rsi
callq 0x17130
movb %al, -0x4c1(%rbp)
jmp 0x1cd9b
movb -0x4c1(%rbp), %al
testb $0x1, %al
jne 0x1cda7
jmp 0x1cde1
movb $0x1, -0x1e9(%rbp)
jmp 0x1cf89
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x1e8(%rbp), %rdi
callq 0x41e0
jmp 0x1d46f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1d015
movq -0x448(%rbp), %rax
movl -0x1ac(%rbp), %ecx
negl %ecx
movl %ecx, -0x4c8(%rbp)
movq 0x60(%rax), %rsi
addq $0x8, %rsi
leaq -0x26e(%rbp), %rdi
callq 0x170d0
jmp 0x1ce0c
movq -0x1a0(%rbp), %rsi
leaq -0x290(%rbp), %rdi
callq 0x4150
jmp 0x1ce21
movq -0x1a8(%rbp), %rsi
leaq -0x2b0(%rbp), %rdi
callq 0x4150
jmp 0x1ce36
movl -0x4c8(%rbp), %esi
movl -0x1f0(%rbp), %ecx
movq %rsp, %rax
movl %ecx, (%rax)
leaq -0x268(%rbp), %rdi
leaq -0x26e(%rbp), %rdx
xorl %ecx, %ecx
leaq -0x290(%rbp), %r8
leaq -0x2b0(%rbp), %r9
callq 0x28590
jmp 0x1ce6c
leaq -0x2b0(%rbp), %rdi
callq 0x41e0
leaq -0x290(%rbp), %rdi
callq 0x41e0
movq -0x448(%rbp), %rcx
movq 0x60(%rcx), %rax
movq 0x70(%rcx), %rcx
movq %rcx, -0x4e0(%rbp)
addq $0x8, %rax
movq %rax, -0x4d8(%rbp)
movslq -0x1f0(%rbp), %rsi
leaq -0x1c8(%rbp), %rdi
callq 0x15460
movq %rax, %rdi
callq 0x25a90
movq %rax, -0x4d0(%rbp)
jmp 0x1cec9
leaq -0x2d0(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0x28bb0
jmp 0x1cede
movq -0x4d0(%rbp), %rdx
movq -0x4d8(%rbp), %rsi
movq -0x4e0(%rbp), %rdi
leaq -0x2d0(%rbp), %rcx
callq 0xcce0
jmp 0x1cf01
leaq -0x2d0(%rbp), %rdi
callq 0x41e0
leaq -0x268(%rbp), %rdi
callq 0x21280
jmp 0x1cf89
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1cf41
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x2b0(%rbp), %rdi
callq 0x41e0
leaq -0x290(%rbp), %rdi
callq 0x41e0
jmp 0x1d015
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1cf78
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x2d0(%rbp), %rdi
callq 0x41e0
leaq -0x268(%rbp), %rdi
callq 0x21280
jmp 0x1d015
jmp 0x1cf8b
movl -0x1f0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1f0(%rbp)
jmp 0x1cd1a
testb $0x1, -0x1e9(%rbp)
je 0x1cfb6
leaq -0x190(%rbp), %rdi
callq 0x12aa0
jmp 0x1d004
movq -0x448(%rbp), %rax
movq 0x50(%rax), %rdi
addq $0x8, %rdi
movq -0x190(%rbp), %rax
movq %rax, -0x2e0(%rbp)
movq -0x2e0(%rbp), %rsi
callq 0x21770
movq %rax, -0x4e8(%rbp)
jmp 0x1cfe8
movq -0x4e8(%rbp), %rax
movq %rax, -0x2d8(%rbp)
movq -0x2d8(%rbp), %rax
movq %rax, -0x190(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x12c30
jmp 0x1cc49
leaq -0x1c8(%rbp), %rdi
callq 0x12c30
jmp 0x1d46f
movq 0x1cf9b(%rip), %rdi     # 0x39fc8
leaq 0xdd4e(%rip), %rsi      # 0x2ad82
callq 0x42f0
movq %rax, %rcx
movq -0x448(%rbp), %rax
movq %rcx, -0x4f0(%rbp)
movq 0x58(%rax), %rdi
callq 0x25ec0
movq -0x4f0(%rbp), %rdi
movq %rax, %rsi
callq 0x40c0
movq %rax, %rdi
leaq 0xd2d9(%rip), %rsi      # 0x2a345
callq 0x42f0
movq -0x448(%rbp), %rax
movq 0x58(%rax), %rdi
addq $0x8, %rdi
callq 0x129f0
movq %rax, -0x2e8(%rbp)
movq -0x448(%rbp), %rax
movq 0x58(%rax), %rdi
addq $0x8, %rdi
callq 0x12a50
movq %rax, -0x2f0(%rbp)
leaq -0x2e8(%rbp), %rdi
leaq -0x2f0(%rbp), %rsi
callq 0x12a20
testb $0x1, %al
jne 0x1d0c3
jmp 0x1d466
leaq -0x2e8(%rbp), %rdi
movq %rdi, -0x500(%rbp)
callq 0x12a80
movq -0x500(%rbp), %rdi
movq %rax, -0x2f8(%rbp)
callq 0x12a80
addq $0x20, %rax
movq %rax, -0x300(%rbp)
movl 0x25862(%rip), %eax     # 0x4295c
movl %eax, %ecx
incl %ecx
movl %ecx, 0x25858(%rip)     # 0x4295c
movl %eax, -0x304(%rbp)
movq -0x2f8(%rbp), %rsi
leaq -0x340(%rbp), %rdi
movq %rdi, -0x4f8(%rbp)
callq 0x4150
movq -0x448(%rbp), %rsi
movq -0x4f8(%rbp), %rdx
leaq -0x320(%rbp), %rdi
callq 0x1d870
jmp 0x1d140
leaq -0x340(%rbp), %rdi
callq 0x41e0
movb $0x0, -0x341(%rbp)
movl $0x0, -0x348(%rbp)
movslq -0x348(%rbp), %rax
movq %rax, -0x508(%rbp)
leaq -0x320(%rbp), %rdi
callq 0x12c90
movq %rax, %rcx
movq -0x508(%rbp), %rax
cmpq %rcx, %rax
jae 0x1d3e2
cmpl $0x2, -0x348(%rbp)
jne 0x1d224
movslq -0x348(%rbp), %rsi
leaq -0x320(%rbp), %rdi
callq 0x15460
movq %rax, %rdi
callq 0x25a90
movq %rax, -0x510(%rbp)
jmp 0x1d1bb
movq -0x510(%rbp), %rdi
movq -0x448(%rbp), %rax
movq 0x60(%rax), %rsi
addq $0x8, %rsi
callq 0x17130
movb %al, -0x511(%rbp)
jmp 0x1d1de
movb -0x511(%rbp), %al
testb $0x1, %al
jne 0x1d1ea
jmp 0x1d224
movb $0x1, -0x341(%rbp)
jmp 0x1d3cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x340(%rbp), %rdi
callq 0x41e0
jmp 0x1d46f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1d458
movq -0x448(%rbp), %rax
movl -0x304(%rbp), %ecx
negl %ecx
movl %ecx, -0x518(%rbp)
movq 0x60(%rax), %rsi
addq $0x8, %rsi
leaq -0x3c6(%rbp), %rdi
callq 0x170d0
jmp 0x1d24f
movq -0x2f8(%rbp), %rsi
leaq -0x3e8(%rbp), %rdi
callq 0x4150
jmp 0x1d264
movq -0x300(%rbp), %rsi
leaq -0x408(%rbp), %rdi
callq 0x4150
jmp 0x1d279
movl -0x518(%rbp), %esi
movl -0x348(%rbp), %ecx
movq %rsp, %rax
movl %ecx, (%rax)
leaq -0x3c0(%rbp), %rdi
leaq -0x3c6(%rbp), %rdx
xorl %ecx, %ecx
leaq -0x3e8(%rbp), %r8
leaq -0x408(%rbp), %r9
callq 0x28590
jmp 0x1d2af
leaq -0x408(%rbp), %rdi
callq 0x41e0
leaq -0x3e8(%rbp), %rdi
callq 0x41e0
movq -0x448(%rbp), %rcx
movq 0x60(%rcx), %rax
movq 0x70(%rcx), %rcx
movq %rcx, -0x530(%rbp)
addq $0x8, %rax
movq %rax, -0x528(%rbp)
movslq -0x348(%rbp), %rsi
leaq -0x320(%rbp), %rdi
callq 0x15460
movq %rax, %rdi
callq 0x25a90
movq %rax, -0x520(%rbp)
jmp 0x1d30c
leaq -0x428(%rbp), %rdi
leaq -0x3c0(%rbp), %rsi
callq 0x28bb0
jmp 0x1d321
movq -0x520(%rbp), %rdx
movq -0x528(%rbp), %rsi
movq -0x530(%rbp), %rdi
leaq -0x428(%rbp), %rcx
callq 0xcce0
jmp 0x1d344
leaq -0x428(%rbp), %rdi
callq 0x41e0
leaq -0x3c0(%rbp), %rdi
callq 0x21280
jmp 0x1d3cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1d384
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x408(%rbp), %rdi
callq 0x41e0
leaq -0x3e8(%rbp), %rdi
callq 0x41e0
jmp 0x1d458
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1d3bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x428(%rbp), %rdi
callq 0x41e0
leaq -0x3c0(%rbp), %rdi
callq 0x21280
jmp 0x1d458
jmp 0x1d3ce
movl -0x348(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x348(%rbp)
jmp 0x1d15d
testb $0x1, -0x341(%rbp)
je 0x1d3f9
leaq -0x2e8(%rbp), %rdi
callq 0x12aa0
jmp 0x1d447
movq -0x448(%rbp), %rax
movq 0x58(%rax), %rdi
addq $0x8, %rdi
movq -0x2e8(%rbp), %rax
movq %rax, -0x438(%rbp)
movq -0x438(%rbp), %rsi
callq 0x21770
movq %rax, -0x538(%rbp)
jmp 0x1d42b
movq -0x538(%rbp), %rax
movq %rax, -0x430(%rbp)
movq -0x430(%rbp), %rax
movq %rax, -0x2e8(%rbp)
leaq -0x320(%rbp), %rdi
callq 0x12c30
jmp 0x1d08c
leaq -0x320(%rbp), %rdi
callq 0x12c30
jmp 0x1d46f
addq $0x540, %rsp            # imm = 0x540
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x4570
nopl (%rax,%rax)