// File: /workspace/github_cpp_makefile_star2_O1/flastest[P]HeterogeneousParallelDijkstra/workloads.cc
// Function: test6(bool)
bool test6(bool TEST_DEBUG)
{
	const int num_nodes = 3;
	enum nodes { A, B, C};
	Edge edge_array[] = { 
			Edge(A, B), 
			Edge(B, C),
			Edge(C, B)
	};
	int weights[] = { 
		2, 3, 2
	};
	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));



	// test6a, with source A.
	vertex_descriptor s = vertex(A, g);

	auto distances = dijkstra_algorithm(g, s, p);

	vector<float> true_distances = { 0, 2, 5};
	if (TEST_DEBUG) cout << "test6a\n" << print_dijkstra_results(g,distances);
	for (int i = 0; i < num_nodes; i++)
	{
		if (distances[vertex(i,g)] != true_distances[i]){
			return false;
		}
	}

	// test6b, with source B.
	s = vertex(B, g);

	distances = dijkstra_algorithm(g, s, p);

	true_distances = {INFINITY, 0, 3};
	if (TEST_DEBUG) cout << "test6b\n" << print_dijkstra_results(g,distances);
	for (int i = 0; i < num_nodes; i++)
	{
		if (distances[vertex(i,g)] != true_distances[i]){
			return false;
		}
	}


	// test6c, with source C.
	s = vertex(C, g);

	distances = dijkstra_algorithm(g, s, p);

	true_distances = {INFINITY, 2, 0};
	if (TEST_DEBUG) cout << "test6c\n" << print_dijkstra_results(g,distances);
	for (int i = 0; i < num_nodes; i++)
	{
		if (distances[vertex(i,g)] != true_distances[i]){
			return false;
		}
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movl %edi, %ebp
movaps 0x9943(%rip), %xmm0     # 0x110c0
leaq 0x1d8(%rsp), %rdx
movaps %xmm0, -0x18(%rdx)
movabsq $0x100000002, %rax      # imm = 0x100000002
movq %rax, -0x8(%rdx)
movabsq $0x300000002, %rax      # imm = 0x300000002
leaq 0x268(%rsp), %rcx
movq %rax, (%rcx)
movl $0x2, 0x8(%rcx)
leaq 0xe8(%rsp), %rax
movq %rax, (%rsp)
xorl %r14d, %r14d
leaq 0xb0(%rsp), %rbx
leaq 0x1c0(%rsp), %rsi
movl $0x3, %r8d
movq %rbx, %rdi
xorl %r9d, %r9d
callq 0x8758
leaq 0xf0(%rsp), %rax
movl $0x0, (%rax)
movq %r14, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %r14, 0x20(%rax)
movq 0x20(%rbx), %rsi
subq 0x18(%rbx), %rsi
sarq $0x5, %rsi
leaq 0x98(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x86ce
leaq 0x60(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x68(%rsp), %rdi
leaq 0xb0(%rsp), %rbx
leaq 0xe8(%rsp), %rcx
movq %rbx, %rsi
callq *0x109ef(%rip)          # 0x18238
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
movl $0x40a00000, 0x8(%rsi)  # imm = 0x40A00000
leaq 0x48(%rsp), %rdi
leaq 0x17(%rsp), %rcx
movl $0x3, %edx
callq 0x894e
testb %bpl, %bpl
je 0x795e
movq 0x1074a(%rip), %rdi     # 0x17fd0
leaq 0x98fd(%rip), %rsi      # 0x1118a
movl $0x7, %edx
callq 0x32a0
leaq 0x188(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x8826
leaq 0x238(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x8ace
leaq 0x18(%rsp), %rdi
leaq 0x188(%rsp), %r14
leaq 0x238(%rsp), %rdx
movq %r14, %rsi
callq 0x36ec
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x106e4(%rip), %rdi     # 0x17fd0
callq 0x32a0
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x790c
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3250
leaq 0x238(%rsp), %rdi
callq 0x8ca2
movq 0x1b8(%rsp), %rdi
testq %rdi, %rdi
je 0x7930
movl $0x1, %esi
callq 0x3250
leaq 0x1a0(%rsp), %r15
movq %r15, %rdi
callq 0x8a42
movq -0x18(%r15), %rdi
cmpq %r14, %rdi
je 0x795e
movq (%rdi), %r15
movl $0x28, %esi
callq 0x3250
movq %r15, %rdi
cmpq %r14, %r15
jne 0x7949
leaq 0xc8(%rsp), %r14
xorl %r13d, %r13d
leaq 0x68(%rsp), %r15
leaq 0x18(%rsp), %r12
movq %r13, 0x18(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x8668
movss (%rax), %xmm0
movq 0x48(%rsp), %rax
ucomiss (%rax,%r13,4), %xmm0
jne 0x7d4b
jp 0x7d4b
incq %r13
cmpq $0x3, %r13
jne 0x7973
leaq 0x60(%rsp), %rdx
movq $0x1, (%rdx)
leaq 0x18(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0xe8(%rsp), %rcx
callq *0x1086b(%rip)          # 0x18238
leaq 0x68(%rsp), %rdi
callq 0x8cb6
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x7a19
leaq 0x70(%rsp), %rcx
leaq 0x20(%rsp), %rdx
movl (%rdx), %esi
movl %esi, (%rcx)
movq %rax, 0x8(%rcx)
movups 0x10(%rdx), %xmm0
movups %xmm0, 0x10(%rcx)
movq %rcx, 0x8(%rax)
movq 0x20(%rdx), %rax
movq %rax, 0x20(%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rdx)
movq %rdx, 0x10(%rdx)
movq %rdx, 0x18(%rdx)
movq %rax, 0x20(%rdx)
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x8ca2
movq $0x7f800000, (%r15)     # imm = 0x7F800000
movl $0x40400000, 0x8(%r15)  # imm = 0x40400000
leaq 0x24(%rsp), %rdx
leaq 0x48(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0xaca2
testb %bpl, %bpl
je 0x7b32
movq 0x10577(%rip), %rdi     # 0x17fd0
leaq 0x9732(%rip), %rsi      # 0x11192
movl $0x7, %edx
callq 0x32a0
leaq 0x150(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x8826
leaq 0x208(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x8ace
leaq 0x18(%rsp), %rdi
leaq 0x150(%rsp), %r15
leaq 0x208(%rsp), %rdx
movq %r15, %rsi
callq 0x36ec
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x10511(%rip), %rdi     # 0x17fd0
callq 0x32a0
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7adf
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3250
leaq 0x208(%rsp), %rdi
callq 0x8ca2
movq 0x180(%rsp), %rdi
testq %rdi, %rdi
je 0x7b03
movl $0x1, %esi
callq 0x3250
leaq 0x168(%rsp), %r12
movq %r12, %rdi
callq 0x8a42
movq -0x18(%r12), %rdi
cmpq %r15, %rdi
je 0x7b32
movq (%rdi), %r12
movl $0x28, %esi
callq 0x3250
movq %r12, %rdi
cmpq %r15, %r12
jne 0x7b1d
xorl %r13d, %r13d
leaq 0x68(%rsp), %r15
leaq 0x18(%rsp), %r12
movq %r13, 0x18(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x8668
movss (%rax), %xmm0
movq 0x48(%rsp), %rax
ucomiss (%rax,%r13,4), %xmm0
jne 0x7d4b
jp 0x7d4b
incq %r13
cmpq $0x3, %r13
jne 0x7b3f
leaq 0x60(%rsp), %rdx
movq $0x2, (%rdx)
leaq 0x18(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0xe8(%rsp), %rcx
callq *0x1069f(%rip)          # 0x18238
leaq 0x68(%rsp), %rdi
callq 0x8cb6
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x7be5
leaq 0x70(%rsp), %rcx
leaq 0x20(%rsp), %rdx
movl (%rdx), %esi
movl %esi, (%rcx)
movq %rax, 0x8(%rcx)
movups 0x10(%rdx), %xmm0
movups %xmm0, 0x10(%rcx)
movq %rcx, 0x8(%rax)
movq 0x20(%rdx), %rax
movq %rax, 0x20(%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rdx)
movq %rdx, 0x10(%rdx)
movq %rdx, 0x18(%rdx)
movq %rax, 0x20(%rdx)
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x8ca2
movabsq $0x400000007f800000, %rax # imm = 0x400000007F800000
movq %rax, (%r15)
movl $0x0, 0x8(%r15)
leaq 0x24(%rsp), %rdx
leaq 0x48(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0xaca2
testb %bpl, %bpl
je 0x7d04
movq 0x103a5(%rip), %rdi     # 0x17fd0
leaq 0x9568(%rip), %rsi      # 0x1119a
movl $0x7, %edx
callq 0x32a0
leaq 0x118(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x8826
leaq 0x1d8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x8ace
leaq 0x18(%rsp), %rdi
leaq 0x118(%rsp), %r15
leaq 0x1d8(%rsp), %rdx
movq %r15, %rsi
callq 0x36ec
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x1033f(%rip), %rdi     # 0x17fd0
callq 0x32a0
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7cb1
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3250
leaq 0x1d8(%rsp), %rdi
callq 0x8ca2
movq 0x148(%rsp), %rdi
testq %rdi, %rdi
je 0x7cd5
movl $0x1, %esi
callq 0x3250
leaq 0x130(%rsp), %r12
movq %r12, %rdi
callq 0x8a42
movq -0x18(%r12), %rdi
cmpq %r15, %rdi
je 0x7d04
movq (%rdi), %r12
movl $0x28, %esi
callq 0x3250
movq %r12, %rdi
cmpq %r15, %r12
jne 0x7cef
xorl %ebp, %ebp
leaq 0x68(%rsp), %r12
leaq 0x18(%rsp), %r13
xorl %r15d, %r15d
movq %rbp, 0x18(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x8668
movss (%rax), %xmm0
movq 0x48(%rsp), %rax
ucomiss (%rax,%rbp,4), %xmm0
jne 0x7d4e
jp 0x7d4e
cmpq $0x2, %rbp
leaq 0x1(%rbp), %rax
setae %r15b
movq %rax, %rbp
cmpq $0x3, %rax
jne 0x7d13
jmp 0x7d4e
xorl %r15d, %r15d
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x7d65
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x3250
leaq 0x68(%rsp), %rdi
callq 0x8ca2
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x7d8c
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x3250
leaq 0xe8(%rsp), %rdi
callq 0x8ce4
movq 0xe0(%rsp), %rdi
testq %rdi, %rdi
je 0x7db0
movl $0x1, %esi
callq 0x3250
movq %r14, %rdi
callq 0x8a42
movq 0xb0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x7dda
movq (%rdi), %r14
movl $0x28, %esi
callq 0x3250
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x7dc5
andb $0x1, %r15b
movl %r15d, %eax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7e16
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3250
jmp 0x7e16
movq %rax, %rbx
leaq 0x1d8(%rsp), %rdi
callq 0x8ca2
jmp 0x7e28
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
jmp 0x7ec6
jmp 0x7ee4
jmp 0x7ee4
jmp 0x7ee4
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7e67
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3250
jmp 0x7e67
movq %rax, %rbx
leaq 0x208(%rsp), %rdi
callq 0x8ca2
jmp 0x7e79
movq %rax, %rbx
leaq 0x150(%rsp), %rdi
jmp 0x7ec6
jmp 0x7ee4
jmp 0x7ee4
jmp 0x7ee4
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7eac
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3250
jmp 0x7eac
movq %rax, %rbx
leaq 0x238(%rsp), %rdi
callq 0x8ca2
jmp 0x7ebe
movq %rax, %rbx
leaq 0x188(%rsp), %rdi
callq 0x88c0
jmp 0x7ee7
jmp 0x7ee4
jmp 0x7ee4
movq %rax, %rbx
jmp 0x7efe
movq %rax, %rbx
jmp 0x7f08
movq %rax, %rbx
jmp 0x7f25
jmp 0x7ee4
jmp 0x7ee4
movq %rax, %rbx
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x7efe
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x3250
leaq 0x68(%rsp), %rdi
callq 0x8ca2
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x7f25
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x3250
leaq 0xe8(%rsp), %rdi
callq 0x8ce4
leaq 0xb0(%rsp), %rdi
callq 0x88c0
movq %rbx, %rdi
callq 0x3400