// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movaps %xmm1, %xmm3
movaps %xmm0, 0x30(%rsp)
movl 0x98a51(%rip), %r15d    # 0xa4250
cmpb $0x1, 0x98a4f(%rip)     # 0xa4255
jne 0xb811
movl 0x98d61(%rip), %r14d    # 0xa4570
jmp 0xb846
movaps %xmm1, (%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm3, 0x20(%rsp)
callq 0x6a3c
movl 0x98d45(%rip), %r14d    # 0xa4570
cmpb $0x1, 0x98a23(%rip)     # 0xa4255
jne 0xbb0b
movaps 0x20(%rsp), %xmm3
movaps 0x10(%rsp), %xmm0
movaps (%rsp), %xmm1
movl 0x98d28(%rip), %eax     # 0xa4574
addl %eax, %r14d
cvtsi2ss %r14d, %xmm2
movaps %xmm3, %xmm4
subss %xmm2, %xmm4
subss %xmm2, %xmm1
movaps %xmm1, (%rsp)
addss 0x30(%rsp), %xmm4
xorps %xmm2, %xmm2
cvtsi2ss %eax, %xmm2
addss %xmm4, %xmm2
movss %xmm2, %xmm0            # xmm0 = xmm2[0],xmm0[1,2,3]
movaps %xmm0, 0x10(%rsp)
movl 0x98ced(%rip), %eax     # 0xa4570
cvtsi2ss %eax, %xmm3
movaps %xmm3, 0x20(%rsp)
xorl %r12d, %r12d
leaq 0x54(%rsp), %r14
movl %r12d, (%r14)
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xb11b
movl (%r14), %r14d
leal -0x1(%r14), %ebx
cmpl %ebp, %r14d
cmovgl %ebp, %ebx
testl %ebp, %ebp
cmovsl %r12d, %ebx
cmpl $0x3, %r15d
jne 0xb8c5
movl $0x3, %r15d
jmp 0xb935
cmpl $0x2, %r14d
setl %al
orb 0x98982(%rip), %al      # 0xa4254
testb $0x1, %al
jne 0xb935
callq 0x26136
movaps %xmm0, 0x40(%rsp)
movaps 0x30(%rsp), %xmm1
movaps (%rsp), %xmm2
callq 0x320c1
testb %al, %al
jne 0xb90a
movaps 0x40(%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
movaps 0x20(%rsp), %xmm2
callq 0x320c1
testb %al, %al
je 0xb935
xorl %ebp, %ebp
xorl %edi, %edi
callq 0x2bccc
leal 0x1(%rbx), %r12d
cmpl %r14d, %r12d
cmovgel %ebp, %r12d
testb %al, %al
cmovel %ebx, %r12d
xorl %edi, %edi
callq 0x2615e
movzbl %al, %r15d
incl %r15d
movl %r12d, %ebx
cmpb $0x1, 0x98919(%rip)     # 0xa4255
jne 0xb946
movl 0x98c1c(%rip), %ebp     # 0xa4560
jmp 0xb95f
callq 0x6a3c
movl 0x98c0f(%rip), %ebp     # 0xa4560
cmpb $0x0, 0x988fd(%rip)     # 0xa4255
jne 0xb95f
callq 0x6a3c
leal (%r15,%r15,2), %r12d
movslq %r12d, %rax
leaq 0x98923(%rip), %r13     # 0xa4290
movl 0x2a0(%r13,%rax,4), %edi
callq 0x4144d
movss 0x97aae(%rip), %xmm0    # 0xa3430
movl %eax, %edi
callq 0x41122
movl %eax, %r15d
cmpb $0x0, 0x988c2(%rip)     # 0xa4255
jne 0xb99a
callq 0x6a3c
leal 0xa9(%r12), %eax
cltq
movl (%r13,%rax,4), %edi
callq 0x4144d
movss 0x97a7a(%rip), %xmm0    # 0xa3430
movl %eax, %edi
callq 0x41122
movaps 0x30(%rsp), %xmm0
movaps (%rsp), %xmm1
movl %ebp, %edi
movl %r15d, %esi
movl %eax, %edx
callq 0x7ee9
movslq %ebx, %rax
leaq 0x98ec4(%rip), %rcx     # 0xa48a0
movq (%rcx,%rax,8), %r15
movl $0x7, %edi
movaps 0x30(%rsp), %xmm0
movaps (%rsp), %xmm1
callq 0xa726
movaps %xmm0, (%rsp)
movaps %xmm1, 0x30(%rsp)
cmpb $0x1, 0x98852(%rip)     # 0xa4255
jne 0xba0d
movl 0x98b5d(%rip), %ebp     # 0xa4568
jmp 0xba26
callq 0x6a3c
movl 0x98b50(%rip), %ebp     # 0xa4568
cmpb $0x0, 0x98836(%rip)     # 0xa4255
jne 0xba26
callq 0x6a3c
addl $0xaa, %r12d
movslq %r12d, %rax
movl (%r13,%rax,4), %edi
callq 0x4144d
movss 0x979ee(%rip), %xmm0    # 0xa3430
movl %eax, %edi
callq 0x41122
movq %r15, %rdi
movaps (%rsp), %xmm0
movaps 0x30(%rsp), %xmm1
movl %ebp, %esi
movl %eax, %edx
callq 0xa506
cmpb $0x1, 0x987f0(%rip)     # 0xa4255
jne 0xba6f
movl 0x98913(%rip), %ebp     # 0xa4380
jmp 0xba87
callq 0x6a3c
movl 0x98906(%rip), %ebp     # 0xa4380
cmpb $0x1, 0x987d4(%rip)     # 0xa4255
jne 0xbb52
movl 0x988fa(%rip), %r15d    # 0xa4388
movl $0x1, 0x988e8(%rip)     # 0xa4380
movl $0x1, 0x988e6(%rip)     # 0xa4388
leal 0x1(%rbx), %esi
leaq 0x598fc(%rip), %rdi     # 0x653a8
movl %r14d, %edx
xorl %eax, %eax
callq 0x4dfb7
movaps 0x10(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movq %rax, %rdi
callq 0x7be9
cmpb $0x1, 0x98786(%rip)     # 0xa4255
jne 0xbada
movl %r15d, 0x988b0(%rip)    # 0xa4388
jmp 0xbaf4
callq 0x6a3c
movl %r15d, 0x988a2(%rip)    # 0xa4388
cmpb $0x0, 0x98768(%rip)     # 0xa4255
jne 0xbaf4
callq 0x6a3c
movl %ebp, 0x98886(%rip)     # 0xa4380
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x6a3c
movl 0x98a5e(%rip), %eax     # 0xa4574
addl %eax, %r14d
xorps %xmm0, %xmm0
cvtsi2ss %r14d, %xmm0
movaps 0x20(%rsp), %xmm3
movaps %xmm3, %xmm4
subss %xmm0, %xmm4
movaps (%rsp), %xmm1
subss %xmm0, %xmm1
addss 0x30(%rsp), %xmm4
cmpb $0x1, 0x98713(%rip)     # 0xa4255
movaps %xmm1, (%rsp)
jne 0xbb91
movaps 0x10(%rsp), %xmm0
jmp 0xb869
callq 0x6a3c
movl 0x9882a(%rip), %r15d    # 0xa4388
cmpb $0x1, 0x986f0(%rip)     # 0xa4255
je 0xba8e
callq 0x6a3c
movl $0x1, 0x98806(%rip)     # 0xa4380
cmpb $0x0, 0x986d4(%rip)     # 0xa4255
jne 0xba98
callq 0x6a3c
jmp 0xba98
movaps %xmm4, 0x40(%rsp)
callq 0x6a3c
xorps %xmm0, %xmm0
cvtsi2ssl 0x989ce(%rip), %xmm0 # 0xa4574
movaps 0x40(%rsp), %xmm1
addss %xmm0, %xmm1
movaps 0x10(%rsp), %xmm0
movss %xmm1, %xmm0            # xmm0 = xmm1[0],xmm0[1,2,3]
movaps %xmm0, 0x10(%rsp)
cmpb $0x0, 0x98691(%rip)     # 0xa4255
jne 0xbbcb
callq 0x6a3c
movaps 0x20(%rsp), %xmm3
jmp 0xb87d