// File: /workspace/github_cpp_makefile_star2_O1/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, 0x8(%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, 0x18(%rsp)
movl %eax, (%rcx,%rdx,4)
movq %rdi, 0x38(%rsp)
callq 0x1ddf8
leaq 0x40(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x61a0
movq (%r15), %rdi
cmpq %rdi, 0x8(%r15)
je 0x15236
movq %r12, 0x28(%rsp)
movq 0x90(%rsp), %r13
xorl %r12d, %r12d
movq $0x0, (%rsp)
movq 0x18(%rsp), %rsi
movq %rbx, %r8
movq %rbx, 0x30(%rsp)
movq %r14, 0x10(%rsp)
movl (%rdi,%r12,4), %r15d
movq (%r14), %rax
cmpl $0x0, (%rax,%r15,4)
je 0x15110
movq 0x8(%rsp), %rax
movq (%rax), %rax
cmpl (%rax,%rsi,4), %r15d
je 0x15219
movq (%r8), %rax
movl (%rax,%r15,4), %ecx
cmpl (%rax,%rsi,4), %ecx
jge 0x15219
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 0x15fc6
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 0x15214
movq %r8, %rbx
movq %r15, %rax
shlq $0x20, %rax
orq %rsi, %rax
movq %rax, 0x20(%rsp)
movq %r13, %rdi
leaq 0x20(%rsp), %rsi
callq 0x15fc6
movq 0x8(%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 0x14ffe
addq $0x10, %rsp
movq (%r14), %rax
movl (%rax,%r15,4), %ecx
movq 0x18(%rsp), %rsi
movl (%rax,%rsi,4), %edx
cmpl %edx, %ecx
cmovll %ecx, %edx
movl %edx, (%rax,%rsi,4)
movl (%rax,%r15,4), %ecx
movq (%rbx), %rdx
xorl %eax, %eax
cmpl (%rdx,%rsi,4), %ecx
movq %rbx, %r8
jl 0x1519c
movq 0x8(%rsp), %rax
movq (%rax), %rcx
xorl %eax, %eax
cmpl $-0x1, (%rcx,%rsi,4)
setne %al
movq (%rsp), %rdx
leal 0x1(%rdx), %edi
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
cmpl $-0x1, (%rcx,%rsi,4)
sete %cl
testl %edx, %edx
setg %dl
andb %cl, %dl
movzbl %dl, %ecx
orl %eax, %ecx
je 0x1520e
movl %edi, (%rsp)
movq 0x30(%r13), %rax
cmpq 0x38(%r13), %rax
jne 0x151dd
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 0x16222
cmpl %ebp, %r14d
jne 0x151c3
cmpl %r15d, %ebx
jne 0x151c3
movl (%rsp), %eax
movq %rax, (%rsp)
movq 0x30(%rsp), %r8
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %rsi
jmp 0x15219
movl %edi, %eax
movq %rax, (%rsp)
movq 0x10(%rsp), %r14
incq %r12
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rax
subq %rdi, %rax
sarq $0x2, %rax
cmpq %r12, %rax
ja 0x15099
testq %rdi, %rdi
je 0x15248
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 0x1525b
jmp 0x1525b
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x15275
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq %rbx, %rdi
callq 0x23b0
nop