// File: /workspace/github_c_makefile_star2_O3/arkanis[P]process-map/./deps/raygui.h
// Function: GuiColorPicker
Color GuiColorPicker(Rectangle bounds, Color color)
{
    color = GuiColorPanel(bounds, color);

    Rectangle boundsHue = { (float)bounds.x + bounds.width + GuiGetStyle(COLORPICKER, HUEBAR_PADDING), (float)bounds.y, (float)GuiGetStyle(COLORPICKER, HUEBAR_WIDTH), (float)bounds.height };
    //Rectangle boundsAlpha = { bounds.x, bounds.y + bounds.height + GuiGetStyle(COLORPICKER, BARS_PADDING), bounds.width, GuiGetStyle(COLORPICKER, BARS_THICK) };

    Vector3 hsv = ConvertRGBtoHSV(RAYGUI_CLITERAL(Vector3){ color.r/255.0f, color.g/255.0f, color.b/255.0f });
    hsv.x = GuiColorBarHue(boundsHue, hsv.x);
    //color.a = (unsigned char)(GuiColorBarAlpha(boundsAlpha, (float)color.a/255.0f)*255.0f);
    Vector3 rgb = ConvertHSVtoRGB(hsv);
    color = RAYGUI_CLITERAL(Color){ (unsigned char)roundf(rgb.x*255.0f), (unsigned char)roundf(rgb.y*255.0f), (unsigned char)roundf(rgb.z*255.0f), color.a };

    return color;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
movss 0x539f8(%rip), %xmm2    # 0x65008
callq 0x1011b
movaps (%rsp), %xmm1
movl %eax, %ebx
movaps 0x10(%rsp), %xmm2
addss %xmm1, %xmm2
cmpb $0x1, 0x92c2a(%rip)     # 0xa4255
jne 0x11646
xorps %xmm0, %xmm0
cvtsi2ssl 0x93180(%rip), %xmm0 # 0xa47b8
addss %xmm0, %xmm2
movss %xmm2, %xmm1            # xmm1 = xmm2[0],xmm1[1,2,3]
movaps %xmm1, (%rsp)
jmp 0x1167e
movaps %xmm2, 0x20(%rsp)
callq 0x6a3c
xorps %xmm0, %xmm0
cvtsi2ssl 0x9315d(%rip), %xmm0 # 0xa47b8
movaps 0x20(%rsp), %xmm1
addss %xmm0, %xmm1
movaps (%rsp), %xmm0
movss %xmm1, %xmm0            # xmm0 = xmm1[0],xmm0[1,2,3]
movaps %xmm0, (%rsp)
cmpb $0x0, 0x92bde(%rip)     # 0xa4255
jne 0x1167e
callq 0x6a3c
movl %ebx, %ebp
andl $0xff000000, %ebp       # imm = 0xFF000000
movl %ebx, %eax
shrl $0x10, %eax
movd %ebx, %xmm0
shrl $0x8, %ebx
movd %ebx, %xmm1
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
pand 0x53ade(%rip), %xmm0    # 0x65180
cvtdq2ps %xmm0, %xmm0
movl $0xff, %r14d
andl %r14d, %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
divps 0x53ab4(%rip), %xmm0    # 0x65170
divss 0x5396c(%rip), %xmm1    # 0x65030
movl 0x930ea(%rip), %eax     # 0xa47b4
movaps 0x10(%rsp), %xmm2
cvtsi2ss %eax, %xmm2
movaps %xmm2, 0x10(%rsp)
callq 0x106a2
movaps %xmm0, %xmm2
movaps %xmm0, 0x30(%rsp)
movss %xmm1, 0x20(%rsp)
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
callq 0x10d20
movaps 0x30(%rsp), %xmm1
movss %xmm0, %xmm1            # xmm1 = xmm0[0],xmm1[1,2,3]
movaps %xmm1, %xmm0
movss 0x20(%rsp), %xmm1
callq 0x1074e
movaps %xmm0, (%rsp)
movss %xmm1, 0x10(%rsp)
mulss 0x5390e(%rip), %xmm0    # 0x65030
callq 0x60b0
cvttss2si %xmm0, %ebx
movaps (%rsp), %xmm0
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
mulss 0x538f5(%rip), %xmm0    # 0x65030
callq 0x60b0
cvttss2si %xmm0, %r15d
movss 0x10(%rsp), %xmm0
mulss 0x538dd(%rip), %xmm0    # 0x65030
callq 0x60b0
cvttss2si %xmm0, %eax
andl %r14d, %eax
shll $0x10, %eax
orl %ebp, %eax
andl %r14d, %r15d
shll $0x8, %r15d
orl %eax, %r15d
andl %r14d, %ebx
orl %r15d, %ebx
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq