// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_combo_callback
NK_API int
nk_combo_callback(struct nk_context *ctx, void(*item_getter)(void*, int, const char**),
    void *userdata, int selected, int count, int item_height, struct nk_vec2 size)
{
    int i;
    int max_height;
    struct nk_vec2 item_spacing;
    struct nk_vec2 window_padding;
    const char *item;

    NK_ASSERT(ctx);
    NK_ASSERT(item_getter);
    if (!ctx || !item_getter)
        return selected;

    /* calculate popup window */
    item_spacing = ctx->style.window.spacing;
    window_padding = nk_panel_get_padding(&ctx->style, ctx->current->layout->type);
    max_height = count * item_height + count * (int)item_spacing.y;
    max_height += (int)item_spacing.y * 2 + (int)window_padding.y * 2;
    size.y = NK_MIN(size.y, (float)max_height);

    item_getter(userdata, selected, &item);
    if (nk_combo_begin_label(ctx, item, size)) {
        nk_layout_row_dynamic(ctx, (float)item_height, 1);
        for (i = 0; i < count; ++i) {
            item_getter(userdata, i, &item);
            if (nk_combo_item_label(ctx, item, NK_TEXT_LEFT))
                selected = i;
        }
        nk_combo_end(ctx);
    } return selected;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %ecx, %ebx
movq %rdx, 0x8(%rsp)
testq %rdi, %rdi
je 0x4e9b8
testq %rsi, %rsi
je 0x4e9ec
movl %r9d, %r12d
movl %r8d, %ebp
movq %rdi, %r15
addq $0x168, %rdi            # imm = 0x168
movq 0x4780(%r15), %rax
movq 0xa8(%rax), %rax
movq %rsi, %r13
movl (%rax), %esi
cvttss2si 0x24b8(%r15), %r14d
movaps %xmm0, 0x20(%rsp)
callq 0x3be3f
leal (%r14,%r12), %eax
imull %ebp, %eax
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
cvttss2si %xmm0, %ecx
addl %r14d, %ecx
leal (%rax,%rcx,2), %eax
movaps 0x20(%rsp), %xmm1
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
cvtsi2ss %eax, %xmm0
minss %xmm0, %xmm1
movaps %xmm1, 0x30(%rsp)
leaq 0x10(%rsp), %r14
movq 0x8(%rsp), %rdi
movl %ebx, %esi
movq %r14, %rdx
movq %r12, 0x18(%rsp)
movq %r13, %r12
callq *%r13
movq (%r14), %rsi
movaps 0x20(%rsp), %xmm0
movaps 0x30(%rsp), %xmm1
movlhps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
shufps $0xe2, %xmm0, %xmm1     # xmm1 = xmm1[2,0],xmm0[2,3]
movaps %xmm1, %xmm0
movq %r15, %rdi
callq 0x12250
testl %eax, %eax
je 0x4ea22
cvtsi2ssl 0x18(%rsp), %xmm0
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0x12f50
xorl %r13d, %r13d
testl %ebp, %ebp
cmovlel %r13d, %ebp
pushq $0x11
popq %r14
cmpl %r13d, %ebp
je 0x4ea1a
movq 0x8(%rsp), %rdi
movl %r13d, %esi
leaq 0x10(%rsp), %rdx
callq *%r12
movq 0x10(%rsp), %rsi
movq %r15, %rdi
movl %r14d, %edx
callq 0x12c40
testl %eax, %eax
cmovnel %r13d, %ebx
incl %r13d
jmp 0x4e984
movq 0x36631(%rip), %r14     # 0x84ff0
movq (%r14), %rdi
movq %rsi, %r15
leaq 0x1b340(%rip), %rsi     # 0x69d0c
leaq 0x1b357(%rip), %rdx     # 0x69d2a
movl $0x74dd, %ecx           # imm = 0x74DD
xorl %eax, %eax
callq 0x12ea0
movq (%r14), %rdi
callq 0x13960
testq %r15, %r15
jne 0x4ea22
movq 0x365fd(%rip), %r14     # 0x84ff0
movq (%r14), %rdi
leaq 0x1b30f(%rip), %rsi     # 0x69d0c
leaq 0x1b326(%rip), %rdx     # 0x69d2a
movl $0x74de, %ecx           # imm = 0x74DE
xorl %eax, %eax
callq 0x12ea0
movq (%r14), %rdi
callq 0x13960
jmp 0x4ea22
movq %r15, %rdi
callq 0x12910
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq