// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/state.c
// Function: silly_walk
int
silly_walk(struct node *root)
{
    int sp = 0;
    unsigned short stack[numnodes];
    unsigned char seen[numnodes];
    int i, flushed, num;

    memset(seen, 0, sizeof(seen));
    seen[root - nodes] = 1;
    stack[sp++] = root - nodes;

    while(sp > 0) {
        int n = stack[--sp];
        for(i = 0; i < nodes[n].numneighs; i++) {
            struct node_neighbour *neigh = &nodes[n].neighs[i];
            int m = node_index(neigh->neigh);
            if(m < 0) {
                /* Neighbour link to a node we don't know about. */
                continue;
            }
            if(!seen[m] && neigh_symmetric(&nodes[n], &nodes[m], neigh)) {
                assert(sp < numnodes - 1);
                seen[m] = 1;
                stack[sp++] = m;
            }
        }
    }
    /* Flushing a node only moves the nodes *after* the one being flushed.
       Yes, it's a hack. */
    num = numnodes; flushed = 0;
    for(i = numnodes - 1; i >= 0; i--) {
        if(!seen[i]) {
            flush_node(&nodes[i]);
            flushed++;
        }
    }
    debugf("Silly walk flushed %d/%d nodes.\n", flushed, num);
    return !!flushed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl 0x1131b(%rip), %eax     # 0x162b4
movq %rsp, %rcx
movq %rcx, -0x18(%rbp)
leaq 0xf(%rax,%rax), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x50(%rbp)
movq %rcx, %rsp
movq %rax, -0x20(%rbp)
movl 0x112f4(%rip), %eax     # 0x162b4
movl %eax, %edx
movq %rdx, %rax
addq $0xf, %rax
andq $-0x10, %rax
movq %rsp, %rdi
subq %rax, %rdi
movq %rdi, -0x58(%rbp)
movq %rdi, %rsp
movq %rdx, -0x28(%rbp)
xorl %esi, %esi
callq 0x2170
movq -0x8(%rbp), %rax
leaq 0x128b0(%rip), %rcx     # 0x178a0
subq %rcx, %rax
movl $0x70, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x58(%rbp), %rax
movb $0x1, (%rax,%rcx)
movq -0x8(%rbp), %rax
leaq 0x1288d(%rip), %rcx     # 0x178a0
subq %rcx, %rax
movl $0x70, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x50(%rbp), %rax
movw %cx, %dx
movl -0xc(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0xc(%rbp)
movslq %ecx, %rcx
movw %dx, (%rax,%rcx,2)
cmpl $0x0, -0xc(%rbp)
jle 0x5170
movq -0x50(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $-0x1, %ecx
movl %ecx, -0xc(%rbp)
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x38(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movslq -0x38(%rbp), %rdx
leaq 0x1282e(%rip), %rcx     # 0x178a0
imulq $0x70, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x48(%rcx), %eax
jge 0x516b
movslq -0x38(%rbp), %rcx
leaq 0x12813(%rip), %rax     # 0x178a0
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq 0x40(%rax), %rax
movslq -0x2c(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x5220
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
jge 0x50be
jmp 0x515d
movq -0x58(%rbp), %rax
movslq -0x44(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
jne 0x515b
movslq -0x38(%rbp), %rax
leaq 0x127c5(%rip), %rdi     # 0x178a0
imulq $0x70, %rax, %rax
addq %rax, %rdi
movslq -0x44(%rbp), %rax
leaq 0x127b3(%rip), %rsi     # 0x178a0
imulq $0x70, %rax, %rax
addq %rax, %rsi
movq -0x40(%rbp), %rdx
callq 0x52e0
cmpl $0x0, %eax
je 0x515b
movl -0xc(%rbp), %eax
movl 0x111a9(%rip), %ecx     # 0x162b4
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x5114
jmp 0x5133
leaq 0xd4da(%rip), %rdi      # 0x125f5
leaq 0xd46c(%rip), %rsi      # 0x1258e
movl $0xf5, %edx
leaq 0xd4d9(%rip), %rcx      # 0x12607
callq 0x2150
movq -0x50(%rbp), %rax
movq -0x58(%rbp), %rcx
movslq -0x44(%rbp), %rdx
movb $0x1, (%rcx,%rdx)
movl -0x44(%rbp), %ecx
movw %cx, %dx
movl -0xc(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0xc(%rbp)
movslq %ecx, %rcx
movw %dx, (%rax,%rcx,2)
jmp 0x515d
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x5064
jmp 0x503c
movl 0x1113e(%rip), %eax     # 0x162b4
movl %eax, -0x34(%rbp)
movl $0x0, -0x30(%rbp)
movl 0x1112e(%rip), %eax     # 0x162b4
subl $0x1, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jl 0x51cd
movq -0x58(%rbp), %rax
movslq -0x2c(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
jne 0x51c0
movslq -0x2c(%rbp), %rax
leaq 0x126f5(%rip), %rdi     # 0x178a0
imulq $0x70, %rax, %rax
addq %rax, %rdi
callq 0x4e00
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x51c2
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x518c
jmp 0x51cf
leaq 0x11092(%rip), %rax     # 0x16268
cmpl $0x2, (%rax)
jl 0x51f4
movl -0x30(%rbp), %edx
movl -0x34(%rbp), %ecx
movl $0x2, %edi
leaq 0xd438(%rip), %rsi      # 0x12625
movb $0x0, %al
callq 0xfda0
jmp 0x51f6
jmp 0x51f8
cmpl $0x0, -0x30(%rbp)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movq -0x18(%rbp), %rcx
movq %rcx, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)