// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq %rdx, 0x68(%rsp)
movl %ecx, 0x64(%rsp)
movl %r8d, 0x60(%rsp)
movl %r9d, 0x5c(%rsp)
cmpq $0x0, 0x78(%rsp)
jne 0x649ef
movq 0x6062d(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x4c9d3(%rip), %rsi     # 0xb13a0
leaq 0x4c9ea(%rip), %rdx     # 0xb13be
movl $0x5a1d, %ecx           # imm = 0x5A1D
movb $0x0, %al
callq 0x13ec0
movq 0x60609(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x649f1
jmp 0x649f3
cmpq $0x0, 0x70(%rsp)
jne 0x64a2e
movq 0x605ee(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x4c994(%rip), %rsi     # 0xb13a0
leaq 0x4c9ab(%rip), %rdx     # 0xb13be
movl $0x5a1e, %ecx           # imm = 0x5A1E
movb $0x0, %al
callq 0x13ec0
movq 0x605ca(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x64a30
jmp 0x64a32
cmpq $0x0, 0x68(%rsp)
jne 0x64a6d
movq 0x605af(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x4c955(%rip), %rsi     # 0xb13a0
leaq 0x4c96c(%rip), %rdx     # 0xb13be
movl $0x5a1f, %ecx           # imm = 0x5A1F
movb $0x0, %al
callq 0x13ec0
movq 0x6058b(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x64a6f
cmpq $0x0, 0x78(%rsp)
je 0x64a87
cmpq $0x0, 0x70(%rsp)
je 0x64a87
cmpq $0x0, 0x68(%rsp)
jne 0x64a97
movl $0x0, 0x84(%rsp)
jmp 0x64def
movq 0x78(%rsp), %rax
movq 0x4780(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x78(%rsp), %rax
addq $0x168, %rax            # imm = 0x168
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x234c(%rax), %rax
movq %rax, 0x18(%rsp)
cvttss2si 0x1c(%rsp), %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jge 0x64ae1
cvttss2si 0x1c(%rsp), %eax
movl %eax, 0x14(%rsp)
jmp 0x64ae9
xorl %eax, %eax
movl %eax, 0x14(%rsp)
jmp 0x64ae9
movl 0x14(%rsp), %eax
addl 0x60(%rsp), %eax
movl %eax, 0x60(%rsp)
movq 0x68(%rsp), %rdi
callq 0x14050
movl %eax, 0x58(%rsp)
movq 0x68(%rsp), %rdi
movl 0x58(%rsp), %esi
movl $0x2, %edx
callq 0x135e0
movl %eax, 0x54(%rsp)
movq 0x30(%rsp), %rdi
movl 0x54(%rsp), %esi
callq 0x64100
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x64c24
movq 0x78(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl 0x54(%rsp), %edx
xorl %ecx, %ecx
callq 0x641d0
movq %rax, 0x48(%rsp)
movq 0x78(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl 0x54(%rsp), %edx
addl $0x1, %edx
xorl %ecx, %ecx
callq 0x641d0
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x64bab
movq 0x60471(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x4c817(%rip), %rsi     # 0xb13a0
leaq 0x4c82e(%rip), %rdx     # 0xb13be
movl $0x5a2f, %ecx           # imm = 0x5A2F
movb $0x0, %al
callq 0x13ec0
movq 0x6044d(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x64bad
jmp 0x64baf
cmpq $0x0, 0x40(%rsp)
jne 0x64bea
movq 0x60432(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x4c7d8(%rip), %rsi     # 0xb13a0
leaq 0x4c7ef(%rip), %rdx     # 0xb13be
movl $0x5a30, %ecx           # imm = 0x5A30
movb $0x0, %al
callq 0x13ec0
movq 0x6040e(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x64bec
cmpq $0x0, 0x48(%rsp)
je 0x64bfc
cmpq $0x0, 0x40(%rsp)
jne 0x64c0c
movl $0x0, 0x84(%rsp)
jmp 0x64def
movq 0x40(%rsp), %rax
movl $0x0, (%rax)
movq 0x48(%rsp), %rax
movl $0x0, (%rax)
jmp 0x64c3a
movq 0x30(%rsp), %rdi
movl 0x54(%rsp), %esi
addl $0x1, %esi
callq 0x64100
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movl (%rax), %ecx
movq 0x70(%rsp), %rax
movl %ecx, 0x20(%rax)
movq 0x40(%rsp), %rcx
movq 0x70(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x40(%rsp), %rax
movl $0x0, (%rax)
movq 0x78(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x68(%rsp), %rcx
movl 0x64(%rsp), %r8d
callq 0x144e0
movl %eax, 0x3c(%rsp)
movq 0x78(%rsp), %rax
movq 0x4780(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq 0xa8(%rax), %rax
movq %rax, 0x28(%rsp)
movl 0x60(%rsp), %eax
movl %eax, 0x10(%rsp)
cmpl $0x1, 0x5c(%rsp)
jge 0x64cc0
movl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x64cc8
movl 0x5c(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0x10(%rsp), %ecx
movl 0xc(%rsp), %eax
imull %eax, %ecx
movq 0x70(%rsp), %rax
movl %ecx, 0xc(%rax)
movq 0x70(%rsp), %rax
movl 0x20(%rax), %eax
cvtsi2ss %rax, %xmm1
cvtsi2ssl 0x60(%rsp), %xmm0
divss %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x64d05
xorps %xmm0, %xmm0
movss %xmm0, 0x8(%rsp)
jmp 0x64d22
movq 0x70(%rsp), %rax
movl 0x20(%rax), %eax
cvtsi2ss %rax, %xmm0
cvtsi2ssl 0x60(%rsp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, 0x8(%rsp)
movss 0x8(%rsp), %xmm0
cvttss2si %xmm0, %ecx
movq 0x70(%rsp), %rax
movl %ecx, (%rax)
movq 0x28(%rsp), %rax
movss 0x50(%rax), %xmm0
cvtsi2ssl 0x60(%rsp), %xmm1
divss %xmm1, %xmm0
callq 0x64e00
cmpl $0x0, %eax
jge 0x64d59
xorl %eax, %eax
movl %eax, 0x4(%rsp)
jmp 0x64d76
movq 0x28(%rsp), %rax
movss 0x50(%rax), %xmm0
cvtsi2ssl 0x60(%rsp), %xmm1
divss %xmm1, %xmm0
callq 0x64e00
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %ecx
movq 0x70(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x70(%rsp), %rax
movl 0x8(%rax), %eax
movl 0x5c(%rsp), %ecx
movq 0x70(%rsp), %rdx
subl (%rdx), %ecx
cmpl %ecx, %eax
jge 0x64da6
movq 0x70(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, (%rsp)
jmp 0x64db4
movl 0x5c(%rsp), %eax
movq 0x70(%rsp), %rcx
subl (%rcx), %eax
movl %eax, (%rsp)
movl (%rsp), %ecx
movq 0x70(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x70(%rsp), %rax
movl (%rax), %ecx
movq 0x70(%rsp), %rax
addl 0x8(%rax), %ecx
movq 0x70(%rsp), %rax
movl %ecx, 0x4(%rax)
movq 0x78(%rsp), %rcx
movq 0x70(%rsp), %rax
movq %rcx, 0x10(%rax)
movl 0x3c(%rsp), %eax
movl %eax, 0x84(%rsp)
movl 0x84(%rsp), %eax
addq $0x88, %rsp
retq
nop