// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_widget_text
NK_LIB void
nk_widget_text(struct nk_command_buffer *o, struct nk_rect b,
    const char *string, int len, const struct nk_text *t,
    nk_flags a, const struct nk_user_font *f)
{
    struct nk_rect label;
    float text_width;

    NK_ASSERT(o);
    NK_ASSERT(t);
    if (!o || !t) return;

    b.h = NK_MAX(b.h, 2 * t->padding.y);
    label.x = 0; label.w = 0;
    label.y = b.y + t->padding.y;
    label.h = NK_MIN(f->height, b.h - 2 * t->padding.y);

    text_width = f->width(f->userdata, f->height, (const char*)string, len);
    text_width += (2.0f * t->padding.x);

    /* align in x-axis */
    if (a & NK_TEXT_ALIGN_LEFT) {
        label.x = b.x + t->padding.x;
        label.w = NK_MAX(0, b.w - 2 * t->padding.x);
    } else if (a & NK_TEXT_ALIGN_CENTERED) {
        label.w = NK_MAX(1, 2 * t->padding.x + (float)text_width);
        label.x = (b.x + t->padding.x + ((b.w - 2 * t->padding.x) - label.w) / 2);
        label.x = NK_MAX(b.x + t->padding.x, label.x);
        label.w = NK_MIN(b.x + b.w, label.x + label.w);
        if (label.w >= label.x) label.w -= label.x;
    } else if (a & NK_TEXT_ALIGN_RIGHT) {
        label.x = NK_MAX(b.x + t->padding.x, (b.x + b.w) - (2 * t->padding.x + (float)text_width));
        label.w = (float)text_width + 2 * t->padding.x;
    } else return;

    /* align in y-axis */
    if (a & NK_TEXT_ALIGN_MIDDLE) {
        label.y = b.y + b.h/2.0f - (float)f->height/2.0f;
        label.h = NK_MAX(b.h/2.0f, b.h - (b.h/2.0f + f->height/2.0f));
    } else if (a & NK_TEXT_ALIGN_BOTTOM) {
        label.y = b.y + b.h - f->height;
        label.h = f->height;
    }
    nk_draw_text(o, label, (const char*)string, len, f, t->background, t->text);
}

// Assembly:
subq $0x78, %rsp
movlpd %xmm0, 0x68(%rsp)
movlpd %xmm1, 0x70(%rsp)
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movl %edx, 0x54(%rsp)
movq %rcx, 0x48(%rsp)
movl %r8d, 0x44(%rsp)
movq %r9, 0x38(%rsp)
cmpq $0x0, 0x60(%rsp)
jne 0x66b28
movq 0x5e4f4(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x4a89a(%rip), %rsi     # 0xb13a0
leaq 0x4a8b1(%rip), %rdx     # 0xb13be
movl $0x5bcf, %ecx           # imm = 0x5BCF
movb $0x0, %al
callq 0x13ec0
movq 0x5e4d0(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x66b2a
jmp 0x66b2c
cmpq $0x0, 0x48(%rsp)
jne 0x66b67
movq 0x5e4b5(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x4a85b(%rip), %rsi     # 0xb13a0
leaq 0x4a872(%rip), %rdx     # 0xb13be
movl $0x5bd0, %ecx           # imm = 0x5BD0
movb $0x0, %al
callq 0x13ec0
movq 0x5e491(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x66b69
cmpq $0x0, 0x60(%rsp)
je 0x66b79
cmpq $0x0, 0x48(%rsp)
jne 0x66b7e
jmp 0x670bb
movss 0x74(%rsp), %xmm1
movq 0x48(%rsp), %rax
movss 0x46953(%rip), %xmm0    # 0xad4e4
mulss 0x4(%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x66bb5
movq 0x48(%rsp), %rax
movss 0x4693c(%rip), %xmm0    # 0xad4e4
mulss 0x4(%rax), %xmm0
movss %xmm0, 0x20(%rsp)
jmp 0x66bc1
movss 0x74(%rsp), %xmm0
movss %xmm0, 0x20(%rsp)
movss 0x20(%rsp), %xmm0
movss %xmm0, 0x74(%rsp)
xorps %xmm0, %xmm0
movss %xmm0, 0x28(%rsp)
xorps %xmm0, %xmm0
movss %xmm0, 0x30(%rsp)
movss 0x6c(%rsp), %xmm0
movq 0x48(%rsp), %rax
addss 0x4(%rax), %xmm0
movss %xmm0, 0x2c(%rsp)
movq 0x38(%rsp), %rax
movss 0x8(%rax), %xmm1
movss 0x74(%rsp), %xmm0
movq 0x48(%rsp), %rax
movss 0x4(%rax), %xmm2
addss %xmm2, %xmm2
subss %xmm2, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x66c2e
movq 0x38(%rsp), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, 0x1c(%rsp)
jmp 0x66c4c
movss 0x74(%rsp), %xmm0
movq 0x48(%rsp), %rax
movss 0x4(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x1c(%rsp)
movss 0x1c(%rsp), %xmm0
movss %xmm0, 0x34(%rsp)
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x38(%rsp), %rcx
movq 0x38(%rsp), %rdx
movss 0x8(%rdx), %xmm0
movq 0x58(%rsp), %rsi
movl 0x54(%rsp), %edx
movq (%rcx), %rdi
callq *%rax
movss %xmm0, 0x24(%rsp)
movq 0x48(%rsp), %rax
movss (%rax), %xmm0
movss 0x24(%rsp), %xmm1
addss %xmm0, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x24(%rsp)
movl 0x44(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x66d1c
movss 0x68(%rsp), %xmm0
movq 0x48(%rsp), %rax
addss (%rax), %xmm0
movss %xmm0, 0x28(%rsp)
movss 0x70(%rsp), %xmm0
movq 0x48(%rsp), %rax
movss (%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x66d00
movss 0x70(%rsp), %xmm0
movq 0x48(%rsp), %rax
movss (%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x18(%rsp)
jmp 0x66d0b
xorps %xmm0, %xmm0
movss %xmm0, 0x18(%rsp)
jmp 0x66d0b
movss 0x18(%rsp), %xmm0
movss %xmm0, 0x30(%rsp)
jmp 0x66f50
movl 0x44(%rsp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x66e8d
movq 0x48(%rsp), %rax
movss (%rax), %xmm0
movss 0x24(%rsp), %xmm1
addss %xmm0, %xmm0
addss %xmm1, %xmm0
movss 0x4679d(%rip), %xmm1    # 0xad4e8
ucomiss %xmm1, %xmm0
jbe 0x66d6f
movq 0x48(%rsp), %rax
movss (%rax), %xmm0
movss 0x24(%rsp), %xmm1
addss %xmm0, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x14(%rsp)
jmp 0x66d7f
movss 0x46771(%rip), %xmm0    # 0xad4e8
movss %xmm0, 0x14(%rsp)
jmp 0x66d7f
movss 0x14(%rsp), %xmm0
movss %xmm0, 0x30(%rsp)
movss 0x68(%rsp), %xmm0
movq 0x48(%rsp), %rax
addss (%rax), %xmm0
movss 0x70(%rsp), %xmm1
movq 0x48(%rsp), %rax
movss (%rax), %xmm2
addss %xmm2, %xmm2
subss %xmm2, %xmm1
subss 0x30(%rsp), %xmm1
movss 0x46725(%rip), %xmm2    # 0xad4e4
divss %xmm2, %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x28(%rsp)
movss 0x68(%rsp), %xmm1
movq 0x48(%rsp), %rax
addss (%rax), %xmm1
movss 0x28(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x66df5
movss 0x28(%rsp), %xmm0
movss %xmm0, 0x10(%rsp)
jmp 0x66e0a
movss 0x68(%rsp), %xmm0
movq 0x48(%rsp), %rax
addss (%rax), %xmm0
movss %xmm0, 0x10(%rsp)
movss 0x10(%rsp), %xmm0
movss %xmm0, 0x28(%rsp)
movss 0x68(%rsp), %xmm1
addss 0x70(%rsp), %xmm1
movss 0x28(%rsp), %xmm0
addss 0x30(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x66e47
movss 0x68(%rsp), %xmm0
addss 0x70(%rsp), %xmm0
movss %xmm0, 0xc(%rsp)
jmp 0x66e59
movss 0x28(%rsp), %xmm0
addss 0x30(%rsp), %xmm0
movss %xmm0, 0xc(%rsp)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x30(%rsp)
movss 0x30(%rsp), %xmm0
ucomiss 0x28(%rsp), %xmm0
jb 0x66e88
movss 0x28(%rsp), %xmm1
movss 0x30(%rsp), %xmm0
subss %xmm1, %xmm0
movss %xmm0, 0x30(%rsp)
jmp 0x66f4e
movl 0x44(%rsp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x66f47
movss 0x68(%rsp), %xmm1
movq 0x48(%rsp), %rax
addss (%rax), %xmm1
movss 0x68(%rsp), %xmm0
addss 0x70(%rsp), %xmm0
movq 0x48(%rsp), %rax
movss (%rax), %xmm2
movss 0x24(%rsp), %xmm3
addss %xmm2, %xmm2
addss %xmm3, %xmm2
subss %xmm2, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x66f07
movss 0x68(%rsp), %xmm0
addss 0x70(%rsp), %xmm0
movq 0x48(%rsp), %rax
movss (%rax), %xmm1
movss 0x24(%rsp), %xmm2
addss %xmm1, %xmm1
addss %xmm2, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x8(%rsp)
jmp 0x66f1c
movss 0x68(%rsp), %xmm0
movq 0x48(%rsp), %rax
addss (%rax), %xmm0
movss %xmm0, 0x8(%rsp)
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x28(%rsp)
movss 0x24(%rsp), %xmm1
movq 0x48(%rsp), %rax
movss (%rax), %xmm0
addss %xmm0, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x30(%rsp)
jmp 0x66f4c
jmp 0x670bb
jmp 0x66f4e
jmp 0x66f50
movl 0x44(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x6704d
movss 0x6c(%rsp), %xmm0
movss 0x74(%rsp), %xmm1
movss 0x46570(%rip), %xmm2    # 0xad4e4
divss %xmm2, %xmm1
addss %xmm1, %xmm0
movq 0x38(%rsp), %rax
movss 0x8(%rax), %xmm1
movss 0x46556(%rip), %xmm2    # 0xad4e4
divss %xmm2, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x2c(%rsp)
movss 0x74(%rsp), %xmm1
movss 0x4653a(%rip), %xmm0    # 0xad4e4
divss %xmm0, %xmm1
movss 0x74(%rsp), %xmm0
movss 0x74(%rsp), %xmm2
movss 0x46522(%rip), %xmm3    # 0xad4e4
divss %xmm3, %xmm2
movq 0x38(%rsp), %rax
movss 0x8(%rax), %xmm3
movss 0x4650c(%rip), %xmm4    # 0xad4e4
divss %xmm4, %xmm3
addss %xmm3, %xmm2
subss %xmm2, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x67027
movss 0x74(%rsp), %xmm0
movss 0x74(%rsp), %xmm1
movss 0x464e7(%rip), %xmm2    # 0xad4e4
divss %xmm2, %xmm1
movq 0x38(%rsp), %rax
movss 0x8(%rax), %xmm2
movss 0x464d1(%rip), %xmm3    # 0xad4e4
divss %xmm3, %xmm2
addss %xmm2, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x4(%rsp)
jmp 0x6703f
movss 0x74(%rsp), %xmm0
movss 0x464af(%rip), %xmm1    # 0xad4e4
divss %xmm1, %xmm0
movss %xmm0, 0x4(%rsp)
movss 0x4(%rsp), %xmm0
movss %xmm0, 0x34(%rsp)
jmp 0x67087
movl 0x44(%rsp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x67085
movss 0x6c(%rsp), %xmm0
addss 0x74(%rsp), %xmm0
movq 0x38(%rsp), %rax
subss 0x8(%rax), %xmm0
movss %xmm0, 0x2c(%rsp)
movq 0x38(%rsp), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, 0x34(%rsp)
jmp 0x67087
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
movl 0x54(%rsp), %edx
movq 0x38(%rsp), %rcx
movq 0x48(%rsp), %rax
movq %rax, %r8
movsd 0x28(%rsp), %xmm0
movsd 0x30(%rsp), %xmm1
movl 0x8(%r8), %r8d
movl 0xc(%rax), %r9d
callq 0x14ee0
addq $0x78, %rsp
retq