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

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

    refmin = ref->min;

  /* Remove triangles that include ref */
    k = 0;
    for (i = 0; i < numnft; ++i)
        if (nft[i].e1 != refmin && nft[i].e2 != refmin && nft[i].e3 != refmin)
            newnft[k++] = nft[i];

  /* Add a shortcut if there is one (only possible if there are >= 2 others) */
    if (k >= 2)
    {
        w = ref->next->end;
        elast = ref->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 = ref->prev->min;
            newnft[k].e3 = ref->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)
movl $0x0, -0x48(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x36eb5
movq -0x8(%rbp), %rax
movslq -0x44(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
cmpq -0x30(%rbp), %rax
je 0x36ea5
movq -0x8(%rbp), %rax
movslq -0x44(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
cmpq -0x30(%rbp), %rax
je 0x36ea5
movq -0x8(%rbp), %rax
movslq -0x44(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
cmpq -0x30(%rbp), %rax
je 0x36ea5
movq -0x20(%rbp), %rax
movl -0x48(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x48(%rbp)
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movslq -0x44(%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 0x36ea7
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x36e11
cmpl $0x2, -0x48(%rbp)
jl 0x36f8a
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
je 0x36f1d
movq -0x38(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x4c(%rbp), %eax
jne 0x36f0d
jmp 0x36f1d
jmp 0x36f0f
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x36ef5
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
je 0x36f88
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x20(%rbp), %rax
movslq -0x48(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x28(%rax), %rcx
movq -0x20(%rbp), %rax
movslq -0x48(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rcx
movq -0x20(%rbp), %rax
movslq -0x48(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x36f8a
movl -0x48(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)