// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_combo_begin_symbol
NK_API nk_bool
nk_combo_begin_symbol(struct nk_context *ctx, enum nk_symbol_type symbol, 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;
    struct nk_color sym_background;
    struct nk_color symbol_color;

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

    symbol_color = nk_rgb_factor(symbol_color, style->combo.color_factor);

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

        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.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 symbol */
        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;
        bounds.w = (button.x - style->combo.content_padding.y) - bounds.x;
        nk_draw_symbol(&win->buffer, symbol, bounds, sym_background, symbol_color,
            1.0f, style->font);

        /* draw open/close button */
        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
movlpd %xmm0, 0xfc(%rsp)
movq %rdi, 0xf0(%rsp)
movl %esi, 0xec(%rsp)
movl $0x0, 0xbc(%rsp)
cmpq $0x0, 0xf0(%rsp)
jne 0x78ee8
movq 0x4c134(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x384da(%rip), %rsi     # 0xb13a0
leaq 0x384f1(%rip), %rdx     # 0xb13be
movl $0x72c3, %ecx           # imm = 0x72C3
movb $0x0, %al
callq 0x13ec0
movq 0x4c110(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x78eea
jmp 0x78eec
movq 0xf0(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
jne 0x78f31
movq 0x4c0eb(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x38491(%rip), %rsi     # 0xb13a0
leaq 0x384a8(%rip), %rdx     # 0xb13be
movl $0x72c4, %ecx           # imm = 0x72C4
movb $0x0, %al
callq 0x13ec0
movq 0x4c0c7(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x78f33
jmp 0x78f35
movq 0xf0(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x78f81
movq 0x4c09b(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x38441(%rip), %rsi     # 0xb13a0
leaq 0x38458(%rip), %rdx     # 0xb13be
movl $0x72c5, %ecx           # imm = 0x72C5
movb $0x0, %al
callq 0x13ec0
movq 0x4c077(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x78f83
cmpq $0x0, 0xf0(%rsp)
je 0x78fb9
movq 0xf0(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
je 0x78fb9
movq 0xf0(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x78fc9
movl $0x0, 0x104(%rsp)
jmp 0x796fa
movq 0xf0(%rsp), %rax
movq 0x4780(%rax), %rax
movq %rax, 0xe0(%rsp)
movq 0xf0(%rsp), %rax
addq $0x168, %rax            # imm = 0x168
movq %rax, 0xd8(%rsp)
movq 0xf0(%rsp), %rsi
leaq 0xc0(%rsp), %rdi
callq 0x139c0
movl %eax, 0xb8(%rsp)
cmpl $0x0, 0xb8(%rsp)
jne 0x7902c
movl $0x0, 0x104(%rsp)
jmp 0x796fa
movq 0xe0(%rsp), %rax
movq 0xa8(%rax), %rax
movl 0x4(%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
jne 0x7905c
cmpl $0x3, 0xb8(%rsp)
je 0x7905c
cmpl $0x2, 0xb8(%rsp)
jne 0x79065
xorl %eax, %eax
movq %rax, 0x50(%rsp)
jmp 0x79072
movq 0xf0(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0xf0(%rsp), %rdi
addq $0x2598, %rdi           # imm = 0x2598
movq 0xd0(%rsp), %rsi
movsd 0xc0(%rsp), %xmm0
movsd 0xc8(%rsp), %xmm1
xorl %edx, %edx
callq 0x78060
cmpl $0x0, %eax
je 0x790bf
movl $0x1, 0xbc(%rsp)
movq 0xf0(%rsp), %rax
movl 0x2598(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x79106
movq 0xd8(%rsp), %rax
addq $0x1eb0, %rax           # imm = 0x1EB0
addq $0x50, %rax
movq %rax, 0xb0(%rsp)
movq 0xd8(%rsp), %rax
movl 0x1f40(%rax), %eax
movl %eax, 0xa8(%rsp)
jmp 0x7917a
movq 0xf0(%rsp), %rax
movl 0x2598(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x7914d
movq 0xd8(%rsp), %rax
addq $0x1eb0, %rax           # imm = 0x1EB0
addq $0x28, %rax
movq %rax, 0xb0(%rsp)
movq 0xd8(%rsp), %rax
movl 0x1f3c(%rax), %eax
movl %eax, 0xa8(%rsp)
jmp 0x79178
movq 0xd8(%rsp), %rax
addq $0x1eb0, %rax           # imm = 0x1EB0
movq %rax, 0xb0(%rsp)
movq 0xd8(%rsp), %rax
movl 0x1f3c(%rax), %eax
movl %eax, 0xa8(%rsp)
jmp 0x7917a
movq 0xd8(%rsp), %rax
movss 0x204c(%rax), %xmm0
movl 0xa8(%rsp), %edi
callq 0x15100
movl %eax, 0xa4(%rsp)
movl 0xa4(%rsp), %eax
movl %eax, 0xa8(%rsp)
movq 0xb0(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x4c(%rsp)
testl %eax, %eax
je 0x79306
jmp 0x791c3
movl 0x4c(%rsp), %eax
subl $0x1, %eax
je 0x791e0
jmp 0x791ce
movl 0x4c(%rsp), %eax
subl $0x2, %eax
je 0x79273
jmp 0x79405
xorl %ecx, %ecx
movl %ecx, %edi
movl %ecx, %esi
movl %ecx, %edx
callq 0x14680
movl %eax, 0xa0(%rsp)
movl 0xa0(%rsp), %eax
movl %eax, 0xac(%rsp)
movq 0xe0(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x38(%rsp)
movq 0xb0(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x40(%rsp)
movq 0xd8(%rsp), %rax
movss 0x204c(%rax), %xmm0
movl 0x38076(%rip), %edi     # 0xb12b0
callq 0x15100
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
movl %eax, 0x9c(%rsp)
movsd 0xc0(%rsp), %xmm0
movsd 0xc8(%rsp), %xmm1
movl 0x9c(%rsp), %edx
callq 0x14690
jmp 0x79405
xorl %ecx, %ecx
movl %ecx, %edi
movl %ecx, %esi
movl %ecx, %edx
callq 0x14680
movl %eax, 0x98(%rsp)
movl 0x98(%rsp), %eax
movl %eax, 0xac(%rsp)
movq 0xe0(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x28(%rsp)
movq 0xb0(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x30(%rsp)
movq 0xd8(%rsp), %rax
movss 0x204c(%rax), %xmm0
movl 0x37fe3(%rip), %edi     # 0xb12b0
callq 0x15100
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl %eax, 0x94(%rsp)
movsd 0xc0(%rsp), %xmm0
movsd 0xc8(%rsp), %xmm1
movl 0x94(%rsp), %edx
callq 0x152a0
jmp 0x79405
movq 0xb0(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0xac(%rsp)
movq 0xe0(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x8(%rsp)
movq 0xd8(%rsp), %rcx
movq 0xb0(%rsp), %rax
movss 0x2030(%rcx), %xmm0
movss %xmm0, 0x14(%rsp)
movss 0x204c(%rcx), %xmm0
movl 0x8(%rax), %edi
callq 0x15100
movq 0x8(%rsp), %rdi
movss 0x14(%rsp), %xmm2
movl %eax, 0x90(%rsp)
movsd 0xc0(%rsp), %xmm0
movsd 0xc8(%rsp), %xmm1
movl 0x90(%rsp), %esi
callq 0x13f10
movq 0xe0(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x18(%rsp)
movq 0xd8(%rsp), %rax
movss 0x2030(%rax), %xmm0
movss %xmm0, 0x20(%rsp)
movss 0x202c(%rax), %xmm0
movss %xmm0, 0x24(%rsp)
movss 0x204c(%rax), %xmm0
movl 0x1f28(%rax), %edi
callq 0x15100
movq 0x18(%rsp), %rdi
movss 0x20(%rsp), %xmm2
movss 0x24(%rsp), %xmm3
movl %eax, 0x8c(%rsp)
movsd 0xc0(%rsp), %xmm0
movsd 0xc8(%rsp), %xmm1
movl 0x8c(%rsp), %esi
callq 0x13070
leaq 0x7c(%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 0x79440
movq 0xd8(%rsp), %rax
movl 0x2024(%rax), %eax
movl %eax, 0x58(%rsp)
jmp 0x79472
cmpl $0x0, 0xbc(%rsp)
je 0x7945e
movq 0xd8(%rsp), %rax
movl 0x2028(%rax), %eax
movl %eax, 0x58(%rsp)
jmp 0x79470
movq 0xd8(%rsp), %rax
movl 0x2020(%rax), %eax
movl %eax, 0x58(%rsp)
jmp 0x79472
movss 0xcc(%rsp), %xmm0
movq 0xd8(%rsp), %rax
movss 0x2040(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x64(%rsp)
movss 0xc0(%rsp), %xmm0
movss 0xc8(%rsp), %xmm1
addss %xmm1, %xmm0
movss 0xcc(%rsp), %xmm1
subss %xmm1, %xmm0
movq 0xd8(%rsp), %rax
movss 0x2040(%rax), %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x5c(%rsp)
movss 0xc4(%rsp), %xmm0
movq 0xd8(%rsp), %rax
movss 0x2040(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x60(%rsp)
movss 0x64(%rsp), %xmm0
movss %xmm0, 0x68(%rsp)
movss 0x5c(%rsp), %xmm0
movq 0xd8(%rsp), %rax
movss 0x1fe8(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x6c(%rsp)
movss 0x60(%rsp), %xmm0
movq 0xd8(%rsp), %rax
movss 0x1fec(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x70(%rsp)
movss 0x64(%rsp), %xmm0
movq 0xd8(%rsp), %rax
movss 0x1fe8(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x74(%rsp)
movss 0x68(%rsp), %xmm0
movq 0xd8(%rsp), %rax
movss 0x1fec(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x78(%rsp)
movss 0xcc(%rsp), %xmm0
movq 0xd8(%rsp), %rax
movss 0x2038(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x88(%rsp)
movss 0xc4(%rsp), %xmm0
movq 0xd8(%rsp), %rax
movss 0x2038(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x80(%rsp)
movss 0xc0(%rsp), %xmm0
movq 0xd8(%rsp), %rax
movss 0x2034(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x7c(%rsp)
movss 0x5c(%rsp), %xmm0
movq 0xd8(%rsp), %rax
movss 0x2038(%rax), %xmm1
subss %xmm1, %xmm0
movss 0x7c(%rsp), %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x84(%rsp)
movq 0xe0(%rsp), %rdi
addq $0x68, %rdi
movl 0xec(%rsp), %esi
movq 0xd8(%rsp), %rax
movq (%rax), %r8
movsd 0x7c(%rsp), %xmm0
movsd 0x84(%rsp), %xmm1
movl 0xac(%rsp), %edx
movl 0xa8(%rsp), %ecx
movss 0x33e78(%rip), %xmm2    # 0xad4e8
callq 0x79710
movq 0xe0(%rsp), %rdi
addq $0x68, %rdi
movq 0xf0(%rsp), %r8
movl 0x2598(%r8), %ecx
addq $0x20b0, %r8            # imm = 0x20B0
movl 0x58(%rsp), %r9d
movq 0xd8(%rsp), %rax
movq (%rax), %rdx
movq %rsp, %rax
movq %rdx, (%rax)
leaq 0x7c(%rsp), %rsi
leaq 0x6c(%rsp), %rdx
callq 0x781d0
movq 0xf0(%rsp), %rdi
movq 0xe0(%rsp), %rsi
movl 0xbc(%rsp), %edx
movsd 0xfc(%rsp), %xmm0
movsd 0xc0(%rsp), %xmm1
movsd 0xc8(%rsp), %xmm2
callq 0x782e0
movl %eax, 0x104(%rsp)
movl 0x104(%rsp), %eax
addq $0x108, %rsp            # imm = 0x108
retq
nopl (%rax)