// File: /workspace/github_cpp_makefile_star2_O1/fjamour[P]icentral/src/bcc_delta.cc
// Function: graph_t::find_edge_bcc(bcc_delta_t&, unsigned int, unsigned int)
void graph_t::find_edge_bcc(bcc_delta_t&  bcc,
                                node_id_t src,
                                node_id_t dst)
{
    //a. find the bcc subgraph
    //b. find the articulation points in bcc
    //c. find the sizes of the subgraphs connected to each art point
    find_edge_bcc_subgraph(bcc.bcc_subgraph, src, dst);
    bcc.bcc_fast_subgraph.fill_graph(bcc.bcc_subgraph);
    vector<node_id_t> art_pt_vec;
    find_art_points(art_pt_vec);
    set<node_id_t> art_pt_set;
    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 = bcc.bcc_subgraph.nodes_map.begin();
        it != bcc.bcc_subgraph.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(!bcc.bcc_subgraph.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);
                }
            }
            bcc.art_pt_map.insert(make_pair(v, subgraph_sz_vec));
        }
    }
    
    //fix art_pt_map
    bcc_delta_t::art_pt_map_t new_art_pt_map;
    for(bcc_delta_t::art_pt_map_t::iterator it = bcc.art_pt_map.begin();
            it != bcc.art_pt_map.end();
            ++it) {
        node_id_t new_v = bcc.bcc_fast_subgraph.outin_label_map[it->first];
        new_art_pt_map.insert(make_pair(new_v, it->second));
    }
    bcc.art_pt_map = new_art_pt_map;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x30(%rsi), %r15
movq %r15, %rsi
callq 0x14ca4
movq %rbx, 0x8(%rsp)
leaq 0x2d8(%rbx), %rdi
movq %r15, 0x130(%rsp)
movq %r15, %rsi
callq 0x2f4f0
xorps %xmm0, %xmm0
leaq 0x100(%rsp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq %r14, 0x80(%rsp)
movq %r14, %rdi
callq 0x143c8
leaq 0x140(%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 0xed19
xorl %r14d, %r14d
leaq 0x138(%rsp), %rbx
xorl %r15d, %r15d
addq %r14, %rsi
movq %rbx, %rdi
callq 0x12a12
incq %r15
movq 0x100(%rsp), %rsi
movq 0x108(%rsp), %rax
subq %rsi, %rax
sarq $0x2, %rax
addq $0x4, %r14
cmpq %r15, %rax
ja 0xeceb
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rbp
movq (%rbp), %r14
leaq 0x140(%rsp), %rsi
testq %r14, %r14
jne 0xed3d
movq 0x8(%rbp), %r14
addq $0x8, %rbp
jmp 0xed2e
movq 0x8(%rsp), %rcx
movq 0x38(%rcx), %rax
movq 0x40(%rcx), %rcx
cmpq (%rax,%rcx,8), %r14
je 0xf23c
leaq 0x90(%rsp), %r13
leaq 0x8c(%rsp), %r12
movl (%r14), %edi
movq 0x148(%rsp), %rcx
movq %rsi, %rax
testq %rcx, %rcx
je 0xed90
movq %rsi, %rax
xorl %edx, %edx
cmpl %edi, 0x20(%rcx)
setb %dl
cmovaeq %rcx, %rax
movq 0x10(%rcx,%rdx,8), %rcx
testq %rcx, %rcx
jne 0xed7a
movq %rsi, %rcx
cmpq %rsi, %rax
je 0xeda2
cmpl 0x20(%rax), %edi
cmovbq %rsi, %rax
movq %rax, %rcx
cmpq %rsi, %rcx
je 0xf212
movq %rdi, 0x78(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
xorl %eax, %eax
movq %rax, 0x70(%rsp)
movq %rax, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movl %eax, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq 0x80(%rsp), %rdi
callq 0x1e160
leaq 0x18(%rsp), %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x96d2
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rbx
movl 0x30(%rsp), %r15d
cmpq %rbx, %rdi
je 0xee15
movq %rbx, %rdx
subq %rdi, %rdx
xorl %esi, %esi
callq 0x2110
jmp 0xee18
movq %rdi, %rbx
testl %r15d, %r15d
je 0xee33
negb %r15b
movq $-0x1, %rax
movl %r15d, %ecx
shrq %cl, %rax
notq %rax
andq %rax, (%rbx)
movq 0x18(%rsp), %rax
movq 0x78(%rsp), %rcx
movl %ecx, %edx
movl $0x1, %esi
shlq %cl, %rsi
shrl $0x6, %edx
orq %rsi, (%rax,%rdx,8)
movq 0x80(%rsp), %rdi
movl %ecx, %esi
callq 0x1ddf8
leaq 0xe8(%rsp), %rdi
movq %rax, %rsi
callq 0x61a0
movq 0xe8(%rsp), %rax
cmpq %rax, 0xf0(%rsp)
movq 0x78(%rsp), %rsi
je 0xf114
xorl %ebx, %ebx
movl (%rax,%rbx,4), %edx
movl %edx, 0x118(%rsp)
movq 0x130(%rsp), %rdi
callq 0x1c746
testb %al, %al
jne 0xf0ec
movl 0x118(%rsp), %eax
movq 0x18(%rsp), %rcx
movl %eax, %edx
shrl $0x6, %edx
movq (%rcx,%rdx,8), %rcx
btq %rax, %rcx
jb 0xf0ec
movl $0x0, 0x14(%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 %r13, %rdi
xorl %esi, %esi
callq 0x6b50
movq 0xc0(%rsp), %rax
movq 0xd0(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0xef35
movl 0x118(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0xc0(%rsp)
jmp 0xef45
movq %r13, %rdi
leaq 0x118(%rsp), %rsi
callq 0x7644
movl 0x118(%rsp), %ecx
movq 0x18(%rsp), %rax
movl %ecx, %edx
movl $0x1, %esi
shlq %cl, %rsi
shrl $0x6, %edx
orq %rsi, (%rax,%rdx,8)
movq 0xc0(%rsp), %rax
cmpq 0xa0(%rsp), %rax
je 0xf0b8
movq 0xc8(%rsp), %rdi
movq %rax, %rcx
cmpq %rdi, %rax
jne 0xef9c
movq 0xd8(%rsp), %rcx
movq -0x8(%rcx), %rcx
movl $0x200, %edx            # imm = 0x200
addq %rdx, %rcx
movl -0x4(%rcx), %r15d
cmpq %rdi, %rax
je 0xefab
addq $-0x4, %rax
jmp 0xefea
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)
addq $0x1fc, %rax            # imm = 0x1FC
movq %rax, 0xc0(%rsp)
incl 0x14(%rsp)
movq 0x80(%rsp), %rdi
movl %r15d, %esi
callq 0x1ddf8
leaq 0x40(%rsp), %rdi
movq %rax, %rsi
callq 0x61a0
movq 0x40(%rsp), %rdi
cmpq %rdi, 0x48(%rsp)
je 0xf09d
xorl %r15d, %r15d
movl (%rdi,%r15,4), %ecx
movl %ecx, 0x8c(%rsp)
movq 0x18(%rsp), %rax
movl $0x1, %edx
shlq %cl, %rdx
movl %ecx, %esi
shrl $0x6, %esi
movq (%rax,%rsi,8), %rdi
btq %rcx, %rdi
jb 0xf084
orq %rdx, %rdi
movq %rdi, (%rax,%rsi,8)
movq 0xc0(%rsp), %rax
movq 0xd0(%rsp), %rdx
addq $-0x4, %rdx
cmpq %rdx, %rax
je 0xf079
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0xc0(%rsp)
jmp 0xf084
movq %r13, %rdi
movq %r12, %rsi
callq 0x7644
incq %r15
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rax
subq %rdi, %rax
sarq $0x2, %rax
cmpq %r15, %rax
ja 0xf022
testq %rdi, %rdi
je 0xef62
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
jmp 0xef62
movq 0x68(%rsp), %rsi
cmpq 0x70(%rsp), %rsi
je 0xf0d5
movl 0x14(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x68(%rsp)
jmp 0xf0e4
leaq 0x60(%rsp), %rdi
leaq 0x14(%rsp), %rdx
callq 0x12b22
movq %r13, %rdi
callq 0x6998
incq %rbx
movq 0xe8(%rsp), %rax
movq 0xf0(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rbx, %rcx
movq 0x78(%rsp), %rsi
ja 0xee8a
movl %esi, 0x40(%rsp)
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
leaq 0x60(%rsp), %rsi
callq 0x7b64
movl 0x40(%rsp), %eax
movl %eax, 0x90(%rsp)
movups 0x48(%rsp), %xmm0
movups %xmm0, 0x98(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0xa8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
leaq 0x118(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
callq 0x12bfe
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0xf18f
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0xf1a6
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0xf1c3
movq 0xf8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0xf1f3
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
xorl %eax, %eax
movq %rax, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movl %eax, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0xf20a
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x140(%rsp), %rsi
movq 0x20(%r14), %r14
testq %r14, %r14
jne 0xf225
movq 0x8(%rbp), %r14
addq $0x8, %rbp
jmp 0xf216
movq 0x8(%rsp), %rcx
movq 0x38(%rcx), %rax
movq 0x40(%rcx), %rcx
cmpq (%rax,%rcx,8), %r14
jne 0xed64
leaq 0x14(%rsp), %rax
leaq 0x60(%rsp), %r10
leaq 0x90(%rsp), %rdi
leaq 0xe8(%rsp), %rdx
leaq 0x18(%rsp), %rcx
leaq 0x40(%rsp), %r8
leaq 0x118(%rsp), %r9
movl $0xa, %esi
pushq %rax
pushq %r10
callq 0x67d6
addq $0x10, %rsp
movq 0x8(%rsp), %rax
movq 0x8(%rax), %r12
movq (%r12), %rbx
testq %rbx, %rbx
jne 0xf296
movq 0x8(%r12), %rbx
addq $0x8, %r12
jmp 0xf286
movq 0x8(%rsp), %rcx
movq 0x8(%rcx), %rax
movq 0x10(%rcx), %rcx
cmpq (%rax,%rcx,8), %rbx
je 0xf37c
movq 0x8(%rsp), %rax
leaq 0x338(%rax), %r14
leaq 0x48(%rsp), %r15
leaq 0x90(%rsp), %r13
leaq 0x18(%rsp), %rbp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5d84
movl (%rax), %eax
leaq 0x8(%rbx), %rsi
movl %eax, 0x40(%rsp)
movq %r15, %rdi
callq 0x7b64
movl 0x40(%rsp), %eax
movl %eax, 0x18(%rsp)
movups 0x48(%rsp), %xmm0
movups %xmm0, 0x20(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x30(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movq $0x0, 0x10(%r15)
leaq 0x60(%rsp), %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x12bfe
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xf33a
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0xf351
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x20(%rbx), %rbx
testq %rbx, %rbx
jne 0xf365
movq 0x8(%r12), %rbx
addq $0x8, %r12
jmp 0xf355
movq 0x8(%rsp), %rcx
movq 0x8(%rcx), %rax
movq 0x10(%rcx), %rcx
cmpq (%rax,%rcx,8), %rbx
jne 0xf2cb
leaq 0x90(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x127fc
leaq 0x90(%rsp), %rdi
callq 0x68e6
leaq 0x138(%rsp), %rdi
callq 0x12970
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0xf3c5
movq 0x110(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf463
jmp 0xf478
movq %rax, %rbx
jmp 0xf52d
jmp 0xf48b
movq %rax, %rbx
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0xf40e
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0xf4bc
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
jmp 0xf4bc
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xf448
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0xf466
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
jmp 0xf466
jmp 0xf463
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x68e6
jmp 0xf520
movq %rax, %rbx
jmp 0xf520
jmp 0xf482
movq %rax, %rbx
jmp 0xf4d9
jmp 0xf490
jmp 0xf48b
movq %rax, %rbx
jmp 0xf4bc
movq %rax, %rbx
jmp 0xf4af
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xf4af
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x90(%rsp), %rdi
callq 0x6998
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0xf4d9
movq 0xf8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0xf509
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
xorl %eax, %eax
movq %rax, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movl %eax, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0xf520
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x138(%rsp), %rdi
callq 0x12970
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0xf54a
movq 0x110(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq %rbx, %rdi
callq 0x23b0