// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/dialogs/splashscreen.cpp
// Function: smooth::GUI::Dialogs::SplashScreen::SplashScreen(smooth::GUI::Bitmap const&, int)
S::GUI::Dialogs::SplashScreen::SplashScreen(const GUI::Bitmap &iBitmap, Int iTime)
{
	timer	= new System::Timer();
	time	= iTime;

	bitmap	= iBitmap;

	Rect	 workArea    = System::Screen::GetActiveScreenWorkArea();
	Float	 scaleFactor = Surface().GetSurfaceDPI() / 96.0;

	Size	 size = bitmap.GetSize();

	splashscreen = new Window("Splash screen", Point(), size + Size(2, 2));

	splashscreen->SetPosition(workArea.GetPosition() + Point((workArea.GetWidth()  - Math::Round((size.cx + 2) * scaleFactor)) / 2,
								 (workArea.GetHeight() - Math::Round((size.cy + 2) * scaleFactor)) / 2));

	splashscreen->onPaint.Connect(&SplashScreen::SplashPaintProc, this);
	splashscreen->doClose.Connect(&SplashScreen::SplashKillProc, this);

	splashscreen->SetFlags(WF_NORESIZE | WF_TOPMOST);

	Add(splashscreen);

	timer->onInterval.Connect(&SplashScreen::TimerProc, this);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x58870
leaq 0xeb01a(%rip), %rax     # 0x156bb8
movq %rax, (%rbx)
leaq 0x5f0(%rbx), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x59c80
pushq $0x68
popq %rdi
movq %r14, 0x20(%rsp)
callq 0x56700
movq %rax, %r12
movq %rax, %rdi
callq 0x56c00
movq %r12, 0x600(%rbx)
movl %ebp, 0x5e8(%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x59570
callq 0x59120
movq %rax, %r15
movq %rdx, %r12
leaq 0x28(%rsp), %rdx
andq $0x0, (%rdx)
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x58340
leaq 0x8(%rsp), %rdi
callq 0x59c60
movw %ax, (%rsp)
leaq 0x8(%rsp), %rdi
callq 0x58d90
movq %r14, %rdi
callq 0x596e0
movq (%rax), %rbp
movl $0x6d8, %edi            # imm = 0x6D8
callq 0x56700
movq %rax, %r13
leaq 0x77eb5(%rip), %rsi     # 0xe3aee
leaq 0x8(%rsp), %rdi
callq 0x58c40
movq %rbp, %r14
leaq 0x28(%rsp), %rdx
andq $0x0, (%rdx)
shrq $0x20, %r14
addl $0x2, %ebp
addl $0x2, %r14d
movq %r14, %rax
shlq $0x20, %rax
addq %rbp, %rax
leaq 0x30(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x8(%rsp), %rsi
movq %r13, %rdi
xorl %r8d, %r8d
callq 0x581a0
movswl (%rsp), %eax
cvtsi2sd %eax, %xmm0
divsd 0x77884(%rip), %xmm0    # 0xe3510
movsd %xmm0, (%rsp)
movq %r13, 0x5f8(%rbx)
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x5a588
movq 0x5f8(%rbx), %rdi
movl %r12d, %eax
subl %r15d, %eax
cvtsi2sd %ebp, %xmm3
movsd (%rsp), %xmm6
mulsd %xmm6, %xmm3
xorpd %xmm1, %xmm1
movapd %xmm3, %xmm4
cmpltsd %xmm1, %xmm4
movsd 0x776a4(%rip), %xmm0    # 0xe3378
movapd %xmm4, %xmm5
andpd %xmm0, %xmm5
movsd 0x7769c(%rip), %xmm2    # 0xe3380
andnpd %xmm2, %xmm4
orpd %xmm5, %xmm4
addsd %xmm3, %xmm4
cvttsd2si %xmm4, %rcx
cltq
subq %rcx, %rax
pushq $0x2
popq %r8
cqto
idivq %r8
movq %rax, %rcx
movabsq $-0x100000000, %rsi     # imm = 0xFFFFFFFF00000000
movq %r15, %rax
andq %rsi, %rax
subq %rax, %r12
cvtsi2sd %r14d, %xmm3
sarq $0x20, %r12
mulsd %xmm6, %xmm3
movapd %xmm3, %xmm4
cmpltsd %xmm1, %xmm4
andpd %xmm4, %xmm0
andnpd %xmm2, %xmm4
orpd %xmm0, %xmm4
addsd %xmm3, %xmm4
cvttsd2si %xmm4, %rax
subq %rax, %r12
movq %r12, %rax
cqto
idivq %r8
addl %r15d, %ecx
shlq $0x20, %rax
addq %r15, %rax
andq %rsi, %rax
orq %rax, %rcx
movq %rcx, (%r13)
leaq 0xb0(%rdi), %rdx
movq (%rdi), %rax
leaq 0x8(%rsp), %rsi
callq *0x150(%rax)
movl $0x648, %edi            # imm = 0x648
addq 0x5f8(%rbx), %rdi
leaq 0xcf(%rip), %rsi        # 0x6be5a
xorl %edx, %edx
movq %rbx, %rcx
callq 0x6bf94
movl $0x688, %edi            # imm = 0x688
addq 0x5f8(%rbx), %rdi
leaq 0x136(%rip), %rsi       # 0x6bede
xorl %edx, %edx
movq %rbx, %rcx
callq 0x6c030
movq 0x5f8(%rbx), %rsi
movl $0x6, 0x30(%rsi)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
movq 0x600(%rbx), %rdi
addq $0x48, %rdi
leaq 0x115(%rip), %rsi       # 0x6bef0
xorl %edx, %edx
movq %rbx, %rcx
callq 0x6bf94
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6be3c
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x5a588
jmp 0x6be08
movq %rax, %r15
movl $0x6d8, %esi            # imm = 0x6D8
movq %r13, %rdi
jmp 0x6be2e
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x58d90
jmp 0x6be3f
jmp 0x6be3c
jmp 0x6be3c
movq %rax, %r15
pushq $0x68
popq %rsi
movq %r12, %rdi
callq 0x564c0
jmp 0x6be3f
movq %rax, %r15
jmp 0x6be49
jmp 0x6be3c
movq %rax, %r15
movq 0x20(%rsp), %rdi
callq 0x5a4c8
movq %rbx, %rdi
callq 0x56b80
movq %r15, %rdi
callq 0x58260
nop