// File: /workspace/github_c_makefile_star2_O3/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 0x225637(%rip), %r13d   # 0x244610
movl 0x7290(%rip), %r12d     # 0x26270
cmpl %r12d, %r13d
jne 0x1f009
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 0x761c
movq %r8, %r14
movq %rcx, %r11
movl %edx, %ebx
testl %edx, %edx
je 0x1f065
subl $0x1, 0x26bc04(%rip)    # 0x28ac20
jae 0x1f783
movl 0x7244(%rip), %eax      # 0x2626c
decl %eax
movl %eax, 0x26bbf0(%rip)    # 0x28ac20
testl %r13d, %r13d
jle 0x1f065
leaq (,%r13,8), %rdx
leaq 0x89ac(%rip), %rsi      # 0x279f0
leaq 0x650(%rsp), %rdi
movl %r9d, 0x8(%rsp)
movq %r11, 0x28(%rsp)
callq 0x1070
movq 0x28(%rsp), %r11
movl 0x8(%rsp), %r9d
movl %ebx, 0x44(%rsp)
subq $0x8, %rsp
leaq 0x50(%rsp), %rax
leaq 0x19c8(%rsp), %r10
leaq 0x858(%rsp), %rdx
leaq 0x54(%rsp), %rcx
leaq 0x2948(%rsp), %r8
movl %r9d, %ebx
leaq 0x3c(%rsp), %r9
movl %r15d, %edi
movl %ebp, %esi
movq %rcx, %r15
pushq %r11
pushq %rax
pushq %r10
callq 0x18cc4
addq $0x20, %rsp
movl (%r15), %r9d
movl %ebx, %r15d
movl %ebx, 0x8(%rsp)
testl %ebx, %ebx
movq %r15, 0x38(%rsp)
jle 0x1f1e4
decl %r12d
cmpl %r12d, %r13d
jne 0x1f1e4
cmpl $0x4, 0x6fd9(%rip)      # 0x260b0
jne 0x1f1e4
movl 0x6fa9(%rip), %edx      # 0x2608c
movl 0x34(%rsp), %edi
xorl %eax, %eax
leaq 0x225530(%rip), %rcx    # 0x244620
cmpl $0x752f, %edx           # imm = 0x752F
jl 0x1f118
movl $0x30, %edx
movl $0x0, (%rdx,%rcx)
addq $0x40, %rdx
cmpq $0x46630, %rdx          # imm = 0x46630
jne 0x1f0fd
movl $0x2, %edx
jmp 0x1f11b
addl $0x2, %edx
leaq (%rax,%rax,2), %rsi
movq (%r14,%rsi,8), %r8
movl %edx, 0x30(%r8)
movq 0x20(%r8), %r8
movl %edx, 0x30(%r8)
movq 0x8(%r14,%rsi,8), %r8
movl %edx, 0x30(%r8)
movq 0x20(%r8), %r8
movl %edx, 0x30(%r8)
movq 0x10(%r14,%rsi,8), %rsi
movl %edx, 0x30(%rsi)
movq 0x20(%rsi), %rsi
movl %edx, 0x30(%rsi)
xorl %r8d, %r8d
movl $0x0, %esi
testl %r9d, %r9d
jle 0x1f187
movl %r9d, %r9d
xorl %r10d, %r10d
xorl %esi, %esi
movq 0x850(%rsp,%r10,8), %r11
cmpl %edx, 0x30(%r11)
jne 0x1f17f
movslq %esi, %rbx
incl %esi
movq %r11, 0x850(%rsp,%rbx,8)
incq %r10
cmpq %r10, %r9
jne 0x1f164
testl %edi, %edi
jle 0x1f1c5
movl %edi, %edi
xorl %r9d, %r9d
xorl %r8d, %r8d
movq 0x2940(%rsp,%r9,8), %r10
cmpl %edx, 0x30(%r10)
je 0x1f1af
movq 0x20(%r10), %r11
movq 0x10(%r11), %r11
cmpl %edx, 0x30(%r11)
jne 0x1f1bd
movslq %r8d, %r11
incl %r8d
movq %r10, 0x2940(%rsp,%r11,8)
incq %r9
cmpq %r9, %rdi
jne 0x1f193
incq %rax
movl %r8d, %edi
movl %esi, %r9d
cmpq %r15, %rax
jne 0x1f0f0
movl %r8d, 0x34(%rsp)
movl %edx, 0x6eaa(%rip)      # 0x2608c
jmp 0x1f1e7
movl %r9d, %esi
testl %esi, %esi
jle 0x1f39a
movl %esi, %r13d
xorl %ebx, %ebx
leaq 0xe20(%rsp), %rbp
movq %r13, 0x28(%rsp)
movq 0x850(%rsp,%rbx,8), %r12
movq %r12, %rdi
callq 0x196f1
subq $0x8, %rsp
movq %r12, %rdi
leaq 0x1da8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %rbp, %r8
leaq 0x24(%rsp), %r9
leaq 0x1c(%rsp), %rax
pushq %rax
callq 0x197eb
addq $0x10, %rsp
movl 0x18(%rsp), %edx
movl 0x14(%rsp), %r9d
movl %r9d, %eax
addl %edx, %eax
jle 0x1f386
movl 0x2253b4(%rip), %r15d   # 0x244610
movl 0x700e(%rip), %eax      # 0x26270
xorl %r15d, %eax
orl 0x8775(%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 0x1f2be
movq %r14, %rdi
movl 0x8(%rsp), %esi
movq %r12, %rdx
leaq 0x50(%rsp), %rcx
leaq 0x24(%rsp), %r8
callq 0x1f795
cmpl $0x1, 0x24(%rsp)
movl $0x0, %edx
adcl $0x3, %edx
movl $0x1, %edi
movl $0x1, %esi
callq 0x761c
jmp 0x1f386
leal (%r8,%rsi), %eax
cmpl $0x1, %eax
jne 0x1f311
movq %r14, %rdi
movl 0x8(%rsp), %esi
movq %r12, %rdx
movq %rbp, %r13
leaq 0x50(%rsp), %rbp
movq %rbp, %rcx
leaq 0x24(%rsp), %r8
callq 0x1f795
xorl %edx, %edx
cmpl 0x86f5(%rip), %r15d     # 0x279e4
sete %dl
movl 0x24(%rsp), %r9d
movl $0x1, %edi
movl $0x1, %esi
movq %r12, %rcx
movq %rbp, %r8
movq %r13, %rbp
movq 0x28(%rsp), %r13
jmp 0x1f381
subq $0x8, %rsp
leaq 0x1da8(%rsp), %rdi
movq %rbp, %rcx
leaq 0x14(%rsp), %rax
pushq %rax
leaq 0x20(%rsp), %rax
pushq %rax
leaq 0x88bd(%rip), %rax      # 0x27bf0
pushq %rax
callq 0xc7bb
addq $0x20, %rsp
testl %eax, %eax
je 0x1f386
movq %r14, %rdi
movl 0x8(%rsp), %esi
movq %r12, %rdx
leaq 0x50(%rsp), %r15
movq %r15, %rcx
leaq 0x24(%rsp), %r8
callq 0x1f795
movl 0x10(%rsp), %edi
movl 0xc(%rsp), %esi
movl 0x2252a5(%rip), %eax    # 0x244610
xorl %edx, %edx
cmpl 0x8671(%rip), %eax      # 0x279e4
sete %dl
movl 0x24(%rsp), %r9d
movq %r12, %rcx
movq %r15, %r8
callq 0x1efbc
movq %r12, %rdi
callq 0x19c72
incq %rbx
cmpq %rbx, %r13
jne 0x1f201
movslq 0x34(%rsp), %rbx
testq %rbx, %rbx
jle 0x1f5e3
movq 0x38(%rsp), %rax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rax
movq %rax, 0x38(%rsp)
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
xorl %r13d, %r13d
leaq 0xe20(%rsp), %r15
movq %rbx, 0x28(%rsp)
movq 0x2940(%rsp,%r13,8), %rbp
movq %rbp, %rdi
callq 0x19d00
testl %r12d, %r12d
js 0x1f3f1
movl %r12d, %edi
callq 0x19e5b
testl %eax, %eax
jne 0x1f3fd
callq 0x19ebc
movl %eax, %r12d
testl %eax, %eax
js 0x1f412
movq %rbp, %rdi
callq 0x1a145
incq %r13
cmpq %rbx, %r13
jne 0x1f3d0
jmp 0x1f5e3
subq $0x8, %rsp
movq %rbp, %rdi
leaq 0x1da8(%rsp), %rbx
movq %rbx, %rsi
leaq 0x28(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %r15, %r8
leaq 0x24(%rsp), %r9
leaq 0x1c(%rsp), %rax
pushq %rax
callq 0x19f39
addq $0x10, %rsp
movl 0x18(%rsp), %edx
movl 0x14(%rsp), %r9d
movl %r9d, %eax
addl %edx, %eax
jle 0x1f58d
movl 0x20(%rsp), %esi
movl 0x1c(%rsp), %r8d
subq $0x8, %rsp
movq %rbx, %rdi
movq %r15, %rcx
leaq 0x14(%rsp), %rax
pushq %rax
leaq 0x20(%rsp), %rax
pushq %rax
leaq 0x8771(%rip), %rax      # 0x27bf0
pushq %rax
callq 0xc7bb
addq $0x20, %rsp
testl %eax, %eax
je 0x1f597
cmpl $0x0, 0x8(%rsp)
movq 0x28(%rsp), %rbx
jle 0x1f5a9
movq 0x18(%rbp), %rcx
movq 0x28(%rbp), %rax
movq 0x18(%rcx), %rcx
movq 0x28(%rcx), %rcx
xorl %edx, %edx
xorl %r9d, %r9d
movq 0x38(%rsp), %r10
leaq 0xe20(%rsp), %r15
movq (%r14,%rdx), %rsi
cmpq %rax, %rsi
je 0x1f50e
movq 0x8(%r14,%rdx), %rdi
cmpq %rax, %rdi
je 0x1f50e
movq 0x10(%r14,%rdx), %r8
cmpq %rax, %r8
je 0x1f50e
cmpq %rcx, %rsi
je 0x1f50e
cmpq %rcx, %rdi
je 0x1f50e
cmpq %rcx, %r8
je 0x1f50e
leaq (%r14,%rdx), %rsi
movslq %r9d, %rdi
incl %r9d
leaq (%rdi,%rdi,2), %rdi
movq 0x10(%rsi), %r8
movq %r8, 0x60(%rsp,%rdi,8)
movups (%rsi), %xmm0
movups %xmm0, 0x50(%rsp,%rdi,8)
addq $0x18, %rdx
cmpq %rdx, %r10
jne 0x1f4c3
testl %r9d, %r9d
je 0x1f5b6
movq 0x10(%rbp), %rax
addq $0x10, %rax
xorl %ecx, %ecx
movq (%rax), %rdx
movq 0x18(%rdx), %rax
movq 0x20(%rdx), %rdi
movl 0x4(%rax), %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 0x1f580
cmpl %esi, 0x4(%r8)
jne 0x1f548
movq 0x28(%r8), %rsi
movslq %r9d, %r9
leaq (%r9,%r9,2), %rdi
movq %rsi, 0x50(%rsp,%rdi,8)
movq 0x10(%rdx), %rdx
movq 0x28(%rdx), %rdx
movq %rdx, 0x58(%rsp,%rdi,8)
movq 0x28(%rax), %rdx
movq %rdx, 0x60(%rsp,%rdi,8)
incl %r9d
addq $0x18, %rax
incl %ecx
cmpl $0x3, %ecx
jne 0x1f52a
jmp 0x1f5b9
movq 0x28(%rsp), %rbx
jmp 0x1f3fd
movq 0x28(%rsp), %rbx
leaq 0xe20(%rsp), %r15
jmp 0x1f3fd
xorl %r9d, %r9d
leaq 0xe20(%rsp), %r15
jmp 0x1f5b9
xorl %r9d, %r9d
movl 0x10(%rsp), %edi
movl 0xc(%rsp), %esi
movl 0x225049(%rip), %eax    # 0x244610
xorl %edx, %edx
cmpl 0x8415(%rip), %eax      # 0x279e4
sete %dl
xorl %ecx, %ecx
leaq 0x50(%rsp), %r8
callq 0x1efbc
jmp 0x1f3fd
movslq 0x48(%rsp), %r12
testq %r12, %r12
jle 0x1f758
movl 0x8(%rsp), %ecx
movslq %ecx, %rax
leaq (%rax,%rax,2), %rax
leaq (%r14,%rax,8), %rbp
incl %ecx
movl %ecx, 0x8(%rsp)
xorl %ebx, %ebx
leaq 0x85e1(%rip), %r13      # 0x27bf0
movq 0x19c0(%rsp,%rbx,8), %r15
movq %r15, %rdi
callq 0x1a20b
movslq 0x224fea(%rip), %rax    # 0x244610
testq %rax, %rax
jle 0x1f641
shlq $0x2, %rax
xorl %ecx, %ecx
cmpl $0x5, (%rcx,%r13)
je 0x1f64a
addq $0x4, %rcx
cmpq %rcx, %rax
jne 0x1f631
callq 0x19ebc
testl %eax, %eax
js 0x1f65f
movq %r15, %rdi
callq 0x1a54c
incq %rbx
cmpq %r12, %rbx
jne 0x1f60f
jmp 0x1f758
subq $0x8, %rsp
movq %r15, %rdi
leaq 0x1da8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
leaq 0x20(%rsp), %rcx
leaq 0xe28(%rsp), %r8
leaq 0x24(%rsp), %r9
leaq 0x1c(%rsp), %rax
pushq %rax
callq 0x1a36f
addq $0x10, %rsp
movl 0x18(%rsp), %edx
movl 0x14(%rsp), %r9d
movl %r9d, %eax
addl %edx, %eax
jle 0x1f64a
movl 0x20(%rsp), %esi
movl 0x1c(%rsp), %r8d
subq $0x8, %rsp
leaq 0x1da8(%rsp), %rdi
leaq 0xe28(%rsp), %rcx
leaq 0x14(%rsp), %rax
pushq %rax
leaq 0x20(%rsp), %rax
pushq %rax
leaq 0x49149c(%rip), %rax    # 0x4b0b70
pushq %rax
callq 0xc7bb
addq $0x20, %rsp
testl %eax, %eax
je 0x1f64a
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 0x224ee4(%rip), %eax    # 0x244610
movl 0x82b2(%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 0x8(%rsp), %r9d
callq 0x1efbc
jmp 0x1f64a
cmpl $0x0, 0x44(%rsp)
je 0x1f783
movslq 0x224eaa(%rip), %rdx    # 0x244610
testq %rdx, %rdx
jle 0x1f783
shlq $0x3, %rdx
leaq 0x827a(%rip), %rdi      # 0x279f0
leaq 0x650(%rsp), %rsi
callq 0x1070
addq $0x34e8, %rsp           # imm = 0x34E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq