// File: /workspace/github_cpp_makefile_star2_O1/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), %rax
movslq 0x20(%r12), %rcx
cmpl $0x0, (%rax,%rcx,4)
jle 0xc974
xorl %eax, %eax
movq 0x28(%r12), %rdx
movq (%rdx,%rcx,8), %rcx
cltq
movslq (%rcx,%rax,4), %rsi
movl %esi, (%r13)
movq 0x38(%r12), %rax
movl (%rax,%rsi,4), %eax
cmpl 0xc0(%r12), %eax
jae 0xc938
movq %r12, %rdi
movq %r15, %rdx
callq 0xa318
movq 0x40(%rsp), %rdi
jmp 0xc94f
movq 0x40(%r12), %rcx
shlq $0x5, %rsi
movsd 0x18(%rcx,%rsi), %xmm0
movsd %xmm0, (%r15)
andl $0x3, %eax
movl %eax, (%rbp)
movsd (%rdi), %xmm0
ucomisd (%r15), %xmm0
ja 0xc974
movl (%r14), %eax
incl %eax
movl %eax, (%r14)
movq 0x30(%r12), %rdx
movslq 0x20(%r12), %rcx
cmpl (%rdx,%rcx,4), %eax
jl 0xc901
movl (%r14), %eax
movq 0x30(%r12), %rcx
movslq 0x20(%r12), %rdx
cmpl (%rcx,%rdx,4), %eax
jne 0xc9ac
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %r15, %rcx
movq 0x40(%rsp), %r8
movq %rbp, %r9
callq 0x80bc
movq 0x40(%rsp), %rdi
testb %al, %al
jne 0xcab8
movq %rbx, (%rsp)
cmpl $0x2, (%rbp)
jne 0xcabc
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), %ebx
movl (%r13), %eax
movl %eax, 0x20(%r12)
movsd (%r15), %xmm0
movsd %xmm0, (%rdi)
movl $0x0, (%r14)
movq 0x30(%r12), %rax
movslq 0x20(%r12), %rcx
cmpl $0x0, (%rax,%rcx,4)
jle 0xca7c
xorl %eax, %eax
cmpl %ebx, %eax
je 0xca65
movq 0x28(%r12), %rdx
movq (%rdx,%rcx,8), %rcx
cltq
movslq (%rcx,%rax,4), %rsi
movl %esi, (%r13)
movq 0x38(%r12), %rax
movl (%rax,%rsi,4), %eax
cmpl 0xc0(%r12), %eax
jae 0xca40
movq %r12, %rdi
movq %r15, %rdx
callq 0xa318
movq 0x40(%rsp), %rdi
jmp 0xca57
movq 0x40(%r12), %rcx
shlq $0x5, %rsi
movsd 0x18(%rcx,%rsi), %xmm0
movsd %xmm0, (%r15)
andl $0x3, %eax
movl %eax, (%rbp)
movsd (%rdi), %xmm0
ucomisd (%r15), %xmm0
ja 0xca7c
movl (%r14), %eax
incl %eax
movl %eax, (%r14)
movq 0x30(%r12), %rdx
movslq 0x20(%r12), %rcx
cmpl (%rdx,%rcx,4), %eax
jl 0xca05
movl (%r14), %eax
movq 0x30(%r12), %rcx
movslq 0x20(%r12), %rdx
cmpl (%rcx,%rdx,4), %eax
jne 0xc9b0
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %r15, %rcx
movq 0x40(%rsp), %r8
movq %rbp, %r9
callq 0x80bc
movq 0x40(%rsp), %rdi
testb %al, %al
je 0xc9b0
xorl %eax, %eax
jmp 0xcae4
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
nop