// File: /workspace/github_cpp_makefile_star2_O1/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 $0x28, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x1e581
movq %rax, 0x8(%r15)
movl 0x18(%rbx), %eax
cmpl $0x2, %eax
jl 0x1e783
movl $0x1, %r12d
movq %r15, (%rsp)
movq 0x28(%rbx), %rax
cmpl $0x0, (%rax,%r12,4)
jle 0x1e773
leaq (,%r12,8), %rax
leaq (%rax,%rax,2), %rax
movq %rax, 0x8(%rsp)
xorl %r13d, %r13d
movq 0x20(%rbx), %rax
movq (%rax,%r12,8), %rax
movl (%rax,%r13,4), %r14d
testl %r14d, %r14d
js 0x1e75f
movq 0x30(%rbx), %rax
leaq (%r14,%r14,2), %rcx
movsd (%rax,%rcx,8), %xmm1
movsd 0x8(%rax,%rcx,8), %xmm2
movq 0x8(%rsp), %rdx
subsd (%rax,%rdx), %xmm1
subsd 0x8(%rax,%rdx), %xmm2
movsd 0x10(%rax,%rcx,8), %xmm0
subsd 0x10(%rax,%rdx), %xmm0
mulsd %xmm2, %xmm2
mulsd %xmm1, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
ucomisd 0x2c52e(%rip), %xmm0    # 0x4ab48
jb 0x1e625
xorps %xmm3, %xmm3
sqrtsd %xmm0, %xmm3
jmp 0x1e62e
callq 0x72d0
movapd %xmm0, %xmm3
movl %r14d, %eax
notl %eax
movq 0x20(%rbx), %rcx
movq (%rcx,%r12,8), %rcx
movl %eax, (%rcx,%r13,4)
movq 0x28(%rbx), %rax
movslq (%rax,%r12,4), %rdx
movq %r13, 0x10(%rsp)
movslq %r13d, %rsi
addq %rdx, %rsi
movl (%rcx,%rsi,4), %ecx
movl (%rax,%r14,4), %edx
decl %edx
leal 0x1(%rcx), %eax
cmpl %ecx, %edx
movl $0x0, %ecx
cmovel %ecx, %eax
movslq %r14d, %r15
movq 0x20(%rbx), %rcx
movq 0x30(%rbx), %rdx
movq (%rcx,%r15,8), %rcx
movslq %eax, %r13
movl (%rcx,%r13,4), %r14d
movslq %r14d, %rbp
leaq (%rbp,%rbp,2), %rax
leal (%r15,%r15,2), %ecx
movslq %ecx, %rcx
movsd (%rdx,%rax,8), %xmm1
movsd 0x8(%rdx,%rax,8), %xmm2
subsd (%rdx,%rcx,8), %xmm1
subsd 0x8(%rdx,%rcx,8), %xmm2
movsd 0x10(%rdx,%rax,8), %xmm0
subsd 0x10(%rdx,%rcx,8), %xmm0
mulsd %xmm2, %xmm2
mulsd %xmm1, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
ucomisd 0x2c47d(%rip), %xmm0    # 0x4ab48
jb 0x1e6d3
sqrtsd %xmm0, %xmm0
jmp 0x1e6e4
movsd %xmm3, 0x18(%rsp)
callq 0x72d0
movsd 0x18(%rsp), %xmm3
addsd %xmm0, %xmm3
movl %ebp, %eax
notl %eax
movq 0x20(%rbx), %rcx
movq (%rcx,%r15,8), %rcx
movl %eax, (%rcx,%r13,4)
movq 0x28(%rbx), %rax
movslq (%rax,%r15,4), %rdx
addq %r13, %rdx
movl (%rcx,%rdx,4), %ecx
movl (%rax,%rbp,4), %edx
decl %edx
leal 0x1(%rcx), %eax
cmpl %ecx, %edx
movl $0x0, %ecx
cmovel %ecx, %eax
movl %ebp, %ecx
cmpq %rcx, %r12
jne 0x1e668
mulsd 0x30e4d(%rip), %xmm3    # 0x4f578
movsd %xmm3, 0x20(%rsp)
movq (%rsp), %r15
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x1e74d
movsd %xmm3, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%r15)
jmp 0x1e75a
movq %r15, %rdi
leaq 0x20(%rsp), %rdx
callq 0x25d84
movq 0x10(%rsp), %r13
incq %r13
movq 0x28(%rbx), %rax
movslq (%rax,%r12,4), %rax
cmpq %rax, %r13
jl 0x1e5ba
incq %r12
movslq 0x18(%rbx), %rax
cmpq %rax, %r12
jl 0x1e597
testl %eax, %eax
jle 0x1e7c5
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
xorl %edx, %edx
cmpl $0x0, (%rcx,%rdx,4)
jle 0x1e7b9
movq (%rax,%rdx,8), %rsi
xorl %edi, %edi
movl (%rsi,%rdi,4), %r8d
testl %r8d, %r8d
jns 0x1e7d4
notl %r8d
movl %r8d, (%rsi,%rdi,4)
incq %rdi
movslq (%rcx,%rdx,4), %r8
cmpq %r8, %rdi
jl 0x1e79d
incq %rdx
movslq 0x18(%rbx), %rsi
cmpq %rsi, %rdx
jl 0x1e791
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x7cc8
nop