// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x630, %rsp            # imm = 0x630
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x3e0(%rbp)
movq -0x10(%rbp), %rsi
addq $0xf0, %rdi
callq 0x59760
movq -0x3e0(%rbp), %rax
movq 0x10(%rbp), %rcx
movq %rcx, 0x6d0(%rax)
movl -0x1c(%rbp), %ecx
movl %ecx, 0x5e8(%rax)
movl $0xffffffff, 0x6c0(%rax) # imm = 0xFFFFFFFF
movl $0x6d8, %edi            # imm = 0x6D8
callq 0x59820
movq %rax, -0x3d8(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x3d0(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x5b530
jmp 0x7ea8d
leaq -0x4c(%rbp), %rdi
callq 0x59230
jmp 0x7ea98
movq -0x3d0(%rbp), %rsi
movq -0x3d8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %r8d
leaq -0x38(%rbp), %rdx
leaq -0x4c(%rbp), %rcx
callq 0x5b5d0
jmp 0x7eaba
movq -0x3e0(%rbp), %rax
movq -0x3d8(%rbp), %rcx
movq %rcx, 0x5f0(%rax)
movq 0x5f0(%rax), %rdi
movq 0x18a2d3(%rip), %rax    # 0x208db0
movzbl (%rax), %esi
andl $0x1, %esi
callq 0x5c400
movq -0x3e0(%rbp), %rax
movq 0x5f0(%rax), %rdi
movq %rdi, -0x3f0(%rbp)
callq 0x5a120
movq -0x3f0(%rbp), %rdi
movl %eax, %esi
orl $0x1, %esi
callq 0x59730
movl $0x5c8, %edi            # imm = 0x5C8
callq 0x59820
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x3e8(%rbp)
movl $0x4, %esi
callq 0x5a7c0
jmp 0x7eb36
movq -0x3e0(%rbp), %rax
movq -0x3e8(%rbp), %rcx
movq %rcx, 0x5f8(%rax)
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x59820
movq %rax, -0x3f8(%rbp)
movb $0x1, -0x69(%rbp)
leaq -0x68(%rbp), %rdi
xorl %esi, %esi
callq 0x5da90
jmp 0x7eb6d
movq -0x3f8(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x5afd0
jmp 0x7eb7f
movq -0x3e0(%rbp), %rax
movq -0x3f8(%rbp), %rcx
movb $0x0, -0x69(%rbp)
movq %rcx, 0x600(%rax)
leaq -0x68(%rbp), %rdi
callq 0x5df00
movl $0x5c8, %edi            # imm = 0x5C8
callq 0x59820
movq %rax, -0x408(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x400(%rbp)
leaq -0x74(%rbp), %rdi
movl $0xe, %esi
movl $0x13, %edx
callq 0x5c2c0
jmp 0x7ebd2
leaq -0x7c(%rbp), %rdi
movl $0x20, %edx
movl %edx, %esi
callq 0x59260
jmp 0x7ebe4
movq -0x400(%rbp), %rsi
movq -0x408(%rbp), %rdi
leaq -0x74(%rbp), %rdx
leaq -0x7c(%rbp), %rcx
callq 0x59b40
jmp 0x7ec01
movq -0x3e0(%rbp), %rax
movq -0x408(%rbp), %rcx
movq %rcx, 0x608(%rax)
movl $0x0, -0x80(%rbp)
movl $0x50, -0x84(%rbp)
movl $0x16, -0x88(%rbp)
movq 0x18a258(%rip), %rax    # 0x208e90
movswl (%rax), %eax
movl %eax, -0x420(%rbp)
movq 0x189b10(%rip), %rax    # 0x208758
movswl (%rax), %eax
movl %eax, -0x41c(%rbp)
leaq -0xd8(%rbp), %rdi
movq %rdi, -0x418(%rbp)
callq 0x5c250
movl -0x420(%rbp), %edx
movl -0x41c(%rbp), %r8d
movq -0x418(%rbp), %r9
movq 0x18a129(%rip), %rsi    # 0x208da8
leaq -0xc8(%rbp), %rdi
movl %r8d, %ecx
callq 0x5b900
movq -0x3e0(%rbp), %rax
addq $0xf0, %rax
movq %rax, -0x410(%rbp)
leaq 0x126bda(%rip), %rsi    # 0x1a5883
leaq -0x150(%rbp), %rdi
callq 0x5c1f0
jmp 0x7ecb7
movq -0x410(%rbp), %rsi
leaq -0x138(%rbp), %rdi
leaq -0x150(%rbp), %rdx
callq 0x5c820
jmp 0x7ecd3
leaq -0x150(%rbp), %rdi
callq 0x5df00
leaq -0x138(%rbp), %rax
movq %rax, -0xe0(%rbp)
movl $0x0, -0x154(%rbp)
movl $0xffffffff, -0x158(%rbp) # imm = 0xFFFFFFFF
xorl %eax, %eax
cmpl $0x0, -0x154(%rbp)
movb %al, -0x421(%rbp)
jne 0x7ed4c
movl -0x158(%rbp), %eax
movl %eax, -0x42c(%rbp)
movq -0xe0(%rbp), %rdi
callq 0x5c990
movl %eax, -0x428(%rbp)
jmp 0x7ed32
movl -0x42c(%rbp), %eax
movl -0x428(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
setl %al
movb %al, -0x421(%rbp)
movb -0x421(%rbp), %al
testb $0x1, %al
jne 0x7ed5b
jmp 0x7eef7
movq -0xe0(%rbp), %rdi
movl -0x158(%rbp), %esi
incl %esi
movl %esi, -0x158(%rbp)
callq 0x74720
movq %rax, -0x438(%rbp)
jmp 0x7ed7e
movq -0x438(%rbp), %rax
movq %rax, -0x160(%rbp)
cmpl $0x0, -0x154(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x7eda1
jmp 0x7eee1
movq -0x160(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
callq 0x5c860
movl %eax, -0x43c(%rbp)
jmp 0x7edbc
movl -0x43c(%rbp), %eax
movl %eax, -0x164(%rbp)
movl -0x164(%rbp), %eax
cmpl -0x80(%rbp), %eax
jle 0x7eecb
movl -0x164(%rbp), %eax
movl %eax, -0x80(%rbp)
jmp 0x7eecb
movq -0x3d8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x6d8, %esi            # imm = 0x6D8
callq 0x595b0
jmp 0x8016a
movq -0x3e8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x5c8, %esi            # imm = 0x5C8
callq 0x595b0
jmp 0x8016a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x7ee4c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x5df00
testb $0x1, -0x69(%rbp)
jne 0x7ee54
jmp 0x7ee65
movq -0x3f8(%rbp), %rdi
movl $0x5b8, %esi            # imm = 0x5B8
callq 0x595b0
jmp 0x8016a
movq -0x408(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x5c8, %esi            # imm = 0x5C8
callq 0x595b0
jmp 0x8016a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x8015e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x5df00
jmp 0x8015e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x80152
jmp 0x7eecd
movl -0x154(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x154(%rbp)
jmp 0x7ed8c
jmp 0x7eee3
movl -0x154(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x154(%rbp)
jmp 0x7ed01
movq -0x3e0(%rbp), %rax
movq 0x5f0(%rax), %rdi
movl -0x80(%rbp), %esi
addl $0x24, %esi
callq 0x5db30
jmp 0x7ef12
movq -0x3e0(%rbp), %rax
movq 0x5f0(%rax), %rax
movq %rax, -0x448(%rbp)
movq -0xe0(%rbp), %rdi
callq 0x5c990
movl %eax, -0x440(%rbp)
jmp 0x7ef3b
movl -0x440(%rbp), %esi
movl $0x2, %edi
callq 0x5aae0
movl %eax, -0x44c(%rbp)
jmp 0x7ef53
movq -0x448(%rbp), %rdi
movl -0x44c(%rbp), %edx
movl -0x88(%rbp), %eax
movl %eax, %ecx
shll $0x4, %edx
movl %edx, %eax
leal 0x56(%rax,%rcx), %esi
callq 0x5bed0
jmp 0x7ef78
movq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0x5a830
movb %al, -0x44d(%rbp)
jmp 0x7ef8b
movb -0x44d(%rbp), %al
testb $0x1, %al
jne 0x7ef97
jmp 0x7eff0
movq -0x3e0(%rbp), %rax
movq 0x5f0(%rax), %rcx
movq %rcx, -0x460(%rbp)
movq 0x608(%rax), %rdi
movl -0x80(%rbp), %eax
addl $0x24, %eax
movl %eax, -0x458(%rbp)
callq 0x5a210
movl %eax, -0x454(%rbp)
jmp 0x7efcc
movq -0x460(%rbp), %rdi
movl -0x458(%rbp), %edx
movl -0x454(%rbp), %eax
movl %eax, %ecx
movl %edx, %eax
leal 0x14(%rax,%rcx), %esi
callq 0x5db30
jmp 0x7efee
jmp 0x7eff0
movq 0x189e99(%rip), %rax    # 0x208e90
movw (%rax), %ax
movw %ax, -0x466(%rbp)
movq 0x189418(%rip), %rax    # 0x208420
movw (%rax), %ax
movw %ax, -0x464(%rbp)
movq 0x18973f(%rip), %rax    # 0x208758
movw (%rax), %ax
movw %ax, -0x462(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x5c250
jmp 0x7f031
movw -0x462(%rbp), %ax
movw -0x464(%rbp), %cx
movw -0x466(%rbp), %dx
movswl %dx, %edx
movswl %cx, %ecx
movswl %ax, %r8d
movq 0x189d51(%rip), %rsi    # 0x208da8
leaq -0x1a8(%rbp), %rdi
leaq -0x1b8(%rbp), %r9
callq 0x5b900
jmp 0x7f06c
movq -0x18(%rbp), %rsi
leaq -0x1a8(%rbp), %rdi
callq 0x5c860
movl %eax, -0x46c(%rbp)
jmp 0x7f084
leaq -0x1a8(%rbp), %rdi
callq 0x5abf0
movl -0x46c(%rbp), %ecx
movq -0x3e0(%rbp), %rax
movl %ecx, -0x168(%rbp)
movq 0x5f0(%rax), %rdi
movq %rdi, -0x478(%rbp)
callq 0x5a210
movl %eax, -0x470(%rbp)
jmp 0x7f0be
movl -0x470(%rbp), %edi
movl -0x168(%rbp), %esi
addl $0x50, %esi
callq 0x5aae0
movl %eax, -0x47c(%rbp)
jmp 0x7f0da
movl -0x47c(%rbp), %esi
movq -0x478(%rbp), %rdi
callq 0x5db30
jmp 0x7f0ee
movq -0x3e0(%rbp), %rdi
movq 0x5f0(%rdi), %rsi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0x7f107
movq -0x3e0(%rbp), %rax
movq 0x5f0(%rax), %rdi
movq 0x5f8(%rax), %rsi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0x7f127
movq -0x3e0(%rbp), %rax
movq 0x5f0(%rax), %rdi
movq 0x600(%rax), %rsi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0x7f147
movq -0x3e0(%rbp), %rax
movq 0x5f0(%rax), %rdi
movq 0x608(%rax), %rsi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0x7f167
movq -0x3e0(%rbp), %rcx
movq 0x5f0(%rcx), %rdi
addq $0x648, %rdi            # imm = 0x648
movq 0x189a9d(%rip), %rax    # 0x208c20
movq %rax, -0x1c8(%rbp)
movq $0x0, -0x1c0(%rbp)
movq -0x1c8(%rbp), %rsi
movq -0x1c0(%rbp), %rdx
callq 0x817b0
jmp 0x7f1aa
movq -0x3e0(%rbp), %rcx
movq 0x5f0(%rcx), %rdi
addq $0x688, %rdi            # imm = 0x688
movq 0x1898c2(%rip), %rax    # 0x208a88
movq %rax, -0x1d8(%rbp)
movq $0x0, -0x1d0(%rbp)
movq -0x1d8(%rbp), %rsi
movq -0x1d0(%rbp), %rdx
callq 0x818f0
jmp 0x7f1ed
movq -0x3e0(%rbp), %rax
movq $0x0, 0x6c8(%rax)
cmpq $0x0, 0x6d0(%rax)
je 0x7f536
movl $0x5d8, %edi            # imm = 0x5D8
callq 0x59820
movq %rax, -0x488(%rbp)
jmp 0x7f220
movq -0x30(%rbp), %rax
movq %rax, -0x490(%rbp)
movl -0x88(%rbp), %edx
addl $0x2e, %edx
leaq -0x1e0(%rbp), %rdi
movl $0xd, %esi
callq 0x5c2c0
jmp 0x7f247
leaq -0x1e8(%rbp), %rdi
movl $0x64, %esi
xorl %edx, %edx
callq 0x59260
jmp 0x7f25c
movq -0x490(%rbp), %rsi
movq -0x488(%rbp), %rdi
movq -0x3e0(%rbp), %rax
movq 0x6d0(%rax), %r8
leaq -0x1e0(%rbp), %rdx
leaq -0x1e8(%rbp), %rcx
callq 0x59d20
jmp 0x7f28d
movq -0x3e0(%rbp), %rax
movq -0x488(%rbp), %rcx
movq %rcx, 0x6c8(%rax)
movq 0x6c8(%rax), %rdi
movq (%rdi), %rax
movq 0x120(%rax), %rax
movl $0x18, %esi
callq *%rax
jmp 0x7f2bc
movq -0x3e0(%rbp), %rax
movq 0x6c8(%rax), %rdi
movq %rdi, -0x4a0(%rbp)
movq (%rdi), %rax
movq 0xf0(%rax), %rax
callq *%rax
movl %eax, -0x494(%rbp)
jmp 0x7f2e5
movq -0x4a0(%rbp), %rdi
movl -0x494(%rbp), %esi
addl $0x15, %esi
callq 0x5db30
jmp 0x7f2fc
movq -0x3e0(%rbp), %rax
movq 0x5f0(%rax), %rdi
movq %rdi, -0x4b0(%rbp)
callq 0x5a210
movl %eax, -0x4a4(%rbp)
jmp 0x7f31e
movq -0x3e0(%rbp), %rax
movq 0x6c8(%rax), %rdi
movq (%rdi), %rax
movq 0xf0(%rax), %rax
callq *%rax
movl %eax, -0x4b4(%rbp)
jmp 0x7f340
movl -0x4a4(%rbp), %edi
movl -0x4b4(%rbp), %esi
addl $0x36, %esi
callq 0x5aae0
movl %eax, -0x4b8(%rbp)
jmp 0x7f35c
movl -0x4b8(%rbp), %esi
movq -0x4b0(%rbp), %rdi
callq 0x5db30
jmp 0x7f370
movq -0x3e0(%rbp), %rax
movq 0x5f0(%rax), %rdi
movq %rdi, -0x4c8(%rbp)
callq 0x5b860
movl %eax, -0x4bc(%rbp)
jmp 0x7f392
movq -0x4c8(%rbp), %rdi
movl -0x4bc(%rbp), %esi
addl $0x16, %esi
callq 0x5bed0
jmp 0x7f3a9
movq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0x5a830
movb %al, -0x4c9(%rbp)
jmp 0x7f3bc
movb -0x4c9(%rbp), %al
testb $0x1, %al
jne 0x7f3cb
jmp 0x7f514
movq -0x3e0(%rbp), %rax
movq 0x6c8(%rax), %rdi
movq %rdi, -0x4d8(%rbp)
callq 0x5dab0
movl %eax, -0x4d0(%rbp)
jmp 0x7f3ed
movq -0x3e0(%rbp), %rax
movq 0x608(%rax), %rdi
callq 0x5a210
movl %eax, -0x4dc(%rbp)
jmp 0x7f408
movq -0x4d8(%rbp), %rdi
movl -0x4d0(%rbp), %edx
movl -0x4dc(%rbp), %eax
movl %eax, %ecx
movl %edx, %eax
leal 0x14(%rax,%rcx), %esi
callq 0x59bb0
jmp 0x7f42a
movq -0x3e0(%rbp), %rax
movq 0x5f0(%rax), %rdi
movq %rdi, -0x4e8(%rbp)
callq 0x5a210
movl %eax, -0x4e0(%rbp)
jmp 0x7f44c
movq -0x3e0(%rbp), %rax
movq 0x6c8(%rax), %rdi
movq (%rdi), %rax
movq 0xf0(%rax), %rax
callq *%rax
movl %eax, -0x4ec(%rbp)
jmp 0x7f46e
movq -0x3e0(%rbp), %rax
movl -0x4ec(%rbp), %ecx
addl $0x36, %ecx
movl %ecx, -0x4f4(%rbp)
movq 0x608(%rax), %rdi
callq 0x5a210
movl %eax, -0x4f0(%rbp)
jmp 0x7f498
movl -0x4e0(%rbp), %edi
movl -0x4f4(%rbp), %edx
movl -0x4f0(%rbp), %eax
movl %eax, %ecx
movl %edx, %eax
leal 0x14(%rax,%rcx), %esi
callq 0x5aae0
movl %eax, -0x4f8(%rbp)
jmp 0x7f4bf
movl -0x4f8(%rbp), %esi
movq -0x4e8(%rbp), %rdi
callq 0x5db30
jmp 0x7f4d3
jmp 0x7f514
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x5abf0
jmp 0x80152
movq -0x488(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x5d8, %esi            # imm = 0x5D8
callq 0x595b0
jmp 0x80152
movq -0x3e0(%rbp), %rax
movq 0x600(%rax), %rdi
movq 0x6c8(%rax), %rsi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0x7f534
jmp 0x7f536
movq -0x3e0(%rbp), %rax
movl 0x5e8(%rax), %eax
movq %rax, -0x500(%rbp)
subq $0x5, %rax
ja 0x7f567
movq -0x500(%rbp), %rax
leaq 0x10830a(%rip), %rcx    # 0x187868
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x7f569
movq -0x3e0(%rbp), %rax
addq $0x610, %rax            # imm = 0x610
movq %rax, -0x508(%rbp)
leaq 0x1425c0(%rip), %rsi    # 0x1c1b44
leaq -0x200(%rbp), %rdi
callq 0x5c1f0
jmp 0x7f592
movq -0x508(%rbp), %rdi
leaq -0x200(%rbp), %rsi
callq 0x74750
jmp 0x7f5a7
leaq -0x200(%rbp), %rdi
callq 0x5df00
jmp 0x7fabf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x200(%rbp), %rdi
callq 0x5df00
jmp 0x80152
movq -0x3e0(%rbp), %rax
addq $0x610, %rax            # imm = 0x610
movq %rax, -0x510(%rbp)
leaq 0x142554(%rip), %rsi    # 0x1c1b44
leaq -0x218(%rbp), %rdi
callq 0x5c1f0
jmp 0x7f5fe
movq -0x510(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x74750
jmp 0x7f613
leaq -0x218(%rbp), %rdi
callq 0x5df00
movq -0x3e0(%rbp), %rax
addq $0x610, %rax            # imm = 0x610
movq %rax, -0x518(%rbp)
leaq 0x108126(%rip), %rsi    # 0x187760
leaq -0x230(%rbp), %rdi
callq 0x5c1f0
jmp 0x7f648
movq -0x518(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x74750
jmp 0x7f65d
leaq -0x230(%rbp), %rdi
callq 0x5df00
jmp 0x7fabf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x5df00
jmp 0x80152
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x230(%rbp), %rdi
callq 0x5df00
jmp 0x80152
movq -0x3e0(%rbp), %rax
addq $0x610, %rax            # imm = 0x610
movq %rax, -0x520(%rbp)
leaq 0x10828b(%rip), %rsi    # 0x18794e
leaq -0x248(%rbp), %rdi
callq 0x5c1f0
jmp 0x7f6d1
movq -0x520(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x74750
jmp 0x7f6e6
leaq -0x248(%rbp), %rdi
callq 0x5df00
movq -0x3e0(%rbp), %rax
addq $0x610, %rax            # imm = 0x610
movq %rax, -0x528(%rbp)
leaq 0x108245(%rip), %rsi    # 0x187952
leaq -0x260(%rbp), %rdi
callq 0x5c1f0
jmp 0x7f71b
movq -0x528(%rbp), %rdi
leaq -0x260(%rbp), %rsi
callq 0x74750
jmp 0x7f730
leaq -0x260(%rbp), %rdi
callq 0x5df00
jmp 0x7fabf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x248(%rbp), %rdi
callq 0x5df00
jmp 0x80152
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x260(%rbp), %rdi
callq 0x5df00
jmp 0x80152
movq -0x3e0(%rbp), %rax
addq $0x610, %rax            # imm = 0x610
movq %rax, -0x530(%rbp)
leaq 0x1081b8(%rip), %rsi    # 0x18794e
leaq -0x278(%rbp), %rdi
callq 0x5c1f0
jmp 0x7f7a4
movq -0x530(%rbp), %rdi
leaq -0x278(%rbp), %rsi
callq 0x74750
jmp 0x7f7b9
leaq -0x278(%rbp), %rdi
callq 0x5df00
movq -0x3e0(%rbp), %rax
addq $0x610, %rax            # imm = 0x610
movq %rax, -0x538(%rbp)
leaq 0x108172(%rip), %rsi    # 0x187952
leaq -0x290(%rbp), %rdi
callq 0x5c1f0
jmp 0x7f7ee
movq -0x538(%rbp), %rdi
leaq -0x290(%rbp), %rsi
callq 0x74750
jmp 0x7f803
leaq -0x290(%rbp), %rdi
callq 0x5df00
movq -0x3e0(%rbp), %rax
addq $0x610, %rax            # imm = 0x610
movq %rax, -0x540(%rbp)
leaq 0x107f36(%rip), %rsi    # 0x187760
leaq -0x2a8(%rbp), %rdi
callq 0x5c1f0
jmp 0x7f838
movq -0x540(%rbp), %rdi
leaq -0x2a8(%rbp), %rsi
callq 0x74750
jmp 0x7f84d
leaq -0x2a8(%rbp), %rdi
callq 0x5df00
jmp 0x7fabf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x278(%rbp), %rdi
callq 0x5df00
jmp 0x80152
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x290(%rbp), %rdi
callq 0x5df00
jmp 0x80152
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x2a8(%rbp), %rdi
callq 0x5df00
jmp 0x80152
movq -0x3e0(%rbp), %rax
addq $0x610, %rax            # imm = 0x610
movq %rax, -0x548(%rbp)
leaq 0x108085(%rip), %rsi    # 0x187955
leaq -0x2c0(%rbp), %rdi
callq 0x5c1f0
jmp 0x7f8de
movq -0x548(%rbp), %rdi
leaq -0x2c0(%rbp), %rsi
callq 0x74750
jmp 0x7f8f3
leaq -0x2c0(%rbp), %rdi
callq 0x5df00
movq -0x3e0(%rbp), %rax
addq $0x610, %rax            # imm = 0x610
movq %rax, -0x550(%rbp)
leaq 0x107e46(%rip), %rsi    # 0x187760
leaq -0x2d8(%rbp), %rdi
callq 0x5c1f0
jmp 0x7f928
movq -0x550(%rbp), %rdi
leaq -0x2d8(%rbp), %rsi
callq 0x74750
jmp 0x7f93d
leaq -0x2d8(%rbp), %rdi
callq 0x5df00
jmp 0x7fabf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x2c0(%rbp), %rdi
callq 0x5df00
jmp 0x80152
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0x5df00
jmp 0x80152
movq -0x3e0(%rbp), %rax
addq $0x610, %rax            # imm = 0x610
movq %rax, -0x558(%rbp)
leaq 0x107fb8(%rip), %rsi    # 0x18795b
leaq -0x2f0(%rbp), %rdi
callq 0x5c1f0
jmp 0x7f9b1
movq -0x558(%rbp), %rdi
leaq -0x2f0(%rbp), %rsi
callq 0x74750
jmp 0x7f9c6
leaq -0x2f0(%rbp), %rdi
callq 0x5df00
movq -0x3e0(%rbp), %rax
addq $0x610, %rax            # imm = 0x610
movq %rax, -0x560(%rbp)
leaq 0x107f68(%rip), %rsi    # 0x187955
leaq -0x308(%rbp), %rdi
callq 0x5c1f0
jmp 0x7f9fb
movq -0x560(%rbp), %rdi
leaq -0x308(%rbp), %rsi
callq 0x74750
jmp 0x7fa10
leaq -0x308(%rbp), %rdi
callq 0x5df00
movq -0x3e0(%rbp), %rax
addq $0x610, %rax            # imm = 0x610
movq %rax, -0x568(%rbp)
leaq 0x107f2a(%rip), %rsi    # 0x187961
leaq -0x320(%rbp), %rdi
callq 0x5c1f0
jmp 0x7fa45
movq -0x568(%rbp), %rdi
leaq -0x320(%rbp), %rsi
callq 0x74750
jmp 0x7fa5a
leaq -0x320(%rbp), %rdi
callq 0x5df00
jmp 0x7fabf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x2f0(%rbp), %rdi
callq 0x5df00
jmp 0x80152
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x308(%rbp), %rdi
callq 0x5df00
jmp 0x80152
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x320(%rbp), %rdi
callq 0x5df00
jmp 0x80152
movq -0x3e0(%rbp), %rax
movq 0x5f0(%rax), %rdi
movq %rdi, -0x578(%rbp)
callq 0x5a210
movl %eax, -0x56c(%rbp)
jmp 0x7fae1
movq -0x3e0(%rbp), %rdi
addq $0x610, %rdi            # imm = 0x610
callq 0x5c990
movl %eax, -0x57c(%rbp)
jmp 0x7fafc
movl -0x56c(%rbp), %edi
movl -0x57c(%rbp), %esi
movl -0x84(%rbp), %eax
addl $0x9, %eax
imull %eax, %esi
addl $0x15, %esi
callq 0x5aae0
movl %eax, -0x580(%rbp)
jmp 0x7fb24
movl -0x580(%rbp), %esi
movq -0x578(%rbp), %rdi
callq 0x5db30
jmp 0x7fb38
movl $0x0, -0x324(%rbp)
movl $0xffffffff, -0x328(%rbp) # imm = 0xFFFFFFFF
xorl %eax, %eax
cmpl $0x0, -0x324(%rbp)
movb %al, -0x581(%rbp)
jne 0x7fb9e
movq -0x3e0(%rbp), %rdi
movl -0x328(%rbp), %eax
movl %eax, -0x58c(%rbp)
addq $0x610, %rdi            # imm = 0x610
callq 0x5c990
movl %eax, -0x588(%rbp)
jmp 0x7fb84
movl -0x58c(%rbp), %eax
movl -0x588(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
setl %al
movb %al, -0x581(%rbp)
movb -0x581(%rbp), %al
testb $0x1, %al
jne 0x7fbad
jmp 0x7fe8a
movq -0x3e0(%rbp), %rdi
addq $0x610, %rdi            # imm = 0x610
movl -0x328(%rbp), %esi
incl %esi
movl %esi, -0x328(%rbp)
callq 0x819c0
movq %rax, -0x598(%rbp)
jmp 0x7fbd7
movq -0x598(%rbp), %rax
movq %rax, -0x330(%rbp)
cmpl $0x0, -0x324(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x7fbfa
jmp 0x7fe74
movl $0x5c8, %edi            # imm = 0x5C8
callq 0x59820
movq %rax, -0x5a0(%rbp)
jmp 0x7fc0d
movq 0x1887ac(%rip), %rax    # 0x2083c0
movq (%rax), %rdi
movq -0x330(%rbp), %rsi
callq 0x5cc30
movq %rax, -0x5a8(%rbp)
jmp 0x7fc2c
movq -0x3e0(%rbp), %rax
movq 0x5f0(%rax), %rdi
callq 0x5a210
movl %eax, -0x5ac(%rbp)
jmp 0x7fc47
movq -0x3e0(%rbp), %rdi
addq $0x610, %rdi            # imm = 0x610
callq 0x5c990
movl %eax, -0x5b0(%rbp)
jmp 0x7fc62
movl -0x5ac(%rbp), %edx
movl -0x5b0(%rbp), %ecx
movl -0x84(%rbp), %eax
addl $0x9, %eax
imull %eax, %ecx
subl %ecx, %edx
movl %edx, %esi
addl $0x9, %esi
movl %edx, %ecx
shrl $0x1f, %esi
movl %esi, %edx
leal 0x9(%rcx,%rdx), %ecx
sarl %ecx
movl -0x328(%rbp), %edx
imull %eax, %edx
movl %ecx, %eax
movl %edx, %ecx
leal -0x3(%rax,%rcx), %esi
movl -0x88(%rbp), %edx
addl $0xe, %edx
leaq -0x340(%rbp), %rdi
callq 0x5c2c0
jmp 0x7fcb6
leaq -0x348(%rbp), %rdi
callq 0x59230
jmp 0x7fcc4
movq -0x5a8(%rbp), %rsi
movq -0x5a0(%rbp), %rdi
leaq -0x340(%rbp), %rdx
leaq -0x348(%rbp), %rcx
callq 0x5ba60
jmp 0x7fce7
movq -0x5a0(%rbp), %rax
movq %rax, -0x338(%rbp)
cmpl $0x0, -0x328(%rbp)
jne 0x7fd68
movq -0x3e0(%rbp), %rcx
movq -0x338(%rbp), %rdi
addq $0x478, %rdi            # imm = 0x478
movq 0x189016(%rip), %rax    # 0x208d30
movq %rax, -0x358(%rbp)
movq $0x0, -0x350(%rbp)
movq -0x358(%rbp), %rsi
movq -0x350(%rbp), %rdx
callq 0x817b0
jmp 0x7fd41
jmp 0x7fe08
movq -0x5a0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x5c8, %esi            # imm = 0x5C8
callq 0x595b0
jmp 0x80152
cmpl $0x1, -0x328(%rbp)
jne 0x7fdb6
movq -0x3e0(%rbp), %rcx
movq -0x338(%rbp), %rdi
addq $0x478, %rdi            # imm = 0x478
movq 0x18925b(%rip), %rax    # 0x208fe8
movq %rax, -0x368(%rbp)
movq $0x0, -0x360(%rbp)
movq -0x368(%rbp), %rsi
movq -0x360(%rbp), %rdx
callq 0x817b0
jmp 0x7fdb4
jmp 0x7fe06
cmpl $0x2, -0x328(%rbp)
jne 0x7fe04
movq -0x3e0(%rbp), %rcx
movq -0x338(%rbp), %rdi
addq $0x478, %rdi            # imm = 0x478
movq 0x188a55(%rip), %rax    # 0x208830
movq %rax, -0x378(%rbp)
movq $0x0, -0x370(%rbp)
movq -0x378(%rbp), %rsi
movq -0x370(%rbp), %rdx
callq 0x817b0
jmp 0x7fe02
jmp 0x7fe04
jmp 0x7fe06
jmp 0x7fe08
movq -0x338(%rbp), %rdi
movq (%rdi), %rax
movq 0x120(%rax), %rax
movl $0x18, %esi
callq *%rax
jmp 0x7fe22
movq -0x3e0(%rbp), %rdi
addq $0x668, %rdi            # imm = 0x668
leaq -0x338(%rbp), %rsi
callq 0x819f0
jmp 0x7fe3e
movq -0x3e0(%rbp), %rax
movq 0x600(%rax), %rdi
movq -0x338(%rbp), %rsi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0x7fe5e
jmp 0x7fe60
movl -0x324(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x324(%rbp)
jmp 0x7fbe5
jmp 0x7fe76
movl -0x324(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x324(%rbp)
jmp 0x7fb4c
callq 0x5c790
movq %rdx, -0x5c0(%rbp)
movq %rax, -0x5b8(%rbp)
jmp 0x7fe9f
movq -0x5c0(%rbp), %rax
movq -0x5b8(%rbp), %rcx
movq %rcx, -0x388(%rbp)
movq %rax, -0x380(%rbp)
leaq -0x3a0(%rbp), %rdi
callq 0x59230
jmp 0x7fec9
xorl %eax, %eax
movl %eax, %esi
leaq -0x398(%rbp), %rdi
leaq -0x3a0(%rbp), %rdx
callq 0x5b7d0
jmp 0x7fee2
leaq -0x398(%rbp), %rdi
callq 0x5d470
movw %ax, -0x5c2(%rbp)
jmp 0x7fef7
movw -0x5c2(%rbp), %ax
cwtl
cvtsi2sd %eax, %xmm0
movsd 0x1075b5(%rip), %xmm1   # 0x1874c0
divsd %xmm1, %xmm0
movsd %xmm0, -0x5e0(%rbp)
leaq -0x398(%rbp), %rdi
callq 0x5c380
movsd -0x5e0(%rbp), %xmm0
movq -0x3e0(%rbp), %rax
movsd %xmm0, -0x390(%rbp)
movq 0x5f0(%rax), %rax
movq %rax, -0x5d8(%rbp)
leaq -0x388(%rbp), %rdi
callq 0x5d510
movq %rax, -0x5d0(%rbp)
jmp 0x7ff5d
movq -0x5d0(%rbp), %rax
movq %rax, -0x3b8(%rbp)
leaq -0x388(%rbp), %rdi
callq 0x5a5a0
movl %eax, -0x5e4(%rbp)
jmp 0x7ff7f
movq -0x3e0(%rbp), %rax
movl -0x5e4(%rbp), %ecx
movslq %ecx, %rcx
movq %rcx, -0x5f0(%rbp)
movq 0x5f0(%rax), %rdi
callq 0x5a210
movl %eax, -0x5e8(%rbp)
jmp 0x7ffaa
movl -0x5e8(%rbp), %eax
cvtsi2sd %eax, %xmm0
movsd -0x390(%rbp), %xmm1
mulsd %xmm1, %xmm0
callq 0x5a970
movq %rax, -0x5f8(%rbp)
jmp 0x7ffce
movq -0x5f8(%rbp), %rcx
movq -0x5f0(%rbp), %rax
subq %rcx, %rax
movq %rax, %rcx
shrq $0x3f, %rcx
addq %rcx, %rax
shrq %rax
movl %eax, -0x600(%rbp)
leaq -0x388(%rbp), %rdi
callq 0x591a0
movl %eax, -0x5fc(%rbp)
jmp 0x80006
movq -0x3e0(%rbp), %rax
movl -0x5fc(%rbp), %ecx
movslq %ecx, %rcx
movq %rcx, -0x610(%rbp)
movq 0x5f0(%rax), %rdi
callq 0x5b860
movl %eax, -0x604(%rbp)
jmp 0x80031
movl -0x604(%rbp), %eax
cvtsi2sd %eax, %xmm0
movsd -0x390(%rbp), %xmm1
mulsd %xmm1, %xmm0
callq 0x5a970
movq %rax, -0x618(%rbp)
jmp 0x80055
movl -0x600(%rbp), %esi
movq -0x618(%rbp), %rcx
movq -0x610(%rbp), %rax
subq %rcx, %rax
movq %rax, %rcx
shrq $0x3f, %rcx
addq %rcx, %rax
shrq %rax
movl %eax, %edx
leaq -0x3c0(%rbp), %rdi
callq 0x5c2c0
jmp 0x80089
leaq -0x3b8(%rbp), %rdi
leaq -0x3c0(%rbp), %rsi
callq 0x5ca20
movq %rax, -0x620(%rbp)
jmp 0x800a5
movq -0x620(%rbp), %rax
movq %rax, -0x3b0(%rbp)
movq 0x18853e(%rip), %rax    # 0x2085f8
movl (%rax), %ecx
movl %ecx, %eax
leal (%rax,%rax,4), %ecx
movl %ecx, %eax
leal (%rax,%rax,4), %edx
leaq -0x3c8(%rbp), %rdi
movl %edx, %esi
callq 0x5c2c0
jmp 0x800d6
leaq -0x3b0(%rbp), %rdi
leaq -0x3c8(%rbp), %rsi
callq 0x5ca20
movq %rax, -0x628(%rbp)
jmp 0x800f2
movq -0x5d8(%rbp), %rdi
movq -0x628(%rbp), %rax
movq %rax, -0x3a8(%rbp)
leaq -0x3a8(%rbp), %rsi
callq 0x5d8c0
jmp 0x80115
leaq -0x138(%rbp), %rdi
callq 0x74690
leaq -0xc8(%rbp), %rdi
callq 0x5abf0
movb $0x1, %al
andb $0x1, %al
addq $0x630, %rsp            # imm = 0x630
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x398(%rbp), %rdi
callq 0x5c380
leaq -0x138(%rbp), %rdi
callq 0x74690
leaq -0xc8(%rbp), %rdi
callq 0x5abf0
movq -0x40(%rbp), %rdi
callq 0x5b6b0
nopw %cs:(%rax,%rax)