// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_draw_list_add_text
NK_API void
nk_draw_list_add_text(struct nk_draw_list *list, const struct nk_user_font *font,
    struct nk_rect rect, const char *text, int len, float font_height,
    struct nk_color fg)
{
    float x = 0;
    int text_len = 0;
    nk_rune unicode = 0;
    nk_rune next = 0;
    int glyph_len = 0;
    int next_glyph_len = 0;
    struct nk_user_font_glyph g;

    NK_ASSERT(list);
    if (!list || !len || !text) return;
    if (!NK_INTERSECT(rect.x, rect.y, rect.w, rect.h,
        list->clip_rect.x, list->clip_rect.y, list->clip_rect.w, list->clip_rect.h)) return;

    nk_draw_list_push_image(list, font->texture);
    x = rect.x;
    glyph_len = nk_utf_decode(text, &unicode, len);
    if (!glyph_len) return;

    /* draw every glyph image */
    fg.a = (nk_byte)((float)fg.a * list->config.global_alpha);
    while (text_len < len && glyph_len) {
        float gx, gy, gh, gw;
        float char_width = 0;
        if (unicode == NK_UTF_INVALID) break;

        /* query currently drawn glyph information */
        next_glyph_len = nk_utf_decode(text + text_len + glyph_len, &next, (int)len - text_len);
        font->query(font->userdata, font_height, &g, unicode,
                    (next == NK_UTF_INVALID) ? '\0' : next);

        /* calculate and draw glyph drawing rectangle and image */
        gx = x + g.offset.x;
        gy = rect.y + g.offset.y;
        gw = g.width; gh = g.height;
        char_width = g.xadvance;
        nk_draw_list_push_rect_uv(list, nk_vec2(gx,gy), nk_vec2(gx + gw, gy+ gh),
            g.uv[0], g.uv[1], fg);

        /* offset next glyph */
        text_len += glyph_len;
        x += char_width;
        glyph_len = next_glyph_len;
        unicode = next;
    }
}

// Assembly:
subq $0xc8, %rsp
movlpd %xmm0, 0xb8(%rsp)
movlpd %xmm1, 0xc0(%rsp)
movl %r8d, 0xb4(%rsp)
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movq %rdx, 0x98(%rsp)
movl %ecx, 0x94(%rsp)
movss %xmm2, 0x90(%rsp)
xorps %xmm0, %xmm0
movss %xmm0, 0x8c(%rsp)
movl $0x0, 0x88(%rsp)
movl $0x0, 0x84(%rsp)
movl $0x0, 0x80(%rsp)
movl $0x0, 0x7c(%rsp)
movl $0x0, 0x78(%rsp)
cmpq $0x0, 0xa8(%rsp)
jne 0x3aa84
movq 0x8a598(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x7693e(%rip), %rsi     # 0xb13a0
leaq 0x76955(%rip), %rdx     # 0xb13be
movl $0x298b, %ecx           # imm = 0x298B
movb $0x0, %al
callq 0x13ec0
movq 0x8a574(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x3aa86
cmpq $0x0, 0xa8(%rsp)
je 0x3aaa6
cmpl $0x0, 0x94(%rsp)
je 0x3aaa6
cmpq $0x0, 0x98(%rsp)
jne 0x3aaab
jmp 0x3add4
movq 0xa8(%rsp), %rax
movss (%rax), %xmm1
movss 0xb8(%rsp), %xmm0
addss 0xc0(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x3ab41
movss 0xb8(%rsp), %xmm1
movq 0xa8(%rsp), %rax
movss (%rax), %xmm0
movq 0xa8(%rsp), %rax
addss 0x8(%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x3ab41
movq 0xa8(%rsp), %rax
movss 0x4(%rax), %xmm1
movss 0xbc(%rsp), %xmm0
addss 0xc4(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x3ab41
movss 0xbc(%rsp), %xmm1
movq 0xa8(%rsp), %rax
movss 0x4(%rax), %xmm0
movq 0xa8(%rsp), %rax
addss 0xc(%rax), %xmm0
ucomiss %xmm1, %xmm0
ja 0x3ab46
jmp 0x3add4
movq 0xa8(%rsp), %rdi
movq 0xa0(%rsp), %rax
movq 0x20(%rax), %rsi
callq 0x388c0
movss 0xb8(%rsp), %xmm0
movss %xmm0, 0x8c(%rsp)
movq 0x98(%rsp), %rdi
movl 0x94(%rsp), %edx
leaq 0x84(%rsp), %rsi
callq 0x14030
movl %eax, 0x7c(%rsp)
cmpl $0x0, 0x7c(%rsp)
jne 0x3ab9d
jmp 0x3add4
movzbl 0xb7(%rsp), %eax
cvtsi2ss %eax, %xmm0
movq 0xa8(%rsp), %rax
movss 0x70(%rax), %xmm1
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movb %al, 0xb7(%rsp)
movl 0x88(%rsp), %ecx
xorl %eax, %eax
cmpl 0x94(%rsp), %ecx
movb %al, 0x2f(%rsp)
jge 0x3abe7
cmpl $0x0, 0x7c(%rsp)
setne %al
movb %al, 0x2f(%rsp)
movb 0x2f(%rsp), %al
testb $0x1, %al
jne 0x3abf4
jmp 0x3add4
xorps %xmm0, %xmm0
movss %xmm0, 0x40(%rsp)
cmpl $0xfffd, 0x84(%rsp) # imm = 0xFFFD
jne 0x3ac0f
jmp 0x3add4
movq 0x98(%rsp), %rdi
movslq 0x88(%rsp), %rax
addq %rax, %rdi
movslq 0x7c(%rsp), %rax
addq %rax, %rdi
movl 0x94(%rsp), %edx
subl 0x88(%rsp), %edx
leaq 0x80(%rsp), %rsi
callq 0x14030
movl %eax, 0x78(%rsp)
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x18(%rsp)
movss 0x90(%rsp), %xmm0
movss %xmm0, 0x24(%rsp)
movl 0x84(%rsp), %eax
movl %eax, 0x28(%rsp)
cmpl $0xfffd, 0x80(%rsp) # imm = 0xFFFD
jne 0x3ac96
xorl %eax, %eax
movl %eax, 0xc(%rsp)
jmp 0x3aca1
movl 0x80(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rax
movl 0x28(%rsp), %edx
movss 0x24(%rsp), %xmm0
movq 0x18(%rsp), %rsi
movl 0xc(%rsp), %ecx
movq (%rsi), %rdi
leaq 0x54(%rsp), %rsi
callq *%rax
movss 0x8c(%rsp), %xmm0
movss 0x64(%rsp), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x50(%rsp)
movss 0xbc(%rsp), %xmm0
movss 0x68(%rsp), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x4c(%rsp)
movss 0x6c(%rsp), %xmm0
movss %xmm0, 0x44(%rsp)
movss 0x70(%rsp), %xmm0
movss %xmm0, 0x48(%rsp)
movss 0x74(%rsp), %xmm0
movss %xmm0, 0x40(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, (%rsp)
movss 0x50(%rsp), %xmm0
movss 0x4c(%rsp), %xmm1
callq 0x13460
movlpd %xmm0, 0x38(%rsp)
movss 0x50(%rsp), %xmm0
movss 0x44(%rsp), %xmm1
addss %xmm1, %xmm0
movss 0x4c(%rsp), %xmm1
movss 0x48(%rsp), %xmm2
addss %xmm2, %xmm1
callq 0x13460
movq (%rsp), %rdi
movlpd %xmm0, 0x30(%rsp)
movsd 0x38(%rsp), %xmm0
movsd 0x30(%rsp), %xmm1
movsd 0x54(%rsp), %xmm2
movsd 0x5c(%rsp), %xmm3
movl 0xb4(%rsp), %esi
callq 0x3a710
movl 0x7c(%rsp), %eax
addl 0x88(%rsp), %eax
movl %eax, 0x88(%rsp)
movss 0x40(%rsp), %xmm0
addss 0x8c(%rsp), %xmm0
movss %xmm0, 0x8c(%rsp)
movl 0x78(%rsp), %eax
movl %eax, 0x7c(%rsp)
movl 0x80(%rsp), %eax
movl %eax, 0x84(%rsp)
jmp 0x3abc5
addq $0xc8, %rsp
retq
nopl (%rax)