// File: /workspace/github_c_makefile_star2_O1/arkanis[P]process-map/./deps/raygui.h
// Function: GuiDropdownBox
bool GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMode)
{
    GuiControlState state = guiState;
    int itemSelected = *active;
    int itemFocused = -1;

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

    Rectangle boundsOpen = bounds;
    boundsOpen.height = (itemsCount + 1)*(bounds.height + GuiGetStyle(DROPDOWNBOX, DROPDOWN_ITEMS_PADDING));

    Rectangle itemBounds = bounds;

    bool pressed = false;       // Check mouse button pressed

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

        if (editMode)
        {
            state = GUI_STATE_PRESSED;

            // Check if mouse has been pressed or released outside limits
            if (!CheckCollisionPointRec(mousePoint, boundsOpen))
            {
                if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON) || IsMouseButtonReleased(MOUSE_LEFT_BUTTON)) pressed = true;
            }

            // Check if already selected item has been pressed again
            if (CheckCollisionPointRec(mousePoint, bounds) && IsMouseButtonPressed(MOUSE_LEFT_BUTTON)) pressed = true;

            // Check focused and selected item
            for (int i = 0; i < itemsCount; i++)
            {
                // Update item rectangle y position for next item
                itemBounds.y += (bounds.height + GuiGetStyle(DROPDOWNBOX, DROPDOWN_ITEMS_PADDING));

                if (CheckCollisionPointRec(mousePoint, itemBounds))
                {
                    itemFocused = i;
                    if (IsMouseButtonReleased(MOUSE_LEFT_BUTTON))
                    {
                        itemSelected = i;
                        pressed = true;     // Item selected, change to editMode = false
                    }
                    break;
                }
            }

            itemBounds = bounds;
        }
        else
        {
            if (CheckCollisionPointRec(mousePoint, bounds))
            {
                if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON))
                {
                    pressed = true;
                    state = GUI_STATE_PRESSED;
                }
                else state = GUI_STATE_FOCUSED;
            }
        }
    }
    //--------------------------------------------------------------------

    // Draw control
    //--------------------------------------------------------------------
    if (editMode) GuiPanel(boundsOpen);

    GuiDrawRectangle(bounds, GuiGetStyle(DROPDOWNBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(DROPDOWNBOX, BORDER + state*3)), guiAlpha), Fade(GetColor(GuiGetStyle(DROPDOWNBOX, BASE + state*3)), guiAlpha));
    GuiDrawText(items[itemSelected], GetTextBounds(DEFAULT, bounds), GuiGetStyle(DROPDOWNBOX, TEXT_ALIGNMENT), Fade(GetColor(GuiGetStyle(DROPDOWNBOX, TEXT + state*3)), guiAlpha));

    if (editMode)
    {
        // Draw visible items
        for (int i = 0; i < itemsCount; i++)
        {
            // Update item rectangle y position for next item
            itemBounds.y += (bounds.height + GuiGetStyle(DROPDOWNBOX, DROPDOWN_ITEMS_PADDING));

            if (i == itemSelected)
            {
                GuiDrawRectangle(itemBounds, GuiGetStyle(DROPDOWNBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(DROPDOWNBOX, BORDER_COLOR_PRESSED)), guiAlpha), Fade(GetColor(GuiGetStyle(DROPDOWNBOX, BASE_COLOR_PRESSED)), guiAlpha));
                GuiDrawText(items[i], GetTextBounds(DEFAULT, itemBounds), GuiGetStyle(DROPDOWNBOX, TEXT_ALIGNMENT), Fade(GetColor(GuiGetStyle(DROPDOWNBOX, TEXT_COLOR_PRESSED)), guiAlpha));
            }
            else if (i == itemFocused)
            {
                GuiDrawRectangle(itemBounds, GuiGetStyle(DROPDOWNBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(DROPDOWNBOX, BORDER_COLOR_FOCUSED)), guiAlpha), Fade(GetColor(GuiGetStyle(DROPDOWNBOX, BASE_COLOR_FOCUSED)), guiAlpha));
                GuiDrawText(items[i], GetTextBounds(DEFAULT, itemBounds), GuiGetStyle(DROPDOWNBOX, TEXT_ALIGNMENT), Fade(GetColor(GuiGetStyle(DROPDOWNBOX, TEXT_COLOR_FOCUSED)), guiAlpha));
            }
            else GuiDrawText(items[i], GetTextBounds(DEFAULT, itemBounds), GuiGetStyle(DROPDOWNBOX, TEXT_ALIGNMENT), Fade(GetColor(GuiGetStyle(DROPDOWNBOX, TEXT_COLOR_NORMAL)), guiAlpha));
        }
    }

    // TODO: Avoid this function, use icon instead or 'v'
    DrawTriangle(RAYGUI_CLITERAL(Vector2){ bounds.x + bounds.width - GuiGetStyle(DROPDOWNBOX, ARROW_PADDING), bounds.y + bounds.height/2 - 2 },
                 RAYGUI_CLITERAL(Vector2){ bounds.x + bounds.width - GuiGetStyle(DROPDOWNBOX, ARROW_PADDING) + 5, bounds.y + bounds.height/2 - 2 + 5 },
                 RAYGUI_CLITERAL(Vector2){ bounds.x + bounds.width - GuiGetStyle(DROPDOWNBOX, ARROW_PADDING) + 10, bounds.y + bounds.height/2 - 2 },
                 Fade(GetColor(GuiGetStyle(DROPDOWNBOX, TEXT + (state*3))), guiAlpha));

    //GuiDrawText("v", RAYGUI_CLITERAL(Rectangle){ bounds.x + bounds.width - GuiGetStyle(DROPDOWNBOX, ARROW_PADDING), bounds.y + bounds.height/2 - 2, 10, 10 },
    //            GUI_TEXT_ALIGN_CENTER, Fade(GetColor(GuiGetStyle(DROPDOWNBOX, TEXT + (state*3))), guiAlpha));
    //--------------------------------------------------------------------

    *active = itemSelected;
    return pressed;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %edx, %r14d
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x20(%rsp)
movaps %xmm1, %xmm0
shufps $0x55, %xmm1, %xmm0     # xmm0 = xmm0[1,1],xmm1[1,1]
movaps %xmm0, 0x60(%rsp)
movl 0x9c7de(%rip), %r12d    # 0xa7250
movq %rsi, 0x78(%rsp)
movl (%rsi), %eax
movl %eax, 0xc(%rsp)
leaq 0x84(%rsp), %r15
movl $0x0, (%r15)
movq %r15, %rsi
xorl %edx, %edx
callq 0xa184
movl (%r15), %ebp
leal 0x1(%rbp), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
cmpb $0x0, 0x9c7ab(%rip)     # 0xa7255
jne 0xaabd
movss %xmm0, 0x10(%rsp)
callq 0x6a18
movss 0x10(%rsp), %xmm0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
xorps %xmm1, %xmm1
cvtsi2ssl 0x9cb07(%rip), %xmm1 # 0xa75d4
addss 0x60(%rsp), %xmm1
mulss %xmm0, %xmm1
movaps 0x20(%rsp), %xmm0
movlhps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
shufps $0xe2, %xmm0, %xmm1     # xmm1 = xmm1[2,0],xmm0[2,3]
cmpl $0x3, %r12d
jne 0xaaf1
movl $0x3, %r12d
jmp 0xab05
cmpl $0x2, %ebp
setl %al
orb 0x9c757(%rip), %al      # 0xa7254
testb $0x1, %al
je 0xb036
movl $0x0, 0x8(%rsp)
testb %r14b, %r14b
je 0xab1c
movaps 0x50(%rsp), %xmm0
callq 0x71a0
cmpb $0x0, 0x9c732(%rip)     # 0xa7255
jne 0xab2a
callq 0x6a18
movl 0x9ca8f(%rip), %r15d    # 0xa75c0
leal (%r12,%r12,2), %r13d
cmpb $0x0, 0x9c719(%rip)     # 0xa7255
jne 0xab43
callq 0x6a18
movslq %r13d, %rax
leaq 0x9c743(%rip), %rcx     # 0xa7290
movl 0x300(%rcx,%rax,4), %edi
callq 0x44152
movss 0x9b8cf(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
movl %eax, %r12d
cmpb $0x0, 0x9c6e3(%rip)     # 0xa7255
jne 0xab79
callq 0x6a18
leal 0xc1(%r13), %eax
cltq
leaq 0x9c707(%rip), %rcx     # 0xa7290
movl (%rcx,%rax,4), %edi
callq 0x44152
movss 0x9b897(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
movaps 0x50(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movl %r15d, %edi
movl %r12d, %esi
movl %eax, %edx
callq 0x7546
movslq 0xc(%rsp), %rax
leaq 0x9ccdd(%rip), %rcx     # 0xa78a0
movq (%rcx,%rax,8), %r15
xorl %edi, %edi
movaps 0x50(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
callq 0x982d
movaps %xmm0, 0x10(%rsp)
movaps %xmm1, 0x40(%rsp)
cmpb $0x0, 0x9c66c(%rip)     # 0xa7255
jne 0xabf0
callq 0x6a18
movl 0x9c9d1(%rip), %r12d    # 0xa75c8
cmpb $0x0, 0x9c657(%rip)     # 0xa7255
jne 0xac05
callq 0x6a18
addl $0xc2, %r13d
movslq %r13d, %rcx
leaq 0x9c67a(%rip), %rax     # 0xa7290
movq %rcx, 0x70(%rsp)
movl (%rax,%rcx,4), %edi
callq 0x44152
movss 0x9b805(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
movq %r15, %rdi
movaps 0x10(%rsp), %xmm0
movaps 0x40(%rsp), %xmm1
movl %r12d, %esi
movl %eax, %edx
callq 0x95ee
testl %ebp, %ebp
setg %al
andb %al, %r14b
cmpb $0x1, %r14b
jne 0xaefd
movl 0xc(%rsp), %r12d
shlq $0x3, %r12
shlq $0x3, %rbx
shlq $0x3, %rbp
xorl %r13d, %r13d
movaps 0x50(%rsp), %xmm0
movaps %xmm0, 0x10(%rsp)
movaps 0x10(%rsp), %xmm2
cmpb $0x0, 0x9c5d0(%rip)     # 0xa7255
jne 0xac96
movaps %xmm2, 0x10(%rsp)
callq 0x6a18
movaps 0x10(%rsp), %xmm2
xorps %xmm0, %xmm0
cvtsi2ssl 0x9c933(%rip), %xmm0 # 0xa75d4
addss 0x60(%rsp), %xmm0
movaps %xmm2, %xmm1
shufps $0x55, %xmm2, %xmm1     # xmm1 = xmm1[1,1],xmm2[1,1]
addss %xmm0, %xmm1
movlhps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0]
shufps $0xe2, %xmm2, %xmm1     # xmm1 = xmm1[2,0],xmm2[2,3]
movaps %xmm1, 0x10(%rsp)
cmpq %r13, %r12
jne 0xad9b
cmpb $0x0, 0x9c587(%rip)     # 0xa7255
jne 0xacd5
callq 0x6a18
movl 0x9c8e4(%rip), %r14d    # 0xa75c0
cmpb $0x0, 0x9c572(%rip)     # 0xa7255
jne 0xacea
callq 0x6a18
movl 0x9c8b8(%rip), %edi     # 0xa75a8
callq 0x44152
movss 0x9b733(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
movl %eax, %r15d
cmpb $0x0, 0x9c547(%rip)     # 0xa7255
jne 0xad15
callq 0x6a18
movl 0x9c891(%rip), %edi     # 0xa75ac
callq 0x44152
movss 0x9b708(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
movaps 0x10(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movl %r14d, %edi
movl %r15d, %esi
movl %eax, %edx
callq 0x7546
leaq 0x9cb53(%rip), %rax     # 0xa78a0
movq (%r13,%rax), %r14
xorl %edi, %edi
movaps 0x10(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
callq 0x982d
movaps %xmm0, 0x40(%rsp)
movaps %xmm1, 0x30(%rsp)
cmpb $0x0, 0x9c4e1(%rip)     # 0xa7255
jne 0xad7b
callq 0x6a18
movl 0x9c846(%rip), %r15d    # 0xa75c8
cmpb $0x0, 0x9c4cc(%rip)     # 0xa7255
jne 0xad90
callq 0x6a18
movl 0x9c81a(%rip), %edi     # 0xa75b0
jmp 0xaec5
cmpq %r13, %rbx
jne 0xae75
cmpb $0x0, 0x9c4aa(%rip)     # 0xa7255
jne 0xadb2
callq 0x6a18
movl 0x9c807(%rip), %r14d    # 0xa75c0
cmpb $0x0, 0x9c495(%rip)     # 0xa7255
jne 0xadc7
callq 0x6a18
movl 0x9c7cf(%rip), %edi     # 0xa759c
callq 0x44152
movss 0x9b656(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
movl %eax, %r15d
cmpb $0x0, 0x9c46a(%rip)     # 0xa7255
jne 0xadf2
callq 0x6a18
movl 0x9c7a8(%rip), %edi     # 0xa75a0
callq 0x44152
movss 0x9b62b(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
movaps 0x10(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movl %r14d, %edi
movl %r15d, %esi
movl %eax, %edx
callq 0x7546
leaq 0x9ca76(%rip), %rax     # 0xa78a0
movq (%r13,%rax), %r14
xorl %edi, %edi
movaps 0x10(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
callq 0x982d
movaps %xmm0, 0x40(%rsp)
movaps %xmm1, 0x30(%rsp)
cmpb $0x0, 0x9c404(%rip)     # 0xa7255
jne 0xae58
callq 0x6a18
movl 0x9c769(%rip), %r15d    # 0xa75c8
cmpb $0x0, 0x9c3ef(%rip)     # 0xa7255
jne 0xae6d
callq 0x6a18
movl 0x9c731(%rip), %edi     # 0xa75a4
jmp 0xaec5
leaq 0x9ca24(%rip), %rax     # 0xa78a0
movq (%r13,%rax), %r14
xorl %edi, %edi
movaps 0x10(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
callq 0x982d
movaps %xmm0, 0x40(%rsp)
movaps %xmm1, 0x30(%rsp)
cmpb $0x0, 0x9c3b2(%rip)     # 0xa7255
jne 0xaeaa
callq 0x6a18
movl 0x9c717(%rip), %r15d    # 0xa75c8
cmpb $0x0, 0x9c39d(%rip)     # 0xa7255
jne 0xaebf
callq 0x6a18
movl 0x9c6d3(%rip), %edi     # 0xa7598
callq 0x44152
movss 0x9b55e(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
movq %r14, %rdi
movaps 0x40(%rsp), %xmm0
movaps 0x30(%rsp), %xmm1
movl %r15d, %esi
movl %eax, %edx
callq 0x95ee
addq $0x8, %r13
cmpq %r13, %rbp
jne 0xac79
cmpb $0x0, 0x9c351(%rip)     # 0xa7255
jne 0xaf0b
callq 0x6a18
movl 0x9c6bf(%rip), %ebx     # 0xa75d0
cmpb $0x0, 0x9c33d(%rip)     # 0xa7255
movl 0x8(%rsp), %r15d
jne 0xaf24
callq 0x6a18
movl 0x9c6a6(%rip), %ebp     # 0xa75d0
cmpb $0x0, 0x9c324(%rip)     # 0xa7255
jne 0xaf38
callq 0x6a18
movl 0x9c691(%rip), %r14d    # 0xa75d0
cmpb $0x0, 0x9c30f(%rip)     # 0xa7255
jne 0xaf4d
callq 0x6a18
movaps 0x50(%rsp), %xmm1
movaps %xmm1, %xmm2
addss 0x20(%rsp), %xmm2
xorps %xmm0, %xmm0
cvtsi2ss %r14d, %xmm0
movaps %xmm2, %xmm3
subss %xmm0, %xmm3
movaps 0x60(%rsp), %xmm0
mulss 0x5d099(%rip), %xmm0    # 0x68010
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
addss %xmm1, %xmm0
addss 0x5d0ad(%rip), %xmm0    # 0x68034
movaps %xmm0, %xmm4
movaps %xmm0, 0x60(%rsp)
xorps %xmm0, %xmm0
cvtsi2ss %ebp, %xmm0
movaps %xmm2, %xmm1
subss %xmm0, %xmm1
movss 0x5d093(%rip), %xmm0    # 0x68038
addss %xmm0, %xmm1
addss %xmm4, %xmm0
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movaps %xmm1, 0x10(%rsp)
xorps %xmm0, %xmm0
cvtsi2ss %ebx, %xmm0
addss 0x5d054(%rip), %xmm3    # 0x68018
movaps %xmm3, 0x20(%rsp)
subss %xmm0, %xmm2
movaps %xmm2, 0x40(%rsp)
leaq 0x9c2b7(%rip), %rax     # 0xa7290
movq 0x70(%rsp), %rcx
movl (%rax,%rcx,4), %edi
callq 0x44152
movss 0x9b442(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
movaps 0x60(%rsp), %xmm1
movaps 0x40(%rsp), %xmm0
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movaps 0x20(%rsp), %xmm2
unpcklps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
movaps 0x10(%rsp), %xmm1
movl %eax, %edi
callq 0x340b1
movq 0x78(%rsp), %rax
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
movl %r15d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movaps %xmm1, 0x30(%rsp)
callq 0x2867d
testb %r14b, %r14b
je 0xb062
movaps %xmm0, 0x40(%rsp)
movaps 0x50(%rsp), %xmm1
movaps 0x30(%rsp), %xmm2
callq 0x34d6b
testb %al, %al
je 0xb090
xorl %r15d, %r15d
jmp 0xb0ac
movaps 0x50(%rsp), %xmm1
movaps 0x20(%rsp), %xmm2
callq 0x34d6b
testb %al, %al
je 0xb15a
xorl %edi, %edi
callq 0x2e834
movl %eax, 0x8(%rsp)
movzbl %al, %r12d
incl %r12d
jmp 0xb162
xorl %edi, %edi
callq 0x2e834
testb %al, %al
jne 0xb0a9
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x2e875
testb %al, %al
je 0xb0ac
movb $0x1, %r15b
movaps 0x40(%rsp), %xmm0
movaps 0x50(%rsp), %xmm1
movaps 0x20(%rsp), %xmm2
callq 0x34d6b
testb %al, %al
je 0xb0db
xorl %edi, %edi
callq 0x2e834
movzbl %r15b, %ecx
testb %al, %al
movl $0x1, %r15d
cmovel %ecx, %r15d
movaps 0x30(%rsp), %xmm1
testl %ebp, %ebp
jle 0xb16c
xorl %ebx, %ebx
movaps 0x50(%rsp), %xmm2
cmpb $0x0, 0x9c15f(%rip)     # 0xa7255
jne 0xb107
movaps %xmm2, 0x10(%rsp)
callq 0x6a18
movaps 0x10(%rsp), %xmm2
xorps %xmm0, %xmm0
cvtsi2ssl 0x9c4c2(%rip), %xmm0 # 0xa75d4
addss 0x60(%rsp), %xmm0
movaps %xmm2, %xmm1
shufps $0x55, %xmm2, %xmm1     # xmm1 = xmm1[1,1],xmm2[1,1]
addss %xmm0, %xmm1
movlhps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0]
shufps $0xe2, %xmm2, %xmm1     # xmm1 = xmm1[2,0],xmm2[2,3]
movaps 0x40(%rsp), %xmm0
movaps %xmm1, 0x10(%rsp)
movaps 0x20(%rsp), %xmm2
callq 0x34d6b
testb %al, %al
jne 0xb178
incq %rbx
movaps 0x10(%rsp), %xmm2
cmpl %ebx, %ebp
jne 0xb0ef
movl %r15d, 0x8(%rsp)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0xb19c
movl $0x0, 0x8(%rsp)
movaps 0x30(%rsp), %xmm1
jmp 0xab0d
movl %r15d, 0x8(%rsp)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0xb1a1
xorl %edi, %edi
callq 0x2e875
movzbl %r15b, %ecx
testb %al, %al
movl $0x1, %eax
cmovel %ecx, %eax
movl %eax, 0x8(%rsp)
movl 0xc(%rsp), %eax
cmovnel %ebx, %eax
movl %eax, 0xc(%rsp)
movaps 0x30(%rsp), %xmm1
movl $0x2, %r12d
jmp 0xab0d