// File: /workspace/github_cpp_makefile_star2_O2/Proudc[P]CTSS/src/ContinuousQuery/Pruneline.cpp
// Function: (anonymous namespace)::setIncreDecreInterval(double*, TraversingPath*)
std::vector<Sequence> setIncreDecreInterval(double calHelpArray[], TraversingPath* path)
{
	int  startPos = path->minPos;
	int  stopPos;
	int  flag = 0;
	bool seqFlag;
	std::vector<Sequence> myInterval;
	if (calHelpArray[path->minPos] < calHelpArray[(path->minPos) + 1])
	{
		seqFlag = true;
	}
	else
	{
		seqFlag = false;
	}
	for (unsigned int i = (path->minPos) + 1; i < (path->maxPos);)
	{
		if (abs(calHelpArray[i] - (-1.0)) < 0.00000001)
		{
			Sequence* temSequence = new Sequence;
			temSequence->startPos = startPos;
			temSequence->stopPos  = i - 1;
			temSequence->seqFlag  = seqFlag;
			myInterval.push_back(*temSequence);
			delete temSequence;
			while ((i <= path->maxPos) && (abs(calHelpArray[i] - (-1.0)) < 0.0000001))
			{
				i++;
			}
			if (i > (path->maxPos))
			{
				flag = 1;
				break;
			}
			startPos = i;
			if (calHelpArray[i] < calHelpArray[i + 1])
			{
				seqFlag = true;
			}
			else
			{
				seqFlag = false;
			}
		}
		else
		{
			if (abs(calHelpArray[i + 1] - (-1.0)) < 0.000000001)
			{
				i++;
				continue;
			}
			bool temSeqFlag;
			if (calHelpArray[i] == calHelpArray[i + 1])
			{
				i++;
				continue;
			}
			else if (calHelpArray[i] < calHelpArray[i + 1])
			{
				temSeqFlag = true;
			}
			else
			{
				temSeqFlag = false;
			}
			if (seqFlag != temSeqFlag)
			{
				Sequence* temSequence = new Sequence;
				temSequence->startPos = startPos;
				temSequence->stopPos  = i;
				temSequence->seqFlag  = seqFlag;
				myInterval.push_back(*temSequence);
				delete temSequence;
				startPos = i + 1;
				seqFlag = temSeqFlag;
			}
			i++;
		}
	}
	if (flag == 0)
	{
		Sequence* temSequence = new Sequence;
		temSequence->startPos = startPos;
		temSequence->stopPos  = path->maxPos;
		temSequence->seqFlag  = seqFlag;
		myInterval.push_back(*temSequence);
		delete temSequence;
	}
	return myInterval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movslq (%rdx), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, -0x38(%rbp)
andq $0x0, 0x10(%rdi)
movsd 0x8(%rsi,%rax,8), %xmm0
ucomisd (%rsi,%rax,8), %xmm0
seta %bl
movq %rax, -0x40(%rbp)
leal 0x1(%rax), %r12d
pushq $0xc
popq %rdi
movq %rdx, -0x48(%rbp)
andb $0x1, %bl
movb %bl, -0x29(%rbp)
movl 0x4(%rdx), %r13d
movl %r12d, %r12d
cmpq %r13, %r12
jae 0x8839
movsd (%r15,%r12,8), %xmm0
movapd %xmm0, %xmm1
movsd 0x22b2(%rip), %xmm3     # 0xa9b0
addsd %xmm3, %xmm1
movapd 0x22c6(%rip), %xmm4     # 0xa9d0
andpd %xmm4, %xmm1
movsd 0x22a2(%rip), %xmm2     # 0xa9b8
ucomisd %xmm1, %xmm2
ja 0x87a2
movsd 0x8(%r15,%r12,8), %xmm1
incq %r12
movapd %xmm1, %xmm2
addsd %xmm3, %xmm2
andpd %xmm4, %xmm2
movsd 0x2282(%rip), %xmm3     # 0xa9c0
ucomisd %xmm2, %xmm3
ja 0x86e3
ucomisd %xmm1, %xmm0
jne 0x874c
jnp 0x86e3
ucomisd %xmm0, %xmm1
seta %bl
cmpb -0x29(%rbp), %bl
je 0x86e0
movq %rdi, %r14
callq 0x2110
movq %rax, %r13
leal -0x1(%r12), %eax
movq -0x40(%rbp), %rcx
movl %ecx, (%r13)
movl %eax, 0x4(%r13)
movb -0x29(%rbp), %al
movb %al, 0x8(%r13)
movq -0x38(%rbp), %rdi
movq %r13, %rsi
callq 0x8902
movq %r13, %rdi
callq 0x20f0
movl %r12d, %eax
movq %rax, -0x40(%rbp)
movq %r14, %rdi
movq -0x48(%rbp), %rdx
jmp 0x86d6
movq %rdi, %r14
callq 0x2110
movq %rax, %r13
movq -0x40(%rbp), %rax
movl %eax, (%r13)
leal -0x1(%r12), %eax
movl %eax, 0x4(%r13)
movb -0x29(%rbp), %al
movb %al, 0x8(%r13)
movq -0x38(%rbp), %rdi
movq %r13, %rsi
callq 0x8902
movq %r13, %rdi
callq 0x20f0
movq -0x48(%rbp), %rdx
movl 0x4(%rdx), %eax
cmpl %eax, %r12d
ja 0x8872
movl %r12d, %ecx
movsd (%r15,%rcx,8), %xmm0
movapd %xmm0, %xmm1
addsd 0x21b2(%rip), %xmm1     # 0xa9b0
andpd 0x21ca(%rip), %xmm1     # 0xa9d0
incl %r12d
movsd 0x21b7(%rip), %xmm2     # 0xa9c8
ucomisd %xmm1, %xmm2
ja 0x87e0
movl %r12d, %eax
movsd (%r15,%rax,8), %xmm1
ucomisd %xmm0, %xmm1
seta %bl
decl %r12d
movl %r12d, %eax
movq %rax, -0x40(%rbp)
movq %r14, %rdi
jmp 0x86d6
pushq $0xc
popq %rdi
movq -0x38(%rbp), %rbx
callq 0x2110
movq %rax, %r14
movq -0x40(%rbp), %rax
movl %eax, (%r14)
movl %r13d, 0x4(%r14)
movb -0x29(%rbp), %al
movb %al, 0x8(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8902
movq %r14, %rdi
callq 0x20f0
movq %rbx, %rax
jmp 0x8876
movq -0x38(%rbp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8889
jmp 0x8889
movq %rax, %r14
movq -0x38(%rbp), %rdi
callq 0x8a9c
movq %r14, %rdi
callq 0x2200
nop