// File: flastest[P]HeterogeneousParallelDijkstra/parallel_workloads.cc
// Function: test1(bool, int)
bool test1 (bool TEST_DEBUG, int num_threads)
{
	const int num_nodes = 5;
	enum nodes { A, B, C, D, E };
	//char name[] = "ABCDE";
	Edge edge_array[] = { 
			Edge(A, B), Edge(A, C), Edge(A, D), 
			Edge(B, A), Edge(B, D), Edge(B, E), 
			Edge(C, A), Edge(C, D), 
			Edge(D, A), Edge(D, B), Edge(D, C), Edge(D, E), 
			Edge(E, B), Edge(E, D)
	};
	int weights[] = { 
		12, 2, 10, 
		12, 3, 1, 
		2, 4,
		10, 3, 4, 5,
		1, 5
	};
	int num_arcs = sizeof(edge_array) / sizeof(Edge);

	//the graph
	graph_t g(edge_array, edge_array + num_arcs, weights, num_nodes);

	// Keeps track of the predecessor of each vertex
	predecessor_map_t p;
	

	// Keeps track of the distance to each vertex
	std::vector<int> d(num_vertices(g));



	// test1a, with source A.
	vertex_descriptor s = vertex(A, g);

	auto distances = dijkstra_algorithm(g, s, p, num_threads);

	std::vector<vertex_descriptor> p_BGL(num_nodes);

	vector<int> true_distances = testBGL ( g,  s, p_BGL);
//	vector<int> true_distances = {0,9,2,6,10};
	
	//this needs to iterate thru the vectors

	for (int i = 0; i < 5; i++)
	{
		if (distances[vertex(i, g)] != true_distances[i]){
			return false;
		}
	}
	if (TEST_DEBUG) cout << "test1a\n" << print_dijkstra_results(g,distances);

	//test1b with source B
	s = vertex(B, g);
	distances = dijkstra_algorithm(g, s, p, num_threads);

	true_distances = {9,0,7,3,1};
	for (int i = 0; i < 5; i++)
	{
		if (distances[vertex(i,g)] != true_distances[i]){
			return false;
		}
	}
	if (TEST_DEBUG) cout << "test1b\n" << print_dijkstra_results(g,distances);


	//test1c with source C
	s = vertex(C, g);
	distances = dijkstra_algorithm(g, s, p, num_threads);

	true_distances = {2,7,0,4,8};
	for (int i = 0; i < 5; i++)
	{
		if (distances[vertex(i,g)] != true_distances[i]){
			return false;
		}
	}
	if (TEST_DEBUG) cout << "test1c\n" << print_dijkstra_results(g,distances);



	//test1d with source D
	s = vertex(D, g);
	distances = dijkstra_algorithm(g, s, p, num_threads);

	true_distances = {6,3,4,0,4};
	for (int i = 0; i < 5; i++)
	{
		if (distances[vertex(i,g)] != true_distances[i]){
			return false;
		}
	}
	if (TEST_DEBUG) cout << "test1d\n" << print_dijkstra_results(g,distances);

	//test1e with source E
	s = vertex(E, g);
	distances = dijkstra_algorithm(g, s, p, num_threads);

	true_distances = {10,1,8,4,0};
	for (int i = 0; i < 5; i++)
	{
		if (distances[vertex(i,g)] != true_distances[i]){
			return false;
		}
	}
	if (TEST_DEBUG) cout << "test1e\n" << print_dijkstra_results(g,distances);



	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x7f0, %rsp            # imm = 0x7F0
movb %dil, %al
andb $0x1, %al
movb %al, -0x2(%rbp)
movl %esi, -0x8(%rbp)
movl $0x5, -0xc(%rbp)
movl $0x0, -0x84(%rbp)
movl $0x1, -0x88(%rbp)
leaq -0x80(%rbp), %rdi
movq %rdi, -0x6f0(%rbp)
leaq -0x84(%rbp), %rsi
leaq -0x88(%rbp), %rdx
callq 0x6320
leaq -0x78(%rbp), %rdi
movl $0x0, -0x8c(%rbp)
movl $0x2, -0x90(%rbp)
leaq -0x8c(%rbp), %rsi
leaq -0x90(%rbp), %rdx
callq 0x6320
leaq -0x70(%rbp), %rdi
movl $0x0, -0x94(%rbp)
movl $0x3, -0x98(%rbp)
leaq -0x94(%rbp), %rsi
leaq -0x98(%rbp), %rdx
callq 0x6320
leaq -0x68(%rbp), %rdi
movl $0x1, -0x9c(%rbp)
movl $0x0, -0xa0(%rbp)
leaq -0x9c(%rbp), %rsi
leaq -0xa0(%rbp), %rdx
callq 0x6320
leaq -0x60(%rbp), %rdi
movl $0x1, -0xa4(%rbp)
movl $0x3, -0xa8(%rbp)
leaq -0xa4(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
callq 0x6320
leaq -0x58(%rbp), %rdi
movl $0x1, -0xac(%rbp)
movl $0x4, -0xb0(%rbp)
leaq -0xac(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
callq 0x6320
leaq -0x50(%rbp), %rdi
movl $0x2, -0xb4(%rbp)
movl $0x0, -0xb8(%rbp)
leaq -0xb4(%rbp), %rsi
leaq -0xb8(%rbp), %rdx
callq 0x6320
leaq -0x48(%rbp), %rdi
movl $0x2, -0xbc(%rbp)
movl $0x3, -0xc0(%rbp)
leaq -0xbc(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
callq 0x6320
leaq -0x40(%rbp), %rdi
movl $0x3, -0xc4(%rbp)
movl $0x0, -0xc8(%rbp)
leaq -0xc4(%rbp), %rsi
leaq -0xc8(%rbp), %rdx
callq 0x6320
leaq -0x38(%rbp), %rdi
movl $0x3, -0xcc(%rbp)
movl $0x1, -0xd0(%rbp)
leaq -0xcc(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq 0x6320
leaq -0x30(%rbp), %rdi
movl $0x3, -0xd4(%rbp)
movl $0x2, -0xd8(%rbp)
leaq -0xd4(%rbp), %rsi
leaq -0xd8(%rbp), %rdx
callq 0x6320
leaq -0x28(%rbp), %rdi
movl $0x3, -0xdc(%rbp)
movl $0x4, -0xe0(%rbp)
leaq -0xdc(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
callq 0x6320
leaq -0x20(%rbp), %rdi
movl $0x4, -0xe4(%rbp)
movl $0x1, -0xe8(%rbp)
leaq -0xe4(%rbp), %rsi
leaq -0xe8(%rbp), %rdx
callq 0x6320
leaq -0x18(%rbp), %rdi
movl $0x4, -0xec(%rbp)
movl $0x3, -0xf0(%rbp)
leaq -0xec(%rbp), %rsi
leaq -0xf0(%rbp), %rdx
callq 0x6320
movq -0x6f0(%rbp), %rsi
movabsq $0x500000001, %rax      # imm = 0x500000001
movq %rax, -0x100(%rbp)
movaps 0x23153(%rip), %xmm0    # 0x28550
movaps %xmm0, -0x110(%rbp)
movaps 0x23135(%rip), %xmm0    # 0x28540
movaps %xmm0, -0x120(%rbp)
movaps 0x23117(%rip), %xmm0    # 0x28530
movaps %xmm0, -0x130(%rbp)
movl $0xe, -0x134(%rbp)
movslq -0x134(%rbp), %rax
leaq -0x80(%rbp,%rax,8), %rdx
movq %rsp, %rax
leaq -0x171(%rbp), %rcx
movq %rcx, (%rax)
xorl %eax, %eax
movl %eax, %r9d
leaq -0x170(%rbp), %rdi
movq %rdi, -0x6e8(%rbp)
leaq -0x130(%rbp), %rcx
movl $0x5, %r8d
callq 0xca90
leaq -0x1a8(%rbp), %rdi
callq 0xcb20
movq -0x6e8(%rbp), %rdi
callq 0xc720
movq %rax, -0x6e0(%rbp)
jmp 0x5489
leaq -0x1cd(%rbp), %rdi
movq %rdi, -0x6f8(%rbp)
callq 0xc760
movq -0x6e0(%rbp), %rsi
movq -0x6f8(%rbp), %rdx
leaq -0x1c0(%rbp), %rdi
callq 0xc780
jmp 0x54b8
leaq -0x1cd(%rbp), %rdi
callq 0xc7f0
xorl %eax, %eax
movl %eax, %edi
leaq -0x170(%rbp), %rsi
callq 0xcb40
movq %rax, -0x700(%rbp)
jmp 0x54dd
movq -0x700(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq 0x35e26(%rip), %rax     # 0x3b318
movl -0x8(%rbp), %r8d
leaq -0x208(%rbp), %rdi
leaq -0x170(%rbp), %rsi
leaq -0x1d8(%rbp), %rdx
leaq -0x1a8(%rbp), %rcx
callq *%rax
jmp 0x5516
leaq -0x221(%rbp), %rdi
movq %rdi, -0x708(%rbp)
callq 0xcb60
movq -0x708(%rbp), %rdx
leaq -0x220(%rbp), %rdi
movl $0x5, %esi
callq 0xcb80
jmp 0x5543
leaq -0x221(%rbp), %rdi
callq 0xcbf0
leaq -0x278(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0xcc10
jmp 0x5564
movq -0x1d8(%rbp), %rdx
leaq -0x240(%rbp), %rdi
leaq -0x278(%rbp), %rsi
leaq -0x220(%rbp), %rcx
callq 0x4fa0
jmp 0x5587
leaq -0x278(%rbp), %rdi
callq 0xcc90
movl $0x0, -0x27c(%rbp)
cmpl $0x5, -0x27c(%rbp)
jge 0x571c
movslq -0x27c(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0xcb40
movq %rax, -0x710(%rbp)
jmp 0x55c6
movq -0x710(%rbp), %rax
movq %rax, -0x288(%rbp)
leaq -0x208(%rbp), %rdi
leaq -0x288(%rbp), %rsi
callq 0xc610
movq %rax, -0x718(%rbp)
jmp 0x55f0
movq -0x718(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0x71c(%rbp)
movslq -0x27c(%rbp), %rsi
leaq -0x240(%rbp), %rdi
callq 0xccc0
movss -0x71c(%rbp), %xmm0
cvtsi2ssl (%rax), %xmm1
ucomiss %xmm1, %xmm0
jne 0x562e
jp 0x562e
jmp 0x5706
movb $0x0, -0x1(%rbp)
movl $0x1, -0x28c(%rbp)
jmp 0x6275
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x62fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x1cd(%rbp), %rdi
callq 0xc7f0
jmp 0x62fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x62ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x221(%rbp), %rdi
callq 0xcbf0
jmp 0x62e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x62d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x278(%rbp), %rdi
callq 0xcc90
jmp 0x62d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x62cb
jmp 0x5708
movl -0x27c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x27c(%rbp)
jmp 0x559d
testb $0x1, -0x2(%rbp)
je 0x5826
movq 0x3589b(%rip), %rdi     # 0x3afc8
leaq 0x2197c(%rip), %rsi     # 0x270b0
callq 0x4320
movq %rax, -0x728(%rbp)
jmp 0x5742
leaq -0x2e8(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0xcc10
jmp 0x5757
leaq -0x318(%rbp), %rdi
leaq -0x208(%rbp), %rsi
callq 0xcce0
jmp 0x576c
leaq -0x2b0(%rbp), %rdi
leaq -0x2e8(%rbp), %rsi
leaq -0x318(%rbp), %rdx
callq 0x4c60
jmp 0x5788
movq -0x728(%rbp), %rdi
leaq -0x2b0(%rbp), %rsi
callq 0x42e0
jmp 0x579d
leaq -0x2b0(%rbp), %rdi
callq 0x41d0
leaq -0x318(%rbp), %rdi
callq 0xcd10
leaq -0x2e8(%rbp), %rdi
callq 0xcc90
jmp 0x5826
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x5815
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x5809
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x2b0(%rbp), %rdi
callq 0x41d0
leaq -0x318(%rbp), %rdi
callq 0xcd10
leaq -0x2e8(%rbp), %rdi
callq 0xcc90
jmp 0x62cb
movl $0x1, %edi
leaq -0x170(%rbp), %rsi
callq 0xcb40
movq %rax, -0x730(%rbp)
jmp 0x5840
movq -0x730(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq 0x35ac3(%rip), %rax     # 0x3b318
movl -0x8(%rbp), %r8d
leaq -0x348(%rbp), %rdi
leaq -0x170(%rbp), %rsi
leaq -0x1d8(%rbp), %rdx
leaq -0x1a8(%rbp), %rcx
callq *%rax
jmp 0x5879
leaq -0x208(%rbp), %rdi
leaq -0x348(%rbp), %rsi
movq %rsi, -0x738(%rbp)
callq 0xcd30
movq -0x738(%rbp), %rdi
callq 0xcd10
movups 0x22cc2(%rip), %xmm0    # 0x28568
movaps %xmm0, -0x370(%rbp)
movl $0x1, -0x360(%rbp)
leaq -0x370(%rbp), %rax
movq %rax, -0x358(%rbp)
movq $0x5, -0x350(%rbp)
movq -0x358(%rbp), %rsi
movq -0x350(%rbp), %rdx
leaq -0x240(%rbp), %rdi
callq 0xcd60
jmp 0x58ec
movl $0x0, -0x374(%rbp)
cmpl $0x5, -0x374(%rbp)
jge 0x59ad
movslq -0x374(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0xcb40
movq %rax, -0x740(%rbp)
jmp 0x591f
movq -0x740(%rbp), %rax
movq %rax, -0x380(%rbp)
leaq -0x208(%rbp), %rdi
leaq -0x380(%rbp), %rsi
callq 0xc610
movq %rax, -0x748(%rbp)
jmp 0x5949
movq -0x748(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0x74c(%rbp)
movslq -0x374(%rbp), %rsi
leaq -0x240(%rbp), %rdi
callq 0xccc0
movss -0x74c(%rbp), %xmm0
cvtsi2ssl (%rax), %xmm1
ucomiss %xmm1, %xmm0
jne 0x5984
jp 0x5984
jmp 0x5997
movb $0x0, -0x1(%rbp)
movl $0x1, -0x28c(%rbp)
jmp 0x6275
jmp 0x5999
movl -0x374(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x374(%rbp)
jmp 0x58f6
testb $0x1, -0x2(%rbp)
je 0x5ab7
movq 0x3560a(%rip), %rdi     # 0x3afc8
leaq 0x216f3(%rip), %rsi     # 0x270b8
callq 0x4320
movq %rax, -0x758(%rbp)
jmp 0x59d3
leaq -0x3d8(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0xcc10
jmp 0x59e8
leaq -0x408(%rbp), %rdi
leaq -0x208(%rbp), %rsi
callq 0xcce0
jmp 0x59fd
leaq -0x3a0(%rbp), %rdi
leaq -0x3d8(%rbp), %rsi
leaq -0x408(%rbp), %rdx
callq 0x4c60
jmp 0x5a19
movq -0x758(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
callq 0x42e0
jmp 0x5a2e
leaq -0x3a0(%rbp), %rdi
callq 0x41d0
leaq -0x408(%rbp), %rdi
callq 0xcd10
leaq -0x3d8(%rbp), %rdi
callq 0xcc90
jmp 0x5ab7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x5aa6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x5a9a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x3a0(%rbp), %rdi
callq 0x41d0
leaq -0x408(%rbp), %rdi
callq 0xcd10
leaq -0x3d8(%rbp), %rdi
callq 0xcc90
jmp 0x62cb
movl $0x2, %edi
leaq -0x170(%rbp), %rsi
callq 0xcb40
movq %rax, -0x760(%rbp)
jmp 0x5ad1
movq -0x760(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq 0x35832(%rip), %rax     # 0x3b318
movl -0x8(%rbp), %r8d
leaq -0x438(%rbp), %rdi
leaq -0x170(%rbp), %rsi
leaq -0x1d8(%rbp), %rdx
leaq -0x1a8(%rbp), %rcx
callq *%rax
jmp 0x5b0a
leaq -0x208(%rbp), %rdi
leaq -0x438(%rbp), %rsi
movq %rsi, -0x768(%rbp)
callq 0xcd30
movq -0x768(%rbp), %rdi
callq 0xcd10
movups 0x22a45(%rip), %xmm0    # 0x2857c
movaps %xmm0, -0x460(%rbp)
movl $0x8, -0x450(%rbp)
leaq -0x460(%rbp), %rax
movq %rax, -0x448(%rbp)
movq $0x5, -0x440(%rbp)
movq -0x448(%rbp), %rsi
movq -0x440(%rbp), %rdx
leaq -0x240(%rbp), %rdi
callq 0xcd60
jmp 0x5b7d
movl $0x0, -0x464(%rbp)
cmpl $0x5, -0x464(%rbp)
jge 0x5c3e
movslq -0x464(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0xcb40
movq %rax, -0x770(%rbp)
jmp 0x5bb0
movq -0x770(%rbp), %rax
movq %rax, -0x470(%rbp)
leaq -0x208(%rbp), %rdi
leaq -0x470(%rbp), %rsi
callq 0xc610
movq %rax, -0x778(%rbp)
jmp 0x5bda
movq -0x778(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0x77c(%rbp)
movslq -0x464(%rbp), %rsi
leaq -0x240(%rbp), %rdi
callq 0xccc0
movss -0x77c(%rbp), %xmm0
cvtsi2ssl (%rax), %xmm1
ucomiss %xmm1, %xmm0
jne 0x5c15
jp 0x5c15
jmp 0x5c28
movb $0x0, -0x1(%rbp)
movl $0x1, -0x28c(%rbp)
jmp 0x6275
jmp 0x5c2a
movl -0x464(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x464(%rbp)
jmp 0x5b87
testb $0x1, -0x2(%rbp)
je 0x5d48
movq 0x35379(%rip), %rdi     # 0x3afc8
leaq 0x2146a(%rip), %rsi     # 0x270c0
callq 0x4320
movq %rax, -0x788(%rbp)
jmp 0x5c64
leaq -0x4c8(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0xcc10
jmp 0x5c79
leaq -0x4f8(%rbp), %rdi
leaq -0x208(%rbp), %rsi
callq 0xcce0
jmp 0x5c8e
leaq -0x490(%rbp), %rdi
leaq -0x4c8(%rbp), %rsi
leaq -0x4f8(%rbp), %rdx
callq 0x4c60
jmp 0x5caa
movq -0x788(%rbp), %rdi
leaq -0x490(%rbp), %rsi
callq 0x42e0
jmp 0x5cbf
leaq -0x490(%rbp), %rdi
callq 0x41d0
leaq -0x4f8(%rbp), %rdi
callq 0xcd10
leaq -0x4c8(%rbp), %rdi
callq 0xcc90
jmp 0x5d48
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x5d37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x5d2b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x490(%rbp), %rdi
callq 0x41d0
leaq -0x4f8(%rbp), %rdi
callq 0xcd10
leaq -0x4c8(%rbp), %rdi
callq 0xcc90
jmp 0x62cb
movl $0x3, %edi
leaq -0x170(%rbp), %rsi
callq 0xcb40
movq %rax, -0x790(%rbp)
jmp 0x5d62
movq -0x790(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq 0x355a1(%rip), %rax     # 0x3b318
movl -0x8(%rbp), %r8d
leaq -0x528(%rbp), %rdi
leaq -0x170(%rbp), %rsi
leaq -0x1d8(%rbp), %rdx
leaq -0x1a8(%rbp), %rcx
callq *%rax
jmp 0x5d9b
leaq -0x208(%rbp), %rdi
leaq -0x528(%rbp), %rsi
movq %rsi, -0x798(%rbp)
callq 0xcd30
movq -0x798(%rbp), %rdi
callq 0xcd10
movups 0x227c8(%rip), %xmm0    # 0x28590
movaps %xmm0, -0x550(%rbp)
movl $0x4, -0x540(%rbp)
leaq -0x550(%rbp), %rax
movq %rax, -0x538(%rbp)
movq $0x5, -0x530(%rbp)
movq -0x538(%rbp), %rsi
movq -0x530(%rbp), %rdx
leaq -0x240(%rbp), %rdi
callq 0xcd60
jmp 0x5e0e
movl $0x0, -0x554(%rbp)
cmpl $0x5, -0x554(%rbp)
jge 0x5ecf
movslq -0x554(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0xcb40
movq %rax, -0x7a0(%rbp)
jmp 0x5e41
movq -0x7a0(%rbp), %rax
movq %rax, -0x560(%rbp)
leaq -0x208(%rbp), %rdi
leaq -0x560(%rbp), %rsi
callq 0xc610
movq %rax, -0x7a8(%rbp)
jmp 0x5e6b
movq -0x7a8(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0x7ac(%rbp)
movslq -0x554(%rbp), %rsi
leaq -0x240(%rbp), %rdi
callq 0xccc0
movss -0x7ac(%rbp), %xmm0
cvtsi2ssl (%rax), %xmm1
ucomiss %xmm1, %xmm0
jne 0x5ea6
jp 0x5ea6
jmp 0x5eb9
movb $0x0, -0x1(%rbp)
movl $0x1, -0x28c(%rbp)
jmp 0x6275
jmp 0x5ebb
movl -0x554(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x554(%rbp)
jmp 0x5e18
testb $0x1, -0x2(%rbp)
je 0x5fd9
movq 0x350e8(%rip), %rdi     # 0x3afc8
leaq 0x211e1(%rip), %rsi     # 0x270c8
callq 0x4320
movq %rax, -0x7b8(%rbp)
jmp 0x5ef5
leaq -0x5b8(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0xcc10
jmp 0x5f0a
leaq -0x5e8(%rbp), %rdi
leaq -0x208(%rbp), %rsi
callq 0xcce0
jmp 0x5f1f
leaq -0x580(%rbp), %rdi
leaq -0x5b8(%rbp), %rsi
leaq -0x5e8(%rbp), %rdx
callq 0x4c60
jmp 0x5f3b
movq -0x7b8(%rbp), %rdi
leaq -0x580(%rbp), %rsi
callq 0x42e0
jmp 0x5f50
leaq -0x580(%rbp), %rdi
callq 0x41d0
leaq -0x5e8(%rbp), %rdi
callq 0xcd10
leaq -0x5b8(%rbp), %rdi
callq 0xcc90
jmp 0x5fd9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x5fc8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x5fbc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x580(%rbp), %rdi
callq 0x41d0
leaq -0x5e8(%rbp), %rdi
callq 0xcd10
leaq -0x5b8(%rbp), %rdi
callq 0xcc90
jmp 0x62cb
movl $0x4, %edi
leaq -0x170(%rbp), %rsi
callq 0xcb40
movq %rax, -0x7c0(%rbp)
jmp 0x5ff3
movq -0x7c0(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq 0x35310(%rip), %rax     # 0x3b318
movl -0x8(%rbp), %r8d
leaq -0x618(%rbp), %rdi
leaq -0x170(%rbp), %rsi
leaq -0x1d8(%rbp), %rdx
leaq -0x1a8(%rbp), %rcx
callq *%rax
jmp 0x602c
leaq -0x208(%rbp), %rdi
leaq -0x618(%rbp), %rsi
movq %rsi, -0x7c8(%rbp)
callq 0xcd30
movq -0x7c8(%rbp), %rdi
callq 0xcd10
movups 0x2254b(%rip), %xmm0    # 0x285a4
movaps %xmm0, -0x640(%rbp)
movl $0x0, -0x630(%rbp)
leaq -0x640(%rbp), %rax
movq %rax, -0x628(%rbp)
movq $0x5, -0x620(%rbp)
movq -0x628(%rbp), %rsi
movq -0x620(%rbp), %rdx
leaq -0x240(%rbp), %rdi
callq 0xcd60
jmp 0x609f
movl $0x0, -0x644(%rbp)
cmpl $0x5, -0x644(%rbp)
jge 0x6160
movslq -0x644(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0xcb40
movq %rax, -0x7d0(%rbp)
jmp 0x60d2
movq -0x7d0(%rbp), %rax
movq %rax, -0x650(%rbp)
leaq -0x208(%rbp), %rdi
leaq -0x650(%rbp), %rsi
callq 0xc610
movq %rax, -0x7d8(%rbp)
jmp 0x60fc
movq -0x7d8(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0x7dc(%rbp)
movslq -0x644(%rbp), %rsi
leaq -0x240(%rbp), %rdi
callq 0xccc0
movss -0x7dc(%rbp), %xmm0
cvtsi2ssl (%rax), %xmm1
ucomiss %xmm1, %xmm0
jne 0x6137
jp 0x6137
jmp 0x614a
movb $0x0, -0x1(%rbp)
movl $0x1, -0x28c(%rbp)
jmp 0x6275
jmp 0x614c
movl -0x644(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x644(%rbp)
jmp 0x60a9
testb $0x1, -0x2(%rbp)
je 0x6267
movq 0x34e57(%rip), %rdi     # 0x3afc8
leaq 0x20f58(%rip), %rsi     # 0x270d0
callq 0x4320
movq %rax, -0x7e8(%rbp)
jmp 0x6186
leaq -0x6a8(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0xcc10
jmp 0x619b
leaq -0x6d8(%rbp), %rdi
leaq -0x208(%rbp), %rsi
callq 0xcce0
jmp 0x61b0
leaq -0x670(%rbp), %rdi
leaq -0x6a8(%rbp), %rsi
leaq -0x6d8(%rbp), %rdx
callq 0x4c60
jmp 0x61cc
movq -0x7e8(%rbp), %rdi
leaq -0x670(%rbp), %rsi
callq 0x42e0
jmp 0x61e1
leaq -0x670(%rbp), %rdi
callq 0x41d0
leaq -0x6d8(%rbp), %rdi
callq 0xcd10
leaq -0x6a8(%rbp), %rdi
callq 0xcc90
jmp 0x6267
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x6259
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x624d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x670(%rbp), %rdi
callq 0x41d0
leaq -0x6d8(%rbp), %rdi
callq 0xcd10
leaq -0x6a8(%rbp), %rdi
callq 0xcc90
jmp 0x62cb
movb $0x1, -0x1(%rbp)
movl $0x1, -0x28c(%rbp)
leaq -0x240(%rbp), %rdi
callq 0xca30
leaq -0x220(%rbp), %rdi
callq 0xcdb0
leaq -0x208(%rbp), %rdi
callq 0xcd10
leaq -0x1c0(%rbp), %rdi
callq 0xca30
leaq -0x1a8(%rbp), %rdi
callq 0xce10
leaq -0x170(%rbp), %rdi
callq 0xcc90
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x7f0, %rsp            # imm = 0x7F0
popq %rbp
retq
leaq -0x240(%rbp), %rdi
callq 0xca30
leaq -0x220(%rbp), %rdi
callq 0xcdb0
leaq -0x208(%rbp), %rdi
callq 0xcd10
leaq -0x1c0(%rbp), %rdi
callq 0xca30
leaq -0x1a8(%rbp), %rdi
callq 0xce10
leaq -0x170(%rbp), %rdi
callq 0xcc90
movq -0x1c8(%rbp), %rdi
callq 0x4580
nop