// File: /workspace/github_c_makefile_star2_O1/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 $0x70a8, %rsp           # imm = 0x70A8
movq %rcx, %r15
movl %edx, %ecx
movl %esi, %ebx
movl %edi, %ebp
movl 0x225c88(%rip), %edx    # 0x244610
cmpl 0x78e2(%rip), %edx      # 0x26270
jne 0x1e9af
movl %ebp, %edi
movl %ebx, %esi
movl $0x5, %edx
addq $0x70a8, %rsp           # imm = 0x70A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x76f0
movl %r8d, %r14d
testl %ecx, %ecx
je 0x1e9f3
subl $0x1, 0x26c263(%rip)    # 0x28ac20
jae 0x1ee0a
movl 0x78a3(%rip), %eax      # 0x2626c
decl %eax
movl %eax, 0x26c24f(%rip)    # 0x28ac20
testl %edx, %edx
jle 0x1e9f3
shlq $0x3, %rdx
leaq 0x9010(%rip), %rsi      # 0x279f0
leaq 0x550(%rsp), %rdi
movl %ecx, %r12d
callq 0x1080
movl %r12d, %ecx
movslq %r14d, %rax
testl %r14d, %r14d
movl %ecx, 0x34(%rsp)
movq %rax, 0x20(%rsp)
je 0x1ea0b
movq -0x8(%r15,%rax,8), %rax
jmp 0x1ea0d
xorl %eax, %eax
subq $0x8, %rsp
leaq 0x40(%rsp), %r10
leaq 0x358(%rsp), %r11
leaq 0x44(%rsp), %r13
leaq 0x5058(%rsp), %rdx
leaq 0x3008(%rsp), %rcx
leaq 0x54(%rsp), %r12
leaq 0x2468(%rsp), %r9
movl %ebp, %edi
movl %ebx, %esi
movq %r12, %r8
pushq %rax
pushq %r10
pushq %r11
pushq %r13
leaq 0x778(%rsp), %rax
pushq %rax
callq 0x12727
addq $0x30, %rsp
movslq (%r12), %r13
cmpq $0x400, %r13            # imm = 0x400
jg 0x1ee1c
testl %r13d, %r13d
jle 0x1ebd2
movq 0x20(%rsp), %rax
incl %eax
movl %eax, 0x28(%rsp)
xorl %r12d, %r12d
leaq 0x18c0(%rsp), %rbp
movq 0x5050(%rsp,%r12,8), %rdi
movq 0x3000(%rsp,%r12,8), %rsi
callq 0x12f11
movq %rax, %rbx
subq $0x8, %rsp
movq %rax, %rdi
leaq 0xd28(%rsp), %rsi
leaq 0x24(%rsp), %rdx
leaq 0x1c(%rsp), %rcx
movq %rbp, %r8
leaq 0x20(%rsp), %r9
pushq %r14
pushq %r15
leaq 0x28(%rsp), %rax
pushq %rax
callq 0x1308d
addq $0x20, %rsp
movl 0x14(%rsp), %edx
movl 0x10(%rsp), %r9d
movl %r9d, %eax
addl %edx, %eax
jle 0x1ebbe
movl 0x225b1a(%rip), %eax    # 0x244610
movl 0x7774(%rip), %ecx      # 0x26270
xorl %eax, %ecx
orl 0x8edc(%rip), %ecx      # 0x279e0
movl 0x1c(%rsp), %esi
movl %esi, %edi
xorl %edx, %edi
orl %ecx, %edi
movl 0x18(%rsp), %r8d
movl %r8d, %ecx
xorl %r9d, %ecx
orl %edi, %ecx
jne 0x1eb36
movl $0x1, %edi
movl $0x1, %esi
movl $0x5, %edx
callq 0x76f0
jmp 0x1ebbe
leal (%r8,%rsi), %ecx
cmpl $0x1, %ecx
jne 0x1eb5f
movq 0x20(%rsp), %rcx
movq %rbx, (%r15,%rcx,8)
xorl %edx, %edx
cmpl 0x8e94(%rip), %eax      # 0x279e4
sete %dl
movl $0x1, %edi
movl $0x1, %esi
jmp 0x1ebb1
subq $0x8, %rsp
leaq 0xd28(%rsp), %rdi
movq %rbp, %rcx
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x1c(%rsp), %rax
pushq %rax
leaq 0x906f(%rip), %rax      # 0x27bf0
pushq %rax
callq 0xc654
addq $0x20, %rsp
testl %eax, %eax
je 0x1ebbe
movq 0x20(%rsp), %rax
movq %rbx, (%r15,%rax,8)
movl 0xc(%rsp), %edi
movl 0x8(%rsp), %esi
movl 0x225a6a(%rip), %eax    # 0x244610
xorl %edx, %edx
cmpl 0x8e36(%rip), %eax      # 0x279e4
sete %dl
movq %r15, %rcx
movl 0x28(%rsp), %r8d
callq 0x1e968
movq %rbx, %rdi
callq 0x1378d
incq %r12
cmpq %r12, %r13
jne 0x1ea90
movslq 0x3c(%rsp), %r14
testq %r14, %r14
jle 0x1ecd9
xorl %r15d, %r15d
leaq 0xd20(%rsp), %rbx
leaq 0x18c0(%rsp), %r12
movq 0x2460(%rsp,%r15,8), %rdi
movl 0x750(%rsp,%r15,4), %ebp
movl %ebp, %esi
callq 0x13861
movq %rax, %r13
callq 0x13bff
testl %eax, %eax
je 0x1ec2d
movq %r13, %rdi
movl %ebp, %esi
callq 0x13e90
incq %r15
cmpq %r15, %r14
jne 0x1ebf3
jmp 0x1ecd9
movq %r13, %rdi
movl %ebp, %esi
movq %rbx, %rdx
leaq 0x1c(%rsp), %rcx
leaq 0x14(%rsp), %r8
movq %r12, %r9
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x20(%rsp), %rax
pushq %rax
callq 0x13c87
addq $0x10, %rsp
movl 0x14(%rsp), %edx
movl 0x10(%rsp), %r9d
movl %r9d, %eax
addl %edx, %eax
jle 0x1ec16
movl 0x1c(%rsp), %esi
movl 0x18(%rsp), %r8d
subq $0x8, %rsp
movq %rbx, %rdi
movq %r12, %rcx
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x1c(%rsp), %rax
pushq %rax
leaq 0x8f63(%rip), %rax      # 0x27bf0
pushq %rax
callq 0xc654
addq $0x20, %rsp
testl %eax, %eax
je 0x1ec16
movl 0xc(%rsp), %edi
movl 0x8(%rsp), %esi
movl 0x225963(%rip), %eax    # 0x244610
movl 0x8d31(%rip), %ecx      # 0x279e4
cmpl %ecx, %eax
sete %dl
incl %ecx
cmpl %ecx, %eax
sete %al
orb %dl, %al
movzbl %al, %edx
leaq 0x150(%rsp), %rcx
xorl %r8d, %r8d
callq 0x1e968
jmp 0x1ec16
movslq 0x38(%rsp), %r14
testq %r14, %r14
jle 0x1eddf
xorl %r15d, %r15d
leaq 0x40(%rsp), %rbx
movq 0x350(%rsp,%r15,8), %rdi
movq %rbx, %rsi
callq 0x13fc8
movq %rax, %rbp
callq 0x13bff
testl %eax, %eax
jne 0x1edc6
callq 0x142c6
testl %eax, %eax
jne 0x1edc6
movl 0x2258ee(%rip), %eax    # 0x244610
leal -0x1(%rax), %ecx
movl %ecx, 0x20(%rsp)
movq %rax, 0x28(%rsp)
cmpl $0x2, %eax
jl 0x1ed67
movl 0x20(%rsp), %ebx
leaq 0x8eb2(%rip), %r12      # 0x27bf0
xorl %r13d, %r13d
movl %r13d, %edi
callq 0x14382
movl $0x2, %ecx
testl %eax, %eax
jne 0x1ed56
movl (%r12), %ecx
movl %ecx, 0x50(%rsp,%r13,4)
incq %r13
addq $0x4, %r12
cmpq %r13, %rbx
jne 0x1ed41
movslq 0x20(%rsp), %rax
movl $0x2, 0x50(%rsp,%rax,4)
leaq 0x50(%rsp), %rdi
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x6408
testl %eax, %eax
leaq 0x40(%rsp), %rbx
je 0x1edc6
movl 0xc(%rsp), %edi
movl 0x8(%rsp), %esi
movl 0x8c45(%rip), %eax      # 0x279e4
movq 0x28(%rsp), %rdx
cmpl %eax, %edx
setge %cl
addl $0x4, %eax
cmpl %eax, %edx
setle %al
andb %cl, %al
movzbl %al, %edx
leaq 0x150(%rsp), %rcx
xorl %r8d, %r8d
callq 0x1e968
movq 0x40(%rsp), %rsi
movq %rbp, %rdi
callq 0x1446e
incq %r15
cmpq %r14, %r15
jne 0x1ecef
cmpl $0x0, 0x34(%rsp)
je 0x1ee0a
movslq 0x225823(%rip), %rdx    # 0x244610
testq %rdx, %rdx
jle 0x1ee0a
shlq $0x3, %rdx
leaq 0x8bf3(%rip), %rdi      # 0x279f0
leaq 0x550(%rsp), %rsi
callq 0x1080
addq $0x70a8, %rsp           # imm = 0x70A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2857