// File: 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
subq $0xc0, %rsp
movq %rdi, -0x70(%rbp)
movq %rdi, %rax
movq %rax, -0x68(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movl $0x0, -0x24(%rbp)
movb $0x0, -0x26(%rbp)
callq 0x14580
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq (%rcx), %rcx
movsd (%rax,%rcx,8), %xmm1
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movl (%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x13e6c
movb $0x1, -0x25(%rbp)
jmp 0x13e70
movb $0x0, -0x25(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0x14151
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
movsd (%rax,%rcx,8), %xmm0
movsd 0x5b78(%rip), %xmm1     # 0x19a18
addsd %xmm1, %xmm0
callq 0x14360
movsd %xmm0, -0x78(%rbp)
jmp 0x13eb0
movsd -0x78(%rbp), %xmm1
movsd 0x5b63(%rip), %xmm0     # 0x19a20
ucomisd %xmm1, %xmm0
jbe 0x14008
movl $0xc, %edi
callq 0x2170
movq %rax, -0x80(%rbp)
jmp 0x13ed7
movq -0x70(%rbp), %rdi
movq -0x80(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0x1c(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, (%rax)
movl -0x2c(%rbp), %ecx
decl %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x4(%rax)
movb -0x25(%rbp), %cl
movq -0x48(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x8(%rax)
movq -0x48(%rbp), %rsi
callq 0x145a0
jmp 0x13f10
movq -0x48(%rbp), %rax
movq %rax, -0x88(%rbp)
cmpq $0x0, %rax
je 0x13f2d
movq -0x88(%rbp), %rdi
callq 0x2150
jmp 0x13f2f
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rdx
xorl %eax, %eax
cmpl 0x4(%rdx), %ecx
movb %al, -0x89(%rbp)
ja 0x13f87
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
movsd (%rax,%rcx,8), %xmm0
movsd 0x5ac1(%rip), %xmm1     # 0x19a18
addsd %xmm1, %xmm0
callq 0x14360
movsd %xmm0, -0x98(%rbp)
jmp 0x13f6a
movsd -0x98(%rbp), %xmm1
movsd 0x5ab6(%rip), %xmm0     # 0x19a30
ucomisd %xmm1, %xmm0
seta %al
movb %al, -0x89(%rbp)
movb -0x89(%rbp), %al
testb $0x1, %al
jne 0x13f93
jmp 0x13fb8
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x13f2f
movq -0x70(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x14520
jmp 0x141e7
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jbe 0x13fd0
movl $0x1, -0x24(%rbp)
jmp 0x14151
movl -0x2c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
movsd (%rax,%rcx,8), %xmm1
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x13fff
movb $0x1, -0x25(%rbp)
jmp 0x14003
movb $0x0, -0x25(%rbp)
jmp 0x1414c
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
incl %ecx
movsd (%rax,%rcx,8), %xmm0
movsd 0x59fa(%rip), %xmm1     # 0x19a18
addsd %xmm1, %xmm0
callq 0x14360
movsd %xmm0, -0xa0(%rbp)
jmp 0x14031
movsd -0xa0(%rbp), %xmm1
movsd 0x59e7(%rip), %xmm0     # 0x19a28
ucomisd %xmm1, %xmm0
jbe 0x14055
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x13e7c
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
ucomisd (%rax,%rcx,8), %xmm0
jne 0x14084
jp 0x14084
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x13e7c
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
movsd (%rax,%rcx,8), %xmm1
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x140ad
movb $0x1, -0x49(%rbp)
jmp 0x140b1
movb $0x0, -0x49(%rbp)
jmp 0x140b3
movb -0x25(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb -0x49(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0x14143
movl $0xc, %edi
callq 0x2170
movq %rax, -0xa8(%rbp)
jmp 0x140db
movq -0x70(%rbp), %rdi
movq -0xa8(%rbp), %rax
movq %rax, -0x58(%rbp)
movl -0x1c(%rbp), %ecx
movq -0x58(%rbp), %rax
movl %ecx, (%rax)
movl -0x2c(%rbp), %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x4(%rax)
movb -0x25(%rbp), %cl
movq -0x58(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x8(%rax)
movq -0x58(%rbp), %rsi
callq 0x145a0
jmp 0x14115
movq -0x58(%rbp), %rax
movq %rax, -0xb0(%rbp)
cmpq $0x0, %rax
je 0x14132
movq -0xb0(%rbp), %rdi
callq 0x2150
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movb -0x49(%rbp), %al
andb $0x1, %al
movb %al, -0x25(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x13e7c
cmpl $0x0, -0x24(%rbp)
jne 0x141c7
movl $0xc, %edi
callq 0x2170
movq %rax, -0xb8(%rbp)
jmp 0x1416a
movq -0x70(%rbp), %rdi
movq -0xb8(%rbp), %rax
movq %rax, -0x60(%rbp)
movl -0x1c(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x60(%rbp), %rax
movl %ecx, 0x4(%rax)
movb -0x25(%rbp), %cl
movq -0x60(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x8(%rax)
movq -0x60(%rbp), %rsi
callq 0x145a0
jmp 0x141a8
movq -0x60(%rbp), %rax
movq %rax, -0xc0(%rbp)
cmpq $0x0, %rax
je 0x141c5
movq -0xc0(%rbp), %rdi
callq 0x2150
jmp 0x141c7
movb $0x1, -0x26(%rbp)
testb $0x1, -0x26(%rbp)
jne 0x141da
movq -0x70(%rbp), %rdi
callq 0x14520
movq -0x68(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x2240