// File: fjamour[P]icentral/src/qube.cc
// Function: graph_t::find_muc_subgraphs(unsigned int)
void graph_t::find_muc_subgraphs(muc_id_t muc_id) {
    //THIS IS SLOW, and not needed for the QUBE ideal speedup experiemtn
    //so just return if you want to do this experiment..
    //return;
    if (muc_vec[muc_id].muc_subgraph.size() == 1)
        return;
    if(!muc_vec[muc_id].valid)
        return;
    for (muc_t::conn_vert_map_t::iterator
        it = muc_vec[muc_id].conn_vertex_map.begin();
            it != muc_vec[muc_id].conn_vertex_map.end();
            ++it) {
        node_id_t conn_vert = it->first;
        graph_hash_t g;
        for (vector<node_id_t>::iterator it2 = it->second.begin();
                it2 != it->second.end(); ++it2) {
            node_id_t bfs_source = *it2;
            vector<bool> visited_vec;
            visited_vec.resize(size());
            fill(visited_vec.begin(), visited_vec.end(), false);
            visited_vec[bfs_source] = true;
            visited_vec[conn_vert] = true;
            queue<node_id_t> q;
            q.push(bfs_source);
            while (!q.empty()) {
                node_id_t node = q.front();
                q.pop();
                g.insert_node(node);
                for (int bfs_nbr_i = 0; bfs_nbr_i < get_nbrs(node).size(); ++bfs_nbr_i) {
                    node_id_t bfs_nbr = get_nbrs(node)[bfs_nbr_i];
                    if (!visited_vec[bfs_nbr]) {
                        q.push(bfs_nbr);
                        visited_vec[bfs_nbr] = true;
                        if (bfs_nbr != conn_vert) {
                            g.insert_edge(node, bfs_nbr);
                        }
                    }
                }
            }
        }
        muc_vec[muc_id].subgraph_map.insert(make_pair(conn_vert, g));
    }
}

// Assembly:
subq $0xa38, %rsp            # imm = 0xA38
movq %rdi, 0xa30(%rsp)
movl %esi, 0xa2c(%rsp)
movq 0xa30(%rsp), %rdi
movq %rdi, 0xa0(%rsp)
addq $0x60, %rdi
movl 0xa2c(%rsp), %eax
movl %eax, %esi
callq 0x4dcb0
movq %rax, %rdi
addq $0x60, %rdi
callq 0x52790
cmpq $0x1, %rax
jne 0x66f9f
jmp 0x67639
movq 0xa0(%rsp), %rdi
addq $0x60, %rdi
movl 0xa2c(%rsp), %eax
movl %eax, %esi
callq 0x4dcb0
testb $0x1, 0x30c(%rax)
jne 0x66fc7
jmp 0x67639
movq 0xa0(%rsp), %rdi
addq $0x60, %rdi
movl 0xa2c(%rsp), %eax
movl %eax, %esi
callq 0x4dcb0
movq %rax, %rdi
callq 0x6e360
movq %rax, 0xa18(%rsp)
movq %rdx, 0xa20(%rsp)
movq 0xa0(%rsp), %rdi
addq $0x60, %rdi
movl 0xa2c(%rsp), %eax
movl %eax, %esi
callq 0x4dcb0
movq %rax, %rdi
callq 0x6e3c0
movq %rax, 0xa08(%rsp)
movq %rdx, 0xa10(%rsp)
leaq 0xa18(%rsp), %rdi
leaq 0xa08(%rsp), %rsi
callq 0x6e3a0
testb $0x1, %al
jne 0x67049
jmp 0x67639
leaq 0xa18(%rsp), %rdi
movq %rdi, 0x90(%rsp)
callq 0x32f00
movl (%rax), %eax
movl %eax, 0xa04(%rsp)
leaq 0x758(%rsp), %rdi
callq 0x41780
movq 0x90(%rsp), %rdi
callq 0x32f00
movq %rax, 0x98(%rsp)
jmp 0x6708b
movq 0x98(%rsp), %rdi
addq $0x8, %rdi
callq 0x10cf0
movq %rax, 0x750(%rsp)
leaq 0xa18(%rsp), %rdi
callq 0x32f00
movq %rax, 0x88(%rsp)
jmp 0x670bb
movq 0x88(%rsp), %rdi
addq $0x8, %rdi
callq 0x10d20
movq %rax, 0x738(%rsp)
leaq 0x750(%rsp), %rdi
leaq 0x738(%rsp), %rsi
callq 0x55af0
testb $0x1, %al
jne 0x670f2
jmp 0x67538
leaq 0x750(%rsp), %rdi
callq 0x1fae0
movl (%rax), %eax
movl %eax, 0x734(%rsp)
leaq 0x708(%rsp), %rdi
callq 0x15640
movq 0xa0(%rsp), %rdi
callq 0x56b40
movq %rax, 0x80(%rsp)
jmp 0x6712c
movq 0x80(%rsp), %rsi
leaq 0x708(%rsp), %rdi
xorl %edx, %edx
callq 0x24c90
jmp 0x67145
leaq 0x708(%rsp), %rdi
movq %rdi, 0x78(%rsp)
callq 0x1f400
movq 0x78(%rsp), %rdi
movl %edx, 0x6f0(%rsp)
movq %rax, 0x6e8(%rsp)
movl 0x6f0(%rsp), %eax
movl %eax, 0x700(%rsp)
movq 0x6e8(%rsp), %rax
movq %rax, 0x6f8(%rsp)
callq 0x21fd0
movl %edx, 0x6d0(%rsp)
movq %rax, 0x6c8(%rsp)
movl 0x6d0(%rsp), %eax
movl %eax, 0x6e0(%rsp)
movq 0x6c8(%rsp), %rax
movq %rax, 0x6d8(%rsp)
movb $0x0, 0x6c7(%rsp)
movq 0x6f8(%rsp), %rdi
movl 0x700(%rsp), %esi
movq 0x6d8(%rsp), %rdx
movl 0x6e0(%rsp), %ecx
leaq 0x6c7(%rsp), %r8
callq 0x21f60
jmp 0x671f0
movl 0x734(%rsp), %eax
movl %eax, %esi
leaq 0x708(%rsp), %rdi
callq 0x10a70
movq %rdx, 0x68(%rsp)
movq %rax, 0x70(%rsp)
jmp 0x67212
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rcx
movq %rcx, 0x6b0(%rsp)
movq %rax, 0x6b8(%rsp)
leaq 0x6b0(%rsp), %rdi
movl $0x1, %esi
callq 0x10ad0
movl 0xa04(%rsp), %eax
movl %eax, %esi
leaq 0x708(%rsp), %rdi
callq 0x10a70
movq %rdx, 0x58(%rsp)
movq %rax, 0x60(%rsp)
jmp 0x67260
movq 0x58(%rsp), %rax
movq 0x60(%rsp), %rcx
movq %rcx, 0x6a0(%rsp)
movq %rax, 0x6a8(%rsp)
leaq 0x6a0(%rsp), %rdi
movl $0x1, %esi
callq 0x10ad0
leaq 0x650(%rsp), %rdi
callq 0x10580
jmp 0x6729b
leaq 0x650(%rsp), %rdi
leaq 0x734(%rsp), %rsi
callq 0x105b0
jmp 0x672b2
jmp 0x672b4
leaq 0x650(%rsp), %rdi
callq 0x105e0
movb %al, 0x57(%rsp)
jmp 0x672c7
movb 0x57(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x672d6
jmp 0x674fa
leaq 0x650(%rsp), %rdi
callq 0x10600
movq %rax, 0x48(%rsp)
jmp 0x672ea
movq 0x48(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x64c(%rsp)
leaq 0x650(%rsp), %rdi
callq 0x10610
jmp 0x67307
movl 0x64c(%rsp), %esi
leaq 0x758(%rsp), %rdi
callq 0x522c0
jmp 0x6731d
movl $0x0, 0x648(%rsp)
movq 0xa0(%rsp), %rdi
movslq 0x648(%rsp), %rax
movq %rax, 0x38(%rsp)
movl 0x64c(%rsp), %esi
callq 0x566f0
movq %rax, 0x40(%rsp)
jmp 0x67350
movq 0x40(%rsp), %rdi
callq 0xfd50
movq %rax, %rcx
movq 0x38(%rsp), %rax
cmpq %rcx, %rax
jae 0x674f5
movq 0xa0(%rsp), %rdi
movl 0x64c(%rsp), %esi
callq 0x566f0
movq %rax, 0x30(%rsp)
jmp 0x67386
movq 0x30(%rsp), %rdi
movslq 0x648(%rsp), %rsi
callq 0xfbc0
movl (%rax), %eax
movl %eax, 0x644(%rsp)
movl 0x644(%rsp), %eax
movl %eax, %esi
leaq 0x708(%rsp), %rdi
callq 0x10a70
movq %rdx, 0x20(%rsp)
movq %rax, 0x28(%rsp)
jmp 0x673c3
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, 0x630(%rsp)
movq %rax, 0x638(%rsp)
leaq 0x630(%rsp), %rdi
callq 0x10c20
xorb $-0x1, %al
testb $0x1, %al
jne 0x673f5
jmp 0x674dd
leaq 0x650(%rsp), %rdi
leaq 0x644(%rsp), %rsi
callq 0x105b0
jmp 0x6740c
movl 0x644(%rsp), %eax
movl %eax, %esi
leaq 0x708(%rsp), %rdi
callq 0x10a70
movq %rdx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
jmp 0x6742e
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rcx, 0x620(%rsp)
movq %rax, 0x628(%rsp)
leaq 0x620(%rsp), %rdi
movl $0x1, %esi
callq 0x10ad0
movl 0x644(%rsp), %eax
cmpl 0xa04(%rsp), %eax
je 0x674db
movl 0x64c(%rsp), %esi
movl 0x644(%rsp), %edx
leaq 0x758(%rsp), %rdi
callq 0x52420
jmp 0x67487
jmp 0x674db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x748(%rsp)
movl %eax, 0x744(%rsp)
jmp 0x6762a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x748(%rsp)
movl %eax, 0x744(%rsp)
jmp 0x67526
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x748(%rsp)
movl %eax, 0x744(%rsp)
leaq 0x650(%rsp), %rdi
callq 0x10620
jmp 0x67526
jmp 0x674dd
jmp 0x674df
movl 0x648(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x648(%rsp)
jmp 0x67328
jmp 0x672b4
leaq 0x650(%rsp), %rdi
callq 0x10620
leaq 0x708(%rsp), %rdi
callq 0x15650
leaq 0x750(%rsp), %rdi
callq 0x1fac0
jmp 0x670a4
leaq 0x708(%rsp), %rdi
callq 0x15650
jmp 0x6762a
movq 0xa0(%rsp), %rdi
addq $0x60, %rdi
movl 0xa2c(%rsp), %eax
movl %eax, %esi
callq 0x4dcb0
addq $0x30, %rax
movq %rax, 0x8(%rsp)
leaq 0xc0(%rsp), %rdi
leaq 0xa04(%rsp), %rsi
leaq 0x758(%rsp), %rdx
callq 0x6e430
jmp 0x6757a
leaq 0x370(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x6e470
jmp 0x67591
movq 0x8(%rsp), %rsi
leaq 0xa8(%rsp), %rdi
leaq 0x370(%rsp), %rdx
callq 0x6e400
jmp 0x675ad
leaq 0x370(%rsp), %rdi
callq 0x5feb0
leaq 0xc0(%rsp), %rdi
callq 0x6e4b0
leaq 0x758(%rsp), %rdi
callq 0x41f20
leaq 0xa18(%rsp), %rdi
callq 0x6e4d0
jmp 0x66ff9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x748(%rsp)
movl %eax, 0x744(%rsp)
jmp 0x6761d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x748(%rsp)
movl %eax, 0x744(%rsp)
leaq 0x370(%rsp), %rdi
callq 0x5feb0
leaq 0xc0(%rsp), %rdi
callq 0x6e4b0
leaq 0x758(%rsp), %rdi
callq 0x41f20
jmp 0x67641
addq $0xa38, %rsp            # imm = 0xA38
retq
movq 0x748(%rsp), %rdi
callq 0x9cf0
nop