// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_combo_begin_image_text
NK_API nk_bool
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_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;
        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;
    }

    text.text = nk_rgb_factor(text.text, 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;
        int draw_button_symbol;

        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;

        /* represents whether or not the combo's button symbol should be drawn */
        draw_button_symbol = sym != NK_SYMBOL_NONE;

        /* 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;
        if (draw_button_symbol)
            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_rgb_factor(nk_white, style->combo.color_factor));

        /* 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.h = header.h - 2 * style->combo.content_padding.y;
        if (draw_button_symbol)
            label.w = (button.x - style->combo.content_padding.x) - label.x;
        else
            label.w = (header.x + header.w - style->combo.content_padding.x) - label.x;
        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 $0x148, %rsp            # imm = 0x148
leaq 0x150(%rsp), %rax
movq %rax, 0x60(%rsp)
movlpd %xmm0, 0x13c(%rsp)
movq %rdi, 0x130(%rsp)
movq %rsi, 0x128(%rsp)
movl %edx, 0x124(%rsp)
movl $0x0, 0xf4(%rsp)
cmpq $0x0, 0x130(%rsp)
jne 0x7ad4d
movq 0x4a2cf(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x36675(%rip), %rsi     # 0xb13a0
leaq 0x3668c(%rip), %rdx     # 0xb13be
movl $0x73e9, %ecx           # imm = 0x73E9
movb $0x0, %al
callq 0x13ec0
movq 0x4a2ab(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x7ad4f
jmp 0x7ad51
movq 0x130(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
jne 0x7ad96
movq 0x4a286(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x3662c(%rip), %rsi     # 0xb13a0
leaq 0x36643(%rip), %rdx     # 0xb13be
movl $0x73ea, %ecx           # imm = 0x73EA
movb $0x0, %al
callq 0x13ec0
movq 0x4a262(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x7ad98
jmp 0x7ad9a
movq 0x130(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x7ade6
movq 0x4a236(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x365dc(%rip), %rsi     # 0xb13a0
leaq 0x365f3(%rip), %rdx     # 0xb13be
movl $0x73eb, %ecx           # imm = 0x73EB
movb $0x0, %al
callq 0x13ec0
movq 0x4a212(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x7ade8
cmpq $0x0, 0x130(%rsp)
je 0x7ae1e
movq 0x130(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
je 0x7ae1e
movq 0x130(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x7ae2e
movl $0x0, 0x144(%rsp)
jmp 0x7b6d2
movq 0x130(%rsp), %rax
movq 0x4780(%rax), %rax
movq %rax, 0x118(%rsp)
movq 0x130(%rsp), %rax
addq $0x168, %rax            # imm = 0x168
movq %rax, 0x110(%rsp)
movq 0x130(%rsp), %rsi
leaq 0xf8(%rsp), %rdi
callq 0x139c0
movl %eax, 0xf0(%rsp)
cmpl $0x0, 0xf0(%rsp)
jne 0x7ae91
movl $0x0, 0x144(%rsp)
jmp 0x7b6d2
movq 0x118(%rsp), %rax
movq 0xa8(%rax), %rax
movl 0x4(%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
jne 0x7aec1
cmpl $0x3, 0xf0(%rsp)
je 0x7aec1
cmpl $0x2, 0xf0(%rsp)
jne 0x7aeca
xorl %eax, %eax
movq %rax, 0x58(%rsp)
jmp 0x7aed7
movq 0x130(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x108(%rsp)
movq 0x130(%rsp), %rdi
addq $0x2598, %rdi           # imm = 0x2598
movq 0x108(%rsp), %rsi
movsd 0xf8(%rsp), %xmm0
movsd 0x100(%rsp), %xmm1
xorl %edx, %edx
callq 0x78060
cmpl $0x0, %eax
je 0x7af24
movl $0x1, 0xf4(%rsp)
movq 0x130(%rsp), %rax
movl 0x2598(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x7af6b
movq 0x110(%rsp), %rax
addq $0x1eb0, %rax           # imm = 0x1EB0
addq $0x50, %rax
movq %rax, 0xe8(%rsp)
movq 0x110(%rsp), %rax
movl 0x1f34(%rax), %eax
movl %eax, 0xe4(%rsp)
jmp 0x7afdf
movq 0x130(%rsp), %rax
movl 0x2598(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x7afb2
movq 0x110(%rsp), %rax
addq $0x1eb0, %rax           # imm = 0x1EB0
addq $0x28, %rax
movq %rax, 0xe8(%rsp)
movq 0x110(%rsp), %rax
movl 0x1f30(%rax), %eax
movl %eax, 0xe4(%rsp)
jmp 0x7afdd
movq 0x110(%rsp), %rax
addq $0x1eb0, %rax           # imm = 0x1EB0
movq %rax, 0xe8(%rsp)
movq 0x110(%rsp), %rax
movl 0x1f2c(%rax), %eax
movl %eax, 0xe4(%rsp)
jmp 0x7afdf
movq 0x110(%rsp), %rax
movss 0x204c(%rax), %xmm0
movl 0xe4(%rsp), %edi
callq 0x15100
movl %eax, 0xd4(%rsp)
movl 0xd4(%rsp), %eax
movl %eax, 0xe4(%rsp)
movq 0xe8(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x54(%rsp)
testl %eax, %eax
je 0x7b16b
jmp 0x7b028
movl 0x54(%rsp), %eax
subl $0x1, %eax
je 0x7b045
jmp 0x7b033
movl 0x54(%rsp), %eax
subl $0x2, %eax
je 0x7b0d8
jmp 0x7b26a
xorl %ecx, %ecx
movl %ecx, %edi
movl %ecx, %esi
movl %ecx, %edx
callq 0x14680
movl %eax, 0xd0(%rsp)
movl 0xd0(%rsp), %eax
movl %eax, 0xe0(%rsp)
movq 0x118(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x40(%rsp)
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x48(%rsp)
movq 0x110(%rsp), %rax
movss 0x204c(%rax), %xmm0
movl 0x36211(%rip), %edi     # 0xb12b0
callq 0x15100
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl %eax, 0xcc(%rsp)
movsd 0xf8(%rsp), %xmm0
movsd 0x100(%rsp), %xmm1
movl 0xcc(%rsp), %edx
callq 0x14690
jmp 0x7b26a
xorl %ecx, %ecx
movl %ecx, %edi
movl %ecx, %esi
movl %ecx, %edx
callq 0x14680
movl %eax, 0xc8(%rsp)
movl 0xc8(%rsp), %eax
movl %eax, 0xe0(%rsp)
movq 0x118(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x30(%rsp)
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x38(%rsp)
movq 0x110(%rsp), %rax
movss 0x204c(%rax), %xmm0
movl 0x3617e(%rip), %edi     # 0xb12b0
callq 0x15100
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
movl %eax, 0xc4(%rsp)
movsd 0xf8(%rsp), %xmm0
movsd 0x100(%rsp), %xmm1
movl 0xc4(%rsp), %edx
callq 0x152a0
jmp 0x7b26a
movq 0xe8(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0xe0(%rsp)
movq 0x118(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x10(%rsp)
movq 0x110(%rsp), %rcx
movq 0xe8(%rsp), %rax
movss 0x2030(%rcx), %xmm0
movss %xmm0, 0x1c(%rsp)
movss 0x204c(%rcx), %xmm0
movl 0x8(%rax), %edi
callq 0x15100
movq 0x10(%rsp), %rdi
movss 0x1c(%rsp), %xmm2
movl %eax, 0xc0(%rsp)
movsd 0xf8(%rsp), %xmm0
movsd 0x100(%rsp), %xmm1
movl 0xc0(%rsp), %esi
callq 0x13f10
movq 0x118(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x20(%rsp)
movq 0x110(%rsp), %rax
movss 0x2030(%rax), %xmm0
movss %xmm0, 0x28(%rsp)
movss 0x202c(%rax), %xmm0
movss %xmm0, 0x2c(%rsp)
movss 0x204c(%rax), %xmm0
movl 0x1f28(%rax), %edi
callq 0x15100
movq 0x20(%rsp), %rdi
movss 0x28(%rsp), %xmm2
movss 0x2c(%rsp), %xmm3
movl %eax, 0xbc(%rsp)
movsd 0xf8(%rsp), %xmm0
movsd 0x100(%rsp), %xmm1
movl 0xbc(%rsp), %esi
callq 0x13070
movq 0x130(%rsp), %rax
movl 0x2598(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x7b294
movq 0x110(%rsp), %rax
movl 0x2024(%rax), %eax
movl %eax, 0x74(%rsp)
jmp 0x7b2c6
cmpl $0x0, 0xf4(%rsp)
je 0x7b2b2
movq 0x110(%rsp), %rax
movl 0x2028(%rax), %eax
movl %eax, 0x74(%rsp)
jmp 0x7b2c4
movq 0x110(%rsp), %rax
movl 0x2020(%rax), %eax
movl %eax, 0x74(%rsp)
jmp 0x7b2c6
cmpl $0x0, 0x74(%rsp)
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x78(%rsp)
movss 0x104(%rsp), %xmm0
movq 0x110(%rsp), %rax
movss 0x2040(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0xa4(%rsp)
movss 0xf8(%rsp), %xmm0
addss 0x100(%rsp), %xmm0
subss 0x104(%rsp), %xmm0
movq 0x110(%rsp), %rax
subss 0x203c(%rax), %xmm0
movss %xmm0, 0x9c(%rsp)
movss 0xfc(%rsp), %xmm0
movq 0x110(%rsp), %rax
addss 0x2040(%rax), %xmm0
movss %xmm0, 0xa0(%rsp)
movss 0xa4(%rsp), %xmm0
movss %xmm0, 0xa8(%rsp)
movss 0x9c(%rsp), %xmm0
movq 0x110(%rsp), %rax
addss 0x1fe8(%rax), %xmm0
movss %xmm0, 0xac(%rsp)
movss 0xa0(%rsp), %xmm0
movq 0x110(%rsp), %rax
addss 0x1fec(%rax), %xmm0
movss %xmm0, 0xb0(%rsp)
movss 0xa4(%rsp), %xmm0
movq 0x110(%rsp), %rax
movss 0x1fe8(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0xb4(%rsp)
movss 0xa8(%rsp), %xmm0
movq 0x110(%rsp), %rax
movss 0x1fec(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0xb8(%rsp)
cmpl $0x0, 0x78(%rsp)
je 0x7b468
movq 0x118(%rsp), %rdi
addq $0x68, %rdi
movq 0x130(%rsp), %rax
movl 0x2598(%rax), %ecx
movq 0x130(%rsp), %r8
addq $0x168, %r8             # imm = 0x168
addq $0x1eb0, %r8            # imm = 0x1EB0
addq $0x98, %r8
movl 0x74(%rsp), %r9d
movq 0x110(%rsp), %rax
movq (%rax), %rax
leaq 0x9c(%rsp), %rsi
leaq 0xac(%rsp), %rdx
movq %rax, (%rsp)
callq 0x781d0
movss 0xf8(%rsp), %xmm0
movq 0x110(%rsp), %rax
movss 0x2034(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x7c(%rsp)
movss 0xfc(%rsp), %xmm0
movq 0x110(%rsp), %rax
movss 0x2038(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x80(%rsp)
movss 0x104(%rsp), %xmm0
movq 0x110(%rsp), %rax
movss 0x2038(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x88(%rsp)
movss 0x88(%rsp), %xmm0
movss %xmm0, 0x84(%rsp)
movq 0x118(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x8(%rsp)
movq 0x110(%rsp), %rax
movss 0x204c(%rax), %xmm0
movl 0x35d9c(%rip), %edi     # 0xb12b0
callq 0x15100
movq 0x8(%rsp), %rdi
movq 0x60(%rsp), %rsi
movl %eax, 0x70(%rsp)
movsd 0x7c(%rsp), %xmm0
movsd 0x84(%rsp), %xmm1
movl 0x70(%rsp), %edx
callq 0x14690
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x13460
movlpd %xmm0, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0xd8(%rsp)
movss 0x7c(%rsp), %xmm0
addss 0x84(%rsp), %xmm0
movq 0x110(%rsp), %rax
addss 0x2044(%rax), %xmm0
movq 0x110(%rsp), %rax
addss 0x2034(%rax), %xmm0
movss %xmm0, 0x8c(%rsp)
movss 0xfc(%rsp), %xmm0
movq 0x110(%rsp), %rax
addss 0x2038(%rax), %xmm0
movss %xmm0, 0x90(%rsp)
movss 0x104(%rsp), %xmm0
movq 0x110(%rsp), %rax
movss 0x2038(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x98(%rsp)
cmpl $0x0, 0x78(%rsp)
je 0x7b615
movss 0x9c(%rsp), %xmm0
movq 0x110(%rsp), %rax
subss 0x2034(%rax), %xmm0
subss 0x8c(%rsp), %xmm0
movss %xmm0, 0x94(%rsp)
jmp 0x7b649
movss 0xf8(%rsp), %xmm0
addss 0x100(%rsp), %xmm0
movq 0x110(%rsp), %rax
subss 0x2034(%rax), %xmm0
subss 0x8c(%rsp), %xmm0
movss %xmm0, 0x94(%rsp)
movq 0x118(%rsp), %rdi
addq $0x68, %rdi
movq 0x128(%rsp), %rsi
movl 0x124(%rsp), %edx
movq 0x110(%rsp), %rax
movq (%rax), %r9
movsd 0x8c(%rsp), %xmm0
movsd 0x94(%rsp), %xmm1
leaq 0xd8(%rsp), %rcx
movl $0x11, %r8d
callq 0x66ac0
movq 0x130(%rsp), %rdi
movq 0x118(%rsp), %rsi
movl 0xf4(%rsp), %edx
movsd 0x13c(%rsp), %xmm0
movsd 0xf8(%rsp), %xmm1
movsd 0x100(%rsp), %xmm2
callq 0x782e0
movl %eax, 0x144(%rsp)
movl 0x144(%rsp), %eax
addq $0x148, %rsp            # imm = 0x148
retq
nopw %cs:(%rax,%rax)