// File: fjamour[P]icentral/src/bicon.cc
// Function: graph_t::i_art_point_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>>&, int&, std::vector<unsigned int, std::allocator<unsigned int>>&)
void graph_t::i_art_point_dfs_visitor(node_id_t u,
                          vector<int>& color_vec,
                          vector<int>& low_vec,
                          vector<int>& d_vec,
                          vector<node_id_t>& pred_vec,
                          int& time,
                          vector<node_id_t>& art_point_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
            pred_vec[v] = u;
            tree_edge_cnt++;
            i_art_point_dfs_visitor(v, color_vec, low_vec, d_vec, pred_vec, time, art_point_vec);
            low_vec[u] = min(low_vec[u], low_vec[v]);
            if(pred_vec[u] == -1) {     //this is the root of the tree
                //if v is u's second child then u is art vertex
                if(tree_edge_cnt > 1) {
                    art_point_vec.push_back(u);
                }
            } else if(low_vec[v] >= d_vec[u]) {
                art_point_vec.push_back(u);
            }
        } else if(v != pred_vec[u]) {   // (u, v) is a back edge
            low_vec[u] = min(low_vec[u], d_vec[v]);
        }
    }
}

// Assembly:
subq $0xd8, %rsp
movq 0xe8(%rsp), %rax
movq 0xe0(%rsp), %rax
movq %rdi, 0xd0(%rsp)
movl %esi, 0xcc(%rsp)
movq %rdx, 0xc0(%rsp)
movq %rcx, 0xb8(%rsp)
movq %r8, 0xb0(%rsp)
movq %r9, 0xa8(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0xc0(%rsp), %rdi
movl 0xcc(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl $0x1, (%rax)
movq 0xe0(%rsp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x60(%rsp)
movl %ecx, (%rax)
movq 0xb0(%rsp), %rdi
movl 0xcc(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl 0x60(%rsp), %ecx
movl %ecx, (%rax)
movq 0xb0(%rsp), %rdi
movl 0xcc(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl (%rax), %eax
movl %eax, 0x64(%rsp)
movq 0xb8(%rsp), %rdi
movl 0xcc(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl 0x64(%rsp), %ecx
movq 0x68(%rsp), %rdi
movl %ecx, (%rax)
movl 0xcc(%rsp), %esi
callq 0x566f0
movq %rax, %rsi
leaq 0x90(%rsp), %rdi
callq 0x10b20
movl $0x0, 0x8c(%rsp)
movl $0x0, 0x88(%rsp)
movslq 0x88(%rsp), %rax
movq %rax, 0x58(%rsp)
leaq 0x90(%rsp), %rdi
callq 0xfd50
movq %rax, %rcx
movq 0x58(%rsp), %rax
cmpq %rcx, %rax
jae 0x40054
movslq 0x88(%rsp), %rsi
leaq 0x90(%rsp), %rdi
callq 0xfbc0
movl (%rax), %eax
movl %eax, 0x84(%rsp)
movq 0xc0(%rsp), %rdi
movl 0x84(%rsp), %eax
movl %eax, %esi
callq 0xfc50
cmpl $0x0, (%rax)
jne 0x3ffa2
movl 0xcc(%rsp), %eax
movl %eax, 0x54(%rsp)
movq 0xa8(%rsp), %rdi
movl 0x84(%rsp), %eax
movl %eax, %esi
callq 0xfbc0
movl 0x54(%rsp), %ecx
movq 0x68(%rsp), %rdi
movl %ecx, (%rax)
movl 0x8c(%rsp), %eax
incl %eax
movl %eax, 0x8c(%rsp)
movl 0x84(%rsp), %esi
movq 0xc0(%rsp), %rdx
movq 0xb8(%rsp), %rcx
movq 0xb0(%rsp), %r8
movq 0xa8(%rsp), %r9
movq 0xe0(%rsp), %r10
movq 0xe8(%rsp), %r11
movq %rsp, %rax
movq %r11, 0x8(%rax)
movq %r10, (%rax)
callq 0x3fc80
jmp 0x3fe79
movq 0xb8(%rsp), %rdi
movl 0xcc(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movq %rax, 0x40(%rsp)
movq 0xb8(%rsp), %rdi
movl 0x84(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movq 0x40(%rsp), %rdi
movq %rax, %rsi
callq 0x2d1a0
movq %rax, 0x48(%rsp)
jmp 0x3febe
movq 0x48(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x3c(%rsp)
movq 0xb8(%rsp), %rdi
movl 0xcc(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl 0x3c(%rsp), %ecx
movl %ecx, (%rax)
movq 0xa8(%rsp), %rdi
movl 0xcc(%rsp), %eax
movl %eax, %esi
callq 0xfbc0
cmpl $-0x1, (%rax)
jne 0x3ff45
cmpl $0x1, 0x8c(%rsp)
jle 0x3ff43
movq 0xe8(%rsp), %rdi
leaq 0xcc(%rsp), %rsi
callq 0xfce0
jmp 0x3ff21
jmp 0x3ff43
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x10520
jmp 0x40069
jmp 0x3ff9d
movq 0xb8(%rsp), %rdi
movl 0x84(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl (%rax), %eax
movl %eax, 0x38(%rsp)
movq 0xb0(%rsp), %rdi
movl 0xcc(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movq %rax, %rcx
movl 0x38(%rsp), %eax
cmpl (%rcx), %eax
jl 0x3ff9b
movq 0xe8(%rsp), %rdi
leaq 0xcc(%rsp), %rsi
callq 0xfce0
jmp 0x3ff99
jmp 0x3ff9b
jmp 0x3ff9d
jmp 0x4003c
movl 0x84(%rsp), %eax
movl %eax, 0x34(%rsp)
movq 0xa8(%rsp), %rdi
movl 0xcc(%rsp), %eax
movl %eax, %esi
callq 0xfbc0
movq %rax, %rcx
movl 0x34(%rsp), %eax
cmpl (%rcx), %eax
je 0x4003a
movq 0xb8(%rsp), %rdi
movl 0xcc(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movq %rax, 0x20(%rsp)
movq 0xb0(%rsp), %rdi
movl 0x84(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x2d1a0
movq %rax, 0x28(%rsp)
jmp 0x40013
movq 0x28(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x1c(%rsp)
movq 0xb8(%rsp), %rdi
movl 0xcc(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl 0x1c(%rsp), %ecx
movl %ecx, (%rax)
jmp 0x4003c
jmp 0x4003e
movl 0x88(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x88(%rsp)
jmp 0x3fd8d
leaq 0x90(%rsp), %rdi
callq 0x10520
addq $0xd8, %rsp
retq
movq 0x78(%rsp), %rdi
callq 0x9cf0
nopw %cs:(%rax,%rax)