// File: /workspace/github_c_makefile_star2_O3/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 $0x38, %rsp
movl %ecx, 0x4(%rsp)
movq %rsi, %r14
testq %rdi, %rdi
je 0x53932
testq %r14, %r14
je 0x53963
movl %r9d, %r13d
movl %r8d, %ebp
movq %rdx, %r12
movq %rdi, %r15
addq $0x168, %rdi            # imm = 0x168
movq 0x4780(%r15), %rax
movq 0xa8(%rax), %rax
movl (%rax), %esi
cvttss2si 0x24b8(%r15), %ebx
movaps %xmm0, 0x10(%rsp)
callq 0x3f4dd
leal (%rbx,%r13), %eax
imull %ebp, %eax
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
cvttss2si %xmm0, %ecx
addl %ebx, %ecx
leal (%rax,%rcx,2), %eax
movaps 0x10(%rsp), %xmm1
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
minss %xmm0, %xmm1
movaps %xmm1, 0x20(%rsp)
leaq 0x8(%rsp), %rbx
movq %r12, %rdi
movl 0x4(%rsp), %esi
movq %rbx, %rdx
callq *%r14
movq (%rbx), %rbx
movq %rbx, %rdi
callq 0x12f10
movaps 0x10(%rsp), %xmm0
movaps 0x20(%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
movq %rbx, %rsi
movl %eax, %edx
callq 0x12e80
testl %eax, %eax
je 0x5398f
xorps %xmm0, %xmm0
cvtsi2ss %r13d, %xmm0
xorl %r13d, %r13d
movq %r15, %rdi
xorl %esi, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x407cc
testl %ebp, %ebp
jle 0x53928
movq %r12, %rdi
movl %r13d, %esi
leaq 0x8(%rsp), %rdx
callq *%r14
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x12f10
movq %r15, %rdi
movq %rbx, %rsi
movl %eax, %edx
movl $0x11, %ecx
callq 0x13860
testl %eax, %eax
je 0x53920
movl %r13d, 0x4(%rsp)
incl %r13d
cmpl %r13d, %ebp
jne 0x538ea
movq %r15, %rdi
callq 0x12860
jmp 0x5398f
movq 0x336b7(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x1d459(%rip), %rsi     # 0x70d9c
leaq 0x1d470(%rip), %rdx     # 0x70dba
movl $0x74dd, %ecx           # imm = 0x74DD
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
callq 0x13780
testq %r14, %r14
jne 0x5398f
movq 0x33686(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x1d428(%rip), %rsi     # 0x70d9c
leaq 0x1d43f(%rip), %rdx     # 0x70dba
movl $0x74de, %ecx           # imm = 0x74DE
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
callq 0x13780
movl 0x4(%rsp), %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq