// File: /workspace/github_c_makefile_star2_O3/mishun[P]plantri/plantri.c
// Function: scanmin5c
static void
scanmin5c(int nbtot, int nbop, int dosplit, EDGE **prevA, int nprevA)

/* The main node of the recursion for 5-connected triangulations.
   As this procedure is entered, nv,ne,degree etc are set for some graph,
   and nbtot/nbop are the values returned by canon() for that graph.
   If dosplit==TRUE, this is the place to do splitting (if any).
   prev[0..nprevA-1] is the list of consecutive A operations leading
   to this graph, given by their central edges.
   If nprevA == 0, this graph wasn't made with A.
*/
{
    EDGE *firstedge_save[MAXN];
    EDGE *extA1[MAXN*MAXN/4+10],*extA2[MAXN*MAXN/4+10],
         *extB[MAXE],*extC[MAXN];
    EDGE *extAred,*extBred,*extCred,*extCanchor;
    int extBmirror[MAXE];
    EDGE *good_or[MAXE],*good_mir[MAXE];
    EDGE *newprevA[MAXN];
    int ngood_or,ngood_mir,ngood_ref,ngood_mir_ref;
    int nextA,nextB,nextC,i,j;
    int xnbtot,xnbop;
    int colour[MAXN];

    if (nv == maxnv)
    {
        got_one(nbtot,nbop,5);
	return;
    }

    if (dosplit)
    {
#ifdef SPLITTEST
        ADDBIG(splitcases,1);
        return;
#endif
        if (splitcount-- != 0) return;
        splitcount = mod - 1;

        for (i = 0; i < nv; ++i) firstedge_save[i] = firstedge[i];
    }

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

#ifndef FIND_EXTENSIONS_MIN5
#define FIND_EXTENSIONS_MIN5 find_extensions_min5
#endif

    FIND_EXTENSIONS_MIN5(nbtot,nbop,extA1,extA2,&nextA,extB,extBmirror,
          &nextB,extC,&nextC,(nprevA==0?NULL:prevA[nprevA-1]));

    if (nextA > MAXN*MAXN/4)
    {
	fprintf(stderr,">E Increase the array bounds for extA1 and\n");
	fprintf(stderr,"   extA2 in scanmin5() and scanmin5c().\n");
	exit(1);
    }

    for (i = 0; i < nextA; ++i)
    {
        extAred = extend_min5_a(extA1[i],extA2[i]);
#ifdef FAST_FILTER_MIN5
        if (FAST_FILTER_MIN5)
#endif 
        {
	    min5_a_legal(extAred,good_or,&ngood_or,&ngood_ref,
		         good_mir,&ngood_mir,&ngood_mir_ref,prevA,nprevA);

            if (ngood_ref+ngood_mir_ref > 0)
	    {
	        if (nv == maxnv && !needgroup && ngood_or == ngood_ref
                                              && ngood_mir == ngood_mir_ref)
	        {
		    got_one(1,1,5);
	        }
	        else if (ngood_or+ngood_mir==1)
	        {
		    prevA[nprevA] = extAred;
    		    scanmin5c(1,1,nv==splitlevel,prevA,nprevA+1);
	        }
	        else if (canon_edge_oriented(good_or,ngood_or,ngood_ref,
                                           good_mir,ngood_mir,ngood_mir_ref,
                                           degree,numbering,&xnbtot,&xnbop))
	        {
                    prevA[nprevA] = extAred;
	            scanmin5c(xnbtot,xnbop,nv==splitlevel,prevA,nprevA+1);
	        }
	    }
	}
	reduce_min5_a(extAred);
    }

    for (i = 0; i < nextB; ++i)
    {
        extBred = extend_min5_b(extB[i],extBmirror[i]);
#ifdef FAST_FILTER_MIN5
        if (FAST_FILTER_MIN5)
#endif  
        {
            if (!has_min5_a())
	    {
                min5_b_legal(extBred,extBmirror[i],good_or,&ngood_or,
			     &ngood_ref,good_mir,&ngood_mir,&ngood_mir_ref);
    
                if (ngood_ref+ngood_mir_ref > 0)
                {
                    if (canon_edge_oriented(good_or,ngood_or,ngood_ref,
                                            good_mir,ngood_mir,ngood_mir_ref,
                                            degree,numbering,&xnbtot,&xnbop))
                        scanmin5c(xnbtot,xnbop,
                                  nv==splitlevel||nv==splitlevel+1,newprevA,0);
	        }
	    }
	}
        reduce_min5_b(extBred,extBmirror[i]);
    }

    for (i = 0; i < nextC; ++i)
    {
        extCred = extend_min5_c(extC[i],&extCanchor);
#ifdef FAST_FILTER_MIN5
        if (FAST_FILTER_MIN5)
#endif  
        {
            if (!has_min5_a() && !has_min5_b())
            {
	        for (j = 0; j < nv-1; ++j)
		    if (is_min5_c_centre(j)) colour[j] = 2;
		    else                     colour[j] = degree[j];
	        colour[nv-1] = 2;
    
                if (canon(colour,numbering,&xnbtot,&xnbop)) 
                    scanmin5c(xnbtot,xnbop,
                              nv>=splitlevel&&nv<=splitlevel+4,newprevA,0);
            }
        }
        reduce_min5_c(extCred,extCanchor);
    }

    if (dosplit)
        for (i = 0; i < nv; ++i) firstedge[i] = firstedge_save[i];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7098, %rsp           # imm = 0x7098
movq %rcx, %r15
movl %edx, %ecx
movl %esi, %ebx
movl %edi, %ebp
movl 0x225af3(%rip), %edx    # 0x244610
cmpl 0x774d(%rip), %edx      # 0x26270
jne 0x1eb44
movl %ebp, %edi
movl %ebx, %esi
movl $0x5, %edx
addq $0x7098, %rsp           # imm = 0x7098
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x761c
movl %r8d, %r14d
testl %ecx, %ecx
je 0x1eb88
subl $0x1, 0x26c0ce(%rip)    # 0x28ac20
jae 0x1efa5
movl 0x770e(%rip), %eax      # 0x2626c
decl %eax
movl %eax, 0x26c0ba(%rip)    # 0x28ac20
testl %edx, %edx
jle 0x1eb88
shlq $0x3, %rdx
leaq 0x8e7b(%rip), %rsi      # 0x279f0
leaq 0x540(%rsp), %rdi
movl %ecx, %r12d
callq 0x1070
movl %r12d, %ecx
movslq %r14d, %rax
testl %r14d, %r14d
movl %ecx, 0x24(%rsp)
movq %rax, 0x18(%rsp)
je 0x1eba0
movq -0x8(%r15,%rax,8), %rax
jmp 0x1eba2
xorl %eax, %eax
subq $0x8, %rsp
leaq 0x30(%rsp), %r10
leaq 0x348(%rsp), %r11
leaq 0x34(%rsp), %r13
leaq 0x5048(%rsp), %rdx
leaq 0x2ff8(%rsp), %rcx
leaq 0x44(%rsp), %r12
leaq 0x2458(%rsp), %r9
movl %ebp, %edi
movl %ebx, %esi
movq %r12, %r8
pushq %rax
pushq %r10
pushq %r11
pushq %r13
leaq 0x768(%rsp), %rax
pushq %rax
callq 0x12843
addq $0x30, %rsp
movslq (%r12), %r13
cmpq $0x400, %r13            # imm = 0x400
jg 0x1efb7
testl %r13d, %r13d
jle 0x1ed63
leal 0x1(%r14), %eax
movl %eax, 0x20(%rsp)
xorl %r12d, %r12d
leaq 0x18b0(%rsp), %rbp
movq 0x5040(%rsp,%r12,8), %rdi
movq 0x2ff0(%rsp,%r12,8), %rsi
callq 0x13002
movq %rax, %rbx
subq $0x8, %rsp
movq %rax, %rdi
leaq 0xd18(%rsp), %rsi
leaq 0x1c(%rsp), %rdx
leaq 0x14(%rsp), %rcx
movq %rbp, %r8
leaq 0x18(%rsp), %r9
pushq %r14
pushq %r15
leaq 0x20(%rsp), %rax
pushq %rax
callq 0x1318a
addq $0x20, %rsp
movl 0xc(%rsp), %edx
movl 0x8(%rsp), %r9d
movl %r9d, %eax
addl %edx, %eax
jle 0x1ed4f
movl 0x225988(%rip), %eax    # 0x244610
movl 0x75e2(%rip), %ecx      # 0x26270
xorl %eax, %ecx
orl 0x8d4a(%rip), %ecx      # 0x279e0
movl 0x14(%rsp), %esi
movl %esi, %edi
xorl %edx, %edi
orl %ecx, %edi
movl 0x10(%rsp), %r8d
movl %r8d, %ecx
xorl %r9d, %ecx
orl %edi, %ecx
jne 0x1ecc8
movl $0x1, %edi
movl $0x1, %esi
movl $0x5, %edx
callq 0x761c
jmp 0x1ed4f
leal (%r8,%rsi), %ecx
cmpl $0x1, %ecx
jne 0x1ecf1
movq 0x18(%rsp), %rcx
movq %rbx, (%r15,%rcx,8)
xorl %edx, %edx
cmpl 0x8d02(%rip), %eax      # 0x279e4
sete %dl
movl $0x1, %edi
movl $0x1, %esi
jmp 0x1ed42
subq $0x8, %rsp
leaq 0xd18(%rsp), %rdi
movq %rbp, %rcx
leaq 0x8(%rsp), %rax
pushq %rax
leaq 0x14(%rsp), %rax
pushq %rax
leaq 0x8edd(%rip), %rax      # 0x27bf0
pushq %rax
callq 0xc7bb
addq $0x20, %rsp
testl %eax, %eax
je 0x1ed4f
movq 0x18(%rsp), %rax
movq %rbx, (%r15,%rax,8)
movl 0x4(%rsp), %edi
movl (%rsp), %esi
movl 0x2258d9(%rip), %eax    # 0x244610
xorl %edx, %edx
cmpl 0x8ca5(%rip), %eax      # 0x279e4
sete %dl
movq %r15, %rcx
movl 0x20(%rsp), %r8d
callq 0x1eafd
movq %rbx, %rdi
callq 0x138d5
incq %r12
cmpq %r12, %r13
jne 0x1ec22
movslq 0x2c(%rsp), %r14
testq %r14, %r14
jle 0x1ee6a
xorl %r15d, %r15d
leaq 0xd10(%rsp), %rbx
leaq 0x18b0(%rsp), %r12
movq 0x2450(%rsp,%r15,8), %rdi
movl 0x740(%rsp,%r15,4), %ebp
movl %ebp, %esi
callq 0x139a9
movq %rax, %r13
callq 0x13c28
testl %eax, %eax
je 0x1edbe
movq %r13, %rdi
movl %ebp, %esi
callq 0x13ea4
incq %r15
cmpq %r15, %r14
jne 0x1ed84
jmp 0x1ee6a
movq 0x28(%r13), %rdi
movl %ebp, %esi
movq %rbx, %rdx
leaq 0x14(%rsp), %rcx
leaq 0xc(%rsp), %r8
movq %r12, %r9
leaq 0x8(%rsp), %rax
pushq %rax
leaq 0x18(%rsp), %rax
pushq %rax
callq 0x13cb0
addq $0x10, %rsp
movl 0xc(%rsp), %edx
movl 0x8(%rsp), %r9d
movl %r9d, %eax
addl %edx, %eax
jle 0x1eda7
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %r8d
subq $0x8, %rsp
movq %rbx, %rdi
movq %r12, %rcx
leaq 0x8(%rsp), %rax
pushq %rax
leaq 0x14(%rsp), %rax
pushq %rax
leaq 0x8dd1(%rip), %rax      # 0x27bf0
pushq %rax
callq 0xc7bb
addq $0x20, %rsp
testl %eax, %eax
je 0x1eda7
movl 0x4(%rsp), %edi
movl (%rsp), %esi
movl 0x2257d2(%rip), %eax    # 0x244610
movl 0x8ba0(%rip), %ecx      # 0x279e4
cmpl %ecx, %eax
sete %dl
incl %ecx
cmpl %ecx, %eax
sete %al
orb %dl, %al
movzbl %al, %edx
leaq 0x140(%rsp), %rcx
xorl %r8d, %r8d
callq 0x1eafd
jmp 0x1eda7
movslq 0x28(%rsp), %r14
testq %r14, %r14
jle 0x1ef7a
xorl %r15d, %r15d
leaq 0x30(%rsp), %rbx
movq 0x340(%rsp,%r15,8), %rdi
movq %rbx, %rsi
callq 0x13fdc
movq %rax, %rbp
callq 0x13c28
testl %eax, %eax
jne 0x1ef50
callq 0x142b0
testl %eax, %eax
jne 0x1ef50
movl 0x22575d(%rip), %eax    # 0x244610
leal -0x1(%rax), %ecx
movl %ecx, 0x18(%rsp)
cmpl $0x2, %eax
jl 0x1eef3
movl 0x18(%rsp), %ebx
leaq 0x8d26(%rip), %r12      # 0x27bf0
xorl %r13d, %r13d
movl %r13d, %edi
callq 0x1436f
movl $0x2, %ecx
testl %eax, %eax
jne 0x1eee2
movl (%r12), %ecx
movl %ecx, 0x40(%rsp,%r13,4)
incq %r13
addq $0x4, %r12
cmpq %r13, %rbx
jne 0x1eecd
movslq 0x18(%rsp), %rax
movl $0x2, 0x40(%rsp,%rax,4)
leaq 0x40(%rsp), %rdi
leaq 0x4(%rsp), %rsi
movq %rsp, %rdx
callq 0x62d6
testl %eax, %eax
leaq 0x30(%rsp), %rbx
je 0x1ef50
movl 0x4(%rsp), %edi
movl (%rsp), %esi
movl 0x2256e8(%rip), %eax    # 0x244610
movl 0x8ab6(%rip), %ecx      # 0x279e4
cmpl %ecx, %eax
setge %dl
addl $0x4, %ecx
cmpl %ecx, %eax
setle %al
andb %dl, %al
movzbl %al, %edx
leaq 0x140(%rsp), %rcx
xorl %r8d, %r8d
callq 0x1eafd
movq 0x30(%rsp), %rsi
movq 0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x20(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x1445b
incq %r15
cmpq %r14, %r15
jne 0x1ee80
cmpl $0x0, 0x24(%rsp)
je 0x1efa5
movslq 0x225688(%rip), %rdx    # 0x244610
testq %rdx, %rdx
jle 0x1efa5
shlq $0x3, %rdx
leaq 0x8a58(%rip), %rdi      # 0x279f0
leaq 0x540(%rsp), %rsi
callq 0x1070
addq $0x7098, %rsp           # imm = 0x7098
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x27db