// File: 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:
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rdi, 0x1f0(%rsp)
movq %rsi, 0x1e8(%rsp)
movq 0x1f0(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0x1e8(%rsp), %rdi
callq 0x543e0
leaq 0x1b5(%rsp), %rdi
movq %rdi, 0xc0(%rsp)
callq 0x42720
movq 0xc0(%rsp), %r8
leaq 0x1b8(%rsp), %rdi
movl $0xa, %esi
leaq 0x1b7(%rsp), %rdx
leaq 0x1b6(%rsp), %rcx
callq 0x42730
jmp 0x52ac5
leaq 0x1b5(%rsp), %rdi
callq 0x42770
movq 0xb8(%rsp), %rdi
callq 0x2d6b0
movq %rdx, 0xa8(%rsp)
movq %rax, 0xb0(%rsp)
jmp 0x52af1
movq 0xa8(%rsp), %rax
movq 0xb0(%rsp), %rcx
movq %rcx, 0x190(%rsp)
movq %rax, 0x198(%rsp)
movq 0xb8(%rsp), %rdi
callq 0x2d710
movq %rdx, 0x98(%rsp)
movq %rax, 0xa0(%rsp)
jmp 0x52b30
movq 0x98(%rsp), %rax
movq 0xa0(%rsp), %rcx
movq %rcx, 0x180(%rsp)
movq %rax, 0x188(%rsp)
leaq 0x190(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0x2d6f0
movb %al, 0x97(%rsp)
jmp 0x52b6e
movb 0x97(%rsp), %al
testb $0x1, %al
jne 0x52b7e
jmp 0x52c63
leaq 0x190(%rsp), %rdi
callq 0x2d750
movq %rax, 0x88(%rsp)
jmp 0x52b95
movq 0x88(%rsp), %rdi
movb $0x0, 0x16f(%rsp)
leaq 0x16f(%rsp), %rsi
callq 0x54430
movq %rax, 0x80(%rsp)
jmp 0x52bbc
movq 0x80(%rsp), %rax
movl %eax, %ecx
movl %ecx, 0x170(%rsp)
shrq $0x20, %rax
movb %al, 0x174(%rsp)
leaq 0x178(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x54460
jmp 0x52bef
leaq 0x150(%rsp), %rdi
leaq 0x1b8(%rsp), %rsi
leaq 0x178(%rsp), %rdx
callq 0x54400
jmp 0x52c0e
jmp 0x52c10
leaq 0x190(%rsp), %rdi
callq 0x2d760
jmp 0x52c1f
jmp 0x52b11
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a8(%rsp)
movl %eax, 0x1a4(%rsp)
leaq 0x1b5(%rsp), %rdi
callq 0x42770
jmp 0x52f8b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a8(%rsp)
movl %eax, 0x1a4(%rsp)
jmp 0x52f7e
leaq 0x1b8(%rsp), %rdi
callq 0x54490
movq %rdx, 0x70(%rsp)
movq %rax, 0x78(%rsp)
jmp 0x52c7c
movq 0x70(%rsp), %rax
movq 0x78(%rsp), %rcx
movq %rcx, 0x140(%rsp)
movq %rax, 0x148(%rsp)
leaq 0x1b8(%rsp), %rdi
callq 0x544f0
movq %rdx, 0x60(%rsp)
movq %rax, 0x68(%rsp)
jmp 0x52caf
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rcx
movq %rcx, 0x130(%rsp)
movq %rax, 0x138(%rsp)
leaq 0x140(%rsp), %rdi
leaq 0x130(%rsp), %rsi
callq 0x544d0
movb %al, 0x5f(%rsp)
jmp 0x52ce4
movb 0x5f(%rsp), %al
testb $0x1, %al
jne 0x52cf1
jmp 0x52f69
leaq 0x140(%rsp), %rdi
callq 0x54530
movq %rax, 0x50(%rsp)
jmp 0x52d05
movq 0x50(%rsp), %rax
testb $0x1, 0x4(%rax)
jne 0x52f53
leaq 0x140(%rsp), %rdi
callq 0x54530
movq %rax, 0x48(%rsp)
jmp 0x52d28
movq 0x48(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x12c(%rsp)
leaq 0x140(%rsp), %rdi
callq 0x54530
movq %rax, 0x40(%rsp)
jmp 0x52d4a
movq 0x40(%rsp), %rax
movb $0x1, 0x4(%rax)
movq 0x1e8(%rsp), %rdi
movl $0x1, 0x128(%rsp)
leaq 0x128(%rsp), %rsi
callq 0x4e1a0
jmp 0x52d75
leaq 0xd8(%rsp), %rdi
callq 0x10580
jmp 0x52d84
leaq 0xd8(%rsp), %rdi
leaq 0x12c(%rsp), %rsi
callq 0x105b0
jmp 0x52d9b
jmp 0x52d9d
leaq 0xd8(%rsp), %rdi
callq 0x105e0
movb %al, 0x3f(%rsp)
jmp 0x52db0
movb 0x3f(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x52dbf
jmp 0x52f46
leaq 0xd8(%rsp), %rdi
callq 0x10600
movq %rax, 0x30(%rsp)
jmp 0x52dd3
movq 0x30(%rsp), %rax
movl (%rax), %eax
movl %eax, 0xd4(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x10610
jmp 0x52df0
movl $0x0, 0xd0(%rsp)
movq 0xb8(%rsp), %rdi
movslq 0xd0(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0xd4(%rsp), %rsi
callq 0x3afc0
movq %rax, 0x28(%rsp)
jmp 0x52e24
movq 0x28(%rsp), %rdi
callq 0xfd50
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
jae 0x52f41
movq 0xb8(%rsp), %rdi
leaq 0xd4(%rsp), %rsi
callq 0x3afc0
movq %rax, 0x18(%rsp)
jmp 0x52e5b
movq 0x18(%rsp), %rdi
movslq 0xd0(%rsp), %rsi
callq 0xfbc0
movl (%rax), %eax
movl %eax, 0xcc(%rsp)
leaq 0x1b8(%rsp), %rdi
leaq 0xcc(%rsp), %rsi
callq 0x54540
movq %rax, 0x10(%rsp)
jmp 0x52e92
movq 0x10(%rsp), %rax
testb $0x1, (%rax)
jne 0x52f29
leaq 0x1b8(%rsp), %rdi
leaq 0xcc(%rsp), %rsi
callq 0x54540
movq %rax, 0x8(%rsp)
jmp 0x52ebc
movq 0x8(%rsp), %rax
movb $0x1, (%rax)
leaq 0xd8(%rsp), %rdi
leaq 0xcc(%rsp), %rsi
callq 0x105b0
jmp 0x52edb
movq 0x1e8(%rsp), %rdi
callq 0x4e210
movl (%rax), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
movq 0x1e8(%rsp), %rdi
callq 0x4e210
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
jmp 0x52f29
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a8(%rsp)
movl %eax, 0x1a4(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x10620
jmp 0x52f7e
jmp 0x52f2b
movl 0xd0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xd0(%rsp)
jmp 0x52dfb
jmp 0x52d9d
leaq 0xd8(%rsp), %rdi
callq 0x10620
jmp 0x52f55
leaq 0x140(%rsp), %rdi
callq 0x54650
jmp 0x52f64
jmp 0x52c96
leaq 0x1b8(%rsp), %rdi
callq 0x42780
addq $0x1f8, %rsp            # imm = 0x1F8
retq
leaq 0x1b8(%rsp), %rdi
callq 0x42780
movq 0x1a8(%rsp), %rdi
callq 0x9cf0
nopl (%rax,%rax)