// File: /workspace/github_c_makefile_star2_O1/mishun[P]plantri/plantri.c
// Function: scanmin4c
static void
scanmin4c(int nbtot, int nbop, int dosplit, EDGE *lastfour,
          triangle nft[], int numnft)

/* The main node of the recursion for triangulations with minimum
   degree at least 4.  This is the version keeping track of all the
   non-facial triangles.
   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.
   nft[0..numnft-1] is a list of all the non-facial triangles.
   Edges in the triangles must be in min form.
*/
{
    EDGE *firstedge_save[MAXN];
    EDGE *ext4[MAXE/2],*ext5[MAXE],*extS[MAXF];
    EDGE *good_or[MAXE],*good_mir[MAXE],*e;
    triangle newnft[MAXN];
    int newnumnft;
    int ngood_or,ngood_mir,ngood_ref,ngood_mir_ref;
    int next4,next5,nextS,i;
    int xnbtot,xnbop;
    int hint;

    if (nv == maxnv)
    {
        got_one(nbtot,nbop,3+(numnft==0));
        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);

    if (nv == maxnv-1 && numnft > 0 && minconnec == 4)
        nftlaststep(ext4,&next4,ext5,&next5,nft,numnft);

    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)
                {
                    update_nft_four(nft,numnft,ext4[i],newnft,&newnumnft);
                    got_one(1,1,3+(newnumnft==0));
                }
                else if (ngood_or+ngood_mir==1)
                {
                    update_nft_four(nft,numnft,ext4[i],newnft,&newnumnft);
                    scanmin4c(1,1,nv==splitlevel,ext4[i],newnft,newnumnft);
                }
                else if (canon_edge_oriented(good_or,ngood_or,ngood_ref,
                                           good_mir,ngood_mir,ngood_mir_ref,
                                           degree,numbering,&xnbtot,&xnbop))
                {
                    update_nft_four(nft,numnft,ext4[i],newnft,&newnumnft);
                    scanmin4c(xnbtot,xnbop,nv==splitlevel,ext4[i],
                             newnft,newnumnft);
                }
            }
        }
        reduce_four(ext4[i]);
    }

    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))
                    {
                        update_nft_five(nft,numnft,ext5[i],newnft,&newnumnft);
                        scanmin4c(xnbtot,xnbop,nv==splitlevel,NULL,
                                 newnft,newnumnft);
                    }
                }
            }
	}
        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))
                    {
                        e = extS[i];
                        nft[numnft].e1 = e->min;
                        e = e->invers->prev->prev->prev;
                        nft[numnft].e2 = e->min;
                        e = e->invers->prev->prev->prev;
                        nft[numnft].e3 = e->min;
                        scanmin4c(xnbtot,xnbop,
			   nv>=splitlevel&&nv<=splitlevel+2,NULL,nft,numnft+1);
                    }
                }
            }
        }
        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 $0x34e8, %rsp           # imm = 0x34E8
movl %esi, %ebp
movl %edi, %r15d
movl 0x2257d2(%rip), %r12d   # 0x244610
movl 0x742b(%rip), %r13d     # 0x26270
cmpl %r13d, %r12d
jne 0x1ee6e
xorl %edx, %edx
cmpl $0x1, %r9d
adcl $0x3, %edx
movl %r15d, %edi
movl %ebp, %esi
addq $0x34e8, %rsp           # imm = 0x34E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x76f0
movq %r8, %r14
movq %rcx, %rbx
movl %r9d, 0x4(%rsp)
testl %edx, %edx
je 0x1eec1
subl $0x1, 0x26bd9c(%rip)    # 0x28ac20
jae 0x1f5d0
movl 0x73dc(%rip), %eax      # 0x2626c
decl %eax
movl %eax, 0x26bd88(%rip)    # 0x28ac20
testl %r12d, %r12d
jle 0x1eec1
movl %edx, 0x24(%rsp)
leaq (,%r12,8), %rdx
leaq 0x8b40(%rip), %rsi      # 0x279f0
leaq 0x650(%rsp), %rdi
callq 0x1080
movl 0x24(%rsp), %edx
movl %edx, 0x24(%rsp)
subq $0x8, %rsp
leaq 0x4c(%rsp), %rax
leaq 0xe28(%rsp), %r10
leaq 0x858(%rsp), %rdx
leaq 0x34(%rsp), %rcx
leaq 0x2948(%rsp), %r8
leaq 0x30(%rsp), %r9
movl %r15d, %edi
movl %ebp, %esi
pushq %rbx
pushq %rax
pushq %r10
callq 0x18c37
addq $0x20, %rsp
movl 0x4(%rsp), %eax
movl %eax, %r15d
testl %eax, %eax
jle 0x1f037
decl %r13d
cmpl %r13d, %r12d
jne 0x1f037
cmpl $0x4, 0x718c(%rip)      # 0x260b0
jne 0x1f037
movl 0x7164(%rip), %edx      # 0x26094
movl 0x2c(%rsp), %r9d
movl 0x28(%rsp), %esi
xorl %eax, %eax
leaq 0x2256de(%rip), %rcx    # 0x244620
cmpl $0x752f, %edx           # imm = 0x752F
jl 0x1ef6a
movl $0x30, %edx
movl $0x0, (%rdx,%rcx)
addq $0x40, %rdx
cmpq $0x46630, %rdx          # imm = 0x46630
jne 0x1ef4f
movl $0x2, %edx
jmp 0x1ef6d
addl $0x2, %edx
leaq (%rax,%rax,2), %rdi
movq (%r14,%rdi,8), %r8
movl %edx, 0x30(%r8)
movq 0x20(%r8), %r8
movl %edx, 0x30(%r8)
movq 0x8(%r14,%rdi,8), %r8
movl %edx, 0x30(%r8)
movq 0x20(%r8), %r8
movl %edx, 0x30(%r8)
movq 0x10(%r14,%rdi,8), %rdi
movl %edx, 0x30(%rdi)
movq 0x20(%rdi), %rdi
movl %edx, 0x30(%rdi)
xorl %edi, %edi
movl $0x0, %r8d
testl %r9d, %r9d
jle 0x1efdb
movl %r9d, %r9d
xorl %r10d, %r10d
xorl %r8d, %r8d
movq 0x850(%rsp,%r10,8), %r11
cmpl %edx, 0x30(%r11)
jne 0x1efd3
movslq %r8d, %rbx
incl %r8d
movq %r11, 0x850(%rsp,%rbx,8)
incq %r10
cmpq %r10, %r9
jne 0x1efb7
testl %esi, %esi
jle 0x1f017
movl %esi, %esi
xorl %r9d, %r9d
xorl %edi, %edi
movq 0x2940(%rsp,%r9,8), %r10
cmpl %edx, 0x30(%r10)
je 0x1f002
movq 0x20(%r10), %r11
movq 0x10(%r11), %r11
cmpl %edx, 0x30(%r11)
jne 0x1f00f
movslq %edi, %r11
incl %edi
movq %r10, 0x2940(%rsp,%r11,8)
incq %r9
cmpq %r9, %rsi
jne 0x1efe6
incq %rax
movl %edi, %esi
movl %r8d, %r9d
cmpq %r15, %rax
jne 0x1ef42
movl %r8d, 0x2c(%rsp)
movl %edi, 0x28(%rsp)
movl %edx, 0x705d(%rip)      # 0x26094
movq %r15, 0x30(%rsp)
movslq 0x2c(%rsp), %r13
testq %r13, %r13
jle 0x1f1f2
xorl %ebx, %ebx
leaq 0x1da0(%rsp), %rbp
movq %r13, 0x38(%rsp)
movq 0x850(%rsp,%rbx,8), %r12
movq %r12, %rdi
callq 0x19632
subq $0x8, %rsp
movq %r12, %rdi
leaq 0x1208(%rsp), %rsi
leaq 0x28(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %rbp, %r8
leaq 0x24(%rsp), %r9
leaq 0x1c(%rsp), %rax
pushq %rax
callq 0x19735
addq $0x10, %rsp
movl 0x18(%rsp), %edx
movl 0x14(%rsp), %r9d
movl %r9d, %eax
addl %edx, %eax
jle 0x1f1de
movl 0x22555c(%rip), %r15d   # 0x244610
movl 0x71b6(%rip), %eax      # 0x26270
xorl %r15d, %eax
orl 0x891d(%rip), %eax      # 0x279e0
movl 0x20(%rsp), %esi
movl %esi, %ecx
xorl %edx, %ecx
orl %eax, %ecx
movl 0x1c(%rsp), %r8d
movl %r8d, %eax
xorl %r9d, %eax
orl %ecx, %eax
jne 0x1f116
movq %r14, %rdi
movl 0x4(%rsp), %esi
movq %r12, %rdx
leaq 0x50(%rsp), %rcx
leaq 0x8(%rsp), %r8
callq 0x1f5e2
cmpl $0x1, 0x8(%rsp)
movl $0x0, %edx
adcl $0x3, %edx
movl $0x1, %edi
movl $0x1, %esi
callq 0x76f0
jmp 0x1f1de
leal (%r8,%rsi), %eax
cmpl $0x1, %eax
jne 0x1f169
movq %r14, %rdi
movl 0x4(%rsp), %esi
movq %r12, %rdx
movq %rbp, %r13
leaq 0x50(%rsp), %rbp
movq %rbp, %rcx
leaq 0x8(%rsp), %r8
callq 0x1f5e2
xorl %edx, %edx
cmpl 0x889d(%rip), %r15d     # 0x279e4
sete %dl
movl 0x8(%rsp), %r9d
movl $0x1, %edi
movl $0x1, %esi
movq %r12, %rcx
movq %rbp, %r8
movq %r13, %rbp
movq 0x38(%rsp), %r13
jmp 0x1f1d9
subq $0x8, %rsp
leaq 0x1208(%rsp), %rdi
movq %rbp, %rcx
leaq 0x14(%rsp), %rax
pushq %rax
leaq 0x20(%rsp), %rax
pushq %rax
leaq 0x8a65(%rip), %rax      # 0x27bf0
pushq %rax
callq 0xc654
addq $0x20, %rsp
testl %eax, %eax
je 0x1f1de
movq %r14, %rdi
movl 0x4(%rsp), %esi
movq %r12, %rdx
leaq 0x50(%rsp), %r15
movq %r15, %rcx
leaq 0x8(%rsp), %r8
callq 0x1f5e2
movl 0x10(%rsp), %edi
movl 0xc(%rsp), %esi
movl 0x22544d(%rip), %eax    # 0x244610
xorl %edx, %edx
cmpl 0x8819(%rip), %eax      # 0x279e4
sete %dl
movl 0x8(%rsp), %r9d
movq %r12, %rcx
movq %r15, %r8
callq 0x1ee21
movq %r12, %rdi
callq 0x19b77
incq %rbx
cmpq %rbx, %r13
jne 0x1f059
movslq 0x28(%rsp), %rax
movl 0x8(%rsp), %r15d
movq %rax, 0x38(%rsp)
testq %rax, %rax
jle 0x1f42b
movq 0x30(%rsp), %rax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rax
movq %rax, 0x30(%rsp)
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
xorl %ebx, %ebx
leaq 0x1da0(%rsp), %rbp
movq %r14, 0x48(%rsp)
movq 0x2940(%rsp,%rbx,8), %r12
movq %r12, %rdi
callq 0x19c06
testl %r13d, %r13d
js 0x1f252
movl %r13d, %edi
callq 0x19d6b
testl %eax, %eax
jne 0x1f25a
callq 0x19dcc
movl %eax, %r13d
testl %r13d, %r13d
js 0x1f276
movq %r12, %rdi
callq 0x1a055
incq %rbx
cmpq 0x38(%rsp), %rbx
jne 0x1f231
jmp 0x1f42b
movl %r13d, %r14d
subq $0x8, %rsp
movq %r12, %rdi
leaq 0x1208(%rsp), %r13
movq %r13, %rsi
leaq 0x28(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %rbp, %r8
leaq 0x24(%rsp), %r9
leaq 0x1c(%rsp), %rax
pushq %rax
callq 0x19e49
addq $0x10, %rsp
movl 0x18(%rsp), %edx
movl 0x14(%rsp), %r9d
movl %r9d, %eax
addl %edx, %eax
jle 0x1f41e
movl 0x20(%rsp), %esi
movl 0x1c(%rsp), %r8d
subq $0x8, %rsp
movq %r13, %rdi
movq %rbp, %rcx
leaq 0x14(%rsp), %rax
pushq %rax
leaq 0x20(%rsp), %rax
pushq %rax
leaq 0x890a(%rip), %rax      # 0x27bf0
pushq %rax
callq 0xc654
addq $0x20, %rsp
testl %eax, %eax
movl %r14d, %r13d
movq 0x48(%rsp), %r14
je 0x1f25f
xorl %r15d, %r15d
movl $0x0, %eax
cmpl $0x0, 0x4(%rsp)
movq 0x30(%rsp), %r10
jle 0x1f37e
movq 0x18(%r12), %rax
movq 0x28(%r12), %rcx
movq 0x18(%rax), %rax
movq 0x28(%rax), %rdx
xorl %esi, %esi
xorl %eax, %eax
movq (%r14,%rsi), %rdi
cmpq %rcx, %rdi
je 0x1f375
movq 0x8(%r14,%rsi), %r8
cmpq %rcx, %r8
je 0x1f375
movq 0x10(%r14,%rsi), %r9
cmpq %rcx, %r9
je 0x1f375
cmpq %rdx, %rdi
je 0x1f375
cmpq %rdx, %r8
je 0x1f375
cmpq %rdx, %r9
je 0x1f375
leaq (%r14,%rsi), %rdi
movslq %eax, %r8
incl %eax
leaq (%r8,%r8,2), %r8
movq 0x10(%rdi), %r9
movq %r9, 0x60(%rsp,%r8,8)
movups (%rdi), %xmm0
movups %xmm0, 0x50(%rsp,%r8,8)
addq $0x18, %rsi
cmpq %rsi, %r10
jne 0x1f32a
testl %eax, %eax
je 0x1f3f1
movq 0x10(%r12), %rcx
addq $0x10, %rcx
xorl %edx, %edx
movl %eax, %r15d
movq (%rcx), %rax
movq 0x18(%rax), %rcx
movq 0x20(%rax), %rdi
movl 0x4(%rcx), %esi
movq 0x18(%rdi), %rdi
movq 0x20(%rdi), %rdi
movq 0x18(%rdi), %r8
movq 0x18(%r8), %r8
movq 0x18(%r8), %r8
cmpq %rdi, %r8
je 0x1f3e6
cmpl %esi, 0x4(%r8)
jne 0x1f3ae
movq 0x28(%r8), %rsi
movslq %r15d, %r15
leaq (%r15,%r15,2), %rdi
movq %rsi, 0x50(%rsp,%rdi,8)
movq 0x10(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, 0x58(%rsp,%rdi,8)
movq 0x28(%rcx), %rax
movq %rax, 0x60(%rsp,%rdi,8)
incl %r15d
addq $0x18, %rcx
incl %edx
cmpl $0x3, %edx
jne 0x1f390
movl 0x10(%rsp), %edi
movl 0xc(%rsp), %esi
movl 0x225211(%rip), %eax    # 0x244610
xorl %edx, %edx
cmpl 0x85dd(%rip), %eax      # 0x279e4
sete %dl
xorl %ecx, %ecx
leaq 0x50(%rsp), %r8
movl %r15d, %r9d
callq 0x1ee21
jmp 0x1f25f
movl %r14d, %r13d
movq 0x48(%rsp), %r14
jmp 0x1f25f
movl %r15d, 0x8(%rsp)
movslq 0x44(%rsp), %r12
testq %r12, %r12
jle 0x1f5a5
movl 0x4(%rsp), %ecx
movslq %ecx, %rax
leaq (%rax,%rax,2), %rax
leaq (%r14,%rax,8), %rbp
incl %ecx
movl %ecx, 0x4(%rsp)
xorl %ebx, %ebx
leaq 0x8794(%rip), %r13      # 0x27bf0
movq 0xe20(%rsp,%rbx,8), %r15
movq %r15, %rdi
callq 0x1a120
movslq 0x22519d(%rip), %rax    # 0x244610
testq %rax, %rax
jle 0x1f48e
shlq $0x2, %rax
xorl %ecx, %ecx
cmpl $0x5, (%rcx,%r13)
je 0x1f497
addq $0x4, %rcx
cmpq %rcx, %rax
jne 0x1f47e
callq 0x19dcc
testl %eax, %eax
js 0x1f4ac
movq %r15, %rdi
callq 0x1a46e
incq %rbx
cmpq %r12, %rbx
jne 0x1f45c
jmp 0x1f5a5
subq $0x8, %rsp
movq %r15, %rdi
leaq 0x1208(%rsp), %rsi
leaq 0x28(%rsp), %rdx
leaq 0x20(%rsp), %rcx
leaq 0x1da8(%rsp), %r8
leaq 0x24(%rsp), %r9
leaq 0x1c(%rsp), %rax
pushq %rax
callq 0x1a284
addq $0x10, %rsp
movl 0x18(%rsp), %edx
movl 0x14(%rsp), %r9d
movl %r9d, %eax
addl %edx, %eax
jle 0x1f497
movl 0x20(%rsp), %esi
movl 0x1c(%rsp), %r8d
subq $0x8, %rsp
leaq 0x1208(%rsp), %rdi
leaq 0x1da8(%rsp), %rcx
leaq 0x14(%rsp), %rax
pushq %rax
leaq 0x20(%rsp), %rax
pushq %rax
leaq 0x49164f(%rip), %rax    # 0x4b0b70
pushq %rax
callq 0xc654
addq $0x20, %rsp
testl %eax, %eax
je 0x1f497
movq 0x28(%r15), %rax
movq %rax, (%rbp)
movq 0x20(%r15), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x28(%rax), %rcx
movq %rcx, 0x8(%rbp)
movq 0x20(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, 0x10(%rbp)
movl 0x10(%rsp), %edi
movl 0xc(%rsp), %esi
movl 0x225097(%rip), %eax    # 0x244610
movl 0x8465(%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
movq %r14, %r8
movl 0x4(%rsp), %r9d
callq 0x1ee21
jmp 0x1f497
cmpl $0x0, 0x24(%rsp)
je 0x1f5d0
movslq 0x22505d(%rip), %rdx    # 0x244610
testq %rdx, %rdx
jle 0x1f5d0
shlq $0x3, %rdx
leaq 0x842d(%rip), %rdi      # 0x279f0
leaq 0x650(%rsp), %rsi
callq 0x1080
addq $0x34e8, %rsp           # imm = 0x34E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq