// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x961e(%rip), %rsi      # 0xf2f0
movl $0x14, %edx
callq 0x2270
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movq (%r12), %rax
cmpq %rax, 0x8(%r12)
je 0x5d63
movl $0x1, %r14d
xorl %edi, %edi
leaq 0x98b2(%rip), %r15      # 0xf5cf
shlq $0x7, %rdi
addq %rax, %rdi
callq 0x7c4e
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x2270
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2270
movl %r14d, %edi
movq (%r12), %rax
movq 0x8(%r12), %rcx
subq %rax, %rcx
sarq $0x7, %rcx
incl %r14d
cmpq %rdi, %rcx
ja 0x5d1d
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
leaq 0x9574(%rip), %rsi      # 0xf305
movl $0x1d, %edx
movq %rbx, %rdi
callq 0x2270
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movq 0x8(%r12), %rax
cmpq (%r12), %rax
je 0x5ef7
movq %r12, %r14
xorl %r13d, %r13d
leaq -0x68(%rbp), %rcx
leaq 0x97ea(%rip), %r15      # 0xf5cf
xorl %r12d, %r12d
movq %r14, -0x30(%rbp)
movq %r12, -0x38(%rbp)
movl $0x5, %edx
movq %rcx, %r12
movq %rbx, %rdi
leaq 0x9521(%rip), %rsi      # 0xf323
callq 0x2270
shlq $0x7, %r13
movq (%r14), %rdi
addq %r13, %rdi
callq 0x7c4e
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x2270
movl $0x2, %edx
movq %rax, %rdi
leaq 0x962b(%rip), %rsi      # 0xf45f
callq 0x2270
addq (%r14), %r13
movq %r13, %rdi
callq 0x7c44
cltq
leaq (%rax,%rax,2), %rsi
shlq $0x4, %rsi
addq 0x18(%r14), %rsi
movq %r12, %r14
movq %r12, %rdi
callq 0x6756
movq -0x50(%rbp), %r12
leaq -0x60(%rbp), %r13
cmpq %r13, %r12
je 0x5ea3
leaq 0x20(%r12), %rdi
callq 0x7c4e
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x2270
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2270
movq %r12, %rdi
callq 0x2280
movq %rax, %r12
cmpq %r13, %rax
jne 0x5e6a
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2200
movq -0x38(%rbp), %r12
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movq %r14, %rdi
callq 0x2dba
movq %r14, %rcx
movq -0x30(%rbp), %r14
movq 0x8(%r14), %rax
subq (%r14), %rax
incl %r12d
sarq $0x7, %rax
movq %r12, %r13
cmpq %r12, %rax
ja 0x5dec
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5f0b
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x2dba
movq %rbx, %rdi
callq 0x2380
nop