// File: /workspace/github_c_makefile_star2_O0/mishun[P]plantri/plantri.c
// Function: scanpoly_c3
static void
scanpoly_c3(int nbtot, int nbop, EDGE *oldfeas[], int noldfeas,
            int oldmaxface, int oldmaxlist0, int oldmaxlist1)

/* This is the recursive search procedure for polytopes.
   oldfeas[0..noldfeas-1] are the edges which can be removed
   without violating connectivity.  nbtot/nbop represent the
   group, as usual.   oldmaxface is the size of the largest face.
   inmaxface[oldmaxlist0..oldmaxlist1-1] lists the edges whose
   left face has greatest size (unless that is 3).

   This version is for 3-connected only!  scanpoly() is the more
   general version that works for connectivity 1 or more.
*/

{
    EDGE *newfeas[MAXE/2],*good_or[MAXE],*good_inv[MAXE],*e,*esave;
    int i,nnewfeas,minimal[MAXE/2],newmaxface;
    int code,xnbtot,xnbop;
    int ngood_or,ncan_or,ngood_inv,ncan_inv;
    int newmaxlist0,newmaxlist1;

    if (ne <= edgebound[1]) got_one(nbtot,nbop,3);
    if (ne == edgebound[0]) return;
    if (ne - 2*noldfeas > edgebound[1]) return;

#ifdef PRE_FILTER_POLY
    if (!(PRE_FILTER_POLY)) return;
#endif

    mark_edge_orbits(oldfeas,noldfeas,minimal,nbtot);

    for (i = 0; i < noldfeas; ++i)
    {
        if (!minimal[i]) continue;

        e = oldfeas[i];
        if (e->left_facesize != 3) e = e->invers;
	if (e->invers->left_facesize < oldmaxface-1
                      || e->invers->left_facesize == maxfacesize)
            continue;

        code = maybe_delete_c3(e,oldmaxface,oldmaxlist0,oldmaxlist1,
		               &newmaxface,&newmaxlist0,&newmaxlist1,
		               good_or,&ngood_or,&ncan_or,
		               good_inv,&ngood_inv,&ncan_inv);

        if (code == 0)
        {
#ifdef FAST_FILTER_POLY
	    if (FAST_FILTER_POLY)
#endif
	    {
	        if (ngood_or + ngood_inv == 1)
	        {
                    esave = oldfeas[i];
                    oldfeas[i] = oldfeas[noldfeas-1];
                    prune_poly_edgelist(oldfeas,noldfeas-1,newfeas,&nnewfeas);
                    oldfeas[i] = esave;
                    scanpoly_c3(1,1,newfeas,nnewfeas,
                             newmaxface,newmaxlist0,newmaxlist1);
                }
                else if (canon_edge_oriented(good_or,ngood_or,ncan_or,
                    		             good_inv,ngood_inv,ncan_inv,
                    		             degree,numbering,&xnbtot,&xnbop))
                {
		    esave = oldfeas[i];
                    oldfeas[i] = oldfeas[noldfeas-1];
                    prune_poly_edgelist(oldfeas,noldfeas-1,newfeas,&nnewfeas);
                    oldfeas[i] = esave;
                    scanpoly_c3(xnbtot,xnbop,newfeas,nnewfeas,
			     newmaxface,newmaxlist0,newmaxlist1);
                }
	    }
            insert_edge_tri(e);
        }
        else if (code == 1)
	{
	    oldfeas[i] = oldfeas[noldfeas-1];
	    minimal[i] = minimal[noldfeas-1];
	    --i;
	    --noldfeas;
	}
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x2090, %rsp           # imm = 0x2090
movl 0x10(%rbp), %eax
movl %edi, -0x24(%rbp)
movl %esi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movl %ecx, -0x34(%rbp)
movl %r8d, -0x38(%rbp)
movl %r9d, -0x3c(%rbp)
movl 0x23a304(%rip), %eax    # 0x25a624
cmpl 0x1bf4a(%rip), %eax     # 0x3c270
jg 0x20338
movl -0x24(%rbp), %edi
movl -0x28(%rbp), %esi
movl $0x3, %edx
callq 0x8080
movl 0x23a2e6(%rip), %eax    # 0x25a624
cmpl 0x1bf28(%rip), %eax     # 0x3c26c
jne 0x2034b
jmp 0x206d7
movl 0x23a2d3(%rip), %eax    # 0x25a624
movl -0x34(%rbp), %ecx
shll %ecx
subl %ecx, %eax
cmpl 0x1bf12(%rip), %eax     # 0x3c270
jle 0x20365
jmp 0x206d7
movq -0x30(%rbp), %rdi
movl -0x34(%rbp), %esi
leaq -0x2050(%rbp), %rdx
movl -0x24(%rbp), %ecx
callq 0x10880
movl $0x0, -0x1d64(%rbp)
movl -0x1d64(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x206d7
movslq -0x1d64(%rbp), %rax
cmpl $0x0, -0x2050(%rbp,%rax,4)
jne 0x203aa
jmp 0x206c3
movq -0x30(%rbp), %rax
movslq -0x1d64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x1d58(%rbp)
movq -0x1d58(%rbp), %rax
cmpl $0x3, 0x38(%rax)
je 0x203df
movq -0x1d58(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x1d58(%rbp)
movq -0x1d58(%rbp), %rax
movq 0x20(%rax), %rax
movl 0x38(%rax), %eax
movl -0x38(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jl 0x2040d
movq -0x1d58(%rbp), %rax
movq 0x20(%rax), %rax
movl 0x38(%rax), %eax
cmpl 0x1be69(%rip), %eax     # 0x3c274
jne 0x20412
jmp 0x206c3
movq -0x1d58(%rbp), %rdi
movl -0x38(%rbp), %esi
movl -0x3c(%rbp), %edx
movl 0x10(%rbp), %ecx
leaq -0x11b0(%rbp), %r15
leaq -0x1d50(%rbp), %r11
leaq -0x2054(%rbp), %r8
leaq -0x2074(%rbp), %r9
leaq -0x2078(%rbp), %r12
leaq -0x2064(%rbp), %r14
leaq -0x2068(%rbp), %rbx
leaq -0x206c(%rbp), %r10
leaq -0x2070(%rbp), %rax
movq %r12, (%rsp)
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
movq %r11, 0x20(%rsp)
movq %r10, 0x28(%rsp)
movq %rax, 0x30(%rsp)
callq 0x20bc0
movl %eax, -0x2058(%rbp)
cmpl $0x0, -0x2058(%rbp)
jne 0x20661
movl -0x2064(%rbp), %eax
addl -0x206c(%rbp), %eax
cmpl $0x1, %eax
jne 0x2054e
movq -0x30(%rbp), %rax
movslq -0x1d64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x1d60(%rbp)
movq -0x30(%rbp), %rax
movl -0x34(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x30(%rbp), %rax
movslq -0x1d64(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rdi
movl -0x34(%rbp), %esi
subl $0x1, %esi
leaq -0x610(%rbp), %rdx
leaq -0x1d68(%rbp), %rcx
callq 0x20220
movq -0x1d60(%rbp), %rdx
movq -0x30(%rbp), %rax
movslq -0x1d64(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
leaq -0x610(%rbp), %rdx
movl -0x1d68(%rbp), %ecx
movl -0x2054(%rbp), %r8d
movl -0x2074(%rbp), %r9d
movl -0x2078(%rbp), %eax
movl $0x1, %esi
movl %esi, %edi
movl %eax, (%rsp)
callq 0x202f0
jmp 0x20653
leaq -0x11b0(%rbp), %rdi
movl -0x2064(%rbp), %esi
movl -0x2068(%rbp), %edx
leaq -0x1d50(%rbp), %rcx
movl -0x206c(%rbp), %r8d
movl -0x2070(%rbp), %r9d
leaq 0x1d683(%rip), %rbx     # 0x3dc00
leaq 0x1d77c(%rip), %r11     # 0x3dd00
leaq -0x205c(%rbp), %r10
leaq -0x2060(%rbp), %rax
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0xf4b0
cmpl $0x0, %eax
je 0x20651
movq -0x30(%rbp), %rax
movslq -0x1d64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x1d60(%rbp)
movq -0x30(%rbp), %rax
movl -0x34(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x30(%rbp), %rax
movslq -0x1d64(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rdi
movl -0x34(%rbp), %esi
subl $0x1, %esi
leaq -0x610(%rbp), %rdx
leaq -0x1d68(%rbp), %rcx
callq 0x20220
movq -0x1d60(%rbp), %rdx
movq -0x30(%rbp), %rax
movslq -0x1d64(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x205c(%rbp), %edi
movl -0x2060(%rbp), %esi
leaq -0x610(%rbp), %rdx
movl -0x1d68(%rbp), %ecx
movl -0x2054(%rbp), %r8d
movl -0x2074(%rbp), %r9d
movl -0x2078(%rbp), %eax
movl %eax, (%rsp)
callq 0x202f0
jmp 0x20653
movq -0x1d58(%rbp), %rdi
callq 0x21c60
jmp 0x206c1
cmpl $0x1, -0x2058(%rbp)
jne 0x206bf
movq -0x30(%rbp), %rax
movl -0x34(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x30(%rbp), %rax
movslq -0x1d64(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x34(%rbp), %eax
subl $0x1, %eax
cltq
movl -0x2050(%rbp,%rax,4), %ecx
movslq -0x1d64(%rbp), %rax
movl %ecx, -0x2050(%rbp,%rax,4)
movl -0x1d64(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1d64(%rbp)
movl -0x34(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x206c1
jmp 0x206c3
movl -0x1d64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1d64(%rbp)
jmp 0x20385
addq $0x2090, %rsp           # imm = 0x2090
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopw (%rax,%rax)