// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movq 0x40648(%rdi), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
movq %rax, %rdi
callq 0x59c60
movl %eax, %ebp
movq %rbx, %rdi
callq 0x59640
movl 0x618(%rbx), %eax
movl 0x61c(%rbx), %ecx
shll $0x10, %ecx
shll $0x8, %eax
orl 0x614(%rbx), %eax
orl %ecx, %eax
cltq
leaq 0x20(%rsp), %r14
movq %rax, 0x8(%r14)
pushq $0x2
popq %r12
movl %r12d, (%r14)
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x58f90
movzbl 0x8(%r15), %eax
movl %eax, 0x620(%rbx)
movl 0x618(%rbx), %eax
movl 0x61c(%rbx), %ecx
shll $0x10, %ecx
shll $0x8, %eax
orl 0x614(%rbx), %eax
orl %ecx, %eax
cltq
movq %rax, 0x8(%r14)
movl %r12d, (%r14)
leaq 0x8(%rsp), %r14
leaq 0x20(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x58f90
movzbl 0x9(%r14), %eax
movl %eax, 0x624(%rbx)
movl 0x618(%rbx), %eax
movl 0x61c(%rbx), %ecx
shll $0x10, %ecx
shll $0x8, %eax
orl 0x614(%rbx), %eax
orl %ecx, %eax
cltq
movq %rax, 0x8(%r15)
movl %r12d, (%r15)
leaq 0x8(%rsp), %r14
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x58f90
movzbl 0xa(%r14), %eax
movl %eax, 0x628(%rbx)
cmpb $0x1, 0x606(%rbx)
jne 0x66f0b
movq 0x406f0(%rbx), %r14
movslq 0x618(%rbx), %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x57e80
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xa0(%rax)
leaq 0x8(%rsp), %rdi
callq 0x5a588
movq 0x40700(%rbx), %r14
movslq 0x620(%rbx), %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x57e80
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xa0(%rax)
leaq 0x8(%rsp), %rdi
callq 0x5a588
movq 0x40708(%rbx), %r14
movslq 0x624(%rbx), %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x57e80
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xa0(%rax)
leaq 0x8(%rsp), %rdi
callq 0x5a588
movq 0x40710(%rbx), %r14
movslq 0x628(%rbx), %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x57e80
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xa0(%rax)
leaq 0x8(%rsp), %rdi
callq 0x5a588
cmpb $0x1, 0x607(%rbx)
jne 0x66f33
movq %rbx, %rdi
callq 0x59de0
movq 0x40718(%rbx), %rdi
leaq 0x40630(%rbx), %rsi
movq (%rdi), %rax
callq *0xa0(%rax)
movswl %bp, %eax
cvtsi2sd %eax, %xmm0
mulsd 0x7c83e(%rip), %xmm0    # 0xe3780
divsd 0x7c5c6(%rip), %xmm0    # 0xe3510
xorpd %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
leaq 0x7c852(%rip), %rcx     # 0xe37b0
addsd (%rcx,%rax,8), %xmm0
cvttsd2si %xmm0, %rax
movw $0x101, 0x606(%rbx)     # imm = 0x101
movq 0x40648(%rbx), %rcx
movl 0x5f8(%rbx), %edx
movl 0x5fc(%rbx), %esi
leal (%rdx,%rax), %edi
incl %edi
incl %edx
addl %esi, %eax
incl %eax
incl %esi
movl %edx, 0x5ec(%rcx)
movl %esi, 0x5f0(%rcx)
movl %edi, 0x5f4(%rcx)
movl %eax, 0x5f8(%rcx)
movq %rbx, %rdi
callq 0x5a568
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x66fc4
jmp 0x66fc4
jmp 0x66fc4
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5a588
movq %rbx, %rdi
callq 0x58260
nop