// File: AraKhachatryan[P]GraphAlgo/dijkstra.cpp
// Function: GraphAlgo::dijkstra::initialize(int const&)
void dijkstra::
initialize( const vertex& s )
{
	v_distance.clear();
	v_queue.clear();
	v_previous.clear();
	
	vertices::const_iterator it = m_vertices.begin();
	for ( ; it != m_vertices.end(); ++it ) 
	{
		if( *it != s ) {
			v_distance.insert( vertex_distance::value_type(*it, infinity) );
			v_queue.insert( std::make_pair(infinity, *it) );
		} else {
			v_distance.insert( vertex_distance::value_type(s, 0) );
			v_queue.insert( std::make_pair(0, s) );
		}
	}
	
	edges::const_iterator e_it = m_edges.begin();
	for( ; e_it != m_edges.end(); ++e_it) 
	{
		e_weight.insert( edge_weight::value_type(*e_it, 0) );
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x118(%rbp)
addq $0x108, %rdi            # imm = 0x108
callq 0x102f0
movq -0x118(%rbp), %rdi
addq $0x138, %rdi            # imm = 0x138
callq 0x10310
movq -0x118(%rbp), %rdi
addq $0xd8, %rdi
callq 0x10330
movq -0x118(%rbp), %rdi
addq $0x60, %rdi
callq 0x6050
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x6080
movq -0x118(%rbp), %rdi
addq $0x60, %rdi
callq 0x6100
movq %rax, -0x28(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x60c0
testb $0x1, %al
jne 0xf44b
jmp 0xf5f5
leaq -0x18(%rbp), %rdi
callq 0x6130
movl (%rax), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
je 0xf525
movq -0x118(%rbp), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, -0x140(%rbp)
leaq -0x18(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x6130
movq %rax, %rsi
leaq 0xfc18(%rip), %rdx      # 0x1f0a8
movq %rdx, -0x128(%rbp)
leaq -0x38(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x10390
movq -0x140(%rbp), %rdi
movq -0x138(%rbp), %rsi
callq 0x10350
movq -0x130(%rbp), %rdi
movq %rax, %rcx
movq -0x118(%rbp), %rax
movq %rcx, -0x48(%rbp)
movb %dl, -0x40(%rbp)
addq $0x138, %rax            # imm = 0x138
movq %rax, -0x120(%rbp)
callq 0x6130
movq -0x128(%rbp), %rdi
movq %rax, %rsi
callq 0x103c0
movq -0x120(%rbp), %rdi
movl %eax, -0x60(%rbp)
movsd %xmm0, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
movl -0x60(%rbp), %eax
movl %eax, -0x50(%rbp)
leaq -0x58(%rbp), %rsi
callq 0x102a0
movq %rax, -0x78(%rbp)
movb %dl, -0x70(%rbp)
jmp 0xf5e5
movq -0x118(%rbp), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, -0x150(%rbp)
movq -0x10(%rbp), %rsi
movl $0x0, -0x8c(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0x8c(%rbp), %rdx
callq 0x103f0
movq -0x150(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x10350
movq %rax, %rcx
movq -0x118(%rbp), %rax
movq %rcx, -0xa0(%rbp)
movb %dl, -0x98(%rbp)
addq $0x138, %rax            # imm = 0x138
movq %rax, -0x148(%rbp)
movl $0x0, -0xbc(%rbp)
movq -0x10(%rbp), %rsi
leaq -0xbc(%rbp), %rdi
callq 0x10420
movq %rax, -0xb8(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x10450
movq -0x148(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x102a0
movq %rax, -0xd0(%rbp)
movb %dl, -0xc8(%rbp)
jmp 0xf5e7
leaq -0x18(%rbp), %rdi
callq 0x6240
jmp 0xf421
movq -0x118(%rbp), %rdi
addq $0x78, %rdi
callq 0x10480
movq %rax, -0xe0(%rbp)
leaq -0xd8(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x104b0
movq -0x118(%rbp), %rdi
addq $0x78, %rdi
callq 0x10530
movq %rax, -0xe8(%rbp)
leaq -0xd8(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x104f0
testb $0x1, %al
jne 0xf64f
jmp 0xf6c0
movq -0x118(%rbp), %rax
addq $0x168, %rax            # imm = 0x168
movq %rax, -0x158(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x10560
movq %rax, %rsi
movl $0x0, -0xfc(%rbp)
leaq -0xf8(%rbp), %rdi
leaq -0xfc(%rbp), %rdx
callq 0x10580
movq -0x158(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x100c0
movq %rax, -0x110(%rbp)
movb %dl, -0x108(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x105b0
jmp 0xf61f
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
nopl (%rax)