// File: /workspace/github_cpp_makefile_star2_O2/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 %r8, %rbx
movq %rcx, %r14
movq %rdx, %r12
movl %esi, %ebp
movq 0x338(%rsp), %rcx
movq 0x330(%rsp), %r13
movl %esi, %edx
movq (%r12), %rax
movl $0x1, (%rax,%rdx,4)
movl (%rcx), %eax
incl %eax
movl %eax, (%rcx)
movq (%r8), %rcx
movl %eax, (%rcx,%rdx,4)
movq (%r14), %rcx
movq %rdx, 0x8(%rsp)
movl %eax, (%rcx,%rdx,4)
movq %rdi, 0x30(%rsp)
callq 0x18b4c
leaq 0x38(%rsp), %rdi
movq %rax, %rsi
callq 0x4ba0
movq %rbx, %rsi
xorl %r15d, %r15d
movq %rbx, 0x10(%rsp)
movq %r14, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r15, %rcx
jbe 0x10ea2
movl (%rax,%r15,4), %r14d
movq (%r12), %rax
cmpl $0x0, (%rax,%r14,4)
je 0x10d9b
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rcx
cmpl (%rax,%rcx,4), %r14d
je 0x10e9a
movq (%rsi), %rax
movl (%rax,%r14,4), %ecx
movq 0x8(%rsp), %rdx
cmpl (%rax,%rdx,4), %ecx
jge 0x10e9a
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 0x11e22
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 0x10e9a
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 0x11e22
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 0x10c80
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 0x10e9a
leaq 0x50(%rsp), %rdi
callq 0x11468
movq 0x30(%r13), %rax
cmpq 0x38(%r13), %rax
jne 0x10e4b
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 0x12082
leaq 0x50(%rsp), %rdi
movl %r12d, %esi
movl %ebx, %edx
callq 0x1756e
cmpl %ebp, %r12d
jne 0x10e31
cmpl %r14d, %ebx
jne 0x10e31
movq 0x340(%rsp), %rdi
leaq 0x50(%rsp), %rbx
movq %rbx, %rsi
callq 0x1170e
movq %rbx, %rdi
callq 0x1173e
movq 0x10(%rsp), %rsi
movq 0x20(%rsp), %r12
incq %r15
jmp 0x10d01
leaq 0x38(%rsp), %rdi
callq 0x56ec
addq $0x2f8, %rsp            # imm = 0x2F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10ec6
jmp 0x10ec6
jmp 0x10ecb
jmp 0x10ec6
movq %rax, %rbx
jmp 0x10ed8
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x1173e
leaq 0x38(%rsp), %rdi
callq 0x56ec
movq %rbx, %rdi
callq 0x23d0