// File: fjamour[P]icentral/src/qube.cc
// Function: graph_t::merge_muc_muc(muc_t&, muc_t&)
void graph_t::merge_muc_muc(muc_t& muc1, muc_t& muc2)
{
    //1. copy the graph of muc2 into muc1
    //2. for each bridge edge, if the other end becomes in the graph, add the edge
    //3. mark muc2 as invalid
    //4. ASSUME muc1.id is valid, and update node_to_muc_vec for vertices in muc2
    //   to hold the id of muc1
    muc1.muc_subgraph.nodes_map.insert(
                muc2.muc_subgraph.nodes_map.begin(),
                muc2.muc_subgraph.nodes_map.end());
    muc1.muc_subgraph.edge_set.insert(
                muc2.muc_subgraph.edge_set.begin(),
                muc2.muc_subgraph.edge_set.end());
    for(muc_t::conn_vert_map_t::iterator it = muc2.conn_vertex_map.begin();
                                         it != muc2.conn_vertex_map.end(); 
                                         ++it) {
        node_id_t conn_vert = it->first;
        for(int i = 0; i < it->second.size(); ++i) {
            if(muc1.muc_subgraph.nodes_map.find(it->second[i]) != muc1.muc_subgraph.nodes_map.end()) {
                muc1.muc_subgraph.insert_edge(conn_vert, it->second[i]);
            }
        }
    }
    muc2.valid = false;
    for(graph_hash_t::nodes_map_t::iterator it = muc2.muc_subgraph.nodes_map.begin();
                                            it != muc2.muc_subgraph.nodes_map.end();
                                            ++it) {
        node_to_muc_vec[it->first] = muc1.id;
    }
}

// Assembly:
subq $0xf8, %rsp
movq %rdi, 0xf0(%rsp)
movq %rsi, 0xe8(%rsp)
movq %rdx, 0xe0(%rsp)
movq 0xf0(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xe8(%rsp), %rax
addq $0x60, %rax
movq %rax, 0x38(%rsp)
movq 0xe0(%rsp), %rdi
addq $0x60, %rdi
callq 0x2d6b0
movq %rax, 0xd0(%rsp)
movq %rdx, 0xd8(%rsp)
movq 0xe0(%rsp), %rdi
addq $0x60, %rdi
callq 0x2d710
movq 0x38(%rsp), %rdi
movq %rax, 0xc0(%rsp)
movq %rdx, 0xc8(%rsp)
movq 0xd0(%rsp), %rsi
movq 0xd8(%rsp), %rdx
movq 0xc0(%rsp), %rcx
movq 0xc8(%rsp), %r8
callq 0x6e800
movq 0xe8(%rsp), %rax
addq $0x60, %rax
addq $0x30, %rax
movq %rax, 0x40(%rsp)
movq 0xe0(%rsp), %rdi
addq $0x60, %rdi
addq $0x30, %rdi
callq 0x420d0
movq %rax, 0xb8(%rsp)
movq 0xe0(%rsp), %rdi
addq $0x60, %rdi
addq $0x30, %rdi
callq 0x54120
movq 0x40(%rsp), %rdi
movq %rax, 0xb0(%rsp)
movq 0xb8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
callq 0x6e320
movq 0xe0(%rsp), %rdi
callq 0x6e360
movq %rax, 0xa0(%rsp)
movq %rdx, 0xa8(%rsp)
movq 0xe0(%rsp), %rdi
callq 0x6e3c0
movq %rax, 0x90(%rsp)
movq %rdx, 0x98(%rsp)
leaq 0xa0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x6e3a0
testb $0x1, %al
jne 0x6861a
jmp 0x68767
leaq 0xa0(%rsp), %rdi
callq 0x32f00
movl (%rax), %eax
movl %eax, 0x8c(%rsp)
movl $0x0, 0x88(%rsp)
movslq 0x88(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x32f00
movq %rax, %rdi
addq $0x8, %rdi
callq 0xfd50
movq %rax, %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
jae 0x68753
movq 0xe8(%rsp), %rax
addq $0x60, %rax
movq %rax, 0x20(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x32f00
movq %rax, %rdi
addq $0x8, %rdi
movslq 0x88(%rsp), %rsi
callq 0xfbc0
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x53f90
movq %rax, 0x78(%rsp)
movq %rdx, 0x80(%rsp)
movq 0xe8(%rsp), %rdi
addq $0x60, %rdi
callq 0x2d710
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
leaq 0x78(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x2d6f0
testb $0x1, %al
jne 0x686ee
jmp 0x6873b
movq 0xe8(%rsp), %rax
addq $0x60, %rax
movq %rax, 0x10(%rsp)
movl 0x8c(%rsp), %eax
movl %eax, 0x1c(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x32f00
movq %rax, %rdi
addq $0x8, %rdi
movslq 0x88(%rsp), %rsi
callq 0xfbc0
movq 0x10(%rsp), %rdi
movl 0x1c(%rsp), %esi
movl (%rax), %edx
callq 0x52420
jmp 0x6873d
movl 0x88(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x88(%rsp)
jmp 0x6863b
jmp 0x68755
leaq 0xa0(%rsp), %rdi
callq 0x6e4d0
jmp 0x685df
movq 0xe0(%rsp), %rax
movb $0x0, 0x30c(%rax)
movq 0xe0(%rsp), %rdi
addq $0x60, %rdi
callq 0x2d6b0
movq %rax, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq 0xe0(%rsp), %rdi
addq $0x60, %rdi
callq 0x2d710
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x2d6f0
testb $0x1, %al
jne 0x687c1
jmp 0x68809
movq 0x30(%rsp), %rax
movq 0xe8(%rsp), %rcx
movl 0x308(%rcx), %ecx
movl %ecx, 0xc(%rsp)
addq $0x18, %rax
movq %rax, (%rsp)
leaq 0x58(%rsp), %rdi
callq 0x2d750
movq (%rsp), %rdi
movl (%rax), %eax
movl %eax, %esi
callq 0xfbc0
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
leaq 0x58(%rsp), %rdi
callq 0x2d760
jmp 0x68791
addq $0xf8, %rsp
retq
nopw %cs:(%rax,%rax)