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

/* The main node of the recursion for bipartite triangulations with
   monitoring of 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 wheelrim != NULL, the input is a double wheel and *wheelrim is
   one of the edges on the rim.
   If dosplit==TRUE, this is the place to do splitting (if any).
   Splitting is a bit more complicated because the P operation adds
   two vertices.
   Pedges[0..nPedges-1] are edges of the graph that were reference
   edges for P-operations in ancestors of this graph.  They may not
   be reference edges for P-reductions now, but at least they are edges.
   However, if nPedges>0, we can say that certainly Pedges[nPedges-1]
   is a P-operation that was just done.
   nft[0..numnft-1] is a list of the non-facial triangles.
*/
{
    EDGE *firstedge_save[MAXN];
    EDGE *extP[MAXE],*extQ[MAXE];
    EDGE *good_or[MAXE],*good_mir[MAXE];
    int ngood_or,ngood_mir,ngood_ref,ngood_mir_ref;
    int nextP,nextQ,i;
    int xnbtot,xnbop;
    EDGE *hint,*newPedges[MAXN/2];
    triangle newnft[MAXN];
    int newnumnft,connec;

    if (nv == maxnv)
    {
	connec = 3 + (numnft==0);
	if (connec >= minconnec) got_one(nbtot,nbop,connec);
	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_BIP
    if (!(PRE_FILTER_BIP)) return;
#endif

#ifndef FIND_EXTENSIONS_BIP
#define FIND_EXTENSIONS_BIP find_extensions_bip
#endif

    FIND_EXTENSIONS_BIP(nbtot,nbop,extP,&nextP,extQ,&nextQ,Pedges,nPedges);

    if (nv == maxnv-2 && numnft > 0 && minconnec == 4)
        bipnftlaststep(extP,&nextP,nft,numnft);

    if (wheelrim && nv <= maxnv-2)
    {
        extend_bip_P(wheelrim);
#ifdef FAST_FILTER_BIP
        if (FAST_FILTER_BIP)
#endif  
        {
            canon(degree,numbering,&xnbtot,&xnbop);
            scanbipartite4c(xnbtot,xnbop,wheelrim,
                     nv==splitlevel||nv==splitlevel+1,Pedges,0,nft,numnft);
	}
        reduce_bip_P(wheelrim);
    }

    for (i = 0; i < nextP; ++i)
    {
        extend_bip_P(extP[i]);
#ifdef FAST_FILTER_BIP
        if (FAST_FILTER_BIP)
#endif 
        {
	    bip_P_legal(extP[i],good_or,&ngood_or,&ngood_ref,
		        good_mir,&ngood_mir,&ngood_mir_ref,
		        nPedges?Pedges[nPedges-1]:NULL);
            if (ngood_ref+ngood_mir_ref > 0)
	    {
	        if (nv == maxnv && !needgroup && ngood_or == ngood_ref
                                                && ngood_mir == ngood_mir_ref)
	        {
		    update_nft_P(nft,numnft,extP[i],newnft,&newnumnft);
		    connec = 3 + (newnumnft==0);
		    if (connec >= minconnec) got_one(1,1,connec);
	        }
	        else if (ngood_or+ngood_mir==1)
	        {
		    update_nft_P(nft,numnft,extP[i],newnft,&newnumnft);
    		    Pedges[nPedges] = extP[i];
    		    scanbipartite4c(1,1,NULL,nv==splitlevel||nv==splitlevel+1,
			            Pedges,nPedges+1,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_P(nft,numnft,extP[i],newnft,&newnumnft);
		    Pedges[nPedges] = extP[i];
	            scanbipartite4c(xnbtot,xnbop,NULL,
			            nv==splitlevel||nv==splitlevel+1,
				    Pedges,nPedges+1,newnft,newnumnft);
	        }
	    }
	}
	reduce_bip_P(extP[i]);
    }

    hint = NULL;
    for (i = 0; i < nextQ; ++i)
    {
        extend_bip_Q(extQ[i]);
#ifdef FAST_FILTER_BIP
        if (FAST_FILTER_BIP)
#endif 
        {
            if (!hint || !is_bip_P(hint)) hint = has_bip_P();

            if (!hint)
	    {
	        bip_Q_legal(extQ[i],good_or,&ngood_or,&ngood_ref,
                            good_mir,&ngood_mir,&ngood_mir_ref);
                if (ngood_ref+ngood_mir_ref > 0
                    && canon_edge_oriented(good_or,ngood_or,ngood_ref,
                                           good_mir,ngood_mir,ngood_mir_ref,
                                           degree,numbering,&xnbtot,&xnbop))
	        {
		    update_nft_Q(nft,numnft,extQ[i],newnft,&newnumnft);
		    scanbipartite4c(xnbtot,xnbop,NULL,nv==splitlevel,
				    newPedges,0,newnft,newnumnft);
	        }
	    }
	}
	reduce_bip_Q(extQ[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 $0x37e8, %rsp           # imm = 0x37E8
movq %r9, 0x40(%rsp)
movq %r8, 0x38(%rsp)
movl %esi, %ebp
movl %edi, %r14d
movl 0x3828(%rsp), %eax
movl 0x2286cc(%rip), %r12d   # 0x244610
movl 0xa326(%rip), %ebx      # 0x26270
cmpl %ebx, %r12d
jne 0x1bf7e
xorl %edx, %edx
cmpl $0x1, %eax
adcl $0x3, %edx
cmpl 0xa153(%rip), %edx      # 0x260b0
jl 0x1c648
movl %r14d, %edi
movl %ebp, %esi
addq $0x37e8, %rsp           # imm = 0x37E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x76f0
movl %ecx, %r13d
movq %rax, 0x30(%rsp)
movq 0x3820(%rsp), %r15
testl %ecx, %ecx
je 0x1bfd8
subl $0x1, 0x26ec87(%rip)    # 0x28ac20
jae 0x1c648
movl 0xa2c7(%rip), %eax      # 0x2626c
decl %eax
movl %eax, 0x26ec73(%rip)    # 0x28ac20
testl %r12d, %r12d
jle 0x1bfd8
movq %rdx, 0x10(%rsp)
leaq (,%r12,8), %rdx
leaq 0xba2a(%rip), %rsi      # 0x279f0
leaq 0x760(%rsp), %rdi
callq 0x1080
movq 0x10(%rsp), %rdx
movq %rdx, 0x10(%rsp)
leaq 0x20a0(%rsp), %rdx
leaq 0x1c(%rsp), %rcx
leaq 0x2c40(%rsp), %r8
leaq 0x54(%rsp), %r9
movl %r14d, %edi
movl %ebp, %esi
pushq 0x40(%rsp)
pushq 0x40(%rsp)
callq 0x1ca5f
addq $0x10, %rsp
addl $-0x2, %ebx
movq 0x30(%rsp), %rax
movl %eax, %r11d
testl %eax, %eax
jle 0x1c0f0
cmpl %ebx, %r12d
jne 0x1c0f0
cmpl $0x4, 0xa080(%rip)      # 0x260b0
jne 0x1c0f0
movl 0xa058(%rip), %edx      # 0x26094
movl 0x1c(%rsp), %esi
xorl %eax, %eax
leaq 0x2285d7(%rip), %rcx    # 0x244620
cmpl $0x752f, %edx           # imm = 0x752F
jl 0x1c071
movl $0x30, %edx
movl $0x0, (%rdx,%rcx)
addq $0x40, %rdx
cmpq $0x46630, %rdx          # imm = 0x46630
jne 0x1c056
movl $0x2, %edx
jmp 0x1c074
addl $0x2, %edx
leaq (%rax,%rax,2), %rdi
movq (%r15,%rdi,8), %r8
movl %edx, 0x30(%r8)
movq 0x20(%r8), %r8
movl %edx, 0x30(%r8)
movq 0x8(%r15,%rdi,8), %r8
movl %edx, 0x30(%r8)
movq 0x20(%r8), %r8
movl %edx, 0x30(%r8)
movq 0x10(%r15,%rdi,8), %rdi
movl %edx, 0x30(%rdi)
movq 0x20(%rdi), %rdi
movl %edx, 0x30(%rdi)
xorl %edi, %edi
testl %esi, %esi
jle 0x1c0d8
movl %esi, %esi
xorl %r8d, %r8d
xorl %edi, %edi
movq 0x20a0(%rsp,%r8,8), %r9
cmpl %edx, 0x30(%r9)
jne 0x1c0d0
movslq %edi, %r10
incl %edi
movq %r9, 0x20a0(%rsp,%r10,8)
incq %r8
cmpq %r8, %rsi
jne 0x1c0b5
incq %rax
movl %edi, %esi
cmpq %r11, %rax
jne 0x1c049
movl %edi, 0x1c(%rsp)
movl %edx, 0x9fa4(%rip)      # 0x26094
movq %r11, 0x58(%rsp)
movl %r13d, 0x50(%rsp)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
sete %al
cmpl %ebx, %r12d
setg %cl
orb %al, %cl
jne 0x1c178
movq %rdi, %rbx
callq 0x1d1a5
leaq 0xbad2(%rip), %rdi      # 0x27bf0
leaq 0xc(%rsp), %r14
leaq 0x8(%rsp), %rbp
movq %r14, %rsi
movq %rbp, %rdx
callq 0x6408
movl (%r14), %edi
movl (%rbp), %esi
movl 0x2284d1(%rip), %eax    # 0x244610
movl 0xb89f(%rip), %ecx      # 0x279e4
cmpl %ecx, %eax
sete %dl
incl %ecx
cmpl %ecx, %eax
sete %al
orb %dl, %al
movzbl %al, %ecx
movq %rbx, %rdx
movq 0x38(%rsp), %r8
xorl %r9d, %r9d
pushq 0x30(%rsp)
pushq %r15
callq 0x1bf16
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x1d2eb
movslq 0x1c(%rsp), %rbp
testq %rbp, %rbp
jle 0x1c391
movq 0x40(%rsp), %rax
movslq %eax, %rcx
movq %rcx, 0x10(%rsp)
incl %eax
movl %eax, 0x4c(%rsp)
xorl %r12d, %r12d
movq 0x20a0(%rsp,%r12,8), %r14
movq %r14, %rdi
callq 0x1d1a5
cmpl $0x0, 0x40(%rsp)
je 0x1c1c4
movq 0x38(%rsp), %rax
movq 0x10(%rsp), %rcx
movq -0x8(%rax,%rcx,8), %rax
jmp 0x1c1c6
xorl %eax, %eax
movq %r14, %rdi
leaq 0x1500(%rsp), %rsi
leaq 0x2c(%rsp), %rdx
leaq 0x24(%rsp), %rcx
leaq 0x960(%rsp), %r8
leaq 0x28(%rsp), %r9
pushq %rax
leaq 0x28(%rsp), %rax
pushq %rax
callq 0x1d39a
addq $0x10, %rsp
movl 0x24(%rsp), %edx
movl 0x20(%rsp), %r9d
movl %r9d, %eax
addl %edx, %eax
jle 0x1c37d
movl 0x2283fd(%rip), %r13d   # 0x244610
movl 0xa057(%rip), %eax      # 0x26270
xorl %r13d, %eax
orl 0xb7be(%rip), %eax      # 0x279e0
movl 0x2c(%rsp), %esi
movl %esi, %ecx
xorl %edx, %ecx
orl %eax, %ecx
movl 0x28(%rsp), %r8d
movl %r8d, %eax
xorl %r9d, %eax
orl %ecx, %eax
jne 0x1c282
movq %r15, %rdi
movq 0x30(%rsp), %rsi
movq %r14, %rdx
leaq 0x60(%rsp), %rcx
leaq 0x4(%rsp), %r8
callq 0x1d79e
cmpl $0x1, 0x4(%rsp)
movl $0x0, %edx
adcl $0x3, %edx
cmpl 0x9e48(%rip), %edx      # 0x260b0
jl 0x1c37d
movl $0x1, %edi
movl $0x1, %esi
callq 0x76f0
jmp 0x1c37d
leal (%r8,%rsi), %eax
cmpl $0x1, %eax
jne 0x1c2e2
movq %r15, %rdi
movq 0x30(%rsp), %rsi
movq %r14, %rdx
leaq 0x60(%rsp), %rbx
movq %rbx, %rcx
leaq 0x4(%rsp), %r8
callq 0x1d79e
movq 0x38(%rsp), %r8
movq 0x10(%rsp), %rax
movq %r14, (%r8,%rax,8)
movl 0xb728(%rip), %eax      # 0x279e4
cmpl %eax, %r13d
sete %cl
incl %eax
cmpl %eax, %r13d
sete %al
orb %cl, %al
movzbl %al, %ecx
movl 0x4(%rsp), %eax
movl $0x1, %edi
movl $0x1, %esi
jmp 0x1c36b
subq $0x8, %rsp
leaq 0x1508(%rsp), %rdi
leaq 0x968(%rsp), %rcx
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x1c(%rsp), %rax
pushq %rax
leaq 0xb8e7(%rip), %rax      # 0x27bf0
pushq %rax
callq 0xc654
addq $0x20, %rsp
testl %eax, %eax
je 0x1c37d
movq %r15, %rdi
movq 0x30(%rsp), %rsi
movq %r14, %rdx
leaq 0x60(%rsp), %rbx
movq %rbx, %rcx
leaq 0x4(%rsp), %r8
callq 0x1d79e
movq 0x38(%rsp), %r8
movq 0x10(%rsp), %rax
movq %r14, (%r8,%rax,8)
movl 0xc(%rsp), %edi
movl 0x8(%rsp), %esi
movl 0x2282c0(%rip), %eax    # 0x244610
movl 0xb68e(%rip), %ecx      # 0x279e4
cmpl %ecx, %eax
sete %dl
incl %ecx
cmpl %ecx, %eax
sete %al
orb %dl, %al
movzbl %al, %ecx
movl 0x4(%rsp), %eax
xorl %edx, %edx
movl 0x4c(%rsp), %r9d
pushq %rax
pushq %rbx
callq 0x1bf16
addq $0x10, %rsp
movq %r14, %rdi
callq 0x1d2eb
incq %r12
cmpq %r12, %rbp
jne 0x1c19c
movslq 0x54(%rsp), %r14
testq %r14, %r14
jle 0x1c61d
movq 0x58(%rsp), %rax
shlq $0x3, %rax
leaq (%rax,%rax,2), %r12
xorl %ebx, %ebx
xorl %ebp, %ebp
movq %r14, 0x40(%rsp)
movq 0x2c40(%rsp,%rbx,8), %r13
movq %r13, %rdi
callq 0x1d880
testq %rbp, %rbp
je 0x1c3d6
movq %rbp, %rdi
callq 0x1d9ef
testl %eax, %eax
jne 0x1c3de
callq 0x1da73
movq %rax, %rbp
testq %rbp, %rbp
je 0x1c3f8
movq %r13, %rdi
callq 0x1dd64
incq %rbx
cmpq %r14, %rbx
jne 0x1c3b5
jmp 0x1c61d
subq $0x8, %rsp
movq %r13, %rdi
leaq 0x1508(%rsp), %rsi
leaq 0x34(%rsp), %rdx
leaq 0x2c(%rsp), %rcx
leaq 0x968(%rsp), %r8
leaq 0x30(%rsp), %r9
leaq 0x28(%rsp), %rax
pushq %rax
callq 0x1db58
addq $0x10, %rsp
movl 0x24(%rsp), %edx
movl 0x20(%rsp), %r9d
movl %r9d, %eax
addl %edx, %eax
jle 0x1c3e3
movl 0x2c(%rsp), %esi
movl 0x28(%rsp), %r8d
subq $0x8, %rsp
leaq 0x1508(%rsp), %rdi
leaq 0x968(%rsp), %rcx
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x1c(%rsp), %rax
pushq %rax
leaq 0xb783(%rip), %rax      # 0x27bf0
pushq %rax
callq 0xc654
addq $0x20, %rsp
testl %eax, %eax
je 0x1c3e3
movq 0x18(%r13), %rsi
movq 0x28(%r13), %r9
movq 0x28(%rsi), %rcx
cmpl $0x0, 0x30(%rsp)
jle 0x1c4ec
xorl %edx, %edx
xorl %eax, %eax
movq (%r15,%rdx), %rdi
cmpq %r9, %rdi
je 0x1c4e1
movq 0x8(%r15,%rdx), %r8
cmpq %r9, %r8
je 0x1c4e1
movq 0x10(%r15,%rdx), %r10
cmpq %r9, %r10
je 0x1c4e1
cmpq %rcx, %rdi
je 0x1c4e1
cmpq %rcx, %r8
je 0x1c4e1
cmpq %rcx, %r10
je 0x1c4e1
leaq (%r15,%rdx), %rdi
movslq %eax, %r8
incl %eax
leaq (%r8,%r8,2), %r8
movq 0x10(%rdi), %r10
movq %r10, 0x70(%rsp,%r8,8)
movups (%rdi), %xmm0
movups %xmm0, 0x60(%rsp,%r8,8)
addq $0x18, %rdx
cmpq %rdx, %r12
jne 0x1c496
jmp 0x1c4ee
xorl %eax, %eax
movl 0x4(%r13), %r11d
movq 0x18(%rsi), %r10
movq 0x20(%r10), %rdx
movq 0x10(%rdx), %rdx
movq 0x10(%rdx), %rdx
movq 0x18(%rdx), %rdi
movq 0x18(%rdi), %r8
movq 0x18(%r8), %r14
movq %r14, %r8
movq 0x18(%r8), %r8
cmpq %rdx, %r8
je 0x1c53f
cmpl %r11d, 0x4(%r8)
jne 0x1c511
movq 0x28(%r8), %r8
cltq
leaq (%rax,%rax,2), %r11
movq %r8, 0x60(%rsp,%r11,8)
movq %r9, 0x68(%rsp,%r11,8)
movq 0x28(%r10), %r8
movq %r8, 0x70(%rsp,%r11,8)
incl %eax
movl 0x4(%rsi), %esi
movq 0x20(%r13), %r8
movq 0x18(%r8), %r8
movq 0x20(%r8), %r9
movq 0x18(%r9), %r8
movq 0x18(%r8), %r8
movq 0x18(%r8), %r10
movq 0x18(%r10), %r10
cmpq %r9, %r10
je 0x1c58c
cmpl %esi, 0x4(%r10)
jne 0x1c55a
movq 0x28(%r10), %rsi
cltq
leaq (%rax,%rax,2), %r8
movq %rsi, 0x60(%rsp,%r8,8)
movq %rcx, 0x68(%rsp,%r8,8)
movq 0x10(%r13), %rcx
movq 0x28(%rcx), %rcx
movq %rcx, 0x70(%rsp,%r8,8)
incl %eax
cmpq %rdx, %r14
je 0x1c5d9
movq 0x10(%r13), %rcx
movl 0x4(%rcx), %ecx
movq 0x20(%r14), %r8
movq %r8, %rsi
movq 0x18(%rsi), %rsi
cmpq %r8, %rsi
je 0x1c5d0
cmpl %ecx, 0x4(%rsi)
jne 0x1c59f
movq 0x28(%rdi), %r8
cltq
leaq (%rax,%rax,2), %r9
movq %r8, 0x60(%rsp,%r9,8)
movq 0x28(%r14), %r8
movq %r8, 0x68(%rsp,%r9,8)
movq 0x28(%rsi), %rsi
movq %rsi, 0x70(%rsp,%r9,8)
incl %eax
movq 0x18(%r14), %r14
cmpq %rdx, %r14
jne 0x1c598
movl %eax, 0x4(%rsp)
movl 0xc(%rsp), %edi
movl 0x8(%rsp), %esi
movl 0x228025(%rip), %edx    # 0x244610
xorl %ecx, %ecx
cmpl 0xb3f1(%rip), %edx      # 0x279e4
sete %cl
xorl %edx, %edx
leaq 0x660(%rsp), %r8
xorl %r9d, %r9d
pushq %rax
leaq 0x68(%rsp), %rax
pushq %rax
callq 0x1bf16
addq $0x10, %rsp
movq 0x40(%rsp), %r14
jmp 0x1c3e3
cmpl $0x0, 0x50(%rsp)
je 0x1c648
movslq 0x227fe5(%rip), %rdx    # 0x244610
testq %rdx, %rdx
jle 0x1c648
shlq $0x3, %rdx
leaq 0xb3b5(%rip), %rdi      # 0x279f0
leaq 0x760(%rsp), %rsi
callq 0x1080
addq $0x37e8, %rsp           # imm = 0x37E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq