// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_combo
NK_API int
nk_combo(struct nk_context *ctx, const char **items, int count,
    int selected, int item_height, struct nk_vec2 size)
{
    int i = 0;
    int max_height;
    struct nk_vec2 item_spacing;
    struct nk_vec2 window_padding;

    NK_ASSERT(ctx);
    NK_ASSERT(items);
    NK_ASSERT(ctx->current);
    if (!ctx || !items ||!count)
        return selected;

    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);
    if (nk_combo_begin_label(ctx, items[selected], size)) {
        nk_layout_row_dynamic(ctx, (float)item_height, 1);
        for (i = 0; i < count; ++i) {
            if (nk_combo_item_label(ctx, items[i], 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 $0x28, %rsp
movaps %xmm0, (%rsp)
movl %r8d, %r12d
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
testq %rdi, %rdi
jne 0x53fe7
movq 0x34030(%rip), %r13     # 0x87ff0
movq (%r13), %rdi
leaq 0x1ddc1(%rip), %rsi     # 0x71d8c
leaq 0x1ddd8(%rip), %rdx     # 0x71daa
movl $0x7487, %ecx           # imm = 0x7487
xorl %eax, %eax
callq 0x12d80
movq (%r13), %rdi
callq 0x13780
testq %r15, %r15
jne 0x5401a
movq 0x33ffd(%rip), %r13     # 0x87ff0
movq (%r13), %rdi
leaq 0x1dd8e(%rip), %rsi     # 0x71d8c
leaq 0x1dda5(%rip), %rdx     # 0x71daa
movl $0x7488, %ecx           # imm = 0x7488
xorl %eax, %eax
callq 0x12d80
movq (%r13), %rdi
callq 0x13780
cmpq $0x0, 0x4780(%r14)
jne 0x54052
movq 0x33fc5(%rip), %r13     # 0x87ff0
movq (%r13), %rdi
leaq 0x1dd56(%rip), %rsi     # 0x71d8c
leaq 0x1dd6d(%rip), %rdx     # 0x71daa
movl $0x7489, %ecx           # imm = 0x7489
xorl %eax, %eax
callq 0x12d80
movq (%r13), %rdi
callq 0x13780
testq %r14, %r14
je 0x54143
testq %r15, %r15
je 0x54143
testl %ebp, %ebp
je 0x54143
leaq 0x168(%r14), %rdi
movq 0x4780(%r14), %rax
movq 0xa8(%rax), %rax
movl (%rax), %esi
cvttss2si 0x24b8(%r14), %r13d
callq 0x3fd90
leal (%r12,%r13), %eax
imull %ebp, %eax
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
cvttss2si %xmm0, %ecx
addl %r13d, %ecx
leal (%rax,%rcx,2), %eax
movaps (%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
minss %xmm0, %xmm1
movaps %xmm1, 0x10(%rsp)
movslq %ebx, %rax
movq (%r15,%rax,8), %r13
movq %r13, %rdi
callq 0x12f10
movaps 0x10(%rsp), %xmm0
movaps (%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 %r13, %rsi
movl %eax, %edx
callq 0x12e80
testl %eax, %eax
je 0x54143
xorps %xmm0, %xmm0
cvtsi2ss %r12d, %xmm0
movq %r14, %rdi
xorl %esi, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x41057
testl %ebp, %ebp
jle 0x5413b
movl %ebp, %r13d
xorl %ebp, %ebp
movq (%r15,%rbp,8), %r12
movq %r12, %rdi
callq 0x12f10
movq %r14, %rdi
movq %r12, %rsi
movl %eax, %edx
movl $0x11, %ecx
callq 0x13860
testl %eax, %eax
cmovnel %ebp, %ebx
incq %rbp
cmpq %rbp, %r13
jne 0x54110
movq %r14, %rdi
callq 0x12860
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq