// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_combo_separator
NK_API int
nk_combo_separator(struct nk_context *ctx, const char *items_separated_by_separator,
    int separator, 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 *current_item;
    const char *iter;
    int length = 0;

    NK_ASSERT(ctx);
    NK_ASSERT(items_separated_by_separator);
    if (!ctx || !items_separated_by_separator)
        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);

    /* find selected item */
    current_item = items_separated_by_separator;
    for (i = 0; i < count; ++i) {
        iter = current_item;
        while (*iter && *iter != separator) iter++;
        length = (int)(iter - current_item);
        if (i == selected) break;
        current_item = iter + 1;
    }

    if (nk_combo_begin_text(ctx, current_item, length, size)) {
        current_item = items_separated_by_separator;
        nk_layout_row_dynamic(ctx, (float)item_height, 1);
        for (i = 0; i < count; ++i) {
            iter = current_item;
            while (*iter && *iter != separator) iter++;
            length = (int)(iter - current_item);
            if (nk_combo_item_text(ctx, current_item, length, NK_TEXT_LEFT))
                selected = i;
            current_item = current_item + length + 1;
        }
        nk_combo_end(ctx);
    }
    return selected;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %ebx
movq %rsi, %r14
testq %rdi, %rdi
je 0x4e810
testq %r14, %r14
je 0x4e841
movl %r9d, %r13d
movl %r8d, %ebp
movl %edx, %r12d
movq %rdi, %rcx
addq $0x168, %rdi            # imm = 0x168
movq 0x4780(%rcx), %rax
movq 0xa8(%rax), %rax
movl (%rax), %esi
movl %ebx, 0x4(%rsp)
movq %rcx, 0x8(%rsp)
cvttss2si 0x24b8(%rcx), %r15d
movaps %xmm0, 0x10(%rsp)
callq 0x3be3f
leal (%r15,%r13), %eax
imull %ebp, %eax
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
cvttss2si %xmm0, %ecx
addl %r15d, %ecx
movl 0x4(%rsp), %ebx
leal (%rax,%rcx,2), %eax
cvtsi2ss %eax, %xmm1
movaps 0x10(%rsp), %xmm2
movaps %xmm2, %xmm0
shufps $0x55, %xmm2, %xmm0     # xmm0 = xmm0[1,1],xmm2[1,1]
minss %xmm1, %xmm0
movlhps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
xorl %eax, %eax
testl %ebp, %ebp
cmovlel %eax, %ebp
shufps $0xe2, %xmm2, %xmm0     # xmm0 = xmm0[2,0],xmm2[2,3]
pushq $-0x1
popq %rcx
movq %r14, %rdi
xorl %edx, %edx
movq %rdi, %rsi
cmpl %ebp, %eax
je 0x4e782
movl %ecx, %edx
movq %rsi, %rdi
movsbl (%rdi), %r8d
incq %rdi
incl %edx
testl %r8d, %r8d
je 0x4e777
cmpl %r12d, %r8d
jne 0x4e764
leal 0x1(%rax), %r8d
cmpl %ebx, %eax
movl %r8d, %eax
jne 0x4e758
movq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x12fa0
testl %eax, %eax
je 0x4e87d
cvtsi2ss %r13d, %xmm0
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0x12f50
xorl %r13d, %r13d
movabsq $0x100000000, %r15      # imm = 0x100000000
cmpl %ebp, %r13d
je 0x4e86f
movl %ebp, %ebx
xorl %edx, %edx
movabsq $-0x100000000, %rbp     # imm = 0xFFFFFFFF00000000
addq %r15, %rbp
movsbl (%r14,%rdx), %eax
incq %rdx
testl %eax, %eax
je 0x4e7df
cmpl %r12d, %eax
jne 0x4e7cb
decl %edx
movq 0x8(%rsp), %rdi
movq %r14, %rsi
pushq $0x11
popq %rcx
callq 0x13a50
testl %eax, %eax
movl 0x4(%rsp), %eax
cmovnel %r13d, %eax
movl %eax, 0x4(%rsp)
sarq $0x20, %rbp
addq %rbp, %r14
incq %r14
incl %r13d
movl %ebx, %ebp
jmp 0x4e7b4
movq 0x367d9(%rip), %r15     # 0x84ff0
movq (%r15), %rdi
leaq 0x1b4eb(%rip), %rsi     # 0x69d0c
leaq 0x1b502(%rip), %rdx     # 0x69d2a
movl $0x74a8, %ecx           # imm = 0x74A8
xorl %eax, %eax
callq 0x12ea0
movq (%r15), %rdi
callq 0x13960
testq %r14, %r14
jne 0x4e87d
movq 0x367a8(%rip), %r14     # 0x84ff0
movq (%r14), %rdi
leaq 0x1b4ba(%rip), %rsi     # 0x69d0c
leaq 0x1b4d1(%rip), %rdx     # 0x69d2a
movl $0x74a9, %ecx           # imm = 0x74A9
xorl %eax, %eax
callq 0x12ea0
movq (%r14), %rdi
callq 0x13960
jmp 0x4e87d
movq 0x8(%rsp), %rdi
callq 0x12910
movl 0x4(%rsp), %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq