// File: Kingsford-Group[P]ghost2/src/readFromGexf.hpp
// Function: readFromGexf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool)
Graph readFromGexf(string fileName, bool directed)
{
  ptime t = bclock::local_time();
  Graph result;
  result.direct(directed);
  idtoval itv;
  ifstream fin(fileName);
  if(!fin.good()) {cout << "error loading file: " << fileName << "\n"; exit(0);}
  unsigned start = fileName.find_last_of("/");
  unsigned end = fileName.find(".gexf");
  if(start == string::npos) start = -1;
  string name = fileName.substr(start+1,end-start-1);
  result.setName(name);
  string atr = getAttribute(&fin);
  if(atr == "gname")
  {
    getNodes(&fin, &result, &itv);
    getEdges(&fin, &result, &itv);
  }
  else {cout << "ERROR: gexf does not have attribute gname\n"; exit(0);}
  fin.close();
  cout << "extracted: " << result.getName() << ".gexf in " <<
    (bclock::local_time() - t).total_milliseconds() << " milliseconds\n";
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x380, %rsp            # imm = 0x380
movq %rsi, -0x320(%rbp)
movq %rdi, -0x310(%rbp)
movb %dl, %al
movq %rdi, %rcx
movq %rcx, -0x318(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
callq 0x23b20
movq -0x310(%rbp), %rdi
movq %rax, -0x20(%rbp)
movb $0x0, -0x21(%rbp)
callq 0x23b50
movq -0x310(%rbp), %rdi
movzbl -0x11(%rbp), %esi
andl $0x1, %esi
callq 0x23bb0
jmp 0x13950
leaq -0x68(%rbp), %rdi
callq 0x23bd0
jmp 0x1395b
movq -0x320(%rbp), %rsi
leaq -0x270(%rbp), %rdi
movl $0x8, %edx
callq 0x10bd0
jmp 0x13975
movq -0x270(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x270(%rbp,%rax), %rdi
callq 0x10c60
movb %al, -0x321(%rbp)
jmp 0x13995
movb -0x321(%rbp), %al
testb $0x1, %al
jne 0x13a2c
jmp 0x139a5
movq 0x11d5ec(%rip), %rdi    # 0x130f98
leaq 0xa8d9c(%rip), %rsi     # 0xbc74f
callq 0x106c0
movq %rax, -0x330(%rbp)
jmp 0x139c1
movq -0x320(%rbp), %rsi
movq -0x330(%rbp), %rdi
callq 0x10600
movq %rax, -0x338(%rbp)
jmp 0x139dd
movq -0x338(%rbp), %rdi
leaq 0xa8c1c(%rip), %rsi     # 0xbc607
callq 0x106c0
jmp 0x139f2
xorl %edi, %edi
callq 0x10890
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x13d55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x13d2e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x13d22
movq -0x320(%rbp), %rdi
leaq 0xa8a9f(%rip), %rsi     # 0xbc4d9
movq $-0x1, %rdx
callq 0x10650
movq -0x320(%rbp), %rdi
movl %eax, -0x274(%rbp)
leaq 0xa8d0a(%rip), %rsi     # 0xbc764
xorl %eax, %eax
movl %eax, %edx
callq 0x10e30
movl %eax, -0x278(%rbp)
movl -0x274(%rbp), %eax
cmpq $-0x1, %rax
jne 0x13a7f
movl $0xffffffff, -0x274(%rbp) # imm = 0xFFFFFFFF
movq -0x320(%rbp), %rsi
movl -0x274(%rbp), %eax
movl %eax, %ecx
incl %ecx
movl %ecx, %edx
movl -0x278(%rbp), %ecx
notl %eax
addl %ecx, %eax
movl %eax, %ecx
leaq -0x298(%rbp), %rdi
callq 0x10740
jmp 0x13aac
leaq -0x2b8(%rbp), %rdi
leaq -0x298(%rbp), %rsi
callq 0x10300
jmp 0x13ac1
movq -0x310(%rbp), %rdi
leaq -0x2b8(%rbp), %rsi
callq 0x23c60
jmp 0x13ad6
leaq -0x2b8(%rbp), %rdi
callq 0x10460
leaq -0x2d8(%rbp), %rdi
leaq -0x270(%rbp), %rsi
callq 0x12b60
jmp 0x13af7
leaq 0xa8c6c(%rip), %rsi     # 0xbc76a
leaq -0x2d8(%rbp), %rdi
callq 0x233d0
movb %al, -0x339(%rbp)
jmp 0x13b12
movb -0x339(%rbp), %al
testb $0x1, %al
jne 0x13b1e
jmp 0x13b91
movq -0x310(%rbp), %rsi
leaq -0x270(%rbp), %rdi
leaq -0x68(%rbp), %rdx
callq 0x12f10
jmp 0x13b37
movq -0x310(%rbp), %rsi
leaq -0x270(%rbp), %rdi
leaq -0x68(%rbp), %rdx
callq 0x13400
jmp 0x13b50
jmp 0x13bad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x13d16
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x2b8(%rbp), %rdi
callq 0x10460
jmp 0x13d16
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x13d0a
movq 0x11d400(%rip), %rdi    # 0x130f98
leaq 0xa8bd1(%rip), %rsi     # 0xbc770
callq 0x106c0
jmp 0x13ba6
xorl %edi, %edi
callq 0x10890
leaq -0x270(%rbp), %rdi
callq 0x10170
jmp 0x13bbb
movq 0x11d3d6(%rip), %rdi    # 0x130f98
leaq 0xa8bd2(%rip), %rsi     # 0xbc79b
callq 0x106c0
movq %rax, -0x348(%rbp)
jmp 0x13bd7
movq -0x310(%rbp), %rsi
leaq -0x2f8(%rbp), %rdi
callq 0x23c90
jmp 0x13bec
movq -0x348(%rbp), %rdi
leaq -0x2f8(%rbp), %rsi
callq 0x10600
movq %rax, -0x350(%rbp)
jmp 0x13c08
movq -0x350(%rbp), %rdi
leaq 0xa8b91(%rip), %rsi     # 0xbc7a7
callq 0x106c0
movq %rax, -0x358(%rbp)
jmp 0x13c24
callq 0x23b20
movq %rax, -0x360(%rbp)
jmp 0x13c32
movq -0x360(%rbp), %rax
movq %rax, -0x308(%rbp)
leaq -0x308(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x23cc0
movq %rax, -0x368(%rbp)
jmp 0x13c59
movq -0x368(%rbp), %rax
movq %rax, -0x300(%rbp)
leaq -0x300(%rbp), %rdi
callq 0x23cf0
movq %rax, -0x370(%rbp)
jmp 0x13c7c
movq -0x370(%rbp), %rsi
movq -0x358(%rbp), %rdi
callq 0x10d40
movq %rax, -0x378(%rbp)
jmp 0x13c98
movq -0x378(%rbp), %rdi
leaq 0xa8b0b(%rip), %rsi     # 0xbc7b1
callq 0x106c0
jmp 0x13cad
leaq -0x2f8(%rbp), %rdi
callq 0x10460
movb $0x1, -0x21(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0x10460
leaq -0x298(%rbp), %rdi
callq 0x10460
leaq -0x270(%rbp), %rdi
callq 0x101b0
leaq -0x68(%rbp), %rdi
callq 0x23d30
testb $0x1, -0x21(%rbp)
jne 0x13d45
jmp 0x13d39
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x2f8(%rbp), %rdi
callq 0x10460
leaq -0x2d8(%rbp), %rdi
callq 0x10460
leaq -0x298(%rbp), %rdi
callq 0x10460
leaq -0x270(%rbp), %rdi
callq 0x101b0
leaq -0x68(%rbp), %rdi
callq 0x23d30
jmp 0x13d55
movq -0x310(%rbp), %rdi
callq 0x23d50
movq -0x318(%rbp), %rax
addq $0x380, %rsp            # imm = 0x380
popq %rbp
retq
movq -0x310(%rbp), %rdi
callq 0x23d50
movq -0x30(%rbp), %rdi
callq 0x10cc0
nopw (%rax,%rax)