// File: /workspace/github_cpp_makefile_star2_O2/fjamour[P]icentral/src/graph_t.cc
// Function: graph_t::find_edge_bcc(component_t&, std::pair<unsigned int, unsigned int>)
void graph_t::find_edge_bcc(
                component_t&    comp,
                edge_t          e
                )
{
    //a. find the bcc subgraph
    //b. find the articulation points in bcc
    //c. find the sizes of the subgraphs connected to each art point
    if(has_edge(e)) {
        printf("WARNING: inserted duplicate edge!\n");
    }
    insert_edge(e.first, e.second);
    graph_hash_t g;
    find_edge_bcc_subgraph(g, e.first, e.second);
    //g.remove_edge(e.first, e.second); //TODO: make sure it's okay! [NO, needed below]
    vector<node_id_t> art_pt_vec;
    find_art_points(art_pt_vec);
    set<node_id_t> art_pt_set;//to make art points unique
    for(int i = 0; i < art_pt_vec.size(); ++i) {
        art_pt_set.insert(art_pt_vec[i]);
    }
    
    graph_hash_t::nodes_map_t::iterator it;
    for(it = g.nodes_map.begin();
        it != g.nodes_map.end();
        ++it) {
        node_id_t v = it->first;
        if(art_pt_set.find(v) != art_pt_set.end()) {
            // the node is an articulation point and it belongs to the bcc
            // of interest, so it must be added to the art point of this bcc
            // along with the sizes of the subgraphs it connects the bcc to
            vector<int> subgraph_sz_vec;
            vector<bool> visited_vec;
            visited_vec.resize(size());
            fill(visited_vec.begin(), visited_vec.end(), false);
            visited_vec[v] = true;
            vector<node_id_t> v_nbr_vec = get_nbrs(v);
            for(int i = 0; i < v_nbr_vec.size(); ++i) {
                node_id_t u = v_nbr_vec[i];
                if(!g.has_edge(v, u) && !visited_vec[u]) {
                    //do a dfs from this guy to figure out the size
                    //of the connected component connected to the bcc through v
                    //and this edge
                    int cnt = 0;
                    stack<node_id_t> S;
                    S.push(u);
                    visited_vec[u] = true;
                    while(!S.empty()) {
                        node_id_t vv = S.top();
                        S.pop();
                        cnt++;
                        vector<node_id_t> nbr_vec = get_nbrs(vv);
                        for(int i = 0; i < nbr_vec.size(); ++i) {
                            node_id_t nbr = nbr_vec[i];
                            if(!visited_vec[nbr]) {
                                visited_vec[nbr] = true;
                                S.push(nbr);
                            }
                        }
                    }
                    subgraph_sz_vec.push_back(cnt);
                    //printf("---%d, %d", v, cnt);
                }
            }
            comp.art_pt_map.insert(make_pair(v, subgraph_sz_vec));
        }
    }
    //fix art_pt_map
    g.remove_edge(e.first, e.second);
    comp.subgraph.fill_graph(g);
    
    component_t::art_pt_map_t new_art_pt_map;
    for(component_t::art_pt_map_t::iterator it = comp.art_pt_map.begin();
            it != comp.art_pt_map.end();
            ++it) {
        node_id_t new_v = comp.subgraph.outin_label_map[it->first];
        new_art_pt_map.insert(make_pair(new_v, it->second));
    }
    comp.art_pt_map = new_art_pt_map;
    
    remove_edge(e.first, e.second);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movq %rdx, %rbx
movq %rsi, 0x10(%rsp)
movq %rdi, %r12
leaq 0x178(%rsp), %rsi
movq %rdx, (%rsi)
callq 0x191b4
movq %rbx, 0x20(%rsp)
shrq $0x20, %rbx
movq %rbx, 0x18(%rsp)
testb %al, %al
je 0x19684
leaq 0xf55b(%rip), %rdi      # 0x28bda
callq 0x2360
movq %r12, %rdi
movq 0x20(%rsp), %r14
movl %r14d, %esi
movq 0x18(%rsp), %r15
movl %r15d, %edx
callq 0x18b56
leaq 0x180(%rsp), %rbx
movq %rbx, %rdi
callq 0x11468
movq %r12, %rdi
movq %rbx, %rsi
movl %r14d, %edx
movl %r15d, %ecx
callq 0x10eea
xorps %xmm0, %xmm0
leaq 0x110(%rsp), %rsi
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
movq %r12, %r15
movq %r12, %rdi
callq 0x107dc
leaq 0x150(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
xorl %r14d, %r14d
leaq 0x148(%rsp), %rbx
xorl %r12d, %r12d
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rax
subq %rsi, %rax
sarq $0x2, %rax
cmpq %r12, %rax
jbe 0x19736
addq %r14, %rsi
movq %rbx, %rdi
callq 0xf450
incq %r12
addq $0x4, %r14
jmp 0x19706
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rsp)
leaq 0x180(%rsp), %rdi
callq 0xb11c
leaq 0xb0(%rsp), %rcx
movq %rax, (%rcx)
movq %rdx, 0x8(%rcx)
movq 0x10(%rsp), %rcx
addq $0x1f8, %rcx            # imm = 0x1F8
movq %rcx, 0x28(%rsp)
leaq 0x50(%rsp), %rbx
leaq 0xc0(%rsp), %rbp
leaq 0x78(%rsp), %r13
leaq 0x8(%rsp), %r12
movq %r15, %r14
movq 0x188(%rsp), %rcx
movq 0x190(%rsp), %rdx
cmpq (%rcx,%rdx,8), %rax
je 0x19a6f
movl (%rax), %eax
movl %eax, 0x4(%rsp)
leaq 0x148(%rsp), %rdi
leaq 0x4(%rsp), %rsi
callq 0xf5a2
leaq 0x150(%rsp), %rcx
cmpq %rcx, %rax
je 0x19a55
andq $0x0, 0xa0(%rsp)
andq $0x0, 0x50(%rsp)
andl $0x0, 0x58(%rsp)
andq $0x0, 0x60(%rsp)
andl $0x0, 0x68(%rsp)
andq $0x0, 0x70(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movq 0x8(%r14), %rax
subq (%r14), %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x80be
movq 0x50(%rsp), %rdi
movq 0x60(%rsp), %rdx
movl 0x68(%rsp), %ecx
movb $0x0, 0xc0(%rsp)
xorl %esi, %esi
movq %rbp, %r8
callq 0x864b
movl 0x4(%rsp), %esi
movq %rbx, %rdi
callq 0x4b82
orq %rdx, (%rax)
movl 0x4(%rsp), %eax
imulq $0x18, %rax, %rsi
addq (%r14), %rsi
movq %r13, %rdi
callq 0x4ba0
xorl %r13d, %r13d
movq 0x78(%rsp), %rax
movq 0x80(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r13, %rcx
jbe 0x199ba
movl (%rax,%r13,4), %edx
movl %edx, 0x130(%rsp)
movl 0x4(%rsp), %esi
leaq 0x180(%rsp), %rdi
callq 0x177f8
testb %al, %al
jne 0x199b2
movl 0x130(%rsp), %esi
movq %rbx, %rdi
callq 0x4b82
testq %rdx, (%rax)
jne 0x199b2
andl $0x0, 0xc(%rsp)
movq %rbp, %rdi
callq 0x766a
movq %rbp, %rdi
leaq 0x130(%rsp), %rsi
callq 0x62da
movl 0x130(%rsp), %esi
movq %rbx, %rdi
callq 0x4b82
orq %rdx, (%rax)
movq 0xf0(%rsp), %rax
cmpq 0xd0(%rsp), %rax
je 0x19998
cmpq 0xf8(%rsp), %rax
jne 0x19918
movq 0x108(%rsp), %rax
movq -0x8(%rax), %rax
movl $0x200, %ecx            # imm = 0x200
addq %rcx, %rax
movl -0x4(%rax), %r14d
movq %rbp, %rdi
callq 0x85f6
incl 0xc(%rsp)
imulq $0x18, %r14, %rsi
addq (%r15), %rsi
leaq 0x30(%rsp), %rdi
callq 0x4ba0
xorl %r14d, %r14d
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r14, %rcx
jbe 0x19986
movl (%rax,%r14,4), %esi
movl %esi, 0x8(%rsp)
movq %rbx, %rdi
callq 0x4b82
testq %rdx, (%rax)
jne 0x19981
movl 0x8(%rsp), %esi
movq %rbx, %rdi
callq 0x4b82
orq %rdx, (%rax)
movq %rbp, %rdi
movq %r12, %rsi
callq 0x62da
incq %r14
jmp 0x1993c
leaq 0x30(%rsp), %rdi
callq 0x56ec
movq %r15, %r14
jmp 0x198e4
leaq 0x90(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0xf140
movq %rbp, %rdi
callq 0x5280
incq %r13
jmp 0x1985c
movl 0x4(%rsp), %eax
movl %eax, 0x30(%rsp)
leaq 0x38(%rsp), %r13
movq %r13, %rdi
leaq 0x90(%rsp), %rsi
callq 0x6766
movl 0x30(%rsp), %eax
movl %eax, 0xc0(%rsp)
movups 0x38(%rsp), %xmm0
movups %xmm0, 0xc8(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0xd8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
andq $0x0, 0x10(%r13)
leaq 0x130(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %rbp, %rdx
callq 0xf6b6
leaq 0xc8(%rsp), %rdi
callq 0x5720
movq %r13, %rdi
callq 0x5720
leaq 0x78(%rsp), %r13
movq %r13, %rdi
callq 0x56ec
movq %rbx, %rdi
callq 0x4e52
leaq 0x90(%rsp), %rdi
callq 0x5720
leaq 0xb0(%rsp), %rdi
callq 0xbdd6
movq 0xb0(%rsp), %rax
jmp 0x19788
leaq 0x180(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x1762e
leaq 0x180(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x26736
leaq 0xc0(%rsp), %rdi
pushq $0xa
popq %rsi
leaq 0x50(%rsp), %rdx
leaq 0x30(%rsp), %rcx
leaq 0x90(%rsp), %r8
callq 0x510a
movq 0x28(%rsp), %rdi
callq 0xf10e
movq %rax, %rsi
leaq 0x78(%rsp), %rax
movq %rsi, (%rax)
movq %rdx, 0x8(%rax)
movq 0x10(%rsp), %rax
leaq 0x60(%rax), %r12
leaq 0x90(%rsp), %r13
leaq 0xc0(%rsp), %rbp
leaq 0x50(%rsp), %r15
movq 0x10(%rsp), %rcx
movq 0x200(%rcx), %rax
movq 0x208(%rcx), %rcx
cmpq (%rax,%rcx,8), %rsi
je 0x19b89
movq %r12, %rdi
callq 0x46f8
movl (%rax), %eax
movq 0x78(%rsp), %rsi
addq $0x8, %rsi
movl %eax, 0x30(%rsp)
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0x6766
movl 0x30(%rsp), %eax
movl %eax, 0x50(%rsp)
movups 0x38(%rsp), %xmm0
movups %xmm0, 0x58(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x68(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq %r13, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0xf6b6
leaq 0x58(%rsp), %rdi
callq 0x5720
movq %rbx, %rdi
callq 0x5720
leaq 0x78(%rsp), %rdi
callq 0xf43c
movq 0x78(%rsp), %rsi
jmp 0x19af1
leaq 0xc0(%rsp), %rsi
movq 0x28(%rsp), %rdi
callq 0xf25a
movq %r14, %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x18bfe
leaq 0xc0(%rsp), %rdi
callq 0x51d2
leaq 0x148(%rsp), %rdi
callq 0xf3b0
leaq 0x110(%rsp), %rdi
callq 0x56ec
leaq 0x180(%rsp), %rdi
callq 0x1173e
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x19c36
jmp 0x19c61
jmp 0x19c61
movq %rax, %r14
jmp 0x19cc4
movq %rax, %r14
jmp 0x19cd1
jmp 0x19c36
jmp 0x19c61
movq %rax, %r14
leaq 0xc8(%rsp), %rdi
callq 0x5720
movq %r13, %rdi
callq 0x5720
jmp 0x19c96
jmp 0x19c6e
jmp 0x19c2f
jmp 0x19c2f
jmp 0x19c2f
movq %rax, %r14
jmp 0x19ca0
jmp 0x19c36
movq %rax, %r14
jmp 0x19c50
movq %rax, %r14
leaq 0x58(%rsp), %rdi
callq 0x5720
movq %rbx, %rdi
callq 0x5720
leaq 0xc0(%rsp), %rdi
callq 0x51d2
jmp 0x19cb7
jmp 0x19c61
movq %rax, %r14
jmp 0x19cb7
jmp 0x19c6e
jmp 0x19c73
jmp 0x19c73
jmp 0x19c6e
movq %rax, %r14
jmp 0x19c96
movq %rax, %r14
jmp 0x19c89
jmp 0x19c7c
jmp 0x19c7c
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x56ec
leaq 0xc0(%rsp), %rdi
callq 0x5280
leaq 0x78(%rsp), %rdi
callq 0x56ec
leaq 0x50(%rsp), %rdi
callq 0x4e52
leaq 0x90(%rsp), %rdi
callq 0x5720
leaq 0x148(%rsp), %rdi
callq 0xf3b0
leaq 0x110(%rsp), %rdi
callq 0x56ec
leaq 0x180(%rsp), %rdi
callq 0x1173e
movq %r14, %rdi
callq 0x23d0