// File: AraKhachatryan[P]GraphAlgo/dijkstra.cpp
// Function: GraphAlgo::dijkstra::print_path()
void dijkstra::
print_path()
{
	vertex s = v_path.front();
	vertex d = v_path.back();
	std::cout << "Shortest path from " << s << " to " << d << " is:" << std::endl;

	vertex_path::const_iterator it = v_path.begin();
	for ( ; it != v_path.end(); ++it ) 
	{
		if ( it == v_path.begin() || it == v_path.end() ) 
		{
			std::cout << *it; 
		} else {
			std::cout << " -> " << *it;	
		} 
	}
	std::cout << std::endl;
	
/*	
	vertex_path::const_iterator it2 = v_path.begin();
	for( ; it2 != v_path.end(); ++it2 ) 
	{
		std::cout << " " << v_distance[*it2];
	}
	std::cout << std::endl;
*/
	
	std::cout << "Hope count: " << v_path.size() - 1 << std::endl;
	std::cout << "Path cost: " << v_distance[d] << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x58(%rbp)
addq $0xc0, %rdi
callq 0xfad0
movq -0x58(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0xc(%rbp)
addq $0xc0, %rdi
callq 0xfb00
movl (%rax), %eax
movl %eax, -0x10(%rbp)
movq 0x215d4(%rip), %rdi     # 0x2ffd8
leaq 0x1065d(%rip), %rsi     # 0x1f068
callq 0x21a0
movq %rax, %rdi
movl -0xc(%rbp), %esi
callq 0x22a0
movq %rax, %rdi
leaq 0x10657(%rip), %rsi     # 0x1f07c
callq 0x21a0
movq %rax, %rdi
movl -0x10(%rbp), %esi
callq 0x22a0
movq %rax, %rdi
leaq 0x10642(%rip), %rsi     # 0x1f081
callq 0x21a0
movq %rax, %rdi
movq 0x2157a(%rip), %rsi     # 0x2ffc8
callq 0x21e0
movq -0x58(%rbp), %rdi
addq $0xc0, %rdi
callq 0xfb40
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0xfb70
movq -0x58(%rbp), %rdi
addq $0xc0, %rdi
callq 0xfbc0
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xfb70
leaq -0x18(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xfb90
testb $0x1, %al
jne 0xeaab
jmp 0xeb73
movq -0x58(%rbp), %rdi
addq $0xc0, %rdi
callq 0xfb40
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xfb70
leaq -0x18(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xfbf0
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x59(%rbp)
jne 0xeb16
movq -0x58(%rbp), %rdi
addq $0xc0, %rdi
callq 0xfbc0
movq %rax, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xfb70
leaq -0x18(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0xfbf0
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0xeb1f
jmp 0xeb38
leaq -0x18(%rbp), %rdi
callq 0xfc20
movl (%rax), %esi
movq 0x214a7(%rip), %rdi     # 0x2ffd8
callq 0x22a0
jmp 0xeb63
movq 0x21499(%rip), %rdi     # 0x2ffd8
leaq 0x10540(%rip), %rsi     # 0x1f086
callq 0x21a0
movq %rax, -0x68(%rbp)
leaq -0x18(%rbp), %rdi
callq 0xfc20
movq -0x68(%rbp), %rdi
movl (%rax), %esi
callq 0x22a0
jmp 0xeb65
leaq -0x18(%rbp), %rdi
callq 0xfc50
jmp 0xea74
movq 0x2145e(%rip), %rdi     # 0x2ffd8
movq 0x21447(%rip), %rsi     # 0x2ffc8
callq 0x21e0
movq 0x2144b(%rip), %rdi     # 0x2ffd8
leaq 0x104f7(%rip), %rsi     # 0x1f08b
callq 0x21a0
movq -0x58(%rbp), %rdi
movq %rax, -0x78(%rbp)
addq $0xc0, %rdi
callq 0xfc70
movq -0x78(%rbp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x2070
movq %rax, %rdi
movq 0x21401(%rip), %rsi     # 0x2ffc8
callq 0x21e0
movq 0x21405(%rip), %rdi     # 0x2ffd8
leaq 0x104be(%rip), %rsi     # 0x1f098
callq 0x21a0
movq -0x58(%rbp), %rdi
movq %rax, -0x70(%rbp)
addq $0x108, %rdi            # imm = 0x108
leaq -0x10(%rbp), %rsi
callq 0xfca0
movq -0x70(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x22e0
movq %rax, %rdi
movq 0x213ba(%rip), %rsi     # 0x2ffc8
callq 0x21e0
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)