// File: salda[P]convex_hull_of_intersections/Ouellet_hull.cpp
// Function: Ouellet_hull::compute_convex_hull(std::vector<std::pair<double, double>, std::allocator<std::pair<double, double>>>)
void Ouellet_hull::compute_convex_hull(vector<pair<double, double>> points) {
	if (points.empty())
		return;

	array<pair<pair<double, double>, pair<double, double>>, 4> initialization_extremes_for_quadrants;
	for (auto& initialization_pair : initialization_extremes_for_quadrants)
		initialization_pair.first = initialization_pair.second = points.front();
	
	for (auto& point : points) {
	    int previous_quadrant = 3;
		for (int quadrant = 0; quadrant != 4; ++quadrant) {
			if (((quadrant == 0 || quadrant == 2) && point.first == initialization_extremes_for_quadrants[previous_quadrant].second.first)
			 || ((quadrant == 1 || quadrant == 3) && point.second == initialization_extremes_for_quadrants[previous_quadrant].second.second)) {
				if ((quadrant == 0 && point.second < initialization_extremes_for_quadrants[previous_quadrant].second.second)
				 || (quadrant == 1 && point.first > initialization_extremes_for_quadrants[previous_quadrant].second.first)
				 || (quadrant == 2 && point.second > initialization_extremes_for_quadrants[previous_quadrant].second.second)
				 || (quadrant == 3 && point.first < initialization_extremes_for_quadrants[previous_quadrant].second.first))
					initialization_extremes_for_quadrants[previous_quadrant].second = point;
				else if ((quadrant == 0 && point.second > initialization_extremes_for_quadrants[previous_quadrant].first.second)
					  || (quadrant == 1 && point.first < initialization_extremes_for_quadrants[previous_quadrant].first.first)
					  || (quadrant == 2 && point.second < initialization_extremes_for_quadrants[previous_quadrant].first.second)
					  || (quadrant == 3 && point.first > initialization_extremes_for_quadrants[previous_quadrant].first.first))
					initialization_extremes_for_quadrants[quadrant].first = point;
			}
			else if ((quadrant == 0 && point.first > initialization_extremes_for_quadrants[previous_quadrant].second.first)
				  || (quadrant == 1 && point.second > initialization_extremes_for_quadrants[previous_quadrant].second.second)
				  || (quadrant == 2 && point.first < initialization_extremes_for_quadrants[previous_quadrant].second.first)
				  || (quadrant == 3 && point.second < initialization_extremes_for_quadrants[previous_quadrant].second.second)) {
				initialization_extremes_for_quadrants[previous_quadrant].second = point;
				initialization_extremes_for_quadrants[quadrant].first = point;
			}
        	previous_quadrant = quadrant;
		}
	}

	for (int quadrant = 0; quadrant != 4; ++quadrant) { // init quadrants
		quadrants[quadrant].push_back(initialization_extremes_for_quadrants[quadrant].first);
		if (initialization_extremes_for_quadrants[quadrant].first != initialization_extremes_for_quadrants[quadrant].second)
			quadrants[quadrant].push_back(initialization_extremes_for_quadrants[quadrant].second);
	}
	
	int index, indexLow, indexHi, quadrant;
	for (auto& point : points) { // filter non convex hull points
		if (point.first > initialization_extremes_for_quadrants[0].second.first && point.second > initialization_extremes_for_quadrants[0].first.second)
			quadrant = 0;
		else if (point.first < initialization_extremes_for_quadrants[1].first.first && point.second > initialization_extremes_for_quadrants[1].second.second)
			quadrant = 1;
		else if (point.first < initialization_extremes_for_quadrants[2].second.first && point.second < initialization_extremes_for_quadrants[2].first.second)
			quadrant = 2;
		else if (point.first > initialization_extremes_for_quadrants[3].first.first && point.second < initialization_extremes_for_quadrants[3].second.second)
			quadrant = 3;
		else
			continue;

		indexLow = 0;
		indexHi = quadrants[quadrant].size();

		bool breaker = false;
		while (indexLow < indexHi - 1) {
			index = ((indexHi - indexLow) >> 1) + indexLow;

			if ((quadrant == 0 && point.first <= quadrants[0][index].first && point.second <= quadrants[0][index].second)
			 || (quadrant == 1 && point.first >= quadrants[1][index].first && point.second <= quadrants[1][index].second)
			 || (quadrant == 2 && point.first >= quadrants[2][index].first && point.second >= quadrants[2][index].second)
			 || (quadrant == 3 && point.first <= quadrants[3][index].first && point.second >= quadrants[3][index].second))
				breaker = true; // no computation needed

			if ((quadrant < 2 && point.first > quadrants[quadrant][index].first) || point.first < quadrants[quadrant][index].first) { // TODO check "< 2" condition
				indexHi = index;
				continue;
			}

			if ((quadrant < 2 && point.first < quadrants[quadrant][index].first) || point.first > quadrants[quadrant][index].first) { // TODO check "< 2" condition
				indexLow = index;
				continue;
			}

			indexLow = index - 1;
			indexHi = index + 1;
			break;
		}
		if (breaker || !is_right_turn(quadrants[quadrant][indexLow], quadrants[quadrant][indexHi], point))
			continue;

		// here indexLow should contain the index where the point should be inserted if calculation does not invalidate it

		// find lower bound (remove point invalidated by the new one that comes before)
		while (indexLow > 0) {
			if (is_right_turn(quadrants[quadrant][indexLow - 1], point, quadrants[quadrant][indexLow]))
				break; // found the lower index limit of points to keep, new point should be added right after indexLow
			--indexLow;
		}

		// find upper bound (remove point invalidated by the new one that comes after)
		int maxIndexHi = quadrants[quadrant].size() - 1;
		while (indexHi < maxIndexHi) {
			if (is_right_turn(point, quadrants[quadrant][indexHi + 1], quadrants[quadrant][indexHi]))
				break; // found the higher index limit of points to keep, new point should be added right before indexHi
			++indexHi;
		}

		if (indexLow + 1 == indexHi)
			quadrants[quadrant].insert(quadrants[quadrant].begin() + indexHi, point);
		else {
			quadrants[quadrant][indexLow + 1] = point;
			if (indexLow + 2 != indexHi)
				quadrants[quadrant].erase(quadrants[quadrant].begin() + indexLow + 2, quadrants[quadrant].begin() + indexHi -1);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x390, %rsp            # imm = 0x390
movq %rsi, -0x230(%rbp)
movq %rdi, %rax
movq -0x230(%rbp), %rdi
movq %rdi, -0x228(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x220(%rbp)
callq 0x8820
testb $0x1, %al
jne 0x7241
jmp 0x7246
jmp 0x84a8
leaq -0x90(%rbp), %rdi
callq 0x8860
leaq -0x90(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rdi
callq 0x88b0
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rdi
callq 0x88d0
movq %rax, -0xa8(%rbp)
movq -0xa0(%rbp), %rax
cmpq -0xa8(%rbp), %rax
je 0x72e6
movq -0x228(%rbp), %rdi
movq -0xa0(%rbp), %rax
movq %rax, -0xb0(%rbp)
callq 0x8900
movq %rax, %rsi
movq -0xb0(%rbp), %rdi
addq $0x10, %rdi
callq 0x8930
movq %rax, %rsi
movq -0xb0(%rbp), %rdi
callq 0x8930
movq -0xa0(%rbp), %rax
addq $0x20, %rax
movq %rax, -0xa0(%rbp)
jmp 0x7286
movq -0x228(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdi
callq 0x3ba0
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rdi
callq 0x3bd0
movq %rax, -0xc8(%rbp)
leaq -0xc0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x3d80
testb $0x1, %al
jne 0x7336
jmp 0x7834
leaq -0xc0(%rbp), %rdi
callq 0x3dc0
movq %rax, -0xd0(%rbp)
movl $0x3, -0xd4(%rbp)
movl $0x0, -0xd8(%rbp)
cmpl $0x4, -0xd8(%rbp)
je 0x7821
cmpl $0x0, -0xd8(%rbp)
je 0x737c
cmpl $0x2, -0xd8(%rbp)
jne 0x73b5
movq -0xd0(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x238(%rbp)
movslq -0xd4(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x8960
movsd -0x238(%rbp), %xmm0
ucomisd 0x10(%rax), %xmm0
jne 0x73b5
jp 0x73b5
jmp 0x740b
cmpl $0x1, -0xd8(%rbp)
je 0x73cb
cmpl $0x3, -0xd8(%rbp)
jne 0x768d
movq -0xd0(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x240(%rbp)
movslq -0xd4(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x8960
movsd -0x240(%rbp), %xmm0
ucomisd 0x18(%rax), %xmm0
jne 0x768d
jp 0x768d
cmpl $0x0, -0xd8(%rbp)
jne 0x7452
movq -0xd0(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x248(%rbp)
movslq -0xd4(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x8960
movsd -0x248(%rbp), %xmm1
movsd 0x18(%rax), %xmm0
ucomisd %xmm1, %xmm0
ja 0x7515
cmpl $0x1, -0xd8(%rbp)
jne 0x7494
movq -0xd0(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x250(%rbp)
movslq -0xd4(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x8960
movsd -0x250(%rbp), %xmm0
ucomisd 0x10(%rax), %xmm0
ja 0x7515
cmpl $0x2, -0xd8(%rbp)
jne 0x74d3
movq -0xd0(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x258(%rbp)
movslq -0xd4(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x8960
movsd -0x258(%rbp), %xmm0
ucomisd 0x18(%rax), %xmm0
ja 0x7515
cmpl $0x3, -0xd8(%rbp)
jne 0x754e
movq -0xd0(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x260(%rbp)
movslq -0xd4(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x8960
movsd -0x260(%rbp), %xmm1
movsd 0x10(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x754e
movq -0xd0(%rbp), %rax
movq %rax, -0x268(%rbp)
movslq -0xd4(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x8960
movq -0x268(%rbp), %rsi
movq %rax, %rdi
addq $0x10, %rdi
callq 0x8930
jmp 0x7688
cmpl $0x0, -0xd8(%rbp)
jne 0x7591
movq -0xd0(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x270(%rbp)
movslq -0xd4(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x8960
movsd -0x270(%rbp), %xmm0
ucomisd 0x8(%rax), %xmm0
ja 0x7656
cmpl $0x1, -0xd8(%rbp)
jne 0x75d6
movq -0xd0(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x278(%rbp)
movslq -0xd4(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x8960
movsd -0x278(%rbp), %xmm1
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
ja 0x7656
cmpl $0x2, -0xd8(%rbp)
jne 0x7619
movq -0xd0(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x280(%rbp)
movslq -0xd4(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x8960
movsd -0x280(%rbp), %xmm1
movsd 0x8(%rax), %xmm0
ucomisd %xmm1, %xmm0
ja 0x7656
cmpl $0x3, -0xd8(%rbp)
jne 0x7686
movq -0xd0(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x288(%rbp)
movslq -0xd4(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x8960
movsd -0x288(%rbp), %xmm0
ucomisd (%rax), %xmm0
jbe 0x7686
movq -0xd0(%rbp), %rax
movq %rax, -0x290(%rbp)
movslq -0xd8(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x8960
movq -0x290(%rbp), %rsi
movq %rax, %rdi
callq 0x8930
jmp 0x7688
jmp 0x7801
cmpl $0x0, -0xd8(%rbp)
jne 0x76cf
movq -0xd0(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x298(%rbp)
movslq -0xd4(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x8960
movsd -0x298(%rbp), %xmm0
ucomisd 0x10(%rax), %xmm0
ja 0x779b
cmpl $0x1, -0xd8(%rbp)
jne 0x7712
movq -0xd0(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x2a0(%rbp)
movslq -0xd4(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x8960
movsd -0x2a0(%rbp), %xmm0
ucomisd 0x18(%rax), %xmm0
ja 0x779b
cmpl $0x2, -0xd8(%rbp)
jne 0x7754
movq -0xd0(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x2a8(%rbp)
movslq -0xd4(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x8960
movsd -0x2a8(%rbp), %xmm1
movsd 0x10(%rax), %xmm0
ucomisd %xmm1, %xmm0
ja 0x779b
cmpl $0x3, -0xd8(%rbp)
jne 0x77ff
movq -0xd0(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x2b0(%rbp)
movslq -0xd4(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x8960
movsd -0x2b0(%rbp), %xmm1
movsd 0x18(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x77ff
movq -0xd0(%rbp), %rax
movq %rax, -0x2c0(%rbp)
movslq -0xd4(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x8960
movq -0x2c0(%rbp), %rsi
movq %rax, %rdi
addq $0x10, %rdi
callq 0x8930
movq -0xd0(%rbp), %rax
movq %rax, -0x2b8(%rbp)
movslq -0xd8(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x8960
movq -0x2b8(%rbp), %rsi
movq %rax, %rdi
callq 0x8930
jmp 0x7801
movl -0xd8(%rbp), %eax
movl %eax, -0xd4(%rbp)
movl -0xd8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd8(%rbp)
jmp 0x735d
jmp 0x7823
leaq -0xc0(%rbp), %rdi
callq 0x3de0
jmp 0x731a
movl $0x0, -0xdc(%rbp)
cmpl $0x4, -0xdc(%rbp)
je 0x7923
movq -0x220(%rbp), %rdi
movslq -0xdc(%rbp), %rsi
callq 0x8990
movq %rax, -0x2d0(%rbp)
movslq -0xdc(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x8960
movq -0x2d0(%rbp), %rdi
movq %rax, %rsi
callq 0x89c0
movslq -0xdc(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x8960
movq %rax, -0x2c8(%rbp)
movslq -0xdc(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x8960
movq -0x2c8(%rbp), %rdi
movq %rax, %rsi
addq $0x10, %rsi
callq 0x8a30
testb $0x1, %al
jne 0x78cd
jmp 0x790d
movq -0x220(%rbp), %rdi
movslq -0xdc(%rbp), %rsi
callq 0x8990
movq %rax, -0x2d8(%rbp)
movslq -0xdc(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x8960
movq -0x2d8(%rbp), %rdi
movq %rax, %rsi
addq $0x10, %rsi
callq 0x89c0
jmp 0x790f
movl -0xdc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xdc(%rbp)
jmp 0x783e
movq -0x228(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rdi
callq 0x3ba0
movq %rax, -0x100(%rbp)
movq -0xf8(%rbp), %rdi
callq 0x3bd0
movq %rax, -0x108(%rbp)
leaq -0x100(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x3d80
testb $0x1, %al
jne 0x7973
jmp 0x84a8
leaq -0x100(%rbp), %rdi
callq 0x3dc0
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x2e0(%rbp)
leaq -0x90(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x8960
movsd -0x2e0(%rbp), %xmm0
ucomisd 0x10(%rax), %xmm0
jbe 0x79fa
movq -0x110(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x2e8(%rbp)
leaq -0x90(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x8960
movsd -0x2e8(%rbp), %xmm0
ucomisd 0x8(%rax), %xmm0
jbe 0x79fa
movl $0x0, -0xec(%rbp)
jmp 0x7b6f
movq -0x110(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x2f0(%rbp)
leaq -0x90(%rbp), %rdi
movl $0x1, %esi
callq 0x8960
movsd -0x2f0(%rbp), %xmm1
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x7a73
movq -0x110(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x2f8(%rbp)
leaq -0x90(%rbp), %rdi
movl $0x1, %esi
callq 0x8960
movsd -0x2f8(%rbp), %xmm0
ucomisd 0x18(%rax), %xmm0
jbe 0x7a73
movl $0x1, -0xec(%rbp)
jmp 0x7b6d
movq -0x110(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x300(%rbp)
leaq -0x90(%rbp), %rdi
movl $0x2, %esi
callq 0x8960
movsd -0x300(%rbp), %xmm1
movsd 0x10(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x7aee
movq -0x110(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x308(%rbp)
leaq -0x90(%rbp), %rdi
movl $0x2, %esi
callq 0x8960
movsd -0x308(%rbp), %xmm1
movsd 0x8(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x7aee
movl $0x2, -0xec(%rbp)
jmp 0x7b6b
movq -0x110(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x310(%rbp)
leaq -0x90(%rbp), %rdi
movl $0x3, %esi
callq 0x8960
movsd -0x310(%rbp), %xmm0
ucomisd (%rax), %xmm0
jbe 0x7b64
movq -0x110(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x318(%rbp)
leaq -0x90(%rbp), %rdi
movl $0x3, %esi
callq 0x8960
movsd -0x318(%rbp), %xmm1
movsd 0x18(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x7b64
movl $0x3, -0xec(%rbp)
jmp 0x7b69
jmp 0x8497
jmp 0x7b6b
jmp 0x7b6d
jmp 0x7b6f
movq -0x220(%rbp), %rdi
movl $0x0, -0xe4(%rbp)
movslq -0xec(%rbp), %rsi
callq 0x8990
movq %rax, %rdi
callq 0x3d10
movl %eax, -0xe8(%rbp)
movb $0x0, -0x111(%rbp)
movl -0xe4(%rbp), %eax
movl -0xe8(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x7f9d
movl -0xe8(%rbp), %eax
subl -0xe4(%rbp), %eax
sarl %eax
addl -0xe4(%rbp), %eax
movl %eax, -0xe0(%rbp)
cmpl $0x0, -0xec(%rbp)
jne 0x7c6d
movq -0x220(%rbp), %rdi
movq -0x110(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x320(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0x8990
movq %rax, %rdi
movslq -0xe0(%rbp), %rsi
callq 0x3e90
movsd -0x320(%rbp), %xmm1
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jb 0x7c6d
movq -0x220(%rbp), %rdi
movq -0x110(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x328(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0x8990
movq %rax, %rdi
movslq -0xe0(%rbp), %rsi
callq 0x3e90
movsd -0x328(%rbp), %xmm1
movsd 0x8(%rax), %xmm0
ucomisd %xmm1, %xmm0
jae 0x7e30
cmpl $0x1, -0xec(%rbp)
jne 0x7d06
movq -0x220(%rbp), %rdi
movq -0x110(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x330(%rbp)
movl $0x1, %esi
callq 0x8990
movq %rax, %rdi
movslq -0xe0(%rbp), %rsi
callq 0x3e90
movsd -0x330(%rbp), %xmm0
ucomisd (%rax), %xmm0
jb 0x7d06
movq -0x220(%rbp), %rdi
movq -0x110(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x338(%rbp)
movl $0x1, %esi
callq 0x8990
movq %rax, %rdi
movslq -0xe0(%rbp), %rsi
callq 0x3e90
movsd -0x338(%rbp), %xmm1
movsd 0x8(%rax), %xmm0
ucomisd %xmm1, %xmm0
jae 0x7e30
cmpl $0x2, -0xec(%rbp)
jne 0x7d9b
movq -0x220(%rbp), %rdi
movq -0x110(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x340(%rbp)
movl $0x2, %esi
callq 0x8990
movq %rax, %rdi
movslq -0xe0(%rbp), %rsi
callq 0x3e90
movsd -0x340(%rbp), %xmm0
ucomisd (%rax), %xmm0
jb 0x7d9b
movq -0x220(%rbp), %rdi
movq -0x110(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x348(%rbp)
movl $0x2, %esi
callq 0x8990
movq %rax, %rdi
movslq -0xe0(%rbp), %rsi
callq 0x3e90
movsd -0x348(%rbp), %xmm0
ucomisd 0x8(%rax), %xmm0
jae 0x7e30
cmpl $0x3, -0xec(%rbp)
jne 0x7e37
movq -0x220(%rbp), %rdi
movq -0x110(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x350(%rbp)
movl $0x3, %esi
callq 0x8990
movq %rax, %rdi
movslq -0xe0(%rbp), %rsi
callq 0x3e90
movsd -0x350(%rbp), %xmm1
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jb 0x7e37
movq -0x220(%rbp), %rdi
movq -0x110(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x358(%rbp)
movl $0x3, %esi
callq 0x8990
movq %rax, %rdi
movslq -0xe0(%rbp), %rsi
callq 0x3e90
movsd -0x358(%rbp), %xmm0
ucomisd 0x8(%rax), %xmm0
jb 0x7e37
movb $0x1, -0x111(%rbp)
cmpl $0x2, -0xec(%rbp)
jge 0x7e83
movq -0x220(%rbp), %rdi
movq -0x110(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x360(%rbp)
movslq -0xec(%rbp), %rsi
callq 0x8990
movq %rax, %rdi
movslq -0xe0(%rbp), %rsi
callq 0x3e90
movsd -0x360(%rbp), %xmm0
ucomisd (%rax), %xmm0
ja 0x7eca
movq -0x220(%rbp), %rdi
movq -0x110(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x368(%rbp)
movslq -0xec(%rbp), %rsi
callq 0x8990
movq %rax, %rdi
movslq -0xe0(%rbp), %rsi
callq 0x3e90
movsd -0x368(%rbp), %xmm1
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x7edb
movl -0xe0(%rbp), %eax
movl %eax, -0xe8(%rbp)
jmp 0x7ba1
cmpl $0x2, -0xec(%rbp)
jge 0x7f2b
movq -0x220(%rbp), %rdi
movq -0x110(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x370(%rbp)
movslq -0xec(%rbp), %rsi
callq 0x8990
movq %rax, %rdi
movslq -0xe0(%rbp), %rsi
callq 0x3e90
movsd -0x370(%rbp), %xmm1
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
ja 0x7f6e
movq -0x220(%rbp), %rdi
movq -0x110(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x378(%rbp)
movslq -0xec(%rbp), %rsi
callq 0x8990
movq %rax, %rdi
movslq -0xe0(%rbp), %rsi
callq 0x3e90
movsd -0x378(%rbp), %xmm0
ucomisd (%rax), %xmm0
jbe 0x7f7f
movl -0xe0(%rbp), %eax
movl %eax, -0xe4(%rbp)
jmp 0x7ba1
movl -0xe0(%rbp), %eax
subl $0x1, %eax
movl %eax, -0xe4(%rbp)
movl -0xe0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe8(%rbp)
testb $0x1, -0x111(%rbp)
jne 0x8074
movq -0x220(%rbp), %rdi
movslq -0xec(%rbp), %rsi
callq 0x8990
movq %rax, %rdi
movslq -0xe4(%rbp), %rsi
callq 0x3e90
movq -0x220(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, -0x128(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x120(%rbp)
movslq -0xec(%rbp), %rsi
callq 0x8990
movq %rax, %rdi
movslq -0xe8(%rbp), %rsi
callq 0x3e90
movq -0x220(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, -0x138(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x130(%rbp)
movq -0x110(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x148(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x140(%rbp)
movsd -0x128(%rbp), %xmm0
movsd -0x120(%rbp), %xmm1
movsd -0x138(%rbp), %xmm2
movsd -0x130(%rbp), %xmm3
movsd -0x148(%rbp), %xmm4
movsd -0x140(%rbp), %xmm5
callq 0x7180
testb $0x1, %al
jne 0x8079
jmp 0x8497
jmp 0x807b
cmpl $0x0, -0xe4(%rbp)
jle 0x816f
movq -0x220(%rbp), %rdi
movslq -0xec(%rbp), %rsi
callq 0x8990
movq %rax, %rdi
movl -0xe4(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x3e90
movq -0x220(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, -0x158(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x150(%rbp)
movq -0x110(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x168(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x160(%rbp)
movslq -0xec(%rbp), %rsi
callq 0x8990
movq %rax, %rdi
movslq -0xe4(%rbp), %rsi
callq 0x3e90
movq -0x220(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, -0x178(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x170(%rbp)
movsd -0x158(%rbp), %xmm0
movsd -0x150(%rbp), %xmm1
movsd -0x168(%rbp), %xmm2
movsd -0x160(%rbp), %xmm3
movsd -0x178(%rbp), %xmm4
movsd -0x170(%rbp), %xmm5
callq 0x7180
testb $0x1, %al
jne 0x8159
jmp 0x815b
jmp 0x816f
movl -0xe4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x807b
movq -0x220(%rbp), %rdi
movslq -0xec(%rbp), %rsi
callq 0x8990
movq %rax, %rdi
callq 0x3d10
subq $0x1, %rax
movl %eax, -0x17c(%rbp)
movl -0xe8(%rbp), %eax
cmpl -0x17c(%rbp), %eax
jge 0x828d
movq -0x220(%rbp), %rdi
movq -0x110(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x190(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x188(%rbp)
movslq -0xec(%rbp), %rsi
callq 0x8990
movq %rax, %rdi
movl -0xe8(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x3e90
movq -0x220(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, -0x1a0(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x198(%rbp)
movslq -0xec(%rbp), %rsi
callq 0x8990
movq %rax, %rdi
movslq -0xe8(%rbp), %rsi
callq 0x3e90
movq -0x220(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, -0x1b0(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x1a8(%rbp)
movsd -0x190(%rbp), %xmm0
movsd -0x188(%rbp), %xmm1
movsd -0x1a0(%rbp), %xmm2
movsd -0x198(%rbp), %xmm3
movsd -0x1b0(%rbp), %xmm4
movsd -0x1a8(%rbp), %xmm5
callq 0x7180
testb $0x1, %al
jne 0x8277
jmp 0x8279
jmp 0x828d
movl -0xe8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe8(%rbp)
jmp 0x8194
movl -0xe4(%rbp), %eax
addl $0x1, %eax
cmpl -0xe8(%rbp), %eax
jne 0x8331
movq -0x220(%rbp), %rdi
movslq -0xec(%rbp), %rsi
callq 0x8990
movq -0x220(%rbp), %rdi
movq %rax, -0x380(%rbp)
movslq -0xec(%rbp), %rsi
callq 0x8990
movq %rax, %rdi
callq 0x3ba0
movq %rax, -0x1c8(%rbp)
movslq -0xe8(%rbp), %rsi
leaq -0x1c8(%rbp), %rdi
callq 0x5e40
movq %rax, -0x1c0(%rbp)
leaq -0x1b8(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x3cd0
movq -0x380(%rbp), %rdi
movq -0x110(%rbp), %rdx
movq -0x1b8(%rbp), %rsi
callq 0x8a60
movq %rax, -0x1d0(%rbp)
jmp 0x8495
movq -0x220(%rbp), %rdi
movq -0x110(%rbp), %rax
movq %rax, -0x388(%rbp)
movslq -0xec(%rbp), %rsi
callq 0x8990
movq %rax, %rdi
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x3e90
movq -0x388(%rbp), %rsi
movq %rax, %rdi
callq 0x8930
movl -0xe4(%rbp), %eax
addl $0x2, %eax
cmpl -0xe8(%rbp), %eax
je 0x8493
movq -0x220(%rbp), %rdi
movslq -0xec(%rbp), %rsi
callq 0x8990
movq -0x220(%rbp), %rdi
movq %rax, -0x390(%rbp)
movslq -0xec(%rbp), %rsi
callq 0x8990
movq %rax, %rdi
callq 0x3ba0
movq %rax, -0x1f0(%rbp)
movslq -0xe4(%rbp), %rsi
leaq -0x1f0(%rbp), %rdi
callq 0x5e40
movq %rax, -0x1e8(%rbp)
leaq -0x1e8(%rbp), %rdi
movl $0x2, %esi
callq 0x5e40
movq %rax, -0x1e0(%rbp)
leaq -0x1d8(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x3cd0
movq -0x220(%rbp), %rdi
movslq -0xec(%rbp), %rsi
callq 0x8990
movq %rax, %rdi
callq 0x3ba0
movq %rax, -0x210(%rbp)
movslq -0xe8(%rbp), %rsi
leaq -0x210(%rbp), %rdi
callq 0x5e40
movq %rax, -0x208(%rbp)
leaq -0x208(%rbp), %rdi
movl $0x1, %esi
callq 0x5750
movq %rax, -0x200(%rbp)
leaq -0x1f8(%rbp), %rdi
leaq -0x200(%rbp), %rsi
callq 0x3cd0
movq -0x390(%rbp), %rdi
movq -0x1d8(%rbp), %rsi
movq -0x1f8(%rbp), %rdx
callq 0x3c00
movq %rax, -0x218(%rbp)
jmp 0x8495
jmp 0x8497
leaq -0x100(%rbp), %rdi
callq 0x3de0
jmp 0x7957
addq $0x390, %rsp            # imm = 0x390
popq %rbp
retq
nopw %cs:(%rax,%rax)