// File: /workspace/github_c_makefile_star2_O0/arkanis[P]process-map/./deps/raygui.h
// Function: GuiColorPanelEx
Color GuiColorPanelEx(Rectangle bounds, Color color, float hue)
{
    GuiControlState state = guiState;
    Vector2 pickerSelector = { 0 };

    Vector3 vcolor = { (float)color.r/255.0f, (float)color.g/255.0f, (float)color.b/255.0f };
    Vector3 hsv = ConvertRGBtoHSV(vcolor);

    pickerSelector.x = bounds.x + (float)hsv.y*bounds.width;            // HSV: Saturation
    pickerSelector.y = bounds.y + (1.0f - (float)hsv.z)*bounds.height;  // HSV: Value

    Vector3 maxHue = { hue >= 0.0f ? hue : hsv.x, 1.0f, 1.0f };
    Vector3 rgbHue = ConvertHSVtoRGB(maxHue);
    Color maxHueCol = { (unsigned char)(255.0f*rgbHue.x),
                      (unsigned char)(255.0f*rgbHue.y),
                      (unsigned char)(255.0f*rgbHue.z), 255 };

    const Color colWhite = { 255, 255, 255, 255 };
    const Color colBlack = { 0, 0, 0, 255 };

    // Update control
    //--------------------------------------------------------------------
    if ((state != GUI_STATE_DISABLED) && !guiLocked)
    {
        Vector2 mousePoint = GetMousePosition();

        if (CheckCollisionPointRec(mousePoint, bounds))
        {
            if (IsMouseButtonDown(MOUSE_LEFT_BUTTON))
            {
                state = GUI_STATE_PRESSED;
                pickerSelector = mousePoint;

                // Calculate color from picker
                Vector2 colorPick = { pickerSelector.x - bounds.x, pickerSelector.y - bounds.y };

                colorPick.x /= (float)bounds.width;     // Get normalized value on x
                colorPick.y /= (float)bounds.height;    // Get normalized value on y

                hsv.y = colorPick.x;
                hsv.z = 1.0f - colorPick.y;

                Vector3 rgb = ConvertHSVtoRGB(hsv);

                // NOTE: Vector3ToColor() only available on raylib 1.8.1
                color = RAYGUI_CLITERAL(Color){ (unsigned char)(255.0f*rgb.x),
                                 (unsigned char)(255.0f*rgb.y),
                                 (unsigned char)(255.0f*rgb.z),
                                 (unsigned char)(255.0f*(float)color.a/255.0f) };

            }
            else state = GUI_STATE_FOCUSED;
        }
    }
    //--------------------------------------------------------------------

    // Draw control
    //--------------------------------------------------------------------
    if (state != GUI_STATE_DISABLED)
    {
        DrawRectangleGradientEx(bounds, Fade(colWhite, guiAlpha), Fade(colWhite, guiAlpha), Fade(maxHueCol, guiAlpha), Fade(maxHueCol, guiAlpha));
        DrawRectangleGradientEx(bounds, Fade(colBlack, 0), Fade(colBlack, guiAlpha), Fade(colBlack, guiAlpha), Fade(colBlack, 0));

        // Draw color picker: selector
        Rectangle selector = { pickerSelector.x - GuiGetStyle(COLORPICKER, COLOR_SELECTOR_SIZE)/2, pickerSelector.y - GuiGetStyle(COLORPICKER, COLOR_SELECTOR_SIZE)/2, (float)GuiGetStyle(COLORPICKER, COLOR_SELECTOR_SIZE), (float)GuiGetStyle(COLORPICKER, COLOR_SELECTOR_SIZE) };
        GuiDrawRectangle(selector, 0, BLANK, Fade(colWhite, guiAlpha));
    }
    else
    {
        DrawRectangleGradientEx(bounds, Fade(Fade(GetColor(GuiGetStyle(COLORPICKER, BASE_COLOR_DISABLED)), 0.1f), guiAlpha), Fade(Fade(colBlack, 0.6f), guiAlpha), Fade(Fade(colBlack, 0.6f), guiAlpha), Fade(Fade(GetColor(GuiGetStyle(COLORPICKER, BORDER_COLOR_DISABLED)), 0.6f), guiAlpha));
    }

    GuiDrawRectangle(bounds, 1, Fade(GetColor(GuiGetStyle(COLORPICKER, BORDER + state*3)), guiAlpha), BLANK);
    //--------------------------------------------------------------------

    return color;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movlpd %xmm0, -0x14(%rbp)
movlpd %xmm1, -0xc(%rbp)
movl %edi, -0x18(%rbp)
movss %xmm2, -0x1c(%rbp)
movl 0xba8fd(%rip), %eax     # 0xca0e0
movl %eax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movzbl -0x18(%rbp), %eax
cvtsi2ss %eax, %xmm0
movss 0x7c832(%rip), %xmm1    # 0x8c030
divss %xmm1, %xmm0
movss %xmm0, -0x34(%rbp)
movzbl -0x17(%rbp), %eax
cvtsi2ss %eax, %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x30(%rbp)
movzbl -0x16(%rbp), %eax
cvtsi2ss %eax, %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x48(%rbp)
movq -0x34(%rbp), %rax
movq %rax, -0x50(%rbp)
movsd -0x50(%rbp), %xmm0
movss -0x48(%rbp), %xmm1
callq 0xff50
movss %xmm1, -0x58(%rbp)
movlpd %xmm0, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x38(%rbp)
movss -0x14(%rbp), %xmm1
movss -0x3c(%rbp), %xmm0
movss -0xc(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x28(%rbp)
movss -0x10(%rbp), %xmm1
movss 0x7c77d(%rip), %xmm0    # 0x8c004
subss -0x38(%rbp), %xmm0
movss -0x8(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x24(%rbp)
leaq -0x6c(%rbp), %rax
movq %rax, -0x158(%rbp)
movss -0x1c(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0xf8c5
movss -0x1c(%rbp), %xmm0
movss %xmm0, -0x15c(%rbp)
jmp 0xf8d2
movss -0x40(%rbp), %xmm0
movss %xmm0, -0x15c(%rbp)
movq -0x158(%rbp), %rax
movss -0x15c(%rbp), %xmm0
movss %xmm0, (%rax)
movl $0x3f800000, -0x68(%rbp) # imm = 0x3F800000
movl $0x3f800000, -0x64(%rbp) # imm = 0x3F800000
movl -0x64(%rbp), %eax
movl %eax, -0x80(%rbp)
movq -0x6c(%rbp), %rax
movq %rax, -0x88(%rbp)
movsd -0x88(%rbp), %xmm0
movss -0x80(%rbp), %xmm1
callq 0x10180
movss %xmm1, -0x90(%rbp)
movlpd %xmm0, -0x98(%rbp)
movl -0x90(%rbp), %eax
movl %eax, -0x70(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x78(%rbp)
movss -0x78(%rbp), %xmm0
movss 0x7c6e9(%rip), %xmm1    # 0x8c030
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movb %al, -0x9c(%rbp)
movss -0x74(%rbp), %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movb %al, -0x9b(%rbp)
movss -0x70(%rbp), %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movb %al, -0x9a(%rbp)
movb $-0x1, -0x99(%rbp)
movl 0x7c700(%rip), %eax     # 0x8c088
movl %eax, -0xa0(%rbp)
movl 0x7c6f8(%rip), %eax     # 0x8c08c
movl %eax, -0xa4(%rbp)
cmpl $0x3, -0x20(%rbp)
je 0xfb51
testb $0x1, 0xba739(%rip)     # 0xca0e4
jne 0xfb51
callq 0x2dd60
movlpd %xmm0, -0xac(%rbp)
movsd -0xac(%rbp), %xmm0
movsd -0x14(%rbp), %xmm1
movsd -0xc(%rbp), %xmm2
callq 0x3e640
testb $0x1, %al
jne 0xf9de
jmp 0xfb4f
xorl %edi, %edi
callq 0x2ddd0
testb $0x1, %al
jne 0xf9ee
jmp 0xfb46
movl $0x2, -0x20(%rbp)
movq -0xac(%rbp), %rax
movq %rax, -0x28(%rbp)
movss -0x28(%rbp), %xmm0
movss -0x14(%rbp), %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0xb4(%rbp)
movss -0x24(%rbp), %xmm0
movss -0x10(%rbp), %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0xb0(%rbp)
movss -0xc(%rbp), %xmm1
movss -0xb4(%rbp), %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0xb4(%rbp)
movss -0x8(%rbp), %xmm1
movss -0xb0(%rbp), %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0xb0(%rbp)
movss -0xb4(%rbp), %xmm0
movss %xmm0, -0x3c(%rbp)
movss -0xb0(%rbp), %xmm1
movss 0x7c589(%rip), %xmm0    # 0x8c004
subss %xmm1, %xmm0
movss %xmm0, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0xc8(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0xd0(%rbp)
movsd -0xd0(%rbp), %xmm0
movss -0xc8(%rbp), %xmm1
callq 0x10180
movss %xmm1, -0xd8(%rbp)
movlpd %xmm0, -0xe0(%rbp)
movl -0xd8(%rbp), %eax
movl %eax, -0xb8(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0xc0(%rbp)
movss -0xc0(%rbp), %xmm0
movss 0x7c549(%rip), %xmm1    # 0x8c030
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movb %al, -0xe4(%rbp)
movss -0xbc(%rbp), %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movb %al, -0xe3(%rbp)
movss -0xb8(%rbp), %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movb %al, -0xe2(%rbp)
movzbl -0x15(%rbp), %eax
cvtsi2ss %eax, %xmm0
mulss %xmm1, %xmm0
divss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movb %al, -0xe1(%rbp)
movl -0xe4(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0xfb4d
movl $0x1, -0x20(%rbp)
jmp 0xfb4f
jmp 0xfb51
cmpl $0x3, -0x20(%rbp)
je 0xfd93
movss 0xb88ad(%rip), %xmm0    # 0xc8410
movl -0xa0(%rbp), %edi
callq 0x51fa0
movl %eax, -0xe8(%rbp)
movss 0xb8894(%rip), %xmm0    # 0xc8410
movl -0xa0(%rbp), %edi
callq 0x51fa0
movl %eax, -0xec(%rbp)
movss 0xb887b(%rip), %xmm0    # 0xc8410
movl -0x9c(%rbp), %edi
callq 0x51fa0
movl %eax, -0xf0(%rbp)
movss 0xb8862(%rip), %xmm0    # 0xc8410
movl -0x9c(%rbp), %edi
callq 0x51fa0
movl %eax, -0xf4(%rbp)
movsd -0x14(%rbp), %xmm0
movsd -0xc(%rbp), %xmm1
movl -0xe8(%rbp), %edi
movl -0xec(%rbp), %esi
movl -0xf0(%rbp), %edx
movl -0xf4(%rbp), %ecx
callq 0x39090
movl -0xa4(%rbp), %edi
xorps %xmm0, %xmm0
movss %xmm0, -0x170(%rbp)
callq 0x51fa0
movl %eax, -0xf8(%rbp)
movss 0xb8806(%rip), %xmm0    # 0xc8410
movl -0xa4(%rbp), %edi
callq 0x51fa0
movl %eax, -0xfc(%rbp)
movss 0xb87ed(%rip), %xmm0    # 0xc8410
movl -0xa4(%rbp), %edi
callq 0x51fa0
movss -0x170(%rbp), %xmm0
movl %eax, -0x100(%rbp)
movl -0xa4(%rbp), %edi
callq 0x51fa0
movl %eax, -0x104(%rbp)
movsd -0x14(%rbp), %xmm0
movsd -0xc(%rbp), %xmm1
movl -0xf8(%rbp), %edi
movl -0xfc(%rbp), %esi
movl -0x100(%rbp), %edx
movl -0x104(%rbp), %ecx
callq 0x39090
movss -0x28(%rbp), %xmm0
movss %xmm0, -0x16c(%rbp)
movl $0xd, %edi
movl %edi, -0x164(%rbp)
movl $0x10, %esi
movl %esi, -0x160(%rbp)
callq 0x6f90
movss -0x16c(%rbp), %xmm0
movl -0x164(%rbp), %edi
movl -0x160(%rbp), %esi
movl %eax, %ecx
shrl $0x1f, %ecx
addl %ecx, %eax
sarl %eax
cvtsi2ss %eax, %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0x114(%rbp)
movss -0x24(%rbp), %xmm0
movss %xmm0, -0x168(%rbp)
callq 0x6f90
movss -0x168(%rbp), %xmm0
movl -0x164(%rbp), %edi
movl -0x160(%rbp), %esi
movl %eax, %ecx
shrl $0x1f, %ecx
addl %ecx, %eax
sarl %eax
cvtsi2ss %eax, %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0x110(%rbp)
callq 0x6f90
movl -0x164(%rbp), %edi
movl -0x160(%rbp), %esi
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x10c(%rbp)
callq 0x6f90
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x108(%rbp)
movb $0x0, -0x118(%rbp)
movb $0x0, -0x117(%rbp)
movb $0x0, -0x116(%rbp)
movb $0x0, -0x115(%rbp)
movss 0xb86b6(%rip), %xmm0    # 0xc8410
movl -0xa0(%rbp), %edi
callq 0x51fa0
movl %eax, -0x11c(%rbp)
movsd -0x114(%rbp), %xmm0
movsd -0x10c(%rbp), %xmm1
movl -0x118(%rbp), %esi
movl -0x11c(%rbp), %edx
xorl %edi, %edi
callq 0x77c0
jmp 0xfec9
movl $0xd, %edi
movl %edi, -0x178(%rbp)
movl $0xa, %esi
callq 0x6f90
movl %eax, %edi
callq 0x526e0
movl %eax, -0x128(%rbp)
movl -0x128(%rbp), %edi
movss 0x7c271(%rip), %xmm0    # 0x8c034
callq 0x51fa0
movl %eax, -0x124(%rbp)
movss 0xb863a(%rip), %xmm0    # 0xc8410
movl -0x124(%rbp), %edi
callq 0x51fa0
movl %eax, -0x120(%rbp)
movl -0xa4(%rbp), %edi
movss 0x7c243(%rip), %xmm0    # 0x8c038
movss %xmm0, -0x174(%rbp)
callq 0x51fa0
movl %eax, -0x130(%rbp)
movss 0xb8600(%rip), %xmm0    # 0xc8410
movl -0x130(%rbp), %edi
callq 0x51fa0
movss -0x174(%rbp), %xmm0
movl %eax, -0x12c(%rbp)
movl -0xa4(%rbp), %edi
callq 0x51fa0
movl %eax, -0x138(%rbp)
movss 0xb85ce(%rip), %xmm0    # 0xc8410
movl -0x138(%rbp), %edi
callq 0x51fa0
movl -0x178(%rbp), %edi
movl %eax, -0x134(%rbp)
movl $0x9, %esi
callq 0x6f90
movl %eax, %edi
callq 0x526e0
movss -0x174(%rbp), %xmm0
movl %eax, -0x144(%rbp)
movl -0x144(%rbp), %edi
callq 0x51fa0
movl %eax, -0x140(%rbp)
movss 0xb857f(%rip), %xmm0    # 0xc8410
movl -0x140(%rbp), %edi
callq 0x51fa0
movl %eax, -0x13c(%rbp)
movsd -0x14(%rbp), %xmm0
movsd -0xc(%rbp), %xmm1
movl -0x120(%rbp), %edi
movl -0x12c(%rbp), %esi
movl -0x134(%rbp), %edx
movl -0x13c(%rbp), %ecx
callq 0x39090
movl -0x20(%rbp), %ecx
movl %ecx, %eax
leal (%rax,%rax,2), %esi
movl $0xd, %edi
callq 0x6f90
movl %eax, %edi
callq 0x526e0
movl %eax, -0x14c(%rbp)
movss 0xb8520(%rip), %xmm0    # 0xc8410
movl -0x14c(%rbp), %edi
callq 0x51fa0
movl %eax, -0x148(%rbp)
movb $0x0, -0x150(%rbp)
movb $0x0, -0x14f(%rbp)
movb $0x0, -0x14e(%rbp)
movb $0x0, -0x14d(%rbp)
movsd -0x14(%rbp), %xmm0
movsd -0xc(%rbp), %xmm1
movl -0x148(%rbp), %esi
movl -0x150(%rbp), %edx
movl $0x1, %edi
callq 0x77c0
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
nop