// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_combo_begin_color
NK_API nk_bool
nk_combo_begin_color(struct nk_context *ctx, struct nk_color color, 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 content;
        struct nk_rect button;
        struct nk_rect bounds;
        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;

        /* draw color */
        bounds.h = header.h - 4 * style->combo.content_padding.y;
        bounds.y = header.y + 2 * style->combo.content_padding.y;
        bounds.x = header.x + 2 * style->combo.content_padding.x;
        if (draw_button_symbol)
            bounds.w = (button.x - (style->combo.content_padding.x + style->combo.spacing.x)) - bounds.x;
        else
            bounds.w = header.w - 4 * style->combo.content_padding.x;
        nk_fill_rect(&win->buffer, bounds, 0, nk_rgb_factor(color, style->combo.color_factor));

        /* draw open/close button */
        if (draw_button_symbol)
            nk_draw_button_symbol(&win->buffer, &button, &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
movl %esi, 0x100(%rsp)
movlpd %xmm0, 0xf8(%rsp)
movq %rdi, 0xf0(%rsp)
movl $0x0, 0xc4(%rsp)
cmpq $0x0, 0xf0(%rsp)
jne 0x78698
movq 0x4c984(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x38d2a(%rip), %rsi     # 0xb13a0
leaq 0x38d41(%rip), %rdx     # 0xb13be
movl $0x7266, %ecx           # imm = 0x7266
movb $0x0, %al
callq 0x13ec0
movq 0x4c960(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x7869a
jmp 0x7869c
movq 0xf0(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
jne 0x786e1
movq 0x4c93b(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x38ce1(%rip), %rsi     # 0xb13a0
leaq 0x38cf8(%rip), %rdx     # 0xb13be
movl $0x7267, %ecx           # imm = 0x7267
movb $0x0, %al
callq 0x13ec0
movq 0x4c917(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x786e3
jmp 0x786e5
movq 0xf0(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x78731
movq 0x4c8eb(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x38c91(%rip), %rsi     # 0xb13a0
leaq 0x38ca8(%rip), %rdx     # 0xb13be
movl $0x7268, %ecx           # imm = 0x7268
movb $0x0, %al
callq 0x13ec0
movq 0x4c8c7(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x78733
cmpq $0x0, 0xf0(%rsp)
je 0x78769
movq 0xf0(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
je 0x78769
movq 0xf0(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x78779
movl $0x0, 0x104(%rsp)
jmp 0x78e6f
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 0x787dc
movl $0x0, 0x104(%rsp)
jmp 0x78e6f
movq 0xe8(%rsp), %rax
movq 0xa8(%rax), %rax
movl 0x4(%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
jne 0x7880c
cmpl $0x3, 0xc0(%rsp)
je 0x7880c
cmpl $0x2, 0xc0(%rsp)
jne 0x78815
xorl %eax, %eax
movq %rax, 0x60(%rsp)
jmp 0x78822
movq 0xf0(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%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 0x7886f
movl $0x1, 0xc4(%rsp)
movq 0xf0(%rsp), %rax
movl 0x2598(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x788a1
movq 0xe0(%rsp), %rax
addq $0x1eb0, %rax           # imm = 0x1EB0
addq $0x50, %rax
movq %rax, 0xb8(%rsp)
jmp 0x788eb
movq 0xf0(%rsp), %rax
movl 0x2598(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x788d3
movq 0xe0(%rsp), %rax
addq $0x1eb0, %rax           # imm = 0x1EB0
addq $0x28, %rax
movq %rax, 0xb8(%rsp)
jmp 0x788e9
movq 0xe0(%rsp), %rax
addq $0x1eb0, %rax           # imm = 0x1EB0
movq %rax, 0xb8(%rsp)
jmp 0x788eb
movq 0xb8(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x5c(%rsp)
testl %eax, %eax
je 0x789fe
jmp 0x78903
movl 0x5c(%rsp), %eax
subl $0x1, %eax
je 0x7891c
jmp 0x7890e
movl 0x5c(%rsp), %eax
subl $0x2, %eax
je 0x7898d
jmp 0x78aeb
movq 0xe8(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x48(%rsp)
movq 0xb8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x50(%rsp)
movq 0xe0(%rsp), %rax
movss 0x204c(%rax), %xmm0
movl 0x3895c(%rip), %edi     # 0xb12b0
callq 0x15100
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
movl %eax, 0xb4(%rsp)
movsd 0xc8(%rsp), %xmm0
movsd 0xd0(%rsp), %xmm1
movl 0xb4(%rsp), %edx
callq 0x14690
jmp 0x78aeb
movq 0xe8(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x38(%rsp)
movq 0xb8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x40(%rsp)
movq 0xe0(%rsp), %rax
movss 0x204c(%rax), %xmm0
movl 0x388eb(%rip), %edi     # 0xb12b0
callq 0x15100
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
movl %eax, 0xb0(%rsp)
movsd 0xc8(%rsp), %xmm0
movsd 0xd0(%rsp), %xmm1
movl 0xb0(%rsp), %edx
callq 0x152a0
jmp 0x78aeb
movq 0xe8(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x18(%rsp)
movq 0xe0(%rsp), %rcx
movq 0xb8(%rsp), %rax
movss 0x2030(%rcx), %xmm0
movss %xmm0, 0x24(%rsp)
movss 0x204c(%rcx), %xmm0
movl 0x8(%rax), %edi
callq 0x15100
movq 0x18(%rsp), %rdi
movss 0x24(%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, 0x28(%rsp)
movq 0xe0(%rsp), %rax
movss 0x2030(%rax), %xmm0
movss %xmm0, 0x30(%rsp)
movss 0x202c(%rax), %xmm0
movss %xmm0, 0x34(%rsp)
movss 0x204c(%rax), %xmm0
movl 0x1f28(%rax), %edi
callq 0x15100
movq 0x28(%rsp), %rdi
movss 0x30(%rsp), %xmm2
movss 0x34(%rsp), %xmm3
movl %eax, 0xa8(%rsp)
movsd 0xc8(%rsp), %xmm0
movsd 0xd0(%rsp), %xmm1
movl 0xa8(%rsp), %esi
callq 0x13070
movq 0xf0(%rsp), %rax
movl 0x2598(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x78b15
movq 0xe0(%rsp), %rax
movl 0x2024(%rax), %eax
movl %eax, 0x70(%rsp)
jmp 0x78b47
cmpl $0x0, 0xc4(%rsp)
je 0x78b33
movq 0xe0(%rsp), %rax
movl 0x2028(%rax), %eax
movl %eax, 0x70(%rsp)
jmp 0x78b45
movq 0xe0(%rsp), %rax
movl 0x2020(%rax), %eax
movl %eax, 0x70(%rsp)
jmp 0x78b47
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, 0x90(%rsp)
movss 0xc8(%rsp), %xmm0
addss 0xd0(%rsp), %xmm0
subss 0xd4(%rsp), %xmm0
movq 0xe0(%rsp), %rax
subss 0x203c(%rax), %xmm0
movss %xmm0, 0x88(%rsp)
movss 0xcc(%rsp), %xmm0
movq 0xe0(%rsp), %rax
addss 0x2040(%rax), %xmm0
movss %xmm0, 0x8c(%rsp)
movss 0x90(%rsp), %xmm0
movss %xmm0, 0x94(%rsp)
movss 0x88(%rsp), %xmm0
movq 0xe0(%rsp), %rax
addss 0x1fe8(%rax), %xmm0
movss %xmm0, 0x98(%rsp)
movss 0x8c(%rsp), %xmm0
movq 0xe0(%rsp), %rax
addss 0x1fec(%rax), %xmm0
movss %xmm0, 0x9c(%rsp)
movss 0x90(%rsp), %xmm0
movq 0xe0(%rsp), %rax
movss 0x1fe8(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0xa0(%rsp)
movss 0x94(%rsp), %xmm0
movq 0xe0(%rsp), %rax
movss 0x1fec(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0xa4(%rsp)
movss 0xd4(%rsp), %xmm1
movq 0xe0(%rsp), %rax
movss 0x2038(%rax), %xmm0
movss 0x348d9(%rip), %xmm2    # 0xad57c
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x84(%rsp)
movss 0xcc(%rsp), %xmm1
movq 0xe0(%rsp), %rax
movss 0x2038(%rax), %xmm0
addss %xmm0, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x7c(%rsp)
movss 0xc8(%rsp), %xmm1
movq 0xe0(%rsp), %rax
movss 0x2034(%rax), %xmm0
addss %xmm0, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x78(%rsp)
cmpl $0x0, 0x74(%rsp)
je 0x78d47
movss 0x88(%rsp), %xmm0
movq 0xe0(%rsp), %rax
movss 0x2034(%rax), %xmm1
movq 0xe0(%rsp), %rax
addss 0x2044(%rax), %xmm1
subss %xmm1, %xmm0
subss 0x78(%rsp), %xmm0
movss %xmm0, 0x80(%rsp)
jmp 0x78d79
movss 0xd0(%rsp), %xmm1
movq 0xe0(%rsp), %rax
movss 0x2034(%rax), %xmm0
movss 0x34814(%rip), %xmm2    # 0xad57c
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x80(%rsp)
movq 0xe8(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x10(%rsp)
movq 0xe0(%rsp), %rax
movss 0x204c(%rax), %xmm0
movl 0x100(%rsp), %edi
callq 0x15100
movq 0x10(%rsp), %rdi
movl %eax, 0x6c(%rsp)
movsd 0x78(%rsp), %xmm0
movsd 0x80(%rsp), %xmm1
movl 0x6c(%rsp), %esi
xorps %xmm2, %xmm2
callq 0x13f10
cmpl $0x0, 0x74(%rsp)
je 0x78e31
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 0x88(%rsp), %rsi
leaq 0x98(%rsp), %rdx
movq %rax, (%rsp)
callq 0x781d0
movq 0xf0(%rsp), %rdi
movq 0xe8(%rsp), %rsi
movl 0xc4(%rsp), %edx
movsd 0xf8(%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
nop