// File: /workspace/github_c_makefile_star2_O2/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, 0x8(%rsp)
movl 0x3828(%rsp), %eax
movl 0x227f0c(%rip), %ebp    # 0x242600
movl 0x9b65(%rip), %r15d     # 0x24260
cmpl %r15d, %ebp
jne 0x1a72a
xorl %edx, %edx
cmpl $0x1, %eax
adcl $0x3, %edx
cmpl 0x9992(%rip), %edx      # 0x240a0
jl 0x1adf2
addq $0x37e8, %rsp           # imm = 0x37E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x658a
movq %rdx, %rbx
movq %rax, 0x30(%rsp)
movq 0x3820(%rsp), %r14
movl %ecx, 0x50(%rsp)
testl %ecx, %ecx
je 0x1a78b
subl $0x1, 0x26e4c7(%rip)    # 0x288c10
jae 0x1adf2
movl 0x9b07(%rip), %eax      # 0x2425c
decl %eax
movl %eax, 0x26e4b3(%rip)    # 0x288c10
xorl %eax, %eax
testl %ebp, %ebp
movl $0x0, %ecx
cmovgl %ebp, %ecx
shlq $0x3, %rcx
leaq 0xb26c(%rip), %rdx      # 0x259e0
cmpq %rax, %rcx
je 0x1a78b
movq (%rax,%rdx), %r8
movq %r8, 0x760(%rsp,%rax)
addq $0x8, %rax
jmp 0x1a774
leaq 0x960(%rsp), %rdx
leaq 0x1c(%rsp), %rcx
leaq 0x2c40(%rsp), %r8
leaq 0x54(%rsp), %r9
pushq 0x40(%rsp)
pushq 0x10(%rsp)
callq 0x1b1f0
popq %rax
popq %rcx
addl $-0x2, %r15d
movq 0x30(%rsp), %rax
movl %eax, %ecx
movq %rcx, 0x58(%rsp)
testl %eax, %eax
jle 0x1a8ac
cmpl %r15d, %ebp
jne 0x1a8ac
cmpl $0x4, 0x98c4(%rip)      # 0x240a0
jne 0x1a8ac
movl 0x9893(%rip), %r8d      # 0x2407c
movl 0x1c(%rsp), %ecx
xorl %eax, %eax
pushq $0x30
popq %rdx
pushq $0x2
popq %rsi
leaq 0x227e14(%rip), %rdi    # 0x242610
cmpq 0x58(%rsp), %rax
je 0x1a8a1
cmpl $0x752f, %r8d           # imm = 0x752F
jl 0x1a827
movq %rdx, %r8
cmpq $0x46630, %r8           # imm = 0x46630
je 0x1a82d
andl $0x0, (%r8,%rdi)
addq $0x40, %r8
jmp 0x1a813
addl $0x2, %r8d
jmp 0x1a830
movl %esi, %r8d
imulq $0x18, %rax, %r9
movq (%r14,%r9), %r10
movl %r8d, 0x30(%r10)
movq 0x20(%r10), %r10
movl %r8d, 0x30(%r10)
movq 0x8(%r14,%r9), %r10
movl %r8d, 0x30(%r10)
movq 0x20(%r10), %r10
movl %r8d, 0x30(%r10)
movq 0x10(%r14,%r9), %r9
movl %r8d, 0x30(%r9)
movq 0x20(%r9), %r9
movl %r8d, 0x30(%r9)
xorl %r9d, %r9d
testl %ecx, %ecx
movl %ecx, %r10d
cmovlel %r9d, %r10d
xorl %ecx, %ecx
cmpq %r9, %r10
je 0x1a899
movq 0x960(%rsp,%r9,8), %r11
cmpl %r8d, 0x30(%r11)
jne 0x1a894
movslq %ecx, %r12
incl %ecx
movq %r11, 0x960(%rsp,%r12,8)
incq %r9
jmp 0x1a874
incq %rax
jmp 0x1a7fc
movl %r8d, 0x97d4(%rip)      # 0x2407c
movl %ecx, 0x1c(%rsp)
testq %rbx, %rbx
sete %al
cmpl %r15d, %ebp
setg %cl
orb %al, %cl
jne 0x1a923
movq %rbx, %rdi
callq 0x1b8c5
leaq 0xb315(%rip), %rdi      # 0x25be0
leaq 0x18(%rsp), %r15
leaq 0x14(%rsp), %rbp
movq %r15, %rsi
movq %rbp, %rdx
callq 0x52ed
movl (%r15), %edi
movl (%rbp), %esi
movl 0x227d14(%rip), %eax    # 0x242600
movl 0xb0e2(%rip), %ecx      # 0x259d4
cmpl %ecx, %eax
sete %dl
incl %ecx
cmpl %ecx, %eax
sete %al
orb %dl, %al
movzbl %al, %ecx
movq %rbx, %rdx
movq 0x8(%rsp), %r8
xorl %r9d, %r9d
pushq 0x30(%rsp)
pushq %r14
callq 0x1a6cc
popq %rax
popq %rcx
movq %rbx, %rdi
callq 0x1ba0a
movl 0x1c(%rsp), %r12d
movq 0x40(%rsp), %r15
movslq %r15d, %rax
movq %rax, 0x48(%rsp)
leal 0x1(%r15), %eax
movl %eax, 0x3c(%rsp)
xorl %ebx, %ebx
testl %r12d, %r12d
cmovlel %ebx, %r12d
cmpq %rbx, %r12
je 0x1ab36
movq 0x960(%rsp,%rbx,8), %rbp
movq %rbp, %rdi
callq 0x1b8c5
testl %r15d, %r15d
je 0x1a975
movq 0x8(%rsp), %rax
movq 0x48(%rsp), %rcx
movq -0x8(%rax,%rcx,8), %rax
jmp 0x1a977
xorl %eax, %eax
movq %rbp, %rdi
leaq 0x20a0(%rsp), %rsi
leaq 0x2c(%rsp), %rdx
leaq 0x24(%rsp), %rcx
leaq 0x1500(%rsp), %r8
leaq 0x28(%rsp), %r9
pushq %rax
leaq 0x28(%rsp), %rax
pushq %rax
callq 0x1bab9
popq %rax
popq %rcx
movl 0x24(%rsp), %edx
movl 0x20(%rsp), %r9d
movl %r9d, %eax
addl %edx, %eax
jle 0x1ab26
movl 0x227c3e(%rip), %r13d   # 0x242600
movl 0x9898(%rip), %eax      # 0x24260
xorl %r13d, %eax
orl 0xafff(%rip), %eax      # 0x259d0
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 0x1aa2c
movq %r14, %rdi
movq 0x30(%rsp), %rsi
movq %rbp, %rdx
leaq 0x60(%rsp), %rcx
leaq 0x4(%rsp), %r8
callq 0x1bec0
cmpl $0x1, 0x4(%rsp)
movl $0x0, %edx
adcl $0x3, %edx
cmpl 0x9689(%rip), %edx      # 0x240a0
jl 0x1ab26
pushq $0x1
popq %rdi
movl %edi, %esi
callq 0x658a
jmp 0x1ab26
leal (%r8,%rsi), %eax
cmpl $0x1, %eax
jne 0x1aa87
movq %r14, %rdi
movq 0x30(%rsp), %rsi
movq %rbp, %rdx
leaq 0x60(%rsp), %r15
movq %r15, %rcx
leaq 0x4(%rsp), %r8
callq 0x1bec0
movq 0x8(%rsp), %r8
movq 0x48(%rsp), %rax
movq %rbp, (%r8,%rax,8)
movl 0xaf6e(%rip), %eax      # 0x259d4
cmpl %eax, %r13d
sete %cl
incl %eax
cmpl %eax, %r13d
sete %al
orb %cl, %al
movzbl %al, %ecx
movl 0x4(%rsp), %eax
pushq $0x1
popq %rdi
movl %edi, %esi
jmp 0x1ab10
subq $0x8, %rsp
leaq 0x20a8(%rsp), %rdi
leaq 0x1508(%rsp), %rcx
leaq 0x1c(%rsp), %rax
pushq %rax
leaq 0x28(%rsp), %rax
pushq %rax
leaq 0xb132(%rip), %rax      # 0x25be0
pushq %rax
callq 0xb886
addq $0x20, %rsp
testl %eax, %eax
je 0x1ab26
movq %r14, %rdi
movq 0x30(%rsp), %rsi
movq %rbp, %rdx
leaq 0x60(%rsp), %r15
movq %r15, %rcx
leaq 0x4(%rsp), %r8
callq 0x1bec0
movq 0x8(%rsp), %r8
movq 0x48(%rsp), %rax
movq %rbp, (%r8,%rax,8)
movl 0x18(%rsp), %edi
movl 0x14(%rsp), %esi
movl 0x227b0b(%rip), %eax    # 0x242600
movl 0xaed9(%rip), %ecx      # 0x259d4
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 0x3c(%rsp), %r9d
pushq %rax
pushq %r15
movq 0x50(%rsp), %r15
callq 0x1a6cc
popq %rax
popq %rcx
movq %rbp, %rdi
callq 0x1ba0a
incq %rbx
jmp 0x1a946
movl 0x54(%rsp), %r13d
xorl %r12d, %r12d
testl %r13d, %r13d
cmovlel %r12d, %r13d
imulq $0x18, 0x58(%rsp), %rbx
xorl %r15d, %r15d
movq %r13, 0x8(%rsp)
cmpq %r13, %r12
je 0x1adbc
movq 0x2c40(%rsp,%r12,8), %rbp
movq %rbp, %rdi
callq 0x1bf9c
testq %r15, %r15
je 0x1ab81
movq %r15, %rdi
callq 0x1c0d0
testl %eax, %eax
jne 0x1adac
callq 0x1c153
movq %rax, %r15
testq %rax, %rax
jne 0x1adac
subq $0x8, %rsp
movq %rbp, %rdi
leaq 0x20a8(%rsp), %r15
movq %r15, %rsi
leaq 0x34(%rsp), %rdx
leaq 0x2c(%rsp), %rcx
leaq 0x1508(%rsp), %r13
movq %r13, %r8
leaq 0x30(%rsp), %r9
leaq 0x28(%rsp), %rax
pushq %rax
callq 0x1c238
popq %rax
popq %rcx
movl 0x24(%rsp), %edx
movl 0x20(%rsp), %r9d
movl %r9d, %eax
addl %edx, %eax
jle 0x1ada4
movl 0x2c(%rsp), %esi
movl 0x28(%rsp), %r8d
subq $0x8, %rsp
movq %r15, %rdi
movq %r13, %rcx
leaq 0x1c(%rsp), %rax
pushq %rax
leaq 0x28(%rsp), %rax
pushq %rax
leaq 0xafdb(%rip), %rax      # 0x25be0
pushq %rax
callq 0xb886
addq $0x20, %rsp
testl %eax, %eax
je 0x1ada4
movq 0x18(%rbp), %r8
movq 0x28(%rbp), %r9
movq 0x28(%r8), %rcx
xorl %edx, %edx
xorl %eax, %eax
movslq %eax, %r10
cmpq %rdx, %rbx
je 0x1ac7e
movq (%r14,%rdx), %rsi
cmpq %r9, %rsi
je 0x1ac78
movq 0x8(%r14,%rdx), %rdi
cmpq %r9, %rdi
je 0x1ac78
movq 0x10(%r14,%rdx), %r11
cmpq %r9, %r11
je 0x1ac78
cmpq %rcx, %rsi
je 0x1ac78
cmpq %rcx, %rdi
je 0x1ac78
cmpq %rcx, %r11
je 0x1ac78
leaq (%r14,%rdx), %rsi
leal 0x1(%r10), %eax
imulq $0x18, %r10, %rdi
movq 0x10(%rsi), %r10
movq %r10, 0x70(%rsp,%rdi)
movups (%rsi), %xmm0
movups %xmm0, 0x60(%rsp,%rdi)
addq $0x18, %rdx
jmp 0x1ac27
movl 0x4(%rbp), %r15d
movq 0x18(%r8), %r11
movq 0x20(%r11), %rdx
movq 0x10(%rdx), %rdx
movq 0x10(%rdx), %rdx
movq 0x18(%rdx), %rsi
movq 0x18(%rsi), %rdi
movq 0x18(%rdi), %r13
movq %r13, %rdi
movq 0x18(%rdi), %rdi
cmpq %rdx, %rdi
je 0x1acd1
cmpl %r15d, 0x4(%rdi)
jne 0x1aca1
movq 0x28(%rdi), %rax
imulq $0x18, %r10, %rdi
movq %rax, 0x60(%rsp,%rdi)
movq %r9, 0x68(%rsp,%rdi)
movq 0x28(%r11), %rax
movq %rax, 0x70(%rsp,%rdi)
incl %r10d
movl %r10d, %eax
movl 0x4(%r8), %r8d
movq 0x20(%rbp), %rdi
movq 0x18(%rdi), %rdi
movq 0x20(%rdi), %r9
movq 0x18(%r9), %rdi
movq 0x18(%rdi), %rdi
movq 0x18(%rdi), %r10
movq 0x18(%r10), %r10
cmpq %r9, %r10
je 0x1ad21
cmpl %r8d, 0x4(%r10)
jne 0x1aced
movq 0x28(%r10), %rdi
cltq
imulq $0x18, %rax, %r8
movq %rdi, 0x60(%rsp,%r8)
movq %rcx, 0x68(%rsp,%r8)
movq 0x10(%rbp), %rcx
movq 0x28(%rcx), %rdi
movq %rdi, 0x70(%rsp,%r8)
incl %eax
jmp 0x1ad25
movq 0x10(%rbp), %rcx
movl 0x4(%rcx), %ecx
cmpq %rdx, %r13
je 0x1ad6c
movq 0x20(%r13), %rdi
movq %rdi, %r8
movq 0x18(%r8), %r8
cmpq %rdi, %r8
je 0x1ad66
cmpl %ecx, 0x4(%r8)
jne 0x1ad34
movq 0x28(%rsi), %rdi
cltq
imulq $0x18, %rax, %r9
movq %rdi, 0x60(%rsp,%r9)
movq 0x28(%r13), %rdi
movq %rdi, 0x68(%rsp,%r9)
movq 0x28(%r8), %rdi
movq %rdi, 0x70(%rsp,%r9)
incl %eax
movq 0x18(%r13), %r13
jmp 0x1ad28
movl %eax, 0x4(%rsp)
movl 0x18(%rsp), %edi
movl 0x14(%rsp), %esi
movl 0x227882(%rip), %edx    # 0x242600
xorl %ecx, %ecx
cmpl 0xac4e(%rip), %edx      # 0x259d4
sete %cl
xorl %edx, %edx
leaq 0x660(%rsp), %r8
xorl %r9d, %r9d
pushq %rax
leaq 0x68(%rsp), %rax
pushq %rax
callq 0x1a6cc
popq %rax
popq %rcx
xorl %r15d, %r15d
movq 0x8(%rsp), %r13
movq %rbp, %rdi
callq 0x1c453
incq %r12
jmp 0x1ab53
cmpl $0x0, 0x50(%rsp)
je 0x1adf2
movl 0x227837(%rip), %eax    # 0x242600
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
shlq $0x3, %rax
leaq 0xac05(%rip), %rdx      # 0x259e0
cmpq %rcx, %rax
je 0x1adf2
movq 0x760(%rsp,%rcx), %rsi
movq %rsi, (%rcx,%rdx)
addq $0x8, %rcx
jmp 0x1addb
addq $0x37e8, %rsp           # imm = 0x37E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq