// File: /workspace/github_c_makefile_star2_O3/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 0x228547(%rip), %r12d   # 0x244610
movl 0xa1a1(%rip), %ebx      # 0x26270
cmpl %ebx, %r12d
jne 0x1c103
xorl %edx, %edx
cmpl $0x1, %eax
adcl $0x3, %edx
cmpl 0x9fce(%rip), %edx      # 0x260b0
jl 0x1c7d6
movl %r14d, %edi
movl %ebp, %esi
addq $0x37e8, %rsp           # imm = 0x37E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x761c
movl %ecx, %r13d
movq %rax, 0x30(%rsp)
movq 0x3820(%rsp), %r15
testl %ecx, %ecx
je 0x1c15d
subl $0x1, 0x26eb02(%rip)    # 0x28ac20
jae 0x1c7d6
movl 0xa142(%rip), %eax      # 0x2626c
decl %eax
movl %eax, 0x26eaee(%rip)    # 0x28ac20
testl %r12d, %r12d
jle 0x1c15d
movq %rdx, 0x10(%rsp)
leaq (,%r12,8), %rdx
leaq 0xb8a5(%rip), %rsi      # 0x279f0
leaq 0x760(%rsp), %rdi
callq 0x1070
movq 0x10(%rsp), %rdx
movq %rdx, 0x10(%rsp)
leaq 0x960(%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 0x1cbef
addq $0x10, %rsp
addl $-0x2, %ebx
movq 0x30(%rsp), %rax
movl %eax, %r11d
testl %eax, %eax
jle 0x1c275
cmpl %ebx, %r12d
jne 0x1c275
cmpl $0x4, 0x9efb(%rip)      # 0x260b0
jne 0x1c275
movl 0x9ecb(%rip), %edx      # 0x2608c
movl 0x1c(%rsp), %esi
xorl %eax, %eax
leaq 0x228452(%rip), %rcx    # 0x244620
cmpl $0x752f, %edx           # imm = 0x752F
jl 0x1c1f6
movl $0x30, %edx
movl $0x0, (%rdx,%rcx)
addq $0x40, %rdx
cmpq $0x46630, %rdx          # imm = 0x46630
jne 0x1c1db
movl $0x2, %edx
jmp 0x1c1f9
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 0x1c25d
movl %esi, %esi
xorl %r8d, %r8d
xorl %edi, %edi
movq 0x960(%rsp,%r8,8), %r9
cmpl %edx, 0x30(%r9)
jne 0x1c255
movslq %edi, %r10
incl %edi
movq %r9, 0x960(%rsp,%r10,8)
incq %r8
cmpq %r8, %rsi
jne 0x1c23a
incq %rax
movl %edi, %esi
cmpq %r11, %rax
jne 0x1c1ce
movl %edi, 0x1c(%rsp)
movl %edx, 0x9e17(%rip)      # 0x2608c
movq %r11, 0x58(%rsp)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
sete %al
cmpl %ebx, %r12d
setg %cl
orb %al, %cl
jne 0x1c2f8
movq %rdi, %rbx
callq 0x1d325
leaq 0xb952(%rip), %rdi      # 0x27bf0
leaq 0xc(%rsp), %r14
leaq 0x8(%rsp), %rbp
movq %r14, %rsi
movq %rbp, %rdx
callq 0x62d6
movl (%r14), %edi
movl (%rbp), %esi
movl 0x228351(%rip), %eax    # 0x244610
movl 0xb71f(%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 0x1c09b
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x1d46b
movl %r13d, 0x50(%rsp)
movslq 0x1c(%rsp), %rbp
testq %rbp, %rbp
jle 0x1c516
movq 0x40(%rsp), %rax
movslq %eax, %rcx
movq %rcx, 0x10(%rsp)
incl %eax
movl %eax, 0x4c(%rsp)
xorl %r12d, %r12d
movq 0x960(%rsp,%r12,8), %r14
movq %r14, %rdi
callq 0x1d325
cmpl $0x0, 0x40(%rsp)
je 0x1c349
movq 0x38(%rsp), %rax
movq 0x10(%rsp), %rcx
movq -0x8(%rax,%rcx,8), %rax
jmp 0x1c34b
xorl %eax, %eax
movq %r14, %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 0x1d51a
addq $0x10, %rsp
movl 0x24(%rsp), %edx
movl 0x20(%rsp), %r9d
movl %r9d, %eax
addl %edx, %eax
jle 0x1c502
movl 0x228278(%rip), %r13d   # 0x244610
movl 0x9ed2(%rip), %eax      # 0x26270
xorl %r13d, %eax
orl 0xb639(%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 0x1c407
movq %r15, %rdi
movq 0x30(%rsp), %rsi
movq %r14, %rdx
leaq 0x60(%rsp), %rcx
leaq 0x4(%rsp), %r8
callq 0x1d90c
cmpl $0x1, 0x4(%rsp)
movl $0x0, %edx
adcl $0x3, %edx
cmpl 0x9cc3(%rip), %edx      # 0x260b0
jl 0x1c502
movl $0x1, %edi
movl $0x1, %esi
callq 0x761c
jmp 0x1c502
leal (%r8,%rsi), %eax
cmpl $0x1, %eax
jne 0x1c467
movq %r15, %rdi
movq 0x30(%rsp), %rsi
movq %r14, %rdx
leaq 0x60(%rsp), %rbx
movq %rbx, %rcx
leaq 0x4(%rsp), %r8
callq 0x1d90c
movq 0x38(%rsp), %r8
movq 0x10(%rsp), %rax
movq %r14, (%r8,%rax,8)
movl 0xb5a3(%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 0x1c4f0
subq $0x8, %rsp
leaq 0x20a8(%rsp), %rdi
leaq 0x1508(%rsp), %rcx
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x1c(%rsp), %rax
pushq %rax
leaq 0xb762(%rip), %rax      # 0x27bf0
pushq %rax
callq 0xc7bb
addq $0x20, %rsp
testl %eax, %eax
je 0x1c502
movq %r15, %rdi
movq 0x30(%rsp), %rsi
movq %r14, %rdx
leaq 0x60(%rsp), %rbx
movq %rbx, %rcx
leaq 0x4(%rsp), %r8
callq 0x1d90c
movq 0x38(%rsp), %r8
movq 0x10(%rsp), %rax
movq %r14, (%r8,%rax,8)
movl 0xc(%rsp), %edi
movl 0x8(%rsp), %esi
movl 0x22813b(%rip), %eax    # 0x244610
movl 0xb509(%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 0x1c09b
addq $0x10, %rsp
movq %r14, %rdi
callq 0x1d46b
incq %r12
cmpq %r12, %rbp
jne 0x1c321
movslq 0x54(%rsp), %r12
testq %r12, %r12
jle 0x1c7ab
movq 0x58(%rsp), %rax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rax
movq %rax, 0x40(%rsp)
xorl %ebx, %ebx
xorl %r14d, %r14d
movq 0x2c40(%rsp,%rbx,8), %rbp
movq %rbp, %rdi
callq 0x1d9f2
testq %r14, %r14
je 0x1c560
movq %r14, %rdi
callq 0x1db27
testl %eax, %eax
jne 0x1c797
callq 0x1dbab
movq %rax, %r14
testq %rax, %rax
jne 0x1c797
subq $0x8, %rsp
movq %rbp, %rdi
leaq 0x20a8(%rsp), %r14
movq %r14, %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 0x1dc90
addq $0x10, %rsp
movl 0x24(%rsp), %edx
movl 0x20(%rsp), %r9d
movl %r9d, %eax
addl %edx, %eax
jle 0x1c794
movl 0x2c(%rsp), %esi
movl 0x28(%rsp), %r8d
subq $0x8, %rsp
movq %r14, %rdi
movq %r13, %rcx
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x1c(%rsp), %rax
pushq %rax
leaq 0xb60a(%rip), %rax      # 0x27bf0
pushq %rax
callq 0xc7bb
addq $0x20, %rsp
testl %eax, %eax
je 0x1c794
movq 0x18(%rbp), %r8
movq 0x28(%rbp), %r9
movq 0x28(%r8), %rcx
cmpl $0x0, 0x30(%rsp)
jle 0x1c669
xorl %edx, %edx
xorl %eax, %eax
movq 0x40(%rsp), %r11
movq (%r15,%rdx), %rsi
cmpq %r9, %rsi
je 0x1c65e
movq 0x8(%r15,%rdx), %rdi
cmpq %r9, %rdi
je 0x1c65e
movq 0x10(%r15,%rdx), %r10
cmpq %r9, %r10
je 0x1c65e
cmpq %rcx, %rsi
je 0x1c65e
cmpq %rcx, %rdi
je 0x1c65e
cmpq %rcx, %r10
je 0x1c65e
leaq (%r15,%rdx), %rsi
movslq %eax, %rdi
incl %eax
leaq (%rdi,%rdi,2), %rdi
movq 0x10(%rsi), %r10
movq %r10, 0x70(%rsp,%rdi,8)
movups (%rsi), %xmm0
movups %xmm0, 0x60(%rsp,%rdi,8)
addq $0x18, %rdx
cmpq %rdx, %r11
jne 0x1c614
jmp 0x1c66b
xorl %eax, %eax
movl 0x4(%rbp), %r11d
movq 0x18(%r8), %r10
movq 0x20(%r10), %rdx
movq 0x10(%rdx), %rdx
movq 0x10(%rdx), %rdx
movq 0x18(%rdx), %rsi
movq 0x18(%rsi), %rdi
movq 0x18(%rdi), %rdi
movq %rdi, %r14
movq 0x18(%r14), %r14
cmpq %rdx, %r14
je 0x1c6bc
cmpl %r11d, 0x4(%r14)
jne 0x1c68e
movq 0x28(%r14), %r11
cltq
leaq (%rax,%rax,2), %r14
movq %r11, 0x60(%rsp,%r14,8)
movq %r9, 0x68(%rsp,%r14,8)
movq 0x28(%r10), %r9
movq %r9, 0x70(%rsp,%r14,8)
incl %eax
movl 0x4(%r8), %r8d
movq 0x20(%rbp), %r9
movq 0x18(%r9), %r9
movq 0x20(%r9), %r9
movq 0x18(%r9), %r10
movq 0x18(%r10), %r10
movq 0x18(%r10), %r10
movq 0x18(%r10), %r10
cmpq %r9, %r10
je 0x1c70c
cmpl %r8d, 0x4(%r10)
jne 0x1c6d8
movq 0x28(%r10), %r8
cltq
leaq (%rax,%rax,2), %r9
movq %r8, 0x60(%rsp,%r9,8)
movq %rcx, 0x68(%rsp,%r9,8)
movq 0x10(%rbp), %rcx
movq 0x28(%rcx), %r8
movq %r8, 0x70(%rsp,%r9,8)
incl %eax
jmp 0x1c710
movq 0x10(%rbp), %rcx
cmpq %rdx, %rdi
je 0x1c75a
movl 0x4(%rcx), %ecx
movq 0x20(%rdi), %r9
movq %r9, %r8
movq 0x18(%r8), %r8
cmpq %r9, %r8
je 0x1c751
cmpl %ecx, 0x4(%r8)
jne 0x1c71f
movq 0x28(%rsi), %r9
cltq
leaq (%rax,%rax,2), %r10
movq %r9, 0x60(%rsp,%r10,8)
movq 0x28(%rdi), %r9
movq %r9, 0x68(%rsp,%r10,8)
movq 0x28(%r8), %r8
movq %r8, 0x70(%rsp,%r10,8)
incl %eax
movq 0x18(%rdi), %rdi
cmpq %rdx, %rdi
jne 0x1c718
movl %eax, 0x4(%rsp)
movl 0xc(%rsp), %edi
movl 0x8(%rsp), %esi
movl 0x227ea4(%rip), %edx    # 0x244610
xorl %ecx, %ecx
cmpl 0xb270(%rip), %edx      # 0x279e4
sete %cl
xorl %edx, %edx
leaq 0x660(%rsp), %r8
xorl %r9d, %r9d
pushq %rax
leaq 0x68(%rsp), %rax
pushq %rax
callq 0x1c09b
addq $0x10, %rsp
xorl %r14d, %r14d
movq %rbp, %rdi
callq 0x1deb1
incq %rbx
cmpq %r12, %rbx
jne 0x1c53b
cmpl $0x0, 0x50(%rsp)
je 0x1c7d6
movslq 0x227e57(%rip), %rdx    # 0x244610
testq %rdx, %rdx
jle 0x1c7d6
shlq $0x3, %rdx
leaq 0xb227(%rip), %rdi      # 0x279f0
leaq 0x760(%rsp), %rsi
callq 0x1070
addq $0x37e8, %rsp           # imm = 0x37E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq