// File: /workspace/github_cpp_makefile_star2_O3/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 $0x418, %rsp            # imm = 0x418
movq %rdx, %r14
movq %rsi, 0x10(%rsp)
leaq 0x68(%rsp), %rsi
movq %rdx, (%rsi)
movq %rdi, 0x38(%rsp)
callq 0x1e644
movq %r14, %r15
shrq $0x20, %r15
testb %al, %al
je 0x1edf0
leaq 0x11e2f(%rip), %rdi     # 0x30c1a
callq 0x2350
movq 0x38(%rsp), %rbx
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
callq 0x1dc86
leaq 0x170(%rsp), %r12
movq %r12, %rdi
callq 0x152ae
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %edx
movl %r15d, %ecx
callq 0x14bc4
xorps %xmm0, %xmm0
leaq 0x100(%rsp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq %rbx, %rdi
callq 0x142f4
leaq 0x148(%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 0x100(%rsp), %rsi
cmpq %rsi, 0x108(%rsp)
je 0x1eeaf
xorl %ebx, %ebx
leaq 0x140(%rsp), %r14
xorl %r15d, %r15d
addq %rbx, %rsi
movq %r14, %rdi
callq 0x1295c
incq %r15
movq 0x100(%rsp), %rsi
movq 0x108(%rsp), %rax
subq %rsi, %rax
sarq $0x2, %rax
addq $0x4, %rbx
cmpq %r15, %rax
ja 0x1ee81
movq 0x178(%rsp), %rax
movq (%rax), %r13
movq %rax, %rbp
testq %r13, %r13
jne 0x1eed2
movq %rax, %rbp
movq 0x8(%rbp), %r13
addq $0x8, %rbp
testq %r13, %r13
je 0x1eec5
movq 0x180(%rsp), %rcx
cmpq (%rax,%rcx,8), %r13
leaq 0x148(%rsp), %r8
je 0x1f3f5
movq 0x10(%rsp), %rax
addq $0x1f8, %rax            # imm = 0x1F8
movq %rax, 0x138(%rsp)
leaq 0x90(%rsp), %r12
movq 0x150(%rsp), %rsi
testq %rsi, %rsi
je 0x1f3c8
movl (%r13), %r14d
movq %r8, %rdi
movq %rdi, %rax
movq %rsi, %rcx
movl 0x20(%rsi), %edx
xorl %esi, %esi
cmpl %r14d, %edx
setb %sil
movq %rcx, %rdi
cmovbq %rax, %rdi
movq 0x10(%rcx,%rsi,8), %rsi
testq %rsi, %rsi
jne 0x1ef1f
cmpq %r8, %rdi
movq 0x38(%rsp), %rdi
je 0x1f3c8
cmpl %r14d, %edx
cmovbq %rax, %rcx
cmpl 0x20(%rcx), %r14d
jb 0x1f3c8
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
xorl %eax, %eax
movq %rax, 0x80(%rsp)
movq %rax, 0x40(%rsp)
movl %eax, 0x48(%rsp)
movq %rax, 0x50(%rsp)
movl %eax, 0x58(%rsp)
movq %rax, 0x60(%rsp)
movq 0x8(%rdi), %rsi
subq (%rdi), %rsi
sarq $0x3, %rsi
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rsi
leaq 0x40(%rsp), %rdi
xorl %edx, %edx
callq 0x96c4
movq 0x40(%rsp), %rdi
movq 0x50(%rsp), %rbx
movl 0x58(%rsp), %r15d
cmpq %rbx, %rdi
je 0x1efd2
movq %rbx, %rdx
subq %rdi, %rdx
xorl %esi, %esi
callq 0x2110
jmp 0x1efd5
movq %rdi, %rbx
testl %r15d, %r15d
je 0x1eff0
negb %r15b
movq $-0x1, %rax
movl %r15d, %ecx
shrq %cl, %rax
notq %rax
andq %rax, (%rbx)
movq 0x40(%rsp), %rax
movl %r14d, %edx
movl $0x1, %esi
movl %r14d, %ecx
shlq %cl, %rsi
shrl $0x6, %edx
orq %rsi, (%rax,%rdx,8)
leaq (%r14,%r14,2), %rsi
shlq $0x3, %rsi
movq 0x38(%rsp), %rax
addq (%rax), %rsi
leaq 0xe8(%rsp), %rdi
callq 0x6112
movq 0xe8(%rsp), %rax
cmpq %rax, 0xf0(%rsp)
je 0x1f2dc
xorl %ebx, %ebx
movl (%rax,%rbx,4), %edx
movl %edx, 0x120(%rsp)
leaq 0x170(%rsp), %rdi
movl %r14d, %esi
callq 0x1c5fe
testb %al, %al
jne 0x1f2b9
movl 0x120(%rsp), %eax
movq 0x40(%rsp), %rcx
movl %eax, %edx
shrl $0x6, %edx
movq (%rcx,%rdx,8), %rcx
btq %rax, %rcx
jb 0x1f2b9
movl $0x0, 0xc(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0xd0(%rsp)
movaps %xmm0, 0xc0(%rsp)
movaps %xmm0, 0xb0(%rsp)
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0x90(%rsp)
movq %r12, %rdi
xorl %esi, %esi
callq 0x6ad0
movq 0xc0(%rsp), %rax
movq 0xd0(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x1f0ed
movl 0x120(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0xc0(%rsp)
jmp 0x1f10c
movq %r12, %rdi
leaq 0x120(%rsp), %rsi
callq 0x75be
movl 0x120(%rsp), %ecx
movq 0xc0(%rsp), %rax
movq 0x40(%rsp), %rdx
movl %ecx, %esi
movl $0x1, %edi
shlq %cl, %rdi
shrl $0x6, %esi
orq %rdi, (%rdx,%rsi,8)
cmpq 0xa0(%rsp), %rax
je 0x1f282
movq 0xc8(%rsp), %rdi
cmpq %rdi, %rax
je 0x1f147
movl -0x4(%rax), %r15d
addq $-0x4, %rax
jmp 0x1f19b
movq 0xd8(%rsp), %rax
movq -0x8(%rax), %rax
movl 0x1fc(%rax), %r15d
movl $0x200, %esi            # imm = 0x200
callq 0x2250
movq 0xd8(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0xd8(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0xc8(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0xd0(%rsp)
movl $0x1fc, %ecx            # imm = 0x1FC
addq %rcx, %rax
movq %rax, 0xc0(%rsp)
incl 0xc(%rsp)
movl %r15d, %eax
leaq (%rax,%rax,2), %rsi
shlq $0x3, %rsi
movq 0x38(%rsp), %rax
addq (%rax), %rsi
leaq 0x18(%rsp), %rdi
callq 0x6112
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rax
cmpq %rdi, %rax
je 0x1f263
xorl %r15d, %r15d
movl (%rdi,%r15,4), %ecx
movl %ecx, 0x8c(%rsp)
movq 0x40(%rsp), %rdx
movl $0x1, %esi
shlq %cl, %rsi
movl %ecx, %r8d
shrl $0x6, %r8d
movq (%rdx,%r8,8), %r9
btq %rcx, %r9
jb 0x1f24d
orq %rsi, %r9
movq %r9, (%rdx,%r8,8)
movq 0xc0(%rsp), %rdx
movq 0xd0(%rsp), %rsi
addq $-0x4, %rsi
cmpq %rsi, %rdx
je 0x1f233
movl %ecx, (%rdx)
addq $0x4, %rdx
movq %rdx, 0xc0(%rsp)
jmp 0x1f24d
movq %r12, %rdi
leaq 0x8c(%rsp), %rsi
callq 0x75be
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rax
incq %r15
movq %rax, %rcx
subq %rdi, %rcx
sarq $0x2, %rcx
cmpq %r15, %rcx
ja 0x1f1da
testq %rdi, %rdi
je 0x1f275
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0xc0(%rsp), %rax
jmp 0x1f122
movq 0x78(%rsp), %rsi
cmpq 0x80(%rsp), %rsi
je 0x1f2a2
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x78(%rsp)
jmp 0x1f2b1
leaq 0x70(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0x12a6a
movq %r12, %rdi
callq 0x690a
incq %rbx
movq 0xe8(%rsp), %rax
movq 0xf0(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rbx, %rcx
ja 0x1f03f
movl %r14d, 0x18(%rsp)
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
leaq 0x70(%rsp), %rsi
callq 0x7afc
movl 0x18(%rsp), %eax
movl %eax, 0x90(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, 0x98(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0xa8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
leaq 0x120(%rsp), %rdi
movq 0x138(%rsp), %rsi
movq %r12, %rdx
callq 0x12b46
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x1f35b
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1f372
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0x1f38f
movq 0xf8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1f3a6
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x1f3c0
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x148(%rsp), %r8
movq 0x20(%r13), %r13
testq %r13, %r13
jne 0x1f3db
movq 0x8(%rbp), %r13
addq $0x8, %rbp
jmp 0x1f3cc
movq 0x178(%rsp), %rax
movq 0x180(%rsp), %rcx
cmpq (%rax,%rcx,8), %r13
jne 0x1ef07
movl 0x68(%rsp), %esi
movl 0x6c(%rsp), %edx
leaq 0x170(%rsp), %rdi
callq 0x1c416
leaq 0x170(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x2f16c
leaq 0xc(%rsp), %rax
leaq 0x70(%rsp), %r10
leaq 0x90(%rsp), %rdi
leaq 0xe8(%rsp), %rdx
leaq 0x40(%rsp), %rcx
leaq 0x18(%rsp), %r8
leaq 0x120(%rsp), %r9
movl $0xa, %esi
pushq %rax
pushq %r10
callq 0x6748
addq $0x10, %rsp
movq 0x10(%rsp), %rax
movq 0x200(%rax), %rax
movq (%rax), %r14
movq %rax, %rbx
testq %r14, %r14
jne 0x1f480
movq %rax, %rbx
movq 0x8(%rbx), %r14
addq $0x8, %rbx
testq %r14, %r14
je 0x1f473
movq 0x10(%rsp), %rcx
movq 0x208(%rcx), %rcx
cmpq (%rax,%rcx,8), %r14
je 0x1f569
movq 0x10(%rsp), %rax
leaq 0x60(%rax), %r15
leaq 0x20(%rsp), %r12
leaq 0x90(%rsp), %rbp
leaq 0x40(%rsp), %r13
movq %r15, %rdi
movq %r14, %rsi
callq 0x5d14
movl (%rax), %eax
leaq 0x8(%r14), %rsi
movl %eax, 0x18(%rsp)
movq %r12, %rdi
callq 0x7afc
movl 0x18(%rsp), %eax
movl %eax, 0x40(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, 0x48(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x58(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movq $0x0, 0x10(%r12)
leaq 0x70(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x12b46
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x1f522
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1f539
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x20(%r14), %r14
testq %r14, %r14
jne 0x1f54c
movq 0x8(%rbx), %r14
addq $0x8, %rbx
jmp 0x1f53d
movq 0x10(%rsp), %rcx
movq 0x200(%rcx), %rax
movq 0x208(%rcx), %rcx
cmpq (%rax,%rcx,8), %r14
jne 0x1f4b1
movq 0x10(%rsp), %rdi
addq $0x1f8, %rdi            # imm = 0x1F8
leaq 0x90(%rsp), %rsi
callq 0x12742
movl 0x68(%rsp), %esi
movl 0x6c(%rsp), %edx
movq 0x38(%rsp), %rdi
callq 0x1dd70
leaq 0x90(%rsp), %rdi
callq 0x6858
leaq 0x140(%rsp), %rdi
callq 0x128ba
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0x1f5cb
movq 0x110(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x170(%rsp), %rdi
callq 0x15650
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1f6a0
movq %rax, %rbx
jmp 0x1f73d
movq %rax, %rbx
jmp 0x1f75a
jmp 0x1f658
jmp 0x1f6a0
movq %rax, %rbx
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x1f626
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1f6d9
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
jmp 0x1f6d9
jmp 0x1f6a8
jmp 0x1f64a
movq %rax, %rbx
jmp 0x1f6f6
jmp 0x1f6ad
jmp 0x1f6a8
jmp 0x1f658
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x6858
jmp 0x1f730
movq %rax, %rbx
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x1f687
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1f65b
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
jmp 0x1f65b
movq %rax, %rbx
jmp 0x1f730
movq %rax, %rbx
jmp 0x1f6d9
movq %rax, %rbx
jmp 0x1f6cc
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1f6cc
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x90(%rsp), %rdi
callq 0x690a
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0x1f6f6
movq 0xf8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1f716
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq $0x0, 0x40(%rsp)
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x1f730
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x140(%rsp), %rdi
callq 0x128ba
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0x1f75a
movq 0x110(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x170(%rsp), %rdi
callq 0x15650
movq %rbx, %rdi
callq 0x23b0
nop