// File: /workspace/github_cpp_makefile_star2_O3/fjamour[P]icentral/src/bicon.cc
// Function: graph_t::i_edge_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&)
void graph_t::i_edge_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)
{
    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++;
            /// f() starts
            i_edge_bcc_dfs_visitor(v,
                    color_vec,
                    low_vec,
                    d_vec,
                    pred_vec,
                    edge_stack,
                    time);
            /// g() starts
            low_vec[u] = min(low_vec[u], low_vec[v]);
            bool flush_edges = (low_vec[v] >= d_vec[u] && pred_vec[u] != -1);
            flush_edges |= (pred_vec[u] == -1 && tree_edge_cnt >= 2);
            if(flush_edges) {
                // u is an articulation point, ready to output a bcc
                edge_t last_edge = make_pair(u, v);
                edge_t e;
                do {
                    e = edge_stack.top();
                    edge_stack.pop();
                } while(e != last_edge);
            }
        } 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 $0x58, %rsp
movq %r9, 0x18(%rsp)
movq %rcx, %r12
movq %rdx, %r14
movl %esi, %ebp
movq 0x98(%rsp), %rcx
movl %esi, %edx
movq (%r14), %rax
movl $0x1, (%rax,%rdx,4)
movl (%rcx), %eax
incl %eax
movl %eax, (%rcx)
movq %r8, %rbx
movq (%r8), %rcx
movl %eax, (%rcx,%rdx,4)
movq (%r12), %rcx
movq %rdx, 0x10(%rsp)
movl %eax, (%rcx,%rdx,4)
movq %rdi, 0x38(%rsp)
callq 0x1dc78
leaq 0x40(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x6112
movq (%r15), %rdi
cmpq %rdi, 0x8(%r15)
je 0x15144
movq %r12, 0x28(%rsp)
movq 0x90(%rsp), %r13
xorl %r12d, %r12d
movq $0x0, (%rsp)
movq 0x10(%rsp), %rsi
movq %rbx, %r8
movq %rbx, 0x30(%rsp)
movq %r14, 0x8(%rsp)
movl (%rdi,%r12,4), %r15d
movq (%r14), %rax
cmpl $0x0, (%rax,%r15,4)
je 0x1502e
movq 0x18(%rsp), %rax
movq (%rax), %rax
cmpl (%rax,%rsi,4), %r15d
je 0x15127
movq (%r8), %rax
movl (%rax,%r15,4), %ecx
cmpl (%rax,%rsi,4), %ecx
jge 0x15127
movq %r8, %r14
movq %r15, %rax
shlq $0x20, %rax
orq %rsi, %rax
movq %rax, 0x20(%rsp)
movq %r13, %rdi
movq %rsi, %rbx
leaq 0x20(%rsp), %rsi
callq 0x15eda
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq %r14, %r8
movq (%r14), %rcx
movl (%rcx,%r15,4), %ecx
movl (%rax,%rbx,4), %edx
cmpl %edx, %ecx
cmovll %ecx, %edx
movl %edx, (%rax,%rbx,4)
movq %rbx, %rsi
jmp 0x150d3
movq %r8, %rbx
movq %r15, %rax
shlq $0x20, %rax
orq %rsi, %rax
movq %rax, 0x20(%rsp)
movq %r13, %rdi
leaq 0x20(%rsp), %rsi
callq 0x15eda
movq 0x18(%rsp), %r9
movq (%r9), %rax
movl %ebp, (%rax,%r15,4)
movq 0x38(%rsp), %rdi
movl %r15d, %esi
movq %r14, %rdx
movq 0x28(%rsp), %r14
movq %r14, %rcx
movq %rbx, %r8
pushq 0x98(%rsp)
pushq %r13
callq 0x14f1c
addq $0x10, %rsp
movq (%rsp), %rdi
leal 0x1(%rdi), %r9d
movq (%r14), %rax
movl (%rax,%r15,4), %ecx
movq 0x10(%rsp), %rsi
movl (%rax,%rsi,4), %edx
cmpl %edx, %ecx
cmovll %ecx, %edx
movl %edx, (%rax,%rsi,4)
movl (%rax,%r15,4), %eax
movq (%rbx), %rcx
cmpl (%rcx,%rsi,4), %eax
setge %dl
movq 0x18(%rsp), %rax
movq (%rax), %rax
cmpl $-0x1, (%rax,%rsi,4)
setne %al
testl %edi, %edi
setle %cl
testb %al, %dl
jne 0x150da
orb %cl, %al
je 0x150da
movq %rbx, %r8
movl %r9d, %eax
movq %rax, (%rsp)
movq 0x8(%rsp), %r14
jmp 0x15127
movl %r9d, (%rsp)
movq 0x30(%r13), %rax
cmpq 0x38(%r13), %rax
jne 0x150f8
movq 0x48(%r13), %rax
movq -0x8(%rax), %rax
movl $0x200, %ecx            # imm = 0x200
addq %rcx, %rax
movl -0x8(%rax), %r14d
movl -0x4(%rax), %ebx
movq %r13, %rdi
callq 0x1613c
cmpl %ebp, %r14d
jne 0x150de
cmpl %r15d, %ebx
jne 0x150de
movl (%rsp), %eax
movq %rax, (%rsp)
movq 0x30(%rsp), %r8
movq 0x8(%rsp), %r14
movq 0x10(%rsp), %rsi
incq %r12
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rax
subq %rdi, %rax
sarq $0x2, %rax
cmpq %r12, %rax
ja 0x14fb7
testq %rdi, %rdi
je 0x15156
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x15169
jmp 0x15169
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x15183
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq %rbx, %rdi
callq 0x23b0
nop