// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_font_text_width
NK_INTERN float
nk_font_text_width(nk_handle handle, float height, const char *text, int len)
{
    nk_rune unicode;
    int text_len  = 0;
    float text_width = 0;
    int glyph_len = 0;
    float scale = 0;

    struct nk_font *font = (struct nk_font*)handle.ptr;
    NK_ASSERT(font);
    NK_ASSERT(font->glyphs);
    if (!font || !text || !len)
        return 0;

    scale = height/font->info.height;
    glyph_len = text_len = nk_utf_decode(text, &unicode, (int)len);
    if (!glyph_len) return 0;
    while (text_len <= (int)len && glyph_len) {
        const struct nk_font_glyph *g;
        if (unicode == NK_UTF_INVALID) break;

        /* query currently drawn glyph information */
        g = nk_font_find_glyph(font, unicode);
        text_width += g->xadvance * scale;

        /* offset next glyph */
        glyph_len = nk_utf_decode(text + text_len, &unicode, (int)len - text_len);
        text_len += glyph_len;
    }
    return text_width;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movss %xmm0, 0x44(%rsp)
movq %rsi, 0x38(%rsp)
movl %edx, 0x34(%rsp)
movl $0x0, 0x2c(%rsp)
xorps %xmm0, %xmm0
movss %xmm0, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
xorps %xmm0, %xmm0
movss %xmm0, 0x20(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x851ff
movq 0x3fe1d(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x2c1c3(%rip), %rsi     # 0xb13a0
leaq 0x2c1da(%rip), %rdx     # 0xb13be
movl $0x425f, %ecx           # imm = 0x425F
movb $0x0, %al
callq 0x13ec0
movq 0x3fdf9(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x85201
jmp 0x85203
movq 0x18(%rsp), %rax
cmpq $0x0, 0x58(%rax)
jne 0x85242
movq 0x3fdda(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x2c180(%rip), %rsi     # 0xb13a0
leaq 0x2c197(%rip), %rdx     # 0xb13be
movl $0x4260, %ecx           # imm = 0x4260
movb $0x0, %al
callq 0x13ec0
movq 0x3fdb6(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x85244
cmpq $0x0, 0x18(%rsp)
je 0x8525b
cmpq $0x0, 0x38(%rsp)
je 0x8525b
cmpl $0x0, 0x34(%rsp)
jne 0x85269
xorps %xmm0, %xmm0
movss %xmm0, 0x54(%rsp)
jmp 0x8535a
movss 0x44(%rsp), %xmm0
movq 0x18(%rsp), %rax
divss 0x30(%rax), %xmm0
movss %xmm0, 0x20(%rsp)
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %edx
leaq 0x30(%rsp), %rsi
callq 0x14030
movl %eax, 0x2c(%rsp)
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x24(%rsp)
jne 0x852af
xorps %xmm0, %xmm0
movss %xmm0, 0x54(%rsp)
jmp 0x8535a
jmp 0x852b1
movl 0x2c(%rsp), %ecx
xorl %eax, %eax
cmpl 0x34(%rsp), %ecx
movb %al, 0xf(%rsp)
jg 0x852cd
cmpl $0x0, 0x24(%rsp)
setne %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x852d7
jmp 0x8534e
cmpl $0xfffd, 0x30(%rsp)     # imm = 0xFFFD
jne 0x852e3
jmp 0x8534e
movq 0x18(%rsp), %rdi
movl 0x30(%rsp), %esi
callq 0x15260
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movss 0x4(%rax), %xmm0
movss 0x20(%rsp), %xmm2
movss 0x28(%rsp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x28(%rsp)
movq 0x38(%rsp), %rdi
movslq 0x2c(%rsp), %rax
addq %rax, %rdi
movl 0x34(%rsp), %edx
subl 0x2c(%rsp), %edx
leaq 0x30(%rsp), %rsi
callq 0x14030
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addl 0x2c(%rsp), %eax
movl %eax, 0x2c(%rsp)
jmp 0x852b1
movss 0x28(%rsp), %xmm0
movss %xmm0, 0x54(%rsp)
movss 0x54(%rsp), %xmm0
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)