// File: /workspace/github_cpp_makefile_star2_O1/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 0x2882b
movq 0x60(%rbx), %rax
imulq $0x568, %r15, %rcx      # imm = 0x568
leaq (%rax,%rcx), %rdi
addq $0x60, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x1c440
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 0x1de06
leaq 0x18(%rsp), %rdi
callq 0x26e2c
xorps %xmm0, %xmm0
movq %rsp, %rcx
movaps %xmm0, (%rcx)
movq $0x0, 0x10(%rcx)
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x1e40a
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 0x28636
imulq $0x568, %r15, %rdx      # imm = 0x568
addq 0x60(%rbx), %rdx
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x28636
movq (%rsp), %rax
cmpq %rax, 0x8(%rsp)
je 0x288f2
xorl %r12d, %r12d
leaq 0x18(%rsp), %r15
movl (%rax,%r12,4), %eax
movq 0x18(%rbx), %rcx
movl (%rcx,%rax,4), %eax
cmpl 0x320(%rsp), %eax
je 0x288da
imulq $0x568, %rax, %rdx      # imm = 0x568
addq 0x60(%rbx), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x28636
incq %r12
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r12, %rcx
ja 0x288b0
leaq 0x78(%rsp), %r15
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x1c440
leaq 0x60(%rbx), %rdi
leaq 0x18(%rsp), %rsi
callq 0x2b634
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x1de06
movq %rbx, %rdi
callq 0x27454
movl 0x320(%rsp), %esi
movq %rbx, %rdi
callq 0x27642
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x2894c
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x550(%rsp), %rdi
callq 0x246f6
leaq 0x520(%rsp), %rdi
callq 0x158ce
leaq 0x328(%rsp), %rdi
callq 0x6460
movq %r15, %rdi
callq 0x15750
leaq 0x48(%rsp), %rdi
callq 0x246f6
leaq 0x18(%rsp), %rdi
callq 0x158ce
addq $0x580, %rsp            # imm = 0x580
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x289a1
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x289ba
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x18(%rsp), %rdi
callq 0x2b664
movq %rbx, %rdi
callq 0x23b0