// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/dialogs/colordlg.cpp
// Function: smooth::GUI::Dialogs::ColorSelection::ColorDlgSatSlider()
void S::GUI::Dialogs::ColorSelection::ColorDlgSatSlider()
{
	Surface	*surface = dlgwnd->GetDrawSurface();
	Int	 hssize	 = Math::Round(205.0 * surface->GetSurfaceDPI() / 96.0);

	ColorDlgUpdatePickers();

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

	if (updatetext)
	{
		satedit->SetText(String::FromInt(actsat));
		rededit->SetText(String::FromInt(actred));
		greenedit->SetText(String::FromInt(actgreen));
		blueedit->SetText(String::FromInt(actblue));
	}

	if (updatehextext)
	{
		ColorDlgUpdateHexValue();

		hexedit->SetText(hexval);
	}

	updatehextext = True;
	updatetext    = True;

	dlgwnd->SetUpdateRect(Rect(Point(xoffset + 1, yoffset + 1), Size(hssize, hssize)));
	ColorDlgPaintProc();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x110(%rbp)
movq 0x40648(%rax), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5d470
cwtl
cvtsi2sd %eax, %xmm1
movsd 0x10e437(%rip), %xmm0   # 0x187718
mulsd %xmm1, %xmm0
movsd 0x10e1d3(%rip), %xmm1   # 0x1874c0
divsd %xmm1, %xmm0
callq 0x5a970
movq -0x110(%rbp), %rdi
movl %eax, -0x14(%rbp)
callq 0x5cdb0
movq -0x110(%rbp), %rax
movl 0x614(%rax), %esi
movl 0x618(%rax), %edx
movl 0x61c(%rax), %ecx
leaq -0x38(%rbp), %rdi
movl $0x2, %r8d
callq 0x5a6b0
leaq -0x28(%rbp), %rdi
leaq -0x38(%rbp), %rsi
xorl %edx, %edx
callq 0x5c5e0
leaq -0x28(%rbp), %rdi
callq 0x59f20
movl %eax, %ecx
movq -0x110(%rbp), %rax
movl %ecx, 0x620(%rax)
movl 0x614(%rax), %esi
movl 0x618(%rax), %edx
movl 0x61c(%rax), %ecx
leaq -0x58(%rbp), %rdi
movl $0x2, %r8d
callq 0x5a6b0
leaq -0x48(%rbp), %rdi
leaq -0x58(%rbp), %rsi
xorl %edx, %edx
callq 0x5c5e0
leaq -0x48(%rbp), %rdi
callq 0x5d920
movl %eax, %ecx
movq -0x110(%rbp), %rax
movl %ecx, 0x624(%rax)
movl 0x614(%rax), %esi
movl 0x618(%rax), %edx
movl 0x61c(%rax), %ecx
leaq -0x78(%rbp), %rdi
movl $0x2, %r8d
callq 0x5a6b0
leaq -0x68(%rbp), %rdi
leaq -0x78(%rbp), %rsi
xorl %edx, %edx
callq 0x5c5e0
leaq -0x68(%rbp), %rdi
callq 0x5b650
movl %eax, %ecx
movq -0x110(%rbp), %rax
movl %ecx, 0x628(%rax)
testb $0x1, 0x606(%rax)
je 0x795de
movq -0x110(%rbp), %rax
movq 0x406f0(%rax), %rcx
movq %rcx, -0x120(%rbp)
movslq 0x618(%rax), %rsi
leaq -0x90(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0x5b290
movq -0x120(%rbp), %rdi
movq -0x118(%rbp), %rsi
movq (%rdi), %rax
movq 0xa0(%rax), %rax
callq *%rax
jmp 0x7943c
leaq -0x90(%rbp), %rdi
callq 0x5df00
movq -0x110(%rbp), %rax
movq 0x40700(%rax), %rcx
movq %rcx, -0x130(%rbp)
movslq 0x620(%rax), %rsi
leaq -0xb8(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x5b290
movq -0x130(%rbp), %rdi
movq -0x128(%rbp), %rsi
movq (%rdi), %rax
movq 0xa0(%rax), %rax
callq *%rax
jmp 0x79493
leaq -0xb8(%rbp), %rdi
callq 0x5df00
movq -0x110(%rbp), %rax
movq 0x40708(%rax), %rcx
movq %rcx, -0x140(%rbp)
movslq 0x624(%rax), %rsi
leaq -0xd0(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x5b290
movq -0x140(%rbp), %rdi
movq -0x138(%rbp), %rsi
movq (%rdi), %rax
movq 0xa0(%rax), %rax
callq *%rax
jmp 0x794ea
leaq -0xd0(%rbp), %rdi
callq 0x5df00
movq -0x110(%rbp), %rax
movq 0x40710(%rax), %rcx
movq %rcx, -0x150(%rbp)
movslq 0x628(%rax), %rsi
leaq -0xe8(%rbp), %rdi
movq %rdi, -0x148(%rbp)
callq 0x5b290
movq -0x150(%rbp), %rdi
movq -0x148(%rbp), %rsi
movq (%rdi), %rax
movq 0xa0(%rax), %rax
callq *%rax
jmp 0x79541
leaq -0xe8(%rbp), %rdi
callq 0x5df00
jmp 0x795de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x5df00
jmp 0x796ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x5df00
jmp 0x796ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x5df00
jmp 0x796ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x5df00
jmp 0x796ad
movq -0x110(%rbp), %rax
testb $0x1, 0x607(%rax)
je 0x79618
movq -0x110(%rbp), %rdi
callq 0x5d650
movq -0x110(%rbp), %rsi
movq 0x40718(%rsi), %rdi
addq $0x40630, %rsi          # imm = 0x40630
movq (%rdi), %rax
callq *0xa0(%rax)
movq -0x110(%rbp), %rax
movb $0x1, 0x607(%rax)
movb $0x1, 0x606(%rax)
movq 0x40648(%rax), %rcx
movq %rcx, -0x158(%rbp)
movl 0x5f8(%rax), %esi
addl $0x1, %esi
movl 0x5fc(%rax), %edx
addl $0x1, %edx
leaq -0x100(%rbp), %rdi
callq 0x5c2c0
movl -0x14(%rbp), %esi
movl -0x14(%rbp), %edx
leaq -0x108(%rbp), %rdi
callq 0x59260
leaq -0xf8(%rbp), %rdi
leaq -0x100(%rbp), %rsi
leaq -0x108(%rbp), %rdx
callq 0x59ff0
movq -0x158(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x5acc0
movq -0x110(%rbp), %rdi
callq 0x5dee0
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
movq -0x98(%rbp), %rdi
callq 0x5b6b0
nopl (%rax)