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

/* This is the recursive search procedure for polytopes.
   oldfeas[0..noldfeas-1] are the edges which can be removed without
   violating the degree bound minpolydeg, with some (but not necessarily
   all) missing because they are known to violate the connectivity
   bound minpolyconnec.  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).  connec is
   the actual connectivity, except that values greater than 3
   are given as 3. */
{
    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,newconnec;

    if (ne <= edgebound[1]) got_one(nbtot,nbop,connec);
    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;

	AMDELEDGE(e->start,e->end);

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

        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(1,1,newfeas,nnewfeas,
                             newmaxface,newmaxlist0,newmaxlist1,newconnec);
                }
                else if (canon_edge_oriented(good_or,ngood_or,ncan_or,
                    		             good_inv,ngood_inv,ncan_inv,
                    		             degree,numbering,&xnbtot,&xnbop))
                {
                 /* The following line corrects for the fact that canon*()
                    finds each automorphism twice if the maximum degree is
                    at most 2.  However, it interferes with -o so is disabled.
    
	            if (ne <= 2*nv && maxdegree() <= 2) xnbtot = xnbop;
                 */
		    esave = oldfeas[i];
                    oldfeas[i] = oldfeas[noldfeas-1];
                    prune_poly_edgelist(oldfeas,noldfeas-1,newfeas,&nnewfeas);
                    oldfeas[i] = esave;
                    scanpoly(xnbtot,xnbop,newfeas,nnewfeas,
			     newmaxface,newmaxlist0,newmaxlist1,newconnec);
                }
	    }
            insert_edge_tri(e);
        }
        else if (code == 1)
	{
	    oldfeas[i] = oldfeas[noldfeas-1];
	    minimal[i] = minimal[noldfeas-1];
	    --i;
	    --noldfeas;
	}
	AMADDEDGE(e->start,e->end);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20a8, %rsp           # imm = 0x20A8
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movl %edi, -0x2c(%rbp)
movl %esi, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movl %ecx, -0x3c(%rbp)
movl %r8d, -0x40(%rbp)
movl %r9d, -0x44(%rbp)
movl 0x239eff(%rip), %eax    # 0x25a624
cmpl 0x1bb45(%rip), %eax     # 0x3c270
jg 0x2073b
movl -0x2c(%rbp), %edi
movl -0x30(%rbp), %esi
movl 0x18(%rbp), %edx
callq 0x8080
movl 0x239ee3(%rip), %eax    # 0x25a624
cmpl 0x1bb25(%rip), %eax     # 0x3c26c
jne 0x2074e
jmp 0x20ba1
movl 0x239ed0(%rip), %eax    # 0x25a624
movl -0x3c(%rbp), %ecx
shll %ecx
subl %ecx, %eax
cmpl 0x1bb0f(%rip), %eax     # 0x3c270
jle 0x20768
jmp 0x20ba1
movq -0x38(%rbp), %rdi
movl -0x3c(%rbp), %esi
leaq -0x2060(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x10880
movl $0x0, -0x1d74(%rbp)
movl -0x1d74(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0x20ba1
movslq -0x1d74(%rbp), %rax
cmpl $0x0, -0x2060(%rbp,%rax,4)
jne 0x207ad
jmp 0x20b8d
movq -0x38(%rbp), %rax
movslq -0x1d74(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x1d68(%rbp)
movq -0x1d68(%rbp), %rax
cmpl $0x3, 0x38(%rax)
je 0x207e2
movq -0x1d68(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x1d68(%rbp)
movq -0x1d68(%rbp), %rax
movq 0x20(%rax), %rax
movl 0x38(%rax), %eax
movl -0x40(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jl 0x20810
movq -0x1d68(%rbp), %rax
movq 0x20(%rax), %rax
movl 0x38(%rax), %eax
cmpl 0x1ba66(%rip), %eax     # 0x3c274
jne 0x20815
jmp 0x20b8d
movq -0x1d68(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x280529(%rip), %rax    # 0x2a0d50
shlq $0x6, %rcx
addq %rcx, %rax
movq -0x1d68(%rbp), %rcx
movslq (%rcx), %rcx
movb $0x0, (%rax,%rcx)
movq -0x1d68(%rbp), %rax
movslq (%rax), %rcx
leaq 0x280503(%rip), %rax    # 0x2a0d50
shlq $0x6, %rcx
addq %rcx, %rax
movq -0x1d68(%rbp), %rcx
movslq 0x4(%rcx), %rcx
movb $0x0, (%rax,%rcx)
movl 0x18(%rbp), %eax
movl %eax, -0x208c(%rbp)
movq -0x1d68(%rbp), %rdi
movl -0x40(%rbp), %esi
movl -0x44(%rbp), %edx
movl 0x10(%rbp), %ecx
leaq -0x11c0(%rbp), %r12
leaq -0x1d60(%rbp), %rbx
leaq -0x2064(%rbp), %r8
leaq -0x2084(%rbp), %r9
leaq -0x2088(%rbp), %r13
leaq -0x2074(%rbp), %r15
leaq -0x2078(%rbp), %r14
leaq -0x207c(%rbp), %r11
leaq -0x2080(%rbp), %r10
leaq -0x208c(%rbp), %rax
movq %r13, (%rsp)
movq %r12, 0x8(%rsp)
movq %r15, 0x10(%rsp)
movq %r14, 0x18(%rsp)
movq %rbx, 0x20(%rsp)
movq %r11, 0x28(%rsp)
movq %r10, 0x30(%rsp)
movq %rax, 0x38(%rsp)
callq 0x21ef0
movl %eax, -0x2068(%rbp)
cmpl $0x0, -0x2068(%rbp)
jne 0x20adf
movl -0x2074(%rbp), %eax
addl -0x207c(%rbp), %eax
cmpl $0x1, %eax
jne 0x209c0
movq -0x38(%rbp), %rax
movslq -0x1d74(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x1d70(%rbp)
movq -0x38(%rbp), %rax
movl -0x3c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x38(%rbp), %rax
movslq -0x1d74(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x38(%rbp), %rdi
movl -0x3c(%rbp), %esi
subl $0x1, %esi
leaq -0x620(%rbp), %rdx
leaq -0x1d78(%rbp), %rcx
callq 0x20220
movq -0x1d70(%rbp), %rdx
movq -0x38(%rbp), %rax
movslq -0x1d74(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
leaq -0x620(%rbp), %rdx
movl -0x1d78(%rbp), %ecx
movl -0x2064(%rbp), %r8d
movl -0x2084(%rbp), %r9d
movl -0x2088(%rbp), %r10d
movl -0x208c(%rbp), %eax
movl $0x1, %esi
movl %esi, %edi
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x206f0
jmp 0x20ad1
leaq -0x11c0(%rbp), %rdi
movl -0x2074(%rbp), %esi
movl -0x2078(%rbp), %edx
leaq -0x1d60(%rbp), %rcx
movl -0x207c(%rbp), %r8d
movl -0x2080(%rbp), %r9d
leaq 0x1d211(%rip), %rbx     # 0x3dc00
leaq 0x1d30a(%rip), %r11     # 0x3dd00
leaq -0x206c(%rbp), %r10
leaq -0x2070(%rbp), %rax
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0xf4b0
cmpl $0x0, %eax
je 0x20acf
movq -0x38(%rbp), %rax
movslq -0x1d74(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x1d70(%rbp)
movq -0x38(%rbp), %rax
movl -0x3c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x38(%rbp), %rax
movslq -0x1d74(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x38(%rbp), %rdi
movl -0x3c(%rbp), %esi
subl $0x1, %esi
leaq -0x620(%rbp), %rdx
leaq -0x1d78(%rbp), %rcx
callq 0x20220
movq -0x1d70(%rbp), %rdx
movq -0x38(%rbp), %rax
movslq -0x1d74(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x206c(%rbp), %edi
movl -0x2070(%rbp), %esi
leaq -0x620(%rbp), %rdx
movl -0x1d78(%rbp), %ecx
movl -0x2064(%rbp), %r8d
movl -0x2084(%rbp), %r9d
movl -0x2088(%rbp), %r10d
movl -0x208c(%rbp), %eax
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x206f0
jmp 0x20ad1
movq -0x1d68(%rbp), %rdi
callq 0x21c60
jmp 0x20b3f
cmpl $0x1, -0x2068(%rbp)
jne 0x20b3d
movq -0x38(%rbp), %rax
movl -0x3c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x38(%rbp), %rax
movslq -0x1d74(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x3c(%rbp), %eax
subl $0x1, %eax
cltq
movl -0x2060(%rbp,%rax,4), %ecx
movslq -0x1d74(%rbp), %rax
movl %ecx, -0x2060(%rbp,%rax,4)
movl -0x1d74(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1d74(%rbp)
movl -0x3c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x20b3f
movq -0x1d68(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x2801ff(%rip), %rax    # 0x2a0d50
shlq $0x6, %rcx
addq %rcx, %rax
movq -0x1d68(%rbp), %rcx
movslq (%rcx), %rcx
movb $0x1, (%rax,%rcx)
movq -0x1d68(%rbp), %rax
movslq (%rax), %rcx
leaq 0x2801d9(%rip), %rax    # 0x2a0d50
shlq $0x6, %rcx
addq %rcx, %rax
movq -0x1d68(%rbp), %rcx
movslq 0x4(%rcx), %rcx
movb $0x1, (%rax,%rcx)
movl -0x1d74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1d74(%rbp)
jmp 0x20788
addq $0x20a8, %rsp           # imm = 0x20A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)