// File: 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:
subq $0x138, %rsp            # imm = 0x138
movq 0x148(%rsp), %rax
movq 0x140(%rsp), %rax
movq %rdi, 0x130(%rsp)
movl %esi, 0x12c(%rsp)
movq %rdx, 0x120(%rsp)
movq %rcx, 0x118(%rsp)
movq %r8, 0x110(%rsp)
movq %r9, 0x108(%rsp)
movq 0x130(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x120(%rsp), %rdi
movl 0x12c(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl $0x1, (%rax)
movq 0x148(%rsp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xa0(%rsp)
movl %ecx, (%rax)
movq 0x110(%rsp), %rdi
movl 0x12c(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl 0xa0(%rsp), %ecx
movl %ecx, (%rax)
movq 0x110(%rsp), %rdi
movl 0x12c(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl (%rax), %eax
movl %eax, 0xa4(%rsp)
movq 0x118(%rsp), %rdi
movl 0x12c(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl 0xa4(%rsp), %ecx
movq 0xa8(%rsp), %rdi
movl %ecx, (%rax)
movl 0x12c(%rsp), %esi
callq 0x566f0
movq %rax, %rsi
leaq 0xf0(%rsp), %rdi
callq 0x10b20
movl $0x0, 0xec(%rsp)
movl $0x0, 0xe8(%rsp)
movslq 0xe8(%rsp), %rax
movq %rax, 0x98(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0xfd50
movq %rax, %rcx
movq 0x98(%rsp), %rax
cmpq %rcx, %rax
jae 0x41479
movslq 0xe8(%rsp), %rsi
leaq 0xf0(%rsp), %rdi
callq 0xfbc0
movl (%rax), %eax
movl %eax, 0xe4(%rsp)
movq 0x120(%rsp), %rdi
movl 0xe4(%rsp), %eax
movl %eax, %esi
callq 0xfc50
cmpl $0x0, (%rax)
jne 0x41338
movq 0x140(%rsp), %rax
movq %rax, 0x88(%rsp)
leaq 0x12c(%rsp), %rdi
leaq 0xe4(%rsp), %rsi
callq 0x41730
movq %rax, 0x90(%rsp)
jmp 0x4107c
movq 0x88(%rsp), %rdi
movq 0x90(%rsp), %rax
movq %rax, 0xdc(%rsp)
leaq 0xdc(%rsp), %rsi
callq 0x41700
jmp 0x410a3
movl 0x12c(%rsp), %eax
movl %eax, 0x84(%rsp)
movq 0x108(%rsp), %rdi
movl 0xe4(%rsp), %eax
movl %eax, %esi
callq 0xfbc0
movl 0x84(%rsp), %ecx
movq 0xa8(%rsp), %rdi
movl %ecx, (%rax)
movl 0xec(%rsp), %eax
incl %eax
movl %eax, 0xec(%rsp)
movl 0xe4(%rsp), %esi
movq 0x120(%rsp), %rdx
movq 0x118(%rsp), %rcx
movq 0x110(%rsp), %r8
movq 0x108(%rsp), %r9
movq 0x140(%rsp), %r10
movq 0x148(%rsp), %r11
movq %rsp, %rax
movq %r11, 0x8(%rax)
movq %r10, (%rax)
callq 0x40ec0
jmp 0x41130
movq 0x118(%rsp), %rdi
movl 0x12c(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movq %rax, 0x70(%rsp)
movq 0x118(%rsp), %rdi
movl 0xe4(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movq 0x70(%rsp), %rdi
movq %rax, %rsi
callq 0x2d1a0
movq %rax, 0x78(%rsp)
jmp 0x41175
movq 0x78(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x64(%rsp)
movq 0x118(%rsp), %rdi
movl 0x12c(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl 0x64(%rsp), %ecx
movl %ecx, (%rax)
movq 0x118(%rsp), %rdi
movl 0xe4(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl (%rax), %eax
movl %eax, 0x68(%rsp)
movq 0x110(%rsp), %rdi
movl 0x12c(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl 0x68(%rsp), %ecx
movq %rax, %rdx
xorl %eax, %eax
cmpl (%rdx), %ecx
movb %al, 0x6f(%rsp)
jl 0x411ff
movq 0x108(%rsp), %rdi
movl 0x12c(%rsp), %eax
movl %eax, %esi
callq 0xfbc0
cmpl $-0x1, (%rax)
setne %al
movb %al, 0x6f(%rsp)
movb 0x6f(%rsp), %al
andb $0x1, %al
movb %al, 0xcb(%rsp)
movq 0x108(%rsp), %rdi
movl 0x12c(%rsp), %eax
movl %eax, %esi
callq 0xfbc0
movq %rax, %rcx
xorl %eax, %eax
cmpl $-0x1, (%rcx)
movb %al, 0x63(%rsp)
jne 0x4123f
cmpl $0x2, 0xec(%rsp)
setge %al
movb %al, 0x63(%rsp)
movb 0x63(%rsp), %al
andb $0x1, %al
movzbl %al, %ecx
movb 0xcb(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
orl %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, 0xcb(%rsp)
testb $0x1, 0xcb(%rsp)
je 0x41333
leaq 0x12c(%rsp), %rdi
leaq 0xe4(%rsp), %rsi
callq 0x41730
movq %rax, 0x58(%rsp)
jmp 0x4128f
movq 0x58(%rsp), %rax
movq %rax, 0xc0(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x41760
jmp 0x412ab
jmp 0x412ad
movq 0x140(%rsp), %rdi
callq 0x41e20
movq %rax, 0x50(%rsp)
jmp 0x412c1
movq 0x50(%rsp), %rsi
leaq 0xb8(%rsp), %rdi
callq 0x41e30
jmp 0x412d5
movq 0x140(%rsp), %rdi
callq 0x41e60
jmp 0x412e4
jmp 0x412e6
leaq 0xb8(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x41e70
movb %al, 0x4f(%rsp)
jmp 0x41301
movb 0x4f(%rsp), %al
testb $0x1, %al
jne 0x412ad
jmp 0x4130b
jmp 0x41333
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x10520
jmp 0x4148e
jmp 0x41461
movl 0xe4(%rsp), %eax
movl %eax, 0x48(%rsp)
movq 0x108(%rsp), %rdi
movl 0x12c(%rsp), %eax
movl %eax, %esi
callq 0xfbc0
movq %rax, %rcx
movl 0x48(%rsp), %eax
cmpl (%rcx), %eax
je 0x4145f
movq 0x110(%rsp), %rdi
movl 0xe4(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl (%rax), %eax
movl %eax, 0x44(%rsp)
movq 0x110(%rsp), %rdi
movl 0x12c(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movq %rax, %rcx
movl 0x44(%rsp), %eax
cmpl (%rcx), %eax
jge 0x4145f
movq 0x140(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x12c(%rsp), %rdi
leaq 0xe4(%rsp), %rsi
callq 0x41730
movq %rax, 0x38(%rsp)
jmp 0x413d2
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rax
movq %rax, 0xb0(%rsp)
leaq 0xb0(%rsp), %rsi
callq 0x41700
jmp 0x413f3
movq 0x118(%rsp), %rdi
movl 0x12c(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movq %rax, 0x20(%rsp)
movq 0x110(%rsp), %rdi
movl 0xe4(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x2d1a0
movq %rax, 0x28(%rsp)
jmp 0x41438
movq 0x28(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x1c(%rsp)
movq 0x118(%rsp), %rdi
movl 0x12c(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl 0x1c(%rsp), %ecx
movl %ecx, (%rax)
jmp 0x41461
jmp 0x41463
movl 0xe8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xe8(%rsp)
jmp 0x40fdf
leaq 0xf0(%rsp), %rdi
callq 0x10520
addq $0x138, %rsp            # imm = 0x138
retq
movq 0xd0(%rsp), %rdi
callq 0x9cf0
nopl (%rax,%rax)