// File: /workspace/github_c_makefile_star2_O0/space222[P]silo/./nuklear.h
// Function: nk_combo_begin_image_text
NK_API int
nk_combo_begin_image_text(struct nk_context *ctx, const char *selected, int len,
    struct nk_image img, 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_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;
        text.text = style->combo.label_active;
    } else if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER) {
        background = &style->combo.hover;
        text.text = style->combo.label_hover;
    } else {
        background = &style->combo.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 image */
        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_image(&win->buffer, image, &img, nk_white);

        /* 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 $0x1a8, %rsp            # imm = 0x1A8
leaq 0x1b0(%rsp), %rax
movq %rax, 0x18(%rsp)
movlpd %xmm0, 0x19c(%rsp)
movq %rdi, 0x190(%rsp)
movq %rsi, 0x188(%rsp)
movl %edx, 0x184(%rsp)
movl $0x0, 0x154(%rsp)
cmpq $0x0, 0x190(%rsp)
je 0x3605c
jmp 0x3607b
leaq 0x124bc(%rip), %rdi     # 0x4851f
leaq 0xf349(%rip), %rsi      # 0x453b3
movl $0x61bf, %edx           # imm = 0x61BF
leaq 0x13b5d(%rip), %rcx     # 0x49bd3
callq 0x20a0
movq 0x190(%rsp), %rax
cmpq $0x0, 0x3fe8(%rax)
je 0x3608f
jmp 0x360ae
leaq 0x10e63(%rip), %rdi     # 0x46ef9
leaq 0xf316(%rip), %rsi      # 0x453b3
movl $0x61c0, %edx           # imm = 0x61C0
leaq 0x13b2a(%rip), %rcx     # 0x49bd3
callq 0x20a0
movq 0x190(%rsp), %rax
movq 0x3fe8(%rax), %rax
cmpq $0x0, 0xa8(%rax)
je 0x360c9
jmp 0x360e8
leaq 0x10fa5(%rip), %rdi     # 0x47075
leaq 0xf2dc(%rip), %rsi      # 0x453b3
movl $0x61c1, %edx           # imm = 0x61C1
leaq 0x13af0(%rip), %rcx     # 0x49bd3
callq 0x20a0
cmpq $0x0, 0x190(%rsp)
je 0x3611e
movq 0x190(%rsp), %rax
cmpq $0x0, 0x3fe8(%rax)
je 0x3611e
movq 0x190(%rsp), %rax
movq 0x3fe8(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x3612e
movl $0x0, 0x1a4(%rsp)
jmp 0x3685d
movq 0x190(%rsp), %rax
movq 0x3fe8(%rax), %rax
movq %rax, 0x178(%rsp)
movq 0x190(%rsp), %rax
addq $0x168, %rax            # imm = 0x168
movq %rax, 0x170(%rsp)
movq 0x190(%rsp), %rsi
leaq 0x158(%rsp), %rdi
callq 0x1cd90
movl %eax, 0x150(%rsp)
cmpl $0x0, 0x150(%rsp)
jne 0x36191
movl $0x0, 0x1a4(%rsp)
jmp 0x3685d
movq 0x178(%rsp), %rax
movq 0xa8(%rax), %rax
movl 0x4(%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
jne 0x361b7
cmpl $0x2, 0x150(%rsp)
jne 0x361c0
xorl %eax, %eax
movq %rax, 0x10(%rsp)
jmp 0x361cd
movq 0x190(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x168(%rsp)
movq 0x190(%rsp), %rdi
addq $0x1f70, %rdi           # imm = 0x1F70
movups 0x158(%rsp), %xmm0
movaps %xmm0, 0x120(%rsp)
movq 0x168(%rsp), %rsi
movsd 0x120(%rsp), %xmm0
movsd 0x128(%rsp), %xmm1
xorl %edx, %edx
callq 0x338c0
cmpl $0x0, %eax
je 0x3622a
movl $0x1, 0x154(%rsp)
movq 0x190(%rsp), %rax
movl 0x1f70(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x36271
movq 0x170(%rsp), %rax
addq $0x1948, %rax           # imm = 0x1948
addq $0x40, %rax
movq %rax, 0x148(%rsp)
movq 0x170(%rsp), %rax
movl 0x19b4(%rax), %eax
movl %eax, 0x144(%rsp)
jmp 0x362e5
movq 0x190(%rsp), %rax
movl 0x1f70(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x362b8
movq 0x170(%rsp), %rax
addq $0x1948, %rax           # imm = 0x1948
addq $0x20, %rax
movq %rax, 0x148(%rsp)
movq 0x170(%rsp), %rax
movl 0x19b0(%rax), %eax
movl %eax, 0x144(%rsp)
jmp 0x362e3
movq 0x170(%rsp), %rax
addq $0x1948, %rax           # imm = 0x1948
movq %rax, 0x148(%rsp)
movq 0x170(%rsp), %rax
movl 0x19ac(%rax), %eax
movl %eax, 0x144(%rsp)
jmp 0x362e5
movq 0x148(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x3636a
xorl %ecx, %ecx
movl %ecx, %edi
movl %ecx, %esi
movl %ecx, %edx
callq 0x57b0
movl %eax, 0x11c(%rsp)
movl 0x11c(%rsp), %eax
movl %eax, 0x140(%rsp)
movq 0x178(%rsp), %rdi
addq $0x68, %rdi
movups 0x158(%rsp), %xmm0
movaps %xmm0, 0x100(%rsp)
movq 0x148(%rsp), %rsi
addq $0x8, %rsi
movl $0xffffffff, 0xfc(%rsp) # imm = 0xFFFFFFFF
movsd 0x100(%rsp), %xmm0
movsd 0x108(%rsp), %xmm1
movl 0xfc(%rsp), %edx
callq 0xc3c0
jmp 0x36437
movq 0x148(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x140(%rsp)
movq 0x178(%rsp), %rdi
addq $0x68, %rdi
movups 0x158(%rsp), %xmm0
movaps %xmm0, 0xe0(%rsp)
movq 0x170(%rsp), %rax
movss 0x1a88(%rax), %xmm2
movq 0x148(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0xdc(%rsp)
movsd 0xe0(%rsp), %xmm0
movsd 0xe8(%rsp), %xmm1
movl 0xdc(%rsp), %esi
callq 0xb130
movq 0x178(%rsp), %rdi
addq $0x68, %rdi
movups 0x158(%rsp), %xmm0
movaps %xmm0, 0xc0(%rsp)
movq 0x170(%rsp), %rax
movss 0x1a84(%rax), %xmm3
movss 0x1a88(%rax), %xmm2
movl 0x19a8(%rax), %eax
movl %eax, 0xbc(%rsp)
movsd 0xc0(%rsp), %xmm0
movsd 0xc8(%rsp), %xmm1
movl 0xbc(%rsp), %esi
callq 0xaf00
movq 0x190(%rsp), %rax
movl 0x1f70(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x36461
movq 0x170(%rsp), %rax
movl 0x1a7c(%rax), %eax
movl %eax, 0x78(%rsp)
jmp 0x36493
cmpl $0x0, 0x154(%rsp)
je 0x3647f
movq 0x170(%rsp), %rax
movl 0x1a80(%rax), %eax
movl %eax, 0x78(%rsp)
jmp 0x36491
movq 0x170(%rsp), %rax
movl 0x1a78(%rax), %eax
movl %eax, 0x78(%rsp)
jmp 0x36493
movss 0x164(%rsp), %xmm0
movq 0x170(%rsp), %rax
movss 0x1a98(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0xa4(%rsp)
movss 0x158(%rsp), %xmm0
movss 0x160(%rsp), %xmm1
addss %xmm1, %xmm0
movss 0x164(%rsp), %xmm1
subss %xmm1, %xmm0
movq 0x170(%rsp), %rax
movss 0x1a94(%rax), %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x9c(%rsp)
movss 0x15c(%rsp), %xmm0
movq 0x170(%rsp), %rax
movss 0x1a98(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0xa0(%rsp)
movss 0xa4(%rsp), %xmm0
movss %xmm0, 0xa8(%rsp)
movss 0x9c(%rsp), %xmm0
movq 0x170(%rsp), %rax
movss 0x1a48(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0xac(%rsp)
movss 0xa0(%rsp), %xmm0
movq 0x170(%rsp), %rax
movss 0x1a4c(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0xb0(%rsp)
movss 0xa4(%rsp), %xmm0
movq 0x170(%rsp), %rax
movss 0x1a48(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0xb4(%rsp)
movss 0xa8(%rsp), %xmm0
movq 0x170(%rsp), %rax
movss 0x1a4c(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0xb8(%rsp)
movq 0x178(%rsp), %rdi
addq $0x68, %rdi
movq 0x190(%rsp), %r8
movl 0x1f70(%r8), %ecx
addq $0x1b30, %r8            # imm = 0x1B30
movl 0x78(%rsp), %r9d
movq 0x170(%rsp), %rax
movq (%rax), %rdx
movq %rsp, %rax
movq %rdx, (%rax)
leaq 0x9c(%rsp), %rsi
leaq 0xac(%rsp), %rdx
callq 0x33a70
movq 0x18(%rsp), %rsi
movss 0x158(%rsp), %xmm0
movq 0x170(%rsp), %rax
movss 0x1a8c(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x7c(%rsp)
movss 0x15c(%rsp), %xmm0
movq 0x170(%rsp), %rax
movss 0x1a90(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x80(%rsp)
movss 0x164(%rsp), %xmm0
movq 0x170(%rsp), %rax
movss 0x1a90(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x88(%rsp)
movss 0x88(%rsp), %xmm0
movss %xmm0, 0x84(%rsp)
movq 0x178(%rsp), %rdi
addq $0x68, %rdi
movups 0x7c(%rsp), %xmm0
movaps %xmm0, 0x60(%rsp)
movl $0xffffffff, 0x5c(%rsp) # imm = 0xFFFFFFFF
movsd 0x60(%rsp), %xmm0
movsd 0x68(%rsp), %xmm1
movl 0x5c(%rsp), %edx
callq 0xc3c0
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x41b0
movlpd %xmm0, 0x54(%rsp)
movq 0x54(%rsp), %rax
movq %rax, 0x138(%rsp)
movss 0x7c(%rsp), %xmm0
movss 0x84(%rsp), %xmm1
addss %xmm1, %xmm0
movq 0x170(%rsp), %rax
movss 0x1a8c(%rax), %xmm1
movss 0x1a9c(%rax), %xmm2
addss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x8c(%rsp)
movss 0x15c(%rsp), %xmm0
movq 0x170(%rsp), %rax
movss 0x1a90(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x90(%rsp)
movss 0x9c(%rsp), %xmm0
movq 0x170(%rsp), %rax
movss 0x1a8c(%rax), %xmm1
subss %xmm1, %xmm0
movss 0x8c(%rsp), %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x94(%rsp)
movss 0x164(%rsp), %xmm0
movq 0x170(%rsp), %rax
movss 0x1a90(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x98(%rsp)
movq 0x178(%rsp), %rdi
addq $0x68, %rdi
movups 0x8c(%rsp), %xmm0
movaps %xmm0, 0x40(%rsp)
movq 0x188(%rsp), %rsi
movl 0x184(%rsp), %edx
movq 0x170(%rsp), %rax
movq (%rax), %r9
movsd 0x40(%rsp), %xmm0
movsd 0x48(%rsp), %xmm1
leaq 0x138(%rsp), %rcx
movl $0x11, %r8d
callq 0x24820
movq 0x190(%rsp), %rdi
movq 0x178(%rsp), %rsi
movq 0x19c(%rsp), %rax
movq %rax, 0x38(%rsp)
movl 0x154(%rsp), %edx
movups 0x158(%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
movsd 0x38(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
movsd 0x28(%rsp), %xmm2
callq 0x33b70
movl %eax, 0x1a4(%rsp)
movl 0x1a4(%rsp), %eax
addq $0x1a8, %rsp            # imm = 0x1A8
retq
nopl (%rax)