// File: minimind[P]simple-graph/unittest/../graph/graph.hpp
// Function: Graph<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::add_edge(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, SimpleGraph::NodeIterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, SimpleGraph::NodeIterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&)
void Graph<N,E>::add_edge( const E& e, typename Graph<N,E>::node_iterator& left, typename Graph<N,E>::node_iterator& right )
{
  if ( left.key() == right.key() )
  {
    throw std::runtime_error( "Cannot add_edge linking a node to itself" );
  }

  boost::shared_ptr< SimpleGraph::SimpleEdge<N,E> > newEdge( new SimpleGraph::SimpleEdge<N,E>( e, left, right ) );

  edges.m_edges.push_back( newEdge );
  newEdge->m_mainIterator = edges.m_edges.end();
  --( newEdge->m_mainIterator );

  left.m_iterator->second->m_edges.push_back( newEdge );
  newEdge->m_leftIterator = left.m_iterator->second->m_edges.end();
  --( newEdge->m_leftIterator );

  right.m_iterator->second->m_edges.push_back( newEdge );
  newEdge->m_rightIterator = right.m_iterator->second->m_edges.end();
  --( newEdge->m_rightIterator );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rdi
callq 0x55570
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rdi
callq 0x55570
movq %rax, %rcx
movq -0x60(%rbp), %rax
cmpq %rcx, %rax
jne 0x54d28
movl $0x10, %edi
callq 0xb290
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x70(%rbp)
leaq 0x25660(%rip), %rsi     # 0x7a350
callq 0xb1c0
jmp 0x54cf7
movq -0x70(%rbp), %rdi
movq 0x582ee(%rip), %rsi     # 0xacff0
movq 0x58297(%rip), %rdx     # 0xacfa0
callq 0xb8d0
movq -0x70(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0xb400
jmp 0x54eeb
movl $0x48, %edi
callq 0xb530
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x56d40
jmp 0x54d4f
movq -0x78(%rbp), %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x56db0
movq -0x68(%rbp), %rdi
movq -0x80(%rbp), %rsi
addq $0x30, %rdi
callq 0x56e20
jmp 0x54d73
movq -0x68(%rbp), %rdi
addq $0x30, %rdi
callq 0x56e60
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x56e90
movq -0x88(%rbp), %rdi
movq -0x48(%rbp), %rcx
movq %rcx, 0x30(%rax)
callq 0x56e90
movq %rax, %rdi
addq $0x30, %rdi
callq 0x56ee0
movq -0x18(%rbp), %rdi
callq 0x56f00
movq %rax, %rdi
addq $0x8, %rdi
callq 0x56f20
movq -0x88(%rbp), %rsi
movq %rax, %rdi
addq $0x28, %rdi
callq 0x56e20
jmp 0x54dde
movq -0x18(%rbp), %rdi
callq 0x56f00
movq %rax, %rdi
addq $0x8, %rdi
callq 0x56f20
movq %rax, %rdi
addq $0x28, %rdi
callq 0x56e60
movq %rax, -0x50(%rbp)
leaq -0x40(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x56e90
movq -0x90(%rbp), %rdi
movq -0x50(%rbp), %rcx
movq %rcx, 0x38(%rax)
callq 0x56e90
movq %rax, %rdi
addq $0x38, %rdi
callq 0x56ee0
movq -0x20(%rbp), %rdi
callq 0x56f00
movq %rax, %rdi
addq $0x8, %rdi
callq 0x56f20
movq -0x90(%rbp), %rsi
movq %rax, %rdi
addq $0x28, %rdi
callq 0x56e20
jmp 0x54e5d
movq -0x20(%rbp), %rdi
callq 0x56f00
movq %rax, %rdi
addq $0x8, %rdi
callq 0x56f20
movq %rax, %rdi
addq $0x28, %rdi
callq 0x56e60
movq %rax, -0x58(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x56e90
movq -0x58(%rbp), %rcx
movq %rcx, 0x40(%rax)
leaq -0x40(%rbp), %rdi
callq 0x56e90
movq %rax, %rdi
addq $0x40, %rdi
callq 0x56ee0
leaq -0x40(%rbp), %rdi
callq 0x56be0
addq $0x90, %rsp
popq %rbp
retq
movq -0x78(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x48, %esi
callq 0xb550
jmp 0x54eeb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x56be0
movq -0x28(%rbp), %rdi
callq 0xb920
nopw %cs:(%rax,%rax)
nop