// File: /workspace/github_cpp_makefile_star2_O3/icemiliang[P]vot/src/vot/cell.cc
// Function: voro::voronoicell_base::face_perimeters(std::vector<double, std::allocator<double>>&)
void voronoicell_base::face_perimeters(std::vector<double> &v) {
    v.clear();
    int i,j,k,l,m;
    double dx,dy,dz,perim;
    for(i=1;i<p;i++) for(j=0;j<nu[i];j++) {
        k=ed[i][j];
        if(k>=0) {
            dx=pts[3*k]-pts[3*i];
            dy=pts[3*k+1]-pts[3*i+1];
            dz=pts[3*k+2]-pts[3*i+2];
            perim=sqrt(dx*dx+dy*dy+dz*dz);
            ed[i][j]=-1-k;
            l=cycle_up(ed[i][nu[i]+j],k);
            do {
                m=ed[k][l];
                dx=pts[3*m]-pts[3*k];
                dy=pts[3*m+1]-pts[3*k+1];
                dz=pts[3*m+2]-pts[3*k+2];
                perim+=sqrt(dx*dx+dy*dy+dz*dz);
                ed[k][l]=-1-m;
                l=cycle_up(ed[k][nu[k]+l],m);
                k=m;
            } while (k!=i);
            v.push_back(0.5*perim);
        }
    }
    reset_edges();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x1e600
movq %rax, 0x8(%r14)
movl 0x18(%rdi), %ecx
cmpl $0x2, %ecx
jl 0x1e7bd
movq 0x28(%rdi), %rax
movl $0x1, %r12d
xorl %r13d, %r13d
movsd 0x310c7(%rip), %xmm4    # 0x4f6e8
movq %rdi, 0x8(%rsp)
cmpl $0x0, (%rax,%r12,4)
jle 0x1e7ae
leaq (,%r12,8), %rcx
leaq (%rcx,%rcx,2), %rbp
xorl %r15d, %r15d
movq 0x20(%rdi), %rcx
movq (%rcx,%r12,8), %r10
movl (%r10,%r15,4), %edx
testl %edx, %edx
js 0x1e79b
movq 0x30(%rdi), %rsi
leaq (%rdx,%rdx,2), %r8
movsd (%rsi,%r8,8), %xmm0
movsd 0x8(%rsi,%r8,8), %xmm1
subsd (%rsi,%rbp), %xmm0
subsd 0x8(%rsi,%rbp), %xmm1
movsd 0x10(%rsi,%r8,8), %xmm2
subsd 0x10(%rsi,%rbp), %xmm2
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
mulsd %xmm2, %xmm2
addsd %xmm0, %xmm2
xorps %xmm0, %xmm0
sqrtsd %xmm2, %xmm0
movl %edx, %r8d
notl %r8d
movl %r8d, (%r10,%r15,4)
movslq (%rax,%r12,4), %r8
movslq %r15d, %r9
addq %r8, %r9
movl (%r10,%r9,4), %edi
movl (%rax,%rdx,4), %r9d
decl %r9d
leal 0x1(%rdi), %r8d
cmpl %edi, %r9d
cmovel %r13d, %r8d
movslq %edx, %r9
movq (%rcx,%r9,8), %rdi
movslq %r8d, %r8
movl (%rdi,%r8,4), %edx
movslq %edx, %r10
leaq (%r10,%r10,2), %r11
leal (%r9,%r9,2), %ebx
movslq %ebx, %rbx
movsd (%rsi,%r11,8), %xmm1
movsd 0x8(%rsi,%r11,8), %xmm2
subsd (%rsi,%rbx,8), %xmm1
subsd 0x8(%rsi,%rbx,8), %xmm2
movsd 0x10(%rsi,%r11,8), %xmm3
subsd 0x10(%rsi,%rbx,8), %xmm3
mulsd %xmm2, %xmm2
mulsd %xmm1, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm3, %xmm3
addsd %xmm1, %xmm3
xorps %xmm1, %xmm1
sqrtsd %xmm3, %xmm1
addsd %xmm1, %xmm0
movl %r10d, %r11d
notl %r11d
movl %r11d, (%rdi,%r8,4)
movslq (%rax,%r9,4), %r9
addq %r8, %r9
movl (%rdi,%r9,4), %edi
movl (%rax,%r10,4), %r9d
decl %r9d
leal 0x1(%rdi), %r8d
cmpl %edi, %r9d
cmovel %r13d, %r8d
cmpq %rdx, %r12
jne 0x1e6c6
mulsd %xmm4, %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x1e77d
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%r14)
movq 0x8(%rsp), %rdi
jmp 0x1e79b
movq %r14, %rdi
leaq 0x10(%rsp), %rdx
callq 0x26040
movsd 0x30f56(%rip), %xmm4    # 0x4f6e8
movq 0x8(%rsp), %rdi
movq 0x28(%rdi), %rax
incq %r15
movslq (%rax,%r12,4), %rcx
cmpq %rcx, %r15
jl 0x1e640
movl 0x18(%rdi), %ecx
incq %r12
movslq %ecx, %rdx
cmpq %rdx, %r12
jl 0x1e626
testl %ecx, %ecx
jle 0x1e802
movq 0x20(%rdi), %rax
movq 0x28(%rdi), %rdx
xorl %esi, %esi
cmpl $0x0, (%rdx,%rsi,4)
jle 0x1e7f7
movq (%rax,%rsi,8), %rcx
xorl %r9d, %r9d
movl (%rcx,%r9,4), %r8d
testl %r8d, %r8d
jns 0x1e811
notl %r8d
movl %r8d, (%rcx,%r9,4)
incq %r9
movslq (%rdx,%rsi,4), %r8
cmpq %r8, %r9
jl 0x1e7d8
movl 0x18(%rdi), %ecx
incq %rsi
movslq %ecx, %r8
cmpq %r8, %rsi
jl 0x1e7cb
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x7cd6