// File: /workspace/github_cpp_makefile_star2_O3/Luthaf[P]zeopp/voro++/src/cell.cc
// Function: voro::voronoicell_base::definite_max(int&, int&, double&, double&, unsigned int&)
bool voronoicell_base::definite_max(int &lp,int &ls,double &l,double &u,unsigned int &uw) {
	int tp=lp,ts,qp=0;
	unsigned int qw;
	double q;

	// Check to see whether point up is a well-defined maximum. Otherwise
	// any neighboring vertices of up that are marginal need to be
	// followed, to see if they lead to a better maximum.
	for(ts=0;ts<nu[tp];ts++) {
		qp=ed[tp][ts];
		m_test(qp,q);
		if(q>l-big_tol) break;
	}
	if(ts==nu[tp]) return true;

	// The point tp is marginal, so it will be necessary to do the
	// flood-fill search. Mark the point tp and the point qp, and search
	// any remaining neighbors of the point tp.
	int *stackp=ds+1;
	flip(lp);
	flip(qp);
	*ds=qp;
	ts++;
	while(ts<nu[tp]) {
		qp=ed[tp][ts];
		m_test(qp,q);
		if(q>l-big_tol) {
			if(stackp==stacke) add_memory_ds();
			*(stackp++)=up;
			flip(up);
		}
		ts++;
	}

	// Consider additional marginal points, starting with the original
	// point qp
	int *spp=ds;
	while(spp<stackp) {
		tp=*(spp++);
		for(ts=0;ts<nu[tp];ts++) {
			qp=ed[tp][ts];

			// Skip the point if it's already marked
			if(ed[qp][nu[qp]<<1]<0) continue;
			qw=m_test(qp,q);

			// This point is a better maximum. Reset markers and
			// return true.
			if(q>l) {
				flip(lp);
				lp=tp;
				ls=ts;
				m_test(lp,l);
				up=qp;
				uw=qw;
				u=q;
				while(stackp>ds) flip(*(--stackp));
				return false;
			}

			// The point is marginal and therefore must also be
			// considered
			if(q>l-big_tol) {
				if(stackp==stacke) {
					int nn=stackp-spp;
					add_memory_ds();
					spp=stackp-nn;
				}
				*(stackp++)=qp;
				flip(qp);
			}
		}
	}

	// Reset markers and return false
	flip(lp);
	while(stackp>ds) flip(*(--stackp));
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, 0x28(%rsp)
movq %r8, %r13
movq %rcx, %r8
movq %rdx, 0x40(%rsp)
movq %rdi, %rbx
movq %rsi, 0x10(%rsp)
movslq (%rsi), %r14
movq 0x30(%rdi), %rdi
movl (%rdi,%r14,4), %ecx
testl %ecx, %ecx
movq %r8, 0x8(%rsp)
jle 0x7cf0
xorl %r12d, %r12d
movq %rsp, %r15
movq 0x28(%rbx), %rcx
movq 0x38(%rbx), %rdx
movq (%rcx,%r14,8), %rcx
movl (%rcx,%r12,4), %ebp
movslq %ebp, %rcx
movl (%rdx,%rcx,4), %edx
cmpl 0xc0(%rbx), %edx
jae 0x7cbf
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0xa220
movq 0x8(%rsp), %r8
movsd (%rsp), %xmm0
movq 0x30(%rbx), %rdi
jmp 0x7cd2
movq 0x40(%rbx), %rdx
shlq $0x5, %rcx
movsd 0x18(%rdx,%rcx), %xmm0
movsd %xmm0, (%rsp)
movsd (%r8), %xmm1
subsd 0x58(%rbx), %xmm1
ucomisd %xmm1, %xmm0
ja 0x7cf7
incq %r12
movslq (%rdi,%r14,4), %rcx
cmpq %rcx, %r12
jl 0x7c84
jmp 0x7cfb
xorl %r12d, %r12d
xorl %ebp, %ebp
jmp 0x7cfb
movl (%rdi,%r14,4), %ecx
movb $0x1, %al
cmpl %ecx, %r12d
je 0x8020
movq %r13, 0x38(%rsp)
movq 0x28(%rbx), %rcx
movq 0x78(%rbx), %rax
leaq 0x4(%rax), %r13
movq 0x10(%rsp), %rdx
movslq (%rdx), %rdx
movq (%rcx,%rdx,8), %rsi
movl (%rdi,%rdx,4), %edx
addl %edx, %edx
movslq %edx, %rdx
notl (%rsi,%rdx,4)
movslq %ebp, %rdx
movq (%rcx,%rdx,8), %rcx
movl (%rdi,%rdx,4), %esi
addl %esi, %esi
movslq %esi, %rsi
notl (%rcx,%rsi,4)
movl %edx, (%rax)
leal 0x1(%r12), %ecx
cmpl (%rdi,%r14,4), %ecx
jge 0x7e0c
movl %r12d, %r12d
incq %r12
movq %rsp, %r15
movq 0x28(%rbx), %rax
movq 0x38(%rbx), %rcx
movq (%rax,%r14,8), %rax
movslq (%rax,%r12,4), %rsi
movl (%rcx,%rsi,4), %eax
cmpl 0xc0(%rbx), %eax
jae 0x7d8c
movq %rbx, %rdi
movq %r15, %rdx
callq 0xa220
movq 0x8(%rsp), %r8
movsd (%rsp), %xmm0
jmp 0x7d9f
movq 0x40(%rbx), %rax
shlq $0x5, %rsi
movsd 0x18(%rax,%rsi), %xmm0
movsd %xmm0, (%rsp)
movsd (%r8), %xmm1
subsd 0x58(%rbx), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x7ddd
cmpq 0x88(%rbx), %r13
je 0x7df0
movslq 0x20(%rbx), %rcx
movl %ecx, (%r13)
addq $0x4, %r13
movq 0x28(%rbx), %rdx
movq 0x30(%rbx), %rdi
movq (%rdx,%rcx,8), %rdx
movl (%rdi,%rcx,4), %ecx
addl %ecx, %ecx
movslq %ecx, %rcx
notl (%rdx,%rcx,4)
jmp 0x7de1
movq 0x30(%rbx), %rdi
incq %r12
cmpl %r12d, (%rdi,%r14,4)
jg 0x7d5a
jmp 0x7dff
movq %rbx, %rdi
callq 0x2410
movq 0x8(%rsp), %r8
jmp 0x7db8
movq 0x78(%rbx), %rax
cmpq %r13, %rax
jae 0x7f41
movl (%rax), %ecx
addq $0x4, %rax
movq %rax, 0x18(%rsp)
movslq %ecx, %rsi
cmpl $0x0, (%rdi,%rsi,4)
jle 0x7f2f
movl %ecx, 0x24(%rsp)
xorl %r15d, %r15d
movq %rsi, 0x30(%rsp)
movq 0x28(%rbx), %rcx
movq (%rcx,%rsi,8), %rdx
movl (%rdx,%r15,4), %ebp
movslq %ebp, %r12
movq (%rcx,%r12,8), %rcx
movl (%rdi,%r12,4), %edx
addl %edx, %edx
movslq %edx, %rdx
cmpl $0x0, (%rcx,%rdx,4)
js 0x7eeb
movq 0x38(%rbx), %rax
movl (%rax,%r12,4), %r14d
cmpl 0xc0(%rbx), %r14d
jae 0x7e88
movq %rbx, %rdi
movl %ebp, %esi
movq %rsp, %rdx
callq 0xa220
movq 0x30(%rsp), %rsi
movq 0x8(%rsp), %r8
movl %eax, %r14d
movsd (%rsp), %xmm1
jmp 0x7ea2
movq 0x40(%rbx), %rax
movq %r12, %rcx
shlq $0x5, %rcx
movsd 0x18(%rax,%rcx), %xmm1
movsd %xmm1, (%rsp)
andl $0x3, %r14d
movsd (%r8), %xmm0
ucomisd %xmm0, %xmm1
ja 0x7f6f
subsd 0x58(%rbx), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x7ee7
cmpq 0x88(%rbx), %r13
je 0x7efd
movl %ebp, (%r13)
addq $0x4, %r13
movq 0x28(%rbx), %rcx
movq 0x30(%rbx), %rdi
movq (%rcx,%r12,8), %rcx
movl (%rdi,%r12,4), %edx
addl %edx, %edx
movslq %edx, %rdx
notl (%rcx,%rdx,4)
jmp 0x7eeb
movq 0x30(%rbx), %rdi
incq %r15
movslq (%rdi,%rsi,4), %rcx
cmpq %rcx, %r15
jl 0x7e30
jmp 0x7f2f
movq %r13, %r14
subq 0x18(%rsp), %r14
movq %rbx, %rdi
callq 0x2410
movq 0x30(%rsp), %rsi
movq 0x8(%rsp), %r8
shrq $0x2, %r14
movslq %r14d, %rax
shlq $0x2, %rax
movq %r13, %rcx
subq %rax, %rcx
movq %rcx, 0x18(%rsp)
jmp 0x7ec5
movq 0x18(%rsp), %rax
cmpq %r13, %rax
jb 0x7e0c
movq 0x78(%rbx), %rax
movq 0x10(%rsp), %rcx
movslq (%rcx), %rdx
movq 0x28(%rbx), %rcx
movq (%rcx,%rdx,8), %rsi
movl (%rdi,%rdx,4), %edx
addl %edx, %edx
movslq %edx, %rdx
notl (%rsi,%rdx,4)
cmpq %rax, %r13
jbe 0x801e
movslq -0x4(%r13), %rdx
addq $-0x4, %r13
jmp 0x7f4d
movq 0x10(%rsp), %rsi
movslq (%rsi), %rax
movq 0x28(%rbx), %rcx
movq 0x30(%rbx), %rdx
movq (%rcx,%rax,8), %rcx
movl (%rdx,%rax,4), %eax
addl %eax, %eax
cltq
notl (%rcx,%rax,4)
movl 0x24(%rsp), %eax
movl %eax, (%rsi)
movq 0x40(%rsp), %rax
movl %r15d, (%rax)
movslq (%rsi), %rsi
movq 0x38(%rbx), %rax
movl (%rax,%rsi,4), %eax
cmpl 0xc0(%rbx), %eax
jae 0x7fc6
movq %rbx, %rdi
movq %r8, %rdx
movsd %xmm1, 0x8(%rsp)
callq 0xa220
movsd 0x8(%rsp), %xmm1
jmp 0x7fd9
movq 0x40(%rbx), %rax
shlq $0x5, %rsi
movsd 0x18(%rax,%rsi), %xmm0
movsd %xmm0, (%r8)
movq 0x28(%rsp), %rax
movl %ebp, 0x20(%rbx)
movl %r14d, (%rax)
movq 0x38(%rsp), %rax
movsd %xmm1, (%rax)
movq 0x78(%rbx), %rax
cmpq %rax, %r13
jbe 0x801a
movq 0x28(%rbx), %rcx
movq 0x30(%rbx), %rdx
movslq -0x4(%r13), %rsi
addq $-0x4, %r13
movq (%rcx,%rsi,8), %rdi
movl (%rdx,%rsi,4), %esi
addl %esi, %esi
movslq %esi, %rsi
notl (%rdi,%rsi,4)
cmpq %rax, %r13
ja 0x7ffe
xorl %eax, %eax
jmp 0x8020
movb $0x1, %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop