// File: /workspace/github_cpp_makefile_star2_O3/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 0xa028(%rip), %xmm0     # 0x110f0
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 0x8600
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 0x8574
leaq 0x58(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x60(%rsp), %rdi
leaq 0xa8(%rsp), %rbx
leaq 0xf0(%rsp), %rcx
movq %rbx, %rsi
callq *0x110b9(%rip)          # 0x18238
movsd 0x9f79(%rip), %xmm0     # 0x11100
leaq 0x10(%rsp), %rsi
movsd %xmm0, (%rsi)
leaq 0x40(%rsp), %rdi
leaq 0xf(%rsp), %rcx
movl $0x2, %edx
callq 0x87f6
testb %bpl, %bpl
je 0x7283
movq 0x10e1c(%rip), %rdi     # 0x17fd0
leaq 0xa003(%rip), %rsi      # 0x111be
movl $0x7, %edx
callq 0x32a0
leaq 0x1c0(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x86d2
leaq 0x158(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x897c
leaq 0x10(%rsp), %rdi
leaq 0x1c0(%rsp), %r14
leaq 0x158(%rsp), %rdx
movq %r14, %rsi
callq 0x36ec
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x10db6(%rip), %rdi     # 0x17fd0
callq 0x32a0
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x723a
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3250
leaq 0x158(%rsp), %rdi
callq 0x8b50
leaq 0x1d8(%rsp), %r15
movq 0x18(%r15), %rdi
movl $0x1, %esi
callq 0x3250
movq %r15, %rdi
callq 0x88ea
movq -0x18(%r15), %rdi
cmpq %r14, %rdi
je 0x7283
movq (%rdi), %r15
movl $0x28, %esi
callq 0x3250
movq %r15, %rdi
cmpq %r14, %r15
jne 0x726e
movb $0x1, %r13b
xorl %r14d, %r14d
leaq 0x60(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %r14, 0x10(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x850e
movss (%rax), %xmm0
movq 0x40(%rsp), %rdi
ucomiss (%rdi,%r14,4), %xmm0
jne 0x749b
jp 0x749b
movl $0x1, %r14d
testb $0x1, %r13b
movl $0x0, %r13d
jne 0x7293
leaq 0x58(%rsp), %rdx
movq $0x1, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0xf0(%rsp), %rcx
callq *0x10f42(%rip)          # 0x18238
leaq 0x60(%rsp), %rdi
callq 0x8b64
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x7342
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 0x9dd9(%rip), %xmm0     # 0x11130
movlps %xmm0, (%r15)
leaq 0x18(%rsp), %rdx
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xaa3c
testb %bpl, %bpl
je 0x7450
movq 0x10c51(%rip), %rdi     # 0x17fd0
leaq 0x9e40(%rip), %rsi      # 0x111c6
movl $0x7, %edx
callq 0x32a0
leaq 0x188(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x86d2
leaq 0x128(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x897c
leaq 0x10(%rsp), %rdi
leaq 0x188(%rsp), %r15
leaq 0x128(%rsp), %rdx
movq %r15, %rsi
callq 0x36ec
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x10beb(%rip), %rdi     # 0x17fd0
callq 0x32a0
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7405
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3250
leaq 0x128(%rsp), %rdi
callq 0x8b50
leaq 0x1a0(%rsp), %r12
movq 0x18(%r12), %rdi
movl $0x1, %esi
callq 0x3250
movq %r12, %rdi
callq 0x88ea
movq -0x18(%r12), %rdi
cmpq %r15, %rdi
je 0x7450
movq (%rdi), %r14
movl $0x28, %esi
callq 0x3250
movq %r14, %rdi
cmpq %r15, %r14
jne 0x743b
movb $0x1, %r13b
xorl %r14d, %r14d
leaq 0x60(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %r14, 0x10(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x850e
movss (%rax), %xmm0
movq 0x40(%rsp), %rdi
ucomiss (%rdi,%r14,4), %xmm0
setnp %al
sete %bpl
andb %al, %bpl
movl $0x1, %r14d
testb %bpl, %r13b
movl $0x0, %r13d
jne 0x7460
jmp 0x749d
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 0x74d1
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x3250
leaq 0xf0(%rsp), %rdi
callq 0x8b92
movq 0xd8(%rsp), %rdi
movl $0x1, %esi
callq 0x3250
leaq 0xc0(%rsp), %rdi
callq 0x88ea
movq 0xa8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x751f
movq (%rdi), %r14
movl $0x28, %esi
callq 0x3250
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x750a
movl %ebp, %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 0x7556
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3250
jmp 0x7556
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
callq 0x8b50
jmp 0x7568
movq %rax, %rbx
leaq 0x188(%rsp), %rdi
jmp 0x75b5
jmp 0x75d1
jmp 0x75d1
jmp 0x75d1
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x759b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3250
jmp 0x759b
movq %rax, %rbx
leaq 0x158(%rsp), %rdi
callq 0x8b50
jmp 0x75ad
movq %rax, %rbx
leaq 0x1c0(%rsp), %rdi
callq 0x876c
jmp 0x75d4
jmp 0x75d1
jmp 0x75d1
movq %rax, %rbx
jmp 0x75eb
movq %rax, %rbx
jmp 0x75f5
movq %rax, %rbx
jmp 0x7612
jmp 0x75d1
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x75eb
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x3250
leaq 0x60(%rsp), %rdi
callq 0x8b50
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x7612
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x3250
leaq 0xf0(%rsp), %rdi
callq 0x8b92
leaq 0xa8(%rsp), %rdi
callq 0x876c
movq %rbx, %rdi
callq 0x3400