// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %rbx
movaps %xmm1, 0x20(%rsp)
movl 0x9c082(%rip), %r13d    # 0xa7250
cmpb $0x0, 0x9c080(%rip)     # 0xa7255
movaps %xmm0, 0x30(%rsp)
jne 0xb1e6
callq 0x6a18
movaps 0x30(%rsp), %xmm0
xorps %xmm1, %xmm1
cvtsi2ssl 0x9c433(%rip), %xmm1 # 0xa7624
addss %xmm0, %xmm1
movss %xmm1, 0x10(%rsp)
movq %rbx, %rdi
callq 0x7821
cvtsi2ss %eax, %xmm2
addss 0x10(%rsp), %xmm2
addss 0x5ce1b(%rip), %xmm2    # 0x68030
movaps 0x30(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
mulss 0x5cde5(%rip), %xmm1    # 0x68010
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
addss %xmm0, %xmm1
cmpb $0x0, 0x9c01b(%rip)     # 0xa7255
movaps %xmm2, 0x40(%rsp)
jne 0xb255
movaps %xmm1, 0x10(%rsp)
callq 0x6a18
movaps 0x40(%rsp), %xmm2
movaps 0x10(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsi2ssl 0x9c070(%rip), %xmm0 # 0xa72d0
subss %xmm0, %xmm1
movlhps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0]
cmpb $0x0, 0x9bfe7(%rip)     # 0xa7255
jne 0xb284
movaps %xmm1, 0x10(%rsp)
callq 0x6a18
movaps 0x40(%rsp), %xmm2
movaps 0x10(%rsp), %xmm1
shufps $0xe2, %xmm2, %xmm1     # xmm1 = xmm1[2,0],xmm2[2,3]
xorps %xmm0, %xmm0
cvtsi2ssl 0x9c03d(%rip), %xmm0 # 0xa72d0
cmpl $0x3, %r13d
jne 0xb2a1
movl $0x3, %r13d
jmp 0xb2ae
cmpb $0x0, 0x9bfac(%rip)     # 0xa7254
je 0xb539
xorl %r14d, %r14d
cmpl $0x3, %r13d
je 0xb3df
cmpl $0x2, %r13d
jne 0xb459
movss %xmm0, 0x40(%rsp)
movaps %xmm1, 0x10(%rsp)
cmpb $0x0, 0x9bf7e(%rip)     # 0xa7255
jne 0xb2de
callq 0x6a18
movl 0x9c33b(%rip), %r15d    # 0xa7620
cmpb $0x0, 0x9bf69(%rip)     # 0xa7255
jne 0xb2f3
callq 0x6a18
movl 0x9c30f(%rip), %edi     # 0xa7608
callq 0x44152
movss 0x9b12a(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
movl %eax, %r12d
cmpb $0x0, 0x9bf3e(%rip)     # 0xa7255
jne 0xb31e
callq 0x6a18
movl 0x9c2e8(%rip), %edi     # 0xa760c
callq 0x44152
movss 0x9b0ff(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
movaps 0x30(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movl %r15d, %edi
movl %r12d, %esi
movl %eax, %edx
callq 0x7546
testb %bpl, %bpl
je 0xb4a9
movslq 0x9c531(%rip), %rax     # 0xa7890
imulq $0x66666667, %rax, %rax # imm = 0x66666667
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x23, %rax
addl %ecx, %eax
testb $0x1, %al
jne 0xb4a9
cmpb $0x0, 0x9bed3(%rip)     # 0xa7255
jne 0xb389
callq 0x6a18
movl 0x9c279(%rip), %edi     # 0xa7608
callq 0x44152
movss 0x9b094(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
cmpl $0x1000000, %eax        # imm = 0x1000000
jb 0xb4a9
movss 0x40(%rsp), %xmm1
addss %xmm1, %xmm1
movaps 0x10(%rsp), %xmm0
cvttss2si %xmm0, %edi
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
cvttss2si %xmm0, %esi
cvttss2si %xmm1, %ecx
movl $0x1, %edx
movl %eax, %r8d
callq 0x31115
jmp 0xb4a9
cmpb $0x0, 0x9be6f(%rip)     # 0xa7255
jne 0xb3ed
callq 0x6a18
movl 0x9c22d(%rip), %ebp     # 0xa7620
cmpb $0x0, 0x9be5b(%rip)     # 0xa7255
jne 0xb401
callq 0x6a18
movl 0x9c20d(%rip), %edi     # 0xa7614
callq 0x44152
movss 0x9b01c(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
movl %eax, %r15d
cmpb $0x0, 0x9be30(%rip)     # 0xa7255
jne 0xb42c
callq 0x6a18
movl 0x9c1e6(%rip), %edi     # 0xa7618
callq 0x44152
movss 0x9aff1(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
movaps 0x30(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movl %ebp, %edi
movl %r15d, %esi
movl %eax, %edx
jmp 0xb4a4
leal (%r13,%r13,2), %ebp
cmpb $0x0, 0x9bdf0(%rip)     # 0xa7255
jne 0xb46c
callq 0x6a18
movslq %ebp, %rax
leaq 0x9be1a(%rip), %rcx     # 0xa7290
movl 0x360(%rcx,%rax,4), %edi
callq 0x44152
movss 0x9afa6(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
movaps 0x30(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movl $0x1, %edi
movl %eax, %esi
xorl %edx, %edx
callq 0x7546
movl $0x9, %edi
movaps 0x30(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
callq 0x982d
movaps %xmm0, 0x30(%rsp)
movaps %xmm1, 0x20(%rsp)
cmpb $0x0, 0x9bd87(%rip)     # 0xa7255
jne 0xb4d5
callq 0x6a18
movl 0x9c14d(%rip), %ebp     # 0xa7628
cmpb $0x0, 0x9bd73(%rip)     # 0xa7255
jne 0xb4e9
callq 0x6a18
leal 0xda(%r13,%r13,2), %eax
cltq
leaq 0x9bd96(%rip), %rcx     # 0xa7290
movl (%rcx,%rax,4), %edi
callq 0x44152
movss 0x9af26(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
movq %rbx, %rdi
movaps 0x30(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movl %ebp, %esi
movl %eax, %edx
callq 0x95ee
movl %r14d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movss %xmm0, 0x40(%rsp)
movaps %xmm1, 0x10(%rsp)
callq 0x2867d
testb %bpl, %bpl
je 0xb66e
movaps %xmm0, 0x60(%rsp)
incl 0x9c333(%rip)           # 0xa7890
callq 0x2e5ee
movl %eax, %r12d
movq %rbx, %rdi
callq 0x62f0
movq %rax, %r14
decl %r15d
cmpl %r14d, %r15d
jle 0xb647
movaps 0x20(%rsp), %xmm1
cmpb $0x0, 0x9bccd(%rip)     # 0xa7255
jne 0xb59b
movss %xmm1, 0xc(%rsp)
callq 0x6a18
movss 0xc(%rsp), %xmm1
movl 0x9c08f(%rip), %eax     # 0xa7630
addl %eax, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
subss %xmm0, %xmm1
movss %xmm1, 0xc(%rsp)
movq %rbx, %rdi
callq 0x7821
xorps %xmm2, %xmm2
cvtsi2ss %eax, %xmm2
cmpb $0x0, 0x9bc8b(%rip)     # 0xa7255
jne 0xb5dd
movss %xmm2, 0x5c(%rsp)
callq 0x6a18
movss 0x5c(%rsp), %xmm2
xorps %xmm0, %xmm0
cvtsi2ssl 0x9bce8(%rip), %xmm0 # 0xa72d0
movss 0xc(%rsp), %xmm1
subss %xmm0, %xmm1
ucomiss %xmm2, %xmm1
seta %al
cmpl $0x20, %r12d
setge %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xb647
leaq 0x74(%rsp), %r15
movl $0x0, (%r15)
movl %r12d, %edi
movq %r15, %rsi
callq 0x5235f
movslq (%r15), %rcx
testq %rcx, %rcx
jle 0xb640
movslq %r14d, %rsi
addq %rbx, %rsi
xorl %edx, %edx
movb (%rax,%rdx), %dil
movb %dil, (%rsi,%rdx)
incq %rdx
cmpq %rdx, %rcx
jne 0xb62d
addl %edx, %r14d
movslq %r14d, %rax
movb $0x0, (%rbx,%rax)
testl %r14d, %r14d
jle 0xb6ca
movl $0x103, %edi            # imm = 0x103
callq 0x2e531
testb %al, %al
je 0xb69e
movl %r14d, %eax
movb $0x0, -0x1(%rbx,%rax)
movl $0x0, 0x9c224(%rip)     # 0xa7890
jmp 0xb6ca
movaps 0x30(%rsp), %xmm1
movaps 0x20(%rsp), %xmm2
callq 0x34d6b
testb %al, %al
je 0xb696
xorl %edi, %edi
callq 0x2e834
movl %eax, %r14d
movl $0x1, %r13d
jmp 0xb772
xorl %r14d, %r14d
jmp 0xb772
movl $0x103, %edi            # imm = 0x103
callq 0x286dd
testb %al, %al
je 0xb6ca
movl 0x9c1de(%rip), %eax     # 0xa7890
cmpl $0x15, %eax
setge %cl
testb $0x1, %al
sete %al
andb %cl, %al
movzbl %al, %eax
subl %eax, %r14d
movb $0x0, (%rbx,%r14)
movl $0x101, %edi            # imm = 0x101
callq 0x2e531
testb %al, %al
je 0xb6dd
movb $0x1, %r14b
jmp 0xb703
movaps 0x60(%rsp), %xmm0
movaps 0x30(%rsp), %xmm1
movaps 0x20(%rsp), %xmm2
callq 0x34d6b
xorl %r14d, %r14d
testb %al, %al
jne 0xb703
xorl %edi, %edi
callq 0x2e834
testb %al, %al
jne 0xb6d8
cmpb $0x0, 0x9bb4b(%rip)     # 0xa7255
jne 0xb711
callq 0x6a18
movl $0x2, %r13d
movl 0x9bf0b(%rip), %eax     # 0xa7628
cmpl $0x2, %eax
movaps 0x20(%rsp), %xmm0
je 0xb795
cmpl $0x1, %eax
jne 0xb772
movq %rbx, %rdi
callq 0x7821
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
addss 0x30(%rsp), %xmm0
movss 0x5c8be(%rip), %xmm1    # 0x68010
mulss 0x20(%rsp), %xmm1
addss %xmm0, %xmm1
addss 0x5c8a0(%rip), %xmm1    # 0x68004
movaps 0x10(%rsp), %xmm0
movss %xmm1, %xmm0            # xmm0 = xmm1[0],xmm0[1,2,3]
movaps %xmm0, %xmm1
jmp 0xb777
movaps 0x10(%rsp), %xmm1
movss 0x40(%rsp), %xmm0
testb %r14b, %r14b
je 0xb2b1
movl $0x0, 0x9c100(%rip)     # 0xa7890
jmp 0xb2b1
movaps 0x30(%rsp), %xmm2
addss %xmm0, %xmm2
cmpb $0x0, 0x9bab0(%rip)     # 0xa7255
jne 0xb7b6
movaps %xmm2, 0x60(%rsp)
callq 0x6a18
movaps 0x60(%rsp), %xmm2
xorps %xmm0, %xmm0
cvtsi2ssl 0x9be6f(%rip), %xmm0 # 0xa7630
subss %xmm0, %xmm2
movaps 0x10(%rsp), %xmm1
movss %xmm2, %xmm1            # xmm1 = xmm2[0],xmm1[1,2,3]
jmp 0xb777