// File: /workspace/github_c_makefile_star2_O1/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 0x9822
movq %rdi, %r14
cmpb $0x0, (%rdi)
je 0x9822
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 0x7821
movl %eax, %r15d
cmpb $0x0, 0x9dc1f(%rip)     # 0xa7255
jne 0x963d
callq 0x6a18
movl 0x9dc8d(%rip), %eax     # 0xa72d0
cmpl $0x2, %ebp
je 0x9723
cmpl $0x1, %ebp
movaps 0x40(%rsp), %xmm3
je 0x96b0
testl %ebp, %ebp
jne 0x9784
movaps 0x50(%rsp), %xmm0
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
cvttss2si %xmm0, %ecx
mulss 0x5e99d(%rip), %xmm0    # 0x68010
movaps 0x30(%rsp), %xmm1
addss %xmm0, %xmm1
movl %eax, %edx
shrl $0x1f, %edx
addl %eax, %edx
sarl %edx
xorps %xmm0, %xmm0
cvtsi2ss %edx, %xmm0
subss %xmm0, %xmm1
movl %ecx, %eax
shrl $0x1f, %eax
addl %ecx, %eax
andl $-0x2, %eax
subl %eax, %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
addss %xmm1, %xmm0
movlhps %xmm3, %xmm0            # xmm0 = xmm0[0],xmm3[0]
shufps $0xe2, %xmm3, %xmm0     # xmm0 = xmm0[2,0],xmm3[2,3]
jmp 0x971e
movss 0x5e958(%rip), %xmm1    # 0x68010
movaps 0x50(%rsp), %xmm4
movaps %xmm4, %xmm0
mulss %xmm1, %xmm0
addss %xmm3, %xmm0
movl %r15d, %ecx
shrl $0x1f, %ecx
addl %r15d, %ecx
sarl %ecx
cvtsi2ss %ecx, %xmm2
subss %xmm2, %xmm0
shufps $0x55, %xmm4, %xmm4     # xmm4 = xmm4[1,1,1,1]
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
xorps %xmm2, %xmm2
cvtsi2ss %ecx, %xmm2
mulss %xmm4, %xmm1
movaps 0x30(%rsp), %xmm3
addss %xmm1, %xmm3
cvttss2si %xmm4, %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
andl $-0x2, %ecx
subl %ecx, %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
subss %xmm2, %xmm3
addss %xmm3, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movaps %xmm0, %xmm3
jmp 0x9784
movaps 0x40(%rsp), %xmm3
movaps 0x50(%rsp), %xmm4
addss %xmm4, %xmm3
xorps %xmm0, %xmm0
cvtsi2ss %r15d, %xmm0
shufps $0x55, %xmm4, %xmm4     # xmm4 = xmm4[1,1,1,1]
cvttss2si %xmm4, %ecx
mulss 0x5e8c7(%rip), %xmm4    # 0x68010
subss %xmm0, %xmm3
movl %eax, %edx
shrl $0x1f, %edx
addl %eax, %edx
sarl %edx
xorps %xmm0, %xmm0
cvtsi2ss %edx, %xmm0
movl %ecx, %eax
shrl $0x1f, %eax
addl %ecx, %eax
andl $-0x2, %eax
subl %eax, %ecx
xorps %xmm1, %xmm1
cvtsi2ss %ecx, %xmm1
movaps 0x30(%rsp), %xmm2
addss %xmm4, %xmm2
subss %xmm0, %xmm2
addss %xmm2, %xmm1
unpcklps %xmm1, %xmm3            # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
cvttps2dq %xmm3, %xmm0
cvtdq2ps %xmm0, %xmm0
shufps $0x55, %xmm3, %xmm3     # xmm3 = xmm3[1,1,1,1]
cvttps2dq %xmm3, %xmm1
cvtdq2ps %xmm1, %xmm2
cmpb $0x0, 0x9dab8(%rip)     # 0xa7255
jne 0x97b8
movaps %xmm0, 0x40(%rsp)
movaps %xmm2, 0x30(%rsp)
callq 0x6a18
movaps 0x30(%rsp), %xmm2
movaps 0x40(%rsp), %xmm0
xorps %xmm1, %xmm1
cvtsi2ssl 0x9db0d(%rip), %xmm1 # 0xa72d0
unpcklps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
cmpb $0x0, 0x9da88(%rip)     # 0xa7255
jne 0x97ea
movaps %xmm0, 0x40(%rsp)
movss %xmm1, 0x30(%rsp)
callq 0x6a18
movss 0x30(%rsp), %xmm1
movaps 0x40(%rsp), %xmm0
xorps %xmm2, %xmm2
cvtsi2ssl 0x9dadf(%rip), %xmm2 # 0xa72d4
movups 0x9da7c(%rip), %xmm3    # 0xa7278
movups %xmm3, 0x20(%rsp)
movups 0x9da60(%rip), %xmm3    # 0xa7268
movups %xmm3, 0x10(%rsp)
movups 0x9da44(%rip), %xmm3    # 0xa7258
movups %xmm3, (%rsp)
movq %r14, %rdi
movl %ebx, %esi
callq 0x51012
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq