// File: /workspace/github_cpp_makefile_star2_O3/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 $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
movslq (%rdx), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, -0x40(%rbp)
movq $0x0, 0x10(%rdi)
movsd 0x8(%rsi,%rax,8), %xmm0
ucomisd (%rsi,%rax,8), %xmm0
seta %bl
movq %rax, -0x38(%rbp)
leal 0x1(%rax), %r13d
andb $0x1, %bl
movb %bl, -0x29(%rbp)
movl 0x4(%r14), %r12d
movl %r13d, %edx
cmpl %r12d, %edx
movl %r12d, %eax
cmoval %edx, %eax
movl %edx, %ecx
negl %edx
movl %edx, %r13d
cmpq %rcx, %rax
je 0xa2dc
movsd (%r15,%rcx,8), %xmm0
movapd %xmm0, %xmm1
movsd 0x288e(%rip), %xmm3     # 0xc9e0
addsd %xmm3, %xmm1
movapd 0x28a2(%rip), %xmm4     # 0xca00
andpd %xmm4, %xmm1
movsd 0x287e(%rip), %xmm2     # 0xc9e8
ucomisd %xmm1, %xmm2
ja 0xa20a
movsd 0x8(%r15,%rcx,8), %xmm1
incq %rcx
movapd %xmm1, %xmm2
addsd %xmm3, %xmm2
andpd %xmm4, %xmm2
decl %r13d
movsd 0x285b(%rip), %xmm3     # 0xc9f0
ucomisd %xmm2, %xmm3
ja 0xa137
ucomisd %xmm1, %xmm0
jne 0xa1a3
jnp 0xa137
movl %r13d, %edx
negl %edx
ucomisd %xmm0, %xmm1
seta %bl
cmpb -0x29(%rbp), %bl
je 0xa127
movl $0xc, %edi
callq 0x2140
movq %rax, %r12
movl %r13d, %eax
notl %eax
movq -0x38(%rbp), %rcx
movl %ecx, (%r12)
movl %eax, 0x4(%r12)
movb -0x29(%rbp), %al
movb %al, 0x8(%r12)
movq -0x40(%rbp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0xa2c7
movl 0x8(%r12), %eax
movl %eax, 0x8(%rsi)
movq (%r12), %rax
movq %rax, (%rsi)
addq $0xc, 0x8(%rdi)
jmp 0xa2cf
movl $0xc, %edi
callq 0x2140
movq %rax, %r12
movq -0x38(%rbp), %rax
movl %eax, (%r12)
movl %r13d, %eax
notl %eax
movl %eax, 0x4(%r12)
movb -0x29(%rbp), %al
movb %al, 0x8(%r12)
movq -0x40(%rbp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0xa255
movl 0x8(%r12), %eax
movl %eax, 0x8(%rsi)
movq (%r12), %rax
movq %rax, (%rsi)
addq $0xc, 0x8(%rdi)
jmp 0xa25d
movq %r12, %rdx
callq 0xa4ee
negl %r13d
movq %r12, %rdi
callq 0x2120
movl 0x4(%r14), %eax
cmpl %r13d, %eax
jb 0xa31d
movl %r13d, %ecx
movsd (%r15,%rcx,8), %xmm0
movapd %xmm0, %xmm1
addsd 0x2756(%rip), %xmm1     # 0xc9e0
andpd 0x276e(%rip), %xmm1     # 0xca00
movsd 0x275e(%rip), %xmm2     # 0xc9f8
ucomisd %xmm1, %xmm2
jbe 0xa2aa
incl %r13d
cmpl %eax, %r13d
jbe 0xa275
jmp 0xa31d
leal 0x1(%r13), %eax
movsd (%r15,%rax,8), %xmm1
ucomisd %xmm0, %xmm1
seta %bl
movl %r13d, %eax
movq %rax, -0x38(%rbp)
jmp 0xa11a
movq %r12, %rdx
callq 0xa4ee
negl %r13d
movq %r12, %rdi
callq 0x2120
jmp 0xa2bb
movl $0xc, %edi
callq 0x2140
movq %rax, %r14
movq -0x38(%rbp), %rax
movl %eax, (%r14)
movl %r12d, 0x4(%r14)
movb -0x29(%rbp), %al
movb %al, 0x8(%r14)
movq -0x40(%rbp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0xa32c
movl 0x8(%r14), %eax
movl %eax, 0x8(%rsi)
movq (%r14), %rax
movq %rax, (%rsi)
addq $0xc, 0x8(%rdi)
jmp 0xa334
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdx
callq 0xa4ee
movq %r14, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2120
jmp 0xa34e
jmp 0xa34e
movq %rax, %r14
movq -0x40(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0xa362
callq 0x2120
movq %r14, %rdi
callq 0x2210