// File: /workspace/github_c_makefile_star2_O1/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
movaps %xmm0, 0x20(%rsp)
movl %r9d, %r13d
movl %r8d, %ebp
movl %ecx, 0xc(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, %r12
movq %rdi, %r14
testq %rdi, %rdi
jne 0x54399
movq 0x33c7c(%rip), %rbx     # 0x87ff0
movq (%rbx), %rdi
leaq 0x1da0e(%rip), %rsi     # 0x71d8c
leaq 0x1da25(%rip), %rdx     # 0x71daa
movl $0x74dd, %ecx           # imm = 0x74DD
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
callq 0x13780
testq %r12, %r12
jne 0x543ca
movq 0x33c4b(%rip), %rbx     # 0x87ff0
movq (%rbx), %rdi
leaq 0x1d9dd(%rip), %rsi     # 0x71d8c
leaq 0x1d9f4(%rip), %rdx     # 0x71daa
movl $0x74de, %ecx           # imm = 0x74DE
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
callq 0x13780
testq %r12, %r12
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x544dc
leaq 0x168(%r14), %rdi
movq 0x4780(%r14), %rax
movq 0xa8(%rax), %rax
movl (%rax), %esi
cvttss2si 0x24b8(%r14), %ebx
callq 0x3fd90
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 0x20(%rsp), %xmm1
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
minss %xmm0, %xmm1
movaps %xmm1, 0x30(%rsp)
leaq 0x18(%rsp), %rbx
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
movq %rbx, %rdx
callq *%r12
movq (%rbx), %rbx
movq %rbx, %rdi
callq 0x12f10
movaps 0x30(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movlhps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
shufps $0xe2, %xmm1, %xmm0     # xmm0 = xmm0[2,0],xmm1[2,3]
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x12e80
testl %eax, %eax
je 0x544dc
xorps %xmm0, %xmm0
cvtsi2ss %r13d, %xmm0
xorl %r13d, %r13d
movq %r14, %rdi
xorl %esi, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x41057
testl %ebp, %ebp
jle 0x544d4
leaq 0x18(%rsp), %rbx
movq 0x10(%rsp), %rdi
movl %r13d, %esi
movq %rbx, %rdx
callq *%r12
movq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x12f10
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %edx
movl $0x11, %ecx
callq 0x13860
testl %eax, %eax
je 0x544cc
movl %r13d, 0xc(%rsp)
incl %r13d
cmpl %r13d, %ebp
jne 0x54496
movq %r14, %rdi
callq 0x12860
movl 0xc(%rsp), %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq