// File: /workspace/github_cpp_makefile_star2_O3/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 0x10(%rsp), %r15
movb $0x0, (%r15)
leaq 0x60(%rsp), %rdi
leaq 0x8(%rsp), %rcx
movq %r15, %rdx
callq 0x31e8
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%r15)
movaps %xmm0, 0x30(%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x3906
movslq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x3250
movl $0x0, 0x8(%rsp)
movl 0x8(%r14), %esi
testl %esi, %esi
jle 0x2e2f
xorl %eax, %eax
movabsq $-0x8000000000000000, %r12 # imm = 0x8000000000000000
leaq 0x3f(%r12), %r13
leaq 0x10(%rsp), %r15
movslq %eax, %rcx
leal 0x3f(%rcx), %edx
testl %ecx, %ecx
cmovnsl %eax, %edx
sarl $0x6, %edx
movslq %edx, %rdx
shlq $0x3, %rdx
addq 0x60(%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
jb 0x2e19
leaq -0x8(,%rsi,8), %rcx
orq %rdi, %r8
movq %r8, (%rdx,%rcx)
movq 0x40(%rsp), %rdx
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rdx
je 0x2cc0
movl %eax, (%rdx)
addq $0x4, %rdx
movq %rdx, 0x40(%rsp)
jmp 0x2cd2
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
callq 0x3a7c
movq 0x40(%rsp), %rdx
movq 0x20(%rsp), %rcx
cmpq %rcx, %rdx
je 0x2e19
movl (%rcx), %eax
movl %eax, 0xc(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x2cfc
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2d09
movq %rbx, %rdi
leaq 0xc(%rsp), %rdx
callq 0x35ee
movq 0x20(%rsp), %rcx
movq 0x30(%rsp), %rax
addq $-0x4, %rax
cmpq %rax, %rcx
je 0x2d22
addq $0x4, %rcx
jmp 0x2d54
movq 0x28(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x21c0
movq 0x38(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x38(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x28(%rsp)
leaq 0x200(%rcx), %rax
movq %rax, 0x30(%rsp)
movq %rcx, 0x20(%rsp)
movslq 0xc(%rsp), %rdx
movq 0x10(%r14), %rax
leaq (%rdx,%rdx,2), %rdx
movq (%rax,%rdx,8), %rbp
cmpq 0x8(%rax,%rdx,8), %rbp
je 0x2e0e
movslq (%rbp), %rcx
leal 0x3f(%rcx), %edx
testq %rcx, %rcx
cmovnsl %ecx, %edx
sarl $0x6, %edx
movslq %edx, %rdx
shlq $0x3, %rdx
addq 0x60(%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
jb 0x2df1
leaq -0x8(,%rsi,8), %rsi
orq %r8, %rdi
movq %rdi, (%rdx,%rsi)
movq 0x40(%rsp), %rdx
movq 0x50(%rsp), %rsi
addq $-0x4, %rsi
cmpq %rsi, %rdx
je 0x2de2
movl %ecx, (%rdx)
addq $0x4, %rdx
movq %rdx, 0x40(%rsp)
jmp 0x2df1
movq %r15, %rdi
movq %rbp, %rsi
callq 0x3a7c
movq 0x10(%r14), %rax
addq $0x4, %rbp
movslq 0xc(%rsp), %rcx
leaq (%rcx,%rcx,2), %rcx
cmpq 0x8(%rax,%rcx,8), %rbp
jne 0x2d75
movq 0x20(%rsp), %rcx
cmpq %rcx, 0x40(%rsp)
jne 0x2ce0
movl 0x8(%rsp), %eax
incl %eax
movl %eax, 0x8(%rsp)
movl 0x8(%r14), %esi
cmpl %esi, %eax
jl 0x2c51
movq 0x8(%rbx), %rdx
subq (%rbx), %rdx
shrq $0x2, %rdx
leaq 0x340f(%rip), %rdi      # 0x6250
xorl %eax, %eax
callq 0x2030
leaq 0x10(%rsp), %rdi
callq 0x32f6
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x2e6c
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x21c0
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2e89
movq %rax, %rbx
jmp 0x2e96
jmp 0x2e89
jmp 0x2e89
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x32f6
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x2eb0
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x2280