// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x78, %rsp
movlpd %xmm0, 0x6c(%rsp)
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movl %edx, 0x54(%rsp)
movl %ecx, 0x50(%rsp)
movl %r8d, 0x4c(%rsp)
movl %r9d, 0x48(%rsp)
movl $0x0, 0x1c(%rsp)
cmpq $0x0, 0x60(%rsp)
jne 0x7bc29
movq 0x493f3(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x35799(%rip), %rsi     # 0xb13a0
leaq 0x357b0(%rip), %rdx     # 0xb13be
movl $0x74a8, %ecx           # imm = 0x74A8
movb $0x0, %al
callq 0x13ec0
movq 0x493cf(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x7bc2b
jmp 0x7bc2d
cmpq $0x0, 0x58(%rsp)
jne 0x7bc68
movq 0x493b4(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x3575a(%rip), %rsi     # 0xb13a0
leaq 0x35771(%rip), %rdx     # 0xb13be
movl $0x74a9, %ecx           # imm = 0x74A9
movb $0x0, %al
callq 0x13ec0
movq 0x49390(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x7bc6a
cmpq $0x0, 0x60(%rsp)
je 0x7bc7a
cmpq $0x0, 0x58(%rsp)
jne 0x7bc87
movl 0x50(%rsp), %eax
movl %eax, 0x74(%rsp)
jmp 0x7beed
movq 0x60(%rsp), %rax
movq 0x24b4(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x60(%rsp), %rax
movq %rax, %rdi
addq $0x168, %rdi            # imm = 0x168
movq 0x4780(%rax), %rax
movq 0xa8(%rax), %rax
movl (%rax), %esi
callq 0x5d770
movlpd %xmm0, 0x14(%rsp)
movq 0x14(%rsp), %rax
movq %rax, 0x30(%rsp)
movl 0x4c(%rsp), %eax
imull 0x48(%rsp), %eax
movl 0x4c(%rsp), %ecx
cvttss2si 0x3c(%rsp), %edx
imull %edx, %ecx
addl %ecx, %eax
movl %eax, 0x40(%rsp)
cvttss2si 0x3c(%rsp), %eax
shll %eax
cvttss2si 0x34(%rsp), %ecx
shll %ecx
addl %ecx, %eax
addl 0x40(%rsp), %eax
movl %eax, 0x40(%rsp)
movss 0x70(%rsp), %xmm1
cvtsi2ssl 0x40(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x7bd21
movss 0x70(%rsp), %xmm0
movss %xmm0, 0x10(%rsp)
jmp 0x7bd2d
cvtsi2ssl 0x40(%rsp), %xmm0
movss %xmm0, 0x10(%rsp)
movss 0x10(%rsp), %xmm0
movss %xmm0, 0x70(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x28(%rsp)
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
cmpl 0x4c(%rsp), %eax
jge 0x7bdde
movq 0x28(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0xf(%rsp)
je 0x7bd89
movq 0x20(%rsp), %rax
movsbl (%rax), %eax
cmpl 0x54(%rsp), %eax
setne %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x7bd93
jmp 0x7bda3
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x7bd63
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
subq %rcx, %rax
movl %eax, 0x1c(%rsp)
movl 0x44(%rsp), %eax
cmpl 0x50(%rsp), %eax
jne 0x7bdc0
jmp 0x7bdde
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x7bd4b
movq 0x60(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x1c(%rsp), %edx
movsd 0x6c(%rsp), %xmm0
callq 0x13fb0
cmpl $0x0, %eax
je 0x7bee5
movq 0x58(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x60(%rsp), %rdi
cvtsi2ssl 0x48(%rsp), %xmm0
movl $0x1, %esi
callq 0x13f60
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
cmpl 0x4c(%rsp), %eax
jge 0x7bedb
movq 0x28(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0xe(%rsp)
je 0x7be65
movq 0x20(%rsp), %rax
movsbl (%rax), %eax
cmpl 0x54(%rsp), %eax
setne %al
movb %al, 0xe(%rsp)
movb 0xe(%rsp), %al
testb $0x1, %al
jne 0x7be6f
jmp 0x7be7f
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x7be3f
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
subq %rcx, %rax
movl %eax, 0x1c(%rsp)
movq 0x60(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x1c(%rsp), %edx
movl $0x11, %ecx
callq 0x14430
cmpl $0x0, %eax
je 0x7beb5
movl 0x44(%rsp), %eax
movl %eax, 0x50(%rsp)
movq 0x28(%rsp), %rax
movslq 0x1c(%rsp), %rcx
addq %rcx, %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x7be27
movq 0x60(%rsp), %rdi
callq 0x150f0
movl 0x50(%rsp), %eax
movl %eax, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)