// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movl %edi, %ebx
movaps 0x80a8(%rip), %xmm0     # 0xe0c0
leaq 0x128(%rsp), %rdx
movaps %xmm0, -0x18(%rdx)
movabsq $0x100000002, %rax      # imm = 0x100000002
movq %rax, -0x8(%rdx)
movabsq $0x300000002, %rax      # imm = 0x300000002
leaq 0x1c0(%rsp), %rcx
movq %rax, (%rcx)
movl $0x2, 0x8(%rcx)
leaq 0xc8(%rsp), %rax
movq %rax, (%rsp)
leaq 0x90(%rsp), %r14
leaq 0x110(%rsp), %rsi
pushq $0x3
popq %r8
movq %r14, %rdi
xorl %r9d, %r9d
callq 0x6b18
leaq 0xd0(%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 0xf8(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x6aba
leaq 0x40(%rsp), %rdx
andq $0x0, (%rdx)
leaq 0x60(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0xc8(%rsp), %rcx
callq *0x11178(%rip)          # 0x17250
movsd 0x7ff0(%rip), %xmm0     # 0xe0d0
leaq 0x10(%rsp), %rsi
movsd %xmm0, (%rsi)
movl $0x40a00000, 0x8(%rsi)  # imm = 0x40A00000
leaq 0x48(%rsp), %rdi
pushq $0x3
popq %rdx
leaq 0xf(%rsp), %rcx
callq 0x6c3c
testb %bl, %bl
je 0x6192
movq 0x10eb7(%rip), %rdi     # 0x16fc8
leaq 0x80a6(%rip), %rsi      # 0xe1be
callq 0x3270
movq %rax, %r14
leaq 0x240(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x6bac
leaq 0x190(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x6e78
leaq 0x10(%rsp), %rdi
leaq 0x240(%rsp), %rsi
leaq 0x190(%rsp), %rdx
callq 0x366c
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x3250
leaq 0x10(%rsp), %rdi
callq 0x3110
leaq 0x190(%rsp), %rdi
callq 0x70ae
leaq 0x240(%rsp), %rdi
callq 0x6bf0
xorl %r12d, %r12d
leaq 0x60(%rsp), %r14
leaq 0x10(%rsp), %r15
cmpq $0x3, %r12
je 0x61d5
movq %r12, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x6a6a
movss (%rax), %xmm0
movq 0x48(%rsp), %rax
ucomiss (%rax,%r12,4), %xmm0
leaq 0x1(%r12), %r12
jne 0x6308
jnp 0x619f
jmp 0x6308
leaq 0x40(%rsp), %rdx
movq $0x1, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0xc8(%rsp), %rcx
callq *0x11054(%rip)          # 0x17250
leaq 0x60(%rsp), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0x70c2
movq %r14, %rdi
callq 0x70ae
movss 0x7f02(%rip), %xmm0     # 0xe120
movlps %xmm0, (%r14)
movl $0x40400000, 0x8(%r14)  # imm = 0x40400000
leaq 0x1c(%rsp), %rdx
leaq 0x48(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x95d0
testb %bl, %bl
je 0x62ce
movq 0x10d7b(%rip), %rdi     # 0x16fc8
leaq 0x7f72(%rip), %rsi      # 0xe1c6
callq 0x3270
movq %rax, %r14
leaq 0x208(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x6bac
leaq 0x160(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x6e78
leaq 0x10(%rsp), %rdi
leaq 0x208(%rsp), %rsi
leaq 0x160(%rsp), %rdx
callq 0x366c
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x3250
leaq 0x10(%rsp), %rdi
callq 0x3110
leaq 0x160(%rsp), %rdi
callq 0x70ae
leaq 0x208(%rsp), %rdi
callq 0x6bf0
xorl %r12d, %r12d
leaq 0x60(%rsp), %r14
leaq 0x10(%rsp), %r15
cmpq $0x3, %r12
je 0x6356
movq %r12, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x6a6a
movss (%rax), %xmm0
movq 0x48(%rsp), %rax
ucomiss (%rax,%r12,4), %xmm0
leaq 0x1(%r12), %r12
jne 0x6308
jnp 0x62db
xorl %ebx, %ebx
leaq 0x48(%rsp), %rdi
callq 0x9546
leaq 0x60(%rsp), %rdi
callq 0x70ae
leaq 0xf8(%rsp), %rdi
callq 0x74ca
leaq 0xc8(%rsp), %rdi
callq 0x7172
leaq 0x90(%rsp), %rdi
callq 0x6bf0
movl %ebx, %eax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x40(%rsp), %rdx
movq $0x2, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0xc8(%rsp), %rcx
callq *0x10ed3(%rip)          # 0x17250
leaq 0x60(%rsp), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0x70c2
movq %r14, %rdi
callq 0x70ae
movsd 0x7d71(%rip), %xmm0     # 0xe110
movsd %xmm0, (%r14)
andl $0x0, 0x8(%r14)
leaq 0x1c(%rsp), %rdx
leaq 0x48(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x95d0
testb %bl, %bl
je 0x644d
movq 0x10bfc(%rip), %rdi     # 0x16fc8
leaq 0x7dfb(%rip), %rsi      # 0xe1ce
callq 0x3270
movq %rax, %rbx
leaq 0x1d0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x6bac
leaq 0x130(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x6e78
leaq 0x10(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
leaq 0x130(%rsp), %rdx
callq 0x366c
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3250
leaq 0x10(%rsp), %rdi
callq 0x3110
leaq 0x130(%rsp), %rdi
callq 0x70ae
leaq 0x1d0(%rsp), %rdi
callq 0x6bf0
xorl %r12d, %r12d
leaq 0x60(%rsp), %r14
leaq 0x10(%rsp), %r15
cmpq $0x3, %r12
sete %bl
je 0x630a
movq %r12, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x6a6a
movss (%rax), %xmm0
movq 0x48(%rsp), %rax
ucomiss (%rax,%r12,4), %xmm0
leaq 0x1(%r12), %r12
jne 0x630a
jnp 0x645a
jmp 0x630a
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3110
jmp 0x64a9
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
callq 0x70ae
jmp 0x64bb
movq %rax, %rbx
leaq 0x1d0(%rsp), %rdi
jmp 0x652a
jmp 0x654c
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3110
jmp 0x64dc
movq %rax, %rbx
leaq 0x160(%rsp), %rdi
callq 0x70ae
jmp 0x64ee
movq %rax, %rbx
leaq 0x208(%rsp), %rdi
jmp 0x652a
jmp 0x654c
jmp 0x654c
jmp 0x654c
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3110
jmp 0x6510
movq %rax, %rbx
leaq 0x190(%rsp), %rdi
callq 0x70ae
jmp 0x6522
movq %rax, %rbx
leaq 0x240(%rsp), %rdi
callq 0x6bf0
jmp 0x654f
jmp 0x654c
jmp 0x654c
jmp 0x654c
jmp 0x654c
movq %rax, %rbx
jmp 0x6559
movq %rax, %rbx
jmp 0x6563
movq %rax, %rbx
jmp 0x6570
jmp 0x654c
jmp 0x654c
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x9546
leaq 0x60(%rsp), %rdi
callq 0x70ae
leaq 0xf8(%rsp), %rdi
callq 0x74ca
leaq 0xc8(%rsp), %rdi
callq 0x7172
leaq 0x90(%rsp), %rdi
callq 0x6bf0
movq %rbx, %rdi
callq 0x3420