// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_list_view_begin
NK_API nk_bool
nk_list_view_begin(struct nk_context *ctx, struct nk_list_view *view,
    const char *title, nk_flags flags, int row_height, int row_count)
{
    int title_len;
    nk_hash title_hash;
    nk_uint *x_offset;
    nk_uint *y_offset;

    int result;
    struct nk_window *win;
    struct nk_panel *layout;
    const struct nk_style *style;
    struct nk_vec2 item_spacing;

    NK_ASSERT(ctx);
    NK_ASSERT(view);
    NK_ASSERT(title);
    if (!ctx || !view || !title) return 0;

    win = ctx->current;
    style = &ctx->style;
    item_spacing = style->window.spacing;
    row_height += NK_MAX(0, (int)item_spacing.y);

    /* find persistent list view scrollbar offset */
    title_len = (int)nk_strlen(title);
    title_hash = nk_murmur_hash(title, (int)title_len, NK_PANEL_GROUP);
    x_offset = nk_find_value(win, title_hash);
    if (!x_offset) {
        x_offset = nk_add_value(ctx, win, title_hash, 0);
        y_offset = nk_add_value(ctx, win, title_hash+1, 0);

        NK_ASSERT(x_offset);
        NK_ASSERT(y_offset);
        if (!x_offset || !y_offset) return 0;
        *x_offset = *y_offset = 0;
    } else y_offset = nk_find_value(win, title_hash+1);
    view->scroll_value = *y_offset;
    view->scroll_pointer = y_offset;

    *y_offset = 0;
    result = nk_group_scrolled_offset_begin(ctx, x_offset, y_offset, title, flags);
    win = ctx->current;
    layout = win->layout;

    view->total_height = row_height * NK_MAX(row_count,1);
    view->begin = (int)NK_MAX(((float)view->scroll_value / (float)row_height), 0.0f);
    view->count = (int)NK_MAX(nk_iceilf((layout->clip.h)/(float)row_height),0);
    view->count = NK_MIN(view->count, row_count - view->begin);
    view->end = view->begin + view->count;
    view->ctx = ctx;
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %ebx
movl %r8d, 0xc(%rsp)
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
testq %rdi, %rdi
jne 0x40551
movq 0x44ac6(%rip), %r13     # 0x84ff0
movq (%r13), %rdi
leaq 0x297d7(%rip), %rsi     # 0x69d0c
leaq 0x297ee(%rip), %rdx     # 0x69d2a
movl $0x5a1d, %ecx           # imm = 0x5A1D
xorl %eax, %eax
callq 0x12ea0
movq (%r13), %rdi
callq 0x13960
testq %r14, %r14
jne 0x40584
movq 0x44a93(%rip), %r13     # 0x84ff0
movq (%r13), %rdi
leaq 0x297a4(%rip), %rsi     # 0x69d0c
leaq 0x297bb(%rip), %rdx     # 0x69d2a
movl $0x5a1e, %ecx           # imm = 0x5A1E
xorl %eax, %eax
callq 0x12ea0
movq (%r13), %rdi
callq 0x13960
testq %r12, %r12
je 0x406ac
testq %r14, %r14
sete %al
testq %r15, %r15
sete %cl
orb %al, %cl
jne 0x406d8
movl %ebp, 0x4(%rsp)
movq 0x4780(%r15), %r13
cvttss2si 0x24b8(%r15), %eax
xorl %ecx, %ecx
testl %eax, %eax
cmovgl %eax, %ecx
movl %ecx, 0x8(%rsp)
movq %r12, %rdi
callq 0x13040
pushq $0x2
popq %rdx
movq %r12, %rdi
movl %eax, %esi
callq 0x125c0
movl %eax, %ebp
movq %r13, %rdi
movl %eax, %esi
callq 0x3ff1b
testq %rax, %rax
je 0x406e9
incl %ebp
movq %r13, %rdi
movq %rax, %r13
movl %ebp, %esi
callq 0x3ff1b
movq %r13, %rsi
movq %rax, %r13
movl 0x4(%rsp), %r8d
movl 0x8(%rsp), %ebp
addl 0xc(%rsp), %ebp
movl (%r13), %eax
movl %eax, 0x20(%r14)
movq %r13, 0x18(%r14)
andl $0x0, (%r13)
movq %r15, %rdi
movq %r13, %rdx
movq %r12, %rcx
callq 0x134c0
movq 0x4780(%r15), %rcx
movq 0xa8(%rcx), %rcx
cmpl $0x2, %ebx
pushq $0x1
popq %rdx
cmovgel %ebx, %edx
imull %ebp, %edx
movl %edx, 0xc(%r14)
movl 0x20(%r14), %edx
cvtsi2ss %rdx, %xmm0
cvtsi2ss %ebp, %xmm1
divss %xmm1, %xmm0
xorps %xmm2, %xmm2
movaps %xmm0, %xmm3
cmpless %xmm2, %xmm3
andnps %xmm0, %xmm3
cvttss2si %xmm3, %edx
movl %edx, (%r14)
movss 0x50(%rcx), %xmm0
divss %xmm1, %xmm0
cvttss2si %xmm0, %ecx
cvttps2dq %xmm0, %xmm1
cvtdq2ps %xmm1, %xmm1
xorl %esi, %esi
ucomiss %xmm1, %xmm0
seta %sil
addl %ecx, %esi
xorl %ecx, %ecx
testl %esi, %esi
cmovgl %esi, %ecx
subl %edx, %ebx
cmpl %ebx, %ecx
cmovll %ecx, %ebx
movl %ebx, 0x8(%r14)
addl %edx, %ebx
movl %ebx, 0x4(%r14)
movq %r15, 0x10(%r14)
jmp 0x406da
movq 0x4493d(%rip), %rbx     # 0x84ff0
movq (%rbx), %rdi
leaq 0x2964f(%rip), %rsi     # 0x69d0c
leaq 0x29666(%rip), %rdx     # 0x69d2a
movl $0x5a1f, %ecx           # imm = 0x5A1F
xorl %eax, %eax
callq 0x12ea0
movq (%rbx), %rdi
callq 0x13960
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %r13, %rsi
movl %ebp, %edx
callq 0x3ff5d
movq %rax, 0x10(%rsp)
incl %ebp
movq %r15, %rdi
movq %r13, %rsi
movl %ebp, %edx
callq 0x3ff5d
movq 0x10(%rsp), %rsi
movq %rax, %r13
testq %rsi, %rsi
je 0x4072e
testq %r13, %r13
movl 0x4(%rsp), %r8d
je 0x40763
andl $0x0, (%r13)
andl $0x0, (%rsi)
jmp 0x40604
movq 0x448bb(%rip), %rbx     # 0x84ff0
movq (%rbx), %rdi
leaq 0x295cd(%rip), %rsi     # 0x69d0c
leaq 0x295e4(%rip), %rdx     # 0x69d2a
movl $0x5a2f, %ecx           # imm = 0x5A2F
xorl %eax, %eax
callq 0x12ea0
movq (%rbx), %rdi
callq 0x13960
testq %r13, %r13
jne 0x406d8
movq 0x44886(%rip), %rbx     # 0x84ff0
movq (%rbx), %rdi
leaq 0x29598(%rip), %rsi     # 0x69d0c
leaq 0x295af(%rip), %rdx     # 0x69d2a
movl $0x5a30, %ecx           # imm = 0x5A30
jmp 0x406c9