// File: /workspace/github_cpp_makefile_star2_O1/guitld[P]Graph-Algorithms/source/Graph.cpp
// Function: Graph::DFS_Util_Connected_Components(int, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&)
void Graph::DFS_Util_Connected_Components(int u, vector <int> &visitedNodes, vector <int> &componentsSize){
     if (adj_lists.find(u) == adj_lists.end()){
          cout << "Vértice não se encontra no grafo" << endl;
     }

     vector <int> visited;
     stack <int> stack;
     stack.push(u);
     visited.push_back(u);

     while (!stack.empty()){
          int curr_v = stack.top();
          stack.pop();

          for (auto const &neighbor : adj_lists[curr_v]){
               if (find(visited.begin(), visited.end(), neighbor.first) == visited.end()){
                    visited.push_back(neighbor.first);
                    stack.push(neighbor.first);
               }
          }    
     }
     componentsSize.push_back(visited.size());
     visitedNodes.insert(visitedNodes.end(), visited.begin(), visited.end());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rcx, %r15
movq %rdx, %r14
movl %esi, -0x30(%rbp)
movslq %esi, %rax
movq (%rdi), %r9
movq %rdi, -0xc0(%rbp)
movq 0x8(%rdi), %r8
xorl %r10d, %r10d
xorl %edx, %edx
divq %r8
movq (%r9,%rdx,8), %rax
testq %rax, %rax
je 0x3e92
movq (%rax), %r9
movq %rax, %r10
cmpl %esi, 0x8(%r9)
je 0x3e92
movq %rdx, %rcx
movq %r9, %r11
movq (%r9), %r9
testq %r9, %r9
je 0x3e8f
movslq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %r10d
cmpq %rcx, %rdx
jne 0x3e92
movq %r11, %r10
cmpl %esi, %edi
jne 0x3e64
jmp 0x3e92
xorl %r10d, %r10d
testq %r10, %r10
je 0x3e9d
cmpq $0x0, (%r10)
jne 0x3edf
movq 0x612c(%rip), %rbx      # 0x9fd0
leaq 0x31b5(%rip), %rsi      # 0x7060
movl $0x22, %edx
movq %rbx, %rdi
callq 0x2180
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
leaq -0xb0(%rbp), %rdi
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0x54fe
movq %r15, -0xb8(%rbp)
movq %r14, -0x58(%rbp)
movq -0x80(%rbp), %rax
movq -0x70(%rbp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x3f3a
movl -0x30(%rbp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, -0x80(%rbp)
jmp 0x3f4a
leaq -0xb0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x56a4
movq -0x48(%rbp), %rsi
cmpq -0x40(%rbp), %rsi
je 0x3f63
movl -0x30(%rbp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x48(%rbp)
jmp 0x3f70
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x58b6
movq -0x80(%rbp), %rax
cmpq -0xa0(%rbp), %rax
je 0x4082
leaq -0x50(%rbp), %r13
leaq -0xb0(%rbp), %rbx
movq -0x78(%rbp), %rdi
cmpq %rdi, %rax
je 0x3fa1
movl -0x4(%rax), %ecx
addq $-0x4, %rax
movl %ecx, -0x2c(%rbp)
jmp 0x3fe3
movq -0x68(%rbp), %rax
movq -0x8(%rax), %rax
movl 0x1fc(%rax), %eax
movl %eax, -0x2c(%rbp)
movl $0x200, %esi            # imm = 0x200
callq 0x2160
movq -0x68(%rbp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, -0x68(%rbp)
movq -0x8(%rax), %rax
movq %rax, -0x78(%rbp)
leaq 0x200(%rax), %rcx
movq %rcx, -0x70(%rbp)
movl $0x1fc, %ecx            # imm = 0x1FC
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0xc0(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x4ed4
movq %rax, %r14
movq (%rax), %r15
cmpq %r14, %r15
je 0x4071
leaq 0x10(%r15), %r12
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq %r12, %rdx
callq 0x59d8
movq -0x48(%rbp), %rsi
cmpq %rsi, %rax
jne 0x406c
cmpq -0x40(%rbp), %rsi
je 0x4035
movl (%r12), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x48(%rbp)
jmp 0x4040
movq %r13, %rdi
movq %r12, %rdx
callq 0x58b6
movq -0x80(%rbp), %rax
movq -0x70(%rbp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x4061
movl (%r12), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, -0x80(%rbp)
jmp 0x406c
movq %rbx, %rdi
movq %r12, %rsi
callq 0x56a4
movq (%r15), %r15
jmp 0x3ffd
movq -0x80(%rbp), %rax
cmpq -0xa0(%rbp), %rax
jne 0x3f8c
movq -0x48(%rbp), %rax
subq -0x50(%rbp), %rax
shrq $0x2, %rax
movl %eax, -0x2c(%rbp)
movq -0xb8(%rbp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x40b2
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
movq -0x58(%rbp), %rdi
jmp 0x40bf
leaq -0x2c(%rbp), %rdx
callq 0x5a7a
movq -0x58(%rbp), %rdi
movq 0x8(%rdi), %rsi
movq -0x50(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x5b56
leaq -0xb0(%rbp), %rdi
callq 0x4d6a
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x40f1
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x2160
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4112
jmp 0x4112
jmp 0x4112
movq %rax, %rbx
jmp 0x4121
jmp 0x4112
jmp 0x4112
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x4d6a
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x4136
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x2160
movq %rbx, %rdi
callq 0x2260