// File: /workspace/github_cpp_makefile_star2_O1/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, -0xd0(%rbp)
leaq -0x2f8(%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 -0xe0(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0xb8(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x98(%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 -0x2f8(%rbp), %rbx
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x2280
movq -0x2f8(%rbp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %edx
leaq -0x2f8(%rbp), %rbx
leaq -0xf0(%rbp), %rsi
movq %rbx, %rdi
callq 0x2280
movq -0xf0(%rbp), %rax
cmpb $0x41, 0x1(%rax)
leaq -0x58(%rbp), %r14
leaq -0x48(%rbp), %r15
leaq -0x68(%rbp), %r12
jne 0x2dc0
movq -0x2f8(%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 0x3038
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
addl $-0x30, %eax
cmpl $0xa, %eax
jae 0x2b48
movq %r15, %rdi
movl $0x20, %esi
xorl %edx, %edx
callq 0x21b0
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x2170
leaq -0xc8(%rbp), %rdi
movq %r12, %rsi
callq 0x21a0
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
je 0x2bd2
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xc0(%rbp), %rbx
leaq 0x1(%rbx), %rdx
movq %r15, %rdi
movl $0x20, %esi
callq 0x21b0
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x2170
leaq -0xa8(%rbp), %rdi
movq %r12, %rsi
callq 0x21a0
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
je 0x2c1f
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2160
movl $0x1, %edx
leaq -0xa8(%rbp), %rdi
xorl %esi, %esi
callq 0x2190
movq -0xa0(%rbp), %rbx
addq -0xc0(%rbp), %rbx
movq %r15, %rdi
movl $0xa, %esi
xorl %edx, %edx
callq 0x21b0
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x2170
leaq -0x88(%rbp), %rdi
movq %r12, %rsi
callq 0x21a0
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
je 0x2c84
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xc8(%rbp), %r14
callq 0x2040
movq %rax, %rbx
movl (%rax), %r15d
movl $0x0, (%rax)
movq %r14, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x21d0
cmpq %r14, -0x68(%rbp)
je 0x3145
movq %rax, %r13
addq $-0x80000000, %rax      # imm = 0x80000000
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rax
jb 0x3151
movl (%rbx), %eax
cmpl $0x22, %eax
je 0x3151
testl %eax, %eax
jne 0x2ce4
movl %r15d, (%rbx)
movq -0xa8(%rbp), %r15
movl (%rbx), %r12d
movl $0x0, (%rbx)
movq %r15, %rdi
leaq -0x68(%rbp), %rsi
movl $0xa, %edx
callq 0x21d0
cmpq %r15, -0x68(%rbp)
je 0x312d
movq %rax, %r14
addq $-0x80000000, %rax      # imm = 0x80000000
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rax
jb 0x3139
movl (%rbx), %eax
cmpl $0x22, %eax
je 0x3139
testl %eax, %eax
jne 0x2d3d
movl %r12d, (%rbx)
movq -0x88(%rbp), %r15
movl (%rbx), %r12d
movl $0x0, (%rbx)
movq %r15, %rdi
leaq -0x68(%rbp), %rsi
movl $0xa, %edx
callq 0x21d0
cmpq %r15, -0x68(%rbp)
je 0x3121
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
jb 0x315d
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x315d
testl %ecx, %ecx
jne 0x2d94
movl %r12d, (%rbx)
movq -0xd0(%rbp), %rdi
movl %r13d, %esi
movl %r14d, %edx
movl %eax, %ecx
callq 0x2834
leaq -0x2f8(%rbp), %rbx
leaq -0x58(%rbp), %r14
leaq -0x48(%rbp), %r15
leaq -0x68(%rbp), %r12
jmp 0x2b48
movq -0x2f8(%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 0x3038
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x2dc0
movq %r15, %rdi
movl $0x20, %esi
xorl %edx, %edx
callq 0x21b0
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x2170
leaq -0xc8(%rbp), %rdi
movq %r12, %rsi
callq 0x21a0
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
je 0x2e4a
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xc0(%rbp), %rbx
leaq 0x1(%rbx), %rdx
movq %r15, %rdi
movl $0x20, %esi
callq 0x21b0
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x2170
leaq -0xa8(%rbp), %rdi
movq %r12, %rsi
callq 0x21a0
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
je 0x2e97
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2160
movl $0x1, %edx
leaq -0xa8(%rbp), %rdi
xorl %esi, %esi
callq 0x2190
movq -0xa0(%rbp), %rbx
addq -0xc0(%rbp), %rbx
movq %r15, %rdi
movl $0xa, %esi
xorl %edx, %edx
callq 0x21b0
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x2170
leaq -0x88(%rbp), %rdi
movq %r12, %rsi
callq 0x21a0
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
je 0x2efc
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xc8(%rbp), %r14
callq 0x2040
movq %rax, %rbx
movl (%rax), %r15d
movl $0x0, (%rax)
movq %r14, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x21d0
cmpq %r14, -0x68(%rbp)
je 0x30fd
movq %rax, %r13
addq $-0x80000000, %rax      # imm = 0x80000000
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rax
jb 0x3169
movl (%rbx), %eax
cmpl $0x22, %eax
je 0x3169
testl %eax, %eax
jne 0x2f5c
movl %r15d, (%rbx)
movq -0xa8(%rbp), %r15
movl (%rbx), %r12d
movl $0x0, (%rbx)
movq %r15, %rdi
leaq -0x68(%rbp), %rsi
movl $0xa, %edx
callq 0x21d0
cmpq %r15, -0x68(%rbp)
je 0x3109
movq %rax, %r14
addq $-0x80000000, %rax      # imm = 0x80000000
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rax
jb 0x3175
movl (%rbx), %eax
cmpl $0x22, %eax
je 0x3175
testl %eax, %eax
jne 0x2fb5
movl %r12d, (%rbx)
movq -0x88(%rbp), %r15
movl (%rbx), %r12d
movl $0x0, (%rbx)
movq %r15, %rdi
leaq -0x68(%rbp), %rsi
movl $0xa, %edx
callq 0x21d0
cmpq %r15, -0x68(%rbp)
je 0x3115
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
jb 0x3181
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x3181
testl %ecx, %ecx
jne 0x300c
movl %r12d, (%rbx)
movq -0xd0(%rbp), %rdi
movl %r13d, %esi
movl %r14d, %edx
movl %eax, %ecx
callq 0x279c
leaq -0x2f8(%rbp), %rbx
leaq -0x58(%rbp), %r14
leaq -0x48(%rbp), %r15
leaq -0x68(%rbp), %r12
jmp 0x2dc0
leaq -0x2f8(%rbp), %rdi
callq 0x2060
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x3060
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
leaq -0x38(%rbp), %rbx
je 0x3086
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x30a8
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x30ca
movq -0xe0(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x48(%rbp), %rdi
cmpq %rbx, %rdi
je 0x30df
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2160
leaq -0x2f8(%rbp), %rdi
callq 0x2070
addq $0x2d8, %rsp            # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3f7f(%rip), %rdi      # 0x7083
callq 0x20e0
leaq 0x3f73(%rip), %rdi      # 0x7083
callq 0x20e0
leaq 0x3f67(%rip), %rdi      # 0x7083
callq 0x20e0
leaq 0x3f5b(%rip), %rdi      # 0x7083
callq 0x20e0
leaq 0x3f4f(%rip), %rdi      # 0x7083
callq 0x20e0
leaq 0x3f43(%rip), %rdi      # 0x7083
callq 0x21e0
leaq 0x3f37(%rip), %rdi      # 0x7083
callq 0x20e0
leaq 0x3f2b(%rip), %rdi      # 0x7083
callq 0x21e0
leaq 0x3f1f(%rip), %rdi      # 0x7083
callq 0x21e0
leaq 0x3f13(%rip), %rdi      # 0x7083
callq 0x21e0
leaq 0x3f07(%rip), %rdi      # 0x7083
callq 0x21e0
leaq 0x3efb(%rip), %rdi      # 0x7083
callq 0x21e0
jmp 0x31c3
jmp 0x31c3
jmp 0x31c3
jmp 0x31c3
jmp 0x31c3
jmp 0x31c3
jmp 0x31c3
jmp 0x31c3
jmp 0x31c3
jmp 0x31a7
jmp 0x31b4
jmp 0x31a7
jmp 0x31a7
movq %rax, %r14
cmpl $0x0, (%rbx)
jne 0x31c6
movl %r12d, (%rbx)
jmp 0x31c6
movq %rax, %r14
cmpl $0x0, (%rbx)
jne 0x31c6
movl %r15d, (%rbx)
jmp 0x31c6
jmp 0x31c3
movq %rax, %r14
leaq -0x38(%rbp), %rbx
leaq -0x78(%rbp), %rax
movq -0x88(%rbp), %rdi
cmpq %rax, %rdi
je 0x31e6
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x3208
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x322a
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x324c
movq -0xe0(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x48(%rbp), %rdi
cmpq %rbx, %rdi
je 0x3261
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2160
leaq -0x2f8(%rbp), %rdi
callq 0x2070
movq %r14, %rdi
callq 0x2260
nop