// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x40648(%rdi), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
movq %rax, %rdi
callq 0x58930
movl %eax, %ebp
movl 0x5f8(%rbx), %r12d
movl 0x5fc(%rbx), %r13d
movl 0x614(%rbx), %eax
movl %eax, 0x608(%rbx)
movq 0x618(%rbx), %rax
movq %rax, 0x60c(%rbx)
leaq 0x5e8(%rbx), %r14
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
movl $0x2, %edx
callq 0x57d10
movzbl 0x8(%r15), %eax
movl %eax, 0x614(%rbx)
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
movl $0x2, %edx
callq 0x57d10
movzbl 0x9(%r15), %eax
movl %eax, 0x618(%rbx)
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
movl $0x2, %edx
callq 0x57d10
movzbl 0xa(%r15), %eax
movl %eax, 0x61c(%rbx)
movl 0x5f0(%rbx), %eax
movl $0xff, %ecx
movl %eax, %edx
andl %ecx, %edx
movl %edx, 0x620(%rbx)
movl %eax, %edx
shrl $0x8, %edx
andl %ecx, %edx
movl %edx, 0x624(%rbx)
shrl $0x10, %eax
andl %ecx, %eax
movl %eax, 0x628(%rbx)
movq %rbx, %rdi
callq 0x58aa0
movq 0x406e8(%rbx), %r14
movslq 0x614(%rbx), %rsi
movq %rsp, %r15
movq %r15, %rdi
callq 0x56cf0
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xa0(%rax)
movq %rsp, %rdi
callq 0x59200
movq 0x406f0(%rbx), %r14
movslq 0x618(%rbx), %rsi
movq %rsp, %r15
movq %r15, %rdi
callq 0x56cf0
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xa0(%rax)
movq %rsp, %rdi
callq 0x59200
movq 0x406f8(%rbx), %r14
movslq 0x61c(%rbx), %rsi
movq %rsp, %r15
movq %r15, %rdi
callq 0x56cf0
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xa0(%rax)
movq %rsp, %rdi
callq 0x59200
movq 0x40700(%rbx), %r14
movslq 0x620(%rbx), %rsi
movq %rsp, %r15
movq %r15, %rdi
callq 0x56cf0
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xa0(%rax)
movq %rsp, %rdi
callq 0x59200
movq 0x40708(%rbx), %r14
movslq 0x624(%rbx), %rsi
movq %rsp, %r15
movq %r15, %rdi
callq 0x56cf0
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xa0(%rax)
movq %rsp, %rdi
callq 0x59200
movq 0x40710(%rbx), %r14
movslq 0x628(%rbx), %rsi
movq %rsp, %r15
movq %r15, %rdi
callq 0x56cf0
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xa0(%rax)
movswl %bp, %eax
cvtsi2sd %eax, %xmm0
mulsd 0x8e813(%rip), %xmm0    # 0xf4760
divsd 0x8e59b(%rip), %xmm0    # 0xf44f0
xorpd %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
leaq 0x8e827(%rip), %rcx     # 0xf4790
addsd (%rcx,%rax,8), %xmm0
cvttsd2si %xmm0, %rax
movl %r13d, %ebp
incl %ebp
leal (%rax,%r13), %r14d
incl %r14d
movl %r12d, %r15d
incl %r15d
addl %eax, %r12d
incl %r12d
movq %rsp, %rdi
callq 0x59200
movq 0x40718(%rbx), %rdi
leaq 0x40630(%rbx), %rsi
movq (%rdi), %rax
callq *0xa0(%rax)
movq 0x40648(%rbx), %rax
movl %r15d, 0x5ec(%rax)
movl %ebp, 0x5f0(%rax)
movl %r12d, 0x5f4(%rax)
movl %r14d, 0x5f8(%rax)
movq %rbx, %rdi
callq 0x591e0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x65fed
jmp 0x65fed
jmp 0x65fed
jmp 0x65fed
jmp 0x65fed
movq %rax, %rbx
movq %rsp, %rdi
callq 0x59200
movq %rbx, %rdi
callq 0x57090