// File: /workspace/github_c_makefile_star2_O0/arkanis[P]process-map/./deps/raygui.h
// Function: GuiComboBox
int GuiComboBox(Rectangle bounds, const char *text, int active)
{
    GuiControlState state = guiState;

    bounds.width -= (GuiGetStyle(COMBOBOX, COMBO_BUTTON_WIDTH) + GuiGetStyle(COMBOBOX, COMBO_BUTTON_PADDING));

    Rectangle selector = { (float)bounds.x + bounds.width + GuiGetStyle(COMBOBOX, COMBO_BUTTON_PADDING),
                           (float)bounds.y, (float)GuiGetStyle(COMBOBOX, COMBO_BUTTON_WIDTH), (float)bounds.height };

    // Get substrings items from text (items pointers, lengths and count)
    int itemsCount = 0;
    const char **items = GuiTextSplit(text, &itemsCount, NULL);

    if (active < 0) active = 0;
    else if (active > itemsCount - 1) active = itemsCount - 1;

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

        if (CheckCollisionPointRec(mousePoint, bounds) ||
            CheckCollisionPointRec(mousePoint, selector))
        {
            if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON))
            {
                active += 1;
                if (active >= itemsCount) active = 0;
            }

            if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) state = GUI_STATE_PRESSED;
            else state = GUI_STATE_FOCUSED;
        }
    }
    //--------------------------------------------------------------------

    // Draw control
    //--------------------------------------------------------------------
    // Draw combo box main
    GuiDrawRectangle(bounds, GuiGetStyle(COMBOBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(COMBOBOX, BORDER + (state*3))), guiAlpha), Fade(GetColor(GuiGetStyle(COMBOBOX, BASE + (state*3))), guiAlpha));
    GuiDrawText(items[active], GetTextBounds(COMBOBOX, bounds), GuiGetStyle(COMBOBOX, TEXT_ALIGNMENT), Fade(GetColor(GuiGetStyle(COMBOBOX, TEXT + (state*3))), guiAlpha));

    // Draw selector using a custom button
    // NOTE: BORDER_WIDTH and TEXT_ALIGNMENT forced values
    int tempBorderWidth = GuiGetStyle(BUTTON, BORDER_WIDTH);
    int tempTextAlign = GuiGetStyle(BUTTON, TEXT_ALIGNMENT);
    GuiSetStyle(BUTTON, BORDER_WIDTH, 1);
    GuiSetStyle(BUTTON, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER);

    GuiButton(selector, TextFormat("%i/%i", active + 1, itemsCount));

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

    return active;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movlpd %xmm0, -0x10(%rbp)
movlpd %xmm1, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movl 0xbef4e(%rip), %eax     # 0xca0e0
movl %eax, -0x20(%rbp)
movl $0x7, %edi
movl $0x10, %esi
callq 0x6f90
movl %eax, -0x80(%rbp)
movl $0x7, %edi
movl $0x11, %esi
callq 0x6f90
movl %eax, %ecx
movl -0x80(%rbp), %eax
addl %ecx, %eax
cvtsi2ss %eax, %xmm1
movss -0x8(%rbp), %xmm0
subss %xmm1, %xmm0
movss %xmm0, -0x8(%rbp)
movss -0x10(%rbp), %xmm0
addss -0x8(%rbp), %xmm0
movss %xmm0, -0x7c(%rbp)
movl $0x7, %edi
movl $0x11, %esi
callq 0x6f90
movss -0x7c(%rbp), %xmm0
cvtsi2ss %eax, %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x30(%rbp)
movss -0xc(%rbp), %xmm0
movss %xmm0, -0x2c(%rbp)
movl $0x7, %edi
movl $0x10, %esi
callq 0x6f90
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x28(%rbp)
movss -0x4(%rbp), %xmm0
movss %xmm0, -0x24(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x34(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xaac0
movq %rax, -0x40(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0xb256
movl $0x0, -0x1c(%rbp)
jmp 0xb26e
movl -0x1c(%rbp), %eax
movl -0x34(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jle 0xb26c
movl -0x34(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xb26e
cmpl $0x3, -0x20(%rbp)
je 0xb313
testb $0x1, 0xbee65(%rip)     # 0xca0e4
jne 0xb313
cmpl $0x1, -0x34(%rbp)
jle 0xb313
callq 0x2dd60
movlpd %xmm0, -0x48(%rbp)
movsd -0x48(%rbp), %xmm0
movsd -0x10(%rbp), %xmm1
movsd -0x8(%rbp), %xmm2
callq 0x3e640
testb $0x1, %al
jne 0xb2cb
movsd -0x48(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
movsd -0x28(%rbp), %xmm2
callq 0x3e640
testb $0x1, %al
jne 0xb2cb
jmp 0xb311
xorl %edi, %edi
callq 0x34bb0
testb $0x1, %al
jne 0xb2d8
jmp 0xb2f2
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x34(%rbp), %eax
jl 0xb2f0
movl $0x0, -0x1c(%rbp)
jmp 0xb2f2
xorl %edi, %edi
callq 0x2ddd0
testb $0x1, %al
jne 0xb2ff
jmp 0xb308
movl $0x2, -0x20(%rbp)
jmp 0xb30f
movl $0x1, -0x20(%rbp)
jmp 0xb311
jmp 0xb313
movl $0x7, %edi
movl %edi, -0xa4(%rbp)
movl $0xc, %esi
movl %esi, -0x90(%rbp)
callq 0x6f90
movl -0xa4(%rbp), %edi
movl %eax, -0xa8(%rbp)
movl -0x20(%rbp), %ecx
movl %ecx, %eax
leal (%rax,%rax,2), %esi
callq 0x6f90
movl %eax, %edi
callq 0x526e0
movl %eax, -0x50(%rbp)
movss 0xbd0b7(%rip), %xmm0    # 0xc8410
movl -0x50(%rbp), %edi
callq 0x51fa0
movl -0xa4(%rbp), %edi
movl %eax, -0x4c(%rbp)
movl -0x20(%rbp), %ecx
movl %ecx, %eax
leal 0x1(%rax,%rax,2), %esi
callq 0x6f90
movl %eax, %edi
callq 0x526e0
movl %eax, -0x58(%rbp)
movss 0xbd086(%rip), %xmm0    # 0xc8410
movl -0x58(%rbp), %edi
callq 0x51fa0
movl -0xa8(%rbp), %edi
movl %eax, -0x54(%rbp)
movsd -0x10(%rbp), %xmm0
movsd -0x8(%rbp), %xmm1
movl -0x4c(%rbp), %esi
movl -0x54(%rbp), %edx
callq 0x77c0
movl -0xa4(%rbp), %edi
movq -0x40(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xa0(%rbp)
movsd -0x10(%rbp), %xmm0
movsd -0x8(%rbp), %xmm1
callq 0x9f70
movl -0xa4(%rbp), %edi
movlpd %xmm0, -0x68(%rbp)
movlpd %xmm1, -0x60(%rbp)
movl $0xe, %esi
movl %esi, -0x88(%rbp)
callq 0x6f90
movl -0xa4(%rbp), %edi
movl %eax, -0x94(%rbp)
movl -0x20(%rbp), %ecx
movl %ecx, %eax
leal 0x2(%rax,%rax,2), %esi
callq 0x6f90
movl %eax, %edi
callq 0x526e0
movl %eax, -0x70(%rbp)
movss 0xbcfec(%rip), %xmm0    # 0xc8410
movl -0x70(%rbp), %edi
callq 0x51fa0
movq -0xa0(%rbp), %rdi
movl -0x94(%rbp), %esi
movl %eax, -0x6c(%rbp)
movsd -0x68(%rbp), %xmm0
movsd -0x60(%rbp), %xmm1
movl -0x6c(%rbp), %edx
callq 0x9cf0
movl -0x90(%rbp), %esi
movl $0x2, %edi
movl %edi, -0x8c(%rbp)
callq 0x6f90
movl -0x8c(%rbp), %edi
movl -0x88(%rbp), %esi
movl %eax, -0x74(%rbp)
callq 0x6f90
movl -0x90(%rbp), %esi
movl -0x8c(%rbp), %edi
movl %eax, -0x78(%rbp)
movl $0x1, %edx
movl %edx, -0x84(%rbp)
callq 0x6ee0
movl -0x8c(%rbp), %edi
movl -0x88(%rbp), %esi
movl -0x84(%rbp), %edx
callq 0x6ee0
movl -0x1c(%rbp), %esi
incl %esi
movl -0x34(%rbp), %edx
leaq 0x80c83(%rip), %rdi     # 0x8c140
xorl %eax, %eax
callq 0x65400
movq %rax, %rdi
movsd -0x30(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
callq 0x73e0
movl -0x78(%rbp), %edx
movl $0x2, %edi
movl $0xe, %esi
callq 0x6ee0
movl -0x74(%rbp), %edx
movl $0x2, %edi
movl $0xc, %esi
callq 0x6ee0
movl -0x1c(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)