// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/voro++/src/cell.cc
// Function: voro::voronoicell_base::normals_search(std::vector<double, std::allocator<double>>&, int, int, int)
inline void voronoicell_base::normals_search(std::vector<double> &v,int i,int j,int k) {
	ed[i][j]=-1-k;
	int l=cycle_up(ed[i][nu[i]+j],k),m;
	double ux,uy,uz,vx,vy,vz,wx,wy,wz,wmag;
	do {
		m=ed[k][l];ed[k][l]=-1-m;
		ux=pts[4*m]-pts[4*k];
		uy=pts[4*m+1]-pts[4*k+1];
		uz=pts[4*m+2]-pts[4*k+2];

		// Test to see if the length of this edge is above the tolerance
		if(ux*ux+uy*uy+uz*uz>tol) {
			while(m!=i) {
				l=cycle_up(ed[k][nu[k]+l],m);
				k=m;m=ed[k][l];ed[k][l]=-1-m;
				vx=pts[4*m]-pts[4*k];
				vy=pts[4*m+1]-pts[4*k+1];
				vz=pts[4*m+2]-pts[4*k+2];

				// Construct the vector product of this edge with
				// the previous one
				wx=uz*vy-uy*vz;
				wy=ux*vz-uz*vx;
				wz=uy*vx-ux*vy;
				wmag=wx*wx+wy*wy+wz*wz;

				// Test to see if this vector product of the
				// two edges is above the tolerance
				if(wmag>tol) {

					// Construct the normal vector and print it
					wmag=1/sqrt(wmag);
					v.push_back(wx*wmag);
					v.push_back(wy*wmag);
					v.push_back(wz*wmag);

					// Mark all of the remaining edges of this
					// face and exit
					while(m!=i) {
						l=cycle_up(ed[k][nu[k]+l],m);
						k=m;m=ed[k][l];ed[k][l]=-1-m;
					}
					return;
				}
			}
			v.push_back(0);
			v.push_back(0);
			v.push_back(0);
			return;
		}
		l=cycle_up(ed[k][nu[k]+l],m);
		k=m;
	} while (k!=i);
	v.push_back(0);
	v.push_back(0);
	v.push_back(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movl %r8d, %edx
notl %edx
movq 0x28(%rdi), %rax
movslq %ebp, %rsi
movq (%rax,%rsi,8), %r10
movslq %ecx, %r9
movl %edx, (%r10,%r9,4)
movq 0x30(%rdi), %rcx
movq 0x40(%rdi), %rdx
movslq (%rcx,%rsi,4), %rsi
addq %r9, %rsi
movl (%r10,%rsi,4), %r10d
movslq %r8d, %rsi
movl (%rcx,%rsi,4), %r9d
decl %r9d
leal 0x1(%r10), %r15d
xorl %esi, %esi
cmpl %r10d, %r9d
cmovel %esi, %r15d
movq %rdi, 0x30(%rsp)
movsd 0x48(%rdi), %xmm1
movslq %r8d, %r11
movq (%rax,%r11,8), %r9
movslq %r15d, %r10
movl (%r9,%r10,4), %r12d
movslq %r12d, %r14
movl %r14d, %r13d
notl %r13d
movl %r13d, (%r9,%r10,4)
leaq (,%r14,4), %r13
movq %r14, %rdi
shlq $0x5, %rdi
movsd (%rdx,%rdi), %xmm2
leal (,%r11,4), %edi
movslq %edi, %rdi
subsd (%rdx,%rdi,8), %xmm2
leal 0x1(%r13), %edi
movslq %edi, %rdi
movsd (%rdx,%rdi,8), %xmm3
leal 0x1(,%r11,4), %edi
movslq %edi, %rdi
subsd (%rdx,%rdi,8), %xmm3
orl $0x2, %r13d
movslq %r13d, %rdi
movsd (%rdx,%rdi,8), %xmm4
leal 0x2(,%r11,4), %edi
movslq %edi, %rdi
subsd (%rdx,%rdi,8), %xmm4
movapd %xmm3, %xmm0
mulsd %xmm3, %xmm0
movapd %xmm2, %xmm5
mulsd %xmm2, %xmm5
addsd %xmm0, %xmm5
movapd %xmm4, %xmm0
mulsd %xmm4, %xmm0
addsd %xmm5, %xmm0
ucomisd %xmm1, %xmm0
ja 0x11bc7
movslq (%rcx,%r11,4), %rdi
addq %r10, %rdi
movl (%r9,%rdi,4), %edi
movl (%rcx,%r14,4), %r8d
decl %r8d
leal 0x1(%rdi), %r15d
cmpl %edi, %r8d
cmovel %esi, %r15d
movl %r12d, %r8d
cmpl %ebp, %r14d
jne 0x11ad6
movq $0x0, 0x8(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x11d19
movq $0x0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x11d26
movapd 0x25461(%rip), %xmm5    # 0x37030
movapd %xmm3, %xmm6
xorpd %xmm5, %xmm6
movapd %xmm4, %xmm7
xorpd %xmm5, %xmm7
xorpd %xmm2, %xmm5
xorl %esi, %esi
cmpl %ebp, %r12d
je 0x11b9c
movl %r12d, %r13d
movslq %r8d, %rdi
movq (%rax,%rdi,8), %r8
movslq (%rcx,%rdi,4), %rdi
movslq %r15d, %r9
addq %rdi, %r9
movl (%r8,%r9,4), %edi
movslq %r12d, %r8
movl (%rcx,%r8,4), %r9d
decl %r9d
leal 0x1(%rdi), %r15d
cmpl %edi, %r9d
cmovel %esi, %r15d
movq (%rax,%r8,8), %rdi
movslq %r15d, %r8
movslq (%rdi,%r8,4), %r12
movl %r12d, %r9d
notl %r9d
movl %r9d, (%rdi,%r8,4)
movq %r12, %rdi
shlq $0x5, %rdi
movsd (%rdx,%rdi), %xmm0
leal (,%r13,4), %edi
movslq %edi, %rdi
subsd (%rdx,%rdi,8), %xmm0
leaq (,%r12,4), %rdi
leal 0x1(%rdi), %r8d
movslq %r8d, %r8
movsd (%rdx,%r8,8), %xmm9
leal 0x1(,%r13,4), %r8d
movslq %r8d, %r8
subsd (%rdx,%r8,8), %xmm9
orl $0x2, %edi
movslq %edi, %rdi
movsd (%rdx,%rdi,8), %xmm10
leal 0x2(,%r13,4), %edi
movslq %edi, %rdi
subsd (%rdx,%rdi,8), %xmm10
movapd %xmm10, %xmm8
mulsd %xmm6, %xmm8
movapd %xmm4, %xmm11
mulsd %xmm9, %xmm11
addsd %xmm8, %xmm11
movapd %xmm3, %xmm8
mulsd %xmm0, %xmm8
mulsd %xmm7, %xmm0
mulsd %xmm2, %xmm10
addsd %xmm0, %xmm10
mulsd %xmm5, %xmm9
addsd %xmm8, %xmm9
movapd %xmm10, %xmm0
mulsd %xmm10, %xmm0
movapd %xmm11, %xmm8
mulsd %xmm11, %xmm8
addsd %xmm0, %xmm8
movapd %xmm9, %xmm0
mulsd %xmm9, %xmm0
addsd %xmm8, %xmm0
ucomisd %xmm1, %xmm0
movl %r13d, %r8d
jbe 0x11be5
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movsd %xmm9, 0x18(%rsp)
jb 0x11d90
sqrtsd %xmm0, %xmm0
jmp 0x11db8
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x11ffa
movq $0x0, 0x8(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x11d4a
movq $0x0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x11d57
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x11ffa
movq $0x0, 0x8(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x11d7e
movq $0x0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x11eec
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x11ffa
jmp 0x11eec
movsd %xmm10, 0x10(%rsp)
movapd %xmm11, 0x20(%rsp)
callq 0x20f0
movapd 0x20(%rsp), %xmm11
movsd 0x10(%rsp), %xmm10
movsd 0x18(%rsp), %xmm9
movsd 0x25248(%rip), %xmm1    # 0x37008
divsd %xmm0, %xmm1
mulsd %xmm1, %xmm11
movsd %xmm11, 0x8(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x11de9
movsd %xmm11, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x11e17
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movsd %xmm10, 0x10(%rsp)
movsd %xmm1, 0x20(%rsp)
callq 0x11ffa
movsd 0x20(%rsp), %xmm1
movsd 0x10(%rsp), %xmm10
movsd 0x18(%rsp), %xmm9
mulsd %xmm1, %xmm10
movsd %xmm10, 0x8(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x11e3c
movsd %xmm10, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x11e5c
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movsd %xmm1, 0x20(%rsp)
callq 0x11ffa
movsd 0x20(%rsp), %xmm1
movsd 0x18(%rsp), %xmm9
mulsd %xmm1, %xmm9
movsd %xmm9, 0x8(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x11e81
movsd %xmm9, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x11e8e
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x11ffa
cmpl %ebp, %r12d
je 0x11eec
movq 0x30(%rsp), %rcx
movq 0x28(%rcx), %rax
movq 0x30(%rcx), %rcx
xorl %edx, %edx
movslq %r13d, %rsi
movq (%rax,%rsi,8), %rdi
movslq (%rcx,%rsi,4), %rsi
movslq %r15d, %r8
addq %rsi, %r8
movl (%rdi,%r8,4), %esi
movslq %r12d, %rdi
movl (%rcx,%rdi,4), %r8d
decl %r8d
leal 0x1(%rsi), %r15d
cmpl %esi, %r8d
cmovel %edx, %r15d
movq (%rax,%rdi,8), %rsi
movslq %r15d, %rdi
movl (%rsi,%rdi,4), %r8d
movl %r12d, %r13d
movl %r8d, %r12d
movl %r8d, %r9d
notl %r9d
movl %r9d, (%rsi,%rdi,4)
cmpl %ebp, %r8d
jne 0x11ea2
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop