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

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

	while(uw==0) {
		//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[lp][nu[lp]+ls];lp=up;l=u;
		for(ls=0;ls<nu[lp];ls++) {
			if(ls==vs) continue;
			up=ed[lp][ls];
			uw=m_test(up,u);
			if(u>l) break;
		}
		if(ls==nu[lp]&&definite_max(lp,ls,l,u,uw)) {
			up=lp;
			return false;
		}
	}
	us=ed[lp][nu[lp]+ls];
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r13
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, %r15
movq 0x40(%rsp), %r8
movl 0x20(%rdi), %eax
movl %eax, (%rdx)
movsd (%r8), %xmm0
movsd %xmm0, (%r9)
movl $0x0, (%rcx)
movq 0x30(%rdi), %rcx
movslq (%rdx), %rdx
movl (%rcx,%rdx,4), %esi
xorl %eax, %eax
testl %esi, %esi
jle 0xcb4f
movq 0x28(%r15), %rsi
movq 0x38(%r15), %rdi
movq (%rsi,%rdx,8), %rdx
cltq
movslq (%rdx,%rax,4), %rsi
movl %esi, 0x20(%r15)
movl (%rdi,%rsi,4), %eax
cmpl 0xc0(%r15), %eax
jae 0xcb12
movq %r15, %rdi
movq %r8, %rdx
callq 0xa220
movq 0x40(%rsp), %r8
movsd (%r8), %xmm0
movq 0x30(%r15), %rcx
jmp 0xcb28
movq 0x40(%r15), %rdx
shlq $0x5, %rsi
movsd 0x18(%rdx,%rsi), %xmm0
movsd %xmm0, (%r8)
andl $0x3, %eax
movl %eax, (%rbp)
ucomisd (%r13), %xmm0
movl (%r14), %eax
ja 0xcb48
incl %eax
movl %eax, (%r14)
movslq (%r12), %rdx
movl (%rcx,%rdx,4), %esi
cmpl %esi, %eax
jl 0xcad5
jmp 0xcb4f
movslq (%r12), %rdx
movl (%rcx,%rdx,4), %esi
cmpl %esi, %eax
jne 0xcb79
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r13, %rcx
movq 0x40(%rsp), %r8
movq %rbp, %r9
callq 0x7c44
movq 0x40(%rsp), %r8
testb %al, %al
jne 0xcc7f
movq %rbx, (%rsp)
cmpl $0x0, (%rbp)
jne 0xcc8b
movq 0x28(%r15), %rax
movslq (%r12), %rdx
movq (%rax,%rdx,8), %rax
movq 0x30(%r15), %rcx
movslq (%rcx,%rdx,4), %rdx
movslq (%r14), %rsi
addq %rdx, %rsi
movl (%rax,%rsi,4), %ebx
movl 0x20(%r15), %eax
movl %eax, (%r12)
movsd (%r8), %xmm0
movsd %xmm0, (%r13)
movl $0x0, (%r14)
movslq (%r12), %rdx
movl (%rcx,%rdx,4), %esi
xorl %eax, %eax
testl %esi, %esi
jle 0xcc51
cmpl %ebx, %eax
jne 0xcbd7
movl %ebx, %eax
jmp 0xcc38
movq 0x28(%r15), %rsi
movq 0x38(%r15), %rdi
movq (%rsi,%rdx,8), %rdx
cltq
movslq (%rdx,%rax,4), %rsi
movl %esi, 0x20(%r15)
movl (%rdi,%rsi,4), %eax
cmpl 0xc0(%r15), %eax
jae 0xcc14
movq %r15, %rdi
movq %r8, %rdx
callq 0xa220
movq 0x40(%rsp), %r8
movsd (%r8), %xmm0
movq 0x30(%r15), %rcx
jmp 0xcc2a
movq 0x40(%r15), %rdx
shlq $0x5, %rsi
movsd 0x18(%rdx,%rsi), %xmm0
movsd %xmm0, (%r8)
andl $0x3, %eax
movl %eax, (%rbp)
ucomisd (%r13), %xmm0
movl (%r14), %eax
ja 0xcc4a
incl %eax
movl %eax, (%r14)
movslq (%r12), %rdx
movl (%rcx,%rdx,4), %esi
cmpl %esi, %eax
jl 0xcbcf
jmp 0xcc51
movslq (%r12), %rdx
movl (%rcx,%rdx,4), %esi
cmpl %esi, %eax
jne 0xcb7d
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r13, %rcx
movq 0x40(%rsp), %r8
movq %rbp, %r9
callq 0x7c44
movq 0x40(%rsp), %r8
testb %al, %al
je 0xcb7d
movl (%r12), %eax
movl %eax, 0x20(%r15)
xorl %eax, %eax
jmp 0xccb0
movslq (%r12), %rax
movq 0x28(%r15), %rcx
movq 0x30(%r15), %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