// File: /workspace/github_c_makefile_star2_O0/mishun[P]plantri/plantri.c
// Function: update_nft_five
static void
update_nft_five(triangle nft[], int numnft, EDGE *ref,
                triangle newnft[], int *newnumnft)

/* Make new list of non-facial triangles after a five-extension. */
{
    EDGE *refmin,*amin,*e,*elast,*ee;
    int i,k,w,j;

    refmin = ref->min;
    amin = ref->next->next->min;

  /* Remove triangles that include either of the former two chords */
    k = 0;
    for (i = 0; i < numnft; ++i)
        if (nft[i].e1 != refmin && nft[i].e2 != refmin && nft[i].e3 != refmin
                && nft[i].e1 != amin && nft[i].e2 != amin && nft[i].e3 != amin)
            newnft[k++] = nft[i];

  /* Add a shortcut if there is one (only possible if there is another) */

    if (k == 0)
    {
        *newnumnft = 0;
        return;
    }

    for (ee = ref->prev->prev, j = 0; j < 3; ee = ee->next->next, ++j)
    {
        w = ee->next->end;
        elast = ee->invers->next->invers;
        for (e = elast->next->next->next; e != elast; e = e->next)
            if (e->end == w) break;
        if (e != elast)
        {
            newnft[k].e1 = e->min;
            newnft[k].e2 = ee->prev->min;
            newnft[k].e3 = ee->next->min;
            ++k;
        }
    }
    *newnumnft = k;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x58(%rbp)
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x370df
movq -0x8(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
cmpq -0x30(%rbp), %rax
je 0x370cf
movq -0x8(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
cmpq -0x30(%rbp), %rax
je 0x370cf
movq -0x8(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
cmpq -0x30(%rbp), %rax
je 0x370cf
movq -0x8(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
cmpq -0x38(%rbp), %rax
je 0x370cf
movq -0x8(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
cmpq -0x38(%rbp), %rax
je 0x370cf
movq -0x8(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
cmpq -0x38(%rbp), %rax
je 0x370cf
movq -0x20(%rbp), %rax
movl -0x58(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x58(%rbp)
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movslq -0x54(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
jmp 0x370d1
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x36fe5
cmpl $0x0, -0x58(%rbp)
jne 0x370f4
movq -0x28(%rbp), %rax
movl $0x0, (%rax)
jmp 0x37207
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0x60(%rbp)
cmpl $0x3, -0x60(%rbp)
jge 0x371fe
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax), %eax
movl %eax, -0x5c(%rbp)
movq -0x50(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
je 0x37173
movq -0x40(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x5c(%rbp), %eax
jne 0x37163
jmp 0x37173
jmp 0x37165
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x3714b
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
je 0x371de
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x20(%rbp), %rax
movslq -0x58(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x28(%rax), %rcx
movq -0x20(%rbp), %rax
movslq -0x58(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rcx
movq -0x20(%rbp), %rax
movslq -0x58(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x371e0
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x50(%rbp)
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x3710b
movl -0x58(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
popq %rbp
retq
nopl (%rax)