// File: rtackx[P]ComSim/community.cpp
// Function: Community::cycles(Graph*&, std::vector<unsigned int, std::allocator<unsigned int>>&, std::unordered_set<unsigned int, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<unsigned int>>&)
void Community::cycles(Graph*& graph_projection, vector<unsigned int>& list_index_nodes, unordered_set<unsigned int>& list_remaining_nodes)
{
	vector<unsigned int> list_visited_nodes;
	unsigned int current, neighbor, most_similar, max_depth;
	vector<unsigned int>::iterator it_list_visited, it_list_index, it_current;
	vector<unsigned int>::reverse_iterator rit_current;
	float max_similarity;
	vector<unsigned int> list_similarity;
	
	unordered_map<unsigned int, pair<unsigned int, unsigned int>> map_cycle_nodes;
	for(auto& index : list_index_nodes)
	{
		max_depth = depth_best;
		if(depth_best > graph_projection->list_nodes[index]->nb_neighbors)
			max_depth = graph_projection->list_nodes[index]->nb_neighbors;

		map_cycle_nodes[index] = make_pair(0, max_depth);
	}

	int i = rand() % list_index_nodes.size();
	bool new_node = true;
	do 
	{
		if(new_node)
		{
			list_visited_nodes.clear();
			i = rand() % list_index_nodes.size();
			current = list_index_nodes[i];
			new_node = false;
		}

		list_visited_nodes.push_back(current);

		max_similarity = 0.0;
		for(auto& neighbor : graph_projection->list_nodes[current]->neighbor_weights)
		{
			if(neighbor.second >= max_similarity)
			{
				if(neighbor.second > max_similarity)
					list_similarity.clear();

				max_similarity = neighbor.second;
				list_similarity.push_back(neighbor.first->index);
			}
		}
		if(list_visited_nodes.size() > 1)
		{
			rit_current = list_visited_nodes.rbegin();
			while(rit_current != list_visited_nodes.rend())
			{
				if(list_similarity.size() > 1 && find(list_similarity.begin(), list_similarity.end(), *rit_current) != list_similarity.end())
					list_similarity.erase(remove(list_similarity.begin(), list_similarity.end(), *rit_current));

				++rit_current;
			}
		}

		if(list_similarity.size() > 0)
		{
			most_similar = list_similarity[rand() % list_similarity.size()];

			it_list_visited = find(list_visited_nodes.begin(), list_visited_nodes.end(), most_similar);
			it_list_index = find(list_index_nodes.begin(), list_index_nodes.end(), most_similar);		
		}
		else
		{
			it_list_visited = list_visited_nodes.end();
			it_list_index = list_index_nodes.end();
		}

		
		if(it_list_visited == list_visited_nodes.end() && it_list_index != list_index_nodes.end())
			current = most_similar;
		else
		{
			// Already visited, cycle detected 
			if(it_list_visited != list_visited_nodes.end())
			{
				it_current = it_list_visited;
				while(it_current != list_visited_nodes.end())
				{
					current = *it_current;
					map_community[current].push_back(index_community);
										
					advance(it_current, 1);
					if(it_current != list_visited_nodes.end())
						neighbor = *it_current;
					else
						neighbor = *it_list_visited;

					graph_projection->list_nodes[current]->neighbor_weights.erase(graph_projection->list_nodes[neighbor]);
					graph_projection->list_nodes[neighbor]->neighbor_weights.erase(graph_projection->list_nodes[current]);
				}

				index_community++;

				it_current = it_list_visited;
				while(it_current != list_visited_nodes.end())
				{
					current = *it_current;
					map_cycle_nodes[current].first++;
					if(map_cycle_nodes[current].first == map_cycle_nodes[current].second)
							list_index_nodes.erase(remove(list_index_nodes.begin(), list_index_nodes.end(), current));
					
					++it_current;
				}
			}
			else
			{
				for(auto& current : list_visited_nodes)
				{					
					map_cycle_nodes[current].first++;
					if(map_cycle_nodes[current].first == map_cycle_nodes[current].second)
					{
						if(map_community.find(current) == map_community.end())
							list_remaining_nodes.insert(current);

						list_index_nodes.erase(remove(list_index_nodes.begin(), list_index_nodes.end(), current));
					}
				}
			}
			
			new_node = true;
		}

	} while(list_index_nodes.size() > 0);
}

// Assembly:
subq $0x3b8, %rsp            # imm = 0x3B8
movq %rdi, 0x3b0(%rsp)
movq %rsi, 0x3a8(%rsp)
movq %rdx, 0x3a0(%rsp)
movq %rcx, 0x398(%rsp)
movq 0x3b0(%rsp), %rax
movq %rax, 0x138(%rsp)
leaq 0x380(%rsp), %rdi
callq 0x18c30
leaq 0x368(%rsp), %rdi
callq 0x18d90
leaq 0x360(%rsp), %rdi
callq 0x18d90
leaq 0x358(%rsp), %rdi
callq 0x18d90
leaq 0x350(%rsp), %rdi
callq 0x18db0
jmp 0x1748a
leaq 0x328(%rsp), %rdi
callq 0x18c30
leaq 0x2f0(%rsp), %rdi
callq 0x18dc0
movq 0x3a0(%rsp), %rax
movq %rax, 0x2e8(%rsp)
movq 0x2e8(%rsp), %rdi
callq 0x18dd0
movq %rax, 0x2e0(%rsp)
movq 0x2e8(%rsp), %rdi
callq 0x18e00
movq %rax, 0x2d8(%rsp)
leaq 0x2e0(%rsp), %rdi
leaq 0x2d8(%rsp), %rsi
callq 0x18e30
testb $0x1, %al
jne 0x174fc
jmp 0x17644
leaq 0x2e0(%rsp), %rdi
callq 0x18e70
movq %rax, %rcx
movq 0x138(%rsp), %rax
movq %rcx, 0x2d0(%rsp)
movl 0xc(%rax), %ecx
movl %ecx, 0x370(%rsp)
movl 0xc(%rax), %eax
movq 0x3a8(%rsp), %rcx
movq (%rcx), %rcx
movq 0x8(%rcx), %rcx
movq 0x2d0(%rsp), %rdx
movl (%rdx), %edx
movq (%rcx,%rdx,8), %rcx
cmpl 0x28(%rcx), %eax
jbe 0x1758d
movq 0x3a8(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq 0x2d0(%rsp), %rcx
movl (%rcx), %ecx
movq (%rax,%rcx,8), %rax
movl 0x28(%rax), %eax
movl %eax, 0x370(%rsp)
jmp 0x1758d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x1824e
movl $0x0, 0x2c4(%rsp)
leaq 0x2c4(%rsp), %rdi
leaq 0x370(%rsp), %rsi
callq 0x18e80
movq %rax, 0x130(%rsp)
jmp 0x175b7
movq 0x130(%rsp), %rax
movq %rax, 0x2c8(%rsp)
movq 0x2d0(%rsp), %rsi
leaq 0x2f0(%rsp), %rdi
callq 0x18eb0
movq %rax, 0x128(%rsp)
jmp 0x175e6
movq 0x128(%rsp), %rdi
leaq 0x2c8(%rsp), %rsi
callq 0x18ee0
jmp 0x175fd
jmp 0x175ff
leaq 0x2e0(%rsp), %rdi
callq 0x18f10
jmp 0x174de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
leaq 0x2f0(%rsp), %rdi
callq 0x193d0
leaq 0x328(%rsp), %rdi
callq 0x18d30
jmp 0x1824e
callq 0x30a0
cltq
movq %rax, 0x120(%rsp)
movq 0x3a0(%rsp), %rdi
callq 0x18cf0
movq %rax, %rcx
movq 0x120(%rsp), %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x2c0(%rsp)
movb $0x1, 0x2bf(%rsp)
testb $0x1, 0x2bf(%rsp)
je 0x176f3
leaq 0x380(%rsp), %rdi
callq 0x18f30
callq 0x30a0
cltq
movq %rax, 0x118(%rsp)
movq 0x3a0(%rsp), %rdi
callq 0x18cf0
movq %rax, %rcx
movq 0x118(%rsp), %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x2c0(%rsp)
movq 0x3a0(%rsp), %rdi
movslq 0x2c0(%rsp), %rsi
callq 0x18f50
movl (%rax), %eax
movl %eax, 0x37c(%rsp)
movb $0x0, 0x2bf(%rsp)
leaq 0x380(%rsp), %rdi
leaq 0x37c(%rsp), %rsi
callq 0x18c80
jmp 0x1770a
xorps %xmm0, %xmm0
movss %xmm0, 0x340(%rsp)
movq 0x3a8(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movl 0x37c(%rsp), %ecx
movq (%rax,%rcx,8), %rax
addq $0x30, %rax
movq %rax, 0x2b0(%rsp)
movq 0x2b0(%rsp), %rdi
callq 0x107e0
movq %rax, 0x2a8(%rsp)
movq 0x2b0(%rsp), %rdi
callq 0x10810
movq %rax, 0x2a0(%rsp)
leaq 0x2a8(%rsp), %rdi
leaq 0x2a0(%rsp), %rsi
callq 0x10840
testb $0x1, %al
jne 0x17784
jmp 0x1781a
leaq 0x2a8(%rsp), %rdi
callq 0x10860
movq %rax, 0x298(%rsp)
movq 0x298(%rsp), %rax
movss 0x8(%rax), %xmm0
ucomiss 0x340(%rsp), %xmm0
jb 0x17806
movq 0x298(%rsp), %rax
movss 0x8(%rax), %xmm0
ucomiss 0x340(%rsp), %xmm0
jbe 0x177d4
leaq 0x328(%rsp), %rdi
callq 0x18f30
movq 0x298(%rsp), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, 0x340(%rsp)
movq 0x298(%rsp), %rax
movq (%rax), %rsi
leaq 0x328(%rsp), %rdi
callq 0x18c80
jmp 0x17804
jmp 0x17806
jmp 0x17808
leaq 0x2a8(%rsp), %rdi
callq 0x10880
jmp 0x17766
leaq 0x380(%rsp), %rdi
callq 0x18cf0
cmpq $0x1, %rax
jbe 0x17a5f
leaq 0x290(%rsp), %rdi
leaq 0x380(%rsp), %rsi
callq 0x18f70
movq 0x290(%rsp), %rax
movq %rax, 0x350(%rsp)
leaq 0x288(%rsp), %rdi
movq %rdi, 0x108(%rsp)
leaq 0x380(%rsp), %rsi
callq 0x18ff0
movq 0x108(%rsp), %rsi
leaq 0x350(%rsp), %rdi
callq 0x18fc0
movb %al, 0x117(%rsp)
jmp 0x17891
movb 0x117(%rsp), %al
testb $0x1, %al
jne 0x178a1
jmp 0x17a5d
leaq 0x328(%rsp), %rdi
callq 0x18cf0
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x1, %rcx
movb %al, 0x107(%rsp)
jbe 0x17975
leaq 0x328(%rsp), %rdi
movq %rdi, 0xf0(%rsp)
callq 0x18dd0
movq 0xf0(%rsp), %rdi
movq %rax, 0x278(%rsp)
callq 0x18e00
movq %rax, 0x270(%rsp)
leaq 0x350(%rsp), %rdi
callq 0x190a0
movq %rax, 0xf8(%rsp)
jmp 0x1790d
movq 0xf8(%rsp), %rdx
movq 0x278(%rsp), %rdi
movq 0x270(%rsp), %rsi
callq 0x19040
movq %rax, 0xe8(%rsp)
jmp 0x17934
movq 0xe8(%rsp), %rax
movq %rax, 0x280(%rsp)
leaq 0x328(%rsp), %rdi
callq 0x18e00
movq %rax, 0x268(%rsp)
leaq 0x280(%rsp), %rdi
leaq 0x268(%rsp), %rsi
callq 0x18e30
movb %al, 0x107(%rsp)
movb 0x107(%rsp), %al
testb $0x1, %al
jne 0x17985
jmp 0x17a49
leaq 0x328(%rsp), %rdi
movq %rdi, 0xd8(%rsp)
callq 0x18dd0
movq 0xd8(%rsp), %rdi
movq %rax, 0x250(%rsp)
callq 0x18e00
movq %rax, 0x248(%rsp)
leaq 0x350(%rsp), %rdi
callq 0x190a0
movq %rax, 0xe0(%rsp)
jmp 0x179ce
movq 0xe0(%rsp), %rdx
movq 0x250(%rsp), %rdi
movq 0x248(%rsp), %rsi
callq 0x19140
movq %rax, 0xd0(%rsp)
jmp 0x179f5
movq 0xd0(%rsp), %rax
movq %rax, 0x258(%rsp)
leaq 0x260(%rsp), %rdi
leaq 0x258(%rsp), %rsi
callq 0x191a0
movq 0x260(%rsp), %rsi
leaq 0x328(%rsp), %rdi
callq 0x190d0
movq %rax, 0xc8(%rsp)
jmp 0x17a39
movq 0xc8(%rsp), %rax
movq %rax, 0x240(%rsp)
leaq 0x350(%rsp), %rdi
callq 0x191e0
jmp 0x17a58
jmp 0x17856
jmp 0x17a5f
leaq 0x328(%rsp), %rdi
callq 0x18cf0
cmpq $0x0, %rax
jbe 0x17baf
callq 0x30a0
cltq
movq %rax, 0xb0(%rsp)
leaq 0x328(%rsp), %rdi
movq %rdi, 0xa8(%rsp)
callq 0x18cf0
movq 0xa8(%rsp), %rdi
movq %rax, %rcx
movq 0xb0(%rsp), %rax
xorl %edx, %edx
divq %rcx
movq %rdx, %rsi
callq 0x18f50
movl (%rax), %eax
movl %eax, 0x374(%rsp)
leaq 0x380(%rsp), %rdi
movq %rdi, 0xb8(%rsp)
callq 0x18dd0
movq 0xb8(%rsp), %rdi
movq %rax, 0x230(%rsp)
callq 0x18e00
movq %rax, 0x228(%rsp)
movq 0x230(%rsp), %rdi
movq 0x228(%rsp), %rsi
leaq 0x374(%rsp), %rdx
callq 0x19040
movq %rax, 0xc0(%rsp)
jmp 0x17b1c
movq 0xc0(%rsp), %rax
movq %rax, 0x238(%rsp)
movq 0x238(%rsp), %rax
movq %rax, 0x368(%rsp)
movq 0x3a0(%rsp), %rdi
callq 0x18dd0
movq %rax, 0x218(%rsp)
movq 0x3a0(%rsp), %rdi
callq 0x18e00
movq %rax, 0x210(%rsp)
movq 0x218(%rsp), %rdi
movq 0x210(%rsp), %rsi
leaq 0x374(%rsp), %rdx
callq 0x19040
movq %rax, 0xa0(%rsp)
jmp 0x17b8d
movq 0xa0(%rsp), %rax
movq %rax, 0x220(%rsp)
movq 0x220(%rsp), %rax
movq %rax, 0x360(%rsp)
jmp 0x17bf9
leaq 0x380(%rsp), %rdi
callq 0x18e00
movq %rax, 0x208(%rsp)
movq 0x208(%rsp), %rax
movq %rax, 0x368(%rsp)
movq 0x3a0(%rsp), %rdi
callq 0x18e00
movq %rax, 0x200(%rsp)
movq 0x200(%rsp), %rax
movq %rax, 0x360(%rsp)
leaq 0x380(%rsp), %rdi
callq 0x18e00
movq %rax, 0x1f8(%rsp)
leaq 0x368(%rsp), %rdi
leaq 0x1f8(%rsp), %rsi
callq 0x19210
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x9f(%rsp)
jne 0x17c35
jmp 0x17c66
movq 0x3a0(%rsp), %rdi
callq 0x18e00
movq %rax, 0x1f0(%rsp)
leaq 0x360(%rsp), %rdi
leaq 0x1f0(%rsp), %rsi
callq 0x18e30
movb %al, 0x9f(%rsp)
movb 0x9f(%rsp), %al
testb $0x1, %al
jne 0x17c73
jmp 0x17c86
movl 0x374(%rsp), %eax
movl %eax, 0x37c(%rsp)
jmp 0x18206
leaq 0x380(%rsp), %rdi
callq 0x18e00
movq %rax, 0x1e8(%rsp)
leaq 0x368(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x18e30
testb $0x1, %al
jne 0x17cb9
jmp 0x17fcb
movq 0x368(%rsp), %rax
movq %rax, 0x358(%rsp)
leaq 0x380(%rsp), %rdi
callq 0x18e00
movq %rax, 0x1e0(%rsp)
leaq 0x358(%rsp), %rdi
leaq 0x1e0(%rsp), %rsi
callq 0x18e30
testb $0x1, %al
jne 0x17cfc
jmp 0x17e27
leaq 0x358(%rsp), %rdi
callq 0x18e70
movq 0x138(%rsp), %rdi
movl (%rax), %eax
movl %eax, 0x37c(%rsp)
addq $0x10, %rdi
leaq 0x37c(%rsp), %rsi
callq 0x19250
movq %rax, 0x90(%rsp)
jmp 0x17d35
movq 0x90(%rsp), %rdi
movq 0x138(%rsp), %rsi
addq $0x8, %rsi
callq 0x18c80
jmp 0x17d50
leaq 0x358(%rsp), %rdi
movl $0x1, %esi
callq 0x19280
jmp 0x17d64
leaq 0x380(%rsp), %rdi
callq 0x18e00
movq %rax, 0x1d8(%rsp)
leaq 0x358(%rsp), %rdi
leaq 0x1d8(%rsp), %rsi
callq 0x18e30
testb $0x1, %al
jne 0x17d94
jmp 0x17dac
leaq 0x358(%rsp), %rdi
callq 0x18e70
movl (%rax), %eax
movl %eax, 0x378(%rsp)
jmp 0x17dc2
leaq 0x368(%rsp), %rdi
callq 0x18e70
movl (%rax), %eax
movl %eax, 0x378(%rsp)
movq 0x3a8(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movl 0x37c(%rsp), %ecx
movq (%rax,%rcx,8), %rdi
addq $0x30, %rdi
movl 0x378(%rsp), %ecx
leaq (%rax,%rcx,8), %rsi
callq 0x192d0
jmp 0x17df2
movq 0x3a8(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movl 0x378(%rsp), %ecx
movq (%rax,%rcx,8), %rdi
addq $0x30, %rdi
movl 0x37c(%rsp), %ecx
leaq (%rax,%rcx,8), %rsi
callq 0x192d0
jmp 0x17e22
jmp 0x17cc9
movq 0x138(%rsp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movq 0x368(%rsp), %rax
movq %rax, 0x358(%rsp)
leaq 0x380(%rsp), %rdi
callq 0x18e00
movq %rax, 0x1d0(%rsp)
leaq 0x358(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x18e30
testb $0x1, %al
jne 0x17e7b
jmp 0x17fc6
leaq 0x358(%rsp), %rdi
callq 0x18e70
movl (%rax), %eax
movl %eax, 0x37c(%rsp)
leaq 0x2f0(%rsp), %rdi
leaq 0x37c(%rsp), %rsi
callq 0x18eb0
movq %rax, 0x88(%rsp)
jmp 0x17eb0
movq 0x88(%rsp), %rax
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
leaq 0x2f0(%rsp), %rdi
leaq 0x37c(%rsp), %rsi
callq 0x18eb0
movq %rax, 0x80(%rsp)
jmp 0x17edd
movq 0x80(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x74(%rsp)
leaq 0x2f0(%rsp), %rdi
leaq 0x37c(%rsp), %rsi
callq 0x18eb0
movq %rax, 0x78(%rsp)
jmp 0x17f07
movl 0x74(%rsp), %eax
movq 0x78(%rsp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x17fb4
movq 0x3a0(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x18dd0
movq %rax, 0x1b8(%rsp)
movq 0x3a0(%rsp), %rdi
callq 0x18e00
movq %rax, 0x1b0(%rsp)
movq 0x1b8(%rsp), %rdi
movq 0x1b0(%rsp), %rsi
leaq 0x37c(%rsp), %rdx
callq 0x19140
movq %rax, 0x68(%rsp)
jmp 0x17f6c
movq 0x68(%rsp), %rax
movq %rax, 0x1c0(%rsp)
leaq 0x1c8(%rsp), %rdi
leaq 0x1c0(%rsp), %rsi
callq 0x191a0
movq 0x60(%rsp), %rdi
movq 0x1c8(%rsp), %rsi
callq 0x190d0
movq %rax, 0x58(%rsp)
jmp 0x17fa7
movq 0x58(%rsp), %rax
movq %rax, 0x1a8(%rsp)
leaq 0x358(%rsp), %rdi
callq 0x18f10
jmp 0x17e48
jmp 0x181fe
leaq 0x380(%rsp), %rax
movq %rax, 0x1a0(%rsp)
movq 0x1a0(%rsp), %rdi
callq 0x18dd0
movq %rax, 0x198(%rsp)
movq 0x1a0(%rsp), %rdi
callq 0x18e00
movq %rax, 0x190(%rsp)
leaq 0x198(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x18e30
testb $0x1, %al
jne 0x18023
jmp 0x181fc
leaq 0x198(%rsp), %rdi
callq 0x18e70
movq %rax, 0x188(%rsp)
movq 0x188(%rsp), %rsi
leaq 0x2f0(%rsp), %rdi
callq 0x18eb0
movq %rax, 0x50(%rsp)
jmp 0x18054
movq 0x50(%rsp), %rax
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
movq 0x188(%rsp), %rsi
leaq 0x2f0(%rsp), %rdi
callq 0x18eb0
movq %rax, 0x48(%rsp)
jmp 0x1807b
movq 0x48(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x3c(%rsp)
movq 0x188(%rsp), %rsi
leaq 0x2f0(%rsp), %rdi
callq 0x18eb0
movq %rax, 0x40(%rsp)
jmp 0x180a2
movl 0x3c(%rsp), %eax
movq 0x40(%rsp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x181e8
movq 0x138(%rsp), %rdi
addq $0x10, %rdi
movq 0x188(%rsp), %rsi
callq 0x19320
movq %rax, 0x30(%rsp)
jmp 0x180d4
movq 0x138(%rsp), %rdi
movq 0x30(%rsp), %rax
movq %rax, 0x180(%rsp)
addq $0x10, %rdi
callq 0x19350
movq %rax, 0x178(%rsp)
leaq 0x180(%rsp), %rdi
leaq 0x178(%rsp), %rsi
callq 0x19300
testb $0x1, %al
jne 0x18115
jmp 0x1814d
movq 0x398(%rsp), %rdi
movq 0x188(%rsp), %rsi
callq 0x19380
movb %dl, 0x27(%rsp)
movq %rax, 0x28(%rsp)
jmp 0x18135
movb 0x27(%rsp), %al
movq 0x28(%rsp), %rcx
movq %rcx, 0x168(%rsp)
movb %al, 0x170(%rsp)
movq 0x3a0(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x18dd0
movq %rax, 0x150(%rsp)
movq 0x3a0(%rsp), %rdi
callq 0x18e00
movq %rax, 0x148(%rsp)
movq 0x188(%rsp), %rdx
movq 0x150(%rsp), %rdi
movq 0x148(%rsp), %rsi
callq 0x19140
movq %rax, 0x18(%rsp)
jmp 0x181a0
movq 0x18(%rsp), %rax
movq %rax, 0x158(%rsp)
leaq 0x160(%rsp), %rdi
leaq 0x158(%rsp), %rsi
callq 0x191a0
movq 0x10(%rsp), %rdi
movq 0x160(%rsp), %rsi
callq 0x190d0
movq %rax, 0x8(%rsp)
jmp 0x181db
movq 0x8(%rsp), %rax
movq %rax, 0x140(%rsp)
jmp 0x181ea
leaq 0x198(%rsp), %rdi
callq 0x18f10
jmp 0x18005
jmp 0x181fe
movb $0x1, 0x2bf(%rsp)
jmp 0x18208
movq 0x3a0(%rsp), %rdi
callq 0x18cf0
cmpq $0x0, %rax
ja 0x17681
leaq 0x2f0(%rsp), %rdi
callq 0x193d0
leaq 0x328(%rsp), %rdi
callq 0x18d30
leaq 0x380(%rsp), %rdi
callq 0x18d30
addq $0x3b8, %rsp            # imm = 0x3B8
retq
leaq 0x380(%rsp), %rdi
callq 0x18d30
movq 0x348(%rsp), %rdi
callq 0x3400
nopl (%rax,%rax)