// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_edit_draw_text
NK_LIB void
nk_edit_draw_text(struct nk_command_buffer *out,
    const struct nk_style_edit *style, float pos_x, float pos_y,
    float x_offset, const char *text, int byte_len, float row_height,
    const struct nk_user_font *font, struct nk_color background,
    struct nk_color foreground, nk_bool is_selected)
{
    NK_ASSERT(out);
    NK_ASSERT(font);
    NK_ASSERT(style);
    if (!text || !byte_len || !out || !style) return;

    {int glyph_len = 0;
    nk_rune unicode = 0;
    int text_len = 0;
    float line_width = 0;
    float glyph_width;
    const char *line = text;
    float line_offset = 0;
    int line_count = 0;

    struct nk_text txt;
    txt.padding = nk_vec2(0,0);
    txt.background = background;
    txt.text = foreground;

    foreground = nk_rgb_factor(foreground, style->color_factor);
    background = nk_rgb_factor(background, style->color_factor);

    glyph_len = nk_utf_decode(text+text_len, &unicode, byte_len-text_len);
    if (!glyph_len) return;
    while ((text_len < byte_len) && glyph_len)
    {
        if (unicode == '\n') {
            /* new line separator so draw previous line */
            struct nk_rect label;
            label.y = pos_y + line_offset;
            label.h = row_height;
            label.w = line_width;
            label.x = pos_x;
            if (!line_count)
                label.x += x_offset;

            if (is_selected) /* selection needs to draw different background color */
                nk_fill_rect(out, label, 0, background);
            nk_widget_text(out, label, line, (int)((text + text_len) - line),
                &txt, NK_TEXT_CENTERED, font);

            text_len++;
            line_count++;
            line_width = 0;
            line = text + text_len;
            line_offset += row_height;
            glyph_len = nk_utf_decode(text + text_len, &unicode, (int)(byte_len-text_len));
            continue;
        }
        if (unicode == '\r') {
            text_len++;
            glyph_len = nk_utf_decode(text + text_len, &unicode, byte_len-text_len);
            continue;
        }
        glyph_width = font->width(font->userdata, font->height, text+text_len, glyph_len);
        line_width += (float)glyph_width;
        text_len += glyph_len;
        glyph_len = nk_utf_decode(text + text_len, &unicode, byte_len-text_len);
        continue;
    }
    if (line_width > 0) {
        /* draw last line */
        struct nk_rect label;
        label.y = pos_y + line_offset;
        label.h = row_height;
        label.w = line_width;
        label.x = pos_x;
        if (!line_count)
            label.x += x_offset;

        if (is_selected)
            nk_fill_rect(out, label, 0, background);
        nk_widget_text(out, label, line, (int)((text + text_len) - line),
            &txt, NK_TEXT_LEFT, font);
    }}
}

// Assembly:
subq $0xb8, %rsp
movl 0xc8(%rsp), %eax
movl 0xc0(%rsp), %eax
movl %r9d, 0xb4(%rsp)
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movss %xmm0, 0x9c(%rsp)
movss %xmm1, 0x98(%rsp)
movss %xmm2, 0x94(%rsp)
movq %rdx, 0x88(%rsp)
movl %ecx, 0x84(%rsp)
movss %xmm3, 0x80(%rsp)
movq %r8, 0x78(%rsp)
cmpq $0x0, 0xa8(%rsp)
jne 0x8d423
movq 0x37bf9(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x23f9f(%rip), %rsi     # 0xb13a0
leaq 0x23fb6(%rip), %rdx     # 0xb13be
movl $0x6ab8, %ecx           # imm = 0x6AB8
movb $0x0, %al
callq 0x13ec0
movq 0x37bd5(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x8d425
jmp 0x8d427
cmpq $0x0, 0x78(%rsp)
jne 0x8d462
movq 0x37bba(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x23f60(%rip), %rsi     # 0xb13a0
leaq 0x23f77(%rip), %rdx     # 0xb13be
movl $0x6ab9, %ecx           # imm = 0x6AB9
movb $0x0, %al
callq 0x13ec0
movq 0x37b96(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x8d464
jmp 0x8d466
cmpq $0x0, 0xa0(%rsp)
jne 0x8d4a4
movq 0x37b78(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x23f1e(%rip), %rsi     # 0xb13a0
leaq 0x23f35(%rip), %rdx     # 0xb13be
movl $0x6aba, %ecx           # imm = 0x6ABA
movb $0x0, %al
callq 0x13ec0
movq 0x37b54(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x8d4a6
cmpq $0x0, 0x88(%rsp)
je 0x8d4d1
cmpl $0x0, 0x84(%rsp)
je 0x8d4d1
cmpq $0x0, 0xa8(%rsp)
je 0x8d4d1
cmpq $0x0, 0xa0(%rsp)
jne 0x8d4d6
jmp 0x8d8e2
movl $0x0, 0x74(%rsp)
movl $0x0, 0x70(%rsp)
movl $0x0, 0x6c(%rsp)
movl $0x0, 0x68(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x58(%rsp)
movl $0x0, 0x54(%rsp)
movl $0x0, 0x50(%rsp)
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x13460
movlpd %xmm0, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x40(%rsp)
movl 0xb4(%rsp), %eax
movl %eax, 0x48(%rsp)
movl 0xc0(%rsp), %eax
movl %eax, 0x4c(%rsp)
movq 0xa0(%rsp), %rax
movss 0x3bc(%rax), %xmm0
movl 0xc0(%rsp), %edi
callq 0x15100
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
movl %eax, 0xc0(%rsp)
movq 0xa0(%rsp), %rax
movss 0x3bc(%rax), %xmm0
movl 0xb4(%rsp), %edi
callq 0x15100
movl %eax, 0x30(%rsp)
movl 0x30(%rsp), %eax
movl %eax, 0xb4(%rsp)
movq 0x88(%rsp), %rdi
movslq 0x6c(%rsp), %rax
addq %rax, %rdi
movl 0x84(%rsp), %edx
subl 0x6c(%rsp), %edx
leaq 0x70(%rsp), %rsi
callq 0x14030
movl %eax, 0x74(%rsp)
cmpl $0x0, 0x74(%rsp)
jne 0x8d5cf
jmp 0x8d8e2
jmp 0x8d5d1
movl 0x6c(%rsp), %ecx
xorl %eax, %eax
cmpl 0x84(%rsp), %ecx
movb %al, 0xf(%rsp)
jge 0x8d5f0
cmpl $0x0, 0x74(%rsp)
setne %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x8d5fd
jmp 0x8d809
cmpl $0xa, 0x70(%rsp)
jne 0x8d746
movss 0x98(%rsp), %xmm0
addss 0x54(%rsp), %xmm0
movss %xmm0, 0x24(%rsp)
movss 0x80(%rsp), %xmm0
movss %xmm0, 0x2c(%rsp)
movss 0x68(%rsp), %xmm0
movss %xmm0, 0x28(%rsp)
movss 0x9c(%rsp), %xmm0
movss %xmm0, 0x20(%rsp)
cmpl $0x0, 0x50(%rsp)
jne 0x8d663
movss 0x94(%rsp), %xmm0
addss 0x20(%rsp), %xmm0
movss %xmm0, 0x20(%rsp)
cmpl $0x0, 0xc8(%rsp)
je 0x8d690
movq 0xa8(%rsp), %rdi
movsd 0x20(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
movl 0xb4(%rsp), %esi
xorps %xmm2, %xmm2
callq 0x13f10
movq 0xa8(%rsp), %rdi
movq 0x58(%rsp), %rsi
movl 0x88(%rsp), %edx
movl 0x6c(%rsp), %eax
addl %eax, %edx
movl %esi, %eax
subl %eax, %edx
movq 0x78(%rsp), %r9
movsd 0x20(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
leaq 0x40(%rsp), %rcx
movl $0x12, %r8d
callq 0x66ac0
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
movl 0x50(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x50(%rsp)
xorps %xmm0, %xmm0
movss %xmm0, 0x68(%rsp)
movq 0x88(%rsp), %rax
movslq 0x6c(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x58(%rsp)
movss 0x80(%rsp), %xmm0
addss 0x54(%rsp), %xmm0
movss %xmm0, 0x54(%rsp)
movq 0x88(%rsp), %rdi
movslq 0x6c(%rsp), %rax
addq %rax, %rdi
movl 0x84(%rsp), %edx
subl 0x6c(%rsp), %edx
leaq 0x70(%rsp), %rsi
callq 0x14030
movl %eax, 0x74(%rsp)
jmp 0x8d5d1
cmpl $0xd, 0x70(%rsp)
jne 0x8d786
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
movq 0x88(%rsp), %rdi
movslq 0x6c(%rsp), %rax
addq %rax, %rdi
movl 0x84(%rsp), %edx
subl 0x6c(%rsp), %edx
leaq 0x70(%rsp), %rsi
callq 0x14030
movl %eax, 0x74(%rsp)
jmp 0x8d5d1
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x78(%rsp), %rcx
movq 0x78(%rsp), %rdx
movss 0x8(%rdx), %xmm0
movq 0x88(%rsp), %rsi
movslq 0x6c(%rsp), %rdx
addq %rdx, %rsi
movl 0x74(%rsp), %edx
movq (%rcx), %rdi
callq *%rax
movss %xmm0, 0x64(%rsp)
movss 0x64(%rsp), %xmm0
addss 0x68(%rsp), %xmm0
movss %xmm0, 0x68(%rsp)
movl 0x74(%rsp), %eax
addl 0x6c(%rsp), %eax
movl %eax, 0x6c(%rsp)
movq 0x88(%rsp), %rdi
movslq 0x6c(%rsp), %rax
addq %rax, %rdi
movl 0x84(%rsp), %edx
subl 0x6c(%rsp), %edx
leaq 0x70(%rsp), %rsi
callq 0x14030
movl %eax, 0x74(%rsp)
jmp 0x8d5d1
movss 0x68(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x8d8e2
movss 0x98(%rsp), %xmm0
addss 0x54(%rsp), %xmm0
movss %xmm0, 0x14(%rsp)
movss 0x80(%rsp), %xmm0
movss %xmm0, 0x1c(%rsp)
movss 0x68(%rsp), %xmm0
movss %xmm0, 0x18(%rsp)
movss 0x9c(%rsp), %xmm0
movss %xmm0, 0x10(%rsp)
cmpl $0x0, 0x50(%rsp)
jne 0x8d876
movss 0x94(%rsp), %xmm0
addss 0x10(%rsp), %xmm0
movss %xmm0, 0x10(%rsp)
cmpl $0x0, 0xc8(%rsp)
je 0x8d8a3
movq 0xa8(%rsp), %rdi
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movl 0xb4(%rsp), %esi
xorps %xmm2, %xmm2
callq 0x13f10
movq 0xa8(%rsp), %rdi
movq 0x58(%rsp), %rsi
movl 0x88(%rsp), %edx
movl 0x6c(%rsp), %eax
addl %eax, %edx
movl %esi, %eax
subl %eax, %edx
movq 0x78(%rsp), %r9
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
leaq 0x40(%rsp), %rcx
movl $0x11, %r8d
callq 0x66ac0
addq $0xb8, %rsp
retq
nopw (%rax,%rax)