// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/graphics/backends/cairo/surfacecairo.cpp
// Function: smooth::GUI::SurfaceCairo::Box(smooth::GUI::Rect const&, smooth::GUI::Color const&, int, smooth::GUI::Size const&)
S::Int S::GUI::SurfaceCairo::Box(const Rect &iRect, const Color &color, Int style, const Size &ellipse)
{
	if (window == NIL) return Success();

	Rect	 rect = rightToLeft.TranslateRect(iRect);

	if (!painting)
	{
		CreateCairoContext();

		cairo_set_source_rgb(context, color.GetRed() / 255.0, color.GetGreen() / 255.0, color.GetBlue() / 255.0);
	}

	cairo_set_source_rgb(paintContextCairo, color.GetRed() / 255.0, color.GetGreen() / 255.0, color.GetBlue() / 255.0);

	if (style & Rect::Filled)
	{
		if (style & Rect::Rounded)
		{
			if (!painting)
			{
				cairo_move_to(context, rect.left + ellipse.cx, rect.top);
				cairo_line_to(context, rect.right - ellipse.cx, rect.top);
				cairo_curve_to(context, rect.right, rect.top, rect.right, rect.top, rect.right, rect.top + ellipse.cy);
				cairo_line_to(context, rect.right, rect.bottom - ellipse.cy);
				cairo_curve_to(context, rect.right, rect.bottom, rect.right, rect.bottom, rect.right - ellipse.cx, rect.bottom);
				cairo_line_to(context, rect.left + ellipse.cx, rect.bottom);
				cairo_curve_to(context, rect.left, rect.bottom, rect.left, rect.bottom, rect.left, rect.bottom - ellipse.cy);
				cairo_line_to(context, rect.left, rect.top + ellipse.cy);
				cairo_curve_to(context, rect.left, rect.top, rect.left, rect.top, rect.left + ellipse.cx, rect.top);

				cairo_fill(context);
			}

			cairo_move_to(paintContextCairo, rect.left + ellipse.cx, rect.top);
			cairo_line_to(paintContextCairo, rect.right - ellipse.cx, rect.top);
			cairo_curve_to(paintContextCairo, rect.right, rect.top, rect.right, rect.top, rect.right, rect.top + ellipse.cy);
			cairo_line_to(paintContextCairo, rect.right, rect.bottom - ellipse.cy);
			cairo_curve_to(paintContextCairo, rect.right, rect.bottom, rect.right, rect.bottom, rect.right - ellipse.cx, rect.bottom);
			cairo_line_to(paintContextCairo, rect.left + ellipse.cx, rect.bottom);
			cairo_curve_to(paintContextCairo, rect.left, rect.bottom, rect.left, rect.bottom, rect.left, rect.bottom - ellipse.cy);
			cairo_line_to(paintContextCairo, rect.left, rect.top + ellipse.cy);
			cairo_curve_to(paintContextCairo, rect.left, rect.top, rect.left, rect.top, rect.left + ellipse.cx, rect.top);

			cairo_fill(paintContextCairo);
		}
		else
		{
			if (!painting)
			{
				cairo_rectangle(context, rect.left, rect.top, rect.GetWidth(), rect.GetHeight());
				cairo_fill(context);
			}

			cairo_rectangle(paintContextCairo, rect.left, rect.top, rect.GetWidth(), rect.GetHeight());
			cairo_fill(paintContextCairo);
		}
	}
	else if (style == Rect::Outlined)
	{
		if (!painting)
		{
			cairo_set_line_width(context, 1.0);
			cairo_rectangle(context, rect.left + 0.5, rect.top + 0.5, rect.GetWidth() - 1, rect.GetHeight() - 1);
			cairo_stroke(context);
		}

		cairo_set_line_width(paintContextCairo, 1.0);
		cairo_rectangle(paintContextCairo, rect.left + 0.5, rect.top + 0.5, rect.GetWidth() - 1, rect.GetHeight() - 1);
		cairo_stroke(paintContextCairo);
	}
	else if (style & Rect::Inverted)
	{
		if (cairo_version() >= CAIRO_VERSION_ENCODE(1,9,2))
		{
			if (!painting)
			{
				cairo_set_operator(context, CAIRO_OPERATOR_DIFFERENCE);
				cairo_set_source_rgb(context, 1.0, 1.0, 1.0);
				cairo_rectangle(context, rect.left, rect.top, rect.GetWidth(), rect.GetHeight());
				cairo_fill(context);
				cairo_set_operator(context, CAIRO_OPERATOR_OVER);
			}

			cairo_set_operator(paintContextCairo, CAIRO_OPERATOR_DIFFERENCE);
			cairo_set_source_rgb(paintContextCairo, 1.0, 1.0, 1.0);
			cairo_rectangle(paintContextCairo, rect.left, rect.top, rect.GetWidth(), rect.GetHeight());
			cairo_fill(paintContextCairo);
			cairo_set_operator(paintContextCairo, CAIRO_OPERATOR_OVER);
		}
		else
		{
			Bitmap	 area(rect.GetSize());

			BlitToBitmap(iRect, area, Rect(Point(0, 0), area.GetSize()));

			area.InvertColors();

			BlitFromBitmap(area, Rect(Point(0, 0), area.GetSize()), iRect);
		}
	}
	else if (style & Rect::Dotted)
	{
		if (!painting)
		{
			for (Int x = rect.left						    + 1; x <  rect.right;  x += 2) cairo_rectangle(context, x, rect.top, 1.0, 1.0);
			for (Int y = rect.top	 - (rect.GetWidth()		      ) % 2 + 2; y <  rect.bottom; y += 2) cairo_rectangle(context, rect.right - 1, y, 1.0, 1.0);
			for (Int x = rect.right	 - (rect.GetWidth() + rect.GetHeight()) % 2 - 2; x >= rect.left;   x -= 2) cairo_rectangle(context, x, rect.bottom - 1, 1.0, 1.0);
			for (Int y = rect.bottom - (		      rect.GetHeight()) % 2 - 1; y >= rect.top;	   y -= 2) cairo_rectangle(context, rect.left, y, 1.0, 1.0);

			cairo_fill(context);
		}

		for (Int x = rect.left						    + 1;  x <  rect.right;  x += 2) cairo_rectangle(paintContextCairo, x, rect.top,  1.0, 1.0);
		for (Int y = rect.top	 - (rect.GetWidth()		      ) % 2 + 2;  y <  rect.bottom; y += 2) cairo_rectangle(paintContextCairo, rect.right - 1, y,  1.0, 1.0);
		for (Int x = rect.right	 - (rect.GetWidth() + rect.GetHeight()) % 2 - 2;  x >= rect.left;   x -= 2) cairo_rectangle(paintContextCairo, x, rect.bottom - 1,  1.0, 1.0);
		for (Int y = rect.bottom - (		      rect.GetHeight()) % 2 - 1;  y >= rect.top;    y -= 2) cairo_rectangle(paintContextCairo, rect.left, y,  1.0, 1.0);

		cairo_fill(paintContextCairo);
	}

	if (!painting) DestroyCairoContext();

	return Success();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
cmpq $0x0, 0x50(%rdi)
je 0xc5caa
movq %r8, %r12
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %rbx
addq $0x28, %rdi
callq 0x63296
movq %rax, 0x8(%rsp)
movq %rdx, %r15
cmpw $0x0, 0xa(%rbx)
jne 0xc574c
movq %rbx, %rdi
callq 0xc508a
movq 0xc0(%rbx), %rdi
movl 0x8(%r14), %eax
movl $0xff, %ecx
movl %eax, %edx
andl %ecx, %edx
cvtsi2sd %edx, %xmm0
movsd 0x2ec41(%rip), %xmm3    # 0xf4368
divsd %xmm3, %xmm0
movl %eax, %edx
shrl $0x8, %edx
andl %ecx, %edx
cvtsi2sd %edx, %xmm1
divsd %xmm3, %xmm1
shrl $0x10, %eax
andl %ecx, %eax
cvtsi2sd %eax, %xmm2
divsd %xmm3, %xmm2
callq 0x58030
movq 0xd0(%rbx), %rdi
movl 0x8(%r14), %eax
movl $0xff, %ecx
movl %eax, %edx
andl %ecx, %edx
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
movsd 0x2ebf9(%rip), %xmm3    # 0xf4368
divsd %xmm3, %xmm0
movl %eax, %edx
shrl $0x8, %edx
andl %ecx, %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
divsd %xmm3, %xmm1
shrl $0x10, %eax
andl %ecx, %eax
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
divsd %xmm3, %xmm2
callq 0x58030
movq 0xa7807(%rip), %rax     # 0x16cfa8
testl %ebp, (%rax)
je 0xc5afe
movq 0xa7240(%rip), %rcx     # 0x16c9f0
movzwl 0xa(%rbx), %eax
testl %ebp, (%rcx)
movq 0x8(%rsp), %r13
je 0xc5c01
testw %ax, %ax
jne 0xc596b
movq 0xc0(%rbx), %rdi
movl (%r12), %eax
addl %r13d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movq %r13, %r14
shrq $0x20, %r14
xorps %xmm1, %xmm1
cvtsi2sd %r14d, %xmm1
movsd %xmm1, (%rsp)
callq 0x572e0
movq 0xc0(%rbx), %rdi
movl %r15d, %eax
subl (%r12), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd (%rsp), %xmm1
callq 0x56480
movq 0xc0(%rbx), %rdi
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
movsd %xmm0, 0x10(%rsp)
movl 0x4(%r12), %eax
addl %r14d, %eax
cvtsi2sd %eax, %xmm5
movsd (%rsp), %xmm1
movapd %xmm0, %xmm2
movaps %xmm1, %xmm3
movapd %xmm0, %xmm4
callq 0x573e0
movq 0xc0(%rbx), %rdi
movq %r15, %r13
shrq $0x20, %r13
movl %r13d, %eax
subl 0x4(%r12), %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movsd 0x10(%rsp), %xmm0
callq 0x56480
movq 0xc0(%rbx), %rdi
xorps %xmm1, %xmm1
cvtsi2sd %r13d, %xmm1
movsd %xmm1, 0x20(%rsp)
movl (%r12), %eax
movl %r15d, %ecx
subl %eax, %ecx
xorps %xmm4, %xmm4
cvtsi2sd %ecx, %xmm4
movsd 0x10(%rsp), %xmm0
movaps %xmm0, %xmm2
movapd %xmm1, %xmm3
movapd %xmm1, %xmm5
callq 0x573e0
movq 0xc0(%rbx), %rdi
movl (%r12), %eax
addl 0x8(%rsp), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x20(%rsp), %xmm1
callq 0x56480
movq 0xc0(%rbx), %rdi
xorps %xmm0, %xmm0
cvtsi2sdl 0x8(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
subl 0x4(%r12), %r13d
xorps %xmm5, %xmm5
cvtsi2sd %r13d, %xmm5
movq 0x8(%rsp), %r13
movsd 0x20(%rsp), %xmm1
movapd %xmm0, %xmm2
movaps %xmm1, %xmm3
movapd %xmm0, %xmm4
callq 0x573e0
movq 0xc0(%rbx), %rdi
addl 0x4(%r12), %r14d
xorps %xmm1, %xmm1
cvtsi2sd %r14d, %xmm1
movsd 0x10(%rsp), %xmm0
callq 0x56480
movq 0xc0(%rbx), %rdi
movl (%r12), %eax
addl %r13d, %eax
xorps %xmm4, %xmm4
cvtsi2sd %eax, %xmm4
movsd 0x10(%rsp), %xmm0
movsd (%rsp), %xmm1
movapd %xmm0, %xmm2
movapd %xmm1, %xmm3
movapd %xmm1, %xmm5
callq 0x573e0
movq 0xc0(%rbx), %rdi
callq 0x57d40
movq 0xd0(%rbx), %rdi
movl (%r12), %eax
addl %r13d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movq %r13, %r14
shrq $0x20, %r14
xorps %xmm1, %xmm1
cvtsi2sd %r14d, %xmm1
movsd %xmm1, 0x8(%rsp)
callq 0x572e0
movq 0xd0(%rbx), %rdi
movl %r15d, %eax
subl (%r12), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x8(%rsp), %xmm1
callq 0x56480
movq 0xd0(%rbx), %rdi
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
movsd %xmm0, (%rsp)
movl 0x4(%r12), %eax
addl %r14d, %eax
xorps %xmm5, %xmm5
cvtsi2sd %eax, %xmm5
movsd 0x8(%rsp), %xmm1
movapd %xmm0, %xmm2
movaps %xmm1, %xmm3
movapd %xmm0, %xmm4
callq 0x573e0
movq 0xd0(%rbx), %rdi
movq %r13, %rbp
movq %r15, %r13
shrq $0x20, %r13
movl %r13d, %eax
subl 0x4(%r12), %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movsd (%rsp), %xmm0
callq 0x56480
movq 0xd0(%rbx), %rdi
xorps %xmm1, %xmm1
cvtsi2sd %r13d, %xmm1
movsd %xmm1, 0x10(%rsp)
movl (%r12), %eax
subl %eax, %r15d
xorps %xmm4, %xmm4
cvtsi2sd %r15d, %xmm4
movsd (%rsp), %xmm0
movaps %xmm0, %xmm2
movapd %xmm1, %xmm3
movapd %xmm1, %xmm5
callq 0x573e0
movq 0xd0(%rbx), %rdi
movl (%r12), %eax
addl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x10(%rsp), %xmm1
callq 0x56480
movq 0xd0(%rbx), %rdi
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movsd %xmm0, (%rsp)
subl 0x4(%r12), %r13d
xorps %xmm5, %xmm5
cvtsi2sd %r13d, %xmm5
movsd 0x10(%rsp), %xmm1
movapd %xmm0, %xmm2
movaps %xmm1, %xmm3
movapd %xmm0, %xmm4
callq 0x573e0
movq 0xd0(%rbx), %rdi
addl 0x4(%r12), %r14d
xorps %xmm1, %xmm1
cvtsi2sd %r14d, %xmm1
movsd (%rsp), %xmm0
callq 0x56480
movq 0xd0(%rbx), %rdi
movl (%r12), %eax
addl %ebp, %eax
xorps %xmm4, %xmm4
cvtsi2sd %eax, %xmm4
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movapd %xmm0, %xmm2
movapd %xmm1, %xmm3
movapd %xmm1, %xmm5
callq 0x573e0
jmp 0xc5c8f
movq 0xa6d1b(%rip), %rax     # 0x16c820
cmpl %ebp, (%rax)
jne 0xc5cbb
cmpw $0x0, 0xa(%rbx)
movq 0x8(%rsp), %r14
jne 0xc5b8c
movq 0xc0(%rbx), %rdi
movsd 0x2e860(%rip), %xmm0    # 0xf4388
callq 0x56d40
movq 0xc0(%rbx), %rdi
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
movsd 0x2e854(%rip), %xmm2    # 0xf4398
addsd %xmm2, %xmm0
movq %r14, %rax
shrq $0x20, %rax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
addsd %xmm2, %xmm1
movl %r14d, %ecx
notl %ecx
addl %r15d, %ecx
xorps %xmm2, %xmm2
cvtsi2sd %ecx, %xmm2
movq %r15, %rcx
shrq $0x20, %rcx
notl %eax
addl %ecx, %eax
xorps %xmm3, %xmm3
cvtsi2sd %eax, %xmm3
callq 0x565a0
movq 0xc0(%rbx), %rdi
callq 0x57010
movq 0xd0(%rbx), %rdi
movsd 0x2e7ed(%rip), %xmm0    # 0xf4388
callq 0x56d40
movq 0xd0(%rbx), %rdi
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
movsd 0x2e7e1(%rip), %xmm2    # 0xf4398
addsd %xmm2, %xmm0
movq %r14, %rax
shrq $0x20, %rax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
addsd %xmm2, %xmm1
notl %r14d
addl %r15d, %r14d
xorps %xmm2, %xmm2
cvtsi2sd %r14d, %xmm2
shrq $0x20, %r15
notl %eax
addl %r15d, %eax
xorps %xmm3, %xmm3
cvtsi2sd %eax, %xmm3
callq 0x565a0
movq 0xd0(%rbx), %rdi
callq 0x57010
jmp 0xc5c9b
testw %ax, %ax
jne 0xc5c51
movq 0xc0(%rbx), %rdi
xorps %xmm0, %xmm0
cvtsi2sd %r13d, %xmm0
movq %r13, %rax
shrq $0x20, %rax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movl %r15d, %ecx
subl %r13d, %ecx
xorps %xmm2, %xmm2
cvtsi2sd %ecx, %xmm2
movq %r15, %rcx
shrq $0x20, %rcx
subl %eax, %ecx
xorps %xmm3, %xmm3
cvtsi2sd %ecx, %xmm3
callq 0x565a0
movq 0xc0(%rbx), %rdi
callq 0x57d40
movq 0xd0(%rbx), %rdi
xorps %xmm0, %xmm0
cvtsi2sd %r13d, %xmm0
movq %r13, %rax
shrq $0x20, %rax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movl %r15d, %ecx
subl %r13d, %ecx
xorps %xmm2, %xmm2
cvtsi2sd %ecx, %xmm2
shrq $0x20, %r15
subl %eax, %r15d
xorps %xmm3, %xmm3
cvtsi2sd %r15d, %xmm3
callq 0x565a0
movq 0xd0(%rbx), %rdi
callq 0x57d40
cmpw $0x0, 0xa(%rbx)
jne 0xc5caa
movq %rbx, %rdi
callq 0xc50e0
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xa7056(%rip), %rax     # 0x16cd18
testl %ebp, (%rax)
je 0xc5dfc
callq 0x55ce0
cmpl $0x2a96, %eax           # imm = 0x2A96
jl 0xc6112
cmpw $0x0, 0xa(%rbx)
movq 0x8(%rsp), %r14
jne 0xc5d71
movq 0xc0(%rbx), %rdi
movl $0x17, %esi
callq 0x55110
movq 0xc0(%rbx), %rdi
movsd 0x2e67e(%rip), %xmm0    # 0xf4388
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
callq 0x58030
movq 0xc0(%rbx), %rdi
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
movq %r14, %rax
shrq $0x20, %rax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movl %r15d, %ecx
subl %r14d, %ecx
xorps %xmm2, %xmm2
cvtsi2sd %ecx, %xmm2
movq %r15, %rcx
shrq $0x20, %rcx
subl %eax, %ecx
xorps %xmm3, %xmm3
cvtsi2sd %ecx, %xmm3
callq 0x565a0
movq 0xc0(%rbx), %rdi
callq 0x57d40
movq 0xc0(%rbx), %rdi
movl $0x2, %esi
callq 0x55110
movq 0xd0(%rbx), %rdi
movl $0x17, %esi
callq 0x55110
movq 0xd0(%rbx), %rdi
movsd 0x2e5f7(%rip), %xmm0    # 0xf4388
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
callq 0x58030
movq 0xd0(%rbx), %rdi
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
movq %r14, %rax
shrq $0x20, %rax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movl %r15d, %ecx
subl %r14d, %ecx
xorps %xmm2, %xmm2
cvtsi2sd %ecx, %xmm2
shrq $0x20, %r15
subl %eax, %r15d
xorps %xmm3, %xmm3
cvtsi2sd %r15d, %xmm3
callq 0x565a0
movq 0xd0(%rbx), %rdi
callq 0x57d40
movq 0xd0(%rbx), %rdi
movl $0x2, %esi
callq 0x55110
jmp 0xc5c9b
movq 0xa708d(%rip), %rax     # 0x16ce90
testl %ebp, (%rax)
movq 0x8(%rsp), %r12
je 0xc5c9b
cmpw $0x0, 0xa(%rbx)
jne 0xc5f9c
leal 0x1(%r12), %ebp
cmpl %r15d, %ebp
jge 0xc5e64
movq %r12, %rax
shrq $0x20, %rax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, (%rsp)
movq 0xc0(%rbx), %rdi
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movsd (%rsp), %xmm1
movsd 0x2e535(%rip), %xmm2    # 0xf4388
movapd %xmm2, %xmm3
callq 0x565a0
addl $0x2, %ebp
cmpl %r15d, %ebp
jl 0xc5e38
movq %r12, %rcx
shrq $0x20, %rcx
movl %r15d, %r13d
subl %r12d, %r13d
movl %r13d, %eax
shrl $0x1f, %eax
addl %r13d, %eax
andl $-0x2, %eax
subl %r13d, %eax
movq %r15, %r14
shrq $0x20, %r14
movq %rcx, 0x10(%rsp)
leal (%rcx,%rax), %ebp
addl $0x2, %ebp
cmpl %r14d, %ebp
jge 0xc5ed3
leal -0x1(%r15), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, (%rsp)
movq 0xc0(%rbx), %rdi
xorps %xmm1, %xmm1
cvtsi2sd %ebp, %xmm1
movsd (%rsp), %xmm0
movsd 0x2e4c6(%rip), %xmm2    # 0xf4388
movapd %xmm2, %xmm3
callq 0x565a0
addl $0x2, %ebp
cmpl %r14d, %ebp
jl 0xc5ea7
movl %r14d, %ebp
subl 0x10(%rsp), %ebp
addl %ebp, %r13d
movl %r13d, %eax
shrl $0x1f, %eax
addl %r13d, %eax
andl $-0x2, %eax
subl %r13d, %eax
leal (%r15,%rax), %r13d
addl $-0x2, %r13d
movq 0x8(%rsp), %r12
cmpl %r12d, %r13d
jl 0xc5f3c
leal -0x1(%r14), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, (%rsp)
movq 0xc0(%rbx), %rdi
xorps %xmm0, %xmm0
cvtsi2sd %r13d, %xmm0
movsd (%rsp), %xmm1
movsd 0x2e45e(%rip), %xmm2    # 0xf4388
movapd %xmm2, %xmm3
callq 0x565a0
addl $-0x2, %r13d
cmpl %r12d, %r13d
jge 0xc5f0e
movl %ebp, %eax
shrl $0x1f, %eax
addl %ebp, %eax
andl $-0x2, %eax
subl %eax, %ebp
notl %ebp
addl %r14d, %ebp
movq 0x10(%rsp), %r14
cmpl %r14d, %ebp
jl 0xc5f90
xorps %xmm0, %xmm0
cvtsi2sd %r12d, %xmm0
movsd %xmm0, (%rsp)
movq 0xc0(%rbx), %rdi
xorps %xmm1, %xmm1
cvtsi2sd %ebp, %xmm1
movsd (%rsp), %xmm0
movsd 0x2e409(%rip), %xmm2    # 0xf4388
movapd %xmm2, %xmm3
callq 0x565a0
addl $-0x2, %ebp
cmpl %r14d, %ebp
jge 0xc5f64
movq 0xc0(%rbx), %rdi
callq 0x57d40
leal 0x1(%r12), %ebp
cmpl %r15d, %ebp
jge 0xc5fe5
movq %r12, %rax
shrq $0x20, %rax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, (%rsp)
movq 0xd0(%rbx), %rdi
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movsd (%rsp), %xmm1
movsd 0x2e3b4(%rip), %xmm2    # 0xf4388
movapd %xmm2, %xmm3
callq 0x565a0
addl $0x2, %ebp
cmpl %r15d, %ebp
jl 0xc5fb9
movq %r12, %r14
shrq $0x20, %r14
movl %r15d, %r13d
subl %r12d, %r13d
movl %r13d, %eax
shrl $0x1f, %eax
addl %r13d, %eax
andl $-0x2, %eax
subl %r13d, %eax
movq %r15, %r12
shrq $0x20, %r12
leal (%r14,%rax), %ebp
addl $0x2, %ebp
cmpl %r12d, %ebp
jge 0xc6050
leal -0x1(%r15), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, (%rsp)
movq 0xd0(%rbx), %rdi
xorps %xmm1, %xmm1
cvtsi2sd %ebp, %xmm1
movsd (%rsp), %xmm0
movsd 0x2e349(%rip), %xmm2    # 0xf4388
movapd %xmm2, %xmm3
callq 0x565a0
addl $0x2, %ebp
cmpl %r12d, %ebp
jl 0xc6024
movl %r12d, %ebp
subl %r14d, %ebp
addl %ebp, %r13d
movl %r13d, %eax
shrl $0x1f, %eax
addl %r13d, %eax
andl $-0x2, %eax
subl %r13d, %eax
addl %eax, %r15d
addl $-0x2, %r15d
movq 0x8(%rsp), %r13
cmpl %r13d, %r15d
jl 0xc60b8
leal -0x1(%r12), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, (%rsp)
movq 0xd0(%rbx), %rdi
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
movsd (%rsp), %xmm1
movsd 0x2e2e2(%rip), %xmm2    # 0xf4388
movapd %xmm2, %xmm3
callq 0x565a0
addl $-0x2, %r15d
cmpl %r13d, %r15d
jge 0xc608a
movl %ebp, %eax
shrl $0x1f, %eax
addl %ebp, %eax
andl $-0x2, %eax
subl %eax, %ebp
notl %ebp
addl %r12d, %ebp
cmpl %r14d, %ebp
jl 0xc5c8f
xorps %xmm0, %xmm0
cvtsi2sd %r13d, %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0xd0(%rbx), %rdi
xorps %xmm1, %xmm1
cvtsi2sd %ebp, %xmm1
movsd 0x8(%rsp), %xmm0
movsd 0x2e28c(%rip), %xmm2    # 0xf4388
movapd %xmm2, %xmm3
callq 0x565a0
addl $-0x2, %ebp
cmpl %r14d, %ebp
jge 0xc60e0
jmp 0xc5c8f
movl %r15d, %eax
movq 0x8(%rsp), %rdx
subl %edx, %eax
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
andq %rcx, %rdx
subq %rdx, %r15
andq %rcx, %r15
orq %r15, %rax
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x55960
movq %r14, %rdi
callq 0x58410
leaq 0x28(%rsp), %rcx
movq $0x0, (%rcx)
movl (%rax), %edx
movl %edx, 0x8(%rcx)
movl 0x4(%rax), %eax
movl %eax, 0xc(%rcx)
movq (%rbx), %rax
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
callq *0x98(%rax)
leaq 0x18(%rsp), %rdi
callq 0x555c0
leaq 0x18(%rsp), %rdi
callq 0x58410
leaq 0x28(%rsp), %rdx
movq $0x0, (%rdx)
movl (%rax), %ecx
movl %ecx, 0x8(%rdx)
movl 0x4(%rax), %eax
movl %eax, 0xc(%rdx)
movq (%rbx), %rax
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
movq %r13, %rcx
callq *0x90(%rax)
leaq 0x18(%rsp), %rdi
callq 0x59148
jmp 0xc5c9b
jmp 0xc61d1
jmp 0xc61d1
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x59148
movq %rbx, %rdi
callq 0x57090