// File: /workspace/github_cpp_makefile_star2_O2/fjamour[P]icentral/src/graph_hash_t.cc
// Function: graph_hash_t::conn_comp_sizes(std::vector<int, std::allocator<int>>&)
void graph_hash_t::conn_comp_sizes(vector<int>& out_vec)
{
    out_vec.clear();
    tr1::unordered_map<node_id_t, bool> visited_map;
    for(nodes_map_t::iterator it = nodes_map.begin(); it != nodes_map.end(); ++it) {
        visited_map.insert(make_pair(it->first, false));
    }
    for(tr1::unordered_map<node_id_t, bool>::iterator it = visited_map.begin(); it != visited_map.end(); ++it) {
        if(!it->second) {
            node_id_t s = it->first;
            it->second = true;
            out_vec.push_back(1);
            //do a BFS from s, count the number of vertices, and mark the visited
            queue<node_id_t> q;
            q.push(s);
            while(!q.empty()) {
                node_id_t node = q.front(); q.pop();
                for(int i = 0; i < nodes_map[node].nbrs_vec.size(); ++i) {
                    node_id_t nbr = nodes_map[node].nbrs_vec[i];
                    if(!visited_map[nbr]) {
                        visited_map[nbr] = true;
                        q.push(nbr);
                        out_vec.back() = out_vec.back()+1;
                    }
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x17874
movq %rax, 0x8(%rbx)
leaq 0x28(%rsp), %rdi
pushq $0xa
popq %rsi
leaq 0x58(%rsp), %rdx
leaq 0x18(%rsp), %rcx
leaq 0x8(%rsp), %r8
callq 0x119a2
movq %r14, %rdi
callq 0xb11c
leaq 0x18(%rsp), %r15
movq %rax, (%r15)
movq %rdx, 0x8(%r15)
leaq 0x58(%rsp), %r12
leaq 0x28(%rsp), %r13
leaq 0x8(%rsp), %rbp
movq 0x8(%r14), %rcx
movq 0x10(%r14), %rdx
cmpq (%rcx,%rdx,8), %rax
je 0x178e9
movl (%rax), %eax
movl %eax, 0x8(%rsp)
movb $0x0, 0xc(%rsp)
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x188e4
movq %r15, %rdi
callq 0xbdd6
movq 0x18(%rsp), %rax
jmp 0x178b3
leaq 0x28(%rsp), %rdi
callq 0x182ce
leaq 0x18(%rsp), %rcx
movq %rax, (%rcx)
movq %rdx, 0x8(%rcx)
leaq 0x14(%rsp), %rbp
leaq 0x28(%rsp), %r13
leaq 0x10(%rsp), %r15
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %rdx
cmpq (%rcx,%rdx,8), %rax
je 0x17a0b
cmpb $0x0, 0x4(%rax)
jne 0x179f7
movl (%rax), %ecx
movl %ecx, 0x8(%rsp)
movb $0x1, 0x4(%rax)
movl $0x1, 0x58(%rsp)
movq %rbx, %rdi
leaq 0x58(%rsp), %r12
movq %r12, %rsi
callq 0x16ec8
movq %r12, %rdi
callq 0x4a40
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
callq 0x62da
movq 0x68(%rsp), %rax
cmpq %rax, 0x88(%rsp)
je 0x179ed
movl (%rax), %eax
movl %eax, 0x14(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x650e
xorl %r12d, %r12d
movq %r14, %rdi
movq %rbp, %rsi
callq 0xf182
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x2, %rcx
cmpq %r12, %rcx
jbe 0x17963
movq %r14, %rdi
movq %rbp, %rsi
callq 0xf182
movq (%rax), %rax
movl (%rax,%r12,4), %eax
movl %eax, 0x10(%rsp)
movq %r13, %rdi
movq %r15, %rsi
callq 0x18300
cmpb $0x0, (%rax)
jne 0x179e8
movq %r13, %rdi
movq %r15, %rsi
callq 0x18300
movb $0x1, (%rax)
leaq 0x58(%rsp), %rdi
movq %r15, %rsi
callq 0x62da
movq 0x8(%rbx), %rax
incl -0x4(%rax)
incq %r12
jmp 0x17985
leaq 0x58(%rsp), %rdi
callq 0x5280
leaq 0x18(%rsp), %rdi
callq 0x18b08
movq 0x18(%rsp), %rax
jmp 0x1790e
leaq 0x28(%rsp), %rdi
callq 0x1187a
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x17a31
jmp 0x17a31
jmp 0x17a31
jmp 0x17a38
jmp 0x17a31
movq %rax, %rbx
jmp 0x17a45
jmp 0x17a38
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x5280
leaq 0x28(%rsp), %rdi
callq 0x1187a
movq %rbx, %rdi
callq 0x23d0
nop