// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/graphics/color.cpp
// Function: smooth::GUI::Color::ConvertTo(smooth::GUI::Color::ColorSpace) const
S::GUI::Color S::GUI::Color::ConvertTo(ColorSpace cs) const
{
	double	p1 = 0;
	double	p2 = 0;
	double	p3 = 0;
	double	p4 = 0;
	double	r;
	double	g;
	double	b;
	double	h;
	double	s;
	double	v;
	double	min;
	double	max;

	switch (colorSpace)
	{
		case RGB:
			switch (cs)
			{
				case RGB:
					return *this;
				case RGBA:
					return Color(255 << 24 | color, RGBA);
				case HSV:
					r = GetRed();
					g = GetGreen();
					b = GetBlue();

					max = Math::Max(Math::Max(r, g), b);
					min = Math::Min(Math::Min(r, g), b);

					v = max;

					if (max != 0) s = (max - min) / max;
					else	      s = 0;

					h = 0;

					if (s != 0)
					{
						double	 delta = max - min;

						if	(r == max) h =	   (g - b) / delta;
						else if (g == max) h = 2 + (b - r) / delta;
						else if (b == max) h = 4 + (r - g) / delta;

						h *= 60;

						if (h < 0) h += 360;
					}

					p1 = h / 360 * 255;
					p2 = s * 255;
					p3 = v;

					p1 = Math::Round(p1);
					p2 = Math::Round(p2);

					return Color((int) p1, (int) p2, (int) p3, HSV);
				case YUV:
					p1 = (GetRed() + GetGreen() + GetBlue()) / 3;
					p2 =  GetBlue();
					p3 =  GetRed();

					p1 = Math::Round(p1);

					return Color((int) p1, (int) p2, (int) p3, YUV);
				case CMY:
					p1 = 255 - GetRed();
					p2 = 255 - GetGreen();
					p3 = 255 - GetBlue();

					return Color((int) p1, (int) p2, (int) p3, CMY);
				case CMYK:
					r = GetRed();
					g = GetGreen();
					b = GetBlue();

					p4 = 255 - Math::Max(Math::Max(r, g), b);
					p1 = 255 - r - p4;
					p2 = 255 - g - p4;
					p3 = 255 - b - p4;

					return Color(((Int) p1) | ((Int) p2) << 8 | ((Int) p3) << 16 | ((Int) p4) << 24, CMYK);
				case GRAY:
					return Color((GetRed() + GetGreen() + GetBlue()) / 3, GRAY);
				default:
					break;
			}

			break;
		case RGBA:
			switch (cs)
			{
				case RGB:
					return Color(GetRed(), GetGreen(), GetBlue(), RGB);
				case RGBA:
					return *this;
				case HSV:
					return ConvertTo(RGB).ConvertTo(HSV);
				case YUV:
					return ConvertTo(RGB).ConvertTo(YUV);
				case CMY:
					return ConvertTo(RGB).ConvertTo(CMY);
				case CMYK:
					return ConvertTo(RGB).ConvertTo(CMYK);
				case GRAY:
					return ConvertTo(RGB).ConvertTo(GRAY);
				default:
					break;
			}

			break;
		case HSV:
			switch (cs)
			{
				case RGB:
					h = ((double) GetRed()) / 255 * 360;
					s = ((double) GetGreen()) / 255;
					v = GetBlue();

					if (s == 0)
					{
						p1 = v;
						p2 = v;
						p3 = v;
					}
					else
					{
						while (h <    0) h += 360;
						while (h >= 360) h -= 360;

						h /= 60;

						double	 f = h - (int) h;
						double	 p = v * (1 -  s	   );
						double	 q = v * (1 - (s *      f ));
						double	 t = v * (1 - (s * (1 - f)));

						switch ((int) h)
						{
							case 0:
								p1 = v;
								p2 = t;
								p3 = p;
								break;
							case 1:
								p1 = q;
								p2 = v;
								p3 = p;
								break;
							case 2:
								p1 = p;
								p2 = v;
								p3 = t;
								break;
							case 3:
								p1 = p;
								p2 = q;
								p3 = v;
								break;
							case 4:
								p1 = t;
								p2 = p;
								p3 = v;
								break;
							case 5:
								p1 = v;
								p2 = p;
								p3 = q;
								break;
							default:
								break;
						}
					}

					p1 = Math::Round(p1);
					p2 = Math::Round(p2);
					p3 = Math::Round(p3);

					return Color((int) p1, (int) p2, (int) p3, RGB);
				case RGBA:
					return ConvertTo(RGB).ConvertTo(RGBA);
				case HSV:
					return *this;
				case YUV:
					return ConvertTo(RGB).ConvertTo(YUV);
				case CMY:
					return ConvertTo(RGB).ConvertTo(CMY);
				case CMYK:
					return ConvertTo(RGB).ConvertTo(CMYK);
				case GRAY:
					return ConvertTo(RGB).ConvertTo(GRAY);
				default:
					break;
			}

			break;
		case YUV:
			switch (cs)
			{
				case RGB:
					p1 =	 GetBlue();
					p3 =	 GetGreen();
					p2 = 3 * GetRed() - p1 - p3;

					if (p2 < 0) p2 = 0;

					return Color((int) p1, (int) p2, (int) p3, RGB);
				case RGBA:
					return ConvertTo(RGB).ConvertTo(RGBA);
				case HSV:
					return ConvertTo(RGB).ConvertTo(HSV);
				case YUV:
					return *this;
				case CMY:
					return ConvertTo(RGB).ConvertTo(CMY);
				case CMYK:
					return ConvertTo(RGB).ConvertTo(CMYK);
				case GRAY:
					return ConvertTo(RGB).ConvertTo(GRAY);
				default:
					break;
			}

			break;
		case CMY:
			switch (cs)
			{
				case RGB:
					p1 = 255 - GetRed();
					p2 = 255 - GetGreen();
					p3 = 255 - GetBlue();

					return Color((int) p1, (int) p2, (int) p3, RGB);
				case RGBA:
					return ConvertTo(RGB).ConvertTo(RGBA);
				case HSV:
					return ConvertTo(RGB).ConvertTo(HSV);
				case YUV:
					return ConvertTo(RGB).ConvertTo(YUV);
				case CMY:
					return *this;
				case CMYK:
					return ConvertTo(RGB).ConvertTo(CMYK);
				case GRAY:
					return ConvertTo(RGB).ConvertTo(GRAY);
				default:
					break;
			}

			break;
		case CMYK:
			switch (cs)
			{
				case RGB:
					p4 =	   GetAlpha();
					p1 = 255 - GetRed()   - p4;
					p2 = 255 - GetGreen() - p4;
					p3 = 255 - GetBlue()  - p4;

					return Color((int) p1, (int) p2, (int) p3, RGB);
				case RGBA:
					return ConvertTo(RGB).ConvertTo(RGBA);
				case HSV:
					return ConvertTo(RGB).ConvertTo(HSV);
				case YUV:
					return ConvertTo(RGB).ConvertTo(YUV);
				case CMY:
					return ConvertTo(RGB).ConvertTo(CMY);
				case CMYK:
					return *this;
				case GRAY:
					return ConvertTo(RGB).ConvertTo(GRAY);
				default:
					break;
			}

			break;
		case GRAY:
			switch (cs)
			{
				case RGB:
					return Color(color, color, color, RGB);
				case RGBA:
					return ConvertTo(RGB).ConvertTo(RGBA);
				case HSV:
					return ConvertTo(RGB).ConvertTo(HSV);
				case YUV:
					return ConvertTo(RGB).ConvertTo(YUV);
				case CMY:
					return ConvertTo(RGB).ConvertTo(CMY);
				case CMYK:
					return ConvertTo(RGB).ConvertTo(CMYK);
				case GRAY:
					return *this;
				default:
					break;
			}

			break;
		default:
			break;
	}

	return *this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x300, %rsp            # imm = 0x300
movq %rdi, -0x2a0(%rbp)
movq %rdi, %rax
movq %rax, -0x298(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x290(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movl (%rax), %eax
movq %rax, -0x288(%rbp)
subq $0x6, %rax
ja 0x6a941
movq -0x288(%rbp), %rax
leaq 0x11dc2d(%rip), %rcx    # 0x187390
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x14(%rbp), %eax
movq %rax, -0x2a8(%rbp)
subq $0x6, %rax
ja 0x69c85
movq -0x2a8(%rbp), %rax
leaq 0x11dcde(%rip), %rcx    # 0x18746c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x290(%rbp), %rsi
movq -0x2a0(%rbp), %rdi
callq 0x5c720
jmp 0x6a956
movq -0x2a0(%rbp), %rdi
movq -0x290(%rbp), %rax
movq 0x8(%rax), %rsi
orq $-0x1000000, %rsi       # imm = 0xFF000000
movl $0x1, %edx
callq 0x59be0
jmp 0x6a956
movq -0x290(%rbp), %rdi
callq 0x59f20
movq -0x290(%rbp), %rdi
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x40(%rbp)
callq 0x5d920
movq -0x290(%rbp), %rdi
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x48(%rbp)
callq 0x5b650
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x40(%rbp), %xmm0
movsd -0x48(%rbp), %xmm1
callq 0x5d580
movsd -0x50(%rbp), %xmm1
callq 0x5d580
movsd %xmm0, -0x78(%rbp)
movsd -0x40(%rbp), %xmm0
movsd -0x48(%rbp), %xmm1
callq 0x5cd20
movsd -0x50(%rbp), %xmm1
callq 0x5cd20
movsd %xmm0, -0x70(%rbp)
movsd -0x78(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
movsd -0x78(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x6986e
jp 0x6986e
jmp 0x69884
movsd -0x78(%rbp), %xmm0
subsd -0x70(%rbp), %xmm0
divsd -0x78(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
jmp 0x6988c
xorps %xmm0, %xmm0
movsd %xmm0, -0x60(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x60(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x698a9
jp 0x698a9
jmp 0x6996e
movsd -0x78(%rbp), %xmm0
subsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x40(%rbp), %xmm0
ucomisd -0x78(%rbp), %xmm0
jne 0x698dc
jp 0x698dc
movsd -0x48(%rbp), %xmm0
subsd -0x50(%rbp), %xmm0
divsd -0x80(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
jmp 0x6993e
movsd -0x48(%rbp), %xmm0
ucomisd -0x78(%rbp), %xmm0
jne 0x6990c
jp 0x6990c
movsd -0x50(%rbp), %xmm1
subsd -0x40(%rbp), %xmm1
divsd -0x80(%rbp), %xmm1
movsd 0x11da77(%rip), %xmm0   # 0x187378
addsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
jmp 0x6993c
movsd -0x50(%rbp), %xmm0
ucomisd -0x78(%rbp), %xmm0
jne 0x6993a
jp 0x6993a
movsd -0x40(%rbp), %xmm1
subsd -0x48(%rbp), %xmm1
divsd -0x80(%rbp), %xmm1
movsd 0x11da3f(%rip), %xmm0   # 0x187370
addsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
jmp 0x6993c
jmp 0x6993e
movsd 0x11da1a(%rip), %xmm0   # 0x187360
mulsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x58(%rbp), %xmm0
jbe 0x6996c
movsd 0x11d9f6(%rip), %xmm0   # 0x187358
addsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
jmp 0x6996e
movsd -0x58(%rbp), %xmm0
movsd 0x11d9dd(%rip), %xmm1   # 0x187358
divsd %xmm1, %xmm0
movsd 0x11d9c9(%rip), %xmm1   # 0x187350
mulsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movsd 0x11d9b8(%rip), %xmm0   # 0x187350
mulsd -0x60(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x20(%rbp), %xmm0
callq 0x5a970
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x28(%rbp), %xmm0
callq 0x5a970
movq -0x2a0(%rbp), %rdi
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x28(%rbp)
cvttsd2si -0x20(%rbp), %esi
cvttsd2si -0x28(%rbp), %edx
cvttsd2si -0x30(%rbp), %ecx
movl $0x2, %r8d
callq 0x5a6b0
jmp 0x6a956
movq -0x290(%rbp), %rdi
callq 0x59f20
movq -0x290(%rbp), %rdi
movl %eax, -0x2b0(%rbp)
callq 0x5d920
movq -0x290(%rbp), %rdi
movl %eax, %ecx
movl -0x2b0(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x2ac(%rbp)
callq 0x5b650
movq -0x290(%rbp), %rdi
movl %eax, %ecx
movl -0x2ac(%rbp), %eax
addl %ecx, %eax
movl $0x3, %ecx
cltd
idivl %ecx
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x20(%rbp)
callq 0x5b650
movq -0x290(%rbp), %rdi
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x28(%rbp)
callq 0x59f20
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x20(%rbp), %xmm0
callq 0x5a970
movq -0x2a0(%rbp), %rdi
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x20(%rbp)
cvttsd2si -0x20(%rbp), %esi
cvttsd2si -0x28(%rbp), %edx
cvttsd2si -0x30(%rbp), %ecx
movl $0x3, %r8d
callq 0x5a6b0
jmp 0x6a956
movq -0x290(%rbp), %rdi
callq 0x59f20
movq -0x290(%rbp), %rdi
movl %eax, %ecx
movl $0xff, %eax
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x20(%rbp)
callq 0x5d920
movq -0x290(%rbp), %rdi
movl %eax, %ecx
movl $0xff, %eax
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x28(%rbp)
callq 0x5b650
movq -0x2a0(%rbp), %rdi
movl %eax, %ecx
movl $0xff, %eax
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x30(%rbp)
cvttsd2si -0x20(%rbp), %esi
cvttsd2si -0x28(%rbp), %edx
cvttsd2si -0x30(%rbp), %ecx
movl $0x4, %r8d
callq 0x5a6b0
jmp 0x6a956
movq -0x290(%rbp), %rdi
callq 0x59f20
movq -0x290(%rbp), %rdi
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x40(%rbp)
callq 0x5d920
movq -0x290(%rbp), %rdi
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x48(%rbp)
callq 0x5b650
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x40(%rbp), %xmm0
movsd -0x48(%rbp), %xmm1
callq 0x5d580
movsd -0x50(%rbp), %xmm1
callq 0x5d580
movq -0x2a0(%rbp), %rdi
movaps %xmm0, %xmm1
movsd 0x11d7b3(%rip), %xmm0   # 0x187350
subsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movsd 0x11d7a2(%rip), %xmm0   # 0x187350
subsd -0x40(%rbp), %xmm0
subsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd 0x11d78b(%rip), %xmm0   # 0x187350
subsd -0x48(%rbp), %xmm0
subsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd 0x11d774(%rip), %xmm0   # 0x187350
subsd -0x50(%rbp), %xmm0
subsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
cvttsd2si -0x20(%rbp), %eax
cvttsd2si -0x28(%rbp), %ecx
shll $0x8, %ecx
orl %ecx, %eax
cvttsd2si -0x30(%rbp), %ecx
shll $0x10, %ecx
orl %ecx, %eax
cvttsd2si -0x38(%rbp), %ecx
shll $0x18, %ecx
orl %ecx, %eax
movslq %eax, %rsi
movl $0x5, %edx
callq 0x59be0
jmp 0x6a956
movq -0x290(%rbp), %rdi
callq 0x59f20
movq -0x290(%rbp), %rdi
movl %eax, -0x2b8(%rbp)
callq 0x5d920
movq -0x290(%rbp), %rdi
movl %eax, %ecx
movl -0x2b8(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x2b4(%rbp)
callq 0x5b650
movq -0x2a0(%rbp), %rdi
movl %eax, %ecx
movl -0x2b4(%rbp), %eax
addl %ecx, %eax
movl $0x3, %ecx
cltd
idivl %ecx
movslq %eax, %rsi
movl $0x6, %edx
callq 0x59be0
jmp 0x6a956
jmp 0x69c87
jmp 0x6a943
movl -0x14(%rbp), %eax
movq %rax, -0x2c0(%rbp)
subq $0x6, %rax
ja 0x69e1b
movq -0x2c0(%rbp), %rax
leaq 0x11d7a2(%rip), %rcx    # 0x187450
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x290(%rbp), %rdi
callq 0x59f20
movq -0x290(%rbp), %rdi
movl %eax, -0x2c8(%rbp)
callq 0x5d920
movq -0x290(%rbp), %rdi
movl %eax, -0x2c4(%rbp)
callq 0x5b650
movq -0x2a0(%rbp), %rdi
movl -0x2c8(%rbp), %esi
movl -0x2c4(%rbp), %edx
movl %eax, %ecx
xorl %r8d, %r8d
callq 0x5a6b0
jmp 0x6a956
movq -0x290(%rbp), %rsi
movq -0x2a0(%rbp), %rdi
callq 0x5c720
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x90(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
movl $0x2, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movl $0x3, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
movl $0x4, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0xc0(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
movl $0x5, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0xd0(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
movl $0x6, %edx
callq 0x5c5e0
jmp 0x6a956
jmp 0x69e1d
jmp 0x6a943
movl -0x14(%rbp), %eax
movq %rax, -0x2d0(%rbp)
subq $0x6, %rax
ja 0x6a26a
movq -0x2d0(%rbp), %rax
leaq 0x11d5d8(%rip), %rcx    # 0x18741c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x290(%rbp), %rdi
callq 0x59f20
movq -0x290(%rbp), %rdi
cvtsi2sd %eax, %xmm0
movsd 0x11d4e4(%rip), %xmm1   # 0x187350
divsd %xmm1, %xmm0
movsd 0x11d4e0(%rip), %xmm1   # 0x187358
mulsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
callq 0x5d920
movq -0x290(%rbp), %rdi
cvtsi2sd %eax, %xmm0
movsd 0x11d4b7(%rip), %xmm1   # 0x187350
divsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
callq 0x5b650
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x68(%rbp)
movsd -0x60(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x69ee3
jp 0x69ee3
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
jmp 0x6a0f9
jmp 0x69ee5
xorps %xmm0, %xmm0
ucomisd -0x58(%rbp), %xmm0
jbe 0x69f03
movsd 0x11d461(%rip), %xmm0   # 0x187358
addsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
jmp 0x69ee5
jmp 0x69f05
movsd -0x58(%rbp), %xmm0
movsd 0x11d446(%rip), %xmm1   # 0x187358
ucomisd %xmm1, %xmm0
jb 0x69f30
movsd -0x58(%rbp), %xmm0
movsd 0x11d433(%rip), %xmm1   # 0x187358
subsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
jmp 0x69f05
movsd -0x58(%rbp), %xmm0
movsd 0x11d423(%rip), %xmm1   # 0x187360
divsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x58(%rbp), %xmm0
movaps %xmm0, %xmm1
cvttpd2dq %xmm1, %xmm1
cvtdq2pd %xmm1, %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0xd8(%rbp)
movsd -0x68(%rbp), %xmm0
movsd -0x60(%rbp), %xmm3
movsd 0x11d3f4(%rip), %xmm1   # 0x187368
movaps %xmm1, %xmm2
subsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
movsd %xmm0, -0xe0(%rbp)
movsd -0x68(%rbp), %xmm0
movsd -0x60(%rbp), %xmm3
movsd -0xd8(%rbp), %xmm2
mulsd %xmm2, %xmm3
movaps %xmm1, %xmm2
subsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
movsd %xmm0, -0xe8(%rbp)
movsd -0x68(%rbp), %xmm0
movsd -0x60(%rbp), %xmm2
movsd -0xd8(%rbp), %xmm4
movaps %xmm1, %xmm3
subsd %xmm4, %xmm3
mulsd %xmm3, %xmm2
subsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0xf0(%rbp)
cvttsd2si -0x58(%rbp), %eax
movl %eax, %ecx
movq %rcx, -0x2d8(%rbp)
subl $0x5, %eax
ja 0x6a0f5
movq -0x2d8(%rbp), %rax
leaq 0x11d436(%rip), %rcx    # 0x187438
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0xf0(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0xe0(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
jmp 0x6a0f7
movsd -0xe8(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0xe0(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
jmp 0x6a0f7
movsd -0xe0(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0xf0(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
jmp 0x6a0f7
movsd -0xe0(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0xe8(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
jmp 0x6a0f7
movsd -0xf0(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0xe0(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
jmp 0x6a0f7
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0xe0(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0xe8(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
jmp 0x6a0f7
jmp 0x6a0f7
jmp 0x6a0f9
movsd -0x20(%rbp), %xmm0
callq 0x5a970
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x28(%rbp), %xmm0
callq 0x5a970
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x30(%rbp), %xmm0
callq 0x5a970
movq -0x2a0(%rbp), %rdi
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x30(%rbp)
cvttsd2si -0x20(%rbp), %esi
cvttsd2si -0x28(%rbp), %edx
cvttsd2si -0x30(%rbp), %ecx
xorl %r8d, %r8d
callq 0x5a6b0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x100(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x100(%rbp), %rsi
movl $0x1, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
movq -0x2a0(%rbp), %rdi
callq 0x5c720
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x110(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x110(%rbp), %rsi
movl $0x3, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x120(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x120(%rbp), %rsi
movl $0x4, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x130(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x130(%rbp), %rsi
movl $0x5, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x140(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x140(%rbp), %rsi
movl $0x6, %edx
callq 0x5c5e0
jmp 0x6a956
jmp 0x6a26c
jmp 0x6a943
movl -0x14(%rbp), %eax
movq %rax, -0x2e0(%rbp)
subq $0x6, %rax
ja 0x6a42f
movq -0x2e0(%rbp), %rax
leaq 0x11d16d(%rip), %rcx    # 0x187400
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x290(%rbp), %rdi
callq 0x5b650
movq -0x290(%rbp), %rdi
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x20(%rbp)
callq 0x5d920
movq -0x290(%rbp), %rdi
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0x59f20
imull $0x3, %eax, %eax
cvtsi2sd %eax, %xmm0
subsd -0x20(%rbp), %xmm0
subsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x28(%rbp), %xmm0
jbe 0x6a2fa
xorps %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
movq -0x2a0(%rbp), %rdi
cvttsd2si -0x20(%rbp), %esi
cvttsd2si -0x28(%rbp), %edx
cvttsd2si -0x30(%rbp), %ecx
xorl %r8d, %r8d
callq 0x5a6b0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x150(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x150(%rbp), %rsi
movl $0x1, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x160(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x160(%rbp), %rsi
movl $0x2, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
movq -0x2a0(%rbp), %rdi
callq 0x5c720
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x170(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x170(%rbp), %rsi
movl $0x4, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x180(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x180(%rbp), %rsi
movl $0x5, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x190(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x190(%rbp), %rsi
movl $0x6, %edx
callq 0x5c5e0
jmp 0x6a956
jmp 0x6a431
jmp 0x6a943
movl -0x14(%rbp), %eax
movq %rax, -0x2e8(%rbp)
subq $0x6, %rax
ja 0x6a5f0
movq -0x2e8(%rbp), %rax
leaq 0x11cf8c(%rip), %rcx    # 0x1873e4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x290(%rbp), %rdi
callq 0x59f20
movq -0x290(%rbp), %rdi
movl %eax, %ecx
movl $0xff, %eax
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x20(%rbp)
callq 0x5d920
movq -0x290(%rbp), %rdi
movl %eax, %ecx
movl $0xff, %eax
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x28(%rbp)
callq 0x5b650
movq -0x2a0(%rbp), %rdi
movl %eax, %ecx
movl $0xff, %eax
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x30(%rbp)
cvttsd2si -0x20(%rbp), %esi
cvttsd2si -0x28(%rbp), %edx
cvttsd2si -0x30(%rbp), %ecx
xorl %r8d, %r8d
callq 0x5a6b0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x1a0(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
movl $0x1, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x1b0(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
movl $0x2, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x1c0(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
movl $0x3, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
movq -0x2a0(%rbp), %rdi
callq 0x5c720
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x1d0(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
movl $0x5, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x1e0(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
movl $0x6, %edx
callq 0x5c5e0
jmp 0x6a956
jmp 0x6a5f2
jmp 0x6a943
movl -0x14(%rbp), %eax
movq %rax, -0x2f0(%rbp)
subq $0x6, %rax
ja 0x6a7d5
movq -0x2f0(%rbp), %rax
leaq 0x11cdaf(%rip), %rcx    # 0x1873c8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x290(%rbp), %rdi
callq 0x5bac0
movq -0x290(%rbp), %rdi
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x38(%rbp)
callq 0x59f20
movq -0x290(%rbp), %rdi
movl %eax, %ecx
movl $0xff, %eax
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
subsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
callq 0x5d920
movq -0x290(%rbp), %rdi
movl %eax, %ecx
movl $0xff, %eax
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
subsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
callq 0x5b650
movq -0x2a0(%rbp), %rdi
movl %eax, %ecx
movl $0xff, %eax
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
subsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
cvttsd2si -0x20(%rbp), %esi
cvttsd2si -0x28(%rbp), %edx
cvttsd2si -0x30(%rbp), %ecx
xorl %r8d, %r8d
callq 0x5a6b0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x1f0(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
movl $0x1, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x200(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x200(%rbp), %rsi
movl $0x2, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x210(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x210(%rbp), %rsi
movl $0x3, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x220(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x220(%rbp), %rsi
movl $0x4, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
movq -0x2a0(%rbp), %rdi
callq 0x5c720
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x230(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x230(%rbp), %rsi
movl $0x6, %edx
callq 0x5c5e0
jmp 0x6a956
jmp 0x6a7d7
jmp 0x6a943
movl -0x14(%rbp), %eax
movq %rax, -0x2f8(%rbp)
subq $0x6, %rax
ja 0x6a93d
movq -0x2f8(%rbp), %rax
leaq 0x11cbae(%rip), %rcx    # 0x1873ac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x2a0(%rbp), %rdi
movq -0x290(%rbp), %rax
movq 0x8(%rax), %rcx
movl %ecx, %esi
movq 0x8(%rax), %rcx
movl %ecx, %edx
movq 0x8(%rax), %rax
movl %eax, %ecx
xorl %r8d, %r8d
callq 0x5a6b0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x240(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x240(%rbp), %rsi
movl $0x1, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x250(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x250(%rbp), %rsi
movl $0x2, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x260(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x260(%rbp), %rsi
movl $0x3, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x270(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x270(%rbp), %rsi
movl $0x4, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
leaq -0x280(%rbp), %rdi
xorl %edx, %edx
callq 0x5c5e0
movq -0x2a0(%rbp), %rdi
leaq -0x280(%rbp), %rsi
movl $0x5, %edx
callq 0x5c5e0
jmp 0x6a956
movq -0x290(%rbp), %rsi
movq -0x2a0(%rbp), %rdi
callq 0x5c720
jmp 0x6a956
jmp 0x6a93f
jmp 0x6a943
jmp 0x6a943
movq -0x290(%rbp), %rsi
movq -0x2a0(%rbp), %rdi
callq 0x5c720
movq -0x298(%rbp), %rax
addq $0x300, %rsp            # imm = 0x300
popq %rbp
retq
nopw %cs:(%rax,%rax)