// File: /workspace/github_c_makefile_star2_O2/arkanis[P]process-map/./deps/raygui.h
// Function: GuiProgressBar
float GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight, float value, float minValue, float maxValue)
{
    GuiControlState state = guiState;

    Rectangle progress = { bounds.x + GuiGetStyle(PROGRESSBAR, BORDER_WIDTH),
                           bounds.y + GuiGetStyle(PROGRESSBAR, BORDER_WIDTH) + GuiGetStyle(PROGRESSBAR, PROGRESS_PADDING), 0,
                           bounds.height - 2*GuiGetStyle(PROGRESSBAR, BORDER_WIDTH) - 2*GuiGetStyle(PROGRESSBAR, PROGRESS_PADDING) };

    // Update control
    //--------------------------------------------------------------------
    if (state != GUI_STATE_DISABLED) progress.width = ((float)(value/(maxValue - minValue))*(float)(bounds.width - 2*GuiGetStyle(PROGRESSBAR, BORDER_WIDTH)));
    //--------------------------------------------------------------------

    // Draw control
    //--------------------------------------------------------------------
    GuiDrawRectangle(bounds, GuiGetStyle(PROGRESSBAR, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(PROGRESSBAR, BORDER + (state*3))), guiAlpha), BLANK);

    // Draw slider internal progress bar (depends on state)
    if ((state == GUI_STATE_NORMAL) || (state == GUI_STATE_PRESSED)) GuiDrawRectangle(progress, 0, BLANK, Fade(GetColor(GuiGetStyle(PROGRESSBAR, BASE_COLOR_PRESSED)), guiAlpha));
    else if (state == GUI_STATE_FOCUSED) GuiDrawRectangle(progress, 0, BLANK, Fade(GetColor(GuiGetStyle(PROGRESSBAR, TEXT_COLOR_FOCUSED)), guiAlpha));

    // Draw left/right text if provided
    if (textLeft != NULL)
    {
        Rectangle textBounds = { 0 };
        textBounds.width = (float)GetTextWidth(textLeft);  // TODO: Consider text icon
        textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE);
        textBounds.x = bounds.x - textBounds.width - GuiGetStyle(PROGRESSBAR, TEXT_PADDING);
        textBounds.y = bounds.y + bounds.height/2 - GuiGetStyle(DEFAULT, TEXT_SIZE)/2;

        GuiDrawText(textLeft, textBounds, GUI_TEXT_ALIGN_RIGHT, Fade(GetColor(GuiGetStyle(PROGRESSBAR, TEXT + (state*3))), guiAlpha));
    }

    if (textRight != NULL)
    {
        Rectangle textBounds = { 0 };
        textBounds.width = (float)GetTextWidth(textRight);  // TODO: Consider text icon
        textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE);
        textBounds.x = bounds.x + bounds.width + GuiGetStyle(PROGRESSBAR, TEXT_PADDING);
        textBounds.y = bounds.y + bounds.height/2 - GuiGetStyle(DEFAULT, TEXT_SIZE)/2;

        GuiDrawText(textRight, textBounds, GUI_TEXT_ALIGN_LEFT, Fade(GetColor(GuiGetStyle(PROGRESSBAR, TEXT + (state*3))), guiAlpha));
    }
    //--------------------------------------------------------------------

    return value;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movss %xmm4, 0x70(%rsp)
movss %xmm3, 0x4c(%rsp)
movss %xmm2, 0x1c(%rsp)
movq %rsi, 0xa0(%rsp)
movq %rdi, 0x98(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm1, 0x60(%rsp)
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
movaps %xmm1, 0x80(%rsp)
movl 0x8f0e1(%rip), %r14d    # 0x9b280
pushq $0x5
popq %rbx
pushq $0xc
popq %r15
movl %ebx, %edi
movl %r15d, %esi
callq 0x6e93
movl %eax, 0x50(%rsp)
movl %ebx, %edi
movl %r15d, %esi
callq 0x6e93
movl %eax, %r12d
pushq $0x10
popq %rbp
movl %ebx, %edi
movl %ebp, %esi
callq 0x6e93
movl %eax, %r13d
movl %ebx, %edi
movl %r15d, %esi
callq 0x6e93
addl %eax, %eax
cvtsi2ss %eax, %xmm0
movaps 0x80(%rsp), %xmm1
subss %xmm0, %xmm1
movaps %xmm1, 0x20(%rsp)
movl %ebx, %edi
movl %ebp, %esi
callq 0x6e93
addl %eax, %eax
cvtsi2ss %eax, %xmm0
movaps 0x20(%rsp), %xmm1
subss %xmm0, %xmm1
movq %xmm1, %xmm1            # xmm1 = xmm1[0],zero
xorps %xmm0, %xmm0
shufps $0xe2, %xmm0, %xmm1     # xmm1 = xmm1[2,0],xmm0[2,3]
cmpl $0x3, %r14d
movaps %xmm1, (%rsp)
je 0xc266
movss 0x70(%rsp), %xmm0
subss 0x4c(%rsp), %xmm0
movss 0x1c(%rsp), %xmm2
divss %xmm0, %xmm2
movss %xmm2, 0x20(%rsp)
pushq $0x5
popq %rdi
pushq $0xc
popq %rsi
callq 0x6e93
addl %eax, %eax
cvtsi2ss %eax, %xmm0
movaps 0x60(%rsp), %xmm1
subss %xmm0, %xmm1
mulss 0x20(%rsp), %xmm1
movaps (%rsp), %xmm0
movss %xmm1, %xmm0            # xmm0 = xmm1[0],xmm0[1,2,3]
movaps %xmm0, (%rsp)
movaps 0x30(%rsp), %xmm0
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movaps %xmm0, 0x20(%rsp)
pushq $0x5
popq %rbx
pushq $0xc
popq %rsi
movl %ebx, %edi
callq 0x6e93
movl %eax, %ebp
leal (%r14,%r14,2), %r15d
movl %ebx, %edi
movl %r15d, %esi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x8e1a0(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movaps 0x30(%rsp), %xmm0
movaps 0x60(%rsp), %xmm1
movl %ebp, %edi
movl %eax, %esi
xorl %edx, %edx
callq 0x7476
testl $0xfffffffd, %r14d      # imm = 0xFFFFFFFD
je 0xc2cd
cmpl $0x1, %r14d
je 0xc2d0
jmp 0xc335
pushq $0x7
popq %rbx
cvtsi2ss %r12d, %xmm2
addss 0x20(%rsp), %xmm2
movd 0x50(%rsp), %xmm0
movd %r13d, %xmm1
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movaps 0x30(%rsp), %xmm1
movlhps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
cvtdq2ps %xmm0, %xmm0
shufps $0xe2, %xmm1, %xmm2     # xmm2 = xmm2[2,0],xmm1[2,3]
addps %xmm0, %xmm2
movaps %xmm2, 0x50(%rsp)
pushq $0x5
popq %rdi
movl %ebx, %esi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x8e126(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movaps 0x50(%rsp), %xmm0
movaps (%rsp), %xmm1
xorl %edi, %edi
xorl %esi, %esi
movl %eax, %edx
callq 0x7476
pushq $0x2
popq %rbp
movq 0x98(%rsp), %r14
testq %r14, %r14
je 0xc416
movq %r14, %rdi
callq 0x76f6
movl %eax, %ebx
pushq $0x10
popq %r12
xorl %edi, %edi
movl %r12d, %esi
callq 0x6e93
movd %eax, %xmm0
movd %ebx, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtdq2ps %xmm1, %xmm0
movaps %xmm0, 0x50(%rsp)
movaps 0x30(%rsp), %xmm1
subss %xmm0, %xmm1
movaps %xmm1, (%rsp)
pushq $0x5
popq %rbx
pushq $0xd
popq %rsi
movl %ebx, %edi
callq 0x6e93
cvtsi2ss %eax, %xmm0
movaps (%rsp), %xmm1
subss %xmm0, %xmm1
movaps %xmm1, (%rsp)
movss 0x4cc65(%rip), %xmm0    # 0x5900c
mulss 0x80(%rsp), %xmm0
addss 0x20(%rsp), %xmm0
movaps %xmm0, 0x70(%rsp)
xorl %edi, %edi
movl %r12d, %esi
callq 0x6e93
cltd
idivl %ebp
cvtsi2ss %eax, %xmm0
movaps 0x70(%rsp), %xmm1
subss %xmm0, %xmm1
movaps (%rsp), %xmm0
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movaps %xmm0, (%rsp)
leal 0x2(%r15), %esi
movl %ebx, %edi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x8e046(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movq %r14, %rdi
movaps (%rsp), %xmm0
movaps 0x50(%rsp), %xmm1
movl %ebp, %esi
movl %eax, %edx
callq 0x8d31
movq 0xa0(%rsp), %r12
testq %r12, %r12
je 0xc4fc
movq %r12, %rdi
callq 0x76f6
movl %eax, %ebx
pushq $0x10
popq %r14
xorl %edi, %edi
movl %r14d, %esi
callq 0x6e93
movd %eax, %xmm0
movd %ebx, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtdq2ps %xmm1, %xmm0
movaps %xmm0, (%rsp)
movaps 0x60(%rsp), %xmm0
addss 0x30(%rsp), %xmm0
movaps %xmm0, 0x60(%rsp)
pushq $0x5
popq %rbx
pushq $0xd
popq %rsi
movl %ebx, %edi
callq 0x6e93
cvtsi2ss %eax, %xmm0
addss 0x60(%rsp), %xmm0
movaps %xmm0, 0x30(%rsp)
movaps 0x80(%rsp), %xmm0
mulss 0x4cb7e(%rip), %xmm0    # 0x5900c
movaps 0x20(%rsp), %xmm1
addss %xmm0, %xmm1
movaps %xmm1, 0x20(%rsp)
xorl %edi, %edi
movl %r14d, %esi
callq 0x6e93
cltd
idivl %ebp
cvtsi2ss %eax, %xmm0
movaps 0x20(%rsp), %xmm1
subss %xmm0, %xmm1
movaps 0x30(%rsp), %xmm0
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movaps %xmm0, 0x30(%rsp)
addl $0x2, %r15d
movl %ebx, %edi
movl %r15d, %esi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x8df60(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movq %r12, %rdi
movaps 0x30(%rsp), %xmm0
movaps (%rsp), %xmm1
xorl %esi, %esi
movl %eax, %edx
callq 0x8d31
movss 0x1c(%rsp), %xmm0
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq