// File: /workspace/github_cpp_makefile_star2_O2/flastest[P]HeterogeneousParallelDijkstra/workloads.cc
// Function: test1(bool)
bool test1 (bool TEST_DEBUG)
{
	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);


	std::vector<vertex_descriptor> p_BGL(num_nodes);

	vector<int> true_distances = testBGL ( g,  s, p_BGL);
	
	//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);

	true_distances = testBGL ( g,  s, p_BGL);;
	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);

	true_distances = testBGL ( g,  s, p_BGL);;
	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);

	true_distances = testBGL ( g,  s, p_BGL);;
	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);

	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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x4c0, %rsp            # imm = 0x4C0
movl %edi, %ebx
movaps 0xa73a(%rip), %xmm0     # 0xe010
leaq 0x4c0(%rsp), %rdx
movaps %xmm0, -0x70(%rdx)
movaps 0xa737(%rip), %xmm0     # 0xe020
movaps %xmm0, -0x60(%rdx)
movaps 0xa73c(%rip), %xmm0     # 0xe030
movaps %xmm0, -0x50(%rdx)
movaps 0xa741(%rip), %xmm0     # 0xe040
movaps %xmm0, -0x40(%rdx)
movaps 0xa746(%rip), %xmm0     # 0xe050
movaps %xmm0, -0x30(%rdx)
movaps 0xa74b(%rip), %xmm0     # 0xe060
movaps %xmm0, -0x20(%rdx)
movaps 0xa750(%rip), %xmm0     # 0xe070
movaps %xmm0, -0x10(%rdx)
movaps 0xbc25(%rip), %xmm0     # 0xf550
leaq 0x410(%rsp), %rcx
movaps %xmm0, 0x20(%rcx)
movaps 0xbc02(%rip), %xmm0     # 0xf540
movaps %xmm0, 0x10(%rcx)
movaps 0xbbe7(%rip), %xmm0     # 0xf530
movaps %xmm0, (%rcx)
movabsq $0x500000001, %rax      # imm = 0x500000001
movq %rax, 0x30(%rcx)
leaq 0xe0(%rsp), %rax
movq %rax, (%rsp)
leaq 0x90(%rsp), %r14
leaq 0x450(%rsp), %rsi
pushq $0x5
popq %r8
movq %r14, %rdi
xorl %r9d, %r9d
callq 0x6b18
leaq 0xe8(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
movq 0x20(%r14), %rsi
subq 0x18(%r14), %rsi
sarq $0x5, %rsi
leaq 0x110(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x6aba
leaq 0x8(%rsp), %rdx
andq $0x0, (%rdx)
leaq 0x60(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0xe0(%rsp), %rcx
callq *0x1386c(%rip)          # 0x17250
leaq 0xc8(%rsp), %rdi
pushq $0x5
popq %rsi
leaq 0x10(%rsp), %rdx
callq 0x6b5a
leaq 0x3d8(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x6bac
movq 0x8(%rsp), %rdx
leaq 0x48(%rsp), %rdi
leaq 0x3d8(%rsp), %rsi
leaq 0xc8(%rsp), %rcx
callq 0x3849
leaq 0x3d8(%rsp), %rdi
callq 0x6bf0
xorl %r12d, %r12d
leaq 0x60(%rsp), %r14
leaq 0x10(%rsp), %r15
cmpq $0x5, %r12
je 0x3a7f
movq %r12, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x6a6a
movq 0x48(%rsp), %rcx
cvtsi2ssl (%rcx,%r12,4), %xmm0
movss (%rax), %xmm1
incq %r12
ucomiss %xmm0, %xmm1
jne 0x3ff8
jnp 0x3a47
jmp 0x3ff8
testb %bl, %bl
je 0x3b0f
movq 0x1353a(%rip), %rdi     # 0x16fc8
leaq 0xa6a1(%rip), %rsi      # 0xe136
callq 0x3270
movq %rax, %r14
leaq 0x3a0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x6bac
leaq 0x1e8(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x6e78
leaq 0x10(%rsp), %rdi
leaq 0x3a0(%rsp), %rsi
leaq 0x1e8(%rsp), %rdx
callq 0x366c
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x3250
leaq 0x10(%rsp), %rdi
callq 0x3110
leaq 0x1e8(%rsp), %rdi
callq 0x70ae
leaq 0x3a0(%rsp), %rdi
callq 0x6bf0
leaq 0x8(%rsp), %rdx
movq $0x1, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0xe0(%rsp), %rcx
callq *0x1371a(%rip)          # 0x17250
leaq 0x60(%rsp), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0x70c2
movq %r14, %rdi
callq 0x70ae
leaq 0x368(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x6bac
movq 0x8(%rsp), %rdx
leaq 0x10(%rsp), %rdi
leaq 0x368(%rsp), %rsi
leaq 0xc8(%rsp), %rcx
callq 0x3849
leaq 0x48(%rsp), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0x9320
movq %r14, %rdi
callq 0x74ca
leaq 0x368(%rsp), %rdi
callq 0x6bf0
xorl %r12d, %r12d
leaq 0x60(%rsp), %r15
cmpq $0x5, %r12
je 0x3beb
movq %r12, 0x10(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x6a6a
movq 0x48(%rsp), %rcx
cvtsi2ssl (%rcx,%r12,4), %xmm0
movss (%rax), %xmm1
incq %r12
ucomiss %xmm0, %xmm1
jne 0x3ff8
jnp 0x3bb3
jmp 0x3ff8
testb %bl, %bl
je 0x3c7b
movq 0x133ce(%rip), %rdi     # 0x16fc8
leaq 0xa53d(%rip), %rsi      # 0xe13e
callq 0x3270
movq %rax, %r14
leaq 0x330(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x6bac
leaq 0x1b8(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x6e78
leaq 0x10(%rsp), %rdi
leaq 0x330(%rsp), %rsi
leaq 0x1b8(%rsp), %rdx
callq 0x366c
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x3250
leaq 0x10(%rsp), %rdi
callq 0x3110
leaq 0x1b8(%rsp), %rdi
callq 0x70ae
leaq 0x330(%rsp), %rdi
callq 0x6bf0
leaq 0x8(%rsp), %rdx
movq $0x2, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0xe0(%rsp), %rcx
callq *0x135ae(%rip)          # 0x17250
leaq 0x60(%rsp), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0x70c2
movq %r14, %rdi
callq 0x70ae
leaq 0x2f8(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x6bac
movq 0x8(%rsp), %rdx
leaq 0x10(%rsp), %rdi
leaq 0x2f8(%rsp), %rsi
leaq 0xc8(%rsp), %rcx
callq 0x3849
leaq 0x48(%rsp), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0x9320
movq %r14, %rdi
callq 0x74ca
leaq 0x2f8(%rsp), %rdi
callq 0x6bf0
xorl %r12d, %r12d
leaq 0x60(%rsp), %r15
cmpq $0x5, %r12
je 0x3d57
movq %r12, 0x10(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x6a6a
movq 0x48(%rsp), %rcx
cvtsi2ssl (%rcx,%r12,4), %xmm0
movss (%rax), %xmm1
incq %r12
ucomiss %xmm0, %xmm1
jne 0x3ff8
jnp 0x3d1f
jmp 0x3ff8
testb %bl, %bl
je 0x3de7
movq 0x13262(%rip), %rdi     # 0x16fc8
leaq 0xa3d9(%rip), %rsi      # 0xe146
callq 0x3270
movq %rax, %r14
leaq 0x2c0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x6bac
leaq 0x188(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x6e78
leaq 0x10(%rsp), %rdi
leaq 0x2c0(%rsp), %rsi
leaq 0x188(%rsp), %rdx
callq 0x366c
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x3250
leaq 0x10(%rsp), %rdi
callq 0x3110
leaq 0x188(%rsp), %rdi
callq 0x70ae
leaq 0x2c0(%rsp), %rdi
callq 0x6bf0
leaq 0x8(%rsp), %rdx
movq $0x3, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0xe0(%rsp), %rcx
callq *0x13442(%rip)          # 0x17250
leaq 0x60(%rsp), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0x70c2
movq %r14, %rdi
callq 0x70ae
leaq 0x288(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x6bac
movq 0x8(%rsp), %rdx
leaq 0x10(%rsp), %rdi
leaq 0x288(%rsp), %rsi
leaq 0xc8(%rsp), %rcx
callq 0x3849
leaq 0x48(%rsp), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0x9320
movq %r14, %rdi
callq 0x74ca
leaq 0x288(%rsp), %rdi
callq 0x6bf0
xorl %r12d, %r12d
leaq 0x60(%rsp), %r15
cmpq $0x5, %r12
je 0x3ec3
movq %r12, 0x10(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x6a6a
movq 0x48(%rsp), %rcx
cvtsi2ssl (%rcx,%r12,4), %xmm0
movss (%rax), %xmm1
incq %r12
ucomiss %xmm0, %xmm1
jne 0x3ff8
jnp 0x3e8b
jmp 0x3ff8
testb %bl, %bl
je 0x3f53
movq 0x130f6(%rip), %rdi     # 0x16fc8
leaq 0xa275(%rip), %rsi      # 0xe14e
callq 0x3270
movq %rax, %r14
leaq 0x250(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x6bac
leaq 0x158(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x6e78
leaq 0x10(%rsp), %rdi
leaq 0x250(%rsp), %rsi
leaq 0x158(%rsp), %rdx
callq 0x366c
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x3250
leaq 0x10(%rsp), %rdi
callq 0x3110
leaq 0x158(%rsp), %rdi
callq 0x70ae
leaq 0x250(%rsp), %rdi
callq 0x6bf0
leaq 0x8(%rsp), %rdx
movq $0x4, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0xe0(%rsp), %rcx
callq *0x132d6(%rip)          # 0x17250
leaq 0x60(%rsp), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0x70c2
movq %r14, %rdi
callq 0x70ae
movups 0xb6a9(%rip), %xmm0     # 0xf644
movaps %xmm0, (%r14)
andl $0x0, 0x10(%r14)
leaq 0x24(%rsp), %rdx
leaq 0x48(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x9372
xorl %r12d, %r12d
leaq 0x60(%rsp), %r14
leaq 0x10(%rsp), %r15
cmpq $0x5, %r12
je 0x4054
movq %r12, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x6a6a
movq 0x48(%rsp), %rcx
cvtsi2ssl (%rcx,%r12,4), %xmm0
movss (%rax), %xmm1
incq %r12
ucomiss %xmm0, %xmm1
jne 0x3ff8
jnp 0x3fc5
xorl %ebp, %ebp
leaq 0x48(%rsp), %rdi
callq 0x74ca
leaq 0xc8(%rsp), %rdi
callq 0x7e16
leaq 0x60(%rsp), %rdi
callq 0x70ae
leaq 0x110(%rsp), %rdi
callq 0x74ca
leaq 0xe0(%rsp), %rdi
callq 0x7172
leaq 0x90(%rsp), %rdi
callq 0x6bf0
movl %ebp, %eax
addq $0x4c0, %rsp            # imm = 0x4C0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %bpl
testb %bl, %bl
je 0x3ffa
movq 0x12f66(%rip), %rdi     # 0x16fc8
leaq 0xa0ed(%rip), %rsi      # 0xe156
callq 0x3270
movq %rax, %rbx
leaq 0x218(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x6bac
leaq 0x128(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x6e78
leaq 0x10(%rsp), %rdi
leaq 0x218(%rsp), %rsi
leaq 0x128(%rsp), %rdx
callq 0x366c
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3250
leaq 0x10(%rsp), %rdi
callq 0x3110
leaq 0x128(%rsp), %rdi
callq 0x70ae
leaq 0x218(%rsp), %rdi
callq 0x6bf0
jmp 0x3ffa
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3110
jmp 0x40fa
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
callq 0x70ae
jmp 0x410c
movq %rax, %rbx
leaq 0x218(%rsp), %rdi
jmp 0x422c
jmp 0x4265
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3110
jmp 0x4130
movq %rax, %rbx
leaq 0x158(%rsp), %rdi
callq 0x70ae
jmp 0x4142
movq %rax, %rbx
leaq 0x250(%rsp), %rdi
jmp 0x422c
jmp 0x4265
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3110
jmp 0x4166
movq %rax, %rbx
leaq 0x188(%rsp), %rdi
callq 0x70ae
jmp 0x4178
movq %rax, %rbx
leaq 0x2c0(%rsp), %rdi
jmp 0x422c
jmp 0x4265
jmp 0x4265
jmp 0x4265
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3110
jmp 0x41a6
movq %rax, %rbx
leaq 0x1b8(%rsp), %rdi
callq 0x70ae
jmp 0x41b8
movq %rax, %rbx
leaq 0x330(%rsp), %rdi
jmp 0x422c
jmp 0x4265
movq %rax, %rbx
leaq 0x288(%rsp), %rdi
jmp 0x422c
jmp 0x4265
jmp 0x4265
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3110
jmp 0x41f0
movq %rax, %rbx
leaq 0x1e8(%rsp), %rdi
callq 0x70ae
jmp 0x4202
movq %rax, %rbx
leaq 0x3a0(%rsp), %rdi
jmp 0x422c
jmp 0x4265
movq %rax, %rbx
leaq 0x2f8(%rsp), %rdi
jmp 0x422c
jmp 0x4265
jmp 0x4265
jmp 0x4265
movq %rax, %rbx
leaq 0x368(%rsp), %rdi
callq 0x6bf0
jmp 0x4268
jmp 0x4265
jmp 0x4265
movq %rax, %rbx
leaq 0x3d8(%rsp), %rdi
callq 0x6bf0
jmp 0x4272
movq %rax, %rbx
jmp 0x4272
movq %rax, %rbx
jmp 0x427f
movq %rax, %rbx
jmp 0x4289
movq %rax, %rbx
jmp 0x4296
jmp 0x4265
jmp 0x4265
jmp 0x4265
jmp 0x4265
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x74ca
leaq 0xc8(%rsp), %rdi
callq 0x7e16
leaq 0x60(%rsp), %rdi
callq 0x70ae
leaq 0x110(%rsp), %rdi
callq 0x74ca
leaq 0xe0(%rsp), %rdi
callq 0x7172
leaq 0x90(%rsp), %rdi
callq 0x6bf0
movq %rbx, %rdi
callq 0x3420