// File: /workspace/github_c_makefile_star2_O1/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 0x57650
leaq 0xf6452(%rip), %rax     # 0x161b78
movq %rax, (%rbx)
leaq 0x5f0(%rbx), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x58950
movl $0x68, %edi
movq %r14, 0x20(%rsp)
callq 0x556b0
movq %rax, %r12
movq %rax, %rdi
callq 0x55b80
movq %r12, 0x600(%rbx)
movl %ebp, 0x5e8(%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x582c0
callq 0x57e90
movq %rax, %r15
movq %rdx, %r12
leaq 0x28(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x57150
leaq 0x8(%rsp), %rdi
callq 0x58930
movw %ax, (%rsp)
leaq 0x8(%rsp), %rdi
callq 0x57b20
movq %r14, %rdi
callq 0x58410
movq (%rax), %rbp
movl $0x6d8, %edi            # imm = 0x6D8
callq 0x556b0
movq %rax, %r13
leaq 0x892d0(%rip), %rsi     # 0xf4a96
leaq 0x8(%rsp), %rdi
callq 0x579f0
movq %rbp, %r14
shrq $0x20, %r14
leaq 0x28(%rsp), %rdx
movq $0x0, (%rdx)
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 0x56fe0
movswl (%rsp), %eax
cvtsi2sd %eax, %xmm0
divsd 0x88cd4(%rip), %xmm0    # 0xf44f0
movsd %xmm0, (%rsp)
movq %r13, 0x5f8(%rbx)
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x59200
movq 0x5f8(%rbx), %rdi
movl %r12d, %eax
subl %r15d, %eax
cvtsi2sd %ebp, %xmm2
movslq %eax, %rcx
movsd (%rsp), %xmm6
mulsd %xmm6, %xmm2
xorpd %xmm1, %xmm1
movapd %xmm2, %xmm3
cmpltsd %xmm1, %xmm3
movsd 0x88b29(%rip), %xmm0    # 0xf4390
movapd %xmm3, %xmm4
andpd %xmm0, %xmm4
movsd 0x88b21(%rip), %xmm5    # 0xf4398
andnpd %xmm5, %xmm3
orpd %xmm4, %xmm3
addsd %xmm2, %xmm3
cvttsd2si %xmm3, %rax
subq %rax, %rcx
movq %rcx, %rax
shrq $0x3f, %rax
addq %rcx, %rax
shrq %rax
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
movq %r15, %rdx
andq %rcx, %rdx
subq %rdx, %r12
sarq $0x20, %r12
xorps %xmm2, %xmm2
cvtsi2sd %r14d, %xmm2
mulsd %xmm6, %xmm2
movapd %xmm2, %xmm3
cmpltsd %xmm1, %xmm3
andpd %xmm3, %xmm0
andnpd %xmm5, %xmm3
orpd %xmm0, %xmm3
addsd %xmm2, %xmm3
cvttsd2si %xmm3, %rdx
subq %rdx, %r12
movq %r12, %rdx
shrq $0x3f, %rdx
addq %r12, %rdx
addl %r15d, %eax
andq $-0x2, %rdx
shlq $0x1f, %rdx
addq %r15, %rdx
andq %rcx, %rdx
orq %rdx, %rax
movq %rax, (%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 0xdc(%rip), %rsi        # 0x6ba02
xorl %edx, %edx
movq %rbx, %rcx
callq 0x6bb4e
movl $0x688, %r15d           # imm = 0x688
addq 0x5f8(%rbx), %r15
movq %r15, %rdi
callq 0x6b418
leaq 0x14c(%rip), %rsi       # 0x6ba98
movq %r15, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x6bc8c
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 0x128(%rip), %rsi       # 0x6baaa
xorl %edx, %edx
movq %rbx, %rcx
callq 0x6bb4e
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6b9e5
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x59200
jmp 0x6b9af
movq %rax, %r15
movl $0x6d8, %esi            # imm = 0x6D8
movq %r13, %rdi
jmp 0x6b9d7
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x57b20
jmp 0x6b9e8
jmp 0x6b9e5
jmp 0x6b9e5
movq %rax, %r15
movl $0x68, %esi
movq %r12, %rdi
callq 0x55480
jmp 0x6b9e8
movq %rax, %r15
jmp 0x6b9f2
jmp 0x6b9e5
movq %rax, %r15
movq 0x20(%rsp), %rdi
callq 0x59148
movq %rbx, %rdi
callq 0x55b00
movq %r15, %rdi
callq 0x57090