// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_combo_begin_image
NK_API nk_bool
nk_combo_begin_image(struct nk_context *ctx, struct nk_image img, struct nk_vec2 size)
{
    struct nk_window *win;
    struct nk_style *style;
    const 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;

    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 == NK_WIDGET_INVALID)
        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;
    else if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER)
        background = &style->combo.hover;
    else background = &style->combo.normal;

    switch (background->type) {
        case NK_STYLE_ITEM_IMAGE:
            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:
            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:
            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 bounds = {0,0,0,0};
        struct nk_rect content;
        struct nk_rect button;
        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.y;
        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;

        /* draw image */
        bounds.h = header.h - 2 * style->combo.content_padding.y;
        bounds.y = header.y + style->combo.content_padding.y;
        bounds.x = header.x + style->combo.content_padding.x;
        if (draw_button_symbol)
            bounds.w = (button.x - style->combo.content_padding.y) - bounds.x;
        else
            bounds.w = header.w - 2 * style->combo.content_padding.x;
        nk_draw_image(&win->buffer, bounds, &img, nk_rgb_factor(nk_white, style->combo.color_factor));

        /* draw open/close button */
        if (draw_button_symbol)
            nk_draw_button_symbol(&win->buffer, &bounds, &content, ctx->last_widget_state,
                &ctx->style.combo.button, sym, style->font);
    }
    return nk_combo_begin(ctx, win, size, is_clicked, header);
}

// Assembly:
subq $0x108, %rsp            # imm = 0x108
leaq 0x110(%rsp), %rax
movq %rax, 0x60(%rsp)
movlpd %xmm0, 0xfc(%rsp)
movq %rdi, 0xf0(%rsp)
movl $0x0, 0xc4(%rsp)
cmpq $0x0, 0xf0(%rsp)
jne 0x7a4fe
movq 0x4ab1e(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x36ec4(%rip), %rsi     # 0xb13a0
leaq 0x36edb(%rip), %rdx     # 0xb13be
movl $0x738c, %ecx           # imm = 0x738C
movb $0x0, %al
callq 0x13ec0
movq 0x4aafa(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x7a500
jmp 0x7a502
movq 0xf0(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
jne 0x7a547
movq 0x4aad5(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x36e7b(%rip), %rsi     # 0xb13a0
leaq 0x36e92(%rip), %rdx     # 0xb13be
movl $0x738d, %ecx           # imm = 0x738D
movb $0x0, %al
callq 0x13ec0
movq 0x4aab1(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x7a549
jmp 0x7a54b
movq 0xf0(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x7a597
movq 0x4aa85(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x36e2b(%rip), %rsi     # 0xb13a0
leaq 0x36e42(%rip), %rdx     # 0xb13be
movl $0x738e, %ecx           # imm = 0x738E
movb $0x0, %al
callq 0x13ec0
movq 0x4aa61(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x7a599
cmpq $0x0, 0xf0(%rsp)
je 0x7a5cf
movq 0xf0(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
je 0x7a5cf
movq 0xf0(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x7a5df
movl $0x0, 0x104(%rsp)
jmp 0x7acb3
movq 0xf0(%rsp), %rax
movq 0x4780(%rax), %rax
movq %rax, 0xe8(%rsp)
movq 0xf0(%rsp), %rax
addq $0x168, %rax            # imm = 0x168
movq %rax, 0xe0(%rsp)
movq 0xf0(%rsp), %rsi
leaq 0xc8(%rsp), %rdi
callq 0x139c0
movl %eax, 0xc0(%rsp)
cmpl $0x0, 0xc0(%rsp)
jne 0x7a642
movl $0x0, 0x104(%rsp)
jmp 0x7acb3
movq 0xe8(%rsp), %rax
movq 0xa8(%rax), %rax
movl 0x4(%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
jne 0x7a672
cmpl $0x3, 0xc0(%rsp)
je 0x7a672
cmpl $0x2, 0xc0(%rsp)
jne 0x7a67b
xorl %eax, %eax
movq %rax, 0x58(%rsp)
jmp 0x7a688
movq 0xf0(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0xf0(%rsp), %rdi
addq $0x2598, %rdi           # imm = 0x2598
movq 0xd8(%rsp), %rsi
movsd 0xc8(%rsp), %xmm0
movsd 0xd0(%rsp), %xmm1
xorl %edx, %edx
callq 0x78060
cmpl $0x0, %eax
je 0x7a6d5
movl $0x1, 0xc4(%rsp)
movq 0xf0(%rsp), %rax
movl 0x2598(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x7a707
movq 0xe0(%rsp), %rax
addq $0x1eb0, %rax           # imm = 0x1EB0
addq $0x50, %rax
movq %rax, 0xb8(%rsp)
jmp 0x7a751
movq 0xf0(%rsp), %rax
movl 0x2598(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x7a739
movq 0xe0(%rsp), %rax
addq $0x1eb0, %rax           # imm = 0x1EB0
addq $0x28, %rax
movq %rax, 0xb8(%rsp)
jmp 0x7a74f
movq 0xe0(%rsp), %rax
addq $0x1eb0, %rax           # imm = 0x1EB0
movq %rax, 0xb8(%rsp)
jmp 0x7a751
movq 0xb8(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x54(%rsp)
testl %eax, %eax
je 0x7a864
jmp 0x7a769
movl 0x54(%rsp), %eax
subl $0x1, %eax
je 0x7a782
jmp 0x7a774
movl 0x54(%rsp), %eax
subl $0x2, %eax
je 0x7a7f3
jmp 0x7a951
movq 0xe8(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x40(%rsp)
movq 0xb8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x48(%rsp)
movq 0xe0(%rsp), %rax
movss 0x204c(%rax), %xmm0
movl 0x36af6(%rip), %edi     # 0xb12b0
callq 0x15100
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl %eax, 0xb4(%rsp)
movsd 0xc8(%rsp), %xmm0
movsd 0xd0(%rsp), %xmm1
movl 0xb4(%rsp), %edx
callq 0x14690
jmp 0x7a951
movq 0xe8(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x30(%rsp)
movq 0xb8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x38(%rsp)
movq 0xe0(%rsp), %rax
movss 0x204c(%rax), %xmm0
movl 0x36a85(%rip), %edi     # 0xb12b0
callq 0x15100
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
movl %eax, 0xb0(%rsp)
movsd 0xc8(%rsp), %xmm0
movsd 0xd0(%rsp), %xmm1
movl 0xb0(%rsp), %edx
callq 0x152a0
jmp 0x7a951
movq 0xe8(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x10(%rsp)
movq 0xe0(%rsp), %rcx
movq 0xb8(%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, 0xac(%rsp)
movsd 0xc8(%rsp), %xmm0
movsd 0xd0(%rsp), %xmm1
movl 0xac(%rsp), %esi
callq 0x13f10
movq 0xe8(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x20(%rsp)
movq 0xe0(%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, 0xa8(%rsp)
movsd 0xc8(%rsp), %xmm0
movsd 0xd0(%rsp), %xmm1
movl 0xa8(%rsp), %esi
callq 0x13070
leaq 0x98(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x13c40
movq 0xf0(%rsp), %rax
movl 0x2598(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x7a98f
movq 0xe0(%rsp), %rax
movl 0x2024(%rax), %eax
movl %eax, 0x70(%rsp)
jmp 0x7a9c1
cmpl $0x0, 0xc4(%rsp)
je 0x7a9ad
movq 0xe0(%rsp), %rax
movl 0x2028(%rax), %eax
movl %eax, 0x70(%rsp)
jmp 0x7a9bf
movq 0xe0(%rsp), %rax
movl 0x2020(%rax), %eax
movl %eax, 0x70(%rsp)
jmp 0x7a9c1
cmpl $0x0, 0x70(%rsp)
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x74(%rsp)
movss 0xd4(%rsp), %xmm0
movq 0xe0(%rsp), %rax
movss 0x2040(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x80(%rsp)
movss 0xc8(%rsp), %xmm0
addss 0xd0(%rsp), %xmm0
subss 0xd4(%rsp), %xmm0
movq 0xe0(%rsp), %rax
subss 0x2040(%rax), %xmm0
movss %xmm0, 0x78(%rsp)
movss 0xcc(%rsp), %xmm0
movq 0xe0(%rsp), %rax
addss 0x2040(%rax), %xmm0
movss %xmm0, 0x7c(%rsp)
movss 0x80(%rsp), %xmm0
movss %xmm0, 0x84(%rsp)
movss 0x78(%rsp), %xmm0
movq 0xe0(%rsp), %rax
addss 0x1fe8(%rax), %xmm0
movss %xmm0, 0x88(%rsp)
movss 0x7c(%rsp), %xmm0
movq 0xe0(%rsp), %rax
addss 0x1fec(%rax), %xmm0
movss %xmm0, 0x8c(%rsp)
movss 0x80(%rsp), %xmm0
movq 0xe0(%rsp), %rax
movss 0x1fe8(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x90(%rsp)
movss 0x84(%rsp), %xmm0
movq 0xe0(%rsp), %rax
movss 0x1fec(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x94(%rsp)
movss 0xd4(%rsp), %xmm0
movq 0xe0(%rsp), %rax
movss 0x2038(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0xa4(%rsp)
movss 0xcc(%rsp), %xmm0
movq 0xe0(%rsp), %rax
addss 0x2038(%rax), %xmm0
movss %xmm0, 0x9c(%rsp)
movss 0xc8(%rsp), %xmm0
movq 0xe0(%rsp), %rax
addss 0x2034(%rax), %xmm0
movss %xmm0, 0x98(%rsp)
cmpl $0x0, 0x74(%rsp)
je 0x7ab8f
movss 0x78(%rsp), %xmm0
movq 0xe0(%rsp), %rax
subss 0x2038(%rax), %xmm0
subss 0x98(%rsp), %xmm0
movss %xmm0, 0xa0(%rsp)
jmp 0x7abb9
movss 0xd0(%rsp), %xmm0
movq 0xe0(%rsp), %rax
movss 0x2034(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0xa0(%rsp)
movq 0xe8(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x8(%rsp)
movq 0xe0(%rsp), %rax
movss 0x204c(%rax), %xmm0
movl 0x366d0(%rip), %edi     # 0xb12b0
callq 0x15100
movq 0x8(%rsp), %rdi
movq 0x60(%rsp), %rsi
movl %eax, 0x6c(%rsp)
movsd 0x98(%rsp), %xmm0
movsd 0xa0(%rsp), %xmm1
movl 0x6c(%rsp), %edx
callq 0x14690
cmpl $0x0, 0x74(%rsp)
je 0x7ac75
movq 0xe8(%rsp), %rdi
addq $0x68, %rdi
movq 0xf0(%rsp), %rax
movl 0x2598(%rax), %ecx
movq 0xf0(%rsp), %r8
addq $0x168, %r8             # imm = 0x168
addq $0x1eb0, %r8            # imm = 0x1EB0
addq $0x98, %r8
movl 0x70(%rsp), %r9d
movq 0xe0(%rsp), %rax
movq (%rax), %rax
leaq 0x98(%rsp), %rsi
leaq 0x88(%rsp), %rdx
movq %rax, (%rsp)
callq 0x781d0
movq 0xf0(%rsp), %rdi
movq 0xe8(%rsp), %rsi
movl 0xc4(%rsp), %edx
movsd 0xfc(%rsp), %xmm0
movsd 0xc8(%rsp), %xmm1
movsd 0xd0(%rsp), %xmm2
callq 0x782e0
movl %eax, 0x104(%rsp)
movl 0x104(%rsp), %eax
addq $0x108, %rsp            # imm = 0x108
retq
nopw %cs:(%rax,%rax)