// File: /workspace/github_cpp_makefile_star2_O2/Kingsford-Group[P]ghost2/src/readFromNet.hpp
// Function: readFromNet(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool)
Graph readFromNet(string fileName, bool directed)
{ 
  ptime t = bclock::local_time();
  Graph result;
  result.direct(directed);
  ifstream fin(fileName);
  if(!fin.good()) 
  {
    cout << "error loading file: " << fileName << "\n";
    exit(0);
  }
  unsigned start = fileName.find_last_of("/");
  unsigned end = fileName.find(".net");
  if(start == string::npos) start = -1;
  string name = fileName.substr(start+1,end-start-1);
  result.setName(name);

  int N,E;
  fin >> N >> E;
  for(int i=0;i<N;i++)
  {
    string n;
    fin >> n;
    result.addVertex(n);
  }
  for(int i=0;i<E;i++)
  {
    string n1,n2;
    fin >> n1 >> n2;
    result.addEdge(n1, n2);
  }
  fin.close();
  cout << "extracted: " << result.getName() << ".net in " <<
    (bclock::local_time() - t).total_milliseconds() << " milliseconds\n";
  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x308, %rsp            # imm = 0x308
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r13
callq 0x1889e
movq %rax, 0x38(%rsp)
movq %r13, %rdi
callq 0x188aa
movb %bpl, 0x60(%r13)
leaq 0x100(%rsp), %rdi
pushq $0x8
popq %rdx
movq %r14, %rsi
callq 0xe950
movq 0x100(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x120(%rsp,%rax)
jne 0x106c0
leaq 0x30113(%rip), %rsi     # 0x40555
pushq $-0x1
popq %rdx
movq %r14, %rdi
callq 0xe4f0
movq %rax, %r15
leaq 0x30399(%rip), %rsi     # 0x407f0
movq %r14, %rdi
xorl %edx, %edx
callq 0xeaf0
leal 0x1(%r15), %edx
notl %r15d
addl %eax, %r15d
leaq 0x80(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rcx
callq 0xe5b0
leaq 0x60(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0xe7a0
leaq 0x68(%r13), %rbp
leaq 0x60(%rsp), %rsi
movq %rbp, %rdi
callq 0xe300
leaq 0x60(%rsp), %rdi
callq 0xe290
leaq 0x100(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
callq 0xe340
leaq 0x28(%rsp), %rsi
movq %rax, %rdi
callq 0xe340
xorl %ebx, %ebx
leaq 0x100(%rsp), %r14
leaq 0x8(%rsp), %r15
leaq 0xe0(%rsp), %r12
cmpl 0x2c(%rsp), %ebx
jge 0x10531
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
andq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xe710
movq %r12, %rdi
movq %r15, %rsi
callq 0xe7a0
movq %r13, %rdi
movq %r12, %rsi
callq 0x187e0
movq %r12, %rdi
callq 0xe290
movq %r15, %rdi
callq 0xe290
incl %ebx
jmp 0x104e1
movq %rbp, 0x30(%rsp)
movq %r13, (%rsp)
xorl %r15d, %r15d
leaq 0x8(%rsp), %r12
leaq 0x40(%rsp), %r13
leaq 0xc0(%rsp), %rbp
leaq 0xa0(%rsp), %r14
xorl %ebx, %ebx
cmpl 0x28(%rsp), %ebx
jge 0x105f4
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
andq $0x0, 0x10(%rsp)
movb %r15b, 0x18(%rsp)
leaq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
andq $0x0, 0x48(%rsp)
movb %r15b, 0x50(%rsp)
leaq 0x100(%rsp), %rdi
movq %r12, %rsi
callq 0xe710
movq %rax, %rdi
movq %r13, %rsi
callq 0xe710
movq %rbp, %rdi
movq %r12, %rsi
callq 0xe7a0
movq %r14, %rdi
movq %r13, %rsi
callq 0xe7a0
movq (%rsp), %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x1883a
movq %r14, %rdi
callq 0xe290
movq %rbp, %rdi
callq 0xe290
movq %r13, %rdi
callq 0xe290
movq %r12, %rdi
callq 0xe290
incl %ebx
jmp 0x10559
leaq 0x100(%rsp), %rdi
movq (%rsp), %r13
callq 0xe140
movq 0x30(%rsp), %rbx
movq 0x6c987(%rip), %rdi     # 0x7cf98
leaq 0x301b3(%rip), %rsi     # 0x407cb
callq 0xe540
movq %rax, %r14
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0xe7a0
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0xe4a0
leaq 0x301b4(%rip), %rsi     # 0x407f5
movq %rax, %rdi
callq 0xe540
movq %rax, %r14
callq 0x1889e
leaq 0x40(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x38(%rsp), %rsi
callq 0x1c4fa
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
movq %r14, %rdi
movq %rax, %rsi
callq 0xe500
leaq 0x30162(%rip), %rsi     # 0x407e1
movq %rax, %rdi
callq 0xe540
leaq 0x8(%rsp), %rdi
callq 0xe290
leaq 0x80(%rsp), %rdi
callq 0xe290
leaq 0x100(%rsp), %rdi
callq 0xe170
movq %r13, %rax
addq $0x308, %rsp            # imm = 0x308
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x6c8d1(%rip), %rdi     # 0x7cf98
leaq 0x300b1(%rip), %rsi     # 0x4077f
callq 0xe540
movq %rax, %rdi
movq %r14, %rsi
callq 0xe4a0
leaq 0x2ff9e(%rip), %rsi     # 0x40683
movq %rax, %rdi
callq 0xe540
xorl %edi, %edi
callq 0xe6a0
jmp 0x1070a
movq %rax, %r14
jmp 0x10782
movq %rax, %r14
leaq 0x60(%rsp), %rdi
jmp 0x10764
jmp 0x10721
movq %rax, %r14
jmp 0x10793
movq %rax, %r14
jmp 0x107a0
jmp 0x1071c
movq %rax, %r14
jmp 0x10778
movq %rax, %r14
jmp 0x10786
movq %rax, %r14
leaq 0xa0(%rsp), %rdi
callq 0xe290
jmp 0x1073b
movq %rax, %r14
leaq 0xc0(%rsp), %rdi
callq 0xe290
jmp 0x1076e
movq %rax, %r14
leaq 0xe0(%rsp), %rdi
callq 0xe290
jmp 0x1075f
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0xe290
jmp 0x10786
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0xe290
leaq 0x8(%rsp), %rdi
callq 0xe290
movq (%rsp), %r13
leaq 0x80(%rsp), %rdi
callq 0xe290
leaq 0x100(%rsp), %rdi
callq 0xe170
movq %r13, %rdi
callq 0x18906
movq %r14, %rdi
callq 0xe9f0