// File: /workspace/github_c_makefile_star2_O0/mishun[P]plantri/plantri.c
// Function: polygon_triang
static void
polygon_triang(int nbtot, int nbop)

/* This routine receives a 3-conn triangulation with one more vertex
   than the output size.  It then makes the polygon triangulations by
   removing inequivalent vertices of the required degree. */
{
    int i,j,j0,j1,k,v,connec;
    register EDGE **e,**nb0,**nb1,**nbnew,**nblim;
    int newnbtot,newnbop;
    int vmark[MAXN];
    EDGE *ev;

    for (v = 0; v < nv; ++v)
        if (polygonsize <= 0 || degree[v] == polygonsize) vmark[v] = 1;
	else                                              vmark[v] = 0;

    if (minimumdeg == 3 || minconnec == 3)
    {
        for (v = 0; v < nv; ++v)
	if (degree[v] == 3)
	{
	    ev = firstedge[v];
	    vmark[ev->end] = vmark[ev->next->end] = vmark[ev->prev->end] = 0;
	}
    }

    if (nbtot == 1)  /* Case of trivial group */
    {
	for (v = 0; v < nv; ++v)
	if (vmark[v])
        {
#ifdef PRE_FILTER_DISK
	    if (!PRE_FILTER_DISK(v)) continue;
#endif

	    code_edge = remove_vertex(v);

	    connec = 2;
	    if (degree[v] == 3)
		connec = 3;
	    else if (minconnec == 3 || xswitch)
                connec += disk_threeconn(code_edge);
	    if (connec >= minconnec)
	        got_one(1,1,connec);
	    insert_vertex(v);
	    code_edge = NULL;
	}
    }
    else    /* Case of non-trivial group */
    {
        nb0 = (EDGE**)numbering[0];
        nb1 = (EDGE**)saved_numbering[0];
        for (i = 0; i < nbtot; ++i, nb0 += MAXE, nb1 += MAXE)
            for (j = 0; j < ne; ++j) nb1[j] = nb0[j];

	nbnew = (EDGE**)saved_numbering[0];
	nblim = (EDGE**)saved_numbering[nbtot];
	for (k = 0; k < ne; ++k)
	{
	    v = nbnew[k]->start;
	    if (!vmark[v]) continue;    

	    newnbtot = newnbop = 0;
	    for (i = 0, e = nbnew+k; e < nblim; ++i, e += MAXE)
	    {
		vmark[(*e)->start] = 0;
	 	if ((*e)->start == v)
		{
        	    nb1 = (EDGE**)saved_numbering[i];
		    nb0 = (EDGE**)numbering[newnbtot];
		    for (j0 = j1 = 0; j1 < ne; ++j1)
			if (nb1[j1]->start != v && nb1[j1]->end != v)
			    nb0[j0++] = nb1[j1];
		    if (i < nbop) ++newnbop;
		    ++newnbtot;
		}
	    }

#ifdef PRE_FILTER_DISK
	    if (!PRE_FILTER_DISK(v)) continue;
#endif

            code_edge = remove_vertex(v);

            connec = 2;
            if (degree[v] == 3 && nv > 3)
		connec = 3;
            else if (minconnec == 3 || xswitch)
                connec += disk_threeconn(code_edge);

            if (connec >= minconnec)
                got_one(newnbtot,newnbop,connec);
            insert_vertex(v);
	    code_edge = NULL;
	}
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl 0x22ebef(%rip), %eax    # 0x25a620
jge 0x2ba7f
cmpl $0x0, 0x10776(%rip)     # 0x3c1b0
jle 0x2ba52
movslq -0x20(%rbp), %rcx
leaq 0x121b9(%rip), %rax     # 0x3dc00
movl (%rax,%rcx,4), %eax
cmpl 0x10760(%rip), %eax     # 0x3c1b0
jne 0x2ba63
movslq -0x20(%rbp), %rax
movl $0x1, -0x160(%rbp,%rax,4)
jmp 0x2ba72
movslq -0x20(%rbp), %rax
movl $0x0, -0x160(%rbp,%rax,4)
jmp 0x2ba74
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x2ba28
cmpl $0x3, 0x10732(%rip)     # 0x3c1b8
je 0x2ba95
cmpl $0x3, 0x10621(%rip)     # 0x3c0b0
jne 0x2bb2e
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl 0x22eb7b(%rip), %eax    # 0x25a620
jge 0x2bb2c
movslq -0x20(%rbp), %rcx
leaq 0x1214a(%rip), %rax     # 0x3dc00
cmpl $0x3, (%rax,%rcx,4)
jne 0x2bb1c
movslq -0x20(%rbp), %rcx
leaq 0x11f39(%rip), %rax     # 0x3da00
movq (%rax,%rcx,8), %rax
movq %rax, -0x168(%rbp)
movq -0x168(%rbp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rax), %rax
movl $0x0, -0x160(%rbp,%rax,4)
movq -0x168(%rbp), %rax
movq 0x18(%rax), %rax
movslq 0x4(%rax), %rax
movl $0x0, -0x160(%rbp,%rax,4)
movq -0x168(%rbp), %rax
movslq 0x4(%rax), %rax
movl $0x0, -0x160(%rbp,%rax,4)
jmp 0x2bb1e
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x2ba9c
jmp 0x2bb2e
cmpl $0x1, -0x4(%rbp)
jne 0x2bbf8
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl 0x22ead8(%rip), %eax    # 0x25a620
jge 0x2bbf3
movslq -0x20(%rbp), %rax
cmpl $0x0, -0x160(%rbp,%rax,4)
je 0x2bbe3
movl -0x20(%rbp), %edi
callq 0x2db40
movq %rax, 0x22eab9(%rip)    # 0x25a628
movl $0x2, -0x24(%rbp)
movslq -0x20(%rbp), %rcx
leaq 0x1207f(%rip), %rax     # 0x3dc00
cmpl $0x3, (%rax,%rcx,4)
jne 0x2bb90
movl $0x3, -0x24(%rbp)
jmp 0x2bbb6
cmpl $0x3, 0x10519(%rip)     # 0x3c0b0
je 0x2bba2
cmpl $0x0, 0x10518(%rip)     # 0x3c0b8
je 0x2bbb4
movq 0x22ea7f(%rip), %rdi    # 0x25a628
callq 0x2dc40
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x2bbb6
movl -0x24(%rbp), %eax
cmpl 0x104f1(%rip), %eax     # 0x3c0b0
jl 0x2bbd0
movl -0x24(%rbp), %edx
movl $0x1, %esi
movl %esi, %edi
callq 0x8080
movl -0x20(%rbp), %edi
callq 0x2dd90
movq $0x0, 0x22ea45(%rip) # 0x25a628
jmp 0x2bbe5
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x2bb3f
jmp 0x2beaa
leaq 0x12101(%rip), %rax     # 0x3dd00
movq %rax, -0x38(%rbp)
leaq 0x27e676(%rip), %rax    # 0x2aa280
movq %rax, -0x40(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x2bc7b
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl 0x22e9f7(%rip), %eax    # 0x25a624
jge 0x2bc52
movq -0x38(%rbp), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x40(%rbp), %rax
movslq -0x10(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2bc24
jmp 0x2bc54
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movq -0x38(%rbp), %rax
addq $0xba0, %rax            # imm = 0xBA0
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $0xba0, %rax            # imm = 0xBA0
movq %rax, -0x40(%rbp)
jmp 0x2bc15
leaq 0x27e5fe(%rip), %rax    # 0x2aa280
movq %rax, -0x48(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x27e5ef(%rip), %rax    # 0x2aa280
imulq $0xba0, %rcx, %rcx      # imm = 0xBA0
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl 0x22e975(%rip), %eax    # 0x25a624
jge 0x2bea8
movq -0x48(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl (%rax), %eax
movl %eax, -0x20(%rbp)
movslq -0x20(%rbp), %rax
cmpl $0x0, -0x160(%rbp,%rax,4)
jne 0x2bcd9
jmp 0x2be9a
movl $0x0, -0x58(%rbp)
movl $0x0, -0x54(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x48(%rbp), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x50(%rbp), %rax
jae 0x2be0f
movq -0x30(%rbp), %rax
movq (%rax), %rax
movslq (%rax), %rax
movl $0x0, -0x160(%rbp,%rax,4)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
cmpl -0x20(%rbp), %eax
jne 0x2bdf1
movslq -0xc(%rbp), %rcx
leaq 0x27e53f(%rip), %rax    # 0x2aa280
imulq $0xba0, %rcx, %rcx      # imm = 0xBA0
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movslq -0x54(%rbp), %rcx
leaq 0x11fa6(%rip), %rax     # 0x3dd00
imulq $0xba0, %rcx, %rcx      # imm = 0xBA0
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x18(%rbp), %eax
cmpl 0x22e8a5(%rip), %eax    # 0x25a624
jge 0x2bdd7
movq -0x40(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl (%rax), %eax
cmpl -0x20(%rbp), %eax
je 0x2bdca
movq -0x40(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %eax
cmpl -0x20(%rbp), %eax
je 0x2bdca
movq -0x40(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x38(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x14(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x2bdcc
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x2bd76
movl -0xc(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x2bde8
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x2bdf3
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movq -0x30(%rbp), %rax
addq $0xba0, %rax            # imm = 0xBA0
movq %rax, -0x30(%rbp)
jmp 0x2bd01
movl -0x20(%rbp), %edi
callq 0x2db40
movq %rax, 0x22e80a(%rip)    # 0x25a628
movl $0x2, -0x24(%rbp)
movslq -0x20(%rbp), %rcx
leaq 0x11dd0(%rip), %rax     # 0x3dc00
cmpl $0x3, (%rax,%rcx,4)
jne 0x2be48
cmpl $0x3, 0x22e7e3(%rip)    # 0x25a620
jle 0x2be48
movl $0x3, -0x24(%rbp)
jmp 0x2be6e
cmpl $0x3, 0x10261(%rip)     # 0x3c0b0
je 0x2be5a
cmpl $0x0, 0x10260(%rip)     # 0x3c0b8
je 0x2be6c
movq 0x22e7c7(%rip), %rdi    # 0x25a628
callq 0x2dc40
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x2be6e
movl -0x24(%rbp), %eax
cmpl 0x10239(%rip), %eax     # 0x3c0b0
jl 0x2be87
movl -0x54(%rbp), %edi
movl -0x58(%rbp), %esi
movl -0x24(%rbp), %edx
callq 0x8080
movl -0x20(%rbp), %edi
callq 0x2dd90
movq $0x0, 0x22e78e(%rip) # 0x25a628
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x2bca6
jmp 0x2beaa
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
nopw %cs:(%rax,%rax)