// File: /workspace/github_cpp_makefile_star2_O1/flastest[P]HeterogeneousParallelDijkstra/workloads.cc
// Function: test5(bool)
bool test5(bool TEST_DEBUG)
{
	const int num_nodes = 2;
	enum nodes { A, B };
	Edge edge_array[] = { 
			Edge(A, B), 
			Edge(B, B)
	};
	int weights[] = { 
		1, 1
	};
	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));



	// test5a, with source A.
	vertex_descriptor s = vertex(A, g);

	auto distances = dijkstra_algorithm(g, s, p);

	vector<float> true_distances = { 0, 1};
	if (TEST_DEBUG) cout << "test5a\n" << print_dijkstra_results(g,distances);
	for (int i = 0; i < num_nodes; i++)
	{
		if (distances[vertex(i,g)] != true_distances[i]){
			return false;
		}
	}

	// test5b, with source B.
	s = vertex(B, g);

	distances = dijkstra_algorithm(g, s, p);

	true_distances = {INFINITY, 0};
	if (TEST_DEBUG) cout << "test5b\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 $0x1f8, %rsp            # imm = 0x1F8
movl %edi, %ebp
movaps 0x9ee6(%rip), %xmm0     # 0x110d0
leaq 0xf0(%rsp), %rdx
movaps %xmm0, -0x10(%rdx)
movabsq $0x100000001, %rax      # imm = 0x100000001
leaq 0x120(%rsp), %rcx
movq %rax, (%rcx)
leaq 0xf0(%rsp), %rax
movq %rax, (%rsp)
xorl %r14d, %r14d
leaq 0xa8(%rsp), %rbx
leaq 0xe0(%rsp), %rsi
movl $0x2, %r8d
movq %rbx, %rdi
xorl %r9d, %r9d
callq 0x8758
leaq 0xf8(%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 0x86ce
leaq 0x58(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x60(%rsp), %rdi
leaq 0xa8(%rsp), %rbx
leaq 0xf0(%rsp), %rcx
movq %rbx, %rsi
callq *0x10f97(%rip)          # 0x18238
movabsq $0x3f80000000000000, %rax # imm = 0x3F80000000000000
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x40(%rsp), %rdi
leaq 0xf(%rsp), %rcx
movl $0x2, %edx
callq 0x894e
testb %bpl, %bpl
je 0x73af
movq 0x10cf9(%rip), %rdi     # 0x17fd0
leaq 0x9e9c(%rip), %rsi      # 0x1117a
movl $0x7, %edx
callq 0x32a0
leaq 0x160(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x8826
leaq 0x1c8(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x8ace
leaq 0x10(%rsp), %rdi
leaq 0x160(%rsp), %r14
leaq 0x1c8(%rsp), %rdx
movq %r14, %rsi
callq 0x36ec
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x10c93(%rip), %rdi     # 0x17fd0
callq 0x32a0
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x735d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3250
leaq 0x1c8(%rsp), %rdi
callq 0x8ca2
movq 0x190(%rsp), %rdi
testq %rdi, %rdi
je 0x7381
movl $0x1, %esi
callq 0x3250
leaq 0x178(%rsp), %r15
movq %r15, %rdi
callq 0x8a42
movq -0x18(%r15), %rdi
cmpq %r14, %rdi
je 0x73af
movq (%rdi), %r15
movl $0x28, %esi
callq 0x3250
movq %r15, %rdi
cmpq %r14, %r15
jne 0x739a
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 0x8668
movss (%rax), %xmm0
movq 0x40(%rsp), %rax
ucomiss (%rax,%r13,4), %xmm0
jne 0x75ba
jp 0x75ba
incq %r13
cmpq $0x1, %r13
je 0x73c4
leaq 0x58(%rsp), %rdx
movq $0x1, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0xf0(%rsp), %rcx
callq *0x10e1a(%rip)          # 0x18238
leaq 0x60(%rsp), %rdi
callq 0x8cb6
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x746a
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 0x8ca2
movq $0x7f800000, (%r15)     # imm = 0x7F800000
leaq 0x18(%rsp), %rdx
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xaca2
testb %bpl, %bpl
je 0x757b
movq 0x10b2e(%rip), %rdi     # 0x17fd0
leaq 0x9cd9(%rip), %rsi      # 0x11182
movl $0x7, %edx
callq 0x32a0
leaq 0x128(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x8826
leaq 0x198(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x8ace
leaq 0x10(%rsp), %rdi
leaq 0x128(%rsp), %r15
leaq 0x198(%rsp), %rdx
movq %r15, %rsi
callq 0x36ec
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x10ac8(%rip), %rdi     # 0x17fd0
callq 0x32a0
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7528
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3250
leaq 0x198(%rsp), %rdi
callq 0x8ca2
movq 0x158(%rsp), %rdi
testq %rdi, %rdi
je 0x754c
movl $0x1, %esi
callq 0x3250
leaq 0x140(%rsp), %r12
movq %r12, %rdi
callq 0x8a42
movq -0x18(%r12), %rdi
cmpq %r15, %rdi
je 0x757b
movq (%rdi), %r12
movl $0x28, %esi
callq 0x3250
movq %r12, %rdi
cmpq %r15, %r12
jne 0x7566
xorl %ebp, %ebp
leaq 0x60(%rsp), %r12
leaq 0x10(%rsp), %r13
xorl %r15d, %r15d
movq %rbp, 0x10(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x8668
movss (%rax), %xmm0
movq 0x40(%rsp), %rax
ucomiss (%rax,%rbp,4), %xmm0
jne 0x75bd
jp 0x75bd
incq %rbp
cmpq $0x1, %rbp
setne %r15b
je 0x758a
jmp 0x75bd
xorl %r15d, %r15d
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x75d4
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x3250
leaq 0x60(%rsp), %rdi
callq 0x8ca2
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x75fb
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x3250
leaq 0xf0(%rsp), %rdi
callq 0x8ce4
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0x761f
movl $0x1, %esi
callq 0x3250
movq %r14, %rdi
callq 0x8a42
movq 0xa8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x7649
movq (%rdi), %r14
movl $0x28, %esi
callq 0x3250
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x7634
andb $0x1, %r15b
movl %r15d, %eax
addq $0x1f8, %rsp            # imm = 0x1F8
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 0x7685
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3250
jmp 0x7685
movq %rax, %rbx
leaq 0x198(%rsp), %rdi
callq 0x8ca2
jmp 0x7697
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
jmp 0x76e4
jmp 0x7700
jmp 0x7700
jmp 0x7700
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x76ca
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3250
jmp 0x76ca
movq %rax, %rbx
leaq 0x1c8(%rsp), %rdi
callq 0x8ca2
jmp 0x76dc
movq %rax, %rbx
leaq 0x160(%rsp), %rdi
callq 0x88c0
jmp 0x7703
jmp 0x7700
jmp 0x7700
movq %rax, %rbx
jmp 0x771a
movq %rax, %rbx
jmp 0x7724
movq %rax, %rbx
jmp 0x7741
jmp 0x7700
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x771a
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x3250
leaq 0x60(%rsp), %rdi
callq 0x8ca2
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x7741
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x3250
leaq 0xf0(%rsp), %rdi
callq 0x8ce4
leaq 0xa8(%rsp), %rdi
callq 0x88c0
movq %rbx, %rdi
callq 0x3400