// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/gui/dialogs/messagebox.cpp
// Function: smooth::GUI::Dialogs::MessageDlg::InitializeWidgets(smooth::String const&, smooth::String const&, int, smooth::GUI::Bitmap const&, smooth::String const&, bool*)
S::Bool S::GUI::Dialogs::MessageDlg::InitializeWidgets(const String &iText, const String &title, Int iButtons, const Bitmap &bitmap, const String &checkBoxText, Bool *iCVar)
{
	text	   = iText;
	cVar	   = iCVar;

	buttons	   = iButtons;
	buttonCode = -1;

	msgbox		= new Window(title, Point(), Size());
	msgbox->SetRightToLeft(defaultRightToLeft);
	msgbox->SetFlags(msgbox->GetFlags() | WF_MODAL);

	titlebar	= new Titlebar(TB_CLOSEBUTTON);
	layer		= new Layer();
	icon		= new Image(bitmap, Point(14, 19), Size(32, 32));

	/* Compute message box size.
	 */
	Int	 maxSize      = 0;
	Int	 buttonWidth  = 80;
	Int	 buttonHeight = 22;

	GUI::Font		 font;
	const Array<String>	&lines = text.Explode("\n");

	foreach (const String &line, lines)
	{
		Int	 textSize = font.GetUnscaledTextSizeX(line);

		if (textSize > maxSize) maxSize = textSize;
	}

	msgbox->SetWidth(maxSize + 36);
	msgbox->SetHeight((((Int) Math::Max(2, lines.Length()) + 1) * 16) + 70 + buttonHeight);

	if (bitmap != NIL) msgbox->SetWidth(maxSize + 36 + icon->GetWidth() + 20);

	Int	 titleSize = Font(Font::Default, Font::DefaultSize, Font::Bold).GetUnscaledTextSizeX(title);

	msgbox->SetWidth(Math::Max(msgbox->GetWidth(), titleSize + 80));

	/* Add widgets.
	 */
	Add(msgbox);

	msgbox->Add(titlebar);
	msgbox->Add(layer);
	msgbox->Add(icon);

	msgbox->onPaint.Connect(&MessageDlg::MessagePaintProc, this);
	msgbox->doClose.Connect(&MessageDlg::MessageKillProc, this);

	/* Add optional checkbox.
	 */
	checkbox = NIL;

	if (cVar != NIL)
	{
		checkbox = new CheckBox(checkBoxText, Point(13, 46 + buttonHeight), Size(100, 0), cVar);
		checkbox->SetOrientation(OR_LOWERLEFT);
		checkbox->SetWidth(checkbox->GetUnscaledTextWidth() + 21);

		msgbox->SetWidth(Math::Max(msgbox->GetWidth(), checkbox->GetUnscaledTextWidth() + 54));
		msgbox->SetHeight(msgbox->GetHeight() + 22);

		if (bitmap != NIL)
		{
			checkbox->SetX(checkbox->GetX() + icon->GetWidth() + 20);

			msgbox->SetWidth(Math::Max(msgbox->GetWidth(), checkbox->GetUnscaledTextWidth() + 54 + icon->GetWidth() + 20));
		}

		layer->Add(checkbox);
	}

	/* Find button labels.
	 */
	switch (buttons)
	{
		default:
		case Message::Buttons::Ok:
			buttonLabels.Add("OK");

			break;
		case Message::Buttons::OkCancel:
			buttonLabels.Add("OK");
			buttonLabels.Add("Cancel");

			break;
		case Message::Buttons::YesNo:
			buttonLabels.Add("Yes");
			buttonLabels.Add("No");

			break;
		case Message::Buttons::YesNoCancel:
			buttonLabels.Add("Yes");
			buttonLabels.Add("No");
			buttonLabels.Add("Cancel");

			break;
		case Message::Buttons::RetryCancel:
			buttonLabels.Add("Retry");
			buttonLabels.Add("Cancel");

			break;
		case Message::Buttons::AbortRetryIgnore:
			buttonLabels.Add("Abort");
			buttonLabels.Add("Retry");
			buttonLabels.Add("Ignore");

			break;
	}

	/* Add buttons.
	 */
	msgbox->SetWidth(Math::Max(msgbox->GetWidth(), buttonLabels.Length() * (buttonWidth + 9) + 21));

	foreach (const String &buttonLabel, buttonLabels)
	{
		Button	*button = new Button(I18n::Translator::defaultTranslator->TranslateString(buttonLabel), Point((msgbox->GetWidth() - (buttonLabels.Length() * (buttonWidth + 9) - 9)) / 2 - 3 + (foreachindex * (buttonWidth + 9)), 14 + buttonHeight), Size());

		if	(foreachindex == 0) button->onAction.Connect(&MessageDlg::MessageButton0, this);
		else if	(foreachindex == 1) button->onAction.Connect(&MessageDlg::MessageButton1, this);
		else if	(foreachindex == 2) button->onAction.Connect(&MessageDlg::MessageButton2, this);

		button->SetOrientation(OR_LOWERLEFT);

		buttonWidgets.Add(button);

		layer->Add(button);
	}

	/* Position message box on screen.
	 */
	Rect	 workArea    = System::Screen::GetActiveScreenWorkArea();
	Float	 scaleFactor = Surface().GetSurfaceDPI() / 96.0;

	msgbox->SetPosition(workArea.GetPosition() + Point((workArea.GetWidth()  - Math::Round(msgbox->GetWidth()  * scaleFactor)) / 2,
							   (workArea.GetHeight() - Math::Round(msgbox->GetHeight() * scaleFactor)) / 2) + Point(nOfMessageBoxes * 25, nOfMessageBoxes * 25));

	return True;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %r9, 0x68(%rsp)
movq %r8, 0x50(%rsp)
movl %ecx, %ebx
movq %rdx, %r12
movq %rdi, %rbp
movq 0x140(%rsp), %r14
leaq 0xf0(%rdi), %r13
movq %r13, %rdi
callq 0x555f0
movq %r14, 0x6d0(%rbp)
movl %ebx, 0x5e8(%rbp)
movl $0xffffffff, 0x6c0(%rbp) # imm = 0xFFFFFFFF
movl $0x6d8, %edi            # imm = 0x6D8
callq 0x556b0
movq %rax, %r15
xorl %eax, %eax
leaq 0x70(%rsp), %rdx
movq %rax, (%rdx)
leaq 0xc8(%rsp), %rcx
movq %rax, (%rcx)
movq %r15, %rdi
movq %r12, %rsi
xorl %r8d, %r8d
callq 0x56fe0
movq %r15, 0x5f0(%rbp)
movq 0x1033e9(%rip), %rax    # 0x16cdc0
movzbl (%rax), %esi
movq %r15, %rdi
callq 0x57b90
movq 0x5f0(%rbp), %rax
orl $0x1, 0x30(%rax)
movl $0x5c8, %edi            # imm = 0x5C8
callq 0x556b0
movq %rax, %r15
movq %rax, %rdi
movl $0x4, %esi
callq 0x56390
movq %rbp, 0x48(%rsp)
movq %r15, 0x5f8(%rbp)
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x556b0
movq %rax, %rbp
leaq 0x70(%rsp), %rdi
xorl %esi, %esi
callq 0x58e20
leaq 0x70(%rsp), %rsi
movq %rbp, %rdi
callq 0x56a90
movq 0x48(%rsp), %r14
movq %rbp, 0x600(%r14)
leaq 0x70(%rsp), %rbx
movq %rbx, %rdi
callq 0x59200
movl $0x5c8, %edi            # imm = 0x5C8
callq 0x556b0
movq %rax, %r15
movabsq $0x130000000e, %rax     # imm = 0x130000000E
movq %rax, (%rbx)
movabsq $0x2000000020, %rax     # imm = 0x2000000020
leaq 0xc8(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x70(%rsp), %rdx
movq %r15, %rdi
movq 0x50(%rsp), %rsi
callq 0x55980
movq %r15, 0x608(%r14)
movq 0x1033f7(%rip), %r14    # 0x16ce98
movswl (%r14), %edx
movq 0x102cd4(%rip), %rax    # 0x16c780
movswl (%rax), %ecx
leaq 0x70(%rsp), %r9
movq $0x0, 0x8(%r9)
movl $0x0, (%r9)
movq 0x1032ee(%rip), %rsi    # 0x16cdb8
leaq 0xc8(%rsp), %rdi
movl %ecx, %r8d
callq 0x57270
leaq 0xa8da2(%rip), %rsi     # 0x112883
leaq 0x8(%rsp), %rdi
callq 0x579f0
leaq 0x70(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %r13, %rsi
callq 0x57f10
leaq 0x8(%rsp), %rdi
callq 0x59200
cmpl $0x0, 0x78(%rsp)
jle 0x69b4a
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %ebx, %ebx
leaq 0x70(%rsp), %r13
leaq 0xc8(%rsp), %r15
incl %ebp
movq %r13, %rdi
movl %ebp, %esi
callq 0x64224
movq %r15, %rdi
movq %rax, %rsi
callq 0x57f50
cmpl %ebx, %eax
cmovgl %eax, %ebx
movl 0x78(%rsp), %eax
decl %eax
cmpl %eax, %ebp
jl 0x69b22
jmp 0x69b4c
xorl %ebx, %ebx
movq 0x48(%rsp), %r13
movq 0x5f0(%r13), %rdi
leal 0x24(%rbx), %eax
leaq 0xa8(%rdi), %rsi
movl 0xb4(%rdi), %ecx
leaq 0x8(%rsp), %rdx
movl %eax, (%rdx)
movl %ecx, 0x4(%rdx)
movq (%rdi), %rax
callq *0x150(%rax)
movq 0x5f0(%r13), %rdi
movl 0x78(%rsp), %eax
cmpl $0x3, %eax
movl $0x2, %ecx
cmovgel %eax, %ecx
shll $0x4, %ecx
addl $0x6c, %ecx
leaq 0xa8(%rdi), %rsi
movl 0xb0(%rdi), %eax
leaq 0x8(%rsp), %rdx
movl %eax, (%rdx)
movl %ecx, 0x4(%rdx)
movq (%rdi), %rax
callq *0x150(%rax)
movq 0x50(%rsp), %rdi
xorl %esi, %esi
callq 0x563f0
testb %al, %al
je 0x69c00
movq 0x5f0(%r13), %rdi
movq 0x608(%r13), %rax
movl 0xb0(%rax), %eax
addl %ebx, %eax
addl $0x38, %eax
leaq 0xa8(%rdi), %rsi
movl 0xb4(%rdi), %ecx
leaq 0x8(%rsp), %rdx
movl %eax, (%rdx)
movl %ecx, 0x4(%rdx)
movq (%rdi), %rax
callq *0x150(%rax)
movswl (%r14), %edx
movq 0x10283d(%rip), %rax    # 0x16c448
movswl (%rax), %ecx
movq 0x102b6b(%rip), %rax    # 0x16c780
movswl (%rax), %r8d
leaq 0x58(%rsp), %r9
movq $0x0, 0x8(%r9)
movl $0x0, (%r9)
movq 0x103184(%rip), %rsi    # 0x16cdb8
leaq 0x8(%rsp), %rdi
callq 0x57270
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x57f50
movl %eax, %ebx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x56720
movq 0x5f0(%r13), %rdi
movl 0xb0(%rdi), %eax
addl $0x50, %ebx
cmpl %ebx, %eax
cmovgl %eax, %ebx
leaq 0xa8(%rdi), %rsi
movl 0xb4(%rdi), %eax
movl %ebx, (%r15)
movl %eax, 0x4(%r15)
movq (%rdi), %rax
leaq 0x8(%rsp), %rdx
callq *0x150(%rax)
movq 0x5f0(%r13), %rsi
movq (%r13), %rax
movq %r13, %rdi
callq *0x30(%rax)
movq 0x5f0(%r13), %rdi
movq 0x5f8(%r13), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x5f0(%r13), %rdi
movq 0x600(%r13), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x5f0(%r13), %rdi
movq 0x608(%r13), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
movl $0x648, %edi            # imm = 0x648
addq 0x5f0(%r13), %rdi
movq 0x102f3f(%rip), %rsi    # 0x16cc30
xorl %edx, %edx
movq %r13, %rcx
callq 0x6b2c2
movl $0x688, %ebx            # imm = 0x688
addq 0x5f0(%r13), %rbx
movq %rbx, %rdi
callq 0x6b418
movq 0x102d8a(%rip), %rsi    # 0x16caa0
movq %rbx, %rdi
xorl %edx, %edx
movq %r13, %rcx
callq 0x6b452
movq $0x0, 0x6c8(%r13)
movq 0x6d0(%r13), %r12
testq %r12, %r12
je 0x69f05
movl $0x5d8, %edi            # imm = 0x5D8
callq 0x556b0
movq %rax, %r15
movabsq $0x440000000d, %rax     # imm = 0x440000000D
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x58(%rsp), %rcx
movq $0x64, (%rcx)
movq %r15, %rdi
movq 0x68(%rsp), %rsi
movq %r12, %r8
callq 0x55b10
movq %r15, 0x6c8(%r13)
movq (%r15), %rax
movq %r15, %rdi
movl $0x18, %esi
callq *0x120(%rax)
movq 0x6c8(%r13), %r15
movq (%r15), %rax
movq %r15, %rdi
callq *0xf0(%rax)
addl $0x15, %eax
leaq 0xa8(%r15), %rsi
movl 0xb4(%r15), %ecx
leaq 0x8(%rsp), %rdx
movl %eax, (%rdx)
movl %ecx, 0x4(%rdx)
movq (%r15), %rax
movq %r15, %rdi
callq *0x150(%rax)
movq 0x5f0(%r13), %r15
movq 0x6c8(%r13), %rdi
movl 0xb0(%r15), %ebx
movq (%rdi), %rax
callq *0xf0(%rax)
addl $0x36, %eax
cmpl %eax, %ebx
cmovgl %ebx, %eax
leaq 0xa8(%r15), %rsi
movl 0xb4(%r15), %ecx
leaq 0x8(%rsp), %rdx
movl %eax, (%rdx)
movl %ecx, 0x4(%rdx)
movq (%r15), %rax
movq %r15, %rdi
callq *0x150(%rax)
movq 0x5f0(%r13), %rdi
movl 0xb4(%rdi), %eax
addl $0x16, %eax
leaq 0xa8(%rdi), %rsi
movl 0xb0(%rdi), %ecx
leaq 0x8(%rsp), %rdx
movl %ecx, (%rdx)
movl %eax, 0x4(%rdx)
movq (%rdi), %rax
callq *0x150(%rax)
movq 0x50(%rsp), %rdi
xorl %esi, %esi
callq 0x563f0
testb %al, %al
je 0x69ef1
movq 0x608(%r13), %rax
movq 0x6c8(%r13), %rdi
movl 0xa8(%rdi), %ecx
movl 0xb0(%rax), %eax
addl %ecx, %eax
addl $0x14, %eax
movl 0xac(%rdi), %ecx
leaq 0x8(%rsp), %rsi
movl %eax, (%rsi)
movl %ecx, 0x4(%rsi)
leaq 0xb0(%rdi), %rdx
movq (%rdi), %rax
callq *0x150(%rax)
movq 0x5f0(%r13), %r14
movq 0x6c8(%r13), %rdi
movl 0xb0(%r14), %ebx
movq (%rdi), %rax
callq *0xf0(%rax)
movq 0x608(%r13), %rcx
movl 0xb0(%rcx), %ecx
addl %ecx, %eax
addl $0x4a, %eax
cmpl %eax, %ebx
cmovgl %ebx, %eax
leaq 0xa8(%r14), %rsi
movl 0xb4(%r14), %ecx
leaq 0x8(%rsp), %rdx
movl %eax, (%rdx)
movl %ecx, 0x4(%rdx)
movq (%r14), %rax
movq %r14, %rdi
callq *0x150(%rax)
movq 0x600(%r13), %rdi
movq 0x6c8(%r13), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
movl 0x5e8(%r13), %eax
decl %eax
cmpl $0x4, %eax
ja 0x6a10e
leaq 0x8a9c2(%rip), %rcx     # 0xf48e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xc5026(%rip), %rsi     # 0x12ef54
leaq 0x8(%rsp), %rdi
callq 0x579f0
leaq 0x610(%r13), %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x64280
leaq 0x8(%rsp), %rdi
callq 0x59200
leaq 0x8a853(%rip), %rsi     # 0xf47b0
leaq 0x8(%rsp), %rdi
callq 0x579f0
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x64280
jmp 0x6a130
leaq 0x8aa5b(%rip), %rsi     # 0xf49db
leaq 0x8(%rsp), %rdi
callq 0x579f0
leaq 0x610(%r13), %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x64280
leaq 0x8(%rsp), %rdi
callq 0x59200
leaq 0x8a801(%rip), %rsi     # 0xf47b0
leaq 0x8(%rsp), %rdi
callq 0x579f0
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x64280
jmp 0x6a130
leaq 0x8aa02(%rip), %rsi     # 0xf49d4
leaq 0x8(%rsp), %rdi
callq 0x579f0
leaq 0x610(%r13), %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x64280
leaq 0x8(%rsp), %rdi
callq 0x59200
leaq 0x8a9d7(%rip), %rsi     # 0xf49d8
leaq 0x8(%rsp), %rdi
callq 0x579f0
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x64280
leaq 0x8(%rsp), %rdi
callq 0x59200
leaq 0x8a787(%rip), %rsi     # 0xf47b0
leaq 0x8(%rsp), %rdi
callq 0x579f0
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x64280
jmp 0x6a130
leaq 0x8a988(%rip), %rsi     # 0xf49d4
leaq 0x8(%rsp), %rdi
callq 0x579f0
leaq 0x610(%r13), %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x64280
leaq 0x8(%rsp), %rdi
callq 0x59200
leaq 0x8a95d(%rip), %rsi     # 0xf49d8
leaq 0x8(%rsp), %rdi
callq 0x579f0
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x64280
jmp 0x6a130
leaq 0x8a943(%rip), %rsi     # 0xf49e1
leaq 0x8(%rsp), %rdi
callq 0x579f0
leaq 0x610(%r13), %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x64280
leaq 0x8(%rsp), %rdi
callq 0x59200
leaq 0x8a90e(%rip), %rsi     # 0xf49db
leaq 0x8(%rsp), %rdi
callq 0x579f0
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x64280
leaq 0x8(%rsp), %rdi
callq 0x59200
leaq 0x8a8f2(%rip), %rsi     # 0xf49e7
leaq 0x8(%rsp), %rdi
callq 0x579f0
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x64280
jmp 0x6a130
leaq 0xc4e3f(%rip), %rsi     # 0x12ef54
leaq 0x8(%rsp), %rdi
callq 0x579f0
leaq 0x610(%r13), %rdi
leaq 0x8(%rsp), %rsi
callq 0x64280
leaq 0x8(%rsp), %rdi
callq 0x59200
movq 0x5f0(%r13), %rdi
movl 0xb0(%rdi), %eax
imull $0x59, 0x618(%r13), %ecx
addl $0x15, %ecx
cmpl %ecx, %eax
cmovgl %eax, %ecx
leaq 0xa8(%rdi), %rsi
movl 0xb4(%rdi), %eax
leaq 0x8(%rsp), %rdx
movl %ecx, (%rdx)
movl %eax, 0x4(%rdx)
movq (%rdi), %rax
callq *0x150(%rax)
cmpl $0x0, 0x618(%r13)
jle 0x6a2cb
movq 0x48(%rsp), %rax
leaq 0x610(%rax), %rcx
movq %rcx, 0x50(%rsp)
leaq 0x668(%rax), %r15
xorl %r12d, %r12d
movl $0xfffffffd, %r14d      # imm = 0xFFFFFFFD
leaq 0x8(%rsp), %r13
movq 0x50(%rsp), %rdi
movl %r12d, %esi
callq 0x6b64a
movq %rax, %rbx
movl $0x5c8, %edi            # imm = 0x5C8
callq 0x556b0
movq %rax, %rbp
movq 0x102219(%rip), %rax    # 0x16c3e8
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x58260
movq 0x48(%rsp), %rdx
movq 0x5f0(%rdx), %rcx
movl 0xb0(%rcx), %ecx
imull $-0x59, 0x618(%rdx), %edx
leal (%rcx,%rdx), %esi
addl %edx, %ecx
addl $0x9, %ecx
shrl $0x1f, %ecx
addl %esi, %ecx
addl $0x9, %ecx
sarl %ecx
addl %r14d, %ecx
movl %ecx, 0x8(%rsp)
movl $0x24, 0xc(%rsp)
movq $0x0, 0x58(%rsp)
movq %rbp, %rdi
movq %rax, %rsi
movq %r13, %rdx
leaq 0x58(%rsp), %rcx
callq 0x573b0
movq 0x102db1(%rip), %rsi    # 0x16cfe8
testl %r12d, %r12d
jne 0x6a243
movq 0x102afd(%rip), %rsi    # 0x16cd40
cmpl $0x2, %r12d
jb 0x6a250
movq 0x102608(%rip), %rsi    # 0x16c858
leal -0x1(%r12), %eax
incl %eax
cmpl $0x3, %eax
jae 0x6a272
movq %rbp, %rdi
addq $0x478, %rdi            # imm = 0x478
xorl %edx, %edx
movq 0x48(%rsp), %rcx
callq 0x6b2c2
movq (%rbp), %rax
movq %rbp, %rdi
movl $0x18, %esi
callq *0x120(%rax)
movq %rbp, 0x8(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0x5af08
movq 0x48(%rsp), %rax
movq 0x600(%rax), %rdi
movq (%rdi), %rax
movq %rbp, %rsi
callq *0x30(%rax)
movq 0x48(%rsp), %rax
movl 0x618(%rax), %eax
decl %eax
leal 0x1(%r12), %ecx
addl $0x59, %r14d
cmpl %eax, %r12d
movl %ecx, %r12d
jl 0x6a1ab
callq 0x57e90
movq %rax, %r14
movq %rdx, %r15
leaq 0x58(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x57150
movq 0x48(%rsp), %r13
leaq 0x8(%rsp), %rdi
callq 0x58930
movl %eax, %ebx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x57b20
movq 0x5f0(%r13), %rdi
movq %r14, %rax
shrq $0x20, %rax
movswl %bx, %ecx
cvtsi2sd %ecx, %xmm0
divsd 0x8a1c7(%rip), %xmm0    # 0xf44f0
movl %r15d, %ecx
subl %r14d, %ecx
movslq %ecx, %rsi
leaq 0xb0(%rdi), %rdx
cvtsi2sdl 0xb0(%rdi), %xmm3
mulsd %xmm0, %xmm3
xorpd %xmm2, %xmm2
movapd %xmm3, %xmm4
cmpltsd %xmm2, %xmm4
movsd 0x8a036(%rip), %xmm1    # 0xf4390
movapd %xmm4, %xmm5
andpd %xmm1, %xmm5
movsd 0x8a02e(%rip), %xmm6    # 0xf4398
andnpd %xmm6, %xmm4
orpd %xmm5, %xmm4
addsd %xmm3, %xmm4
cvttsd2si %xmm4, %rcx
subq %rcx, %rsi
movq %rsi, %rcx
shrq $0x3f, %rcx
addq %rsi, %rcx
shrq %rcx
movabsq $-0x100000000, %rsi     # imm = 0xFFFFFFFF00000000
andq %r14, %rsi
subq %rsi, %r15
sarq $0x20, %r15
xorps %xmm3, %xmm3
cvtsi2sdl 0xb4(%rdi), %xmm3
mulsd %xmm0, %xmm3
movapd %xmm3, %xmm0
cmpltsd %xmm2, %xmm0
andpd %xmm0, %xmm1
andnpd %xmm6, %xmm0
orpd %xmm1, %xmm0
addsd %xmm3, %xmm0
cvttsd2si %xmm0, %rsi
subq %rsi, %r15
movq %r15, %rsi
shrq $0x3f, %rsi
addq %r15, %rsi
shrq %rsi
movq 0x10223d(%rip), %r8     # 0x16c620
movl (%r8), %r8d
leal (%r8,%r8,4), %r8d
leal (%r8,%r8,4), %r8d
addl %r8d, %ecx
addl %r14d, %ecx
addl %r8d, %eax
addl %esi, %eax
shlq $0x20, %rax
orq %rax, %rcx
movq %rcx, (%r12)
movq (%rdi), %rax
leaq 0x8(%rsp), %rsi
callq *0x150(%rax)
leaq 0x70(%rsp), %rdi
callq 0x63e08
leaq 0xc8(%rsp), %rdi
callq 0x56720
movb $0x1, %al
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6a478
jmp 0x6a478
jmp 0x6a550
jmp 0x6a550
jmp 0x6a478
jmp 0x6a478
jmp 0x6a478
jmp 0x6a478
jmp 0x6a478
jmp 0x6a550
jmp 0x6a550
jmp 0x6a550
jmp 0x6a550
jmp 0x6a550
jmp 0x6a478
jmp 0x6a478
jmp 0x6a478
jmp 0x6a478
jmp 0x6a478
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x59200
jmp 0x6a553
jmp 0x6a550
jmp 0x6a550
jmp 0x6a550
jmp 0x6a550
jmp 0x6a550
jmp 0x6a550
movq %rax, %rbx
movl $0x5d8, %esi            # imm = 0x5D8
movq %r15, %rdi
jmp 0x6a545
jmp 0x6a550
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x57b20
jmp 0x6a553
jmp 0x6a550
jmp 0x6a550
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x56720
jmp 0x6a553
jmp 0x6a550
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x59200
jmp 0x6a55d
movq %rax, %rbx
jmp 0x6a55d
jmp 0x6a516
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x59200
jmp 0x6a50c
movq %rax, %rbx
movl $0x5b8, %esi            # imm = 0x5B8
movq %rbp, %rdi
jmp 0x6a52b
movq %rax, %rbx
movl $0x5c8, %esi            # imm = 0x5C8
jmp 0x6a528
movq %rax, %rbx
movl $0x6d8, %esi            # imm = 0x6D8
movq %r15, %rdi
callq 0x55480
jmp 0x6a56a
jmp 0x6a550
jmp 0x6a550
jmp 0x6a550
jmp 0x6a53a
movq %rax, %rbx
movl $0x5c8, %esi            # imm = 0x5C8
movq %rbp, %rdi
callq 0x55480
jmp 0x6a553
jmp 0x6a550
jmp 0x6a550
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x63e08
leaq 0xc8(%rsp), %rdi
callq 0x56720
movq %rbx, %rdi
callq 0x57090