// File: icemiliang[P]vot/src/vot/cell.cc
// Function: bool voro::voronoicell_base::collapse_order1<voro::voronoicell>(voro::voronoicell&)
inline bool voronoicell_base::collapse_order1(vc_class &vc) {
    int i,j,k;
    while(mec[1]>0) {
        up=0;
#if VOROPP_VERBOSE >=1
        fputs("Order one collapse\n",stderr);
#endif
        i=--mec[1];
        j=mep[1][3*i];k=mep[1][3*i+1];
        i=mep[1][3*i+2];
        if(!delete_connection(vc,j,k,false)) return false;
        --p;
        if(up==i) up=0;
        if(p!=i) {
            if(up==p) up=i;
            pts[3*i]=pts[3*p];
            pts[3*i+1]=pts[3*p+1];
            pts[3*i+2]=pts[3*p+2];
            for(k=0;k<nu[p];k++) ed[ed[p][k]][ed[p][nu[p]+k]]=i;
            vc.n_copy_pointer(i,p);
            ed[i]=ed[p];
            nu[i]=nu[p];
            ed[i][nu[i]<<1]=i;
        }
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
cmpl $0x0, 0x4(%rax)
jle 0x54718
movq -0x30(%rbp), %rdi
movl $0x0, 0x1c(%rdi)
movq 0x40(%rdi), %rcx
movl 0x4(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x4(%rcx)
movl %eax, -0x1c(%rbp)
movq 0x48(%rdi), %rax
movq 0x8(%rax), %rax
imull $0x3, -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x20(%rbp)
movq 0x48(%rdi), %rax
movq 0x8(%rax), %rax
imull $0x3, -0x1c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
movq 0x48(%rdi), %rax
movq 0x8(%rax), %rax
imull $0x3, -0x1c(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rsi
movl -0x20(%rbp), %edx
movl -0x24(%rbp), %ecx
xorl %r8d, %r8d
callq 0x54730
testb $0x1, %al
jne 0x54589
movb $0x0, -0x1(%rbp)
jmp 0x5471c
movq -0x30(%rbp), %rax
movl 0x18(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x18(%rax)
movl 0x1c(%rax), %eax
cmpl -0x1c(%rbp), %eax
jne 0x545a9
movq -0x30(%rbp), %rax
movl $0x0, 0x1c(%rax)
movq -0x30(%rbp), %rax
movl 0x18(%rax), %eax
cmpl -0x1c(%rbp), %eax
je 0x54713
movq -0x30(%rbp), %rcx
movl 0x1c(%rcx), %eax
cmpl 0x18(%rcx), %eax
jne 0x545cf
movq -0x30(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, 0x1c(%rax)
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rcx
imull $0x3, 0x18(%rax), %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x30(%rax), %rcx
imull $0x3, -0x1c(%rbp), %edx
movslq %edx, %rdx
movsd %xmm0, (%rcx,%rdx,8)
movq 0x30(%rax), %rcx
imull $0x3, 0x18(%rax), %edx
addl $0x1, %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x30(%rax), %rcx
imull $0x3, -0x1c(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movsd %xmm0, (%rcx,%rdx,8)
movq 0x30(%rax), %rcx
imull $0x3, 0x18(%rax), %edx
addl $0x2, %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x30(%rax), %rax
imull $0x3, -0x1c(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl $0x0, -0x24(%rbp)
movq -0x30(%rbp), %rdx
movl -0x24(%rbp), %eax
movq 0x28(%rdx), %rcx
movslq 0x18(%rdx), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x546ac
movq -0x30(%rbp), %rdi
movl -0x1c(%rbp), %edx
movq 0x20(%rdi), %rax
movq 0x20(%rdi), %rcx
movslq 0x18(%rdi), %rsi
movq (%rcx,%rsi,8), %rcx
movslq -0x24(%rbp), %rsi
movslq (%rcx,%rsi,4), %rcx
movq (%rax,%rcx,8), %rax
movq 0x20(%rdi), %rcx
movslq 0x18(%rdi), %rsi
movq (%rcx,%rsi,8), %rcx
movq 0x28(%rdi), %rsi
movslq 0x18(%rdi), %rdi
movl (%rsi,%rdi,4), %esi
addl -0x24(%rbp), %esi
movslq %esi, %rsi
movslq (%rcx,%rsi,4), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x54646
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl 0x18(%rax), %edx
callq 0x4bfe0
movq -0x30(%rbp), %rcx
movq 0x20(%rcx), %rax
movslq 0x18(%rcx), %rdx
movq (%rax,%rdx,8), %rsi
movq 0x20(%rcx), %rax
movslq -0x1c(%rbp), %rdx
movq %rsi, (%rax,%rdx,8)
movq 0x28(%rcx), %rax
movslq 0x18(%rcx), %rdx
movl (%rax,%rdx,4), %esi
movq 0x28(%rcx), %rax
movslq -0x1c(%rbp), %rdx
movl %esi, (%rax,%rdx,4)
movl -0x1c(%rbp), %edx
movq 0x20(%rcx), %rax
movslq -0x1c(%rbp), %rsi
movq (%rax,%rsi,8), %rax
movq 0x28(%rcx), %rcx
movslq -0x1c(%rbp), %rsi
movl (%rcx,%rsi,4), %ecx
shll %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x544f8
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)