// File: /workspace/github_c_makefile_star2_O0/space222[P]silo/./nuklear.h
// Function: nk_combo_begin_symbol_text
NK_API int
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_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;
    }
    if (background->type == NK_STYLE_ITEM_IMAGE) {
        text.background = nk_rgba(0,0,0,0);
        nk_draw_image(&win->buffer, header, &background->data.image, nk_white);
    } else {
        text.background = background->data.color;
        nk_fill_rect(&win->buffer, header, style->combo.rounding, background->data.color);
        nk_stroke_rect(&win->buffer, header, style->combo.rounding, style->combo.border, style->combo.border_color);
    }
    {
        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:
subq $0x198, %rsp            # imm = 0x198
movlpd %xmm0, 0x18c(%rsp)
movq %rdi, 0x180(%rsp)
movq %rsi, 0x178(%rsp)
movl %edx, 0x174(%rsp)
movl %ecx, 0x170(%rsp)
movl $0x0, 0x144(%rsp)
cmpq $0x0, 0x180(%rsp)
je 0x350f6
jmp 0x35115
leaq 0x13422(%rip), %rdi     # 0x4851f
leaq 0x102af(%rip), %rsi     # 0x453b3
movl $0x6113, %edx           # imm = 0x6113
leaq 0x14a08(%rip), %rcx     # 0x49b18
callq 0x20a0
movq 0x180(%rsp), %rax
cmpq $0x0, 0x3fe8(%rax)
je 0x35129
jmp 0x35148
leaq 0x11dc9(%rip), %rdi     # 0x46ef9
leaq 0x1027c(%rip), %rsi     # 0x453b3
movl $0x6114, %edx           # imm = 0x6114
leaq 0x149d5(%rip), %rcx     # 0x49b18
callq 0x20a0
movq 0x180(%rsp), %rax
movq 0x3fe8(%rax), %rax
cmpq $0x0, 0xa8(%rax)
je 0x35163
jmp 0x35182
leaq 0x11f0b(%rip), %rdi     # 0x47075
leaq 0x10242(%rip), %rsi     # 0x453b3
movl $0x6115, %edx           # imm = 0x6115
leaq 0x1499b(%rip), %rcx     # 0x49b18
callq 0x20a0
cmpq $0x0, 0x180(%rsp)
je 0x351b8
movq 0x180(%rsp), %rax
cmpq $0x0, 0x3fe8(%rax)
je 0x351b8
movq 0x180(%rsp), %rax
movq 0x3fe8(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x351c8
movl $0x0, 0x194(%rsp)
jmp 0x35948
movq 0x180(%rsp), %rax
movq 0x3fe8(%rax), %rax
movq %rax, 0x168(%rsp)
movq 0x180(%rsp), %rax
addq $0x168, %rax            # imm = 0x168
movq %rax, 0x160(%rsp)
movq 0x180(%rsp), %rsi
leaq 0x148(%rsp), %rdi
callq 0x1cd90
movl %eax, 0x140(%rsp)
cmpl $0x0, 0x140(%rsp)
jne 0x3522b
movl $0x0, 0x194(%rsp)
jmp 0x35948
movq 0x168(%rsp), %rax
movq 0xa8(%rax), %rax
movl 0x4(%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
jne 0x35251
cmpl $0x2, 0x140(%rsp)
jne 0x3525a
xorl %eax, %eax
movq %rax, 0x8(%rsp)
jmp 0x35267
movq 0x180(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x158(%rsp)
movq 0x180(%rsp), %rdi
addq $0x1f70, %rdi           # imm = 0x1F70
movups 0x148(%rsp), %xmm0
movaps %xmm0, 0x110(%rsp)
movq 0x158(%rsp), %rsi
movsd 0x110(%rsp), %xmm0
movsd 0x118(%rsp), %xmm1
xorl %edx, %edx
callq 0x338c0
cmpl $0x0, %eax
je 0x352c4
movl $0x1, 0x144(%rsp)
movq 0x180(%rsp), %rax
movl 0x1f70(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x35323
movq 0x160(%rsp), %rax
addq $0x1948, %rax           # imm = 0x1948
addq $0x40, %rax
movq %rax, 0x138(%rsp)
movq 0x160(%rsp), %rax
movl 0x19c0(%rax), %eax
movl %eax, 0x134(%rsp)
movq 0x160(%rsp), %rax
movl 0x19b4(%rax), %eax
movl %eax, 0x12c(%rsp)
jmp 0x353c1
movq 0x180(%rsp), %rax
movl 0x1f70(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x3537f
movq 0x160(%rsp), %rax
addq $0x1948, %rax           # imm = 0x1948
addq $0x20, %rax
movq %rax, 0x138(%rsp)
movq 0x160(%rsp), %rax
movl 0x19bc(%rax), %eax
movl %eax, 0x134(%rsp)
movq 0x160(%rsp), %rax
movl 0x19b0(%rax), %eax
movl %eax, 0x12c(%rsp)
jmp 0x353bf
movq 0x160(%rsp), %rax
addq $0x1948, %rax           # imm = 0x1948
movq %rax, 0x138(%rsp)
movq 0x160(%rsp), %rax
movl 0x19b8(%rax), %eax
movl %eax, 0x134(%rsp)
movq 0x160(%rsp), %rax
movl 0x19ac(%rax), %eax
movl %eax, 0x12c(%rsp)
jmp 0x353c1
movq 0x138(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x35446
xorl %ecx, %ecx
movl %ecx, %edi
movl %ecx, %esi
movl %ecx, %edx
callq 0x57b0
movl %eax, 0x10c(%rsp)
movl 0x10c(%rsp), %eax
movl %eax, 0x128(%rsp)
movq 0x168(%rsp), %rdi
addq $0x68, %rdi
movups 0x148(%rsp), %xmm0
movaps %xmm0, 0xf0(%rsp)
movq 0x138(%rsp), %rsi
addq $0x8, %rsi
movl $0xffffffff, 0xec(%rsp) # imm = 0xFFFFFFFF
movsd 0xf0(%rsp), %xmm0
movsd 0xf8(%rsp), %xmm1
movl 0xec(%rsp), %edx
callq 0xc3c0
jmp 0x35513
movq 0x138(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x128(%rsp)
movq 0x168(%rsp), %rdi
addq $0x68, %rdi
movups 0x148(%rsp), %xmm0
movaps %xmm0, 0xd0(%rsp)
movq 0x160(%rsp), %rax
movss 0x1a88(%rax), %xmm2
movq 0x138(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0xcc(%rsp)
movsd 0xd0(%rsp), %xmm0
movsd 0xd8(%rsp), %xmm1
movl 0xcc(%rsp), %esi
callq 0xb130
movq 0x168(%rsp), %rdi
addq $0x68, %rdi
movups 0x148(%rsp), %xmm0
movaps %xmm0, 0xb0(%rsp)
movq 0x160(%rsp), %rax
movss 0x1a84(%rax), %xmm3
movss 0x1a88(%rax), %xmm2
movl 0x19a8(%rax), %eax
movl %eax, 0xac(%rsp)
movsd 0xb0(%rsp), %xmm0
movsd 0xb8(%rsp), %xmm1
movl 0xac(%rsp), %esi
callq 0xaf00
movq 0x180(%rsp), %rax
movl 0x1f70(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x3553d
movq 0x160(%rsp), %rax
movl 0x1a7c(%rax), %eax
movl %eax, 0x68(%rsp)
jmp 0x3556f
cmpl $0x0, 0x144(%rsp)
je 0x3555b
movq 0x160(%rsp), %rax
movl 0x1a80(%rax), %eax
movl %eax, 0x68(%rsp)
jmp 0x3556d
movq 0x160(%rsp), %rax
movl 0x1a78(%rax), %eax
movl %eax, 0x68(%rsp)
jmp 0x3556f
movss 0x154(%rsp), %xmm0
movq 0x160(%rsp), %rax
movss 0x1a98(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x94(%rsp)
movss 0x148(%rsp), %xmm0
movss 0x150(%rsp), %xmm1
addss %xmm1, %xmm0
movss 0x154(%rsp), %xmm1
subss %xmm1, %xmm0
movq 0x160(%rsp), %rax
movss 0x1a94(%rax), %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x8c(%rsp)
movss 0x14c(%rsp), %xmm0
movq 0x160(%rsp), %rax
movss 0x1a98(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x90(%rsp)
movss 0x94(%rsp), %xmm0
movss %xmm0, 0x98(%rsp)
movss 0x8c(%rsp), %xmm0
movq 0x160(%rsp), %rax
movss 0x1a48(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x9c(%rsp)
movss 0x90(%rsp), %xmm0
movq 0x160(%rsp), %rax
movss 0x1a4c(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0xa0(%rsp)
movss 0x94(%rsp), %xmm0
movq 0x160(%rsp), %rax
movss 0x1a48(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0xa4(%rsp)
movss 0x98(%rsp), %xmm0
movq 0x160(%rsp), %rax
movss 0x1a4c(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0xa8(%rsp)
movq 0x168(%rsp), %rdi
addq $0x68, %rdi
movq 0x180(%rsp), %r8
movl 0x1f70(%r8), %ecx
addq $0x1b30, %r8            # imm = 0x1B30
movl 0x68(%rsp), %r9d
movq 0x160(%rsp), %rax
movq (%rax), %rdx
movq %rsp, %rax
movq %rdx, (%rax)
leaq 0x8c(%rsp), %rsi
leaq 0x9c(%rsp), %rdx
callq 0x33a70
movss 0x148(%rsp), %xmm0
movq 0x160(%rsp), %rax
movss 0x1a8c(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x6c(%rsp)
movss 0x14c(%rsp), %xmm0
movq 0x160(%rsp), %rax
movss 0x1a90(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x70(%rsp)
movss 0x154(%rsp), %xmm0
movq 0x160(%rsp), %rax
movss 0x1a90(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x78(%rsp)
movss 0x78(%rsp), %xmm0
movss %xmm0, 0x74(%rsp)
movq 0x168(%rsp), %rdi
addq $0x68, %rdi
movl 0x170(%rsp), %esi
movups 0x6c(%rsp), %xmm0
movaps %xmm0, 0x50(%rsp)
movl 0x128(%rsp), %eax
movl %eax, 0x4c(%rsp)
movl 0x134(%rsp), %eax
movl %eax, 0x48(%rsp)
movq 0x160(%rsp), %rax
movq (%rax), %r8
movsd 0x50(%rsp), %xmm0
movsd 0x58(%rsp), %xmm1
movl 0x4c(%rsp), %edx
movl 0x48(%rsp), %ecx
movss 0xf853(%rip), %xmm2     # 0x45024
callq 0x34ca0
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x41b0
movlpd %xmm0, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x120(%rsp)
movss 0x6c(%rsp), %xmm0
movss 0x74(%rsp), %xmm1
addss %xmm1, %xmm0
movq 0x160(%rsp), %rax
movss 0x1a8c(%rax), %xmm1
movss 0x1a9c(%rax), %xmm2
addss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x7c(%rsp)
movss 0x14c(%rsp), %xmm0
movq 0x160(%rsp), %rax
movss 0x1a90(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x80(%rsp)
movss 0x8c(%rsp), %xmm0
movq 0x160(%rsp), %rax
movss 0x1a8c(%rax), %xmm1
subss %xmm1, %xmm0
movss 0x7c(%rsp), %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x84(%rsp)
movss 0x154(%rsp), %xmm0
movq 0x160(%rsp), %rax
movss 0x1a90(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x88(%rsp)
movq 0x168(%rsp), %rdi
addq $0x68, %rdi
movups 0x7c(%rsp), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x178(%rsp), %rsi
movl 0x174(%rsp), %edx
movq 0x160(%rsp), %rax
movq (%rax), %r9
movsd 0x30(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
leaq 0x120(%rsp), %rcx
movl $0x11, %r8d
callq 0x24820
movq 0x180(%rsp), %rdi
movq 0x168(%rsp), %rsi
movq 0x18c(%rsp), %rax
movq %rax, 0x28(%rsp)
movl 0x144(%rsp), %edx
movups 0x148(%rsp), %xmm0
movaps %xmm0, 0x10(%rsp)
movsd 0x28(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movsd 0x18(%rsp), %xmm2
callq 0x33b70
movl %eax, 0x194(%rsp)
movl 0x194(%rsp), %eax
addq $0x198, %rsp            # imm = 0x198
retq
nopw (%rax,%rax)