// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/graph.c
// Function: scc_util
static void scc_util(asmg_t *g, uint64_t v, int *disc, int *low, kdq_u64_t *st, int *stb, int *depth, int *scc, int *n_scc)
{
    uint64_t i, w, n;
    asmg_arc_t *a;

    disc[v] = low[v] = ++*depth;
    kdq_push(uint64_t, st, v);
    stb[v] = 1;

    a = asmg_arc_a(g, v);
    n = asmg_arc_n(g, v);
    for (i = 0; i < n; ++i) {
        if (a[i].del) continue;
        w = a[i].w;
        if (g->vtx[w>>1].del) continue;
        if (disc[w] == -1) {
            scc_util(g, w, disc, low, st, stb, depth, scc, n_scc);
            low[v] = MIN(low[v], low[w]);
        } else if (stb[w] == 1) {
            low[v] = MIN(low[v], disc[w]);
        }
    }
    
    if (low[v] == disc[v]) {
        do {
            w = *kdq_pop(uint64_t, st);
            stb[w] = 0;
            scc[w] = *n_scc;
        } while (w != v);
        ++*n_scc;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r14
movq %rcx, %r10
movq %rsi, %r15
movq %rdi, %r11
movq 0x60(%rsp), %rcx
movabsq $0x3ffffffffffffff, %rdi # imm = 0x3FFFFFFFFFFFFFF
movl (%rcx), %eax
incl %eax
movl %eax, (%rcx)
movl %eax, (%r10,%rsi,4)
movl %eax, (%rdx,%rsi,4)
movq (%r8), %rsi
movq 0x8(%r8), %r13
movq %rsi, %rax
shrq $0x3a, %rax
movl $0x1, %ebp
movl $0x1, %r8d
movl %eax, %ecx
shlq %cl, %r8
cmpq %r8, %r13
movq %rdx, 0x10(%rsp)
jne 0x1a8d2
leal 0x1(%rax), %r12d
movl %r12d, %ecx
shlq %cl, %rbp
cmpq %r13, %rbp
jae 0x1a803
movq $-0x1, %r12
incq %r12
movq %r13, %rdi
movl %r12d, %ecx
shrq %cl, %rdi
cmpq $0x3f, %r12
ja 0x1a7eb
testq %rdi, %rdi
jne 0x1a7d4
cmpq %r12, %rax
jne 0x1aa37
movabsq $0x3ffffffffffffff, %rdi # imm = 0x3FFFFFFFFFFFFFF
jmp 0x1a8d2
movq %r11, (%rsp)
movq %r10, %rbx
movq %r9, 0x8(%rsp)
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdi
movl $0x8, %edx
movl %r12d, %ecx
shlq %cl, %rdx
callq 0x1d8c9
movq %rax, 0x18(%r14)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rsi, %rax
movabsq $0x3ffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFF
andq %rcx, %rax
addq %rax, %rdx
cmpq %r13, %rdx
jbe 0x1a876
movq 0x18(%r14), %rcx
movq %r13, %rdx
subq %rax, %rdx
movq %rbp, %rsi
subq %rdx, %rsi
leaq (%rcx,%rsi,8), %rdi
leaq (%rcx,%rax,8), %rsi
shlq $0x3, %rdx
callq 0x2370
subq %r13, %rbp
addq (%r14), %rbp
movq %rbp, %rsi
jmp 0x1a88f
subq %rbp, %rdx
jbe 0x1a88f
movq 0x18(%r14), %rdi
leaq (%rdi,%rbp,8), %rsi
shlq $0x3, %rdx
callq 0x2370
movq (%r14), %rsi
movq %r12, %rax
shlq $0x3a, %rax
movabsq $0x3ffffffffffffff, %rdi # imm = 0x3FFFFFFFFFFFFFF
andq %rdi, %rsi
orq %rax, %rsi
movq $-0x1, %rax
movl %r12d, %ecx
shlq %cl, %rax
movq %rsi, (%r14)
notq %rax
movq %rax, 0x10(%r14)
movq 0x8(%r14), %r13
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %r9
movq %rbx, %r10
movq (%rsp), %r11
movq 0x70(%rsp), %rbx
movq 0x18(%r14), %rax
leaq 0x1(%r13), %rcx
movq %rcx, 0x8(%r14)
andq %rdi, %rsi
addq %r13, %rsi
andq 0x10(%r14), %rsi
movq %r15, (%rax,%rsi,8)
movl $0x1, (%r9,%r15,4)
movq 0x38(%r11), %rax
movq (%rax,%r15,8), %r13
testq %r13, %r13
je 0x1a9d2
movq 0x28(%r11), %rax
movq 0x30(%r11), %rcx
movq (%rcx,%r15,8), %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
leaq (%rcx,%rax), %rbp
addq $0x20, %rbp
movq %r15, 0x20(%rsp)
movq %r14, 0x18(%rsp)
testb $0x40, 0x3(%rbp)
jne 0x1a9c5
movq -0x18(%rbp), %r12
movq 0x10(%r11), %rax
movq %r12, %rcx
shrq %rcx
leaq (%rcx,%rcx,4), %rcx
testb $0x40, 0x23(%rax,%rcx,8)
jne 0x1a9c5
movl (%rdx,%r12,4), %eax
cmpl $-0x1, %eax
je 0x1a969
cmpl $0x1, (%r9,%r12,4)
jne 0x1a9c5
movl (%r10,%r15,4), %ecx
jmp 0x1a9bc
subq $0x8, %rsp
movq %r11, %rdi
movq %r12, %rsi
movq %r10, %rcx
movq %r14, %r8
movq %r9, %r15
pushq %rbx
pushq 0x78(%rsp)
pushq 0x78(%rsp)
movq %r10, %rbx
movq %r11, %r14
callq 0x1a75c
movq %r14, %r11
movq 0x38(%rsp), %r14
movq %rbx, %r10
movq 0x90(%rsp), %rbx
movq %r15, %r9
movq 0x40(%rsp), %r15
movq 0x30(%rsp), %rdx
addq $0x20, %rsp
movl (%r10,%r15,4), %ecx
movl (%r10,%r12,4), %eax
cmpl %eax, %ecx
cmovll %ecx, %eax
movl %eax, (%r10,%r15,4)
addq $0x30, %rbp
decq %r13
jne 0x1a930
movl (%r10,%r15,4), %eax
cmpl (%rdx,%r15,4), %eax
jne 0x1aa28
movq 0x18(%r14), %rax
movq 0x8(%r14), %rcx
movq 0x10(%r14), %rdx
decq %rcx
movabsq $0x3ffffffffffffff, %r8 # imm = 0x3FFFFFFFFFFFFFF
movq 0x68(%rsp), %r10
movq %rcx, 0x8(%r14)
movq (%r14), %rsi
andq %r8, %rsi
addq %rcx, %rsi
andq %rdx, %rsi
movq (%rax,%rsi,8), %rdi
movl $0x0, (%r9,%rdi,4)
movl (%rbx), %esi
movl %esi, (%r10,%rdi,4)
decq %rcx
cmpq %r15, %rdi
jne 0x1a9fa
incl %esi
movl %esi, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %ebp
movl %r12d, %ecx
shlq %cl, %rbp
cmpq %rax, %r12
movq %r9, 0x8(%rsp)
movq %r11, (%rsp)
movq %r10, %rbx
ja 0x1a80f
movq %r13, %rdx
jmp 0x1a832
nop