// File: /workspace/github_cpp_makefile_star2_O2/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, -0x30(%rbp)
leaq -0x2f8(%rbp), %rbx
pushq $0x8
popq %rdx
movq %rbx, %rdi
callq 0x21f0
leaq -0x80(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
leaq -0xc0(%rbp), %rdx
movq %rdx, -0x10(%rdx)
andq $0x0, -0x8(%rdx)
movb %cl, (%rax)
movb %cl, (%rdx)
leaq -0x60(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
leaq -0x40(%rbp), %rdx
movq %rdx, -0x10(%rdx)
andq $0x0, -0x8(%rdx)
movb %cl, (%rax)
movb %cl, (%rdx)
leaq -0xa0(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
leaq -0x90(%rbp), %rsi
movq %rbx, %rdi
callq 0x2050
leaq -0x2f8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x2050
movq -0xd0(%rbp), %rax
cmpb $0x41, 0x1(%rax)
jne 0x298b
leaq -0x90(%rbp), %r15
leaq -0xf0(%rbp), %rbx
pushq $0xa
popq %r13
leaq -0x2f8(%rbp), %rdi
movq %r15, %rsi
callq 0x2050
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2acd
movq -0x90(%rbp), %rax
movsbl (%rax), %eax
addl $-0x30, %eax
cmpl $0xa, %eax
jae 0x2856
movq %r15, %rdi
pushq $0x20
popq %r12
movl %r12d, %esi
xorl %edx, %edx
callq 0x2190
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x2160
leaq -0x70(%rbp), %rdi
movq %rbx, %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x20b0
movq -0x68(%rbp), %r14
leaq 0x1(%r14), %rdx
movq %r15, %rdi
movl %r12d, %esi
callq 0x2190
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %rcx
callq 0x2160
leaq -0x50(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x20b0
movq -0x50(%rbp), %rsi
movq %r14, %rdi
callq 0x2180
movq -0x48(%rbp), %r14
addq -0x68(%rbp), %r14
movq %r15, %rdi
movl %r13d, %esi
xorl %edx, %edx
callq 0x2190
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %rcx
callq 0x2160
leaq -0xb0(%rbp), %rdi
movq %rbx, %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x20b0
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl %r13d, %edx
callq 0x3a22
movl %eax, %r14d
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl %r13d, %edx
callq 0x3a22
movl %eax, %r12d
leaq -0xb0(%rbp), %rdi
xorl %esi, %esi
movl %r13d, %edx
callq 0x3a22
movq -0x30(%rbp), %rdi
movl %r14d, %esi
movl %r12d, %edx
movl %eax, %ecx
callq 0x2616
jmp 0x2856
leaq -0x90(%rbp), %r15
leaq -0xf0(%rbp), %r13
pushq $0xa
popq %rbx
leaq -0x2f8(%rbp), %rdi
movq %r15, %rsi
callq 0x2050
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2acd
movq -0x90(%rbp), %rax
movsbl (%rax), %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x299c
movq %r15, %rdi
pushq $0x20
popq %r12
movl %r12d, %esi
xorl %edx, %edx
callq 0x2190
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x2160
leaq -0x70(%rbp), %rdi
movq %r13, %rsi
callq 0x2170
movq %r13, %rdi
callq 0x20b0
movq -0x68(%rbp), %r14
leaq 0x1(%r14), %rdx
movq %r15, %rdi
movl %r12d, %esi
callq 0x2190
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %rcx
callq 0x2160
leaq -0x50(%rbp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x2170
movq %r13, %rdi
callq 0x20b0
movq -0x50(%rbp), %rsi
movq %r14, %rdi
callq 0x2180
movq -0x48(%rbp), %r14
addq -0x68(%rbp), %r14
movq %r15, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x2190
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %rcx
callq 0x2160
leaq -0xb0(%rbp), %rdi
movq %r13, %rsi
callq 0x2170
movq %r13, %rdi
callq 0x20b0
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl %ebx, %edx
callq 0x3a22
movl %eax, %r14d
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl %ebx, %edx
callq 0x3a22
movl %eax, %r12d
leaq -0xb0(%rbp), %rdi
xorl %esi, %esi
movl %ebx, %edx
callq 0x3a22
movq -0x30(%rbp), %rdi
movl %r14d, %esi
movl %r12d, %edx
movl %eax, %ecx
callq 0x259c
jmp 0x299c
leaq -0x2f8(%rbp), %rdi
callq 0x2060
leaq -0xb0(%rbp), %rdi
callq 0x20b0
leaq -0x50(%rbp), %rdi
callq 0x20b0
leaq -0x70(%rbp), %rdi
callq 0x20b0
leaq -0xd0(%rbp), %rdi
callq 0x20b0
leaq -0x90(%rbp), %rdi
callq 0x20b0
leaq -0x2f8(%rbp), %rdi
callq 0x2070
addq $0x2d8, %rsp            # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2b41
jmp 0x2b41
jmp 0x2b41
jmp 0x2b41
jmp 0x2b41
jmp 0x2b41
jmp 0x2b41
jmp 0x2b41
jmp 0x2b41
jmp 0x2b41
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x20b0
leaq -0x50(%rbp), %rdi
callq 0x20b0
leaq -0x70(%rbp), %rdi
callq 0x20b0
leaq -0xd0(%rbp), %rdi
callq 0x20b0
leaq -0x90(%rbp), %rdi
callq 0x20b0
leaq -0x2f8(%rbp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2240