// File: jkeys-ecg-nmsu[P]graph-with-search-algorithms/Graph.cpp
// Function: operator<<(std::ostream&, Graph const&)
std::ostream& operator<<(std::ostream & out, const Graph & g) {
	//cout << "in Graph out stream operator, g.m_nodes.size(): " << g.num_nodes() << endl;

	out << "Nodes in the graph: " << endl;
	for (unsigned int i = 0; i < g.num_nodes(); i++) {
	  out << g.getNode(i).name() << " ";
	}

	out << endl;
	out << "Adjacency list of the graph: " << endl;

	for (unsigned int i = 0; i < g.num_nodes(); i++) {
		out << "Node " << g.getNode ( i ).name() << ": ";
		const set<Node> neighbors = g.getAdjNodes(g.getNode(i));
		for (set < Node> :: const_iterator itr = neighbors.begin(); itr != neighbors.end(); ++itr) {
			out << itr->name() << " ";
	}
	  out << endl;
	}

	return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x12e62(%rip), %rsi     # 0x1a2b0
callq 0x2240
movq %rax, %rdi
movq 0x1fb63(%rip), %rsi     # 0x26fc0
callq 0x2280
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6100
movq %rax, %rcx
movq -0x70(%rbp), %rax
cmpq %rcx, %rax
jae 0x74c9
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x5040
movq %rax, %rdi
callq 0xeda0
movq -0x78(%rbp), %rdi
movq %rax, %rsi
callq 0x2220
movq %rax, %rdi
leaq 0x130ce(%rip), %rsi     # 0x1a587
callq 0x2240
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7469
movq -0x8(%rbp), %rdi
movq 0x1faec(%rip), %rsi     # 0x26fc0
callq 0x2280
movq -0x8(%rbp), %rdi
leaq 0x12de1(%rip), %rsi     # 0x1a2c5
callq 0x2240
movq %rax, %rdi
movq 0x1facd(%rip), %rsi     # 0x26fc0
callq 0x2280
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6100
movq %rax, %rcx
movq -0x80(%rbp), %rax
cmpq %rcx, %rax
jae 0x7671
movq -0x8(%rbp), %rdi
leaq 0x12db9(%rip), %rsi     # 0x1a2e3
callq 0x2240
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %eax
movl %eax, %esi
callq 0x5040
movq %rax, %rdi
callq 0xeda0
movq -0x90(%rbp), %rdi
movq %rax, %rsi
callq 0x2220
movq %rax, %rdi
leaq 0x12eb2(%rip), %rsi     # 0x1a417
callq 0x2240
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %eax
movl %eax, %esi
callq 0x5040
movq -0x88(%rbp), %rdi
movq %rax, %rsi
callq 0x6320
movq %rax, %rsi
leaq -0x48(%rbp), %rdi
callq 0x8750
leaq -0x48(%rbp), %rdi
callq 0x8780
movq %rax, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x87e0
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x87b0
testb $0x1, %al
jne 0x75cb
jmp 0x7648
movq -0x8(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x8a10
movq %rax, %rdi
callq 0xeda0
movq %rax, -0x98(%rbp)
jmp 0x75f0
movq -0x98(%rbp), %rsi
movq -0xa0(%rbp), %rdi
callq 0x2220
movq %rax, -0xa8(%rbp)
jmp 0x760c
movq -0xa8(%rbp), %rdi
leaq 0x12f6d(%rip), %rsi     # 0x1a587
callq 0x2240
jmp 0x7621
jmp 0x7623
leaq -0x50(%rbp), %rdi
callq 0x8a30
jmp 0x75ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x3530
jmp 0x767e
movq -0x8(%rbp), %rdi
movq 0x1f96d(%rip), %rsi     # 0x26fc0
callq 0x2280
jmp 0x765a
leaq -0x48(%rbp), %rdi
callq 0x3530
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x74ff
movq -0x8(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x23e0
nopw (%rax,%rax)