// File: /workspace/github_cpp_makefile_star2_O1/pollo[P]graph-partitioning/graph.cpp
// Function: Graph::get_nodes_bfs(std::vector<int, std::allocator<int>>*) const
void Graph::get_nodes_bfs(vector<int>* nodes) const {
  vector<bool> visited(counted_nodes_number, false);
  queue<int> q;

  nodes->reserve(counted_nodes_number);

  for (int i=0; i<counted_nodes_number; i++)
  {
    if (!visited[i])
    {
      visited[i] = true;
      q.push(i);
      while (!q.empty())
      {
        int node = q.front();
        nodes->push_back(node);
        q.pop();
        for (vector<int>::const_iterator neighbor =
               get_neighbors(node).begin();
             neighbor != get_neighbors(node).end();
             ++neighbor)
        {
          if (!visited[*neighbor])
          {
            visited[*neighbor] = true;
            q.push(*neighbor);
          }
        }
      }
    }
  }

  printf("%d %d\n",counted_nodes_number, (int)nodes->size());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movslq 0x8(%rdi), %rsi
leaq 0x30(%rsp), %r15
movb $0x0, (%r15)
leaq 0x8(%rsp), %rdi
movq %rsp, %rcx
movq %r15, %rdx
callq 0x31fe
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%r15)
movaps %xmm0, 0x30(%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x38fc
movslq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x3266
movl $0x0, (%rsp)
movl 0x8(%r14), %esi
testl %esi, %esi
jle 0x2e12
xorl %eax, %eax
movabsq $-0x8000000000000000, %r12 # imm = 0x8000000000000000
leaq 0x3f(%r12), %r13
leaq 0x30(%rsp), %r15
movslq %eax, %rcx
leaq 0x3f(%rcx), %rdx
testq %rcx, %rcx
cmovnsq %rcx, %rdx
sarq $0x6, %rdx
shlq $0x3, %rdx
addq 0x8(%rsp), %rdx
movq %rcx, %rdi
andq %r13, %rdi
xorl %esi, %esi
cmpq %r12, %rdi
setbe %sil
movl $0x1, %edi
shlq %cl, %rdi
movq -0x8(%rdx,%rsi,8), %r8
btq %rcx, %r8
jae 0x2caa
movl (%rsp), %eax
incl %eax
movl %eax, (%rsp)
movl 0x8(%r14), %esi
cmpl %esi, %eax
jl 0x2c58
jmp 0x2e12
leaq -0x8(,%rsi,8), %rcx
orq %rdi, %r8
movq %r8, (%rdx,%rcx)
movq 0x60(%rsp), %rcx
movq 0x70(%rsp), %rdx
addq $-0x4, %rdx
cmpq %rdx, %rcx
je 0x2cd9
movl %eax, (%rcx)
addq $0x4, %rcx
movq %rcx, 0x60(%rsp)
jmp 0x2ce4
movq %r15, %rdi
movq %rsp, %rsi
callq 0x3a72
movq 0x40(%rsp), %rax
cmpq %rax, 0x60(%rsp)
je 0x2c95
movl (%rax), %eax
movl %eax, 0x4(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x2d0c
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2d19
movq %rbx, %rdi
leaq 0x4(%rsp), %rdx
callq 0x35ea
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x2d32
addq $0x4, %rax
jmp 0x2d64
movq 0x48(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x21c0
movq 0x58(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x58(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x48(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x50(%rsp)
movq %rax, 0x40(%rsp)
movslq 0x4(%rsp), %rax
movq 0x10(%r14), %rcx
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %rbp
cmpq 0x8(%rcx,%rax,8), %rbp
je 0x2ce4
movslq (%rbp), %rcx
leaq 0x3f(%rcx), %rax
testq %rcx, %rcx
cmovnsq %rcx, %rax
sarq $0x6, %rax
shlq $0x3, %rax
addq 0x8(%rsp), %rax
movq %rcx, %rsi
andq %r13, %rsi
xorl %edx, %edx
cmpq %r12, %rsi
setbe %dl
movl $0x1, %esi
shlq %cl, %rsi
movq -0x8(%rax,%rdx,8), %rdi
btq %rcx, %rdi
jb 0x2dfc
leaq -0x8(,%rdx,8), %rdx
orq %rdi, %rsi
movq %rsi, (%rax,%rdx)
movq 0x60(%rsp), %rax
movq 0x70(%rsp), %rdx
addq $-0x4, %rdx
cmpq %rdx, %rax
je 0x2df1
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x60(%rsp)
jmp 0x2dfc
movq %r15, %rdi
movq %rbp, %rsi
callq 0x3a72
addq $0x4, %rbp
movslq 0x4(%rsp), %rax
movq 0x10(%r14), %rcx
leaq (%rax,%rax,2), %rax
jmp 0x2d7a
movq 0x8(%rbx), %rdx
subq (%rbx), %rdx
shrq $0x2, %rdx
leaq 0x342c(%rip), %rdi      # 0x6250
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x2030
leaq 0x30(%rsp), %rdi
callq 0x3306
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2e65
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x21c0
movq %rbx, 0x8(%rsp)
movl %ebx, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
movl %ebx, 0x20(%rsp)
movq %rbx, 0x28(%rsp)
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2e82
movq %rax, %rbx
jmp 0x2e8f
jmp 0x2e82
jmp 0x2e82
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x3306
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2ebf
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x21c0
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movq %rbx, %rdi
callq 0x2280
nop