// File: guitld[P]Graph-Algorithms/source/Graph.cpp
// Function: Graph::is_cyclic()
bool Graph::is_cyclic(){

     // Bool vector to mark nodes as visited
     vector<bool> visited (this->size(), false);

     // Looping through the nodes and use the recursive function to find a cycle or not
     for (auto &node : this->adj_lists){

          visited[node.first - 1] = true;

          for (auto &neighbor : node.second){
               if (is_cyclic_util(visited, neighbor.first))
                    return true;
          }
          visited[node.first - 1] = false;
     }
     return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x66f0
cltq
movq %rax, -0xf0(%rbp)
movb $0x0, -0x39(%rbp)
leaq -0x3a(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0x6710
movq -0xf0(%rbp), %rsi
movq -0xe8(%rbp), %rcx
leaq -0x38(%rbp), %rdi
leaq -0x39(%rbp), %rdx
callq 0x6730
jmp 0x4ea9
leaq -0x3a(%rbp), %rdi
callq 0x67b0
movq -0xf8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0x5970
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rdi
callq 0x59a0
movq %rax, -0x68(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x59d0
testb $0x1, %al
jne 0x4eed
jmp 0x50be
leaq -0x60(%rbp), %rdi
callq 0x5a00
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movl (%rax), %eax
decl %eax
movslq %eax, %rsi
leaq -0x38(%rbp), %rdi
callq 0x6460
movq %rdx, -0x108(%rbp)
movq %rax, -0x100(%rbp)
jmp 0x4f1e
movq -0x108(%rbp), %rax
movq -0x100(%rbp), %rcx
movq %rcx, -0x80(%rbp)
movq %rax, -0x78(%rbp)
leaq -0x80(%rbp), %rdi
movl $0x1, %esi
callq 0x64f0
movq -0x70(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
callq 0x5a70
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rdi
callq 0x5aa0
movq %rax, -0x98(%rbp)
leaq -0x90(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x5ad0
testb $0x1, %al
jne 0x4f93
jmp 0x5062
leaq -0x90(%rbp), %rdi
callq 0x5b00
movq %rax, -0xa0(%rbp)
leaq -0xc8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x6540
jmp 0x4fb8
movq -0xf8(%rbp), %rdi
movq -0xa0(%rbp), %rax
movl (%rax), %edx
leaq -0xc8(%rbp), %rsi
callq 0x4cc0
movb %al, -0x109(%rbp)
jmp 0x4fdc
leaq -0xc8(%rbp), %rdi
callq 0x66d0
movb -0x109(%rbp), %al
testb $0x1, %al
jne 0x4ff4
jmp 0x504f
movb $0x1, -0x1(%rbp)
movl $0x1, -0xcc(%rbp)
jmp 0x50cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x3a(%rbp), %rdi
callq 0x67b0
jmp 0x50ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x50e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x66d0
jmp 0x50e3
jmp 0x5051
leaq -0x90(%rbp), %rdi
callq 0x5b20
jmp 0x4f77
movq -0x70(%rbp), %rax
movl (%rax), %eax
decl %eax
movslq %eax, %rsi
leaq -0x38(%rbp), %rdi
callq 0x6460
movq %rdx, -0x120(%rbp)
movq %rax, -0x118(%rbp)
jmp 0x5086
movq -0x120(%rbp), %rax
movq -0x118(%rbp), %rcx
movq %rcx, -0xe0(%rbp)
movq %rax, -0xd8(%rbp)
leaq -0xe0(%rbp), %rdi
xorl %esi, %esi
callq 0x64f0
leaq -0x60(%rbp), %rdi
callq 0x5b40
jmp 0x4ed7
movb $0x0, -0x1(%rbp)
movl $0x1, -0xcc(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x66d0
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x66d0
movq -0x48(%rbp), %rdi
callq 0x22c0
nopw %cs:(%rax,%rax)