// File: /workspace/github_c_makefile_star2_O0/space222[P]silo/./nuklear.h
// Function: nk_combo_begin_symbol
NK_API int
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_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;
    }

    if (background->type == NK_STYLE_ITEM_IMAGE) {
        sym_background = nk_rgba(0,0,0,0);
        nk_draw_image(&win->buffer, header, &background->data.image, nk_white);
    } else {
        sym_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 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 $0x158, %rsp            # imm = 0x158
movlpd %xmm0, 0x14c(%rsp)
movq %rdi, 0x140(%rsp)
movl %esi, 0x13c(%rsp)
movl $0x0, 0x10c(%rsp)
cmpq $0x0, 0x140(%rsp)
je 0x345a7
jmp 0x345c6
leaq 0x13f71(%rip), %rdi     # 0x4851f
leaq 0x10dfe(%rip), %rsi     # 0x453b3
movl $0x60bb, %edx           # imm = 0x60BB
leaq 0x15503(%rip), %rcx     # 0x49ac4
callq 0x20a0
movq 0x140(%rsp), %rax
cmpq $0x0, 0x3fe8(%rax)
je 0x345da
jmp 0x345f9
leaq 0x12918(%rip), %rdi     # 0x46ef9
leaq 0x10dcb(%rip), %rsi     # 0x453b3
movl $0x60bc, %edx           # imm = 0x60BC
leaq 0x154d0(%rip), %rcx     # 0x49ac4
callq 0x20a0
movq 0x140(%rsp), %rax
movq 0x3fe8(%rax), %rax
cmpq $0x0, 0xa8(%rax)
je 0x34614
jmp 0x34633
leaq 0x12a5a(%rip), %rdi     # 0x47075
leaq 0x10d91(%rip), %rsi     # 0x453b3
movl $0x60bd, %edx           # imm = 0x60BD
leaq 0x15496(%rip), %rcx     # 0x49ac4
callq 0x20a0
cmpq $0x0, 0x140(%rsp)
je 0x34669
movq 0x140(%rsp), %rax
cmpq $0x0, 0x3fe8(%rax)
je 0x34669
movq 0x140(%rsp), %rax
movq 0x3fe8(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x34679
movl $0x0, 0x154(%rsp)
jmp 0x34c90
movq 0x140(%rsp), %rax
movq 0x3fe8(%rax), %rax
movq %rax, 0x130(%rsp)
movq 0x140(%rsp), %rax
addq $0x168, %rax            # imm = 0x168
movq %rax, 0x128(%rsp)
movq 0x140(%rsp), %rsi
leaq 0x110(%rsp), %rdi
callq 0x1cd90
movl %eax, 0x108(%rsp)
cmpl $0x0, 0x108(%rsp)
jne 0x346dc
movl $0x0, 0x154(%rsp)
jmp 0x34c90
movq 0x130(%rsp), %rax
movq 0xa8(%rax), %rax
movl 0x4(%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
jne 0x34702
cmpl $0x2, 0x108(%rsp)
jne 0x3470b
xorl %eax, %eax
movq %rax, 0x8(%rsp)
jmp 0x34718
movq 0x140(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x120(%rsp)
movq 0x140(%rsp), %rdi
addq $0x1f70, %rdi           # imm = 0x1F70
movups 0x110(%rsp), %xmm0
movaps %xmm0, 0xe0(%rsp)
movq 0x120(%rsp), %rsi
movsd 0xe0(%rsp), %xmm0
movsd 0xe8(%rsp), %xmm1
xorl %edx, %edx
callq 0x338c0
cmpl $0x0, %eax
je 0x34775
movl $0x1, 0x10c(%rsp)
movq 0x140(%rsp), %rax
movl 0x1f70(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x347bc
movq 0x128(%rsp), %rax
addq $0x1948, %rax           # imm = 0x1948
addq $0x40, %rax
movq %rax, 0x100(%rsp)
movq 0x128(%rsp), %rax
movl 0x19c0(%rax), %eax
movl %eax, 0xf8(%rsp)
jmp 0x34830
movq 0x140(%rsp), %rax
movl 0x1f70(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x34803
movq 0x128(%rsp), %rax
addq $0x1948, %rax           # imm = 0x1948
addq $0x20, %rax
movq %rax, 0x100(%rsp)
movq 0x128(%rsp), %rax
movl 0x19bc(%rax), %eax
movl %eax, 0xf8(%rsp)
jmp 0x3482e
movq 0x128(%rsp), %rax
addq $0x1948, %rax           # imm = 0x1948
movq %rax, 0x100(%rsp)
movq 0x128(%rsp), %rax
movl 0x19bc(%rax), %eax
movl %eax, 0xf8(%rsp)
jmp 0x34830
movq 0x100(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x348b5
xorl %ecx, %ecx
movl %ecx, %edi
movl %ecx, %esi
movl %ecx, %edx
callq 0x57b0
movl %eax, 0xdc(%rsp)
movl 0xdc(%rsp), %eax
movl %eax, 0xfc(%rsp)
movq 0x130(%rsp), %rdi
addq $0x68, %rdi
movups 0x110(%rsp), %xmm0
movaps %xmm0, 0xc0(%rsp)
movq 0x100(%rsp), %rsi
addq $0x8, %rsi
movl $0xffffffff, 0xbc(%rsp) # imm = 0xFFFFFFFF
movsd 0xc0(%rsp), %xmm0
movsd 0xc8(%rsp), %xmm1
movl 0xbc(%rsp), %edx
callq 0xc3c0
jmp 0x3497c
movq 0x100(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0xfc(%rsp)
movq 0x130(%rsp), %rdi
addq $0x68, %rdi
movups 0x110(%rsp), %xmm0
movaps %xmm0, 0xa0(%rsp)
movq 0x128(%rsp), %rax
movss 0x1a88(%rax), %xmm2
movq 0x100(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x9c(%rsp)
movsd 0xa0(%rsp), %xmm0
movsd 0xa8(%rsp), %xmm1
movl 0x9c(%rsp), %esi
callq 0xb130
movq 0x130(%rsp), %rdi
addq $0x68, %rdi
movups 0x110(%rsp), %xmm0
movaps %xmm0, 0x80(%rsp)
movq 0x128(%rsp), %rax
movss 0x1a84(%rax), %xmm3
movss 0x1a88(%rax), %xmm2
movl 0x19a8(%rax), %eax
movl %eax, 0x7c(%rsp)
movsd 0x80(%rsp), %xmm0
movsd 0x88(%rsp), %xmm1
movl 0x7c(%rsp), %esi
callq 0xaf00
leaq 0x6c(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x20d0
movq 0x140(%rsp), %rax
movl 0x1f70(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x349b7
movq 0x128(%rsp), %rax
movl 0x1a7c(%rax), %eax
movl %eax, 0x48(%rsp)
jmp 0x349e9
cmpl $0x0, 0x10c(%rsp)
je 0x349d5
movq 0x128(%rsp), %rax
movl 0x1a80(%rax), %eax
movl %eax, 0x48(%rsp)
jmp 0x349e7
movq 0x128(%rsp), %rax
movl 0x1a78(%rax), %eax
movl %eax, 0x48(%rsp)
jmp 0x349e9
movss 0x11c(%rsp), %xmm0
movq 0x128(%rsp), %rax
movss 0x1a98(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x54(%rsp)
movss 0x110(%rsp), %xmm0
movss 0x118(%rsp), %xmm1
addss %xmm1, %xmm0
movss 0x11c(%rsp), %xmm1
subss %xmm1, %xmm0
movq 0x128(%rsp), %rax
movss 0x1a98(%rax), %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x4c(%rsp)
movss 0x114(%rsp), %xmm0
movq 0x128(%rsp), %rax
movss 0x1a98(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x50(%rsp)
movss 0x54(%rsp), %xmm0
movss %xmm0, 0x58(%rsp)
movss 0x4c(%rsp), %xmm0
movq 0x128(%rsp), %rax
movss 0x1a48(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x5c(%rsp)
movss 0x50(%rsp), %xmm0
movq 0x128(%rsp), %rax
movss 0x1a4c(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x60(%rsp)
movss 0x54(%rsp), %xmm0
movq 0x128(%rsp), %rax
movss 0x1a48(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x64(%rsp)
movss 0x58(%rsp), %xmm0
movq 0x128(%rsp), %rax
movss 0x1a4c(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x68(%rsp)
movss 0x11c(%rsp), %xmm0
movq 0x128(%rsp), %rax
movss 0x1a90(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x78(%rsp)
movss 0x114(%rsp), %xmm0
movq 0x128(%rsp), %rax
movss 0x1a90(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x70(%rsp)
movss 0x110(%rsp), %xmm0
movq 0x128(%rsp), %rax
movss 0x1a8c(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x6c(%rsp)
movss 0x4c(%rsp), %xmm0
movq 0x128(%rsp), %rax
movss 0x1a90(%rax), %xmm1
subss %xmm1, %xmm0
movss 0x6c(%rsp), %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x74(%rsp)
movq 0x130(%rsp), %rdi
addq $0x68, %rdi
movl 0x13c(%rsp), %esi
movups 0x6c(%rsp), %xmm0
movaps %xmm0, 0x30(%rsp)
movl 0xfc(%rsp), %eax
movl %eax, 0x2c(%rsp)
movl 0xf8(%rsp), %eax
movl %eax, 0x28(%rsp)
movq 0x128(%rsp), %rax
movq (%rax), %r8
movsd 0x30(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movl 0x2c(%rsp), %edx
movl 0x28(%rsp), %ecx
movss 0x1042f(%rip), %xmm2    # 0x45024
callq 0x34ca0
movq 0x130(%rsp), %rdi
addq $0x68, %rdi
movq 0x140(%rsp), %r8
movl 0x1f70(%r8), %ecx
addq $0x1b30, %r8            # imm = 0x1B30
movl 0x48(%rsp), %r9d
movq 0x128(%rsp), %rax
movq (%rax), %rdx
movq %rsp, %rax
movq %rdx, (%rax)
leaq 0x6c(%rsp), %rsi
leaq 0x5c(%rsp), %rdx
callq 0x33a70
movq 0x140(%rsp), %rdi
movq 0x130(%rsp), %rsi
movq 0x14c(%rsp), %rax
movq %rax, 0x20(%rsp)
movl 0x10c(%rsp), %edx
movups 0x110(%rsp), %xmm0
movaps %xmm0, 0x10(%rsp)
movsd 0x20(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movsd 0x18(%rsp), %xmm2
callq 0x33b70
movl %eax, 0x154(%rsp)
movl 0x154(%rsp), %eax
addq $0x158, %rsp            # imm = 0x158
retq
nop