// File: /workspace/github_c_makefile_star2_O2/arkanis[P]process-map/./deps/raygui.h
// Function: GuiDrawText
static void GuiDrawText(const char *text, Rectangle bounds, int alignment, Color tint)
{
    #define TEXT_VALIGN_PIXEL_OFFSET(h)  ((int)h%2)     // Vertical alignment for pixel perfect

    if ((text != NULL) && (text[0] != '\0'))
    {
        int iconId = 0;
        text = GetTextIcon(text, &iconId);  // Check text for icon and move cursor

        // Get text position depending on alignment and iconId
        //---------------------------------------------------------------------------------
        #define ICON_TEXT_PADDING   4

        Vector2 position = { bounds.x, bounds.y };

        // NOTE: We get text size after icon been processed
        int textWidth = GetTextWidth(text);
        int textHeight = GuiGetStyle(DEFAULT, TEXT_SIZE);

#if defined(RAYGUI_SUPPORT_ICONS)
        if (iconId >= 0)
        {
            textWidth += RICON_SIZE;

            // WARNING: If only icon provided, text could be pointing to eof character!
            if ((text != NULL) && (text[0] != '\0')) textWidth += ICON_TEXT_PADDING;
        }
#endif
        // Check guiTextAlign global variables
        switch (alignment)
        {
            case GUI_TEXT_ALIGN_LEFT:
            {
                position.x = bounds.x;
                position.y = bounds.y + bounds.height/2 - textHeight/2 + TEXT_VALIGN_PIXEL_OFFSET(bounds.height);
            } break;
            case GUI_TEXT_ALIGN_CENTER:
            {
                position.x = bounds.x + bounds.width/2 - textWidth/2;
                position.y = bounds.y + bounds.height/2 - textHeight/2 + TEXT_VALIGN_PIXEL_OFFSET(bounds.height);
            } break;
            case GUI_TEXT_ALIGN_RIGHT:
            {
                position.x = bounds.x + bounds.width - textWidth;
                position.y = bounds.y + bounds.height/2 - textHeight/2 + TEXT_VALIGN_PIXEL_OFFSET(bounds.height);
            } break;
            default: break;
        }

        // NOTE: Make sure we get pixel-perfect coordinates,
        // In case of decimals we got weird text positioning
        position.x = (float)((int)position.x);
        position.y = (float)((int)position.y);
        //---------------------------------------------------------------------------------

        // Draw text (with icon if available)
        //---------------------------------------------------------------------------------
#if defined(RAYGUI_SUPPORT_ICONS)
        if (iconId >= 0)
        {
            // NOTE: We consider icon height, probably different than text size
            GuiDrawIcon(iconId, RAYGUI_CLITERAL(Vector2){ position.x, bounds.y + bounds.height/2 - RICON_SIZE/2 + TEXT_VALIGN_PIXEL_OFFSET(bounds.height) }, 1, tint);
            position.x += (RICON_SIZE + ICON_TEXT_PADDING);
        }
#endif
        DrawTextEx(guiFont, text, position, (float)GuiGetStyle(DEFAULT, TEXT_SIZE), (float)GuiGetStyle(DEFAULT, TEXT_SPACING), tint);
        //---------------------------------------------------------------------------------
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
testq %rdi, %rdi
je 0x8ef9
movq %rdi, %r14
cmpb $0x0, (%rdi)
je 0x8ef9
movl %edx, %ebx
movl %esi, %ebp
movaps %xmm1, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movaps %xmm0, 0x30(%rsp)
movq %r14, %rdi
callq 0x76f6
movl %eax, %r15d
pushq $0x10
popq %rsi
xorl %edi, %edi
callq 0x6e93
movl %eax, %ecx
cmpl $0x2, %ebp
je 0x8e3f
cmpl $0x1, %ebp
je 0x8ddf
testl %ebp, %ebp
movaps 0x40(%rsp), %xmm4
jne 0x8e93
movaps 0x50(%rsp), %xmm3
shufps $0x55, %xmm3, %xmm3     # xmm3 = xmm3[1,1,1,1]
movss 0x50262(%rip), %xmm0    # 0x5900c
mulss %xmm3, %xmm0
pushq $0x2
popq %rsi
movl %ecx, %eax
cltd
idivl %esi
cvtsi2ss %eax, %xmm1
movaps 0x30(%rsp), %xmm2
addss %xmm0, %xmm2
cvttss2si %xmm3, %eax
subss %xmm1, %xmm2
cltd
idivl %esi
cvtsi2ss %edx, %xmm0
addss %xmm2, %xmm0
movlhps %xmm4, %xmm0            # xmm0 = xmm0[0],xmm4[0]
shufps $0xe2, %xmm4, %xmm0     # xmm0 = xmm0[2,0],xmm4[2,3]
jmp 0x8e3a
movss 0x50225(%rip), %xmm1    # 0x5900c
movaps 0x50(%rsp), %xmm3
movaps %xmm3, %xmm0
mulss %xmm1, %xmm0
addss 0x40(%rsp), %xmm0
pushq $0x2
popq %rsi
movl %r15d, %eax
cltd
idivl %esi
cvtsi2ss %eax, %xmm2
subss %xmm2, %xmm0
movl %ecx, %eax
cltd
idivl %esi
cvtsi2ss %eax, %xmm2
shufps $0x55, %xmm3, %xmm3     # xmm3 = xmm3[1,1,1,1]
mulss %xmm3, %xmm1
cvttss2si %xmm3, %eax
movaps 0x30(%rsp), %xmm3
addss %xmm1, %xmm3
cltd
idivl %esi
cvtsi2ss %edx, %xmm1
subss %xmm2, %xmm3
addss %xmm3, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movaps %xmm0, %xmm4
jmp 0x8e93
movaps 0x40(%rsp), %xmm4
movaps 0x50(%rsp), %xmm2
addss %xmm2, %xmm4
cvtsi2ss %r15d, %xmm0
shufps $0x55, %xmm2, %xmm2     # xmm2 = xmm2[1,1,1,1]
movss 0x501ae(%rip), %xmm1    # 0x5900c
mulss %xmm2, %xmm1
pushq $0x2
popq %rsi
movl %ecx, %eax
cltd
idivl %esi
cvttss2si %xmm2, %ecx
cvtsi2ss %eax, %xmm2
subss %xmm0, %xmm4
movl %ecx, %eax
cltd
idivl %esi
cvtsi2ss %edx, %xmm0
movaps 0x30(%rsp), %xmm3
addss %xmm1, %xmm3
subss %xmm2, %xmm3
addss %xmm3, %xmm0
unpcklps %xmm0, %xmm4            # xmm4 = xmm4[0],xmm0[0],xmm4[1],xmm0[1]
cvttps2dq %xmm4, %xmm0
cvtdq2ps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
pushq $0x10
popq %rsi
xorl %edi, %edi
callq 0x6e93
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x30(%rsp)
pushq $0x11
popq %rsi
xorl %edi, %edi
callq 0x6e93
cvtsi2ss %eax, %xmm2
movups 0x923e0(%rip), %xmm0    # 0x9b2a8
movups %xmm0, 0x20(%rsp)
movups 0x923c4(%rip), %xmm0    # 0x9b298
movups %xmm0, 0x10(%rsp)
movups 0x923a8(%rip), %xmm0    # 0x9b288
movups %xmm0, (%rsp)
movq %r14, %rdi
movaps 0x40(%rsp), %xmm0
movss 0x30(%rsp), %xmm1
movl %ebx, %esi
callq 0x43de8
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq