// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/dialogs/messagebox.cpp
// Function: smooth::GUI::Dialogs::MessageDlg::MessageDlg(smooth::String const&, smooth::String const&, int, int, smooth::String const&, bool*)
S::GUI::Dialogs::MessageDlg::MessageDlg(const String &text, const String &title, Int buttons, Int iconID, const String &checkBoxText, Bool *cVar)
{
	/* Load message box icon if any.
	 */
	Bitmap	 icon;

#ifdef __WIN32__
	icon = ImageLoader::Load(String("Icon:").Append(String::FromInt(iconID)));
#else
	String	 iconName;
	Int	 iconSize = 32;

	if	(iconID == Message::Icon::Error)       iconName = "dialog-error.png";
	else if (iconID == Message::Icon::Question)    iconName = "dialog-question.png";
	else if (iconID == Message::Icon::Warning)     iconName = "dialog-warning.png";
	else if (iconID == Message::Icon::Information) iconName = "dialog-information.png";

	static const char	*iconDirs[] = { "%RESOURCESDIR%/icons", "/usr/share/icons", "/usr/local/share/icons", NIL };

	for (Int i = 0; iconDirs[i] != NIL; i++)
	{
		String	 iconDir = String(iconDirs[i]).Replace("%RESOURCESDIR%", S::System::System::GetResourcesDirectory());

		if (!Directory(iconDir).Exists()) continue;

		String	 file = String(iconDir).Append("/gnome/").Append(String::FromInt(iconSize)).Append("x").Append(String::FromInt(iconSize)).Append("/status/").Append(iconName);

		if (!File(file).Exists()) continue;

		icon = ImageLoader::Load(file);

		break;
	}
#endif

	/* Mirror question mark icon for Arabic script languages.
	 */
	if (iconID == Message::Icon::Question && I18n::Translator::defaultTranslator->TranslateString("?")[0] == 0x61F)
	{
		Point	 point;
		Size	 size = icon.GetSize();

		for (point.y = 0; point.y < size.cy; point.y++)
		{
			for (point.x = 0; point.x < size.cx / 2; point.x++)
			{
				Point	 mirror = Point(size.cx - point.x - 1, point.y);

				Color	 pointPixel  = icon.GetPixel(point);
				Color	 mirrorPixel = icon.GetPixel(mirror);

				icon.SetPixel(point, mirrorPixel);
				icon.SetPixel(mirror, pointPixel);
			}
		}
	}

	/* Create message box widgets.
	 */
	InitializeWidgets(text, title, buttons, icon, checkBoxText, cVar);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3a0, %rsp            # imm = 0x3A0
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movq %r9, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x320(%rbp)
callq 0x5bda0
movq -0x320(%rbp), %rdi
movq 0x188b3c(%rip), %rax    # 0x208d00
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x610, %rdi            # imm = 0x610
movq %rdi, -0x318(%rbp)
callq 0x74650
jmp 0x801e0
movq -0x320(%rbp), %rdi
addq $0x668, %rdi            # imm = 0x668
movq %rdi, -0x328(%rbp)
callq 0x81670
jmp 0x801fc
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
callq 0x5d4a0
jmp 0x80209
leaq -0x58(%rbp), %rdi
xorl %esi, %esi
callq 0x5da90
jmp 0x80216
movl $0x20, -0x5c(%rbp)
cmpl $0x7f01, -0x20(%rbp)    # imm = 0x7F01
jne 0x80292
leaq 0x107675(%rip), %rsi    # 0x1878a2
leaq -0x58(%rbp), %rdi
callq 0x5a230
jmp 0x80238
jmp 0x802ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x80ad5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x80ac9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x80abd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x80ab4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x80aab
cmpl $0x7f02, -0x20(%rbp)    # imm = 0x7F02
jne 0x802af
leaq 0x107611(%rip), %rsi    # 0x1878b3
leaq -0x58(%rbp), %rdi
callq 0x5a230
jmp 0x802ad
jmp 0x802ed
cmpl $0x7f03, -0x20(%rbp)    # imm = 0x7F03
jne 0x802cc
leaq 0x107608(%rip), %rsi    # 0x1878c7
leaq -0x58(%rbp), %rdi
callq 0x5a230
jmp 0x802ca
jmp 0x802eb
cmpl $0x7f04, -0x20(%rbp)    # imm = 0x7F04
jne 0x802e9
leaq 0x1075fe(%rip), %rsi    # 0x1878da
leaq -0x58(%rbp), %rdi
callq 0x5a230
jmp 0x802e7
jmp 0x802e9
jmp 0x802eb
jmp 0x802ed
jmp 0x802ef
movl $0x0, -0x60(%rbp)
movslq -0x60(%rbp), %rcx
leaq 0x18b49f(%rip), %rax    # 0x20b7a0
cmpq $0x0, (%rax,%rcx,8)
je 0x8084a
movslq -0x60(%rbp), %rcx
leaq 0x18b489(%rip), %rax    # 0x20b7a0
movq (%rax,%rcx,8), %rsi
leaq -0x90(%rbp), %rdi
callq 0x5c1f0
jmp 0x80329
leaq 0x1075fe(%rip), %rsi    # 0x18792e
leaq -0xa8(%rbp), %rdi
callq 0x5c1f0
jmp 0x8033e
leaq -0xc0(%rbp), %rdi
callq 0x5b5e0
jmp 0x8034c
leaq -0x90(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
callq 0x5bd30
movq %rax, -0x330(%rbp)
jmp 0x8036f
movq -0x330(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x5b6d0
jmp 0x80381
leaq -0xc0(%rbp), %rdi
callq 0x5df00
leaq -0xa8(%rbp), %rdi
callq 0x5df00
leaq -0x90(%rbp), %rdi
callq 0x5df00
leaq -0x1b8(%rbp), %rdi
xorl %esi, %esi
callq 0x5da90
jmp 0x803b5
leaq -0x1a0(%rbp), %rdi
leaq -0x78(%rbp), %rsi
leaq -0x1b8(%rbp), %rdx
callq 0x5d860
jmp 0x803ce
leaq -0x1a0(%rbp), %rdi
callq 0x59570
movb %al, -0x331(%rbp)
jmp 0x803e2
movb -0x331(%rbp), %al
xorb $-0x1, %al
movb %al, -0x332(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x5df10
leaq -0x1b8(%rbp), %rdi
callq 0x5df00
movb -0x332(%rbp), %al
testb $0x1, %al
jne 0x80417
jmp 0x804bf
movl $0x4, -0x1bc(%rbp)
jmp 0x80816
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x80466
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x8045a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x5df00
leaq -0xa8(%rbp), %rdi
callq 0x5df00
leaq -0x90(%rbp), %rdi
callq 0x5df00
jmp 0x80aab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x8082e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x804ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x5df10
leaq -0x1b8(%rbp), %rdi
callq 0x5df00
jmp 0x8082e
leaq -0x1f0(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x5b6d0
jmp 0x804d1
leaq 0x107465(%rip), %rsi    # 0x18793d
leaq -0x208(%rbp), %rdi
callq 0x5c1f0
jmp 0x804e6
leaq -0x1f0(%rbp), %rdi
leaq -0x208(%rbp), %rsi
callq 0x5a710
movq %rax, -0x340(%rbp)
jmp 0x80502
movslq -0x5c(%rbp), %rsi
leaq -0x220(%rbp), %rdi
callq 0x5b290
jmp 0x80514
movq -0x340(%rbp), %rdi
leaq -0x220(%rbp), %rsi
callq 0x5a710
movq %rax, -0x348(%rbp)
jmp 0x80530
leaq 0x1278a6(%rip), %rsi    # 0x1a7ddd
leaq -0x238(%rbp), %rdi
callq 0x5c1f0
jmp 0x80545
movq -0x348(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0x5a710
movq %rax, -0x350(%rbp)
jmp 0x80561
movslq -0x5c(%rbp), %rsi
leaq -0x250(%rbp), %rdi
callq 0x5b290
jmp 0x80573
movq -0x350(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x5a710
movq %rax, -0x358(%rbp)
jmp 0x8058f
leaq 0x1073af(%rip), %rsi    # 0x187945
leaq -0x268(%rbp), %rdi
callq 0x5c1f0
jmp 0x805a4
movq -0x358(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0x5a710
movq %rax, -0x360(%rbp)
jmp 0x805c0
movq -0x360(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x5a710
movq %rax, -0x368(%rbp)
jmp 0x805d9
movq -0x368(%rbp), %rsi
leaq -0x1d8(%rbp), %rdi
callq 0x5b6d0
jmp 0x805ee
leaq -0x268(%rbp), %rdi
callq 0x5df00
leaq -0x250(%rbp), %rdi
callq 0x5df00
leaq -0x238(%rbp), %rdi
callq 0x5df00
leaq -0x220(%rbp), %rdi
callq 0x5df00
leaq -0x208(%rbp), %rdi
callq 0x5df00
leaq -0x1f0(%rbp), %rdi
callq 0x5df00
leaq -0x2b0(%rbp), %rdi
xorl %esi, %esi
callq 0x5da90
jmp 0x80646
leaq -0x298(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
leaq -0x2b0(%rbp), %rdx
callq 0x5acf0
jmp 0x80662
leaq -0x298(%rbp), %rdi
callq 0x5b4b0
movb %al, -0x369(%rbp)
jmp 0x80676
movb -0x369(%rbp), %al
xorb $-0x1, %al
movb %al, -0x36a(%rbp)
leaq -0x298(%rbp), %rdi
callq 0x5de78
leaq -0x2b0(%rbp), %rdi
callq 0x5df00
movb -0x36a(%rbp), %al
testb $0x1, %al
jne 0x806ab
jmp 0x807a1
movl $0x4, -0x1bc(%rbp)
jmp 0x807fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x8074b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x8073f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x80733
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x80727
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x8071b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x5df00
leaq -0x250(%rbp), %rdi
callq 0x5df00
leaq -0x238(%rbp), %rdi
callq 0x5df00
leaq -0x220(%rbp), %rdi
callq 0x5df00
leaq -0x208(%rbp), %rdi
callq 0x5df00
leaq -0x1f0(%rbp), %rdi
callq 0x5df00
jmp 0x8082e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x80808
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x80793
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x298(%rbp), %rdi
callq 0x5de78
leaq -0x2b0(%rbp), %rdi
callq 0x5df00
jmp 0x80808
leaq -0x2b8(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x5cba0
jmp 0x807b6
leaq -0x40(%rbp), %rdi
leaq -0x2b8(%rbp), %rsi
callq 0x5cca0
jmp 0x807c8
leaq -0x2b8(%rbp), %rdi
callq 0x5de40
movl $0x2, -0x1bc(%rbp)
jmp 0x807fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x2b8(%rbp), %rdi
callq 0x5de40
jmp 0x80808
leaq -0x1d8(%rbp), %rdi
callq 0x5df00
jmp 0x80816
leaq -0x1d8(%rbp), %rdi
callq 0x5df00
jmp 0x8082e
leaq -0x78(%rbp), %rdi
callq 0x5df00
movl -0x1bc(%rbp), %eax
subl $0x2, %eax
je 0x8084a
jmp 0x8082c
jmp 0x8083c
leaq -0x78(%rbp), %rdi
callq 0x5df00
jmp 0x80aab
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x802f6
movl -0x20(%rbp), %ecx
movb $0x0, -0x2d1(%rbp)
xorl %eax, %eax
cmpl $0x7f02, %ecx           # imm = 0x7F02
movb %al, -0x36b(%rbp)
jne 0x808d7
movq 0x187b55(%rip), %rax    # 0x2083c0
movq (%rax), %rax
movq %rax, -0x378(%rbp)
leaq 0x1069bd(%rip), %rsi    # 0x187239
leaq -0x2d0(%rbp), %rdi
callq 0x5c1f0
jmp 0x8088a
movq -0x378(%rbp), %rdi
movb $0x1, -0x2d1(%rbp)
leaq -0x2d0(%rbp), %rsi
callq 0x5cc30
movq %rax, -0x380(%rbp)
jmp 0x808ad
movq -0x380(%rbp), %rdi
xorl %esi, %esi
callq 0x5c900
movl %eax, -0x384(%rbp)
jmp 0x808c3
movl -0x384(%rbp), %eax
cmpl $0x61f, %eax            # imm = 0x61F
sete %al
movb %al, -0x36b(%rbp)
movb -0x36b(%rbp), %al
movb %al, -0x385(%rbp)
testb $0x1, -0x2d1(%rbp)
jne 0x808ee
jmp 0x808fa
leaq -0x2d0(%rbp), %rdi
callq 0x5df00
movb -0x385(%rbp), %al
testb $0x1, %al
jne 0x80909
jmp 0x80a65
leaq -0x2dc(%rbp), %rdi
callq 0x5b530
jmp 0x80917
leaq -0x40(%rbp), %rdi
callq 0x5ce60
movq %rax, -0x390(%rbp)
jmp 0x80929
movq -0x390(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x2e4(%rbp)
movl $0x0, -0x2d8(%rbp)
movl -0x2d8(%rbp), %eax
cmpl -0x2e0(%rbp), %eax
jge 0x80a63
movl $0x0, -0x2dc(%rbp)
movl -0x2dc(%rbp), %eax
movl %eax, -0x394(%rbp)
movl -0x2e4(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x394(%rbp), %eax
cmpl %ecx, %eax
jge 0x80a4d
movl -0x2e4(%rbp), %eax
movl -0x2dc(%rbp), %esi
movl -0x2d8(%rbp), %edx
notl %esi
addl %eax, %esi
leaq -0x2ec(%rbp), %rdi
callq 0x5c2c0
jmp 0x809ae
leaq -0x300(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0x2dc(%rbp), %rdx
callq 0x5a220
jmp 0x809c7
leaq -0x310(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0x2ec(%rbp), %rdx
callq 0x5a220
jmp 0x809e0
leaq -0x40(%rbp), %rdi
leaq -0x2dc(%rbp), %rsi
leaq -0x310(%rbp), %rdx
callq 0x5a3d0
jmp 0x809f9
leaq -0x40(%rbp), %rdi
leaq -0x2ec(%rbp), %rsi
leaq -0x300(%rbp), %rdx
callq 0x5a3d0
jmp 0x80a12
jmp 0x80a14
movl -0x2dc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2dc(%rbp)
jmp 0x80960
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
testb $0x1, -0x2d1(%rbp)
jne 0x80a3f
jmp 0x80a4b
leaq -0x2d0(%rbp), %rdi
callq 0x5df00
jmp 0x80aab
jmp 0x80a4f
movl -0x2d8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2d8(%rbp)
jmp 0x80944
jmp 0x80a65
movq -0x320(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %r9
movq 0x10(%rbp), %r8
movq %rsp, %rax
movq %r8, (%rax)
leaq -0x40(%rbp), %r8
callq 0x595a0
jmp 0x80a90
leaq -0x58(%rbp), %rdi
callq 0x5df00
leaq -0x40(%rbp), %rdi
callq 0x5de40
addq $0x3a0, %rsp            # imm = 0x3A0
popq %rbp
retq
leaq -0x58(%rbp), %rdi
callq 0x5df00
leaq -0x40(%rbp), %rdi
callq 0x5de40
movq -0x328(%rbp), %rdi
callq 0x816b0
movq -0x318(%rbp), %rdi
callq 0x74690
movq -0x320(%rbp), %rdi
callq 0x59d10
movq -0x30(%rbp), %rdi
callq 0x5b6b0
nopw (%rax,%rax)