// File: /workspace/github_cpp_makefile_star2_O3/fjamour[P]icentral/src/qube.cc
// Function: graph_t::insert_edge_update_muc(unsigned int, unsigned int)
void graph_t::insert_edge_update_muc(node_id_t src, node_id_t dst)
{
    muc_id_t src_muc_id = node_to_muc_vec[src];
    muc_id_t dst_muc_id = node_to_muc_vec[dst];
    if(src_muc_id == dst_muc_id) {
        //case 1: both @src and @dst are in the same muc
        //        then just update the graph and the muc graph
        //just update the muc and the graph
        muc_vec[src_muc_id].muc_subgraph.insert_edge(src, dst);
        insert_edge(src, dst);
    } else {
        //case 2: @src and @dst are not in the same muc
        muc_t new_muc;
        vector<node_id_t> shortest_path;
        get_shortest_path(src, dst, shortest_path);
        new_muc.id = muc_vec.size();
        merge_muc_muc(new_muc, muc_vec[dst_muc_id]);
        merge_muc_muc(new_muc, muc_vec[src_muc_id]);
        for(int i = 0; i < shortest_path.size(); ++i) {
            muc_id_t node_muc_id = node_to_muc_vec[shortest_path[i]];
            if(node_muc_id != new_muc.id) {
                merge_muc_muc(new_muc, muc_vec[node_muc_id]);
            }
        }
        new_muc.muc_subgraph.insert_edge(src, dst);
        //cout << endl << endl;
        //new_muc.muc_subgraph.print_graph();
        muc_vec.push_back(new_muc);
        insert_edge(src, dst);
        //TODO updating the connection vertices must be done in a much faster way!
        find_conn_verts();
        find_muc_subgraphs(new_muc.id);
    }   
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x580, %rsp            # imm = 0x580
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movl %esi, %eax
movq 0x18(%rdi), %rcx
movl (%rcx,%rax,4), %r15d
movl %edx, %eax
movl (%rcx,%rax,4), %r12d
cmpl %r12d, %r15d
jne 0x28583
movq 0x60(%rbx), %rax
imulq $0x568, %r15, %rcx      # imm = 0x568
leaq (%rax,%rcx), %rdi
addq $0x60, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x1c320
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
addq $0x580, %rsp            # imm = 0x580
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1dc86
leaq 0x18(%rsp), %rdi
callq 0x26bfc
xorps %xmm0, %xmm0
movq %rsp, %rcx
movaps %xmm0, (%rcx)
movq $0x0, 0x10(%rcx)
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x1e274
movq 0x60(%rbx), %rax
movq 0x68(%rbx), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xd516325, %ecx, %ecx  # imm = 0xD516325
leaq 0x18(%rsp), %rsi
movl %ecx, 0x308(%rsi)
imulq $0x568, %r12, %rdx      # imm = 0x568
addq %rax, %rdx
movq %rbx, %rdi
callq 0x2837a
imulq $0x568, %r15, %rdx      # imm = 0x568
addq 0x60(%rbx), %rdx
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x2837a
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
cmpq %rax, %rcx
je 0x28650
xorl %r12d, %r12d
leaq 0x18(%rsp), %r15
movl (%rax,%r12,4), %edx
movq 0x18(%rbx), %rsi
movl (%rsi,%rdx,4), %edx
cmpl 0x320(%rsp), %edx
je 0x2863e
imulq $0x568, %rdx, %rdx      # imm = 0x568
addq 0x60(%rbx), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2837a
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
incq %r12
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r12, %rdx
ja 0x2860b
leaq 0x78(%rsp), %r15
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x1c320
leaq 0x60(%rbx), %rdi
leaq 0x18(%rsp), %rsi
callq 0x2b29e
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x1dc86
movq %rbx, %rdi
callq 0x27210
movl 0x320(%rsp), %esi
movq %rbx, %rdi
callq 0x27400
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x286aa
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x550(%rsp), %rdi
callq 0x24558
leaq 0x520(%rsp), %rdi
callq 0x157dc
leaq 0x328(%rsp), %rdi
callq 0x63d2
movq %r15, %rdi
callq 0x15650
leaq 0x48(%rsp), %rdi
callq 0x24558
leaq 0x18(%rsp), %rdi
callq 0x157dc
addq $0x580, %rsp            # imm = 0x580
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x286ff
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x28718
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x18(%rsp), %rdi
callq 0x2b2ce
movq %rbx, %rdi
callq 0x23b0