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

    GuiControlState state = guiState;
    bool pressed = false;

    Rectangle textAreaBounds = {
        bounds.x + GuiGetStyle(TEXTBOX, TEXT_INNER_PADDING),
        bounds.y + GuiGetStyle(TEXTBOX, TEXT_INNER_PADDING),
        bounds.width - 2*GuiGetStyle(TEXTBOX, TEXT_INNER_PADDING),
        bounds.height - 2*GuiGetStyle(TEXTBOX, TEXT_INNER_PADDING)
    };

    // Cursor position, [x, y] values should be updated
    Rectangle cursor = { 0, 0, 1, (float)GuiGetStyle(DEFAULT, TEXT_SIZE) + 2 };

    int textWidth = 0;
    int currentLine = 0;

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

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

            int character = GetCharPressed();
            int keyCount = (int)strlen(text);

            // Introduce characters
            if (keyCount < (textSize - 1))
            {
                Vector2 textSize = MeasureTextEx(guiFont, text, (float)GuiGetStyle(DEFAULT, TEXT_SIZE), (float)GuiGetStyle(DEFAULT, TEXT_SPACING));

                if (textSize.y < (textAreaBounds.height - GuiGetStyle(DEFAULT, TEXT_SIZE)))
                {
                    if (IsKeyPressed(KEY_ENTER))
                    {
                        text[keyCount] = '\n';
                        keyCount++;
                    }
                    else if (((character >= 32) && (character < 255)))  // TODO: Support Unicode inputs
                    {
                        text[keyCount] = (char)character;
                        keyCount++;
                    }
                }
            }

            // Delete characters
            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;
                }
            }

            // Calculate cursor position considering text
            char oneCharText[2] = { 0 };
            int lastBreakingPos = -1;

            for (int i = 0; i < keyCount && currentLine < keyCount; i++)
            {
                oneCharText[0] = text[i];
                textWidth += (GetTextWidth(oneCharText) + GuiGetStyle(DEFAULT, TEXT_SPACING));

                if (text[i] == ' ' || text[i] == '\n') lastBreakingPos = i;

                if ( text[i] == '\n' || textWidth >= textAreaBounds.width)
                {
                    currentLine++;
                    textWidth = 0;

                    if (lastBreakingPos > 0) i = lastBreakingPos;
                    else textWidth += (GetTextWidth(oneCharText) + GuiGetStyle(DEFAULT, TEXT_SPACING));

                    lastBreakingPos = -1;
                }
            }

            cursor.x = bounds.x + GuiGetStyle(TEXTBOX, BORDER_WIDTH) + GuiGetStyle(TEXTBOX, TEXT_INNER_PADDING) + textWidth - GuiGetStyle(DEFAULT, TEXT_SPACING);
            cursor.y = bounds.y + GuiGetStyle(TEXTBOX, BORDER_WIDTH) + GuiGetStyle(TEXTBOX, TEXT_INNER_PADDING)/2 + ((GuiGetStyle(DEFAULT, TEXT_SIZE) + GuiGetStyle(TEXTBOX, TEXT_INNER_PADDING))*currentLine);

            // Exit edit mode
            if (!CheckCollisionPointRec(mousePoint, bounds) && IsMouseButtonPressed(MOUSE_LEFT_BUTTON)) pressed = true;
        }
        else
        {
            if (CheckCollisionPointRec(mousePoint, bounds))
            {
                state = GUI_STATE_FOCUSED;
                if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON)) pressed = true;
            }
        }

        if (pressed) framesCounter = 0;     // Reset blinking cursor
    }
    //--------------------------------------------------------------------

    // 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);

    DrawTextRec(guiFont, text, textAreaBounds, (float)GuiGetStyle(DEFAULT, TEXT_SIZE), (float)GuiGetStyle(DEFAULT, TEXT_SPACING), true, Fade(GetColor(GuiGetStyle(TEXTBOX, TEXT + (state*3))), guiAlpha));
    //--------------------------------------------------------------------

    return pressed;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %edx, 0x7c(%rsp)
movl %esi, %ebp
movq %rdi, %rbx
movaps %xmm1, 0xa0(%rsp)
movaps %xmm0, 0x60(%rsp)
movl 0x8fea4(%rip), %r13d    # 0x9b280
pushq $0x9
popq %r15
pushq $0x10
popq %r14
movl %r15d, %edi
movl %r14d, %esi
callq 0x6e93
movl %eax, 0x3c(%rsp)
movl %r15d, %edi
movl %r14d, %esi
callq 0x6e93
movl %eax, 0x38(%rsp)
movl %r15d, %edi
movl %r14d, %esi
callq 0x6e93
movl %eax, %r12d
movl %r15d, %edi
movl %r14d, %esi
callq 0x6e93
movd %r12d, %xmm0
movd %eax, %xmm1
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movq %xmm0, %xmm0            # xmm0 = xmm0[0],zero
paddd %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
movaps 0xa0(%rsp), %xmm1
subps %xmm0, %xmm1
movaps %xmm1, 0xb0(%rsp)
xorl %edi, %edi
movl %r14d, %esi
callq 0x6e93
cmpl $0x3, %r13d
jne 0xb4d0
pushq $0x9
popq %r14
pushq $0xc
popq %rsi
movl %r14d, %edi
callq 0x6e93
movl %eax, %ebp
movl %r14d, %edi
movl %r14d, %esi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x8efbf(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movl %eax, %r15d
pushq $0xa
popq %rsi
movl %r14d, %edi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x8ef9b(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movaps 0x60(%rsp), %xmm0
movaps 0xa0(%rsp), %xmm1
movl %ebp, %edi
movl %r15d, %esi
movl %eax, %edx
callq 0x7476
pushq $0xb
popq %rbp
xorl %r12d, %r12d
jmp 0xb9c7
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
cmpb $0x0, 0x8fda5(%rip)     # 0x9b284
movl %eax, 0x9c(%rsp)
je 0xb540
xorl %r12d, %r12d
cmpl $0x2, %r13d
je 0xb8d1
leal (%r13,%r13,2), %esi
pushq $0x9
popq %rdi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x8ef2f(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
pushq $0x1
popq %rdi
movaps 0x60(%rsp), %xmm0
movaps 0xa0(%rsp), %xmm1
movl %eax, %esi
xorl %edx, %edx
callq 0x7476
movaps 0x60(%rsp), %xmm2
leal 0x2(%r13,%r13,2), %ebp
jmp 0xb9cc
callq 0x1fd8b
cmpb $0x0, 0x7c(%rsp)
je 0xb655
movaps %xmm0, 0xc0(%rsp)
incl 0x9036a(%rip)           # 0x9b8c8
callq 0x2435e
movl %eax, %r15d
movq %rbx, %rdi
callq 0x6300
movq %rax, %r13
decl %ebp
cmpl %r13d, %ebp
jle 0xb625
pushq $0x10
popq %rbp
xorl %edi, %edi
movl %ebp, %esi
callq 0x6e93
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x40(%rsp)
pushq $0x11
popq %rsi
xorl %edi, %edi
callq 0x6e93
cvtsi2ss %eax, %xmm1
movups 0x8fd01(%rip), %xmm0    # 0x9b2a8
movups %xmm0, 0x20(%rsp)
movups 0x8fce5(%rip), %xmm0    # 0x9b298
movups %xmm0, 0x10(%rsp)
movups 0x8fcc9(%rip), %xmm0    # 0x9b288
movups %xmm0, (%rsp)
movq %rbx, %rdi
movss 0x40(%rsp), %xmm0
callq 0x44746
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movaps %xmm0, 0x40(%rsp)
xorl %edi, %edi
movl %ebp, %esi
callq 0x6e93
cvtsi2ss %eax, %xmm0
movaps 0xb0(%rsp), %xmm1
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
subss %xmm0, %xmm1
ucomiss 0x40(%rsp), %xmm1
jbe 0xb625
movl $0x101, %edi            # imm = 0x101
callq 0x242af
movb $0xa, %cl
testb %al, %al
jne 0xb61c
leal -0x20(%r15), %eax
cmpl $0xde, %eax
ja 0xb625
movl %r15d, %ecx
movslq %r13d, %rax
movb %cl, (%rbx,%rax)
incl %r13d
testl %r13d, %r13d
movq %rbx, 0x80(%rsp)
jle 0xb6be
movl $0x103, %edi            # imm = 0x103
callq 0x242af
testb %al, %al
je 0xb692
decl %r13d
movb $0x0, (%rbx,%r13)
andl $0x0, 0x90275(%rip)     # 0x9b8c8
jmp 0xb6be
movaps 0x60(%rsp), %xmm1
movaps 0xa0(%rsp), %xmm2
callq 0x2a643
testb %al, %al
je 0xb4e8
xorl %r12d, %r12d
xorl %edi, %edi
callq 0x2459e
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
pushq $0x1
popq %r13
testb %al, %al
je 0xb4f5
jmp 0xb8c2
movl $0x103, %edi            # imm = 0x103
callq 0x1fdd6
testb %al, %al
je 0xb6be
movl 0x90222(%rip), %eax     # 0x9b8c8
cmpl $0x15, %eax
setge %cl
testb $0x1, %al
sete %al
andb %cl, %al
movzbl %al, %eax
subl %eax, %r13d
movb $0x0, (%rbx,%r13)
leaq 0x36(%rsp), %rax
andw $0x0, (%rax)
pushq $-0x1
popq %r14
xorl %r15d, %r15d
xorl %ebx, %ebx
xorl %r12d, %r12d
movq %r13, 0x58(%rsp)
cmpl %r13d, %r15d
jge 0xb793
cmpl %r13d, %ebx
jge 0xb793
movl %r12d, %ebp
movl %ebx, %r12d
movslq %r15d, %r13
movq 0x80(%rsp), %rbx
movb (%rbx,%r13), %al
movb %al, 0x36(%rsp)
leaq 0x36(%rsp), %rdi
callq 0x76f6
movl %eax, 0x40(%rsp)
xorl %edi, %edi
pushq $0x11
popq %rsi
callq 0x6e93
movzbl (%rbx,%r13), %ecx
cmpl $0x20, %ecx
je 0xb72a
cmpl $0xa, %ecx
jne 0xb72d
movl %r15d, %r14d
cmpb $0xa, %cl
movl %r12d, %ebx
je 0xb756
movl %ebp, %r12d
addl 0x40(%rsp), %r12d
addl %eax, %r12d
cvtsi2ss %r12d, %xmm0
ucomiss 0xb0(%rsp), %xmm0
jae 0xb756
movq 0x58(%rsp), %r13
jmp 0xb78b
incl %ebx
xorl %r12d, %r12d
testl %r14d, %r14d
movq 0x58(%rsp), %r13
jle 0xb76a
movl %r14d, %r15d
jmp 0xb787
leaq 0x36(%rsp), %rdi
callq 0x76f6
movl %eax, %r14d
xorl %edi, %edi
pushq $0x11
popq %rsi
callq 0x6e93
movl %eax, %r12d
addl %r14d, %r12d
pushq $-0x1
popq %r14
incl %r15d
jmp 0xb6d8
pushq $0x9
popq %r15
pushq $0xc
popq %rbp
movl %r15d, %edi
movl %ebp, %esi
callq 0x6e93
cvtsi2ss %eax, %xmm1
addss 0x60(%rsp), %xmm1
movaps %xmm1, 0x40(%rsp)
pushq $0x10
popq %r14
movl %r15d, %edi
movl %r14d, %esi
callq 0x6e93
movl %eax, 0x98(%rsp)
pushq $0x11
popq %rsi
xorl %edi, %edi
callq 0x6e93
movl %eax, 0x58(%rsp)
movl %r15d, %edi
movl %ebp, %esi
callq 0x6e93
movl %eax, 0x94(%rsp)
movl %r15d, %edi
movl %r14d, %esi
callq 0x6e93
pushq $0x2
popq %r13
cltd
idivl %r13d
movl %eax, 0x90(%rsp)
xorl %edi, %edi
movl %r14d, %esi
callq 0x6e93
movl %eax, %ebp
movl %r15d, %edi
movl %r14d, %esi
callq 0x6e93
addl %ebp, %eax
imull %ebx, %eax
movss 0x98(%rsp), %xmm0
movss 0x94(%rsp), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
cvtdq2ps %xmm0, %xmm0
movaps 0x60(%rsp), %xmm1
movaps %xmm1, %xmm3
movaps 0x40(%rsp), %xmm2
movss %xmm2, %xmm3            # xmm3 = xmm2[0],xmm3[1,2,3]
addps %xmm0, %xmm3
movd 0x90(%rsp), %xmm0
movd %r12d, %xmm2
punpckldq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
cvtdq2ps %xmm2, %xmm2
addps %xmm3, %xmm2
movd %eax, %xmm0
movd 0x58(%rsp), %xmm3
punpckldq %xmm0, %xmm3    # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1]
cvtdq2ps %xmm3, %xmm0
movaps %xmm2, %xmm3
subps %xmm0, %xmm3
addps %xmm0, %xmm2
shufps $0x1, %xmm3, %xmm2      # xmm2 = xmm2[1,0],xmm3[0,0]
shufps $0xe2, %xmm3, %xmm2     # xmm2 = xmm2[2,0],xmm3[2,3]
movaps %xmm2, 0x40(%rsp)
movaps 0xc0(%rsp), %xmm0
movaps 0xa0(%rsp), %xmm2
callq 0x2a643
xorl %r12d, %r12d
testb %al, %al
je 0xb8af
movq 0x80(%rsp), %rbx
jmp 0xb8d1
xorl %edi, %edi
callq 0x2459e
testb %al, %al
movq 0x80(%rsp), %rbx
je 0xb8d1
andl $0x0, 0x8ffff(%rip)     # 0x9b8c8
movb $0x1, %r12b
jmp 0xb4eb
pushq $0x9
popq %r14
pushq $0xc
popq %rsi
movl %r14d, %edi
callq 0x6e93
movl %eax, %ebp
pushq $0x6
popq %rsi
movl %r14d, %edi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x8eb44(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movl %eax, %r15d
pushq $0x7
popq %rsi
movl %r14d, %edi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x8eb20(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movaps 0x60(%rsp), %xmm0
movaps 0xa0(%rsp), %xmm1
movl %ebp, %edi
movl %r15d, %esi
movl %eax, %edx
callq 0x7476
pushq $0x8
popq %rbp
cmpb $0x0, 0x7c(%rsp)
je 0xb9c7
movl 0x8ff78(%rip), %eax     # 0x9b8c8
pushq $0x14
popq %rcx
cltd
idivl %ecx
testb $0x1, %al
movl 0x3c(%rsp), %r14d
movl 0x38(%rsp), %r15d
jne 0xb9c0
cvtsi2ssl 0x9c(%rsp), %xmm0
addss 0x4d6b7(%rip), %xmm0    # 0x5902c
movaps 0x4d734(%rip), %xmm1    # 0x590b0
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movaps %xmm1, 0x80(%rsp)
pushq $0x9
popq %rdi
pushq $0x6
popq %rsi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x8ea9f(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movaps 0x40(%rsp), %xmm0
movaps 0x80(%rsp), %xmm1
xorl %edi, %edi
xorl %esi, %esi
movl %eax, %edx
callq 0x7476
movaps 0x60(%rsp), %xmm2
jmp 0xb9d6
movaps 0x60(%rsp), %xmm2
movl 0x3c(%rsp), %r14d
movl 0x38(%rsp), %r15d
movd %r15d, %xmm0
movd %r14d, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtdq2ps %xmm1, %xmm0
addps %xmm2, %xmm0
movaps %xmm0, 0x40(%rsp)
pushq $0x10
popq %rsi
xorl %edi, %edi
callq 0x6e93
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x80(%rsp)
pushq $0x11
popq %rsi
xorl %edi, %edi
callq 0x6e93
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x58(%rsp)
pushq $0x9
popq %rdi
movl %ebp, %esi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x8ea0d(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movups 0x8f867(%rip), %xmm0    # 0x9b2a8
movups %xmm0, 0x20(%rsp)
movups 0x8f84b(%rip), %xmm0    # 0x9b298
movups %xmm0, 0x10(%rsp)
movups 0x8f82f(%rip), %xmm0    # 0x9b288
movups %xmm0, (%rsp)
pushq $0x1
popq %rsi
movq %rbx, %rdi
movaps 0x40(%rsp), %xmm0
movaps 0xb0(%rsp), %xmm1
movss 0x80(%rsp), %xmm2
movss 0x58(%rsp), %xmm3
movl %eax, %edx
callq 0x4423d
movl %r12d, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq