// File: /workspace/github_c_makefile_star2_O1/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, %r13d
movl %r8d, %ebx
movl %ecx, 0x14(%rsp)
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbp
testq %rdi, %rdi
jne 0x44a06
movq 0x4360f(%rip), %r15     # 0x87ff0
movq (%r15), %rdi
leaq 0x2d3a1(%rip), %rsi     # 0x71d8c
leaq 0x2d3b8(%rip), %rdx     # 0x71daa
movl $0x5a1d, %ecx           # imm = 0x5A1D
xorl %eax, %eax
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
testq %r14, %r14
jne 0x44a37
movq 0x435de(%rip), %r15     # 0x87ff0
movq (%r15), %rdi
leaq 0x2d370(%rip), %rsi     # 0x71d8c
leaq 0x2d387(%rip), %rdx     # 0x71daa
movl $0x5a1e, %ecx           # imm = 0x5A1E
xorl %eax, %eax
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
testq %r12, %r12
jne 0x44a68
movq 0x435ad(%rip), %r15     # 0x87ff0
movq (%r15), %rdi
leaq 0x2d33f(%rip), %rsi     # 0x71d8c
leaq 0x2d356(%rip), %rdx     # 0x71daa
movl $0x5a1f, %ecx           # imm = 0x5A1F
xorl %eax, %eax
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
testq %r12, %r12
sete %al
testq %r14, %r14
sete %cl
testq %rbp, %rbp
sete %dl
orb %cl, %dl
orb %al, %dl
jne 0x44cf2
cvttss2si 0x24b8(%rbp), %eax
movq %rbp, (%rsp)
movq 0x4780(%rbp), %rbp
xorl %esi, %esi
testl %eax, %eax
cmovlel %esi, %eax
cmpb $0x0, (%r12)
je 0x44ab3
xorl %esi, %esi
cmpb $0x0, 0x1(%r12,%rsi)
leaq 0x1(%rsi), %rsi
jne 0x44aa7
movl %r13d, 0x10(%rsp)
addl %ebx, %eax
movl %eax, 0xc(%rsp)
movq %r12, %rdi
movl $0x2, %edx
callq 0x12560
movl %eax, %ebx
movq 0x1b8(%rbp), %rax
movq %rax, %rcx
testq %rcx, %rcx
je 0x44b38
movl 0x4(%rcx), %esi
testq %rsi, %rsi
setne %dl
je 0x44b2b
cmpl %ebx, 0x8(%rcx)
jne 0x44af2
movb $0x1, %dl
xorl %edi, %edi
jmp 0x44b10
leaq -0x1(%rsi), %r8
xorl %edx, %edx
cmpq %rdx, %r8
je 0x44b22
leaq 0x1(%rdx), %rdi
cmpl %ebx, 0xc(%rcx,%rdx,4)
movq %rdi, %rdx
jne 0x44af8
cmpq %rsi, %rdi
setb %dl
movl (%rbp), %esi
movl %esi, (%rcx)
leaq (%rcx,%rdi,4), %r13
addq $0xf8, %r13
jmp 0x44b32
incq %rdx
cmpq %rsi, %rdx
setb %dl
movq 0x1e8(%rcx), %rcx
testb %dl, %dl
je 0x44ad7
jmp 0x44b3b
xorl %r13d, %r13d
testq %r13, %r13
je 0x44ba5
incl %ebx
movl 0x4(%rax), %edx
testq %rdx, %rdx
setne %cl
je 0x44b91
cmpl %ebx, 0x8(%rax)
jne 0x44b58
movb $0x1, %cl
xorl %esi, %esi
jmp 0x44b76
leaq -0x1(%rdx), %rdi
xorl %ecx, %ecx
cmpq %rcx, %rdi
je 0x44b88
leaq 0x1(%rcx), %rsi
cmpl %ebx, 0xc(%rax,%rcx,4)
movq %rsi, %rcx
jne 0x44b5e
cmpq %rdx, %rsi
setb %cl
movl (%rbp), %edx
movl %edx, (%rax)
leaq (%rax,%rsi,4), %r15
addq $0xf8, %r15
jmp 0x44b98
incq %rcx
cmpq %rdx, %rcx
setb %cl
movq 0x1e8(%rax), %rax
testb %cl, %cl
je 0x44b42
movq (%rsp), %rbx
jmp 0x44c4e
movq (%rsp), %r15
movq %r15, %rdi
movq %rbp, %rsi
movl %ebx, %edx
callq 0x441e0
movq %rax, %r13
incl %ebx
movq %r15, %rdi
movq %rbp, %rsi
movl %ebx, %edx
callq 0x441e0
movq %rax, %r15
testq %r13, %r13
jne 0x44bfc
movq 0x43419(%rip), %rbx     # 0x87ff0
movq (%rbx), %rdi
leaq 0x2d1ab(%rip), %rsi     # 0x71d8c
leaq 0x2d1c2(%rip), %rdx     # 0x71daa
movl $0x5a2f, %ecx           # imm = 0x5A2F
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
callq 0x13780
testq %r15, %r15
jne 0x44c2d
movq 0x433e8(%rip), %rbx     # 0x87ff0
movq (%rbx), %rdi
leaq 0x2d17a(%rip), %rsi     # 0x71d8c
leaq 0x2d191(%rip), %rdx     # 0x71daa
movl $0x5a30, %ecx           # imm = 0x5A30
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
callq 0x13780
testq %r15, %r15
sete %al
testq %r13, %r13
sete %cl
orb %al, %cl
movq (%rsp), %rbx
jne 0x44cf2
xorl %eax, %eax
movl %eax, (%r15)
movl %eax, (%r13)
movl (%r15), %eax
movl %eax, 0x20(%r14)
movq %r15, 0x18(%r14)
movl $0x0, (%r15)
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r12, %rcx
movl 0x14(%rsp), %r8d
callq 0x13350
movq 0x4780(%rbx), %rcx
movq 0xa8(%rcx), %rdx
movl 0x10(%rsp), %edi
cmpl $0x2, %edi
movl $0x1, %ecx
cmovgel %edi, %ecx
movl 0xc(%rsp), %esi
imull %esi, %ecx
movl %ecx, 0xc(%r14)
movl 0x20(%r14), %ecx
cvtsi2ss %rcx, %xmm0
cvtsi2ss %esi, %xmm1
divss %xmm1, %xmm0
xorps %xmm2, %xmm2
movaps %xmm0, %xmm3
cmpless %xmm2, %xmm3
andnps %xmm0, %xmm3
cvttss2si %xmm3, %ecx
movl %ecx, (%r14)
movss 0x50(%rdx), %xmm0
divss %xmm1, %xmm0
cvttss2si %xmm0, %edx
cvttps2dq %xmm0, %xmm1
cvtdq2ps %xmm1, %xmm1
xorl %esi, %esi
ucomiss %xmm1, %xmm0
seta %sil
addl %edx, %esi
js 0x44cf6
xorl %esi, %esi
ucomiss %xmm1, %xmm0
seta %sil
addl %edx, %esi
jmp 0x44cf8
xorl %eax, %eax
jmp 0x44d0d
xorl %esi, %esi
subl %ecx, %edi
cmpl %edi, %esi
cmovll %esi, %edi
movl %edi, 0x8(%r14)
addl %ecx, %edi
movl %edi, 0x4(%r14)
movq %rbx, 0x10(%r14)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq