// File: Luthaf[P]zeopp/voro++/src/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[k<<2]-pts[i<<2];
			dy=pts[(k<<2)+1]-pts[(i<<2)+1];
			dz=pts[(k<<2)+2]-pts[(i<<2)+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[m<<2]-pts[k<<2];
				dy=pts[(m<<2)+1]-pts[(k<<2)+1];
				dz=pts[(m<<2)+2]-pts[(k<<2)+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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
callq 0x16860
movl $0x1, -0x14(%rbp)
movq -0x58(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x1c(%rcx), %eax
jge 0xd011
movl $0x0, -0x18(%rbp)
movq -0x58(%rbp), %rcx
movl -0x18(%rbp), %eax
movq 0x30(%rcx), %rcx
movslq -0x14(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0xd001
movq -0x58(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jl 0xcff1
movq -0x58(%rbp), %rax
movq 0x40(%rax), %rcx
movl -0x1c(%rbp), %edx
shll $0x2, %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x40(%rax), %rcx
movl -0x14(%rbp), %edx
shll $0x2, %edx
movslq %edx, %rdx
subsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, -0x30(%rbp)
movq 0x40(%rax), %rcx
movl -0x1c(%rbp), %edx
shll $0x2, %edx
addl $0x1, %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x40(%rax), %rcx
movl -0x14(%rbp), %edx
shll $0x2, %edx
addl $0x1, %edx
movslq %edx, %rdx
subsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, -0x38(%rbp)
movq 0x40(%rax), %rcx
movl -0x1c(%rbp), %edx
shll $0x2, %edx
addl $0x2, %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x40(%rax), %rax
movl -0x14(%rbp), %ecx
shll $0x2, %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
subsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x30(%rbp), %xmm1
movsd -0x30(%rbp), %xmm2
movsd -0x38(%rbp), %xmm0
mulsd -0x38(%rbp), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd -0x40(%rbp), %xmm0
movsd -0x40(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x20f0
movq -0x58(%rbp), %rdi
movsd %xmm0, -0x48(%rbp)
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
subl -0x1c(%rbp), %edx
movq 0x28(%rdi), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x18(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x28(%rdi), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x30(%rdi), %rcx
movslq -0x14(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
addl -0x18(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %esi
movl -0x1c(%rbp), %edx
callq 0x15f00
movl %eax, -0x20(%rbp)
movq -0x58(%rbp), %rax
movq 0x28(%rax), %rcx
movslq -0x1c(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x20(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
movl %ecx, -0x24(%rbp)
movq 0x40(%rax), %rcx
movl -0x24(%rbp), %edx
shll $0x2, %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x40(%rax), %rcx
movl -0x1c(%rbp), %edx
shll $0x2, %edx
movslq %edx, %rdx
subsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, -0x30(%rbp)
movq 0x40(%rax), %rcx
movl -0x24(%rbp), %edx
shll $0x2, %edx
addl $0x1, %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x40(%rax), %rcx
movl -0x1c(%rbp), %edx
shll $0x2, %edx
addl $0x1, %edx
movslq %edx, %rdx
subsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, -0x38(%rbp)
movq 0x40(%rax), %rcx
movl -0x24(%rbp), %edx
shll $0x2, %edx
addl $0x2, %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x40(%rax), %rax
movl -0x1c(%rbp), %ecx
shll $0x2, %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
subsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x30(%rbp), %xmm1
movsd -0x30(%rbp), %xmm2
movsd -0x38(%rbp), %xmm0
mulsd -0x38(%rbp), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd -0x40(%rbp), %xmm0
movsd -0x40(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x20f0
movq -0x58(%rbp), %rdi
addsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
subl -0x24(%rbp), %edx
movq 0x28(%rdi), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x20(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x28(%rdi), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x30(%rdi), %rcx
movslq -0x1c(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
addl -0x20(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %esi
movl -0x24(%rbp), %edx
callq 0x15f00
movl %eax, -0x20(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jne 0xce98
movq -0x10(%rbp), %rdi
movsd 0x49052(%rip), %xmm0    # 0x56030
mulsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
leaq -0x50(%rbp), %rsi
callq 0x16880
jmp 0xcff3
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xcd4f
jmp 0xd003
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xcd38
movq -0x58(%rbp), %rdi
callq 0x15f40
addq $0x60, %rsp
popq %rbp
retq