// File: /workspace/github_cpp_makefile_star2_O1/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, %rbx
leaq 0x19c11(%rip), %rdi     # 0x29e54
callq 0x29d5e
movq %rax, 0x58(%rsp)
xorl %eax, %eax
movb %al, (%rbx)
movl $0x10, %ecx
movq %rcx, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movl $0x3f800000, %edx       # imm = 0x3F800000
movl %edx, 0x18(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movb %al, 0x30(%rbx)
movq %rcx, 0x38(%rbx)
movq %rax, 0x40(%rbx)
movl %edx, 0x48(%rbx)
movups %xmm0, 0x50(%rbx)
leaq 0x78(%rbx), %rcx
movq %rcx, 0x68(%rbx)
movq %rax, 0x70(%rbx)
movb %al, 0x78(%rbx)
movq %rbx, 0x28(%rsp)
movb %bpl, 0x60(%rbx)
leaq 0x100(%rsp), %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0xd920
movq 0x100(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x120(%rsp,%rax)
jne 0x106ab
leaq 0x39274(%rip), %rsi     # 0x49541
movl $0x1, %ecx
movq %r14, %rdi
movq $-0x1, %rdx
callq 0xdab0
movq %rax, %r15
leaq 0x394f1(%rip), %rsi     # 0x497dc
movl $0x4, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0xd9b0
leal 0x1(%r15), %edx
notl %r15d
addl %eax, %r15d
leaq 0xe0(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rcx
callq 0xd580
leaq 0xd0(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq 0xe0(%rsp), %rsi
movq 0xe8(%rsp), %rdx
addq %rsi, %rdx
leaq 0xc0(%rsp), %rdi
callq 0x28d6a
movq 0x28(%rsp), %rax
leaq 0x68(%rax), %rdi
leaq 0xc0(%rsp), %rsi
callq 0xd2d0
movq 0xc0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x10376
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0xd550
leaq 0x100(%rsp), %rdi
leaq 0x34(%rsp), %rsi
callq 0xd310
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0xd310
cmpl $0x0, 0x34(%rsp)
jle 0x10451
xorl %ebp, %ebp
leaq 0xb0(%rsp), %rbx
leaq 0x100(%rsp), %r14
leaq 0x8(%rsp), %r15
leaq 0xa0(%rsp), %r12
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xd700
movq %rbx, 0xa0(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x28d6a
movq 0x28(%rsp), %rdi
movq %r12, %rsi
callq 0x1d4ae
movq 0xa0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x10429
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0xd550
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x10445
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xd550
incl %ebp
cmpl 0x34(%rsp), %ebp
jl 0x103bf
cmpl $0x0, 0x30(%rsp)
jle 0x10581
leaq 0x90(%rsp), %r15
xorl %ebx, %ebx
leaq 0x70(%rsp), %r12
leaq 0x80(%rsp), %r13
leaq 0x60(%rsp), %rbp
xorl %r14d, %r14d
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movb %bl, 0x18(%rsp)
leaq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
movq %rbx, 0x40(%rsp)
movb %bl, 0x48(%rsp)
leaq 0x100(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xd700
movq %rax, %rdi
leaq 0x38(%rsp), %rsi
callq 0xd700
movq %r15, 0x80(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x28d6a
movq %r12, 0x60(%rsp)
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0x28d6a
movq 0x28(%rsp), %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1d516
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x1051e
movq 0x70(%rsp), %rsi
incq %rsi
callq 0xd550
movq 0x80(%rsp), %rdi
cmpq %r15, %rdi
je 0x1053b
movq 0x90(%rsp), %rsi
incq %rsi
callq 0xd550
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x10557
movq 0x48(%rsp), %rsi
incq %rsi
callq 0xd550
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x10573
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xd550
incl %r14d
cmpl 0x30(%rsp), %r14d
jl 0x1047b
leaq 0x100(%rsp), %rdi
callq 0xd140
movq 0x68a03(%rip), %rdi     # 0x78f98
leaq 0x3921b(%rip), %rsi     # 0x497b7
movl $0xb, %edx
callq 0xd620
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
movq 0x28(%rsp), %rax
movq 0x68(%rax), %rsi
movq 0x70(%rax), %rdx
addq %rsi, %rdx
callq 0x28d6a
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x689bf(%rip), %rdi     # 0x78f98
callq 0xd620
movq %rax, %r14
leaq 0x391f9(%rip), %rsi     # 0x497e1
movl $0x8, %edx
movq %rax, %rdi
callq 0xd620
leaq 0x19858(%rip), %rdi     # 0x29e54
callq 0x29d5e
leaq 0x38(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x58(%rsp), %rsi
callq 0x223a0
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
imulq %rcx
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x7, %rdx
addq %rdx, %rsi
movq %r14, %rdi
callq 0xd4c0
leaq 0x39190(%rip), %rsi     # 0x497cd
movl $0xe, %edx
movq %rax, %rdi
callq 0xd620
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x10666
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xd550
leaq 0xf0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10687
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0xd550
leaq 0x100(%rsp), %rdi
callq 0xd160
movq 0x28(%rsp), %rax
addq $0x308, %rsp            # imm = 0x308
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x688e6(%rip), %rdi     # 0x78f98
leaq 0x390b2(%rip), %rsi     # 0x4976b
movl $0x14, %edx
callq 0xd620
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x688c7(%rip), %rdi     # 0x78f98
callq 0xd620
leaq 0x38f92(%rip), %rsi     # 0x4966f
movq %rax, %rdi
callq 0xd500
xorl %edi, %edi
callq 0xd690
jmp 0x10713
jmp 0x10727
movq %rax, %r13
movq 0xc0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x107c7
movq 0xd0(%rsp), %rsi
jmp 0x107bf
jmp 0x10727
movq %rax, %r13
jmp 0x107e8
movq %rax, %r13
jmp 0x107f5
jmp 0x10787
jmp 0x10787
movq %rax, %r13
jmp 0x107c7
movq %rax, %r13
jmp 0x1074e
movq %rax, %r13
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x1074e
movq 0x70(%rsp), %rsi
incq %rsi
callq 0xd550
movq 0x80(%rsp), %rdi
cmpq %r15, %rdi
je 0x1078f
movq 0x90(%rsp), %rsi
incq %rsi
callq 0xd550
jmp 0x1078f
movq %rax, %r13
movq 0xa0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x107ab
movq 0xb0(%rsp), %rsi
jmp 0x107a3
movq %rax, %r13
jmp 0x107ab
movq %rax, %r13
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x107ab
movq 0x48(%rsp), %rsi
incq %rsi
callq 0xd550
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x107c7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xd550
leaq 0xf0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x107e8
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0xd550
leaq 0x100(%rsp), %rdi
callq 0xd160
movq 0x28(%rsp), %rdi
callq 0x1d582
movq %r13, %rdi
callq 0xd9c0
nop