// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_combo_begin_symbol_text
NK_API nk_bool
nk_combo_begin_symbol_text(struct nk_context *ctx, const char *selected, int len,
    enum nk_symbol_type symbol, struct nk_vec2 size)
{
    struct nk_window *win;
    struct nk_style *style;
    struct nk_input *in;

    struct nk_rect header;
    int is_clicked = nk_false;
    enum nk_widget_layout_states s;
    const struct nk_style_item *background;
    struct nk_color symbol_color;
    struct nk_text text;

    NK_ASSERT(ctx);
    NK_ASSERT(ctx->current);
    NK_ASSERT(ctx->current->layout);
    if (!ctx || !ctx->current || !ctx->current->layout)
        return 0;

    win = ctx->current;
    style = &ctx->style;
    s = nk_widget(&header, ctx);
    if (!s) return 0;

    in = (win->layout->flags & NK_WINDOW_ROM || s == NK_WIDGET_DISABLED || s == NK_WIDGET_ROM)? 0: &ctx->input;
    if (nk_button_behavior(&ctx->last_widget_state, header, in, NK_BUTTON_DEFAULT))
        is_clicked = nk_true;

    /* draw combo box header background and border */
    if (ctx->last_widget_state & NK_WIDGET_STATE_ACTIVED) {
        background = &style->combo.active;
        symbol_color = style->combo.symbol_active;
        text.text = style->combo.label_active;
    } else if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER) {
        background = &style->combo.hover;
        symbol_color = style->combo.symbol_hover;
        text.text = style->combo.label_hover;
    } else {
        background = &style->combo.normal;
        symbol_color = style->combo.symbol_normal;
        text.text = style->combo.label_normal;
    }

    text.text = nk_rgb_factor(text.text, style->combo.color_factor);
    symbol_color = nk_rgb_factor(symbol_color, style->combo.color_factor);

    switch(background->type) {
        case NK_STYLE_ITEM_IMAGE:
            text.background = nk_rgba(0, 0, 0, 0);
            nk_draw_image(&win->buffer, header, &background->data.image, nk_rgb_factor(nk_white, style->combo.color_factor));
            break;
        case NK_STYLE_ITEM_NINE_SLICE:
            text.background = nk_rgba(0, 0, 0, 0);
            nk_draw_nine_slice(&win->buffer, header, &background->data.slice, nk_rgb_factor(nk_white, style->combo.color_factor));
            break;
        case NK_STYLE_ITEM_COLOR:
            text.background = background->data.color;
            nk_fill_rect(&win->buffer, header, style->combo.rounding, nk_rgb_factor(background->data.color, style->combo.color_factor));
            nk_stroke_rect(&win->buffer, header, style->combo.rounding, style->combo.border, nk_rgb_factor(style->combo.border_color, style->combo.color_factor));
            break;
    }
    {
        struct nk_rect content;
        struct nk_rect button;
        struct nk_rect label;
        struct nk_rect image;

        enum nk_symbol_type sym;
        if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER)
            sym = style->combo.sym_hover;
        else if (is_clicked)
            sym = style->combo.sym_active;
        else sym = style->combo.sym_normal;

        /* calculate button */
        button.w = header.h - 2 * style->combo.button_padding.y;
        button.x = (header.x + header.w - header.h) - style->combo.button_padding.x;
        button.y = header.y + style->combo.button_padding.y;
        button.h = button.w;

        content.x = button.x + style->combo.button.padding.x;
        content.y = button.y + style->combo.button.padding.y;
        content.w = button.w - 2 * style->combo.button.padding.x;
        content.h = button.h - 2 * style->combo.button.padding.y;
        nk_draw_button_symbol(&win->buffer, &button, &content, ctx->last_widget_state,
            &ctx->style.combo.button, sym, style->font);

        /* draw symbol */
        image.x = header.x + style->combo.content_padding.x;
        image.y = header.y + style->combo.content_padding.y;
        image.h = header.h - 2 * style->combo.content_padding.y;
        image.w = image.h;
        nk_draw_symbol(&win->buffer, symbol, image, text.background, symbol_color,
            1.0f, style->font);

        /* draw label */
        text.padding = nk_vec2(0,0);
        label.x = image.x + image.w + style->combo.spacing.x + style->combo.content_padding.x;
        label.y = header.y + style->combo.content_padding.y;
        label.w = (button.x - style->combo.content_padding.x) - label.x;
        label.h = header.h - 2 * style->combo.content_padding.y;
        nk_widget_text(&win->buffer, label, selected, len, &text, NK_TEXT_LEFT, style->font);
    }
    return nk_combo_begin(ctx, win, size, is_clicked, header);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movaps %xmm0, 0x80(%rsp)
movl %ecx, %r15d
movl %edx, %r13d
movq %rsi, %r14
movq %rdi, %rbx
testq %rdi, %rdi
jne 0x53031
movq 0x34fe6(%rip), %r12     # 0x87ff0
movq (%r12), %rdi
leaq 0x1ed77(%rip), %rsi     # 0x71d8c
leaq 0x1ed8e(%rip), %rdx     # 0x71daa
movl $0x7324, %ecx           # imm = 0x7324
xorl %eax, %eax
callq 0x12d80
movq (%r12), %rdi
callq 0x13780
cmpq $0x0, 0x4780(%rbx)
jne 0x53069
movq 0x34fae(%rip), %r12     # 0x87ff0
movq (%r12), %rdi
leaq 0x1ed3f(%rip), %rsi     # 0x71d8c
leaq 0x1ed56(%rip), %rdx     # 0x71daa
movl $0x7325, %ecx           # imm = 0x7325
xorl %eax, %eax
callq 0x12d80
movq (%r12), %rdi
callq 0x13780
movq 0x4780(%rbx), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x530a8
movq 0x34f6f(%rip), %r12     # 0x87ff0
movq (%r12), %rdi
leaq 0x1ed00(%rip), %rsi     # 0x71d8c
leaq 0x1ed17(%rip), %rdx     # 0x71daa
movl $0x7326, %ecx           # imm = 0x7326
xorl %eax, %eax
callq 0x12d80
movq (%r12), %rdi
callq 0x13780
xorl %ebp, %ebp
testq %rbx, %rbx
je 0x534df
movq 0x4780(%rbx), %r12
testq %r12, %r12
je 0x534df
cmpq $0x0, 0xa8(%r12)
je 0x534df
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x128e0
testl %eax, %eax
je 0x534df
movq 0xa8(%r12), %rcx
movl $0x1000, %edx           # imm = 0x1000
andl 0x4(%rcx), %edx
xorl $0x1, %eax
xorl %ecx, %ecx
orl %edx, %eax
movq %rbx, %rsi
cmovneq %rcx, %rsi
leaq 0x2598(%rbx), %rdi
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movaps %xmm0, 0x60(%rsp)
movaps %xmm1, 0x40(%rsp)
xorl %edx, %edx
callq 0x521be
xorl %edx, %edx
movl %eax, 0x70(%rsp)
testl %eax, %eax
setne %al
movl 0x2598(%rbx), %ecx
testb $0x20, %cl
movl %r13d, 0x5c(%rsp)
jne 0x5315e
testb $0x10, %cl
jne 0x53173
leaq 0x2018(%rbx), %r13
movl 0x2094(%rbx), %ecx
movl 0x20a0(%rbx), %ebp
jmp 0x53186
leaq 0x2068(%rbx), %r13
movl 0x209c(%rbx), %ecx
movl 0x20a8(%rbx), %ebp
jmp 0x53186
leaq 0x2040(%rbx), %r13
movl 0x2098(%rbx), %ecx
movl 0x20a4(%rbx), %ebp
movl %ecx, 0x3c(%rsp)
movb %al, %dl
movl %edx, 0x58(%rsp)
movss 0x21b4(%rbx), %xmm0
movss %xmm0, 0x20(%rsp)
movl 0x3c(%rsp), %edi
callq 0x13e60
movl %eax, 0x3c(%rsp)
movl %ebp, %edi
movss 0x20(%rsp), %xmm0
callq 0x13e60
movl %eax, 0x54(%rsp)
movl (%r13), %eax
testl %eax, %eax
je 0x5329c
cmpl $0x2, %eax
je 0x53239
cmpl $0x1, %eax
jne 0x5332d
addq $0x8, %r13
movss 0x20(%rsp), %xmm0
ucomiss 0x1b6cd(%rip), %xmm0    # 0x6e8b4
mulss 0x1b6c9(%rip), %xmm0    # 0x6e8b8
movl $0x0, 0x38(%rsp)
cvttss2si %xmm0, %eax
movl $0xff, %ecx
cmovnel %eax, %ecx
cmovpl %eax, %ecx
leaq 0x68(%r12), %rdi
movzbl %cl, %eax
movl %eax, %ecx
shll $0x10, %ecx
movl %eax, %edx
shll $0x8, %edx
orl %ecx, %edx
addl %eax, %edx
addl $0xff000000, %edx       # imm = 0xFF000000
movaps 0x60(%rsp), %xmm0
movaps 0x40(%rsp), %xmm1
movq %r13, %rsi
callq 0x134d0
jmp 0x5332d
addq $0x8, %r13
movss 0x20(%rsp), %xmm0
ucomiss 0x1b66a(%rip), %xmm0    # 0x6e8b4
mulss 0x1b666(%rip), %xmm0    # 0x6e8b8
movl $0x0, 0x38(%rsp)
cvttss2si %xmm0, %eax
movl $0xff, %ecx
cmovnel %eax, %ecx
cmovpl %eax, %ecx
leaq 0x68(%r12), %rdi
movzbl %cl, %eax
movl %eax, %ecx
shll $0x10, %ecx
movl %eax, %edx
shll $0x8, %edx
orl %ecx, %edx
addl %eax, %edx
addl $0xff000000, %edx       # imm = 0xFF000000
movaps 0x60(%rsp), %xmm0
movaps 0x40(%rsp), %xmm1
movq %r13, %rsi
callq 0x13fe0
jmp 0x5332d
movl 0x8(%r13), %edi
movl %edi, 0x38(%rsp)
leaq 0x68(%r12), %r13
movss 0x2198(%rbx), %xmm0
movss %xmm0, 0x50(%rsp)
movss 0x20(%rsp), %xmm0
callq 0x13e60
movq %r13, %rdi
movaps 0x60(%rsp), %xmm0
movaps 0x40(%rsp), %xmm1
movss 0x50(%rsp), %xmm2
movl %eax, %esi
callq 0x12de0
movss 0x2198(%rbx), %xmm0
movss %xmm0, 0x20(%rsp)
movss 0x2194(%rbx), %xmm0
movss %xmm0, 0x40(%rsp)
movss 0x21b4(%rbx), %xmm0
movl 0x2090(%rbx), %edi
callq 0x13e60
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movq %r13, %rdi
movss 0x20(%rsp), %xmm2
movss 0x40(%rsp), %xmm3
movl %eax, %esi
callq 0x12060
xorl %eax, %eax
cmpl $0x0, 0x70(%rsp)
setne %al
movl 0x2598(%rbx), %ecx
testb $0x10, %cl
leaq 0x2188(,%rax,8), %rax
movl $0x218c, %edx           # imm = 0x218C
cmoveq %rax, %rdx
movl (%rbx,%rdx), %r9d
movss 0x10(%rsp), %xmm3
movss 0x1c(%rsp), %xmm0
movss 0x21a8(%rbx), %xmm1
movaps %xmm1, %xmm2
addss %xmm1, %xmm2
addss 0x18(%rsp), %xmm3
subss %xmm0, %xmm3
subss %xmm2, %xmm0
leaq 0xa8(%rsp), %rsi
movss %xmm0, 0x8(%rsi)
subss 0x21a4(%rbx), %xmm3
movaps %xmm3, 0x20(%rsp)
addss 0x14(%rsp), %xmm1
movss %xmm3, (%rsi)
movss %xmm1, 0x4(%rsi)
movss %xmm0, 0xc(%rsi)
leaq 0x20b0(%rbx), %r8
movsd 0x2150(%rbx), %xmm2
unpcklps %xmm1, %xmm3            # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
addps %xmm2, %xmm3
unpcklps %xmm0, %xmm0            # xmm0 = xmm0[0,0,1,1]
addps %xmm2, %xmm2
subps %xmm2, %xmm0
movlhps %xmm0, %xmm3            # xmm3 = xmm3[0],xmm0[0]
leaq 0x98(%rsp), %rdx
movups %xmm3, (%rdx)
leaq 0x68(%r12), %r13
movq 0x168(%rbx), %rax
movq %rax, (%rsp)
movq %r13, %rdi
callq 0x522f0
movsd 0x10(%rsp), %xmm1
movsd 0x219c(%rbx), %xmm2
addps %xmm2, %xmm1
movaps %xmm1, %xmm0
movaps %xmm1, 0x40(%rsp)
movss 0x1c(%rsp), %xmm1
shufps $0x55, %xmm2, %xmm2     # xmm2 = xmm2[1,1,1,1]
addss %xmm2, %xmm2
subss %xmm2, %xmm1
movaps %xmm1, 0x70(%rsp)
movq 0x168(%rbx), %r8
leaq 0x30(%rsp), %rbp
movl 0x8(%rbp), %edx
shufps $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0]
movss 0x1b479(%rip), %xmm2    # 0x6e8b4
movq %r13, %rdi
movl %r15d, %esi
movl 0x54(%rsp), %ecx
callq 0x52e29
movq $0x0, (%rbp)
movaps 0x70(%rsp), %xmm0
addss 0x40(%rsp), %xmm0
addss 0x21ac(%rbx), %xmm0
movsd 0x219c(%rbx), %xmm3
movss 0x14(%rsp), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
addps %xmm3, %xmm0
movaps 0x20(%rsp), %xmm1
subss %xmm3, %xmm1
subss %xmm0, %xmm1
movss 0x1c(%rsp), %xmm2
shufps $0x55, %xmm3, %xmm3     # xmm3 = xmm3[1,1,1,1]
addss %xmm3, %xmm3
subss %xmm3, %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movq 0x168(%rbx), %r9
movq %r13, %rdi
movq %r14, %rsi
movl 0x5c(%rsp), %edx
movq %rbp, %rcx
movl $0x11, %r8d
callq 0x45d79
movsd 0x10(%rsp), %xmm1
movsd 0x18(%rsp), %xmm2
movq %rbx, %rdi
movq %r12, %rsi
movaps 0x80(%rsp), %xmm0
movl 0x58(%rsp), %edx
callq 0x52392
movl %eax, %ebp
movl %ebp, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq