// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/widgets/multi/menu/menubarentry.cpp
// Function: smooth::GUI::MenubarEntry::Paint(int)
S::Int S::GUI::MenubarEntry::Paint(Int message)
{
	if (!IsRegistered()) return Error();
	if (!IsVisible())    return Success();

#ifdef __APPLE__
	if (container->GetOrientation() == OR_FREE) return container->Paint(SP_UPDATE);
#endif

	Surface	*surface  = GetDrawSurface();
	Point	 realPos  = GetRealPosition();
	Size	 realSize = GetRealSize();
	Rect	 bmpRect  = Rect(realPos + Point(2, 2) * surface->GetSurfaceDPI() / 96.0, (GetSize() - Size(4 + (popup != NIL ? 12 : 0), 4)) * surface->GetSurfaceDPI() / 96.0);

	switch (message)
	{
		case SP_PAINT:
			surface->StartPaint(Rect(realPos, realSize));

			if (text == NIL && bitmap == NIL)
			{
				if (orientation == OR_LEFT || orientation == OR_RIGHT)
				{
					SetWidth(4);

					Point	 p1 = Point(realPos.x, realPos.y);
					Point	 p2 = Point(p1.x, p1.y + realSize.cy);

					surface->Bar(p1, p2, OR_VERT);

					p1.x += 2;
					p2.x += 2;

					surface->Bar(p1, p2, OR_VERT);
				}
				else if (orientation == OR_TOP || orientation == OR_BOTTOM)
				{
					SetHeight(4);

					Point	 p1 = Point(realPos.x, realPos.y);
					Point	 p2 = Point(p1.x + realSize.cx, p1.y);

					surface->Bar(p1, p2, OR_HORZ);

					p1.y += 2;
					p2.y += 2;

					surface->Bar(p1, p2, OR_HORZ);
				}
			}
			else if (text != NIL && bitmap == NIL)
			{
				Rect	 textRect = Rect(realPos + Point(1, Math::Ceil(Float(realSize.cy - scaledTextSize.cy) / 2) - 1) + Point(2, 0) * surface->GetSurfaceDPI() / 96.0, realSize - Size(2, 2) - Size(2, 0) * surface->GetSurfaceDPI() / 96.0);
				Font	 nFont	  = font;

				if (!IsActive()) nFont.SetColor(Setup::InactiveTextColor);

				surface->Box(textRect, GetBackgroundColor(), Rect::Filled);
				surface->SetText(text, textRect, nFont);
			}
			else if (text == NIL && bitmap != NIL)
			{
				surface->Box(bmpRect, Setup::BackgroundColor, Rect::Filled);

				if (flags & MB_COLOR)	surface->BlitFromBitmap(bitmap, Rect(Point(0, 0), bitmap.GetSize()), bmpRect);
				else			surface->BlitFromBitmap(graymap, Rect(Point(0, 0), graymap.GetSize()), bmpRect);

				if (popup != NIL)
				{
					Int	 height	   = Math::Round(3 * surface->GetSurfaceDPI() / 96.0);

					Point	 lineStart = realPos + Point(realSize.cx - height * 2 - 2 * surface->GetSurfaceDPI() / 96.0 - (IsRightToLeft() ? 0 : 1), (realSize.cy - height) / 2 + 1);
					Point	 lineEnd   = lineStart + Point(height * 2 - 1, 0);

					for (Int i = 0; i < height; i++)
					{
						surface->Line(lineStart, lineEnd, Setup::TextColor);

						lineStart += Point(1, 1);
						lineEnd	  += Point(-1, 1);
					}
				}
			}

			surface->EndPaint();

			break;
		case SP_MOUSEIN:
		case SP_MOUSEUP:
			if (focussed && popup != NIL) if (popup->GetContainer() == this) break;

			if (bitmap != NIL)
			{
				surface->StartPaint(Rect(realPos, realSize));

				surface->Box(bmpRect, Setup::BackgroundColor, Rect::Filled);
				surface->BlitFromBitmap(bitmap, Rect(Point(0, 0), bitmap.GetSize()), bmpRect);

				if (onAction.GetNOfConnectedSlots() > 0 && popup != NIL)
				{
					Point	 p1 = Point(realPos.x + realSize.cx - 11 * surface->GetSurfaceDPI() / 96.0 - 2, realPos.y + 1);
					Point	 p2 = Point(realPos.x + realSize.cx - 11 * surface->GetSurfaceDPI() / 96.0 - 2, realPos.y + realSize.cy - 2);

					surface->Bar(p1, p2, OR_VERT);
				}

				surface->EndPaint();
			}

			break;
		case SP_MOUSEOUT:
			if (focussed && popup != NIL) if (popup->GetContainer() == this) break;

			if (bitmap != NIL)
			{
				surface->StartPaint(Rect(realPos, realSize));

				surface->Box(bmpRect, Setup::BackgroundColor, Rect::Filled);

				if (flags & MB_COLOR) surface->BlitFromBitmap(bitmap, Rect(Point(0, 0), bitmap.GetSize()), bmpRect);
				else		      surface->BlitFromBitmap(graymap, Rect(Point(0, 0), graymap.GetSize()), bmpRect);

				if (onAction.GetNOfConnectedSlots() > 0 && popup != NIL)
				{
					Point	 p1 = Point(realPos.x + realSize.cx - 11 * surface->GetSurfaceDPI() / 96.0 - 2 + (IsRightToLeft() ? 1 : 0), realPos.y + 1);
					Point	 p2 = Point(realPos.x + realSize.cx - 11 * surface->GetSurfaceDPI() / 96.0 - 2 + (IsRightToLeft() ? 1 : 0), realPos.y + realSize.cy - 1);

					surface->Line(p1, p2, Setup::BackgroundColor);

					p1.x++;
					p2.x++;

					surface->Line(p1, p2, Setup::BackgroundColor);
				}

				surface->EndPaint();
			}

			break;
	}

	return Success();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x430, %rsp            # imm = 0x430
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x2b8(%rbp)
movq (%rdi), %rax
callq *0x88(%rax)
testb $0x1, %al
jne 0xbc8e4
leaq -0x28(%rbp), %rdi
movq %rdi, -0x2c8(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0x2c8(%rbp), %rdi
callq 0x59680
movl %eax, -0x2bc(%rbp)
jmp 0xbc8b3
movl -0x2bc(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5b5b0
jmp 0xbd998
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5b5b0
jmp 0xbd9a4
movq -0x2b8(%rbp), %rdi
movq (%rdi), %rax
callq *0x90(%rax)
testb $0x1, %al
jne 0xbc94d
leaq -0x48(%rbp), %rdi
movq %rdi, -0x2d8(%rbp)
callq 0x5ca80
movq -0x2d8(%rbp), %rdi
callq 0x59680
movl %eax, -0x2cc(%rbp)
jmp 0xbc91c
movl -0x2cc(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5a410
jmp 0xbd998
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5a410
jmp 0xbd9a4
movq -0x2b8(%rbp), %rdi
movq (%rdi), %rax
movq 0x40(%rax), %rax
callq *%rax
movq -0x2b8(%rbp), %rdi
movq %rax, -0x50(%rbp)
movq (%rdi), %rax
movq 0x48(%rax), %rax
callq *%rax
movq -0x2b8(%rbp), %rdi
movq %rax, -0x58(%rbp)
movq (%rdi), %rax
movq 0x50(%rax), %rax
callq *%rax
movq %rax, -0x60(%rbp)
leaq -0x90(%rbp), %rdi
movq %rdi, -0x300(%rbp)
movl $0x2, %edx
movl %edx, %esi
callq 0x5c2c0
movq -0x50(%rbp), %rdi
callq 0x5d470
movq -0x300(%rbp), %rdi
cwtl
cvtsi2sd %eax, %xmm0
callq 0x5a300
movq %rax, -0x88(%rbp)
leaq -0x88(%rbp), %rdi
movsd 0xcaaed(%rip), %xmm0    # 0x1874c0
movsd %xmm0, -0x2e8(%rbp)
callq 0x5cd70
movq %rax, -0x80(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x5ca20
movq -0x2b8(%rbp), %rdi
movq %rax, -0x78(%rbp)
callq 0x5bf70
movq %rax, %rcx
movq -0x2b8(%rbp), %rax
movq %rcx, -0x2f8(%rbp)
movq 0x5b8(%rax), %rax
testq %rax, %rax
movl $0x10, %eax
movl $0x4, %edx
movl %edx, %esi
cmovnel %eax, %esi
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x2f0(%rbp)
callq 0x59260
movq -0x2f8(%rbp), %rdi
movq -0x2f0(%rbp), %rsi
callq 0x5db90
movq %rax, -0xa8(%rbp)
movq -0x50(%rbp), %rdi
callq 0x5d470
cwtl
cvtsi2sd %eax, %xmm0
leaq -0xa8(%rbp), %rdi
callq 0x5a7b0
movsd -0x2e8(%rbp), %xmm0
movq %rax, -0xa0(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x5c6b0
movq %rax, -0x98(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0x78(%rbp), %rsi
leaq -0x98(%rbp), %rdx
callq 0x59ff0
movl -0x14(%rbp), %eax
movq %rax, -0x2e0(%rbp)
subq $0x5, %rax
ja 0xbd940
movq -0x2e0(%rbp), %rax
leaq 0xcdcd6(%rip), %rcx     # 0x18a7a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x50(%rbp), %rax
movq %rax, -0x308(%rbp)
leaq -0xc0(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x59ff0
movq -0x308(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x591b0
movq -0x2b8(%rbp), %rdi
addq $0xf0, %rdi
xorl %esi, %esi
callq 0x59320
testb $0x1, %al
jne 0xbcb23
jmp 0xbccc9
movq -0x2b8(%rbp), %rdi
addq $0x5c0, %rdi            # imm = 0x5C0
xorl %esi, %esi
callq 0x5c730
testb $0x1, %al
jne 0xbcb41
jmp 0xbccc9
movq -0x2b8(%rbp), %rax
movswl 0xd0(%rax), %eax
cmpl $0x10, %eax
je 0xbcb6b
movq -0x2b8(%rbp), %rax
movswl 0xd0(%rax), %eax
cmpl $0x20, %eax
jne 0xbcc04
movq -0x2b8(%rbp), %rdi
movl $0x4, %esi
callq 0x5db30
movl -0x58(%rbp), %esi
movl -0x54(%rbp), %edx
leaq -0xc8(%rbp), %rdi
callq 0x5c2c0
movl -0xc8(%rbp), %esi
movl -0xc4(%rbp), %edx
addl -0x5c(%rbp), %edx
leaq -0xd0(%rbp), %rdi
callq 0x5c2c0
movq -0x50(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
movl $0x2, %ecx
callq 0x5dc90
movl -0xc8(%rbp), %eax
addl $0x2, %eax
movl %eax, -0xc8(%rbp)
movl -0xd0(%rbp), %eax
addl $0x2, %eax
movl %eax, -0xd0(%rbp)
movq -0x50(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
movl $0x2, %ecx
callq 0x5dc90
jmp 0xbccc4
movq -0x2b8(%rbp), %rax
movswl 0xd0(%rax), %eax
cmpl $0x4, %eax
je 0xbcc2e
movq -0x2b8(%rbp), %rax
movswl 0xd0(%rax), %eax
cmpl $0x8, %eax
jne 0xbccc2
movq -0x2b8(%rbp), %rdi
movl $0x4, %esi
callq 0x5bed0
movl -0x58(%rbp), %esi
movl -0x54(%rbp), %edx
leaq -0xd8(%rbp), %rdi
callq 0x5c2c0
movl -0xd8(%rbp), %esi
addl -0x60(%rbp), %esi
movl -0xd4(%rbp), %edx
leaq -0xe0(%rbp), %rdi
callq 0x5c2c0
movq -0x50(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
movl $0x1, %ecx
callq 0x5dc90
movl -0xd4(%rbp), %eax
addl $0x2, %eax
movl %eax, -0xd4(%rbp)
movl -0xdc(%rbp), %eax
addl $0x2, %eax
movl %eax, -0xdc(%rbp)
movq -0x50(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
movl $0x1, %ecx
callq 0x5dc90
jmp 0xbccc4
jmp 0xbd319
movq -0x2b8(%rbp), %rdi
addq $0xf0, %rdi
xorl %esi, %esi
callq 0x5b110
testb $0x1, %al
jne 0xbcce7
jmp 0xbcfc5
movq -0x2b8(%rbp), %rdi
addq $0x5c0, %rdi            # imm = 0x5C0
xorl %esi, %esi
callq 0x5c730
testb $0x1, %al
jne 0xbcd05
jmp 0xbcfc5
movq -0x2b8(%rbp), %rcx
movl -0x5c(%rbp), %eax
movl 0x18c(%rcx), %ecx
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd 0xca665(%rip), %xmm1    # 0x187388
mulsd %xmm1, %xmm0
callq 0x5b240
movl %eax, %edx
decl %edx
leaq -0x108(%rbp), %rdi
movq %rdi, -0x340(%rbp)
movl $0x1, %esi
callq 0x5c2c0
movq -0x340(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x5ca20
movq %rax, -0x100(%rbp)
leaq -0x120(%rbp), %rdi
movq %rdi, -0x338(%rbp)
movl $0x2, %esi
movl %esi, -0x328(%rbp)
xorl %edx, %edx
movl %edx, -0x324(%rbp)
callq 0x5c2c0
movq -0x50(%rbp), %rdi
callq 0x5d470
movq -0x338(%rbp), %rdi
cwtl
cvtsi2sd %eax, %xmm0
callq 0x5a300
movq %rax, -0x118(%rbp)
leaq -0x118(%rbp), %rdi
movsd 0xca70b(%rip), %xmm0    # 0x1874c0
movsd %xmm0, -0x318(%rbp)
callq 0x5cd70
movq %rax, -0x110(%rbp)
leaq -0x100(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x5ca20
movl -0x328(%rbp), %edx
movq %rax, -0xf8(%rbp)
leaq -0x138(%rbp), %rdi
movq %rdi, -0x330(%rbp)
movl %edx, %esi
callq 0x59260
movq -0x330(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x5db90
movl -0x328(%rbp), %esi
movl -0x324(%rbp), %edx
movq %rax, -0x130(%rbp)
leaq -0x150(%rbp), %rdi
movq %rdi, -0x320(%rbp)
callq 0x59260
movq -0x50(%rbp), %rdi
callq 0x5d470
movq -0x320(%rbp), %rdi
cwtl
cvtsi2sd %eax, %xmm0
callq 0x5a7b0
movsd -0x318(%rbp), %xmm0
movq %rax, -0x148(%rbp)
leaq -0x148(%rbp), %rdi
callq 0x5c6b0
movq %rax, -0x140(%rbp)
leaq -0x130(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x5db90
movq %rax, -0x128(%rbp)
leaq -0xf0(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
leaq -0x128(%rbp), %rdx
callq 0x59ff0
movq -0x2b8(%rbp), %rsi
addq $0x140, %rsi            # imm = 0x140
leaq -0x190(%rbp), %rdi
callq 0x59da0
movq -0x2b8(%rbp), %rdi
movq (%rdi), %rax
movq 0x98(%rax), %rax
callq *%rax
movb %al, -0x309(%rbp)
jmp 0xbced9
movb -0x309(%rbp), %al
testb $0x1, %al
jne 0xbcf19
jmp 0xbcee5
movq 0x14ba44(%rip), %rsi    # 0x208930
leaq -0x190(%rbp), %rdi
callq 0x5d110
jmp 0xbcefa
jmp 0xbcf19
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x5abf0
jmp 0xbd9a4
movq -0x2b8(%rbp), %rdi
movq -0x50(%rbp), %rax
movq %rax, -0x350(%rbp)
movq (%rdi), %rax
movq 0x140(%rax), %rax
callq *%rax
movq %rax, -0x348(%rbp)
jmp 0xbcf40
movq 0x14c059(%rip), %rax    # 0x208fa0
movl (%rax), %eax
movl %eax, -0x354(%rbp)
leaq -0x198(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x59260
jmp 0xbcf61
movl -0x354(%rbp), %ecx
movq -0x348(%rbp), %rdx
movq -0x350(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
leaq -0x198(%rbp), %r8
callq 0x5c110
jmp 0xbcf8a
movq -0x2b8(%rbp), %rsi
movq -0x50(%rbp), %rdi
addq $0xf0, %rsi
leaq -0xf0(%rbp), %rdx
leaq -0x190(%rbp), %rcx
xorl %r8d, %r8d
callq 0x5c3f0
jmp 0xbcfb4
leaq -0x190(%rbp), %rdi
callq 0x5abf0
jmp 0xbd317
movq -0x2b8(%rbp), %rdi
addq $0xf0, %rdi
xorl %esi, %esi
callq 0x59320
testb $0x1, %al
jne 0xbcfe3
jmp 0xbd315
movq -0x2b8(%rbp), %rdi
addq $0x5c0, %rdi            # imm = 0x5C0
xorl %esi, %esi
callq 0x5a830
testb $0x1, %al
jne 0xbd001
jmp 0xbd315
movq -0x50(%rbp), %rax
movq %rax, -0x360(%rbp)
movq 0x14bf8d(%rip), %rax    # 0x208fa0
movl (%rax), %eax
movl %eax, -0x358(%rbp)
leaq -0x1a0(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x59260
movq -0x360(%rbp), %rdi
movl -0x358(%rbp), %ecx
leaq -0x70(%rbp), %rsi
movq 0x14b465(%rip), %rdx    # 0x2084a8
leaq -0x1a0(%rbp), %r8
callq 0x5c110
movq -0x2b8(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xbd0d9
movq -0x2b8(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, -0x370(%rbp)
addq $0x5c0, %rax            # imm = 0x5C0
movq %rax, -0x368(%rbp)
leaq -0x1b8(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x5c2c0
movq -0x2b8(%rbp), %rdi
addq $0x5c0, %rdi            # imm = 0x5C0
callq 0x5ce60
movq %rax, %rdx
leaq -0x1b0(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x59ff0
movq -0x370(%rbp), %rdi
movq -0x368(%rbp), %rsi
leaq -0x1b0(%rbp), %rdx
leaq -0x70(%rbp), %rcx
callq 0x59dd0
jmp 0xbd14f
movq -0x2b8(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, -0x380(%rbp)
addq $0x5c8, %rax            # imm = 0x5C8
movq %rax, -0x378(%rbp)
leaq -0x1d0(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x5c2c0
movq -0x2b8(%rbp), %rdi
addq $0x5c8, %rdi            # imm = 0x5C8
callq 0x5ce60
movq %rax, %rdx
leaq -0x1c8(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
callq 0x59ff0
movq -0x380(%rbp), %rdi
movq -0x378(%rbp), %rsi
leaq -0x1c8(%rbp), %rdx
leaq -0x70(%rbp), %rcx
callq 0x59dd0
movq -0x2b8(%rbp), %rax
cmpq $0x0, 0x5b8(%rax)
je 0xbd313
movq -0x50(%rbp), %rdi
callq 0x5d470
cwtl
imull $0x3, %eax, %eax
cvtsi2sd %eax, %xmm0
movsd 0xca343(%rip), %xmm1    # 0x1874c0
divsd %xmm1, %xmm0
callq 0x5a970
movl %eax, -0x1d4(%rbp)
movl -0x60(%rbp), %eax
movl -0x1d4(%rbp), %ecx
shll %ecx
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x390(%rbp)
movq -0x50(%rbp), %rdi
callq 0x5d470
movsd -0x390(%rbp), %xmm0
movq -0x2b8(%rbp), %rdi
cwtl
shll %eax
cvtsi2sd %eax, %xmm1
movsd 0xca2f4(%rip), %xmm2    # 0x1874c0
divsd %xmm2, %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x388(%rbp)
movq (%rdi), %rax
callq *0x160(%rax)
movsd -0x388(%rbp), %xmm0
movb %al, %dl
movl $0x1, %eax
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
cvtsi2sd %eax, %xmm1
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %esi
movl -0x5c(%rbp), %eax
subl -0x1d4(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %edx
addl $0x1, %edx
leaq -0x1e4(%rbp), %rdi
callq 0x5c2c0
leaq -0x58(%rbp), %rdi
leaq -0x1e4(%rbp), %rsi
callq 0x5ca20
movq %rax, -0x1dc(%rbp)
movl -0x1d4(%rbp), %esi
shll %esi
subl $0x1, %esi
leaq -0x1f4(%rbp), %rdi
xorl %edx, %edx
callq 0x5c2c0
leaq -0x1dc(%rbp), %rdi
leaq -0x1f4(%rbp), %rsi
callq 0x5ca20
movq %rax, -0x1ec(%rbp)
movl $0x0, -0x1f8(%rbp)
movl -0x1f8(%rbp), %eax
cmpl -0x1d4(%rbp), %eax
jge 0xbd311
movq -0x50(%rbp), %rdi
leaq -0x1dc(%rbp), %rsi
leaq -0x1ec(%rbp), %rdx
movq 0x14b71f(%rip), %rcx    # 0x2089c8
callq 0x5cce0
leaq -0x200(%rbp), %rdi
movl $0x1, %edx
movl %edx, %esi
callq 0x5c2c0
leaq -0x1dc(%rbp), %rdi
leaq -0x200(%rbp), %rsi
callq 0x5a510
leaq -0x208(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x1, %edx
callq 0x5c2c0
leaq -0x1ec(%rbp), %rdi
leaq -0x208(%rbp), %rsi
callq 0x5a510
movl -0x1f8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1f8(%rbp)
jmp 0xbd27e
jmp 0xbd313
jmp 0xbd315
jmp 0xbd317
jmp 0xbd319
movq -0x50(%rbp), %rdi
callq 0x5d270
jmp 0xbd940
movq -0x2b8(%rbp), %rax
testb $0x1, 0xcd(%rax)
je 0xbd36e
movq -0x2b8(%rbp), %rax
cmpq $0x0, 0x5b8(%rax)
je 0xbd36e
movq -0x2b8(%rbp), %rax
movq 0x5b8(%rax), %rdi
callq 0x5c9c0
movq -0x2b8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xbd36c
jmp 0xbd940
jmp 0xbd36e
movq -0x2b8(%rbp), %rdi
addq $0x5c0, %rdi            # imm = 0x5C0
xorl %esi, %esi
callq 0x5a830
testb $0x1, %al
jne 0xbd38c
jmp 0xbd595
movq -0x50(%rbp), %rax
movq %rax, -0x3b8(%rbp)
leaq -0x218(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x59ff0
movq -0x3b8(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x591b0
movq -0x50(%rbp), %rax
movq %rax, -0x3b0(%rbp)
movq 0x14bbd0(%rip), %rax    # 0x208fa0
movl (%rax), %eax
movl %eax, -0x3a4(%rbp)
leaq -0x220(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x59260
movq -0x3b0(%rbp), %rdi
movl -0x3a4(%rbp), %ecx
leaq -0x70(%rbp), %rsi
movq 0x14b0a8(%rip), %rdx    # 0x2084a8
leaq -0x220(%rbp), %r8
callq 0x5c110
movq -0x2b8(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, -0x3a0(%rbp)
addq $0x5c0, %rax            # imm = 0x5C0
movq %rax, -0x398(%rbp)
leaq -0x238(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x5c2c0
movq -0x2b8(%rbp), %rdi
addq $0x5c0, %rdi            # imm = 0x5C0
callq 0x5ce60
movq %rax, %rdx
leaq -0x230(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0x59ff0
movq -0x3a0(%rbp), %rdi
movq -0x398(%rbp), %rsi
leaq -0x230(%rbp), %rdx
leaq -0x70(%rbp), %rcx
callq 0x59dd0
movq -0x2b8(%rbp), %rdi
addq $0x478, %rdi            # imm = 0x478
callq 0xbddc0
cmpl $0x0, %eax
jle 0xbd58c
movq -0x2b8(%rbp), %rax
cmpq $0x0, 0x5b8(%rax)
je 0xbd58c
movl -0x58(%rbp), %eax
addl -0x60(%rbp), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x3c8(%rbp)
movq -0x50(%rbp), %rdi
callq 0x5d470
movsd -0x3c8(%rbp), %xmm0
cwtl
imull $0xb, %eax, %eax
cvtsi2sd %eax, %xmm1
movsd 0xc9fda(%rip), %xmm2    # 0x1874c0
divsd %xmm2, %xmm1
subsd %xmm1, %xmm0
movsd 0xc9e82(%rip), %xmm1    # 0x187378
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %esi
movl -0x54(%rbp), %edx
addl $0x1, %edx
leaq -0x240(%rbp), %rdi
callq 0x5c2c0
movl -0x58(%rbp), %eax
addl -0x60(%rbp), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x3c0(%rbp)
movq -0x50(%rbp), %rdi
callq 0x5d470
movsd -0x3c0(%rbp), %xmm0
cwtl
imull $0xb, %eax, %eax
cvtsi2sd %eax, %xmm1
movsd 0xc9f7d(%rip), %xmm2    # 0x1874c0
divsd %xmm2, %xmm1
subsd %xmm1, %xmm0
movsd 0xc9e25(%rip), %xmm1    # 0x187378
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %esi
movl -0x54(%rbp), %edx
addl -0x5c(%rbp), %edx
subl $0x2, %edx
leaq -0x248(%rbp), %rdi
callq 0x5c2c0
movq -0x50(%rbp), %rdi
leaq -0x240(%rbp), %rsi
leaq -0x248(%rbp), %rdx
movl $0x2, %ecx
callq 0x5dc90
movq -0x50(%rbp), %rdi
callq 0x5d270
jmp 0xbd940
movq -0x2b8(%rbp), %rax
testb $0x1, 0xcd(%rax)
je 0xbd5e1
movq -0x2b8(%rbp), %rax
cmpq $0x0, 0x5b8(%rax)
je 0xbd5e1
movq -0x2b8(%rbp), %rax
movq 0x5b8(%rax), %rdi
callq 0x5c9c0
movq -0x2b8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xbd5df
jmp 0xbd940
jmp 0xbd5e1
movq -0x2b8(%rbp), %rdi
addq $0x5c0, %rdi            # imm = 0x5C0
xorl %esi, %esi
callq 0x5a830
testb $0x1, %al
jne 0xbd5ff
jmp 0xbd93e
movq -0x50(%rbp), %rax
movq %rax, -0x3e0(%rbp)
leaq -0x258(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x59ff0
movq -0x3e0(%rbp), %rdi
leaq -0x258(%rbp), %rsi
callq 0x591b0
movq -0x50(%rbp), %rax
movq %rax, -0x3d8(%rbp)
movq 0x14b95d(%rip), %rax    # 0x208fa0
movl (%rax), %eax
movl %eax, -0x3cc(%rbp)
leaq -0x260(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x59260
movq -0x3d8(%rbp), %rdi
movl -0x3cc(%rbp), %ecx
leaq -0x70(%rbp), %rsi
movq 0x14ae35(%rip), %rdx    # 0x2084a8
leaq -0x260(%rbp), %r8
callq 0x5c110
movq -0x2b8(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xbd709
movq -0x2b8(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, -0x3f0(%rbp)
addq $0x5c0, %rax            # imm = 0x5C0
movq %rax, -0x3e8(%rbp)
leaq -0x278(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x5c2c0
movq -0x2b8(%rbp), %rdi
addq $0x5c0, %rdi            # imm = 0x5C0
callq 0x5ce60
movq %rax, %rdx
leaq -0x270(%rbp), %rdi
leaq -0x278(%rbp), %rsi
callq 0x59ff0
movq -0x3f0(%rbp), %rdi
movq -0x3e8(%rbp), %rsi
leaq -0x270(%rbp), %rdx
leaq -0x70(%rbp), %rcx
callq 0x59dd0
jmp 0xbd77f
movq -0x2b8(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, -0x400(%rbp)
addq $0x5c8, %rax            # imm = 0x5C8
movq %rax, -0x3f8(%rbp)
leaq -0x290(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x5c2c0
movq -0x2b8(%rbp), %rdi
addq $0x5c8, %rdi            # imm = 0x5C8
callq 0x5ce60
movq %rax, %rdx
leaq -0x288(%rbp), %rdi
leaq -0x290(%rbp), %rsi
callq 0x59ff0
movq -0x400(%rbp), %rdi
movq -0x3f8(%rbp), %rsi
leaq -0x288(%rbp), %rdx
leaq -0x70(%rbp), %rcx
callq 0x59dd0
movq -0x2b8(%rbp), %rdi
addq $0x478, %rdi            # imm = 0x478
callq 0xbddc0
cmpl $0x0, %eax
jle 0xbd935
movq -0x2b8(%rbp), %rax
cmpq $0x0, 0x5b8(%rax)
je 0xbd935
movl -0x58(%rbp), %eax
addl -0x60(%rbp), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x420(%rbp)
movq -0x50(%rbp), %rdi
callq 0x5d470
movsd -0x420(%rbp), %xmm0
movq -0x2b8(%rbp), %rdi
cwtl
imull $0xb, %eax, %eax
cvtsi2sd %eax, %xmm1
movsd 0xc9cd6(%rip), %xmm2    # 0x1874c0
divsd %xmm2, %xmm1
subsd %xmm1, %xmm0
movsd 0xc9b7e(%rip), %xmm1    # 0x187378
subsd %xmm1, %xmm0
movsd %xmm0, -0x418(%rbp)
movq (%rdi), %rax
callq *0x160(%rax)
movsd -0x418(%rbp), %xmm0
movb %al, %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
cvtsi2sd %eax, %xmm1
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %esi
movl -0x54(%rbp), %edx
addl $0x1, %edx
leaq -0x298(%rbp), %rdi
callq 0x5c2c0
movl -0x58(%rbp), %eax
addl -0x60(%rbp), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x410(%rbp)
movq -0x50(%rbp), %rdi
callq 0x5d470
movsd -0x410(%rbp), %xmm0
movq -0x2b8(%rbp), %rdi
cwtl
imull $0xb, %eax, %eax
cvtsi2sd %eax, %xmm1
movsd 0xc9c42(%rip), %xmm2    # 0x1874c0
divsd %xmm2, %xmm1
subsd %xmm1, %xmm0
movsd 0xc9aea(%rip), %xmm1    # 0x187378
subsd %xmm1, %xmm0
movsd %xmm0, -0x408(%rbp)
movq (%rdi), %rax
callq *0x160(%rax)
movsd -0x408(%rbp), %xmm0
movb %al, %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
cvtsi2sd %eax, %xmm1
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %esi
movl -0x54(%rbp), %edx
addl -0x5c(%rbp), %edx
subl $0x1, %edx
leaq -0x2a0(%rbp), %rdi
callq 0x5c2c0
movq -0x50(%rbp), %rdi
leaq -0x298(%rbp), %rsi
leaq -0x2a0(%rbp), %rdx
movq 0x14abb4(%rip), %rcx    # 0x2084a8
callq 0x5cce0
movl -0x298(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x298(%rbp)
movl -0x2a0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2a0(%rbp)
movq -0x50(%rbp), %rdi
leaq -0x298(%rbp), %rsi
leaq -0x2a0(%rbp), %rdx
movq 0x14ab78(%rip), %rcx    # 0x2084a8
callq 0x5cce0
movq -0x50(%rbp), %rdi
callq 0x5d270
jmp 0xbd940
leaq -0x2b0(%rbp), %rdi
movq %rdi, -0x430(%rbp)
callq 0x5ca80
movq -0x430(%rbp), %rdi
callq 0x59680
movl %eax, -0x424(%rbp)
jmp 0xbd967
movl -0x424(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x2b0(%rbp), %rdi
callq 0x5a410
jmp 0xbd998
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x2b0(%rbp), %rdi
callq 0x5a410
jmp 0xbd9a4
movl -0x4(%rbp), %eax
addq $0x430, %rsp            # imm = 0x430
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x5b6b0
nopl (%rax)