// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
pushq %rbx
subq $0x3528, %rsp           # imm = 0x3528
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movl 0x224299(%rip), %eax    # 0x25a620
cmpl 0x5ef3(%rip), %eax      # 0x3c280
jne 0x363ae
movl -0xc(%rbp), %edi
movl -0x10(%rbp), %esi
cmpl $0x0, -0x2c(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %edx
addl $0x3, %edx
callq 0x8080
jmp 0x36b8c
cmpl $0x0, -0x14(%rbp)
je 0x3642a
movl 0x26a876(%rip), %eax    # 0x2a0c30
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, 0x26a86b(%rip)    # 0x2a0c30
cmpl $0x0, %eax
je 0x363cf
jmp 0x36b8c
movl 0x5ea7(%rip), %eax      # 0x3c27c
subl $0x1, %eax
movl %eax, 0x26a852(%rip)    # 0x2a0c30
movl $0x0, -0x34f4(%rbp)
movl -0x34f4(%rbp), %eax
cmpl 0x22422c(%rip), %eax    # 0x25a620
jge 0x36428
movslq -0x34f4(%rbp), %rcx
leaq 0x75fc(%rip), %rax      # 0x3da00
movq (%rax,%rcx,8), %rcx
movslq -0x34f4(%rbp), %rax
movq %rcx, -0x230(%rbp,%rax,8)
movl -0x34f4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34f4(%rbp)
jmp 0x363e8
jmp 0x3642a
movl -0xc(%rbp), %edi
movl -0x10(%rbp), %esi
leaq -0x800(%rbp), %rdx
leaq -0x13a0(%rbp), %r8
leaq -0x1780(%rbp), %r11
movq -0x20(%rbp), %rax
leaq -0x34e8(%rbp), %rcx
leaq -0x34ec(%rbp), %r9
leaq -0x34f0(%rbp), %r10
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x28650
movl 0x2241a9(%rip), %eax    # 0x25a620
movl 0x5e03(%rip), %ecx      # 0x3c280
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x364bc
cmpl $0x0, -0x2c(%rbp)
jle 0x364bc
cmpl $0x4, 0x5c1f(%rip)      # 0x3c0b0
jne 0x364bc
leaq -0x800(%rbp), %rdi
leaq -0x13a0(%rbp), %rdx
movq -0x28(%rbp), %r8
movl -0x2c(%rbp), %r9d
leaq -0x34e8(%rbp), %rsi
leaq -0x34ec(%rbp), %rcx
callq 0x36ba0
movl $0x0, -0x34f4(%rbp)
movl -0x34f4(%rbp), %eax
cmpl -0x34e8(%rbp), %eax
jge 0x36738
movslq -0x34f4(%rbp), %rax
movq -0x800(%rbp,%rax,8), %rdi
callq 0x28d80
movslq -0x34f4(%rbp), %rax
movq -0x800(%rbp,%rax,8), %rdi
leaq -0x2320(%rbp), %rsi
leaq -0x2ec0(%rbp), %r8
leaq -0x34d8(%rbp), %rdx
leaq -0x34e0(%rbp), %rcx
leaq -0x34dc(%rbp), %r9
leaq -0x34e4(%rbp), %rax
movq %rax, (%rsp)
callq 0x28fe0
movl -0x34e0(%rbp), %eax
addl -0x34e4(%rbp), %eax
cmpl $0x0, %eax
jle 0x36710
movl 0x2240d7(%rip), %eax    # 0x25a620
cmpl 0x5d31(%rip), %eax      # 0x3c280
jne 0x365c2
cmpl $0x0, 0x7498(%rip)      # 0x3d9f0
jne 0x365c2
movl -0x34d8(%rbp), %eax
cmpl -0x34e0(%rbp), %eax
jne 0x365c2
movl -0x34dc(%rbp), %eax
cmpl -0x34e4(%rbp), %eax
jne 0x365c2
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
movslq -0x34f4(%rbp), %rax
movq -0x800(%rbp,%rax,8), %rdx
leaq -0x34d0(%rbp), %rcx
leaq -0x34d4(%rbp), %r8
callq 0x36de0
cmpl $0x0, -0x34d4(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %edx
addl $0x3, %edx
movl $0x1, %esi
movl %esi, %edi
callq 0x8080
jmp 0x3670e
movl -0x34d8(%rbp), %eax
addl -0x34dc(%rbp), %eax
cmpl $0x1, %eax
jne 0x3663e
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
movslq -0x34f4(%rbp), %rax
movq -0x800(%rbp,%rax,8), %rdx
leaq -0x34d0(%rbp), %rcx
leaq -0x34d4(%rbp), %r8
callq 0x36de0
movl 0x22401e(%rip), %eax    # 0x25a620
cmpl 0x73ec(%rip), %eax      # 0x3d9f4
sete %al
andb $0x1, %al
movzbl %al, %edx
movslq -0x34f4(%rbp), %rax
movq -0x800(%rbp,%rax,8), %rcx
leaq -0x34d0(%rbp), %r8
movl -0x34d4(%rbp), %r9d
movl $0x1, %esi
movl %esi, %edi
callq 0x36360
jmp 0x3670c
leaq -0x2320(%rbp), %rdi
movl -0x34d8(%rbp), %esi
movl -0x34e0(%rbp), %edx
leaq -0x2ec0(%rbp), %rcx
movl -0x34dc(%rbp), %r8d
movl -0x34e4(%rbp), %r9d
leaq 0x7593(%rip), %rbx      # 0x3dc00
leaq 0x768c(%rip), %r11      # 0x3dd00
leaq -0x34f8(%rbp), %r10
leaq -0x34fc(%rbp), %rax
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0xf4b0
cmpl $0x0, %eax
je 0x3670a
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
movslq -0x34f4(%rbp), %rax
movq -0x800(%rbp,%rax,8), %rdx
leaq -0x34d0(%rbp), %rcx
leaq -0x34d4(%rbp), %r8
callq 0x36de0
movl -0x34f8(%rbp), %edi
movl -0x34fc(%rbp), %esi
movl 0x223f46(%rip), %eax    # 0x25a620
cmpl 0x7314(%rip), %eax      # 0x3d9f4
sete %al
andb $0x1, %al
movzbl %al, %edx
movslq -0x34f4(%rbp), %rax
movq -0x800(%rbp,%rax,8), %rcx
leaq -0x34d0(%rbp), %r8
movl -0x34d4(%rbp), %r9d
callq 0x36360
jmp 0x3670c
jmp 0x3670e
jmp 0x36710
movslq -0x34f4(%rbp), %rax
movq -0x800(%rbp,%rax,8), %rdi
callq 0x29760
movl -0x34f4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34f4(%rbp)
jmp 0x364c6
movl $0xffffffff, -0x3500(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x34f4(%rbp)
movl -0x34f4(%rbp), %eax
cmpl -0x34ec(%rbp), %eax
jge 0x368e7
movslq -0x34f4(%rbp), %rax
movq -0x13a0(%rbp,%rax,8), %rdi
callq 0x298e0
cmpl $0x0, -0x3500(%rbp)
jl 0x3678b
movl -0x3500(%rbp), %edi
callq 0x29c20
cmpl $0x0, %eax
jne 0x36796
callq 0x29cd0
movl %eax, -0x3500(%rbp)
cmpl $0x0, -0x3500(%rbp)
jge 0x368bf
movslq -0x34f4(%rbp), %rax
movq -0x13a0(%rbp,%rax,8), %rdi
leaq -0x2320(%rbp), %rsi
leaq -0x2ec0(%rbp), %r8
leaq -0x34d8(%rbp), %rdx
leaq -0x34e0(%rbp), %rcx
leaq -0x34dc(%rbp), %r9
leaq -0x34e4(%rbp), %rax
movq %rax, (%rsp)
callq 0x29da0
movl -0x34e0(%rbp), %eax
addl -0x34e4(%rbp), %eax
cmpl $0x0, %eax
jle 0x368bd
leaq -0x2320(%rbp), %rdi
movl -0x34d8(%rbp), %esi
movl -0x34e0(%rbp), %edx
leaq -0x2ec0(%rbp), %rcx
movl -0x34dc(%rbp), %r8d
movl -0x34e4(%rbp), %r9d
leaq 0x73d7(%rip), %rbx      # 0x3dc00
leaq 0x74d0(%rip), %r11      # 0x3dd00
leaq -0x34f8(%rbp), %r10
leaq -0x34fc(%rbp), %rax
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0xf4b0
cmpl $0x0, %eax
je 0x368bb
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
movslq -0x34f4(%rbp), %rax
movq -0x13a0(%rbp,%rax,8), %rdx
leaq -0x34d0(%rbp), %rcx
leaq -0x34d4(%rbp), %r8
callq 0x36fa0
movl -0x34f8(%rbp), %edi
movl -0x34fc(%rbp), %esi
movl 0x223d8a(%rip), %eax    # 0x25a620
cmpl 0x7158(%rip), %eax      # 0x3d9f4
sete %al
andb $0x1, %al
movzbl %al, %edx
leaq -0x34d0(%rbp), %r8
movl -0x34d4(%rbp), %r9d
xorl %eax, %eax
movl %eax, %ecx
callq 0x36360
jmp 0x368bd
jmp 0x368bf
movslq -0x34f4(%rbp), %rax
movq -0x13a0(%rbp,%rax,8), %rdi
callq 0x2a190
movl -0x34f4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34f4(%rbp)
jmp 0x3674c
movl $0x0, -0x34f4(%rbp)
movl -0x34f4(%rbp), %eax
cmpl -0x34f0(%rbp), %eax
jge 0x36b3a
movslq -0x34f4(%rbp), %rax
movq -0x1780(%rbp,%rax,8), %rdi
callq 0x2a3a0
callq 0x2a690
cmpl $0x0, %eax
jge 0x36b12
callq 0x29cd0
cmpl $0x0, %eax
jge 0x36b12
movslq -0x34f4(%rbp), %rax
movq -0x1780(%rbp,%rax,8), %rdi
leaq -0x2320(%rbp), %rsi
leaq -0x2ec0(%rbp), %r8
leaq -0x34d8(%rbp), %rdx
leaq -0x34e0(%rbp), %rcx
leaq -0x34dc(%rbp), %r9
leaq -0x34e4(%rbp), %rax
movq %rax, (%rsp)
callq 0x2a6e0
movl -0x34e0(%rbp), %eax
addl -0x34e4(%rbp), %eax
cmpl $0x0, %eax
jle 0x36b10
leaq -0x2320(%rbp), %rdi
movl -0x34d8(%rbp), %esi
movl -0x34e0(%rbp), %edx
leaq -0x2ec0(%rbp), %rcx
movl -0x34dc(%rbp), %r8d
movl -0x34e4(%rbp), %r9d
leaq 0x4901c7(%rip), %rbx    # 0x4c6b80
leaq 0x7340(%rip), %r11      # 0x3dd00
leaq -0x34f8(%rbp), %r10
leaq -0x34fc(%rbp), %rax
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0xf4b0
cmpl $0x0, %eax
je 0x36b0e
movslq -0x34f4(%rbp), %rax
movq -0x1780(%rbp,%rax,8), %rax
movq %rax, -0x2ec8(%rbp)
movq -0x2ec8(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x2ec8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x2ec8(%rbp)
movq -0x2ec8(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x2ec8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x2ec8(%rbp)
movq -0x2ec8(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movl -0x34f8(%rbp), %eax
movl %eax, -0x350c(%rbp)
movl -0x34fc(%rbp), %eax
movl %eax, -0x3508(%rbp)
movl 0x223b68(%rip), %ecx    # 0x25a620
xorl %eax, %eax
cmpl 0x6f34(%rip), %ecx      # 0x3d9f4
movb %al, -0x3501(%rbp)
jl 0x36ae2
movl 0x223b52(%rip), %eax    # 0x25a620
movl 0x6f20(%rip), %ecx      # 0x3d9f4
addl $0x2, %ecx
cmpl %ecx, %eax
setle %al
movb %al, -0x3501(%rbp)
movl -0x3508(%rbp), %esi
movl -0x350c(%rbp), %edi
movb -0x3501(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
movq -0x28(%rbp), %r8
movl -0x2c(%rbp), %r9d
addl $0x1, %r9d
xorl %eax, %eax
movl %eax, %ecx
callq 0x36360
jmp 0x36b10
jmp 0x36b12
movslq -0x34f4(%rbp), %rax
movq -0x1780(%rbp,%rax,8), %rdi
callq 0x2aad0
movl -0x34f4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34f4(%rbp)
jmp 0x368f1
cmpl $0x0, -0x14(%rbp)
je 0x36b8c
movl $0x0, -0x34f4(%rbp)
movl -0x34f4(%rbp), %eax
cmpl 0x223aca(%rip), %eax    # 0x25a620
jge 0x36b8a
movslq -0x34f4(%rbp), %rax
movq -0x230(%rbp,%rax,8), %rdx
movslq -0x34f4(%rbp), %rcx
leaq 0x6e8b(%rip), %rax      # 0x3da00
movq %rdx, (%rax,%rcx,8)
movl -0x34f4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34f4(%rbp)
jmp 0x36b4a
jmp 0x36b8c
addq $0x3528, %rsp           # imm = 0x3528
popq %rbx
popq %rbp
retq
nopw %cs:(%rax,%rax)