// File: /workspace/github_c_makefile_star2_O3/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 %r8d, 0xc(%rsp)
movl %ecx, %ebx
movq %rsi, %r14
testq %rdi, %rdi
je 0x536d0
testq %r14, %r14
je 0x53705
movl %r9d, %r13d
movl %edx, %r12d
movq %rdi, %rbp
addq $0x168, %rdi            # imm = 0x168
movq 0x4780(%rbp), %rax
movq 0xa8(%rax), %rax
movl (%rax), %esi
cvttss2si 0x24b8(%rbp), %r15d
movaps %xmm0, 0x10(%rsp)
callq 0x3f4dd
leal (%r15,%r13), %eax
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
cvttss2si %xmm0, %ecx
movl 0xc(%rsp), %edx
imull %edx, %eax
addl %r15d, %ecx
leal (%rax,%rcx,2), %eax
movaps 0x10(%rsp), %xmm2
movaps %xmm2, %xmm0
shufps $0x55, %xmm2, %xmm0     # xmm0 = xmm0[1,1],xmm2[1,1]
cvtsi2ss %eax, %xmm1
minss %xmm1, %xmm0
movlhps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
shufps $0xe2, %xmm2, %xmm0     # xmm0 = xmm0[2,0],xmm2[2,3]
testl %edx, %edx
jle 0x53736
xorl %eax, %eax
movq %r14, %rcx
movq %r14, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movsbl (%rsi), %edi
incq %rsi
incl %edx
testl %edi, %edi
je 0x536bf
cmpl %r12d, %edi
jne 0x536ae
cmpl %ebx, %eax
je 0x5373d
incl %eax
movq %rsi, %rcx
cmpl 0xc(%rsp), %eax
jne 0x536a9
jmp 0x53740
movq 0x33919(%rip), %r15     # 0x86ff0
movq (%r15), %rdi
leaq 0x1d6bb(%rip), %rsi     # 0x70d9c
leaq 0x1d6d2(%rip), %rdx     # 0x70dba
movl $0x74a8, %ecx           # imm = 0x74A8
xorl %eax, %eax
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
testq %r14, %r14
jne 0x537da
movq 0x338e4(%rip), %r14     # 0x86ff0
movq (%r14), %rdi
leaq 0x1d686(%rip), %rsi     # 0x70d9c
leaq 0x1d69d(%rip), %rdx     # 0x70dba
movl $0x74a9, %ecx           # imm = 0x74A9
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
jmp 0x537da
xorl %edx, %edx
movq %r14, %rsi
jmp 0x53740
movq %rcx, %rsi
movq %rbp, %rdi
callq 0x12e80
testl %eax, %eax
je 0x537da
xorps %xmm0, %xmm0
cvtsi2ss %r13d, %xmm0
xorl %r13d, %r13d
movq %rbp, 0x10(%rsp)
movq %rbp, %rdi
xorl %esi, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x407cc
cmpl $0x0, 0xc(%rsp)
jle 0x537d0
movabsq $0x100000000, %r15      # imm = 0x100000000
xorl %edx, %edx
movabsq $-0x100000000, %rbp     # imm = 0xFFFFFFFF00000000
addq %r15, %rbp
movsbl (%r14,%rdx), %eax
incq %rdx
testl %eax, %eax
je 0x537a2
cmpl %r12d, %eax
jne 0x5378e
decl %edx
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x11, %ecx
callq 0x13860
testl %eax, %eax
cmovnel %r13d, %ebx
sarq $0x20, %rbp
addq %rbp, %r14
incq %r14
incl %r13d
cmpl 0xc(%rsp), %r13d
jne 0x53782
movq 0x10(%rsp), %rdi
callq 0x12860
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq