// File: /workspace/github_cpp_makefile_star2_O3/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 0x9a72(%rip), %xmm0     # 0x110c0
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 0xe0(%rsp), %rax
movq %rax, (%rsp)
xorl %r14d, %r14d
leaq 0xa8(%rsp), %rbx
leaq 0x110(%rsp), %rsi
movl $0x3, %r8d
movq %rbx, %rdi
xorl %r9d, %r9d
callq 0x8600
leaq 0xe8(%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 0x90(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x8574
leaq 0x58(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x60(%rsp), %rdi
leaq 0xa8(%rsp), %rbx
leaq 0xe0(%rsp), %rcx
movq %rbx, %rsi
callq *0x10b1e(%rip)          # 0x18238
movsd 0x99ae(%rip), %xmm0     # 0x110d0
leaq 0x10(%rsp), %rsi
movsd %xmm0, (%rsi)
movl $0x40a00000, 0x8(%rsi)  # imm = 0x40A00000
leaq 0x40(%rsp), %rdi
leaq 0xf(%rsp), %rcx
movl $0x3, %edx
callq 0x87f6
testb %bpl, %bpl
je 0x7825
movq 0x1087a(%rip), %rdi     # 0x17fd0
leaq 0x9a71(%rip), %rsi      # 0x111ce
movl $0x7, %edx
callq 0x32a0
leaq 0x240(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x86d2
leaq 0x190(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x897c
leaq 0x10(%rsp), %rdi
leaq 0x240(%rsp), %r14
leaq 0x190(%rsp), %rdx
movq %r14, %rsi
callq 0x36ec
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x10814(%rip), %rdi     # 0x17fd0
callq 0x32a0
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x77dc
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3250
leaq 0x190(%rsp), %rdi
callq 0x8b50
leaq 0x258(%rsp), %r15
movq 0x18(%r15), %rdi
movl $0x1, %esi
callq 0x3250
movq %r15, %rdi
callq 0x88ea
movq -0x18(%r15), %rdi
cmpq %r14, %rdi
je 0x7825
movq (%rdi), %r15
movl $0x28, %esi
callq 0x3250
movq %r15, %rdi
cmpq %r14, %r15
jne 0x7810
leaq 0xc0(%rsp), %r14
xorl %r13d, %r13d
leaq 0x60(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %r13, 0x10(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x850e
movss (%rax), %xmm0
movq 0x40(%rsp), %rdi
ucomiss (%rdi,%r13,4), %xmm0
jne 0x7c11
jp 0x7c11
incq %r13
cmpq $0x3, %r13
jne 0x783a
leaq 0x58(%rsp), %rdx
movq $0x1, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0xe0(%rsp), %rcx
callq *0x109a4(%rip)          # 0x18238
leaq 0x60(%rsp), %rdi
callq 0x8b64
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x78e0
leaq 0x68(%rsp), %rcx
leaq 0x18(%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 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x8b50
movss 0x983b(%rip), %xmm0     # 0x11130
movlps %xmm0, (%r15)
movl $0x40400000, 0x8(%r15)  # imm = 0x40400000
leaq 0x1c(%rsp), %rdx
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xaa3c
testb %bpl, %bpl
je 0x79f6
movq 0x106ab(%rip), %rdi     # 0x17fd0
leaq 0x98aa(%rip), %rsi      # 0x111d6
movl $0x7, %edx
callq 0x32a0
leaq 0x208(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x86d2
leaq 0x160(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x897c
leaq 0x10(%rsp), %rdi
leaq 0x208(%rsp), %r15
leaq 0x160(%rsp), %rdx
movq %r15, %rsi
callq 0x36ec
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x10645(%rip), %rdi     # 0x17fd0
callq 0x32a0
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x79ab
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3250
leaq 0x160(%rsp), %rdi
callq 0x8b50
leaq 0x220(%rsp), %r12
movq 0x18(%r12), %rdi
movl $0x1, %esi
callq 0x3250
movq %r12, %rdi
callq 0x88ea
movq -0x18(%r12), %rdi
cmpq %r15, %rdi
je 0x79f6
movq (%rdi), %r12
movl $0x28, %esi
callq 0x3250
movq %r12, %rdi
cmpq %r15, %r12
jne 0x79e1
xorl %r13d, %r13d
leaq 0x60(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %r13, 0x10(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x850e
movss (%rax), %xmm0
movq 0x40(%rsp), %rdi
ucomiss (%rdi,%r13,4), %xmm0
jne 0x7c11
jp 0x7c11
incq %r13
cmpq $0x3, %r13
jne 0x7a03
leaq 0x58(%rsp), %rdx
movq $0x2, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0xe0(%rsp), %rcx
callq *0x107db(%rip)          # 0x18238
leaq 0x60(%rsp), %rdi
callq 0x8b64
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x7aa9
leaq 0x68(%rsp), %rcx
leaq 0x18(%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 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x8b50
movsd 0x9652(%rip), %xmm0     # 0x11110
movsd %xmm0, (%r15)
movl $0x0, 0x8(%r15)
leaq 0x1c(%rsp), %rdx
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xaa3c
testb %bpl, %bpl
je 0x7bc0
movq 0x104e1(%rip), %rdi     # 0x17fd0
leaq 0x96e8(%rip), %rsi      # 0x111de
movl $0x7, %edx
callq 0x32a0
leaq 0x1d0(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x86d2
leaq 0x130(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x897c
leaq 0x10(%rsp), %rdi
leaq 0x1d0(%rsp), %r15
leaq 0x130(%rsp), %rdx
movq %r15, %rsi
callq 0x36ec
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x1047b(%rip), %rdi     # 0x17fd0
callq 0x32a0
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7b75
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3250
leaq 0x130(%rsp), %rdi
callq 0x8b50
leaq 0x1e8(%rsp), %r12
movq 0x18(%r12), %rdi
movl $0x1, %esi
callq 0x3250
movq %r12, %rdi
callq 0x88ea
movq -0x18(%r12), %rdi
cmpq %r15, %rdi
je 0x7bc0
movq (%rdi), %r12
movl $0x28, %esi
callq 0x3250
movq %r12, %rdi
cmpq %r15, %r12
jne 0x7bab
xorl %r13d, %r13d
leaq 0x60(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %r13, 0x10(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x850e
movss (%rax), %xmm0
movq 0x40(%rsp), %rdi
movss (%rdi,%r13,4), %xmm1
movaps %xmm0, %xmm2
cmpeqss %xmm1, %xmm2
movd %xmm2, %ebp
andl $0x1, %ebp
ucomiss %xmm1, %xmm0
jne 0x7c13
jp 0x7c13
leaq 0x1(%r13), %rax
cmpq $0x2, %r13
movq %rax, %r13
jne 0x7bcd
jmp 0x7c13
xorl %ebp, %ebp
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x3250
leaq 0x60(%rsp), %rdi
callq 0x8b50
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x7c47
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x3250
leaq 0xe0(%rsp), %rdi
callq 0x8b92
movq 0xd8(%rsp), %rdi
movl $0x1, %esi
callq 0x3250
movq %r14, %rdi
callq 0x88ea
movq 0xa8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x7c90
movq (%rdi), %r14
movl $0x28, %esi
callq 0x3250
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x7c7b
movl %ebp, %eax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7cc7
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3250
jmp 0x7cc7
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
callq 0x8b50
jmp 0x7cd9
movq %rax, %rbx
leaq 0x1d0(%rsp), %rdi
jmp 0x7d77
jmp 0x7d95
jmp 0x7d95
jmp 0x7d95
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7d18
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3250
jmp 0x7d18
movq %rax, %rbx
leaq 0x160(%rsp), %rdi
callq 0x8b50
jmp 0x7d2a
movq %rax, %rbx
leaq 0x208(%rsp), %rdi
jmp 0x7d77
jmp 0x7d95
jmp 0x7d95
jmp 0x7d95
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7d5d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3250
jmp 0x7d5d
movq %rax, %rbx
leaq 0x190(%rsp), %rdi
callq 0x8b50
jmp 0x7d6f
movq %rax, %rbx
leaq 0x240(%rsp), %rdi
callq 0x876c
jmp 0x7d98
jmp 0x7d95
jmp 0x7d95
movq %rax, %rbx
jmp 0x7daf
movq %rax, %rbx
jmp 0x7db9
movq %rax, %rbx
jmp 0x7dd6
jmp 0x7d95
jmp 0x7d95
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x7daf
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x3250
leaq 0x60(%rsp), %rdi
callq 0x8b50
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x7dd6
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x3250
leaq 0xe0(%rsp), %rdi
callq 0x8b92
leaq 0xa8(%rsp), %rdi
callq 0x876c
movq %rbx, %rdi
callq 0x3400