// File: /workspace/github_cpp_makefile_star2_O3/Luthaf[P]zeopp/voro++/src/cell.cc
// Function: voro::voronoicell_base::search_downward(unsigned int&, int&, int&, int&, double&, double&)
inline bool voronoicell_base::search_downward(unsigned int &lw,int &lp,int &ls,int &us,double &l,double &u) {
	int vs;

	// The test point is outside of the cutting space
	for(us=0;us<nu[up];us++) {
		lp=ed[up][us];
		lw=m_test(lp,l);
		if(u>l) break;
	}
	if(us==nu[up]) if(definite_min(lp,us,l,u,lw)) return false;

	while(lw==2) {
		//if(++count>=p) failsafe_find(lp,ls,us,l,u);

		// Test all the neighbors of the current point
		// and find the one which is closest to the
		// plane
		vs=ed[up][nu[up]+us];up=lp;u=l;
		for(us=0;us<nu[up];us++) {
			if(us==vs) continue;
			lp=ed[up][us];
			lw=m_test(lp,l);
			if(u>l) break;
		}
		if(us==nu[up]&&definite_min(lp,us,l,u,lw)) return false;
	}
	ls=ed[up][nu[up]+us];
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r15
movq %r8, %r14
movq %rcx, %rbx
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r12
movq 0x40(%rsp), %rdi
movl $0x0, (%r8)
movq 0x30(%r12), %rcx
movslq 0x20(%r12), %rdx
movl (%rcx,%rdx,4), %esi
xorl %eax, %eax
testl %esi, %esi
jle 0xc913
movq 0x28(%r12), %rsi
movq (%rsi,%rdx,8), %rdx
cltq
movslq (%rdx,%rax,4), %rsi
movl %esi, (%r13)
movq 0x38(%r12), %rax
movl (%rax,%rsi,4), %eax
cmpl 0xc0(%r12), %eax
jae 0xc8d1
movq %r12, %rdi
movq %r15, %rdx
callq 0xa220
movq 0x40(%rsp), %rdi
movsd (%r15), %xmm0
movq 0x30(%r12), %rcx
jmp 0xc8e8
movq 0x40(%r12), %rdx
shlq $0x5, %rsi
movsd 0x18(%rdx,%rsi), %xmm0
movsd %xmm0, (%r15)
andl $0x3, %eax
movl %eax, (%rbp)
movsd (%rdi), %xmm1
ucomisd %xmm0, %xmm1
movl (%r14), %eax
ja 0xc90b
incl %eax
movl %eax, (%r14)
movslq 0x20(%r12), %rdx
movl (%rcx,%rdx,4), %esi
cmpl %esi, %eax
jl 0xc890
jmp 0xc913
movslq 0x20(%r12), %rdx
movl (%rcx,%rdx,4), %esi
cmpl %esi, %eax
jne 0xc93d
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %r15, %rcx
movq 0x40(%rsp), %r8
movq %rbp, %r9
callq 0x8030
movq 0x40(%rsp), %rdi
testb %al, %al
jne 0xca53
movq %rbx, (%rsp)
cmpl $0x2, (%rbp)
jne 0xca57
movslq 0x20(%r12), %rax
movq 0x28(%r12), %rdx
movq 0x30(%r12), %rcx
movq (%rdx,%rax,8), %rdx
movslq (%rcx,%rax,4), %rax
movslq (%r14), %rsi
addq %rax, %rsi
movl (%rdx,%rsi,4), %ebx
movl (%r13), %eax
movl %eax, 0x20(%r12)
movsd (%r15), %xmm0
movsd %xmm0, (%rdi)
movl $0x0, (%r14)
movslq 0x20(%r12), %rdx
movl (%rcx,%rdx,4), %esi
xorl %eax, %eax
testl %esi, %esi
jle 0xca25
cmpl %ebx, %eax
jne 0xc99e
movl %ebx, %eax
jmp 0xca06
movq 0x28(%r12), %rsi
movq (%rsi,%rdx,8), %rdx
cltq
movslq (%rdx,%rax,4), %rsi
movl %esi, (%r13)
movq 0x38(%r12), %rax
movl (%rax,%rsi,4), %eax
cmpl 0xc0(%r12), %eax
jae 0xc9df
movq %r12, %rdi
movq %r15, %rdx
callq 0xa220
movq 0x40(%rsp), %rdi
movsd (%r15), %xmm0
movq 0x30(%r12), %rcx
jmp 0xc9f6
movq 0x40(%r12), %rdx
shlq $0x5, %rsi
movsd 0x18(%rdx,%rsi), %xmm0
movsd %xmm0, (%r15)
andl $0x3, %eax
movl %eax, (%rbp)
movsd (%rdi), %xmm1
ucomisd %xmm0, %xmm1
movl (%r14), %eax
ja 0xca1d
incl %eax
movl %eax, (%r14)
movslq 0x20(%r12), %rdx
movl (%rcx,%rdx,4), %esi
cmpl %esi, %eax
jl 0xc996
jmp 0xca25
movslq 0x20(%r12), %rdx
movl (%rcx,%rdx,4), %esi
cmpl %esi, %eax
jne 0xc941
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %r15, %rcx
movq 0x40(%rsp), %r8
movq %rbp, %r9
callq 0x8030
movq 0x40(%rsp), %rdi
testb %al, %al
je 0xc941
xorl %eax, %eax
jmp 0xca7f
movslq 0x20(%r12), %rax
movq 0x28(%r12), %rcx
movq 0x30(%r12), %rdx
movq (%rcx,%rax,8), %rcx
movslq (%rdx,%rax,4), %rax
movslq (%r14), %rdx
addq %rax, %rdx
movl (%rcx,%rdx,4), %eax
movq (%rsp), %rcx
movl %eax, (%rcx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq