// File: /workspace/github_c_makefile_star2_O0/mishun[P]plantri/plantri.c
// Function: find_extensions_quad
static void
find_extensions_quad(int nbtot, int nbop, EDGE *extP1[], int *nextP1,
   EDGE *extP3[], int *nextP3, EDGE *lastP1)

/* Determine the inequivalent places to make extensions, for the
   3-connected quadrangulations.  The results are put in the arrays
   extP1[0..*nextP1-1], etc..
   nbtot and nbop are the usual group parameters.
   If lastA != NULL, this graph was made with an P1-operation and lastP1
   is its reference edge.  If lastP1 == NULL, it wasn't made with P1.
*/

{
    EDGE *e,*ee,*elast;
    EDGE **nb,**nb0,**nblim,**nboplim;
    int i,k;
    int maxdeg,vx;

    if (nbtot == 1)
    {
     /* P1 extension for trivial group */

	RESETMARKS_V;
	if (lastP1 != NULL)
	{
	    maxdeg = degree[lastP1->end];
	    MARK_V(lastP1->start);
	    MARK_V(lastP1->next->invers->prev->end);
	    vx = lastP1->end;
	}
	else
	{
	    vx = -1;
	    maxdeg = 0;
	}

        k = 0;
	for (i = 0; i < nv; ++i)
	if (degree[i] >= 4)
	{
	    e = elast = firstedge[i];
	    if (i == vx)
	        do
	        {
		    if (will_be_3_connected(e)) extP1[k++] = e;
		    e = e->next;
	        } while (e != elast);
	    else
		do
	        {
		    if (ISMARKED_V(e->prev->end) || ISMARKED_V(e->next->end)
                                                  || degree[e->end] >= maxdeg)
		    {
		        if (will_be_3_connected(e)) extP1[k++] = e;
		    }
		    e = e->next;
	        } while (e != elast);
	}

	*nextP1 = k;

     /* P3 extension for trivial group */

	if (nv <= maxnv-4)
	{
	    k = 0;
	    RESETMARKS;

	    for (i = 0; i < nv; ++i)
            {
                e = elast = firstedge[i];
                do
                {
                    if (!ISMARKEDLO(e))
		    {
		        extP3[k++] = e;
		        MARKLO(e);
		        ee = e->invers->prev;
		        MARKLO(ee);
		        ee = ee->invers->prev;
		        MARKLO(ee);
		        ee = ee->invers->prev;
		        MARKLO(ee);
		    }
                    e = e->next;
                } while (e != elast);
            }
  	    *nextP3 = k;
	}
	else
	    *nextP3 = 0;
    }
    else
    {
	nboplim = (EDGE**)numbering[nbop==0?nbtot:nbop];
        nblim = (EDGE**)numbering[nbtot];
	nb0 = (EDGE**)numbering[0];

	for (i = 0; i < ne; ++i) nb0[i]->index = i;

     /* P1 extensions for non-trivial group */
	k = 0;
	RESETMARKS;

	for (i = 0; i < nv; ++i)
	if (degree[i] >= 4)
	{
	    e = elast = firstedge[i];
	    do
	    {
		if (!ISMARKEDLO(e) && will_be_3_connected(e))
		{
		    extP1[k++] = e;
		    for (nb = nb0+e->index+MAXE; nb < nblim; nb += MAXE)
			MARKLO(*nb);
		}
		e = e->next;
	    } while (e != elast);
	}
	*nextP1 = k;

     /* P3 extensions for non-trivial group */

	if (nv <= maxnv-4)
	{
	    RESETMARKS;
	    k = 0;
            for (i = 0; i < nv; ++i)
            {
                e = elast = firstedge[i];
                do
                {
                    if (!ISMARKEDLO(e))
                    {
                        extP3[k++] = e;
		        ee = e;
		        do
		        {
			    for (nb = nb0+ee->index; nb < nboplim; nb += MAXE)
			        MARKLO(*nb);
			    for ( ; nb < nblim; nb += MAXE)
			        MARKLO((*nb)->invers);
		            ee = ee->invers->prev;
		        } while (ee != e);
                    }
                    e = e->next;
                } while (e != elast);
            }
            *nextP3 = k;
	}
	else
	    *nextP3 = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq 0x10(%rbp), %rax
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq %r9, -0x28(%rbp)
cmpl $0x1, -0x4(%rbp)
jne 0x13baa
movl 0x2885b(%rip), %eax     # 0x3c090
addl $0x1, %eax
movl %eax, 0x28852(%rip)     # 0x3c090
cmpl $0x7530, %eax           # imm = 0x7530
jle 0x1387b
movl $0x1, 0x28841(%rip)     # 0x3c090
movl $0x0, -0x74(%rbp)
cmpl $0x40, -0x74(%rbp)
jge 0x13879
movslq -0x74(%rbp), %rcx
leaq 0x28d3d9(%rip), %rax    # 0x2a0c40
movl $0x0, (%rax,%rcx,4)
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x13856
jmp 0x1387b
cmpq $0x0, 0x10(%rbp)
je 0x138de
movq 0x10(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x2a36f(%rip), %rax     # 0x3dc00
movl (%rax,%rcx,4), %eax
movl %eax, -0x6c(%rbp)
movl 0x287f3(%rip), %edx     # 0x3c090
movq 0x10(%rbp), %rax
movslq (%rax), %rcx
leaq 0x28d395(%rip), %rax    # 0x2a0c40
movl %edx, (%rax,%rcx,4)
movl 0x287dc(%rip), %edx     # 0x3c090
movq 0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rax), %rcx
leaq 0x28d371(%rip), %rax    # 0x2a0c40
movl %edx, (%rax,%rcx,4)
movq 0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x70(%rbp)
jmp 0x138ec
movl $0xffffffff, -0x70(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x6c(%rbp)
movl $0x0, -0x68(%rbp)
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
cmpl 0x246d1d(%rip), %eax    # 0x25a620
jge 0x13a2f
movslq -0x64(%rbp), %rcx
leaq 0x2a2ec(%rip), %rax     # 0x3dc00
cmpl $0x4, (%rax,%rcx,4)
jl 0x13a1f
movslq -0x64(%rbp), %rcx
leaq 0x2a0d7(%rip), %rax     # 0x3da00
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq %rax, -0x30(%rbp)
movl -0x64(%rbp), %eax
cmpl -0x70(%rbp), %eax
jne 0x13982
jmp 0x1393f
movq -0x30(%rbp), %rdi
callq 0x158b0
cmpl $0x0, %eax
je 0x13967
movq -0x30(%rbp), %rdx
movq -0x10(%rbp), %rax
movl -0x68(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x68(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x40(%rbp), %rax
jne 0x1393f
jmp 0x13a1d
jmp 0x13984
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rax), %rcx
leaq 0x28d2a9(%rip), %rax    # 0x2a0c40
movl (%rax,%rcx,4), %eax
cmpl 0x286f0(%rip), %eax     # 0x3c090
je 0x139d7
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movslq 0x4(%rax), %rcx
leaq 0x28d28b(%rip), %rax    # 0x2a0c40
movl (%rax,%rcx,4), %eax
cmpl 0x286d2(%rip), %eax     # 0x3c090
je 0x139d7
movq -0x30(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x2a231(%rip), %rax     # 0x3dc00
movl (%rax,%rcx,4), %eax
cmpl -0x6c(%rbp), %eax
jl 0x13a01
movq -0x30(%rbp), %rdi
callq 0x158b0
cmpl $0x0, %eax
je 0x139ff
movq -0x30(%rbp), %rdx
movq -0x10(%rbp), %rax
movl -0x68(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x68(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x13a01
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x40(%rbp), %rax
jne 0x13984
jmp 0x13a1d
jmp 0x13a1f
jmp 0x13a21
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x138fa
movl -0x68(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl 0x246be2(%rip), %eax    # 0x25a620
movl 0x2883c(%rip), %ecx     # 0x3c280
subl $0x4, %ecx
cmpl %ecx, %eax
jg 0x13b9b
movl $0x0, -0x68(%rbp)
movl 0x28628(%rip), %eax     # 0x3c084
addl $0x2, %eax
movl %eax, 0x2861f(%rip)     # 0x3c084
cmpl $0x7530, %eax           # imm = 0x7530
jle 0x13aac
movl $0x2, 0x2860e(%rip)     # 0x3c084
movl $0x0, -0x78(%rbp)
cmpl $0x1198, -0x78(%rbp)    # imm = 0x1198
jge 0x13aaa
movslq -0x78(%rbp), %rcx
leaq 0x246b9f(%rip), %rax    # 0x25a630
shlq $0x6, %rcx
addq %rcx, %rax
movl $0x0, 0x30(%rax)
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x13a7d
jmp 0x13aac
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
cmpl 0x246b64(%rip), %eax    # 0x25a620
jge 0x13b90
movslq -0x64(%rbp), %rcx
leaq 0x29f33(%rip), %rax     # 0x3da00
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl 0x30(%rax), %eax
cmpl 0x2859e(%rip), %eax     # 0x3c084
je 0x13b66
movq -0x30(%rbp), %rdx
movq -0x20(%rbp), %rax
movl -0x68(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x68(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x2857c(%rip), %ecx     # 0x3c084
movq -0x30(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movl 0x2855f(%rip), %ecx     # 0x3c084
movq -0x38(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movl 0x28542(%rip), %ecx     # 0x3c084
movq -0x38(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movl 0x28525(%rip), %ecx     # 0x3c084
movq -0x38(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x40(%rbp), %rax
jne 0x13ad9
jmp 0x13b82
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x13ab3
movl -0x68(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
jmp 0x13ba5
movq -0x28(%rbp), %rax
movl $0x0, (%rax)
jmp 0x13f31
cmpl $0x0, -0x8(%rbp)
jne 0x13bbb
movl -0x4(%rbp), %eax
movl %eax, -0x84(%rbp)
jmp 0x13bc4
movl -0x8(%rbp), %eax
movl %eax, -0x84(%rbp)
movl -0x84(%rbp), %eax
movslq %eax, %rcx
leaq 0x2a12c(%rip), %rax     # 0x3dd00
imulq $0xba0, %rcx, %rcx      # imm = 0xBA0
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x2a113(%rip), %rax     # 0x3dd00
imulq $0xba0, %rcx, %rcx      # imm = 0xBA0
addq %rcx, %rax
movq %rax, -0x58(%rbp)
leaq 0x2a0fe(%rip), %rax     # 0x3dd00
movq %rax, -0x50(%rbp)
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
cmpl 0x246a0e(%rip), %eax    # 0x25a624
jge 0x13c35
movl -0x64(%rbp), %ecx
movq -0x50(%rbp), %rax
movslq -0x64(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, 0x34(%rax)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x13c0d
movl $0x0, -0x68(%rbp)
movl 0x28442(%rip), %eax     # 0x3c084
addl $0x2, %eax
movl %eax, 0x28439(%rip)     # 0x3c084
cmpl $0x7530, %eax           # imm = 0x7530
jle 0x13c92
movl $0x2, 0x28428(%rip)     # 0x3c084
movl $0x0, -0x7c(%rbp)
cmpl $0x1198, -0x7c(%rbp)    # imm = 0x1198
jge 0x13c90
movslq -0x7c(%rbp), %rcx
leaq 0x2469b9(%rip), %rax    # 0x25a630
shlq $0x6, %rcx
addq %rcx, %rax
movl $0x0, 0x30(%rax)
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x13c63
jmp 0x13c92
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
cmpl 0x24697e(%rip), %eax    # 0x25a620
jge 0x13d80
movslq -0x64(%rbp), %rcx
leaq 0x29f4d(%rip), %rax     # 0x3dc00
cmpl $0x4, (%rax,%rcx,4)
jl 0x13d70
movslq -0x64(%rbp), %rcx
leaq 0x29d38(%rip), %rax     # 0x3da00
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl 0x30(%rax), %eax
cmpl 0x283a3(%rip), %eax     # 0x3c084
je 0x13d54
movq -0x30(%rbp), %rdi
callq 0x158b0
cmpl $0x0, %eax
je 0x13d54
movq -0x30(%rbp), %rdx
movq -0x10(%rbp), %rax
movl -0x68(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x68(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x50(%rbp), %rax
movq -0x30(%rbp), %rcx
movslq 0x34(%rcx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
addq $0xba0, %rax            # imm = 0xBA0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0x13d52
movl 0x2834c(%rip), %ecx     # 0x3c084
movq -0x48(%rbp), %rax
movq (%rax), %rax
movl %ecx, 0x30(%rax)
movq -0x48(%rbp), %rax
addq $0xba0, %rax            # imm = 0xBA0
movq %rax, -0x48(%rbp)
jmp 0x13d28
jmp 0x13d54
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x40(%rbp), %rax
jne 0x13cd4
jmp 0x13d70
jmp 0x13d72
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x13c99
movl -0x68(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl 0x246891(%rip), %eax    # 0x25a620
movl 0x284eb(%rip), %ecx     # 0x3c280
subl $0x4, %ecx
cmpl %ecx, %eax
jg 0x13f25
movl 0x282de(%rip), %eax     # 0x3c084
addl $0x2, %eax
movl %eax, 0x282d5(%rip)     # 0x3c084
cmpl $0x7530, %eax           # imm = 0x7530
jle 0x13df6
movl $0x2, 0x282c4(%rip)     # 0x3c084
movl $0x0, -0x80(%rbp)
cmpl $0x1198, -0x80(%rbp)    # imm = 0x1198
jge 0x13df4
movslq -0x80(%rbp), %rcx
leaq 0x246855(%rip), %rax    # 0x25a630
shlq $0x6, %rcx
addq %rcx, %rax
movl $0x0, 0x30(%rax)
movl -0x80(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x80(%rbp)
jmp 0x13dc7
jmp 0x13df6
movl $0x0, -0x68(%rbp)
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
cmpl 0x246813(%rip), %eax    # 0x25a620
jge 0x13f1a
movslq -0x64(%rbp), %rcx
leaq 0x29be2(%rip), %rax     # 0x3da00
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl 0x30(%rax), %eax
cmpl 0x2824d(%rip), %eax     # 0x3c084
je 0x13ef0
movq -0x30(%rbp), %rdx
movq -0x20(%rbp), %rax
movl -0x68(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x68(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x50(%rbp), %rax
movq -0x38(%rbp), %rcx
movslq 0x34(%rcx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x60(%rbp), %rax
jae 0x13ea0
movl 0x281fe(%rip), %ecx     # 0x3c084
movq -0x48(%rbp), %rax
movq (%rax), %rax
movl %ecx, 0x30(%rax)
movq -0x48(%rbp), %rax
addq $0xba0, %rax            # imm = 0xBA0
movq %rax, -0x48(%rbp)
jmp 0x13e76
jmp 0x13ea2
movq -0x48(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0x13ed0
movl 0x281d2(%rip), %ecx     # 0x3c084
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rax
movl %ecx, 0x30(%rax)
movq -0x48(%rbp), %rax
addq $0xba0, %rax            # imm = 0xBA0
movq %rax, -0x48(%rbp)
jmp 0x13ea2
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x13e5f
jmp 0x13ef0
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x40(%rbp), %rax
jne 0x13e2a
jmp 0x13f0c
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x13e04
movl -0x68(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
jmp 0x13f2f
movq -0x28(%rbp), %rax
movl $0x0, (%rax)
jmp 0x13f31
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)