// File: /workspace/github_c_makefile_star2_O2/arkanis[P]process-map/./deps/raygui.h
// Function: GuiColorBarAlpha
float GuiColorBarAlpha(Rectangle bounds, float alpha)
{
    #define COLORBARALPHA_CHECKED_SIZE   10

    GuiControlState state = guiState;
    Rectangle selector = { (float)bounds.x + alpha*bounds.width - GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_OVERFLOW), (float)bounds.y - GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_OVERFLOW), (float)GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_HEIGHT), (float)bounds.height + GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_OVERFLOW)*2 };

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

        if (CheckCollisionPointRec(mousePoint, bounds) ||
            CheckCollisionPointRec(mousePoint, selector))
        {
            if (IsMouseButtonDown(MOUSE_LEFT_BUTTON))
            {
                state = GUI_STATE_PRESSED;
                selector.x = mousePoint.x - selector.width/2;

                alpha = (mousePoint.x - bounds.x)/bounds.width;
                if (alpha <= 0.0f) alpha = 0.0f;
                if (alpha >= 1.0f) alpha = 1.0f;
                //selector.x = bounds.x + (int)(((alpha - 0)/(100 - 0))*(bounds.width - 2*GuiGetStyle(SLIDER, BORDER_WIDTH))) - selector.width/2;
            }
            else state = GUI_STATE_FOCUSED;
        }
    }
    //--------------------------------------------------------------------

    // Draw control
    //--------------------------------------------------------------------

    // Draw alpha bar: checked background
    if (state != GUI_STATE_DISABLED)
    {
        int checksX = (int)bounds.width/COLORBARALPHA_CHECKED_SIZE;
        int checksY = (int)bounds.height/COLORBARALPHA_CHECKED_SIZE;

        for (int x = 0; x < checksX; x++)
        {
            for (int y = 0; y < checksY; y++)
            {
                Rectangle check = { bounds.x + x*COLORBARALPHA_CHECKED_SIZE, bounds.y + y*COLORBARALPHA_CHECKED_SIZE, COLORBARALPHA_CHECKED_SIZE, COLORBARALPHA_CHECKED_SIZE };
                GuiDrawRectangle(check, 0, BLANK, ((x + y)%2)? Fade(Fade(GetColor(GuiGetStyle(COLORPICKER, BORDER_COLOR_DISABLED)), 0.4f), guiAlpha) : Fade(Fade(GetColor(GuiGetStyle(COLORPICKER, BASE_COLOR_DISABLED)), 0.4f), guiAlpha));
            }
        }

        DrawRectangleGradientEx(bounds, RAYGUI_CLITERAL(Color){ 255, 255, 255, 0 }, RAYGUI_CLITERAL(Color){ 255, 255, 255, 0 }, Fade(RAYGUI_CLITERAL(Color){ 0, 0, 0, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color){ 0, 0, 0, 255 }, guiAlpha));
    }
    else DrawRectangleGradientEx(bounds, Fade(GetColor(GuiGetStyle(COLORPICKER, BASE_COLOR_DISABLED)), 0.1f), Fade(GetColor(GuiGetStyle(COLORPICKER, BASE_COLOR_DISABLED)), 0.1f), Fade(GetColor(GuiGetStyle(COLORPICKER, BORDER_COLOR_DISABLED)), guiAlpha), Fade(GetColor(GuiGetStyle(COLORPICKER, BORDER_COLOR_DISABLED)), guiAlpha));

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

    // Draw alpha bar: selector
    GuiDrawRectangle(selector, 0, BLANK, Fade(GetColor(GuiGetStyle(COLORPICKER, BORDER + state*3)), guiAlpha));
    //--------------------------------------------------------------------

    return alpha;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movaps %xmm0, (%rsp)
movaps %xmm1, %xmm0
shufps $0x55, %xmm1, %xmm0     # xmm0 = xmm0[1,1],xmm1[1,1]
movaps %xmm0, 0x30(%rsp)
movl 0x8dde5(%rip), %r15d    # 0x9b280
movaps %xmm2, 0x70(%rsp)
movaps %xmm1, 0x20(%rsp)
mulss %xmm1, %xmm2
movaps %xmm2, 0x40(%rsp)
pushq $0xd
popq %rbx
pushq $0x14
popq %rbp
movl %ebx, %edi
movl %ebp, %esi
callq 0x6e93
movl %eax, %r14d
movl %ebx, %edi
movl %ebp, %esi
callq 0x6e93
movd %r14d, %xmm0
movd %eax, %xmm1
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
cvtdq2ps %xmm0, %xmm0
movaps (%rsp), %xmm1
addss 0x40(%rsp), %xmm1
subps %xmm0, %xmm1
movaps %xmm1, 0x50(%rsp)
pushq $0x13
popq %rsi
movl %ebx, %edi
callq 0x6e93
cvtsi2ss %eax, %xmm0
movaps %xmm0, 0x40(%rsp)
movl %ebx, %edi
movl %ebp, %esi
callq 0x6e93
addl %eax, %eax
cvtsi2ss %eax, %xmm0
addss 0x30(%rsp), %xmm0
movaps 0x40(%rsp), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movaps %xmm1, 0x80(%rsp)
cmpl $0x3, %r15d
jne 0xd5dc
pushq $0xd
popq %r14
pushq $0xa
popq %rbx
movl %r14d, %edi
movl %ebx, %esi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x4bae7(%rip), %xmm0    # 0x59034
movl %eax, %edi
callq 0x380d5
movl %eax, %ebp
movl %r14d, %edi
movl %ebx, %esi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movl %eax, %edi
movss 0x4bac3(%rip), %xmm0    # 0x59034
callq 0x380d5
movl %eax, %r15d
pushq $0x9
popq %rbx
movl %r14d, %edi
movl %ebx, %esi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x8ceab(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movl %eax, %r12d
movl %r14d, %edi
movl %ebx, %esi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x8ce88(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movaps (%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movl %ebp, %edi
movl %r15d, %esi
movl %r12d, %edx
movl %eax, %ecx
callq 0x2709f
jmp 0xd7f9
movaps (%rsp), %xmm3
movaps %xmm3, %xmm0
shufps $0x55, %xmm3, %xmm0     # xmm0 = xmm0[1,1],xmm3[1,1]
movaps %xmm0, 0x90(%rsp)
cmpb $0x0, 0x8dc8e(%rip)     # 0x9b284
je 0xd607
movq %r15, 0x18(%rsp)
movaps 0x20(%rsp), %xmm2
jmp 0xd6c9
callq 0x1fd8b
movaps %xmm0, 0x60(%rsp)
movaps (%rsp), %xmm1
movaps 0x20(%rsp), %xmm2
callq 0x2a643
testb %al, %al
jne 0xd63e
movaps 0x60(%rsp), %xmm0
movaps 0x50(%rsp), %xmm1
movaps 0x80(%rsp), %xmm2
callq 0x2a643
testb %al, %al
je 0xd6bb
xorl %edi, %edi
callq 0x1fdb3
testb %al, %al
je 0xd6b1
movaps 0x40(%rsp), %xmm1
mulss 0x4b9be(%rip), %xmm1    # 0x59014
movaps 0x60(%rsp), %xmm4
addss %xmm4, %xmm1
movaps 0x50(%rsp), %xmm0
movss %xmm1, %xmm0            # xmm0 = xmm1[0],xmm0[1,2,3]
movaps %xmm0, 0x50(%rsp)
movaps (%rsp), %xmm3
subss %xmm3, %xmm4
movaps 0x20(%rsp), %xmm2
divss %xmm2, %xmm4
xorps %xmm0, %xmm0
movaps %xmm4, %xmm1
cmpless %xmm0, %xmm1
andnps %xmm4, %xmm1
pushq $0x2
popq %rax
movaps %xmm1, 0x70(%rsp)
ucomiss 0x4b969(%rip), %xmm1    # 0x59004
movq %rax, 0x18(%rsp)
jb 0xd6c9
movss 0x4b95a(%rip), %xmm0    # 0x59004
movaps %xmm0, 0x70(%rsp)
jmp 0xd6c9
pushq $0x1
popq %rax
movq %rax, 0x18(%rsp)
jmp 0xd6c0
movq %r15, 0x18(%rsp)
movaps 0x20(%rsp), %xmm2
movaps (%rsp), %xmm3
movaps 0x30(%rsp), %xmm0
cvttss2si %xmm2, %eax
pushq $0xa
popq %r12
cltd
idivl %r12d
movl %eax, %ecx
cvttss2si %xmm0, %eax
cltd
idivl %r12d
movl %eax, %ebp
xorl %r13d, %r13d
testl %eax, %eax
cmovlel %r13d, %ebp
testl %ecx, %ecx
cmovlel %r13d, %ecx
movl %ecx, 0x60(%rsp)
pushq $0xd
popq %r14
cmpl 0x60(%rsp), %r13d
je 0xd7af
imull $0xa, %r13d, %eax
cvtsi2ss %eax, %xmm0
addss %xmm3, %xmm0
movaps %xmm0, 0x40(%rsp)
xorl %r15d, %r15d
xorl %ebx, %ebx
cmpl %ebx, %ebp
je 0xd7a7
cvtsi2ss %r15d, %xmm0
addss 0x90(%rsp), %xmm0
movaps %xmm0, 0x30(%rsp)
leal (%rbx,%r13), %eax
andl $0x1, %eax
movl %r12d, %esi
subl %eax, %esi
movl %r14d, %edi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movl %eax, %edi
movss 0x4b8ea(%rip), %xmm0    # 0x59048
callq 0x380d5
movss 0x8ccd5(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movaps 0x40(%rsp), %xmm0
movaps 0x30(%rsp), %xmm1
movlhps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
shufps $0xe2, %xmm0, %xmm1     # xmm1 = xmm1[2,0],xmm0[2,3]
movaps %xmm1, %xmm0
movaps 0x4b9c3(%rip), %xmm1    # 0x59150
xorl %edi, %edi
xorl %esi, %esi
movl %eax, %edx
callq 0x7476
movaps (%rsp), %xmm3
incl %ebx
addl $0xa, %r15d
jmp 0xd71e
incl %r13d
jmp 0xd6fd
movss 0x8cc89(%rip), %xmm0    # 0x9a440
movl $0xff000000, %edi       # imm = 0xFF000000
callq 0x380d5
movl %eax, %ebx
movss 0x8cc75(%rip), %xmm0    # 0x9a440
movl $0xff000000, %edi       # imm = 0xFF000000
callq 0x380d5
movaps (%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movl $0xffffff, %edi         # imm = 0xFFFFFF
movl $0xffffff, %esi         # imm = 0xFFFFFF
movl %ebx, %edx
movl %eax, %ecx
callq 0x2709f
movq 0x18(%rsp), %rax
leal (%rax,%rax,2), %ebx
pushq $0xd
popq %rbp
movl %ebp, %edi
movl %ebx, %esi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x8cc2c(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
pushq $0x1
popq %rdi
movaps (%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movl %eax, %esi
xorl %edx, %edx
callq 0x7476
movl %ebp, %edi
movl %ebx, %esi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x8cbf8(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movaps 0x50(%rsp), %xmm0
movaps 0x80(%rsp), %xmm1
xorl %edi, %edi
xorl %esi, %esi
movl %eax, %edx
callq 0x7476
movaps 0x70(%rsp), %xmm0
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq