// File: /workspace/github_cpp_makefile_star2_O1/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 %rsi, 0x10(%rsp)
leaq 0x48(%rsp), %rsi
movq %rdx, (%rsi)
movq %rdi, 0x18(%rsp)
callq 0x1e7bc
testb %al, %al
je 0x1ef2a
leaq 0x12cf5(%rip), %rdi     # 0x31c1a
callq 0x2350
movl 0x48(%rsp), %ebp
movl 0x4c(%rsp), %r14d
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0x1de06
leaq 0x180(%rsp), %r15
movq %r15, %rdi
callq 0x153ae
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
movl %r14d, %ecx
callq 0x14ca4
xorps %xmm0, %xmm0
leaq 0x110(%rsp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq %rbx, %rdi
callq 0x143c8
leaq 0x158(%rsp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
movq 0x110(%rsp), %rsi
cmpq %rsi, 0x118(%rsp)
je 0x1eff0
xorl %ebx, %ebx
leaq 0x150(%rsp), %r14
xorl %r15d, %r15d
addq %rbx, %rsi
movq %r14, %rdi
callq 0x12a12
incq %r15
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rax
subq %rsi, %rax
sarq $0x2, %rax
addq $0x4, %rbx
cmpq %r15, %rax
ja 0x1efc2
movq 0x188(%rsp), %rbp
movq (%rbp), %r13
testq %r13, %r13
je 0x1f010
movq 0x18(%rsp), %rdi
leaq 0x158(%rsp), %rsi
jmp 0x1f02a
movq 0x18(%rsp), %rdi
leaq 0x158(%rsp), %rsi
movq 0x8(%rbp), %r13
addq $0x8, %rbp
testq %r13, %r13
je 0x1f01d
movq 0x188(%rsp), %rax
movq 0x190(%rsp), %rcx
cmpq (%rax,%rcx,8), %r13
je 0x1f566
movq 0x10(%rsp), %rax
addq $0x1f8, %rax            # imm = 0x1F8
movq %rax, 0x148(%rsp)
leaq 0xa0(%rsp), %r12
leaq 0x9c(%rsp), %r15
movl (%r13), %r8d
movq 0x160(%rsp), %rcx
movq %rsi, %rax
testq %rcx, %rcx
je 0x1f095
movq %rsi, %rax
xorl %edx, %edx
cmpl %r8d, 0x20(%rcx)
setb %dl
cmovaeq %rcx, %rax
movq 0x10(%rcx,%rdx,8), %rcx
testq %rcx, %rcx
jne 0x1f07e
movq %rsi, %rcx
cmpq %rsi, %rax
je 0x1f0a8
cmpl 0x20(%rax), %r8d
cmovbq %rsi, %rax
movq %rax, %rcx
cmpq %rsi, %rcx
je 0x1f539
movq %r8, 0x90(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
xorl %eax, %eax
movq %rax, 0x80(%rsp)
movq %rax, 0x20(%rsp)
movl %eax, 0x28(%rsp)
movq %rax, 0x30(%rsp)
movl %eax, 0x38(%rsp)
movq %rax, 0x40(%rsp)
movq 0x8(%rdi), %rsi
subq (%rdi), %rsi
sarq $0x3, %rsi
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rsi
leaq 0x20(%rsp), %rdi
xorl %edx, %edx
callq 0x96d2
movq 0x20(%rsp), %rdi
movq 0x30(%rsp), %rbx
movl 0x38(%rsp), %r14d
cmpq %rbx, %rdi
je 0x1f12a
movq %rbx, %rdx
subq %rdi, %rdx
xorl %esi, %esi
callq 0x2110
jmp 0x1f12d
movq %rdi, %rbx
testl %r14d, %r14d
je 0x1f148
negb %r14b
movq $-0x1, %rax
movl %r14d, %ecx
shrq %cl, %rax
notq %rax
andq %rax, (%rbx)
movq 0x20(%rsp), %rax
movq 0x90(%rsp), %rcx
movl %ecx, %edx
movl $0x1, %esi
shlq %cl, %rsi
shrl $0x6, %edx
orq %rsi, (%rax,%rdx,8)
leaq (%rcx,%rcx,2), %rsi
shlq $0x3, %rsi
movq 0x18(%rsp), %rax
addq (%rax), %rsi
leaq 0xf8(%rsp), %rdi
callq 0x61a0
movq 0xf8(%rsp), %rax
cmpq %rax, 0x100(%rsp)
je 0x1f428
xorl %ebx, %ebx
movl (%rax,%rbx,4), %edx
movl %edx, 0x130(%rsp)
leaq 0x180(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x1c746
testb %al, %al
jne 0x1f405
movl 0x130(%rsp), %eax
movq 0x20(%rsp), %rcx
movl %eax, %edx
shrl $0x6, %edx
movq (%rcx,%rdx,8), %rcx
btq %rax, %rcx
jb 0x1f405
movl $0x0, 0xc(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0xe0(%rsp)
movaps %xmm0, 0xd0(%rsp)
movaps %xmm0, 0xc0(%rsp)
movaps %xmm0, 0xb0(%rsp)
movaps %xmm0, 0xa0(%rsp)
movq %r12, %rdi
xorl %esi, %esi
callq 0x6b50
movq 0xd0(%rsp), %rax
movq 0xe0(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x1f24e
movl 0x130(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0xd0(%rsp)
jmp 0x1f25e
movq %r12, %rdi
leaq 0x130(%rsp), %rsi
callq 0x7644
movl 0x130(%rsp), %ecx
movq 0x20(%rsp), %rax
movl %ecx, %edx
movl $0x1, %esi
shlq %cl, %rsi
shrl $0x6, %edx
orq %rsi, (%rax,%rdx,8)
movq 0xd0(%rsp), %rax
cmpq 0xb0(%rsp), %rax
je 0x1f3ce
movq 0xd8(%rsp), %rdi
movq %rax, %rcx
cmpq %rdi, %rax
jne 0x1f2b5
movq 0xe8(%rsp), %rcx
movq -0x8(%rcx), %rcx
movl $0x200, %edx            # imm = 0x200
addq %rdx, %rcx
movl -0x4(%rcx), %r14d
cmpq %rdi, %rax
je 0x1f2c4
addq $-0x4, %rax
jmp 0x1f303
movl $0x200, %esi            # imm = 0x200
callq 0x2250
movq 0xe8(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0xe8(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0xd8(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0xe0(%rsp)
addq $0x1fc, %rax            # imm = 0x1FC
movq %rax, 0xd0(%rsp)
incl 0xc(%rsp)
leaq (%r14,%r14,2), %rsi
shlq $0x3, %rsi
movq 0x18(%rsp), %rax
addq (%rax), %rsi
leaq 0x50(%rsp), %rdi
callq 0x61a0
movq 0x50(%rsp), %rdi
cmpq %rdi, 0x58(%rsp)
je 0x1f3b3
xorl %r14d, %r14d
movl (%rdi,%r14,4), %ecx
movl %ecx, 0x9c(%rsp)
movq 0x20(%rsp), %rax
movl $0x1, %edx
shlq %cl, %rdx
movl %ecx, %esi
shrl $0x6, %esi
movq (%rax,%rsi,8), %rdi
btq %rcx, %rdi
jb 0x1f39a
orq %rdx, %rdi
movq %rdi, (%rax,%rsi,8)
movq 0xd0(%rsp), %rax
movq 0xe0(%rsp), %rdx
addq $-0x4, %rdx
cmpq %rdx, %rax
je 0x1f38f
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0xd0(%rsp)
jmp 0x1f39a
movq %r12, %rdi
movq %r15, %rsi
callq 0x7644
incq %r14
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rax
subq %rdi, %rax
sarq $0x2, %rax
cmpq %r14, %rax
ja 0x1f338
testq %rdi, %rdi
je 0x1f27b
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
jmp 0x1f27b
movq 0x78(%rsp), %rsi
cmpq 0x80(%rsp), %rsi
je 0x1f3ee
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x78(%rsp)
jmp 0x1f3fd
leaq 0x70(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0x12b22
movq %r12, %rdi
callq 0x6998
incq %rbx
movq 0xf8(%rsp), %rax
movq 0x100(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rbx, %rcx
ja 0x1f19b
movq 0x90(%rsp), %rax
movl %eax, 0x50(%rsp)
leaq 0x58(%rsp), %rbx
movq %rbx, %rdi
leaq 0x70(%rsp), %rsi
callq 0x7b64
movl 0x50(%rsp), %eax
movl %eax, 0xa0(%rsp)
movups 0x58(%rsp), %xmm0
movups %xmm0, 0xa8(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0xb8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
leaq 0x130(%rsp), %rdi
movq 0x148(%rsp), %rsi
movq %r12, %rdx
callq 0x12bfe
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x1f4ae
movq 0xb8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x1f4c5
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0xf8(%rsp), %rdi
testq %rdi, %rdi
je 0x1f4e2
movq 0x108(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1f512
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
xorl %eax, %eax
movq %rax, 0x20(%rsp)
movl %eax, 0x28(%rsp)
movq %rax, 0x30(%rsp)
movl %eax, 0x38(%rsp)
movq %rax, 0x40(%rsp)
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x1f52c
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x18(%rsp), %rdi
leaq 0x158(%rsp), %rsi
movq 0x20(%r13), %r13
testq %r13, %r13
jne 0x1f54c
movq 0x8(%rbp), %r13
addq $0x8, %rbp
jmp 0x1f53d
movq 0x188(%rsp), %rax
movq 0x190(%rsp), %rcx
cmpq (%rax,%rcx,8), %r13
jne 0x1f067
movl 0x48(%rsp), %esi
movl 0x4c(%rsp), %edx
leaq 0x180(%rsp), %rdi
callq 0x1c538
leaq 0x180(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x2f4f0
leaq 0xc(%rsp), %rax
leaq 0x70(%rsp), %r10
leaq 0xa0(%rsp), %rdi
leaq 0xf8(%rsp), %rdx
leaq 0x20(%rsp), %rcx
leaq 0x50(%rsp), %r8
leaq 0x130(%rsp), %r9
movl $0xa, %esi
pushq %rax
pushq %r10
callq 0x67d6
addq $0x10, %rsp
movq 0x10(%rsp), %rax
movq 0x200(%rax), %rbx
movq (%rbx), %r14
testq %r14, %r14
jne 0x1f5e8
movq 0x8(%rbx), %r14
addq $0x8, %rbx
jmp 0x1f5d9
movq 0x10(%rsp), %rcx
movq 0x200(%rcx), %rax
movq 0x208(%rcx), %rcx
cmpq (%rax,%rcx,8), %r14
je 0x1f6d8
movq 0x10(%rsp), %rax
leaq 0x60(%rax), %r15
leaq 0x58(%rsp), %r12
leaq 0xa0(%rsp), %rbp
leaq 0x20(%rsp), %r13
movq %r15, %rdi
movq %r14, %rsi
callq 0x5d84
movl (%rax), %eax
leaq 0x8(%r14), %rsi
movl %eax, 0x50(%rsp)
movq %r12, %rdi
callq 0x7b64
movl 0x50(%rsp), %eax
movl %eax, 0x20(%rsp)
movups 0x58(%rsp), %xmm0
movups %xmm0, 0x28(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x38(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movq $0x0, 0x10(%r12)
leaq 0x70(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x12bfe
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x1f691
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x1f6a8
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x20(%r14), %r14
testq %r14, %r14
jne 0x1f6bb
movq 0x8(%rbx), %r14
addq $0x8, %rbx
jmp 0x1f6ac
movq 0x10(%rsp), %rcx
movq 0x200(%rcx), %rax
movq 0x208(%rcx), %rcx
cmpq (%rax,%rcx,8), %r14
jne 0x1f620
movq 0x10(%rsp), %rdi
addq $0x1f8, %rdi            # imm = 0x1F8
leaq 0xa0(%rsp), %rsi
callq 0x127fc
movl 0x48(%rsp), %esi
movl 0x4c(%rsp), %edx
movq 0x18(%rsp), %rdi
callq 0x1deda
leaq 0xa0(%rsp), %rdi
callq 0x68e6
leaq 0x150(%rsp), %rdi
callq 0x12970
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0x1f73a
movq 0x120(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x180(%rsp), %rdi
callq 0x15750
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1f811
movq %rax, %rbx
jmp 0x1f8c2
movq %rax, %rbx
jmp 0x1f8df
jmp 0x1f7fc
jmp 0x1f811
jmp 0x1f81d
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x1f79d
movq 0xb8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x1f84e
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
jmp 0x1f84e
jmp 0x1f7bf
movq %rax, %rbx
jmp 0x1f86b
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x1f7e1
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x1f7ff
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
jmp 0x1f7ff
jmp 0x1f7fc
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x68e6
jmp 0x1f8b5
movq %rax, %rbx
jmp 0x1f8b5
jmp 0x1f822
jmp 0x1f81d
movq %rax, %rbx
jmp 0x1f84e
movq %rax, %rbx
jmp 0x1f841
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x1f841
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0xa0(%rsp), %rdi
callq 0x6998
movq 0xf8(%rsp), %rdi
testq %rdi, %rdi
je 0x1f86b
movq 0x108(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1f89b
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
xorl %eax, %eax
movq %rax, 0x20(%rsp)
movl %eax, 0x28(%rsp)
movq %rax, 0x30(%rsp)
movl %eax, 0x38(%rsp)
movq %rax, 0x40(%rsp)
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x1f8b5
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x150(%rsp), %rdi
callq 0x12970
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0x1f8df
movq 0x120(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x180(%rsp), %rdi
callq 0x15750
movq %rbx, %rdi
callq 0x23b0