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

	if (((lasthue != acthue) || forcehupdate) && !preventhupdate)
	{
		/* Update hue picker.
		 */
		if (lasthue != -1)
		{
			Point	 p1(huexoffset							     + 1, yoffset + 1 + (Int) ((255.0 - lasthue) / (256.0 / hssize)));
			Point	 p2(huexoffset + Math::Round(16.0 * surface->GetSurfaceDPI() / 96.0) + 1, yoffset + 1 + (Int) ((255.0 - lasthue) / (256.0 / hssize)));

			surface->Line(p1, p2, Color(lasthue, 255, 255, Color::HSV).ConvertTo(Color::RGB));
		}

		Color	 ahrgb = Color(acthue, 255, 255, Color::HSV).ConvertTo(Color::RGB);

		for (Int x = huexoffset + 1; x < (huexoffset + Math::Round(16.0 * surface->GetSurfaceDPI() / 96.0) + 1); x++)
		{
			surface->SetPixel(Point(x, yoffset + 1 + (Int) ((255.0 - acthue) / (256.0 / hssize))), Color(255 - ahrgb.GetRed(), 255 - ahrgb.GetGreen(), 255 - ahrgb.GetBlue()));
		}

		lasthue = acthue;
	}

	if (((lastval != actval) || (lastsat != actsat) || forcevsupdate) && !preventvsupdate)
	{
		/* Update val/sat picker.
		 */
		surface->StartPaint(Rect(Point(xoffset + 1, yoffset + 1), Size(hssize, hssize)));

		if ((lastval != -1) && (lastsat != -1))
		{
			for (Int x = 0; x < hssize; x++)
			{
				Color	 rgb = Color(acthue, lastsat, (Int) (x * (256.0 / hssize)), Color::HSV).ConvertTo(Color::RGB);

				surface->SetPixel(Point(x + xoffset + 1, yoffset + 1 + (Int) ((255.0 - lastsat) / (256.0 / hssize))), rgb);
			}

			for (Int y = 0; y < hssize; y++)
			{
				Color	 rgb = Color(acthue, (Int) (255.0 - (y * (256.0 / hssize))), lastval, Color::HSV).ConvertTo(Color::RGB);

				surface->SetPixel(Point(xoffset + 1 + (Int) (lastval / (256.0 / hssize)), y + yoffset + 1), rgb);
			}
		}

		for (Int x = 0; x < hssize; x++)
		{
			Color	 rgb = Color(acthue, actsat, (Int) (x * (256.0 / hssize)), Color::HSV).ConvertTo(Color::RGB);

			surface->SetPixel(Point(x + xoffset + 1, yoffset + 1 + (Int) ((255.0 - actsat) / (256.0 / hssize))), Color(255 - Color(rgb).GetRed(), 255 - Color(rgb).GetGreen(), 255 - Color(rgb).GetBlue()));
		}

		for (Int y = 0; y < hssize; y++)
		{
			Color	 rgb = Color(acthue, (Int) (255.0 - (y * (256.0 / hssize))), actval, Color::HSV).ConvertTo(Color::RGB);

			surface->SetPixel(Point(xoffset + 1 + (Int) (actval / (256.0 / hssize)), y + yoffset + 1), Color(255 - Color(rgb).GetRed(), 255 - Color(rgb).GetGreen(), 255 - Color(rgb).GetBlue()));
		}

		surface->EndPaint();

		lastval = actval;
		lastsat = actsat;
	}

	ncarea->SetColor(Color(acthue, actsat, actval, Color::HSV).ConvertTo(Color::RGB));

	forcehupdate	= False;
	preventhupdate	= False;
	forcevsupdate	= False;
	preventvsupdate	= False;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x290, %rsp            # imm = 0x290
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x218(%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 0x10ae77(%rip), %xmm0   # 0x187718
mulsd %xmm1, %xmm0
movsd 0x10ac13(%rip), %xmm1   # 0x1874c0
divsd %xmm1, %xmm0
callq 0x5a970
movl %eax, -0x14(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0x210(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5d470
cwtl
cvtsi2sd %eax, %xmm1
movsd 0x10ae46(%rip), %xmm0   # 0x187720
mulsd %xmm1, %xmm0
movsd 0x10abda(%rip), %xmm1   # 0x1874c0
divsd %xmm1, %xmm0
callq 0x5a970
movq -0x218(%rbp), %rcx
movq %rax, %rdx
movq -0x210(%rbp), %rax
addq %rdx, %rax
movl %eax, -0x18(%rbp)
movl 0x608(%rcx), %eax
cmpl 0x614(%rcx), %eax
jne 0x7c928
movq -0x218(%rbp), %rax
testb $0x1, 0x602(%rax)
je 0x7cc0a
movq -0x218(%rbp), %rax
testb $0x1, 0x604(%rax)
jne 0x7cc0a
movq -0x218(%rbp), %rax
cmpl $-0x1, 0x608(%rax)
je 0x7ca84
movq -0x218(%rbp), %rax
movl -0x18(%rbp), %esi
addl $0x1, %esi
movl 0x5fc(%rax), %edx
addl $0x1, %edx
cvtsi2sdl 0x608(%rax), %xmm1
movsd 0x10a9da(%rip), %xmm0   # 0x187350
subsd %xmm1, %xmm0
cvtsi2sdl -0x14(%rbp), %xmm2
movsd 0x10ada1(%rip), %xmm1   # 0x187728
divsd %xmm2, %xmm1
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
addl %eax, %edx
leaq -0x20(%rbp), %rdi
callq 0x5c2c0
movslq -0x18(%rbp), %rax
movq %rax, -0x228(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5d470
cwtl
cvtsi2sd %eax, %xmm1
movsd 0x10ad71(%rip), %xmm0   # 0x187730
mulsd %xmm1, %xmm0
movsd 0x10aaf5(%rip), %xmm1   # 0x1874c0
divsd %xmm1, %xmm0
callq 0x5a970
movq -0x228(%rbp), %rcx
movq %rax, %rdx
movq -0x218(%rbp), %rax
addq %rdx, %rcx
addq $0x1, %rcx
movl %ecx, %esi
movl 0x5fc(%rax), %edx
addl $0x1, %edx
cvtsi2sdl 0x608(%rax), %xmm1
movsd 0x10a949(%rip), %xmm0   # 0x187350
subsd %xmm1, %xmm0
cvtsi2sdl -0x14(%rbp), %xmm2
movsd 0x10ad10(%rip), %xmm1   # 0x187728
divsd %xmm2, %xmm1
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
addl %eax, %edx
leaq -0x28(%rbp), %rdi
callq 0x5c2c0
movq -0x218(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, -0x220(%rbp)
movl 0x608(%rax), %esi
leaq -0x48(%rbp), %rdi
movl $0xff, %ecx
movl $0x2, %r8d
movl %ecx, %edx
callq 0x5a6b0
leaq -0x38(%rbp), %rdi
leaq -0x48(%rbp), %rsi
xorl %edx, %edx
callq 0x5c5e0
movq -0x220(%rbp), %rdi
leaq -0x20(%rbp), %rsi
leaq -0x28(%rbp), %rdx
leaq -0x38(%rbp), %rcx
callq 0x5cce0
movq -0x218(%rbp), %rax
movl 0x614(%rax), %esi
leaq -0x68(%rbp), %rdi
movl $0xff, %ecx
movl $0x2, %r8d
movl %ecx, %edx
callq 0x5a6b0
leaq -0x58(%rbp), %rdi
leaq -0x68(%rbp), %rsi
xorl %edx, %edx
callq 0x5c5e0
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
movslq -0x6c(%rbp), %rax
movq %rax, -0x230(%rbp)
movslq -0x18(%rbp), %rax
movq %rax, -0x238(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5d470
cwtl
cvtsi2sd %eax, %xmm1
movsd 0x10ac45(%rip), %xmm0   # 0x187730
mulsd %xmm1, %xmm0
movsd 0x10a9c9(%rip), %xmm1   # 0x1874c0
divsd %xmm1, %xmm0
callq 0x5a970
movq -0x238(%rbp), %rcx
movq %rax, %rdx
movq -0x230(%rbp), %rax
addq %rdx, %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jge 0x7cbf7
movq -0x218(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, -0x240(%rbp)
movl -0x6c(%rbp), %esi
movl 0x5fc(%rax), %edx
addl $0x1, %edx
cvtsi2sdl 0x614(%rax), %xmm1
movsd 0x10a801(%rip), %xmm0   # 0x187350
subsd %xmm1, %xmm0
cvtsi2sdl -0x14(%rbp), %xmm2
movsd 0x10abc8(%rip), %xmm1   # 0x187728
divsd %xmm2, %xmm1
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
addl %eax, %edx
leaq -0x74(%rbp), %rdi
callq 0x5c2c0
leaq -0x58(%rbp), %rdi
callq 0x59f20
movl %eax, %ecx
movl $0xff, %eax
subl %ecx, %eax
movl %eax, -0x248(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x5d920
movl %eax, %ecx
movl $0xff, %eax
subl %ecx, %eax
movl %eax, -0x244(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x5b650
movl -0x248(%rbp), %esi
movl -0x244(%rbp), %edx
movl $0xff, %ecx
subl %eax, %ecx
leaq -0x88(%rbp), %rdi
xorl %r8d, %r8d
callq 0x5a6b0
movq -0x240(%rbp), %rdi
leaq -0x74(%rbp), %rsi
leaq -0x88(%rbp), %rdx
callq 0x59140
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x7cabf
movq -0x218(%rbp), %rax
movl 0x614(%rax), %ecx
movl %ecx, 0x608(%rax)
movq -0x218(%rbp), %rcx
movl 0x610(%rcx), %eax
cmpl 0x61c(%rcx), %eax
jne 0x7cc48
movq -0x218(%rbp), %rcx
movl 0x60c(%rcx), %eax
cmpl 0x618(%rcx), %eax
jne 0x7cc48
movq -0x218(%rbp), %rax
testb $0x1, 0x603(%rax)
je 0x7d2a1
movq -0x218(%rbp), %rax
testb $0x1, 0x605(%rax)
jne 0x7d2a1
movq -0x218(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, -0x250(%rbp)
movl 0x5f8(%rax), %esi
addl $0x1, %esi
movl 0x5fc(%rax), %edx
addl $0x1, %edx
leaq -0xa0(%rbp), %rdi
callq 0x5c2c0
movl -0x14(%rbp), %esi
movl -0x14(%rbp), %edx
leaq -0xa8(%rbp), %rdi
callq 0x59260
leaq -0x98(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
callq 0x59ff0
movq -0x250(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x591b0
movq -0x218(%rbp), %rax
cmpl $-0x1, 0x610(%rax)
je 0x7cf1a
movq -0x218(%rbp), %rax
cmpl $-0x1, 0x60c(%rax)
je 0x7cf1a
movl $0x0, -0xac(%rbp)
movl -0xac(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x7cdfa
movq -0x218(%rbp), %rax
movl 0x614(%rax), %esi
movl 0x60c(%rax), %edx
cvtsi2sdl -0xac(%rbp), %xmm0
cvtsi2sdl -0x14(%rbp), %xmm2
movsd 0x10a9f4(%rip), %xmm1   # 0x187728
divsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
leaq -0xd0(%rbp), %rdi
movl $0x2, %r8d
callq 0x5a6b0
leaq -0xc0(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
xorl %edx, %edx
callq 0x5c5e0
movq -0x218(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, -0x258(%rbp)
movl -0xac(%rbp), %esi
addl 0x5f8(%rax), %esi
addl $0x1, %esi
movl 0x5fc(%rax), %edx
addl $0x1, %edx
cvtsi2sdl 0x60c(%rax), %xmm1
movsd 0x10a5af(%rip), %xmm0   # 0x187350
subsd %xmm1, %xmm0
cvtsi2sdl -0x14(%rbp), %xmm2
movsd 0x10a976(%rip), %xmm1   # 0x187728
divsd %xmm2, %xmm1
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
addl %eax, %edx
leaq -0xd8(%rbp), %rdi
callq 0x5c2c0
movq -0x258(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
callq 0x59140
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
jmp 0x7ccfd
movl $0x0, -0xdc(%rbp)
movl -0xdc(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x7cf18
movq -0x218(%rbp), %rax
movl 0x614(%rax), %esi
cvtsi2sdl -0xdc(%rbp), %xmm0
cvtsi2sdl -0x14(%rbp), %xmm2
movsd 0x10a8f3(%rip), %xmm1   # 0x187728
divsd %xmm2, %xmm1
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
mulsd %xmm1, %xmm0
movsd 0x10a4f4(%rip), %xmm1   # 0x187350
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %edx
movl 0x610(%rax), %ecx
leaq -0x100(%rbp), %rdi
movl $0x2, %r8d
callq 0x5a6b0
leaq -0xf0(%rbp), %rdi
leaq -0x100(%rbp), %rsi
xorl %edx, %edx
callq 0x5c5e0
movq -0x218(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, -0x260(%rbp)
movl 0x5f8(%rax), %esi
addl $0x1, %esi
cvtsi2sdl 0x610(%rax), %xmm0
cvtsi2sdl -0x14(%rbp), %xmm2
movsd 0x10a867(%rip), %xmm1   # 0x187728
divsd %xmm2, %xmm1
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
addl %ecx, %esi
movl -0xdc(%rbp), %edx
addl 0x5fc(%rax), %edx
addl $0x1, %edx
leaq -0x108(%rbp), %rdi
callq 0x5c2c0
movq -0x260(%rbp), %rdi
leaq -0x108(%rbp), %rsi
leaq -0xf0(%rbp), %rdx
callq 0x59140
movl -0xdc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xdc(%rbp)
jmp 0x7ce04
jmp 0x7cf1a
movl $0x0, -0x10c(%rbp)
movl -0x10c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x7d0be
movq -0x218(%rbp), %rax
movl 0x614(%rax), %esi
movl 0x618(%rax), %edx
cvtsi2sdl -0x10c(%rbp), %xmm0
cvtsi2sdl -0x14(%rbp), %xmm2
movsd 0x10a7cd(%rip), %xmm1   # 0x187728
divsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
leaq -0x130(%rbp), %rdi
movl $0x2, %r8d
callq 0x5a6b0
leaq -0x120(%rbp), %rdi
leaq -0x130(%rbp), %rsi
xorl %edx, %edx
callq 0x5c5e0
movq -0x218(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, -0x268(%rbp)
movl -0x10c(%rbp), %esi
addl 0x5f8(%rax), %esi
addl $0x1, %esi
movl 0x5fc(%rax), %edx
addl $0x1, %edx
cvtsi2sdl 0x618(%rax), %xmm1
movsd 0x10a388(%rip), %xmm0   # 0x187350
subsd %xmm1, %xmm0
cvtsi2sdl -0x14(%rbp), %xmm2
movsd 0x10a74f(%rip), %xmm1   # 0x187728
divsd %xmm2, %xmm1
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
addl %eax, %edx
leaq -0x138(%rbp), %rdi
callq 0x5c2c0
leaq -0x158(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x5c720
leaq -0x158(%rbp), %rdi
callq 0x59f20
movl %eax, %ecx
movl $0xff, %eax
subl %ecx, %eax
movl %eax, -0x270(%rbp)
leaq -0x168(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x5c720
leaq -0x168(%rbp), %rdi
callq 0x5d920
movl %eax, %ecx
movl $0xff, %eax
subl %ecx, %eax
movl %eax, -0x26c(%rbp)
leaq -0x178(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x5c720
leaq -0x178(%rbp), %rdi
callq 0x5b650
movl -0x270(%rbp), %esi
movl -0x26c(%rbp), %edx
movl $0xff, %ecx
subl %eax, %ecx
leaq -0x148(%rbp), %rdi
xorl %r8d, %r8d
callq 0x5a6b0
movq -0x268(%rbp), %rdi
leaq -0x138(%rbp), %rsi
leaq -0x148(%rbp), %rdx
callq 0x59140
movl -0x10c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10c(%rbp)
jmp 0x7cf24
movl $0x0, -0x17c(%rbp)
movl -0x17c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x7d279
movq -0x218(%rbp), %rax
movl 0x614(%rax), %esi
cvtsi2sdl -0x17c(%rbp), %xmm0
cvtsi2sdl -0x14(%rbp), %xmm2
movsd 0x10a62f(%rip), %xmm1   # 0x187728
divsd %xmm2, %xmm1
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
mulsd %xmm1, %xmm0
movsd 0x10a230(%rip), %xmm1   # 0x187350
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %edx
movl 0x61c(%rax), %ecx
leaq -0x1a0(%rbp), %rdi
movl $0x2, %r8d
callq 0x5a6b0
leaq -0x190(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
xorl %edx, %edx
callq 0x5c5e0
movq -0x218(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, -0x278(%rbp)
movl 0x5f8(%rax), %esi
addl $0x1, %esi
cvtsi2sdl 0x61c(%rax), %xmm0
cvtsi2sdl -0x14(%rbp), %xmm2
movsd 0x10a5a3(%rip), %xmm1   # 0x187728
divsd %xmm2, %xmm1
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
addl %ecx, %esi
movl -0x17c(%rbp), %edx
addl 0x5fc(%rax), %edx
addl $0x1, %edx
leaq -0x1a8(%rbp), %rdi
callq 0x5c2c0
leaq -0x1c8(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x5c720
leaq -0x1c8(%rbp), %rdi
callq 0x59f20
movl %eax, %ecx
movl $0xff, %eax
subl %ecx, %eax
movl %eax, -0x280(%rbp)
leaq -0x1d8(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x5c720
leaq -0x1d8(%rbp), %rdi
callq 0x5d920
movl %eax, %ecx
movl $0xff, %eax
subl %ecx, %eax
movl %eax, -0x27c(%rbp)
leaq -0x1e8(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x5c720
leaq -0x1e8(%rbp), %rdi
callq 0x5b650
movl -0x280(%rbp), %esi
movl -0x27c(%rbp), %edx
movl $0xff, %ecx
subl %eax, %ecx
leaq -0x1b8(%rbp), %rdi
xorl %r8d, %r8d
callq 0x5a6b0
movq -0x278(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
leaq -0x1b8(%rbp), %rdx
callq 0x59140
movl -0x17c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x17c(%rbp)
jmp 0x7d0c8
movq -0x10(%rbp), %rdi
callq 0x5d270
movq -0x218(%rbp), %rax
movl 0x61c(%rax), %ecx
movl %ecx, 0x610(%rax)
movl 0x618(%rax), %ecx
movl %ecx, 0x60c(%rax)
movq -0x218(%rbp), %rax
movq 0x40670(%rax), %rcx
movq %rcx, -0x288(%rbp)
movl 0x614(%rax), %esi
movl 0x618(%rax), %edx
movl 0x61c(%rax), %ecx
leaq -0x208(%rbp), %rdi
movl $0x2, %r8d
callq 0x5a6b0
leaq -0x1f8(%rbp), %rdi
leaq -0x208(%rbp), %rsi
xorl %edx, %edx
callq 0x5c5e0
movq -0x288(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x5c6d0
movq -0x218(%rbp), %rax
movb $0x0, 0x602(%rax)
movb $0x0, 0x604(%rax)
movb $0x0, 0x603(%rax)
movb $0x0, 0x605(%rax)
addq $0x290, %rsp            # imm = 0x290
popq %rbp
retq
nop