// File: fjamour[P]icentral/src/qube.cc
// Function: graph_t::find_conn_verts()
void graph_t::find_conn_verts()
{
    for(muc_id_t m = 0; m < muc_vec.size(); ++m) {
        if(muc_vec[m].valid) {
            muc_vec[m].conn_vertex_map.clear();
            muc_vec[m].subgraph_map.clear();
        }
    }
    //find the connection vertices for each muc
    //edges that belong to the graph and don't belong
    //to any muc connect two connection vertices
    //1. collect all edges in mucs in one set
    //2. do simple subtraction of edges and update muc's
    set<edge_t> all_muc_edge_set;
    for(muc_id_t i = 0; i < muc_vec.size(); ++i) {
        if(muc_vec[i].valid) {
            set<edge_t>::iterator it1 = muc_vec[i].muc_subgraph.edge_set.begin();
            set<edge_t>::iterator it2 = muc_vec[i].muc_subgraph.edge_set.end();
            all_muc_edge_set.insert(it1, it2);        
        }
    }
    for(set<edge_t>::iterator it = edge_set.begin(); it != edge_set.end(); ++it) {
        edge_t edge   = *it;
        edge_t edge_r = make_pair(edge.second, edge.first);
        if(all_muc_edge_set.find(edge) == all_muc_edge_set.end() && all_muc_edge_set.find(edge_r) == all_muc_edge_set.end()) {//edge not in muc's, connects two connection vertices
            edge_t bridge_edge = *it;
            muc_id_t muc1_id = node_to_muc_vec[bridge_edge.first];
            muc_id_t muc2_id = node_to_muc_vec[bridge_edge.second];
            muc_vec[muc1_id].insert_conn_vertex(bridge_edge.first, bridge_edge.second);
            muc_vec[muc2_id].insert_conn_vertex(bridge_edge.second, bridge_edge.first);
        }
    }   
}

// Assembly:
subq $0x118, %rsp            # imm = 0x118
movq %rdi, 0x110(%rsp)
movq 0x110(%rsp), %rax
movq %rax, 0x48(%rsp)
movl $0x0, 0x10c(%rsp)
movq 0x48(%rsp), %rdi
movl 0x10c(%rsp), %eax
movq %rax, 0x40(%rsp)
addq $0x60, %rdi
callq 0x6e040
movq %rax, %rcx
movq 0x40(%rsp), %rax
cmpq %rcx, %rax
jae 0x66bf8
movq 0x48(%rsp), %rdi
addq $0x60, %rdi
movl 0x10c(%rsp), %eax
movl %eax, %esi
callq 0x4dcb0
testb $0x1, 0x30c(%rax)
je 0x66be0
movq 0x48(%rsp), %rdi
addq $0x60, %rdi
movl 0x10c(%rsp), %eax
movl %eax, %esi
callq 0x4dcb0
movq %rax, %rdi
callq 0x43350
movq 0x48(%rsp), %rdi
addq $0x60, %rdi
movl 0x10c(%rsp), %eax
movl %eax, %esi
callq 0x4dcb0
movq %rax, %rdi
addq $0x30, %rdi
callq 0x5fbd0
jmp 0x66be2
movl 0x10c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10c(%rsp)
jmp 0x66b57
leaq 0xd8(%rsp), %rdi
callq 0x155d0
movl $0x0, 0xd4(%rsp)
movq 0x48(%rsp), %rdi
movl 0xd4(%rsp), %eax
movq %rax, 0x38(%rsp)
addq $0x60, %rdi
callq 0x6e040
movq %rax, %rcx
movq 0x38(%rsp), %rax
cmpq %rcx, %rax
jae 0x66d3b
movq 0x48(%rsp), %rdi
addq $0x60, %rdi
movl 0xd4(%rsp), %eax
movl %eax, %esi
callq 0x4dcb0
testb $0x1, 0x30c(%rax)
je 0x66d23
movq 0x48(%rsp), %rdi
addq $0x60, %rdi
movq %rdi, 0x30(%rsp)
movl 0xd4(%rsp), %eax
movl %eax, %esi
callq 0x4dcb0
movq %rax, %rdi
addq $0x90, %rdi
callq 0x420d0
movq 0x30(%rsp), %rdi
movq %rax, 0xc8(%rsp)
movl 0xd4(%rsp), %eax
movl %eax, %esi
callq 0x4dcb0
movq %rax, %rdi
addq $0x90, %rdi
callq 0x54120
movq %rax, 0xc0(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0xb8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
leaq 0xd8(%rsp), %rdi
callq 0x6e320
jmp 0x66cfb
jmp 0x66d23
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x15670
jmp 0x66f35
jmp 0x66d25
movl 0xd4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xd4(%rsp)
jmp 0x66c10
movq 0x48(%rsp), %rdi
addq $0x30, %rdi
callq 0x420d0
movq %rax, 0x98(%rsp)
movq 0x48(%rsp), %rdi
addq $0x30, %rdi
callq 0x54120
movq %rax, 0x90(%rsp)
leaq 0x98(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x540c0
testb $0x1, %al
jne 0x66d85
jmp 0x66f20
leaq 0x98(%rsp), %rdi
callq 0x42100
movq (%rax), %rax
movq %rax, 0x88(%rsp)
leaq 0x8c(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x41730
movq %rax, 0x28(%rsp)
jmp 0x66db9
movq 0x28(%rsp), %rax
movq %rax, 0x80(%rsp)
leaq 0xd8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x540e0
movq %rax, 0x20(%rsp)
jmp 0x66de2
movq 0x20(%rsp), %rax
movq %rax, 0x78(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x54120
movq %rax, 0x70(%rsp)
leaq 0x78(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x55920
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x1f(%rsp)
jne 0x66e1c
jmp 0x66e67
leaq 0xd8(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x540e0
movq %rax, 0x10(%rsp)
jmp 0x66e38
movq 0x10(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x54120
movq %rax, 0x60(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x55920
movb %al, 0x1f(%rsp)
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x66e74
jmp 0x66f0c
leaq 0x98(%rsp), %rdi
callq 0x42100
movq 0x48(%rsp), %rdi
movq (%rax), %rax
movq %rax, 0x58(%rsp)
addq $0x18, %rdi
movq %rdi, 0x8(%rsp)
movl 0x58(%rsp), %eax
movl %eax, %esi
callq 0xfbc0
movq 0x8(%rsp), %rdi
movl (%rax), %eax
movl %eax, 0x54(%rsp)
movl 0x5c(%rsp), %eax
movl %eax, %esi
callq 0xfbc0
movq 0x48(%rsp), %rdi
movl (%rax), %eax
movl %eax, 0x50(%rsp)
addq $0x60, %rdi
movl 0x54(%rsp), %eax
movl %eax, %esi
callq 0x4dcb0
movq %rax, %rdi
movl 0x58(%rsp), %esi
movl 0x5c(%rsp), %edx
callq 0x68040
jmp 0x66ee4
movq 0x48(%rsp), %rdi
addq $0x60, %rdi
movl 0x50(%rsp), %eax
movl %eax, %esi
callq 0x4dcb0
movq %rax, %rdi
movl 0x58(%rsp), %edx
movl 0x5c(%rsp), %esi
callq 0x68040
jmp 0x66f0a
jmp 0x66f0c
jmp 0x66f0e
leaq 0x98(%rsp), %rdi
callq 0x4e340
jmp 0x66d51
leaq 0xd8(%rsp), %rdi
callq 0x15670
addq $0x118, %rsp            # imm = 0x118
retq
movq 0xa8(%rsp), %rdi
callq 0x9cf0
nopw %cs:(%rax,%rax)