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

/* Determine the inequivalent places to make extensions, for the
   3-connected quadrangulations without non-facial 4-cycles.
   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,*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
	        {
		    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)
		    {
		        extP1[k++] = e;
		    }
		    e = e->next;
	        } while (e != elast);
	}

	*nextP1 = k;
    }
    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))
		{
		    extP1[k++] = e;
		    for (nb = nb0+e->index+MAXE; nb < nblim; nb += MAXE)
			MARKLO(*nb);
		}
		e = e->next;
	    } while (e != elast);
	}
	*nextP1 = k;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
cmpl $0x1, -0x4(%rbp)
jne 0x34f20
movl 0x735a(%rip), %eax      # 0x3c090
addl $0x1, %eax
movl %eax, 0x7351(%rip)      # 0x3c090
cmpl $0x7530, %eax           # imm = 0x7530
jle 0x34d7c
movl $0x1, 0x7340(%rip)      # 0x3c090
movl $0x0, -0x64(%rbp)
cmpl $0x40, -0x64(%rbp)
jge 0x34d7a
movslq -0x64(%rbp), %rcx
leaq 0x26bed8(%rip), %rax    # 0x2a0c40
movl $0x0, (%rax,%rcx,4)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x34d57
jmp 0x34d7c
cmpq $0x0, -0x20(%rbp)
je 0x34ddf
movq -0x20(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x8e6e(%rip), %rax      # 0x3dc00
movl (%rax,%rcx,4), %eax
movl %eax, -0x5c(%rbp)
movl 0x72f2(%rip), %edx      # 0x3c090
movq -0x20(%rbp), %rax
movslq (%rax), %rcx
leaq 0x26be94(%rip), %rax    # 0x2a0c40
movl %edx, (%rax,%rcx,4)
movl 0x72db(%rip), %edx      # 0x3c090
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rax), %rcx
leaq 0x26be70(%rip), %rax    # 0x2a0c40
movl %edx, (%rax,%rcx,4)
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x60(%rbp)
jmp 0x34ded
movl $0xffffffff, -0x60(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x5c(%rbp)
movl $0x0, -0x58(%rbp)
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
cmpl 0x22581c(%rip), %eax    # 0x25a620
jge 0x34f12
movslq -0x54(%rbp), %rcx
leaq 0x8deb(%rip), %rax      # 0x3dc00
cmpl $0x4, (%rax,%rcx,4)
jl 0x34f02
movslq -0x54(%rbp), %rcx
leaq 0x8bd6(%rip), %rax      # 0x3da00
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq %rax, -0x28(%rbp)
movl -0x54(%rbp), %eax
cmpl -0x60(%rbp), %eax
jne 0x34e75
jmp 0x34e40
movq -0x28(%rbp), %rdx
movq -0x10(%rbp), %rax
movl -0x58(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x58(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x34e40
jmp 0x34f00
jmp 0x34e77
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rax), %rcx
leaq 0x26bdb6(%rip), %rax    # 0x2a0c40
movl (%rax,%rcx,4), %eax
cmpl 0x71fd(%rip), %eax      # 0x3c090
je 0x34eca
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movslq 0x4(%rax), %rcx
leaq 0x26bd98(%rip), %rax    # 0x2a0c40
movl (%rax,%rcx,4), %eax
cmpl 0x71df(%rip), %eax      # 0x3c090
je 0x34eca
movq -0x28(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x8d3e(%rip), %rax      # 0x3dc00
movl (%rax,%rcx,4), %eax
cmpl -0x5c(%rbp), %eax
jl 0x34ee4
movq -0x28(%rbp), %rdx
movq -0x10(%rbp), %rax
movl -0x58(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x58(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x34e77
jmp 0x34f00
jmp 0x34f02
jmp 0x34f04
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x34dfb
movl -0x58(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
jmp 0x350e8
cmpl $0x0, -0x8(%rbp)
jne 0x34f2e
movl -0x4(%rbp), %eax
movl %eax, -0x6c(%rbp)
jmp 0x34f34
movl -0x8(%rbp), %eax
movl %eax, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movslq %eax, %rcx
leaq 0x8dbf(%rip), %rax      # 0x3dd00
imulq $0xba0, %rcx, %rcx      # imm = 0xBA0
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x8da6(%rip), %rax      # 0x3dd00
imulq $0xba0, %rcx, %rcx      # imm = 0xBA0
addq %rcx, %rax
movq %rax, -0x48(%rbp)
leaq 0x8d91(%rip), %rax      # 0x3dd00
movq %rax, -0x40(%rbp)
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
cmpl 0x2256a1(%rip), %eax    # 0x25a624
jge 0x34fa2
movl -0x54(%rbp), %ecx
movq -0x40(%rbp), %rax
movslq -0x54(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, 0x34(%rax)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x34f7a
movl $0x0, -0x58(%rbp)
movl 0x70d5(%rip), %eax      # 0x3c084
addl $0x2, %eax
movl %eax, 0x70cc(%rip)      # 0x3c084
cmpl $0x7530, %eax           # imm = 0x7530
jle 0x34fff
movl $0x2, 0x70bb(%rip)      # 0x3c084
movl $0x0, -0x68(%rbp)
cmpl $0x1198, -0x68(%rbp)    # imm = 0x1198
jge 0x34ffd
movslq -0x68(%rbp), %rcx
leaq 0x22564c(%rip), %rax    # 0x25a630
shlq $0x6, %rcx
addq %rcx, %rax
movl $0x0, 0x30(%rax)
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x34fd0
jmp 0x34fff
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
cmpl 0x225611(%rip), %eax    # 0x25a620
jge 0x350df
movslq -0x54(%rbp), %rcx
leaq 0x8be0(%rip), %rax      # 0x3dc00
cmpl $0x4, (%rax,%rcx,4)
jl 0x350cf
movslq -0x54(%rbp), %rcx
leaq 0x89cb(%rip), %rax      # 0x3da00
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0x30(%rax), %eax
cmpl 0x7036(%rip), %eax      # 0x3c084
je 0x350b3
movq -0x28(%rbp), %rdx
movq -0x10(%rbp), %rax
movl -0x58(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x58(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
movslq 0x34(%rcx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
addq $0xba0, %rax            # imm = 0xBA0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0x350b1
movl 0x6fed(%rip), %ecx      # 0x3c084
movq -0x38(%rbp), %rax
movq (%rax), %rax
movl %ecx, 0x30(%rax)
movq -0x38(%rbp), %rax
addq $0xba0, %rax            # imm = 0xBA0
movq %rax, -0x38(%rbp)
jmp 0x35087
jmp 0x350b3
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x35041
jmp 0x350cf
jmp 0x350d1
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x35006
movl -0x58(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
popq %rbp
retq
nopw (%rax,%rax)