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

/* The main node of the recursion for triangulations with minimum
   degree at least 4.
   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).
   Splitting is a bit more complicated because the S operation adds
   three vertices.
   If this graph was made with a four-operation, the reference edge of
   that operation is lastfour.  If not, lastfour=NULL.
*/
{
    EDGE *firstedge_save[MAXN];
    EDGE *ext4[MAXE/2],*ext5[MAXE],*extS[MAXF];
    EDGE *good_or[MAXE],*good_mir[MAXE];
    int ngood_or,ngood_mir,ngood_ref,ngood_mir_ref;
    int next4,next5,nextS,i;
    int xnbtot,xnbop;
    int hint;

    if (nv == maxnv)
    {
        if (pswitch) startpolyscan(nbtot,nbop);
	else         got_one(nbtot,nbop,3);
	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_MIN4
    if (!(PRE_FILTER_MIN4)) return;
#endif

#ifndef FIND_EXTENSIONS_MIN4
#define FIND_EXTENSIONS_MIN4 find_extensions_min4
#endif

    FIND_EXTENSIONS_MIN4(nbtot,nbop,ext4,&next4,ext5,&next5,extS,&nextS,
			 lastfour);

    for (i = 0; i < next4; ++i)
    {
        extend_four(ext4[i]);
#ifdef FAST_FILTER_MIN4
        if (FAST_FILTER_MIN4)
#endif 
        {
	    min4_four_legal(ext4[i],good_or,&ngood_or,&ngood_ref,
		         good_mir,&ngood_mir,&ngood_mir_ref);
    
            if (ngood_ref+ngood_mir_ref > 0)
	    {
	        if (nv == maxnv && !needgroup && ngood_or == ngood_ref
                                                && ngood_mir == ngood_mir_ref)
		    got_one(1,1,3);
	        else if (ngood_or+ngood_mir==1)
    		    scanmin4(1,1,nv==splitlevel,ext4[i]);
	        else if (canon_edge_oriented(good_or,ngood_or,ngood_ref,
                                           good_mir,ngood_mir,ngood_mir_ref,
                                           degree,numbering,&xnbtot,&xnbop))
	            scanmin4(xnbtot,xnbop,nv==splitlevel,ext4[i]);
	    }
	}
	reduce_four(ext4[i]);
    }

    /* hint = lastfour ? lastfour->start : -1; */
    hint = -1;
    for (i = 0; i < next5; ++i)
    {
        extend_five(ext5[i]);
#ifdef FAST_FILTER_MIN4
        if (FAST_FILTER_MIN4)
#endif 
        {
            if (hint < 0 || !is_min4_four_centre(hint))
	        hint = min4_four_centre();
	    if (hint < 0)
	    {
                min4_five_legal(ext5[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))
                    scanmin4(xnbtot,xnbop,nv==splitlevel,NULL);
                }
	    }
	}
        reduce_five(ext5[i]);
    }

    for (i = 0; i < nextS; ++i)
    {
        extend_S(extS[i]);
#ifdef FAST_FILTER_MIN4
        if (FAST_FILTER_MIN4)
#endif 
        {
            if (degree5_vertex() < 0 && min4_four_centre() < 0)
            {
                min4_S_legal(extS[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,
                                            zero,numbering,&xnbtot,&xnbop))
                    scanmin4(xnbtot,xnbop,
			     nv>=splitlevel&&nv<=splitlevel+2,NULL);
                    }
            }
        }
        reduce_S(extS[i]);
    }

    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 $0x2ec8, %rsp           # imm = 0x2EC8
movl %edx, %r15d
movl %esi, %ebx
movl %edi, %ebp
movl 0x233e25(%rip), %edx    # 0x244610
cmpl 0x15a7f(%rip), %edx     # 0x26270
jne 0x1081a
cmpb $0x1, 0x159ae(%rip)     # 0x261a8
jne 0x10c21
movl %ebp, %edi
movl %ebx, %esi
addq $0x2ec8, %rsp           # imm = 0x2EC8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x124c3
movq %rcx, %r14
testl %r15d, %r15d
je 0x10856
subl $0x1, 0x27a3f7(%rip)    # 0x28ac20
jae 0x10c0f
movl 0x15a37(%rip), %eax     # 0x2626c
decl %eax
movl %eax, 0x27a3e3(%rip)    # 0x28ac20
testl %edx, %edx
jle 0x10856
shlq $0x3, %rdx
leaq 0x171a4(%rip), %rsi     # 0x279f0
leaq 0x30(%rsp), %rdi
callq 0x1070
movl %r15d, 0x20(%rsp)
subq $0x8, %rsp
leaq 0x2c(%rsp), %rax
leaq 0x238(%rsp), %r10
leaq 0x618(%rsp), %rdx
leaq 0x34(%rsp), %r15
leaq 0x2328(%rsp), %r8
leaq 0x30(%rsp), %r9
movl %ebp, %edi
movl %ebx, %esi
movq %r15, %rcx
pushq %r14
pushq %rax
pushq %r10
callq 0x18cc4
addq $0x20, %rsp
movslq (%r15), %r15
testq %r15, %r15
jle 0x109cf
xorl %r12d, %r12d
leaq 0x1780(%rsp), %r14
leaq 0xbe0(%rsp), %r13
leaq 0x18(%rsp), %rbp
movq 0x610(%rsp,%r12,8), %rbx
movq %rbx, %rdi
callq 0x196f1
subq $0x8, %rsp
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x24(%rsp), %rdx
leaq 0x1c(%rsp), %rcx
movq %r13, %r8
movq %rbp, %r9
leaq 0x18(%rsp), %rax
pushq %rax
callq 0x197eb
addq $0x10, %rsp
movl 0x14(%rsp), %edx
movl 0x10(%rsp), %r9d
movl %r9d, %eax
addl %edx, %eax
jle 0x109bb
movl 0x233cfe(%rip), %eax    # 0x244610
movl 0x15958(%rip), %ecx     # 0x26270
xorl %eax, %ecx
orl 0x170c0(%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 0x1094f
movl $0x1, %edi
movl $0x1, %esi
movl $0x3, %edx
callq 0x761c
jmp 0x109bb
leal (%r8,%rsi), %ecx
cmpl $0x1, %ecx
jne 0x1096f
xorl %edx, %edx
cmpl 0x17084(%rip), %eax     # 0x279e4
sete %dl
movl $0x1, %edi
movl $0x1, %esi
jmp 0x109b3
subq $0x8, %rsp
movq %r14, %rdi
movq %r13, %rcx
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x1c(%rsp), %rax
pushq %rax
leaq 0x17264(%rip), %rax     # 0x27bf0
pushq %rax
callq 0xc7bb
addq $0x20, %rsp
testl %eax, %eax
je 0x109bb
movl 0xc(%rsp), %edi
movl 0x8(%rsp), %esi
movl 0x233c68(%rip), %eax    # 0x244610
xorl %edx, %edx
cmpl 0x17034(%rip), %eax     # 0x279e4
sete %dl
movq %rbx, %rcx
callq 0x107cd
movq %rbx, %rdi
callq 0x19c72
incq %r12
cmpq %r12, %r15
jne 0x108bf
movslq 0x28(%rsp), %r12
testq %r12, %r12
jle 0x10acb
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %ebx, %ebx
leaq 0x1780(%rsp), %r14
leaq 0xbe0(%rsp), %r13
movq 0x2320(%rsp,%rbx,8), %r15
movq %r15, %rdi
callq 0x19d00
testl %ebp, %ebp
js 0x10a13
movl %ebp, %edi
callq 0x19e5b
testl %eax, %eax
jne 0x10a1e
callq 0x19ebc
movl %eax, %ebp
testl %eax, %eax
js 0x10a33
movq %r15, %rdi
callq 0x1a145
incq %rbx
cmpq %rbx, %r12
jne 0x109f4
jmp 0x10acb
subq $0x8, %rsp
movq %r15, %rdi
movq %r14, %rsi
leaq 0x24(%rsp), %rdx
leaq 0x1c(%rsp), %rcx
movq %r13, %r8
leaq 0x20(%rsp), %r9
leaq 0x18(%rsp), %rax
pushq %rax
callq 0x19f39
addq $0x10, %rsp
movl 0x14(%rsp), %edx
movl 0x10(%rsp), %r9d
movl %r9d, %eax
addl %edx, %eax
jle 0x10a1e
movl 0x1c(%rsp), %esi
movl 0x18(%rsp), %r8d
subq $0x8, %rsp
movq %r14, %rdi
movq %r13, %rcx
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x1c(%rsp), %rax
pushq %rax
leaq 0x1715c(%rip), %rax     # 0x27bf0
pushq %rax
callq 0xc7bb
addq $0x20, %rsp
testl %eax, %eax
je 0x10a1e
movl 0xc(%rsp), %edi
movl 0x8(%rsp), %esi
movl 0x233b5c(%rip), %eax    # 0x244610
xorl %edx, %edx
cmpl 0x16f28(%rip), %eax     # 0x279e4
sete %dl
xorl %ecx, %ecx
callq 0x107cd
jmp 0x10a1e
movslq 0x24(%rsp), %r15
testq %r15, %r15
jle 0x10be7
xorl %r12d, %r12d
leaq 0x1710d(%rip), %rbp     # 0x27bf0
leaq 0x1780(%rsp), %r14
leaq 0xbe0(%rsp), %r13
movq 0x230(%rsp,%r12,8), %rbx
movq %rbx, %rdi
callq 0x1a20b
movslq 0x233b06(%rip), %rax    # 0x244610
testq %rax, %rax
jle 0x10b24
shlq $0x2, %rax
xorl %ecx, %ecx
cmpl $0x5, (%rcx,%rbp)
je 0x10b2d
addq $0x4, %rcx
cmpq %rcx, %rax
jne 0x10b15
callq 0x19ebc
testl %eax, %eax
js 0x10b42
movq %rbx, %rdi
callq 0x1a54c
incq %r12
cmpq %r15, %r12
jne 0x10af3
jmp 0x10be7
subq $0x8, %rsp
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x24(%rsp), %rdx
leaq 0x1c(%rsp), %rcx
movq %r13, %r8
leaq 0x20(%rsp), %r9
leaq 0x18(%rsp), %rax
pushq %rax
callq 0x1a36f
addq $0x10, %rsp
movl 0x14(%rsp), %edx
movl 0x10(%rsp), %r9d
movl %r9d, %eax
addl %edx, %eax
jle 0x10b2d
movl 0x1c(%rsp), %esi
movl 0x18(%rsp), %r8d
subq $0x8, %rsp
movq %r14, %rdi
movq %r13, %rcx
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x1c(%rsp), %rax
pushq %rax
leaq 0x49ffcd(%rip), %rax    # 0x4b0b70
pushq %rax
callq 0xc7bb
addq $0x20, %rsp
testl %eax, %eax
je 0x10b2d
movl 0xc(%rsp), %edi
movl 0x8(%rsp), %esi
movl 0x233a4d(%rip), %eax    # 0x244610
movl 0x16e1b(%rip), %ecx     # 0x279e4
cmpl %ecx, %eax
setge %dl
addl $0x2, %ecx
cmpl %ecx, %eax
setle %al
andb %dl, %al
movzbl %al, %edx
xorl %ecx, %ecx
callq 0x107cd
jmp 0x10b2d
cmpl $0x0, 0x20(%rsp)
je 0x10c0f
movslq 0x233a1b(%rip), %rdx    # 0x244610
testq %rdx, %rdx
jle 0x10c0f
shlq $0x3, %rdx
leaq 0x16deb(%rip), %rdi     # 0x279f0
leaq 0x30(%rsp), %rsi
callq 0x1070
addq $0x2ec8, %rsp           # imm = 0x2EC8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebp, %edi
movl %ebx, %esi
movl $0x3, %edx
addq $0x2ec8, %rsp           # imm = 0x2EC8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x761c