// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xd0, %rsp
movb %r8b, %al
movlpd %xmm0, -0x10(%rbp)
movlpd %xmm1, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movl %edx, -0x24(%rbp)
movl %ecx, -0x28(%rbp)
andb $0x1, %al
movb %al, -0x29(%rbp)
movl 0xbdaff(%rip), %eax     # 0xca0e0
movl %eax, -0x30(%rbp)
movb $0x0, -0x31(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movss -0x10(%rbp), %xmm0
movss %xmm0, -0xa4(%rbp)
movl $0xb, %edi
movl $0x10, %esi
callq 0x6f90
movss -0xa4(%rbp), %xmm0
cvtsi2ss %eax, %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0xa0(%rbp)
movl $0xb, %edi
movl $0x11, %esi
callq 0x6f90
movss -0xa0(%rbp), %xmm0
cvtsi2ss %eax, %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x48(%rbp)
movss -0xc(%rbp), %xmm0
movss %xmm0, -0x44(%rbp)
movss -0x8(%rbp), %xmm0
movss %xmm0, -0x9c(%rbp)
movl $0xb, %edi
movl $0x10, %esi
callq 0x6f90
movl %eax, -0x98(%rbp)
movl $0xb, %edi
movl $0x11, %esi
callq 0x6f90
movss -0x9c(%rbp), %xmm0
movl %eax, %ecx
movl -0x98(%rbp), %eax
addl %ecx, %eax
shll %eax
cvtsi2ss %eax, %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0x40(%rbp)
movss -0x4(%rbp), %xmm0
movss %xmm0, -0x3c(%rbp)
movss -0x10(%rbp), %xmm0
movss %xmm0, -0x58(%rbp)
movss -0xc(%rbp), %xmm0
movss %xmm0, -0x54(%rbp)
movl $0xb, %edi
movl $0x10, %esi
callq 0x6f90
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x50(%rbp)
movss -0x4(%rbp), %xmm0
movss %xmm0, -0x4c(%rbp)
movss -0x10(%rbp), %xmm0
addss -0x8(%rbp), %xmm0
movss %xmm0, -0x94(%rbp)
movl $0xb, %edi
movl $0x10, %esi
callq 0x6f90
movss -0x94(%rbp), %xmm0
cvtsi2ss %eax, %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0x68(%rbp)
movss -0xc(%rbp), %xmm0
movss %xmm0, -0x64(%rbp)
movl $0xb, %edi
movl $0x10, %esi
callq 0x6f90
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x60(%rbp)
movss -0x4(%rbp), %xmm0
movss %xmm0, -0x5c(%rbp)
leaq -0x78(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x6060
cmpq $0x0, -0x18(%rbp)
je 0xc856
movq -0x18(%rbp), %rdi
callq 0x7af0
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x70(%rbp)
xorl %edi, %edi
movl $0x10, %esi
callq 0x6f90
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x6c(%rbp)
movss -0x10(%rbp), %xmm0
addss -0x8(%rbp), %xmm0
movss %xmm0, -0xac(%rbp)
movl $0xb, %edi
movl $0xd, %esi
callq 0x6f90
movss -0xac(%rbp), %xmm0
cvtsi2ss %eax, %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x78(%rbp)
movss -0xc(%rbp), %xmm0
movss -0x4(%rbp), %xmm1
movss 0x7f837(%rip), %xmm2    # 0x8c008
divss %xmm2, %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0xa8(%rbp)
xorl %edi, %edi
movl $0x10, %esi
callq 0x6f90
movss -0xa8(%rbp), %xmm0
movl $0x2, %ecx
cltd
idivl %ecx
cvtsi2ss %eax, %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0x74(%rbp)
movl $0xb, %edi
movl $0xe, %esi
callq 0x6f90
cmpl $0x0, %eax
jne 0xc854
movss -0x10(%rbp), %xmm0
subss -0x70(%rbp), %xmm0
movss %xmm0, -0xb0(%rbp)
movl $0xb, %edi
movl $0xd, %esi
callq 0x6f90
movss -0xb0(%rbp), %xmm0
cvtsi2ss %eax, %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0x78(%rbp)
jmp 0xc856
cmpl $0x3, -0x30(%rbp)
je 0xc8aa
testb $0x1, 0xbd881(%rip)     # 0xca0e4
jne 0xc8aa
callq 0x2dd60
movlpd %xmm0, -0x80(%rbp)
movsd -0x80(%rbp), %xmm0
movsd -0x10(%rbp), %xmm1
movsd -0x8(%rbp), %xmm2
callq 0x3e640
testb $0x1, %al
jne 0xc889
jmp 0xc8a8
xorl %edi, %edi
callq 0x2ddd0
testb $0x1, %al
jne 0xc896
jmp 0xc89f
movl $0x2, -0x30(%rbp)
jmp 0xc8a6
movl $0x1, -0x30(%rbp)
jmp 0xc8a8
jmp 0xc8aa
testb $0x1, -0x29(%rbp)
jne 0xc8ce
movl -0x38(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0xc8be
movl -0x24(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x28(%rbp), %eax
jle 0xc8cc
movl -0x28(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0xc8ce
movl -0x24(%rbp), %edx
movl -0x28(%rbp), %ecx
movsd -0x48(%rbp), %xmm0
movsd -0x40(%rbp), %xmm1
movzbl -0x29(%rbp), %r8d
andl $0x1, %r8d
xorl %eax, %eax
movl %eax, %edi
leaq -0x38(%rbp), %rsi
callq 0xca90
movb %al, -0x31(%rbp)
movl $0x2, %edi
movl %edi, -0xb8(%rbp)
movl $0xc, %esi
movl %esi, -0xbc(%rbp)
callq 0x6f90
movl -0xb8(%rbp), %edi
movl %eax, -0x84(%rbp)
movl $0xe, %esi
movl %esi, -0xb4(%rbp)
callq 0x6f90
movl -0xbc(%rbp), %esi
movl %eax, -0x88(%rbp)
movl $0xb, %edi
callq 0x6f90
movl -0xbc(%rbp), %esi
movl -0xb8(%rbp), %edi
movl %eax, %edx
callq 0x6ee0
movl -0xb8(%rbp), %edi
movl -0xb4(%rbp), %esi
movl $0x1, %edx
callq 0x6ee0
movsd -0x58(%rbp), %xmm0
movsd -0x50(%rbp), %xmm1
leaq 0x7f7c8(%rip), %rdi     # 0x8c146
callq 0x73e0
testb $0x1, %al
jne 0xc989
jmp 0xc992
movl -0x38(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x38(%rbp)
movsd -0x68(%rbp), %xmm0
movsd -0x60(%rbp), %xmm1
leaq 0x7f7a5(%rip), %rdi     # 0x8c148
callq 0x73e0
testb $0x1, %al
jne 0xc9ae
jmp 0xc9b7
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl -0x88(%rbp), %edx
movl $0x2, %edi
movl $0xe, %esi
callq 0x6ee0
movl -0x84(%rbp), %edx
movl $0x2, %edi
movl $0xc, %esi
callq 0x6ee0
cmpq $0x0, -0x18(%rbp)
je 0xca72
movq -0x18(%rbp), %rax
movq %rax, -0xc8(%rbp)
movl $0xb, %edi
movl $0xe, %esi
callq 0x6f90
subl $0x2, %eax
setne %al
movzbl %al, %eax
addl %eax, %eax
movl %eax, -0xc0(%rbp)
movl -0x30(%rbp), %ecx
movl %ecx, %eax
leal 0x2(%rax,%rax,2), %esi
movl $0x1, %edi
callq 0x6f90
movl %eax, %edi
callq 0x526e0
movl %eax, -0x90(%rbp)
movss 0xbb9d1(%rip), %xmm0    # 0xc8410
movl -0x90(%rbp), %edi
callq 0x51fa0
movq -0xc8(%rbp), %rdi
movl -0xc0(%rbp), %esi
movl %eax, -0x8c(%rbp)
movsd -0x78(%rbp), %xmm0
movsd -0x70(%rbp), %xmm1
movl -0x8c(%rbp), %edx
callq 0x9cf0
movl -0x38(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movb -0x31(%rbp), %al
andb $0x1, %al
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax)