// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/dialogs/colordlg.cpp
// Function: smooth::GUI::Dialogs::ColorSelection::OnSelectOriginalColor()
S::Void S::GUI::Dialogs::ColorSelection::OnSelectOriginalColor()
{
	Surface	*surface = dlgwnd->GetDrawSurface();
	Int	 hssize	 = Math::Round(205.0 * surface->GetSurfaceDPI() / 96.0);
	Rect	 vsrect	 = Rect(Point(xoffset + 1, yoffset + 1), Size(hssize, hssize));

	lasthue	 = acthue;
	lastsat	 = actsat;
	lastval	 = actval;

	acthue	 = color.ConvertTo(Color::HSV).GetRed();
	actsat	 = color.ConvertTo(Color::HSV).GetGreen();
	actval	 = color.ConvertTo(Color::HSV).GetBlue();
	actred	 = color.GetRed();
	actgreen = color.GetGreen();
	actblue	 = color.GetBlue();

	ColorDlgUpdateHexValue();

	hueedit->SetText(String::FromInt(acthue));
	satedit->SetText(String::FromInt(actsat));
	valedit->SetText(String::FromInt(actval));
	rededit->SetText(String::FromInt(actred));
	greenedit->SetText(String::FromInt(actgreen));
	blueedit->SetText(String::FromInt(actblue));
	hexedit->SetText(hexval);

	dlgwnd->SetUpdateRect(vsrect);
	ColorDlgPaintProc();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x120(%rbp)
movq 0x40648(%rax), %rdi
movq (%rdi), %rax
movq 0x40(%rax), %rax
callq *%rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5d470
cwtl
cvtsi2sd %eax, %xmm0
movsd 0x10ed44(%rip), %xmm1   # 0x187718
mulsd %xmm1, %xmm0
movsd 0x10eae0(%rip), %xmm1   # 0x1874c0
divsd %xmm1, %xmm0
callq 0x5a970
movq %rax, %rcx
movq -0x120(%rbp), %rax
movl %ecx, -0x14(%rbp)
movl 0x5f8(%rax), %esi
movl 0x5fc(%rax), %edx
incl %esi
incl %edx
leaq -0x2c(%rbp), %rdi
movq %rdi, -0x158(%rbp)
callq 0x5c2c0
movl -0x14(%rbp), %edx
leaq -0x34(%rbp), %rdi
movq %rdi, -0x150(%rbp)
movl %edx, %esi
callq 0x59260
movq -0x158(%rbp), %rsi
movq -0x150(%rbp), %rdx
leaq -0x24(%rbp), %rdi
callq 0x59ff0
movq -0x120(%rbp), %rsi
movl 0x614(%rsi), %eax
movl %eax, 0x608(%rsi)
movl 0x618(%rsi), %eax
movl %eax, 0x60c(%rsi)
movl 0x61c(%rsi), %eax
movl %eax, 0x610(%rsi)
addq $0x5e8, %rsi            # imm = 0x5E8
movq %rsi, -0x128(%rbp)
leaq -0x48(%rbp), %rdi
movq %rdi, -0x148(%rbp)
movl $0x2, %edx
movl %edx, -0x134(%rbp)
callq 0x5c5e0
movq -0x148(%rbp), %rdi
callq 0x59f20
movl -0x134(%rbp), %edx
movq -0x128(%rbp), %rsi
movl %eax, %ecx
movq -0x120(%rbp), %rax
movl %ecx, 0x614(%rax)
leaq -0x58(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x5c5e0
movq -0x140(%rbp), %rdi
callq 0x5d920
movl -0x134(%rbp), %edx
movq -0x128(%rbp), %rsi
movl %eax, %ecx
movq -0x120(%rbp), %rax
movl %ecx, 0x618(%rax)
leaq -0x68(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x5c5e0
movq -0x130(%rbp), %rdi
callq 0x5b650
movq -0x128(%rbp), %rdi
movl %eax, %ecx
movq -0x120(%rbp), %rax
movl %ecx, 0x61c(%rax)
callq 0x59f20
movq -0x128(%rbp), %rdi
movl %eax, %ecx
movq -0x120(%rbp), %rax
movl %ecx, 0x620(%rax)
callq 0x5d920
movq -0x128(%rbp), %rdi
movl %eax, %ecx
movq -0x120(%rbp), %rax
movl %ecx, 0x624(%rax)
callq 0x5b650
movq -0x120(%rbp), %rdi
movl %eax, 0x628(%rdi)
callq 0x5d650
movq -0x120(%rbp), %rax
movq 0x406e8(%rax), %rcx
movq %rcx, -0x118(%rbp)
movslq 0x614(%rax), %rsi
leaq -0x80(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x5b290
movq -0x118(%rbp), %rdi
movq -0x110(%rbp), %rsi
movq (%rdi), %rax
movq 0xa0(%rax), %rax
callq *%rax
jmp 0x78bbd
leaq -0x80(%rbp), %rdi
callq 0x5df00
movq -0x120(%rbp), %rax
movq 0x406f0(%rax), %rcx
movq %rcx, -0x168(%rbp)
movslq 0x618(%rax), %rsi
leaq -0xa8(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x5b290
movq -0x168(%rbp), %rdi
movq -0x160(%rbp), %rsi
movq (%rdi), %rax
movq 0xa0(%rax), %rax
callq *%rax
jmp 0x78c11
leaq -0xa8(%rbp), %rdi
callq 0x5df00
movq -0x120(%rbp), %rax
movq 0x406f8(%rax), %rcx
movq %rcx, -0x178(%rbp)
movslq 0x61c(%rax), %rsi
leaq -0xc0(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0x5b290
movq -0x178(%rbp), %rdi
movq -0x170(%rbp), %rsi
movq (%rdi), %rax
movq 0xa0(%rax), %rax
callq *%rax
jmp 0x78c68
leaq -0xc0(%rbp), %rdi
callq 0x5df00
movq -0x120(%rbp), %rax
movq 0x40700(%rax), %rcx
movq %rcx, -0x188(%rbp)
movslq 0x620(%rax), %rsi
leaq -0xd8(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x5b290
movq -0x188(%rbp), %rdi
movq -0x180(%rbp), %rsi
movq (%rdi), %rax
movq 0xa0(%rax), %rax
callq *%rax
jmp 0x78cbf
leaq -0xd8(%rbp), %rdi
callq 0x5df00
movq -0x120(%rbp), %rax
movq 0x40708(%rax), %rcx
movq %rcx, -0x198(%rbp)
movslq 0x624(%rax), %rsi
leaq -0xf0(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0x5b290
movq -0x198(%rbp), %rdi
movq -0x190(%rbp), %rsi
movq (%rdi), %rax
movq 0xa0(%rax), %rax
callq *%rax
jmp 0x78d16
leaq -0xf0(%rbp), %rdi
callq 0x5df00
movq -0x120(%rbp), %rax
movq 0x40710(%rax), %rcx
movq %rcx, -0x1a8(%rbp)
movslq 0x628(%rax), %rsi
leaq -0x108(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0x5b290
movq -0x1a8(%rbp), %rdi
movq -0x1a0(%rbp), %rsi
movq (%rdi), %rax
movq 0xa0(%rax), %rax
callq *%rax
jmp 0x78d6d
leaq -0x108(%rbp), %rdi
callq 0x5df00
movq -0x120(%rbp), %rsi
movq 0x40718(%rsi), %rdi
addq $0x40630, %rsi          # imm = 0x40630
movq (%rdi), %rax
callq *0xa0(%rax)
movq -0x120(%rbp), %rax
movq 0x40648(%rax), %rdi
leaq -0x24(%rbp), %rsi
callq 0x5acc0
movq -0x120(%rbp), %rdi
callq 0x5dee0
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x5df00
jmp 0x78e81
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x5df00
jmp 0x78e81
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x5df00
jmp 0x78e81
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x5df00
jmp 0x78e81
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x5df00
jmp 0x78e81
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x5df00
movq -0x88(%rbp), %rdi
callq 0x5b6b0
nopl (%rax)