// File: /workspace/github_cpp_makefile_star2_O3/fjamour[P]icentral/src/bicon.cc
// Function: graph_t::i_bcc_dfs_visitor(unsigned int, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&, std::vector<unsigned int, std::allocator<unsigned int>>&, std::stack<std::pair<unsigned int, unsigned int>, std::deque<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>>&, int&, std::vector<graph_hash_t, std::allocator<graph_hash_t>>&)
void graph_t::i_bcc_dfs_visitor(node_id_t u,
                                    vector<int>& color_vec,
                                    vector<int>& low_vec,
                                    vector<int>& d_vec,
                                    vector<node_id_t>& pred_vec,
                                    stack<edge_t>& edge_stack,
                                    int& time,
                                    vector<graph_hash_t>& bcc_vec)
{
    color_vec[u] = 1;           //1 means grey
    d_vec[u] = ++time;
    low_vec[u] = d_vec[u];
    vector<node_id_t> nbr_vec = get_nbrs(u);
    int tree_edge_cnt = 0;
    for(int i = 0; i < nbr_vec.size(); ++i) {
        node_id_t v = nbr_vec[i];
        if(color_vec[v] == 0) { // (u, v) is a tree edge
            edge_stack.push(make_pair(u, v));
            pred_vec[v] = u;
            tree_edge_cnt++;
            i_bcc_dfs_visitor(v,
                    color_vec,
                    low_vec,
                    d_vec,
                    pred_vec,
                    edge_stack,
                    time,
                    bcc_vec);
            low_vec[u] = min(low_vec[u], low_vec[v]);
            if(low_vec[v] >= d_vec[u]) {
                // u is an articulation point, ready to output a bcc
                edge_t last_edge = make_pair(u, v);
                edge_t e;
                graph_hash_t bcc;
                do {
                    e = edge_stack.top();
                    edge_stack.pop();
                    bcc.insert_edge(e.first, e.second);
                } while(e != last_edge);
                bcc_vec.push_back(bcc);
            }
        } else if(v != pred_vec[u] && d_vec[v] < d_vec[u]) {   // (u, v) is a back edge
            edge_stack.push(make_pair(u, v));
            low_vec[u] = min(low_vec[u], d_vec[v]);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2f8, %rsp            # imm = 0x2F8
movq %r9, 0x28(%rsp)
movq %rcx, %r14
movq %rdx, %r12
movl %esi, %ebp
movq 0x338(%rsp), %rcx
movl %esi, %r15d
movq (%rdx), %rax
movl $0x1, (%rax,%r15,4)
movl (%rcx), %eax
incl %eax
movl %eax, (%rcx)
movq %r8, 0x10(%rsp)
movq (%r8), %rcx
movl %eax, (%rcx,%r15,4)
movq (%r14), %rcx
movl %eax, (%rcx,%r15,4)
movq %rdi, 0x30(%rsp)
callq 0x1dc78
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6112
movq (%rbx), %rdi
cmpq %rdi, 0x8(%rbx)
je 0x14b67
movq %r15, 0x8(%rsp)
movq %r14, 0x18(%rsp)
movq 0x330(%rsp), %r13
xorl %r15d, %r15d
movq 0x10(%rsp), %rsi
movq %r12, 0x20(%rsp)
movl (%rdi,%r15,4), %r14d
movq (%r12), %rax
cmpl $0x0, (%rax,%r14,4)
je 0x14a4b
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rcx
cmpl (%rax,%rcx,4), %r14d
je 0x14b4a
movq (%rsi), %rax
movl (%rax,%r14,4), %ecx
movq 0x8(%rsp), %rdx
cmpl (%rax,%rdx,4), %ecx
jge 0x14b4a
movq %r14, %rax
shlq $0x20, %rax
movq 0x8(%rsp), %rbx
orq %rbx, %rax
movq %rax, 0x50(%rsp)
movq %r13, %rdi
leaq 0x50(%rsp), %rsi
callq 0x15eda
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rsi
movq (%rsi), %rcx
movl (%rcx,%r14,4), %ecx
movl (%rax,%rbx,4), %edx
cmpl %edx, %ecx
cmovll %ecx, %edx
movl %edx, (%rax,%rbx,4)
jmp 0x14b4a
movq %rsi, %rbx
movq %r14, %rax
shlq $0x20, %rax
addq 0x8(%rsp), %rax
movq %rax, 0x50(%rsp)
movq %r13, %rdi
leaq 0x50(%rsp), %rsi
callq 0x15eda
movq 0x28(%rsp), %r9
movq (%r9), %rax
movl %ebp, (%rax,%r14,4)
subq $0x8, %rsp
movq 0x38(%rsp), %rdi
movl %r14d, %esi
movq %r12, %rdx
movq 0x20(%rsp), %r12
movq %r12, %rcx
movq %rbx, %r8
pushq 0x348(%rsp)
pushq 0x348(%rsp)
pushq %r13
callq 0x14938
addq $0x20, %rsp
movq (%r12), %rax
movl (%rax,%r14,4), %ecx
movq 0x8(%rsp), %rsi
movl (%rax,%rsi,4), %edx
cmpl %edx, %ecx
cmovll %ecx, %edx
movl %edx, (%rax,%rsi,4)
movl (%rax,%r14,4), %eax
movq (%rbx), %rcx
cmpl (%rcx,%rsi,4), %eax
movq 0x20(%rsp), %r12
movq %rbx, %rsi
jl 0x14b4a
leaq 0x50(%rsp), %rdi
callq 0x152ae
movq 0x30(%r13), %rax
cmpq 0x38(%r13), %rax
jne 0x14afb
movq 0x48(%r13), %rax
movq -0x8(%rax), %rax
movl $0x200, %ecx            # imm = 0x200
addq %rcx, %rax
movl -0x8(%rax), %r12d
movl -0x4(%rax), %ebx
movq %r13, %rdi
callq 0x1613c
leaq 0x50(%rsp), %rdi
movl %r12d, %esi
movl %ebx, %edx
callq 0x1c320
cmpl %ebp, %r12d
jne 0x14ae1
cmpl %r14d, %ebx
jne 0x14ae1
movq 0x340(%rsp), %rdi
leaq 0x50(%rsp), %rbx
movq %rbx, %rsi
callq 0x15620
movq %rbx, %rdi
callq 0x15650
movq 0x10(%rsp), %rsi
movq 0x20(%rsp), %r12
incq %r15
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rax
subq %rdi, %rax
sarq $0x2, %rax
cmpq %r15, %rax
ja 0x149cb
testq %rdi, %rdi
je 0x14b79
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
addq $0x2f8, %rsp            # imm = 0x2F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x14b93
jmp 0x14b98
jmp 0x14b93
jmp 0x14b93
movq %rax, %rbx
jmp 0x14ba5
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x15650
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x14bbc
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq %rbx, %rdi
callq 0x23b0