// File: /workspace/github_c_makefile_star2_O0/arkanis[P]process-map/./deps/raygui.h
// Function: GuiTextBox
bool GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode)
{
    static int framesCounter = 0;           // Required for blinking cursor

    GuiControlState state = guiState;
    bool pressed = false;

    Rectangle cursor = {
        bounds.x + GuiGetStyle(TEXTBOX, TEXT_PADDING) + GetTextWidth(text) + 2,
        bounds.y + bounds.height/2 - GuiGetStyle(DEFAULT, TEXT_SIZE),
        1,
        (float)GuiGetStyle(DEFAULT, TEXT_SIZE)*2
    };

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

        if (editMode)
        {
            state = GUI_STATE_PRESSED;
            framesCounter++;

            int key = GetCharPressed();      // Returns codepoint as Unicode
            int keyCount = (int)strlen(text);

            // Only allow keys in range [32..125]
            if (keyCount < (textSize - 1))
            {
                float maxWidth = (bounds.width - (GuiGetStyle(TEXTBOX, TEXT_INNER_PADDING)*2));

                if ((GetTextWidth(text) < (maxWidth - GuiGetStyle(DEFAULT, TEXT_SIZE))) && (key >= 32))
                {
                    int byteLength = 0;
                    const char *textUtf8 = CodepointToUtf8(key, &byteLength);

                    for (int i = 0; i < byteLength; i++)
                    {
                        text[keyCount] = textUtf8[i];
                        keyCount++;
                    }

                    text[keyCount] = '\0';
                }
            }

            // Delete text
            if (keyCount > 0)
            {
                if (IsKeyPressed(KEY_BACKSPACE))
                {
                    keyCount--;
                    text[keyCount] = '\0';
                    framesCounter = 0;
                    if (keyCount < 0) keyCount = 0;
                }
                else if (IsKeyDown(KEY_BACKSPACE))
                {
                    if ((framesCounter > TEXTEDIT_CURSOR_BLINK_FRAMES) && (framesCounter%2) == 0) keyCount--;
                    text[keyCount] = '\0';
                    if (keyCount < 0) keyCount = 0;
                }
            }

            if (IsKeyPressed(KEY_ENTER) || (!CheckCollisionPointRec(mousePoint, bounds) && IsMouseButtonPressed(MOUSE_LEFT_BUTTON))) pressed = true;

            // Check text alignment to position cursor properly
            int textAlignment = GuiGetStyle(TEXTBOX, TEXT_ALIGNMENT);
            if (textAlignment == GUI_TEXT_ALIGN_CENTER) cursor.x = bounds.x + GetTextWidth(text)/2 + bounds.width/2 + 1;
            else if (textAlignment == GUI_TEXT_ALIGN_RIGHT) cursor.x = bounds.x + bounds.width - GuiGetStyle(TEXTBOX, TEXT_INNER_PADDING);
        }
        else
        {
            if (CheckCollisionPointRec(mousePoint, bounds))
            {
                state = GUI_STATE_FOCUSED;
                if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON)) pressed = true;
            }
        }

        if (pressed) framesCounter = 0;
    }
    //--------------------------------------------------------------------

    // Draw control
    //--------------------------------------------------------------------
    if (state == GUI_STATE_PRESSED)
    {
        GuiDrawRectangle(bounds, GuiGetStyle(TEXTBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(TEXTBOX, BORDER + (state*3))), guiAlpha), Fade(GetColor(GuiGetStyle(TEXTBOX, BASE_COLOR_PRESSED)), guiAlpha));

        // Draw blinking cursor
        if (editMode && ((framesCounter/20)%2 == 0)) GuiDrawRectangle(cursor, 0, BLANK, Fade(GetColor(GuiGetStyle(TEXTBOX, BORDER_COLOR_PRESSED)), guiAlpha));
    }
    else if (state == GUI_STATE_DISABLED)
    {
        GuiDrawRectangle(bounds, GuiGetStyle(TEXTBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(TEXTBOX, BORDER + (state*3))), guiAlpha), Fade(GetColor(GuiGetStyle(TEXTBOX, BASE_COLOR_DISABLED)), guiAlpha));
    }
    else GuiDrawRectangle(bounds, 1, Fade(GetColor(GuiGetStyle(TEXTBOX, BORDER + (state*3))), guiAlpha), BLANK);

    GuiDrawText(text, GetTextBounds(TEXTBOX, bounds), GuiGetStyle(TEXTBOX, TEXT_ALIGNMENT), Fade(GetColor(GuiGetStyle(TEXTBOX, TEXT + (state*3))), guiAlpha));
    //--------------------------------------------------------------------

    return pressed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movb %dl, %al
movlpd %xmm0, -0x10(%rbp)
movlpd %xmm1, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
andb $0x1, %al
movb %al, -0x1d(%rbp)
movl 0xbe217(%rip), %eax     # 0xca0e0
movl %eax, -0x24(%rbp)
movb $0x0, -0x25(%rbp)
movss -0x10(%rbp), %xmm0
movss %xmm0, -0xbc(%rbp)
movl $0x9, %edi
movl $0xd, %esi
callq 0x6f90
movss -0xbc(%rbp), %xmm0
cvtsi2ss %eax, %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0xb8(%rbp)
movq -0x18(%rbp), %rdi
callq 0x7af0
movss -0xb8(%rbp), %xmm0
cvtsi2ss %eax, %xmm1
addss %xmm1, %xmm0
movss 0x800e3(%rip), %xmm1    # 0x8c008
addss %xmm1, %xmm0
movss %xmm0, -0x38(%rbp)
movss -0xc(%rbp), %xmm0
movss -0x4(%rbp), %xmm1
movss 0x800c8(%rip), %xmm2    # 0x8c008
divss %xmm2, %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0xb4(%rbp)
xorl %edi, %edi
movl $0x10, %esi
callq 0x6f90
movss -0xb4(%rbp), %xmm0
cvtsi2ss %eax, %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0x34(%rbp)
movss 0x8008b(%rip), %xmm0    # 0x8c004
movss %xmm0, -0x30(%rbp)
xorl %edi, %edi
movl $0x10, %esi
callq 0x6f90
cvtsi2ss %eax, %xmm0
movss 0x80072(%rip), %xmm1    # 0x8c008
mulss %xmm1, %xmm0
movss %xmm0, -0x2c(%rbp)
cmpl $0x3, -0x24(%rbp)
je 0xc2b0
testb $0x1, 0xbe134(%rip)     # 0xca0e4
jne 0xc2b0
callq 0x2dd60
movlpd %xmm0, -0x40(%rbp)
testb $0x1, -0x1d(%rbp)
je 0xc268
movl $0x2, -0x24(%rbp)
movl 0xbe749(%rip), %eax     # 0xca720
addl $0x1, %eax
movl %eax, 0xbe740(%rip)     # 0xca720
callq 0x34670
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rdi
callq 0x62f0
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0xc0e7
movss -0x8(%rbp), %xmm0
movss %xmm0, -0xc8(%rbp)
movl $0x9, %edi
movl $0x10, %esi
callq 0x6f90
movss -0xc8(%rbp), %xmm0
shll %eax
cvtsi2ss %eax, %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0x4c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x7af0
cvtsi2ss %eax, %xmm0
movss %xmm0, -0xc0(%rbp)
movss -0x4c(%rbp), %xmm0
movss %xmm0, -0xc4(%rbp)
xorl %edi, %edi
movl $0x10, %esi
callq 0x6f90
movss -0xc4(%rbp), %xmm0
movss -0xc0(%rbp), %xmm1
cvtsi2ss %eax, %xmm2
subss %xmm2, %xmm0
ucomiss %xmm1, %xmm0
jbe 0xc0e5
cmpl $0x20, -0x44(%rbp)
jl 0xc0e5
movl $0x0, -0x50(%rbp)
movl -0x44(%rbp), %edi
leaq -0x50(%rbp), %rsi
callq 0x66f90
movq %rax, -0x58(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jge 0xc0d9
movq -0x58(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x18(%rbp), %rax
movslq -0x48(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0xc0a7
movq -0x18(%rbp), %rax
movslq -0x48(%rbp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0xc0e7
cmpl $0x0, -0x48(%rbp)
jle 0xc183
movl $0x103, %edi            # imm = 0x103
callq 0x34500
testb $0x1, %al
jne 0xc101
jmp 0xc12f
movl -0x48(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movslq -0x48(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl $0x0, 0xbe600(%rip)     # 0xca720
cmpl $0x0, -0x48(%rbp)
jge 0xc12d
movl $0x0, -0x48(%rbp)
jmp 0xc181
movl $0x103, %edi            # imm = 0x103
callq 0x2de20
testb $0x1, %al
jne 0xc13f
jmp 0xc17f
cmpl $0x14, 0xbe5da(%rip)    # 0xca720
jle 0xc164
movl 0xbe5d2(%rip), %eax     # 0xca720
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0xc164
movl -0x48(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movslq -0x48(%rbp), %rcx
movb $0x0, (%rax,%rcx)
cmpl $0x0, -0x48(%rbp)
jge 0xc17d
movl $0x0, -0x48(%rbp)
jmp 0xc17f
jmp 0xc181
jmp 0xc183
movl $0x101, %edi            # imm = 0x101
callq 0x34500
testb $0x1, %al
jne 0xc1b6
movsd -0x40(%rbp), %xmm0
movsd -0x10(%rbp), %xmm1
movsd -0x8(%rbp), %xmm2
callq 0x3e640
testb $0x1, %al
jne 0xc1ba
xorl %edi, %edi
callq 0x34bb0
testb $0x1, %al
jne 0xc1b6
jmp 0xc1ba
movb $0x1, -0x25(%rbp)
movl $0x9, %edi
movl $0xe, %esi
callq 0x6f90
movl %eax, -0x60(%rbp)
cmpl $0x1, -0x60(%rbp)
jne 0xc228
movss -0x10(%rbp), %xmm0
movss %xmm0, -0xcc(%rbp)
movq -0x18(%rbp), %rdi
callq 0x7af0
movss -0xcc(%rbp), %xmm0
movl $0x2, %ecx
cltd
idivl %ecx
cvtsi2ss %eax, %xmm1
addss %xmm1, %xmm0
movss -0x8(%rbp), %xmm1
movss 0x7fdfb(%rip), %xmm2    # 0x8c008
divss %xmm2, %xmm1
addss %xmm1, %xmm0
movss 0x7fde7(%rip), %xmm1    # 0x8c004
addss %xmm1, %xmm0
movss %xmm0, -0x38(%rbp)
jmp 0xc266
cmpl $0x2, -0x60(%rbp)
jne 0xc264
movss -0x10(%rbp), %xmm0
addss -0x8(%rbp), %xmm0
movss %xmm0, -0xd0(%rbp)
movl $0x9, %edi
movl $0x10, %esi
callq 0x6f90
movss -0xd0(%rbp), %xmm0
cvtsi2ss %eax, %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0x38(%rbp)
jmp 0xc266
jmp 0xc29e
movsd -0x40(%rbp), %xmm0
movsd -0x10(%rbp), %xmm1
movsd -0x8(%rbp), %xmm2
callq 0x3e640
testb $0x1, %al
jne 0xc282
jmp 0xc29c
movl $0x1, -0x24(%rbp)
xorl %edi, %edi
callq 0x34bb0
testb $0x1, %al
jne 0xc296
jmp 0xc29a
movb $0x1, -0x25(%rbp)
jmp 0xc29c
jmp 0xc29e
testb $0x1, -0x25(%rbp)
je 0xc2ae
movl $0x0, 0xbe472(%rip)     # 0xca720
jmp 0xc2b0
cmpl $0x2, -0x24(%rbp)
jne 0xc3c6
movl $0x9, %edi
movl %edi, -0xd8(%rbp)
movl $0xc, %esi
callq 0x6f90
movl -0xd8(%rbp), %edi
movl %eax, -0xd4(%rbp)
movl -0x24(%rbp), %ecx
movl %ecx, %eax
leal (%rax,%rax,2), %esi
callq 0x6f90
movl %eax, %edi
callq 0x526e0
movl %eax, -0x68(%rbp)
movss 0xbc116(%rip), %xmm0    # 0xc8410
movl -0x68(%rbp), %edi
callq 0x51fa0
movl -0xd8(%rbp), %edi
movl %eax, -0x64(%rbp)
movl $0x7, %esi
callq 0x6f90
movl %eax, %edi
callq 0x526e0
movl %eax, -0x70(%rbp)
movss 0xbc0e9(%rip), %xmm0    # 0xc8410
movl -0x70(%rbp), %edi
callq 0x51fa0
movl -0xd4(%rbp), %edi
movl %eax, -0x6c(%rbp)
movsd -0x10(%rbp), %xmm0
movsd -0x8(%rbp), %xmm1
movl -0x64(%rbp), %esi
movl -0x6c(%rbp), %edx
callq 0x77c0
testb $0x1, -0x1d(%rbp)
je 0xc3c1
movl 0xbe3c7(%rip), %eax     # 0xca720
movl $0x14, %ecx
cltd
idivl %ecx
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0xc3c1
movb $0x0, -0x74(%rbp)
movb $0x0, -0x73(%rbp)
movb $0x0, -0x72(%rbp)
movb $0x0, -0x71(%rbp)
movl $0x9, %edi
movl $0x6, %esi
callq 0x6f90
movl %eax, %edi
callq 0x526e0
movl %eax, -0x7c(%rbp)
movss 0xbc071(%rip), %xmm0    # 0xc8410
movl -0x7c(%rbp), %edi
callq 0x51fa0
movl %eax, -0x78(%rbp)
movsd -0x38(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
movl -0x74(%rbp), %esi
movl -0x78(%rbp), %edx
xorl %edi, %edi
callq 0x77c0
jmp 0xc4ed
cmpl $0x3, -0x24(%rbp)
jne 0xc477
movl $0x9, %edi
movl %edi, -0xe0(%rbp)
movl $0xc, %esi
callq 0x6f90
movl -0xe0(%rbp), %edi
movl %eax, -0xdc(%rbp)
movl -0x24(%rbp), %ecx
movl %ecx, %eax
leal (%rax,%rax,2), %esi
callq 0x6f90
movl %eax, %edi
callq 0x526e0
movl %eax, -0x84(%rbp)
movss 0xbbffd(%rip), %xmm0    # 0xc8410
movl -0x84(%rbp), %edi
callq 0x51fa0
movl -0xe0(%rbp), %edi
movl %eax, -0x80(%rbp)
movl $0xa, %esi
callq 0x6f90
movl %eax, %edi
callq 0x526e0
movl %eax, -0x8c(%rbp)
movss 0xbbfca(%rip), %xmm0    # 0xc8410
movl -0x8c(%rbp), %edi
callq 0x51fa0
movl -0xdc(%rbp), %edi
movl %eax, -0x88(%rbp)
movsd -0x10(%rbp), %xmm0
movsd -0x8(%rbp), %xmm1
movl -0x80(%rbp), %esi
movl -0x88(%rbp), %edx
callq 0x77c0
jmp 0xc4eb
movl -0x24(%rbp), %ecx
movl %ecx, %eax
leal (%rax,%rax,2), %esi
movl $0x9, %edi
callq 0x6f90
movl %eax, %edi
callq 0x526e0
movl %eax, -0x94(%rbp)
movss 0xbbf72(%rip), %xmm0    # 0xc8410
movl -0x94(%rbp), %edi
callq 0x51fa0
movl %eax, -0x90(%rbp)
movb $0x0, -0x98(%rbp)
movb $0x0, -0x97(%rbp)
movb $0x0, -0x96(%rbp)
movb $0x0, -0x95(%rbp)
movsd -0x10(%rbp), %xmm0
movsd -0x8(%rbp), %xmm1
movl -0x90(%rbp), %esi
movl -0x98(%rbp), %edx
movl $0x1, %edi
callq 0x77c0
jmp 0xc4ed
movq -0x18(%rbp), %rax
movq %rax, -0xf0(%rbp)
movsd -0x10(%rbp), %xmm0
movsd -0x8(%rbp), %xmm1
movl $0x9, %edi
movl %edi, -0xf4(%rbp)
callq 0x9f70
movl -0xf4(%rbp), %edi
movlpd %xmm0, -0xa8(%rbp)
movlpd %xmm1, -0xa0(%rbp)
movl $0xe, %esi
callq 0x6f90
movl -0xf4(%rbp), %edi
movl %eax, -0xe4(%rbp)
movl -0x24(%rbp), %ecx
movl %ecx, %eax
leal 0x2(%rax,%rax,2), %esi
callq 0x6f90
movl %eax, %edi
callq 0x526e0
movl %eax, -0xb0(%rbp)
movss 0xbbeaf(%rip), %xmm0    # 0xc8410
movl -0xb0(%rbp), %edi
callq 0x51fa0
movq -0xf0(%rbp), %rdi
movl -0xe4(%rbp), %esi
movl %eax, -0xac(%rbp)
movsd -0xa8(%rbp), %xmm0
movsd -0xa0(%rbp), %xmm1
movl -0xac(%rbp), %edx
callq 0x9cf0
movb -0x25(%rbp), %al
andb $0x1, %al
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopl (%rax,%rax)