// File: /workspace/github_c_makefile_star2_O1/arkanis[P]process-map/./deps/raygui.h
// Function: GuiSpinner
bool GuiSpinner(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode)
{
    GuiControlState state = guiState;

    bool pressed = false;
    int tempValue = *value;

    Rectangle spinner = { bounds.x + GuiGetStyle(SPINNER, SPIN_BUTTON_WIDTH) + GuiGetStyle(SPINNER, SPIN_BUTTON_PADDING), bounds.y,
                          bounds.width - 2*(GuiGetStyle(SPINNER, SPIN_BUTTON_WIDTH) + GuiGetStyle(SPINNER, SPIN_BUTTON_PADDING)), bounds.height };
    Rectangle leftButtonBound = { (float)bounds.x, (float)bounds.y, (float)GuiGetStyle(SPINNER, SPIN_BUTTON_WIDTH), (float)bounds.height };
    Rectangle rightButtonBound = { (float)bounds.x + bounds.width - GuiGetStyle(SPINNER, SPIN_BUTTON_WIDTH), (float)bounds.y, (float)GuiGetStyle(SPINNER, SPIN_BUTTON_WIDTH), (float)bounds.height };

    Rectangle textBounds = { 0 };
    if (text != NULL)
    {
        textBounds.width = (float)GetTextWidth(text);
        textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE);
        textBounds.x = bounds.x + bounds.width + GuiGetStyle(SPINNER, TEXT_PADDING);
        textBounds.y = bounds.y + bounds.height/2 - GuiGetStyle(DEFAULT, TEXT_SIZE)/2;
        if (GuiGetStyle(SPINNER, TEXT_ALIGNMENT) == GUI_TEXT_ALIGN_LEFT) textBounds.x = bounds.x - textBounds.width - GuiGetStyle(SPINNER, TEXT_PADDING);
    }

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

        // Check spinner state
        if (CheckCollisionPointRec(mousePoint, bounds))
        {
            if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) state = GUI_STATE_PRESSED;
            else state = GUI_STATE_FOCUSED;
        }
    }

    if (!editMode)
    {
        if (tempValue < minValue) tempValue = minValue;
        if (tempValue > maxValue) tempValue = maxValue;
    }
    //--------------------------------------------------------------------

    // Draw control
    //--------------------------------------------------------------------
    // TODO: Set Spinner properties for ValueBox
    pressed = GuiValueBox(spinner, NULL, &tempValue, minValue, maxValue, editMode);

    // Draw value selector custom buttons
    // NOTE: BORDER_WIDTH and TEXT_ALIGNMENT forced values
    int tempBorderWidth = GuiGetStyle(BUTTON, BORDER_WIDTH);
    int tempTextAlign = GuiGetStyle(BUTTON, TEXT_ALIGNMENT);
    GuiSetStyle(BUTTON, BORDER_WIDTH, GuiGetStyle(SPINNER, BORDER_WIDTH));
    GuiSetStyle(BUTTON, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER);

#if defined(RAYGUI_SUPPORT_ICONS)
    if (GuiButton(leftButtonBound, GuiIconText(RICON_ARROW_LEFT_FILL, NULL))) tempValue--;
    if (GuiButton(rightButtonBound, GuiIconText(RICON_ARROW_RIGHT_FILL, NULL))) tempValue++;
#else
    if (GuiButton(leftButtonBound, "<")) tempValue--;
    if (GuiButton(rightButtonBound, ">")) tempValue++;
#endif

    GuiSetStyle(BUTTON, TEXT_ALIGNMENT, tempTextAlign);
    GuiSetStyle(BUTTON, BORDER_WIDTH, tempBorderWidth);

    // Draw text label if provided
    if (text != NULL) GuiDrawText(text, textBounds, (GuiGetStyle(SPINNER, TEXT_ALIGNMENT) == GUI_TEXT_ALIGN_RIGHT)? GUI_TEXT_ALIGN_LEFT : GUI_TEXT_ALIGN_RIGHT, Fade(GetColor(GuiGetStyle(LABEL, TEXT + (state*3))), guiAlpha));
    //--------------------------------------------------------------------

    *value = tempValue;
    return pressed;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movl %r8d, %r12d
movl %ecx, %ebp
movl %edx, %r15d
movq %rdi, %r14
movl 0x9ba5e(%rip), %ebx     # 0xa7250
movq %rsi, 0xc8(%rsp)
movl (%rsi), %eax
movl %eax, 0x54(%rsp)
movl %eax, 0xc(%rsp)
cmpb $0x0, 0x9ba4a(%rip)     # 0xa7255
movaps %xmm0, 0x10(%rsp)
movaps %xmm1, 0x30(%rsp)
jne 0xb826
callq 0x6a18
movaps 0x30(%rsp), %xmm1
movaps 0x10(%rsp), %xmm0
cvtsi2ssl 0x9bec2(%rip), %xmm2 # 0xa76f0
movaps %xmm2, 0x70(%rsp)
cmpb $0x0, 0x9ba1b(%rip)     # 0xa7255
jne 0xb84b
callq 0x6a18
movaps 0x30(%rsp), %xmm1
movaps 0x10(%rsp), %xmm0
xorps %xmm2, %xmm2
cvtsi2ssl 0x9be9e(%rip), %xmm2 # 0xa76f4
movss %xmm2, 0x58(%rsp)
cmpb $0x0, 0x9b9f2(%rip)     # 0xa7255
jne 0xb874
callq 0x6a18
movaps 0x30(%rsp), %xmm1
movaps 0x10(%rsp), %xmm0
movl 0x9be75(%rip), %r13d    # 0xa76f0
cmpb $0x0, 0x9b9d3(%rip)     # 0xa7255
jne 0xb893
callq 0x6a18
movaps 0x30(%rsp), %xmm1
movaps 0x10(%rsp), %xmm0
addl 0x9be5a(%rip), %r13d    # 0xa76f4
cmpb $0x0, 0x9b9b4(%rip)     # 0xa7255
jne 0xb8b2
callq 0x6a18
movaps 0x30(%rsp), %xmm1
movaps 0x10(%rsp), %xmm0
cvtsi2ssl 0x9be36(%rip), %xmm1 # 0xa76f0
movaps %xmm1, 0xe0(%rsp)
cmpb $0x0, 0x9b98c(%rip)     # 0xa7255
jne 0xb8d5
callq 0x6a18
movaps 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
cvtsi2ssl 0x9be10(%rip), %xmm1 # 0xa76f0
movss %xmm1, 0x5c(%rsp)
addl %r13d, %r13d
cmpb $0x0, 0x9b965(%rip)     # 0xa7255
jne 0xb8fc
callq 0x6a18
movaps 0x10(%rsp), %xmm0
movaps 0x70(%rsp), %xmm1
addss %xmm0, %xmm1
movaps %xmm1, 0x70(%rsp)
cvtsi2ss %r13d, %xmm4
movaps 0x30(%rsp), %xmm1
movaps %xmm1, %xmm3
movaps %xmm0, %xmm2
addss %xmm1, %xmm2
movaps %xmm2, 0xb0(%rsp)
movaps %xmm1, %xmm2
cvtsi2ssl 0x9bdbf(%rip), %xmm2 # 0xa76f0
movaps %xmm2, 0xd0(%rsp)
testq %r14, %r14
je 0xbae8
movss %xmm4, 0x2c(%rsp)
movaps %xmm3, 0x90(%rsp)
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
movaps %xmm1, 0xa0(%rsp)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movaps %xmm0, 0x40(%rsp)
movq %r14, %rdi
callq 0x7821
movl %eax, %r13d
cmpb $0x0, 0x9b8de(%rip)     # 0xa7255
jne 0xb97e
callq 0x6a18
xorps %xmm2, %xmm2
cvtsi2ss %r13d, %xmm2
xorps %xmm0, %xmm0
cvtsi2ssl 0x9b93f(%rip), %xmm0 # 0xa72d0
movaps %xmm0, 0x60(%rsp)
cmpb $0x0, 0x9b8b8(%rip)     # 0xa7255
movaps %xmm2, 0x80(%rsp)
jne 0xb9b4
callq 0x6a18
movaps 0x80(%rsp), %xmm2
xorps %xmm3, %xmm3
cvtsi2ssl 0x9bd25(%rip), %xmm3 # 0xa76e4
movaps 0xa0(%rsp), %xmm0
mulss 0x5c641(%rip), %xmm0    # 0x68010
addss 0xb0(%rsp), %xmm3
movaps 0x40(%rsp), %xmm1
addss %xmm0, %xmm1
cmpb $0x0, 0x9b86d(%rip)     # 0xa7255
movaps %xmm3, 0xa0(%rsp)
jne 0xba11
movaps %xmm1, 0x40(%rsp)
callq 0x6a18
movaps 0xa0(%rsp), %xmm3
movaps 0x80(%rsp), %xmm2
movaps 0x40(%rsp), %xmm1
movaps 0x60(%rsp), %xmm0
movlhps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
movaps %xmm0, 0x60(%rsp)
movl 0x9b8ac(%rip), %eax     # 0xa72d0
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
subss %xmm0, %xmm1
movlhps %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0]
cmpb $0x0, 0x9b813(%rip)     # 0xa7255
jne 0xba63
movaps %xmm1, 0x40(%rsp)
callq 0x6a18
movaps 0xa0(%rsp), %xmm3
movaps 0x80(%rsp), %xmm2
movaps 0x40(%rsp), %xmm1
movaps 0x60(%rsp), %xmm0
shufps $0xe2, %xmm2, %xmm0     # xmm0 = xmm0[2,0],xmm2[2,3]
movaps %xmm0, 0x60(%rsp)
shufps $0xe2, %xmm3, %xmm1     # xmm1 = xmm1[2,0],xmm3[2,3]
cmpl $0x0, 0x9bc6c(%rip)     # 0xa76e8
movaps 0x10(%rsp), %xmm0
movaps 0x90(%rsp), %xmm3
movss 0x2c(%rsp), %xmm4
jne 0xbaf0
movaps %xmm0, %xmm5
subss %xmm2, %xmm5
cmpb $0x0, 0x9b7b6(%rip)     # 0xa7255
jne 0xbad3
movaps %xmm1, 0x40(%rsp)
movaps %xmm5, 0x80(%rsp)
callq 0x6a18
movaps 0x80(%rsp), %xmm5
movss 0x2c(%rsp), %xmm4
movaps 0x90(%rsp), %xmm3
movaps 0x10(%rsp), %xmm0
movaps 0x40(%rsp), %xmm1
xorps %xmm2, %xmm2
cvtsi2ssl 0x9bc06(%rip), %xmm2 # 0xa76e4
subss %xmm2, %xmm5
movss %xmm5, %xmm1            # xmm1 = xmm5[0],xmm1[1,2,3]
jmp 0xbaf0
xorps %xmm1, %xmm1
movaps %xmm1, 0x60(%rsp)
movaps %xmm1, 0x40(%rsp)
movaps 0x70(%rsp), %xmm1
addss 0x58(%rsp), %xmm1
subss %xmm4, %xmm3
movl $0x3, %r13d
cmpl $0x3, %ebx
je 0xbb77
cmpb $0x0, 0x9b73e(%rip)     # 0xa7254
je 0xbb1d
movl %ebx, %r13d
jmp 0xbb77
movaps %xmm1, 0x70(%rsp)
movaps %xmm3, 0x90(%rsp)
callq 0x2867d
movaps 0x10(%rsp), %xmm1
movaps 0x30(%rsp), %xmm2
callq 0x34d6b
movaps 0x90(%rsp), %xmm3
movaps 0x70(%rsp), %xmm1
movaps 0x10(%rsp), %xmm0
movl %ebx, %r13d
testb %al, %al
je 0xbb77
xorl %edi, %edi
callq 0x286ba
movaps 0x90(%rsp), %xmm3
movaps 0x70(%rsp), %xmm1
movaps 0x10(%rsp), %xmm0
movzbl %al, %r13d
incl %r13d
movss %xmm1, %xmm0            # xmm0 = xmm1[0],xmm0[1,2,3]
movaps 0x30(%rsp), %xmm1
movss %xmm3, %xmm1            # xmm1 = xmm3[0],xmm1[1,2,3]
testb %r12b, %r12b
jne 0xbba2
cmpl %r15d, 0x54(%rsp)
jge 0xbb95
movl %r15d, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl %ebp, %eax
cmovgel %ebp, %eax
movl %eax, 0xc(%rsp)
movzbl %r12b, %r8d
leaq 0xc(%rsp), %rsi
xorl %edi, %edi
movl %r15d, %edx
movl %ebp, %ecx
callq 0xbd4d
movl %eax, %ebp
cmpb $0x0, 0x9b695(%rip)     # 0xa7255
jne 0xbbc7
callq 0x6a18
movl 0x9b7b3(%rip), %ebx     # 0xa7380
cmpb $0x0, 0x9b681(%rip)     # 0xa7255
jne 0xbbdb
callq 0x6a18
movl 0x9b7a6(%rip), %r15d    # 0xa7388
cmpb $0x0, 0x9b66c(%rip)     # 0xa7255
jne 0xbbf0
callq 0x6a18
movl 0x9bae9(%rip), %r12d    # 0xa76e0
cmpb $0x0, 0x9b657(%rip)     # 0xa7255
jne 0xbc05
callq 0x6a18
movaps 0xb0(%rsp), %xmm1
subss 0x5c(%rsp), %xmm1
movl %r12d, 0x9b766(%rip)    # 0xa7380
cmpb $0x0, 0x9b634(%rip)     # 0xa7255
jne 0xbc38
movaps %xmm1, 0xb0(%rsp)
callq 0x6a18
movaps 0xb0(%rsp), %xmm1
movaps 0x10(%rsp), %xmm0
movaps %xmm0, %xmm2
movss %xmm1, %xmm2            # xmm2 = xmm1[0],xmm2[1,2,3]
movaps %xmm2, 0x30(%rsp)
movl $0x1, 0x9b735(%rip)     # 0xa7388
leaq 0x5c654(%rip), %rdi     # 0x682ae
movaps 0xe0(%rsp), %xmm1
callq 0x724a
testb %al, %al
je 0xbc6f
decl 0xc(%rsp)
leaq 0x5c63a(%rip), %rdi     # 0x682b0
movaps 0x30(%rsp), %xmm0
movaps 0xd0(%rsp), %xmm1
callq 0x724a
testb %al, %al
je 0xbc90
incl 0xc(%rsp)
cmpb $0x0, 0x9b5be(%rip)     # 0xa7255
jne 0xbc9e
callq 0x6a18
movl %r15d, 0x9b6e3(%rip)    # 0xa7388
cmpb $0x0, 0x9b5a9(%rip)     # 0xa7255
jne 0xbcb3
callq 0x6a18
movl %ebx, 0x9b6c7(%rip)     # 0xa7380
testq %r14, %r14
je 0xbd2b
cmpb $0x0, 0x9b590(%rip)     # 0xa7255
jne 0xbccc
callq 0x6a18
xorl %r15d, %r15d
cmpl $0x2, 0x9ba12(%rip)     # 0xa76e8
setne %r15b
addl %r15d, %r15d
leal (%r13,%r13,2), %ebx
cmpb $0x0, 0x9b56c(%rip)     # 0xa7255
jne 0xbcf0
callq 0x6a18
addl $0x1a, %ebx
movslq %ebx, %rax
leaq 0x9b593(%rip), %rcx     # 0xa7290
movl (%rcx,%rax,4), %edi
callq 0x44152
movss 0x9a723(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
movq %r14, %rdi
movaps 0x40(%rsp), %xmm0
movaps 0x60(%rsp), %xmm1
movl %r15d, %esi
movl %eax, %edx
callq 0x95ee
movl 0xc(%rsp), %eax
movq 0xc8(%rsp), %rcx
movl %eax, (%rcx)
movl %ebp, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq