// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x60, %rsp
testq %rdi, %rdi
je 0xa719
movq %rdi, %r14
cmpb $0x0, (%rdi)
je 0xa719
movl %edx, %ebx
movl %esi, %ebp
movaps %xmm1, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movaps %xmm0, 0x50(%rsp)
movq %r14, %rdi
callq 0x81f3
movl %eax, %r15d
cmpb $0x0, 0x99d05(%rip)     # 0xa4255
jne 0xa557
callq 0x6a3c
movl 0x99d72(%rip), %r12d    # 0xa42d0
cmpl $0x2, %ebp
je 0xa642
cmpl $0x1, %ebp
movaps 0x30(%rsp), %xmm3
je 0xa5cd
testl %ebp, %ebp
jne 0xa6a5
movaps 0x40(%rsp), %xmm0
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
cvttss2si %xmm0, %eax
mulss 0x5aa7e(%rip), %xmm0    # 0x6500c
movaps 0x50(%rsp), %xmm1
addss %xmm0, %xmm1
movl %r12d, %ecx
shrl $0x1f, %ecx
addl %r12d, %ecx
sarl %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
subss %xmm0, %xmm1
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
andl $-0x2, %ecx
subl %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
addss %xmm1, %xmm0
movlhps %xmm3, %xmm0            # xmm0 = xmm0[0],xmm3[0]
shufps $0xe2, %xmm3, %xmm0     # xmm0 = xmm0[2,0],xmm3[2,3]
jmp 0xa63d
movss 0x5aa37(%rip), %xmm1    # 0x6500c
movaps 0x40(%rsp), %xmm4
movaps %xmm4, %xmm0
mulss %xmm1, %xmm0
addss %xmm3, %xmm0
movl %r15d, %eax
shrl $0x1f, %eax
addl %r15d, %eax
sarl %eax
cvtsi2ss %eax, %xmm2
subss %xmm2, %xmm0
shufps $0x55, %xmm4, %xmm4     # xmm4 = xmm4[1,1,1,1]
movl %r12d, %eax
shrl $0x1f, %eax
addl %r12d, %eax
sarl %eax
xorps %xmm2, %xmm2
cvtsi2ss %eax, %xmm2
mulss %xmm4, %xmm1
movaps 0x50(%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 0xa6a5
movaps 0x30(%rsp), %xmm3
movaps 0x40(%rsp), %xmm4
addss %xmm4, %xmm3
xorps %xmm0, %xmm0
cvtsi2ss %r15d, %xmm0
shufps $0x55, %xmm4, %xmm4     # xmm4 = xmm4[1,1,1,1]
cvttss2si %xmm4, %eax
mulss 0x5a9a4(%rip), %xmm4    # 0x6500c
subss %xmm0, %xmm3
movl %r12d, %ecx
shrl $0x1f, %ecx
addl %r12d, %ecx
sarl %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
andl $-0x2, %ecx
subl %ecx, %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
movaps 0x50(%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
cmpb $0x0, 0x99ba2(%rip)     # 0xa4255
jne 0xa6d9
movaps %xmm0, 0x30(%rsp)
callq 0x6a3c
movl 0x99c0a(%rip), %r12d    # 0xa42d0
cmpb $0x0, 0x99b88(%rip)     # 0xa4255
jne 0xa6d4
callq 0x6a3c
movaps 0x30(%rsp), %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %r12d, %xmm1
xorps %xmm2, %xmm2
cvtsi2ssl 0x99be8(%rip), %xmm2 # 0xa42d4
movaps 0x99b8d(%rip), %xmm3    # 0xa4280
movups %xmm3, 0x20(%rsp)
movaps 0x99b71(%rip), %xmm3    # 0xa4270
movups %xmm3, 0x10(%rsp)
movaps 0x99b55(%rip), %xmm3    # 0xa4260
movups %xmm3, (%rsp)
movq %r14, %rdi
movl %ebx, %esi
callq 0x4e092
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq