// File: /workspace/github_cpp_makefile_star2_O1/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), %r15
movq 0x30(%rdi), %rax
cmpl $0x0, (%rax,%r15,4)
movq %rcx, 0x8(%rsp)
jle 0x7d69
xorl %r12d, %r12d
movq %rsp, %r14
movq 0x28(%rbx), %rax
movq 0x38(%rbx), %rcx
movq (%rax,%r15,8), %rax
movl (%rax,%r12,4), %ebp
movslq %ebp, %rax
movl (%rcx,%rax,4), %ecx
cmpl 0xc0(%rbx), %ecx
jae 0x7d2f
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0xa318
movq 0x8(%rsp), %r8
jmp 0x7d42
movq 0x40(%rbx), %rcx
shlq $0x5, %rax
movsd 0x18(%rcx,%rax), %xmm0
movsd %xmm0, (%rsp)
movsd (%rsp), %xmm0
movsd (%r8), %xmm1
subsd 0x58(%rbx), %xmm1
ucomisd %xmm1, %xmm0
ja 0x7d6e
incq %r12
movq 0x30(%rbx), %rax
movslq (%rax,%r15,4), %rax
cmpq %rax, %r12
jl 0x7cfd
jmp 0x7d6e
xorl %r12d, %r12d
xorl %ebp, %ebp
movq 0x30(%rbx), %r9
movb $0x1, %al
cmpl (%r9,%r15,4), %r12d
je 0x80ac
movq %r13, 0x38(%rsp)
movq 0x28(%rbx), %rcx
movq 0x78(%rbx), %rdx
leaq 0x4(%rdx), %r13
movq 0x10(%rsp), %rsi
movslq (%rsi), %rsi
movq (%rcx,%rsi,8), %rdi
movl (%r9,%rsi,4), %esi
addl %esi, %esi
movslq %esi, %rsi
notl (%rdi,%rsi,4)
movslq %ebp, %rsi
movq (%rcx,%rsi,8), %rcx
movl (%r9,%rsi,4), %eax
addl %eax, %eax
cltq
notl (%rcx,%rax,4)
movl %esi, (%rdx)
leal 0x1(%r12), %eax
movq 0x30(%rbx), %rcx
cmpl (%rcx,%r15,4), %eax
jge 0x7e7c
movl %r12d, %r12d
incq %r12
movq %rsp, %r14
movq 0x28(%rbx), %rax
movq 0x38(%rbx), %rcx
movq (%rax,%r15,8), %rax
movslq (%rax,%r12,4), %rsi
movl (%rcx,%rsi,4), %eax
cmpl 0xc0(%rbx), %eax
jae 0x7e04
movq %rbx, %rdi
movq %r14, %rdx
callq 0xa318
movq 0x8(%rsp), %r8
jmp 0x7e17
movq 0x40(%rbx), %rax
shlq $0x5, %rsi
movsd 0x18(%rax,%rsi), %xmm0
movsd %xmm0, (%rsp)
movsd (%rsp), %xmm0
movsd (%r8), %xmm1
subsd 0x58(%rbx), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x7e5a
cmpq 0x88(%rbx), %r13
je 0x7e6d
movl 0x20(%rbx), %eax
movl %eax, (%r13)
addq $0x4, %r13
movslq 0x20(%rbx), %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)
incq %r12
movq 0x30(%rbx), %rax
cmpl %r12d, (%rax,%r15,4)
jg 0x7dd7
jmp 0x7e7c
movq %rbx, %rdi
callq 0x2404
movq 0x8(%rsp), %r8
jmp 0x7e35
movq 0x78(%rbx), %rax
cmpq %r13, %rax
jae 0x7fb7
movl (%rax), %ecx
addq $0x4, %rax
movq %rax, 0x18(%rsp)
movslq %ecx, %rsi
movq 0x30(%rbx), %rax
cmpl $0x0, (%rax,%rsi,4)
jle 0x7fad
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 (%rax,%r12,4), %eax
addl %eax, %eax
cltq
cmpl $0x0, (%rcx,%rax,4)
js 0x7f65
movq 0x38(%rbx), %rax
movl (%rax,%r12,4), %r14d
cmpl 0xc0(%rbx), %r14d
jae 0x7f03
movq %rbx, %rdi
movl %ebp, %esi
movq %rsp, %rdx
callq 0xa318
movq 0x30(%rsp), %rsi
movq 0x8(%rsp), %r8
movl %eax, %r14d
jmp 0x7f1d
movq 0x40(%rbx), %rax
movq %r12, %rcx
shlq $0x5, %rcx
movsd 0x18(%rax,%rcx), %xmm0
movsd %xmm0, (%rsp)
andl $0x3, %r14d
movsd (%rsp), %xmm1
movsd (%r8), %xmm0
ucomisd %xmm0, %xmm1
ja 0x7fff
subsd 0x58(%rbx), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x7f65
cmpq 0x88(%rbx), %r13
je 0x7f7b
movl %ebp, (%r13)
addq $0x4, %r13
movq 0x28(%rbx), %rax
movq 0x30(%rbx), %rcx
movq (%rax,%r12,8), %rax
movl (%rcx,%r12,4), %ecx
addl %ecx, %ecx
movslq %ecx, %rcx
notl (%rax,%rcx,4)
incq %r15
movq 0x30(%rbx), %rax
movslq (%rax,%rsi,4), %rcx
cmpq %rcx, %r15
jl 0x7eb1
jmp 0x7fad
movq %r13, %r14
subq 0x18(%rsp), %r14
movq %rbx, %rdi
callq 0x2404
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 0x7f45
movq 0x18(%rsp), %rax
jmp 0x7e80
movq 0x10(%rsp), %rax
movslq (%rax), %rdx
movq 0x28(%rbx), %rax
movq 0x30(%rbx), %rcx
movq (%rax,%rdx,8), %rsi
movl (%rcx,%rdx,4), %edx
addl %edx, %edx
movslq %edx, %rdx
notl (%rsi,%rdx,4)
movq 0x78(%rbx), %rdx
cmpq %rdx, %r13
jbe 0x7ff8
movslq -0x4(%r13), %rsi
addq $-0x4, %r13
movq (%rax,%rsi,8), %rdi
movl (%rcx,%rsi,4), %esi
addl %esi, %esi
movslq %esi, %rsi
notl (%rdi,%rsi,4)
jmp 0x7fda
movb $0x1, %al
jmp 0x80ac
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 0x8056
movq %rbx, %rdi
movq %r8, %rdx
movsd %xmm1, 0x8(%rsp)
callq 0xa318
movsd 0x8(%rsp), %xmm1
jmp 0x8069
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 0x80aa
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 0x808e
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop