// File: /workspace/github_cpp_makefile_star2_O3/guitld[P]Graph-Algorithms/source/Graph.cpp
// Function: Graph::fromPajek(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Graph::fromPajek(string filename){

     ifstream pajekFile(filename);

     string line;
     string directed;
     string token1;
     string token2;
     string token3;
     getline(pajekFile, line);
     getline(pajekFile, directed);

     // 'Arcs' represents a directed graph
     if (directed[1] == 'A'){
          while (getline(pajekFile, line)){
               if(!isdigit(line[0])) continue;
               token1 = line.substr(0, line.find(' '));
               token2 = line.substr(token1.size(), line.find(' ', token1.size() + 1));
               token2.erase(token2.begin());
               token3 = line.substr(token1.size() + token2.size(), line.find('\n'));
               this->add_directed_edge(stoi(token1), stoi(token2), stoi(token3));
          }
          pajekFile.close();
     }
     // 'Edges' representes an undirected graph 
     else {
          while (getline(pajekFile, line)){
               if(!isdigit(line[0])) continue;  
               token1 = line.substr(0, line.find(' '));
               token2 = line.substr(token1.size(), line.find(' ', token1.size() + 1));
               token2.erase(token2.begin());
               token3 = line.substr(token1.size() + token2.size(), line.find('\n'));
               this->addEdge(stoi(token1), stoi(token2), stoi(token3));
          }
          pajekFile.close();
     }


}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2d8, %rsp            # imm = 0x2D8
movq %rdi, -0xd8(%rbp)
leaq -0x300(%rbp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x2210
leaq -0x38(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0xe8(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0xc0(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0xa0(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x78(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %edx
leaq -0x300(%rbp), %rbx
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x2280
movq -0x300(%rbp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %edx
leaq -0x300(%rbp), %rbx
leaq -0xf8(%rbp), %rsi
movq %rbx, %rdi
callq 0x2280
movq -0xf8(%rbp), %rax
cmpb $0x41, 0x1(%rax)
leaq -0x58(%rbp), %r14
leaq -0x48(%rbp), %r15
leaq -0x68(%rbp), %r13
leaq -0xb0(%rbp), %r12
jne 0x2d4a
movq -0x300(%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2280
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2fcf
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
addl $-0x30, %eax
cmpl $0xa, %eax
jae 0x2ac5
movq %r15, %rdi
movl $0x20, %esi
xorl %edx, %edx
callq 0x21b0
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x2170
leaq -0xd0(%rbp), %rdi
movq %r13, %rsi
callq 0x21a0
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
je 0x2b4f
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xc8(%rbp), %rbx
leaq 0x1(%rbx), %rdx
movq %r15, %rdi
movl $0x20, %esi
callq 0x21b0
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x2170
movq %r12, %rdi
movq %r13, %rsi
callq 0x21a0
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
je 0x2b98
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2160
movl $0x1, %edx
movq %r12, %rdi
xorl %esi, %esi
callq 0x2190
movq -0xa8(%rbp), %rbx
addq -0xc8(%rbp), %rbx
movq %r15, %rdi
movl $0xa, %esi
xorl %edx, %edx
callq 0x21b0
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x2170
leaq -0x88(%rbp), %rdi
movq %r13, %rsi
callq 0x21a0
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
je 0x2bf9
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xd0(%rbp), %r14
callq 0x2040
movq %rax, %rbx
movl (%rax), %r15d
movl $0x0, (%rax)
movq %r14, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x21d0
cmpq %r14, -0x68(%rbp)
je 0x30dc
leaq -0x80000000(%rax), %rdx
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rdx
jb 0x30e8
movl (%rbx), %r12d
cmpl $0x22, %r12d
je 0x30e8
movq %rax, -0x90(%rbp)
testl %r12d, %r12d
jne 0x2c64
movl %r15d, (%rbx)
movl %r15d, %r12d
movq -0xb0(%rbp), %r15
movl $0x0, (%rbx)
movq %r15, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x21d0
cmpq %r15, -0x68(%rbp)
je 0x30c4
movq %rax, %r14
addq $-0x80000000, %rax      # imm = 0x80000000
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rax
jb 0x30d0
movl (%rbx), %r13d
cmpl $0x22, %r13d
je 0x30d0
testl %r13d, %r13d
jne 0x2cbf
movl %r12d, (%rbx)
movl %r12d, %r13d
movq -0x88(%rbp), %r15
movl $0x0, (%rbx)
movq %r15, %rdi
leaq -0x68(%rbp), %rsi
movl $0xa, %edx
callq 0x21d0
cmpq %r15, -0x68(%rbp)
je 0x30b8
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
leaq -0xb0(%rbp), %r12
jb 0x30f4
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x30f4
testl %ecx, %ecx
movq -0x90(%rbp), %rsi
jne 0x2d21
movl %r13d, (%rbx)
movq -0xd8(%rbp), %rdi
movl %r14d, %edx
movl %eax, %ecx
callq 0x27a8
leaq -0x300(%rbp), %rbx
leaq -0x58(%rbp), %r14
leaq -0x48(%rbp), %r15
leaq -0x68(%rbp), %r13
jmp 0x2ac5
movq -0x300(%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2280
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2fcf
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x2d4a
movq %r15, %rdi
movl $0x20, %esi
xorl %edx, %edx
callq 0x21b0
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x2170
leaq -0xd0(%rbp), %rdi
movq %r13, %rsi
callq 0x21a0
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
je 0x2dd4
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xc8(%rbp), %rbx
leaq 0x1(%rbx), %rdx
movq %r15, %rdi
movl $0x20, %esi
callq 0x21b0
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x2170
movq %r12, %rdi
movq %r13, %rsi
callq 0x21a0
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
je 0x2e1d
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2160
movl $0x1, %edx
movq %r12, %rdi
xorl %esi, %esi
callq 0x2190
movq -0xa8(%rbp), %rbx
addq -0xc8(%rbp), %rbx
movq %r15, %rdi
movl $0xa, %esi
xorl %edx, %edx
callq 0x21b0
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x2170
leaq -0x88(%rbp), %rdi
movq %r13, %rsi
callq 0x21a0
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
je 0x2e7e
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xd0(%rbp), %r14
callq 0x2040
movq %rax, %rbx
movl (%rax), %r15d
movl $0x0, (%rax)
movq %r14, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x21d0
cmpq %r14, -0x68(%rbp)
je 0x3094
leaq -0x80000000(%rax), %rdx
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rdx
jb 0x3100
movl (%rbx), %r12d
cmpl $0x22, %r12d
je 0x3100
movq %rax, -0x90(%rbp)
testl %r12d, %r12d
jne 0x2ee9
movl %r15d, (%rbx)
movl %r15d, %r12d
movq -0xb0(%rbp), %r15
movl $0x0, (%rbx)
movq %r15, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x21d0
cmpq %r15, -0x68(%rbp)
je 0x30a0
movq %rax, %r14
addq $-0x80000000, %rax      # imm = 0x80000000
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rax
jb 0x310c
movl (%rbx), %r13d
cmpl $0x22, %r13d
je 0x310c
testl %r13d, %r13d
jne 0x2f44
movl %r12d, (%rbx)
movl %r12d, %r13d
movq -0x88(%rbp), %r15
movl $0x0, (%rbx)
movq %r15, %rdi
leaq -0x68(%rbp), %rsi
movl $0xa, %edx
callq 0x21d0
cmpq %r15, -0x68(%rbp)
je 0x30ac
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
leaq -0xb0(%rbp), %r12
jb 0x3118
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x3118
testl %ecx, %ecx
movq -0x90(%rbp), %rsi
jne 0x2fa6
movl %r13d, (%rbx)
movq -0xd8(%rbp), %rdi
movl %r14d, %edx
movl %eax, %ecx
callq 0x2710
leaq -0x300(%rbp), %rbx
leaq -0x58(%rbp), %r14
leaq -0x48(%rbp), %r15
leaq -0x68(%rbp), %r13
jmp 0x2d4a
leaq -0x300(%rbp), %rdi
callq 0x2060
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x2ff7
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
leaq -0x38(%rbp), %rbx
je 0x301d
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x303f
movq -0xc0(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x3061
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x48(%rbp), %rdi
cmpq %rbx, %rdi
je 0x3076
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2160
leaq -0x300(%rbp), %rdi
callq 0x2070
addq $0x2d8, %rsp            # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3fe8(%rip), %rdi      # 0x7083
callq 0x20e0
leaq 0x3fdc(%rip), %rdi      # 0x7083
callq 0x20e0
leaq 0x3fd0(%rip), %rdi      # 0x7083
callq 0x20e0
leaq 0x3fc4(%rip), %rdi      # 0x7083
callq 0x20e0
leaq 0x3fb8(%rip), %rdi      # 0x7083
callq 0x20e0
leaq 0x3fac(%rip), %rdi      # 0x7083
callq 0x21e0
leaq 0x3fa0(%rip), %rdi      # 0x7083
callq 0x20e0
leaq 0x3f94(%rip), %rdi      # 0x7083
callq 0x21e0
leaq 0x3f88(%rip), %rdi      # 0x7083
callq 0x21e0
leaq 0x3f7c(%rip), %rdi      # 0x7083
callq 0x21e0
leaq 0x3f70(%rip), %rdi      # 0x7083
callq 0x21e0
leaq 0x3f64(%rip), %rdi      # 0x7083
callq 0x21e0
jmp 0x3165
jmp 0x3165
jmp 0x3165
jmp 0x3165
jmp 0x3165
jmp 0x3165
jmp 0x3165
jmp 0x3165
jmp 0x3165
jmp 0x313a
jmp 0x3156
movq %rax, %r14
cmpl $0x0, (%rbx)
jne 0x3168
movl %r13d, (%rbx)
jmp 0x3168
jmp 0x3149
movq %rax, %r14
cmpl $0x0, (%rbx)
jne 0x3168
movl %r12d, (%rbx)
jmp 0x3168
movq %rax, %r14
cmpl $0x0, (%rbx)
jne 0x3168
movl %r15d, (%rbx)
jmp 0x3168
jmp 0x3165
movq %rax, %r14
leaq -0x38(%rbp), %rbx
leaq -0x78(%rbp), %rax
movq -0x88(%rbp), %rdi
cmpq %rax, %rdi
je 0x3188
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x31aa
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x31cc
movq -0xc0(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x31ee
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x48(%rbp), %rdi
cmpq %rbx, %rdi
je 0x3203
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2160
leaq -0x300(%rbp), %rdi
callq 0x2070
movq %r14, %rdi
callq 0x2260
nop