// File: /workspace/github_c_makefile_star2_O3/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, %ebp
movl %r8d, 0x14(%rsp)
movl %ecx, %r13d
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
testq %rdi, %rdi
jne 0x43f0c
movq 0x43109(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x2ceab(%rip), %rsi     # 0x70d9c
leaq 0x2cec2(%rip), %rdx     # 0x70dba
movl $0x5a1d, %ecx           # imm = 0x5A1D
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
callq 0x13780
testq %r14, %r14
jne 0x43f3d
movq 0x430d8(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x2ce7a(%rip), %rsi     # 0x70d9c
leaq 0x2ce91(%rip), %rdx     # 0x70dba
movl $0x5a1e, %ecx           # imm = 0x5A1E
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
callq 0x13780
testq %r12, %r12
je 0x44023
testq %r14, %r14
sete %al
testq %r15, %r15
sete %cl
orb %al, %cl
jne 0x4404f
cvttss2si 0x24b8(%r15), %eax
movq 0x4780(%r15), %rbx
xorl %esi, %esi
testl %eax, %eax
cmovlel %esi, %eax
movl %eax, 0x8(%rsp)
cmpb $0x0, (%r12)
je 0x43f8a
xorl %esi, %esi
cmpb $0x0, 0x1(%r12,%rsi)
leaq 0x1(%rsi), %rsi
jne 0x43f7e
movl %r13d, 0xc(%rsp)
movl %ebp, 0x10(%rsp)
movq %r12, %rdi
movl $0x2, %edx
callq 0x12560
movl %eax, %r13d
movq 0x1b8(%rbx), %rax
testq %rax, %rax
je 0x43fe3
movq %rax, %rdx
movl 0x4(%rdx), %ecx
testq %rcx, %rcx
je 0x43fd7
leaq 0xf8(%rdx), %rbp
cmpl %r13d, -0xf0(%rbp)
je 0x44056
addq $0x4, %rbp
decq %rcx
jne 0x43fc1
movq 0x1e8(%rdx), %rdx
testq %rdx, %rdx
jne 0x43fb2
movq %r15, %rdi
movq %rbx, %rsi
movl %r13d, %edx
callq 0x437e2
movq %rax, %rbp
incl %r13d
movq %r15, %rdi
movq %rbx, %rsi
movl %r13d, %edx
callq 0x437e2
movq %rax, %rbx
testq %rbp, %rbp
je 0x44150
testq %rbx, %rbx
je 0x44185
xorl %eax, %eax
movl %eax, (%rbx)
movl %eax, (%rbp)
jmp 0x44089
movq 0x42fc6(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x2cd68(%rip), %rsi     # 0x70d9c
leaq 0x2cd7f(%rip), %rdx     # 0x70dba
movl $0x5a1f, %ecx           # imm = 0x5A1F
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
callq 0x13780
xorl %eax, %eax
jmp 0x44141
movl (%rbx), %ecx
movl %ecx, (%rdx)
incl %r13d
movl 0x4(%rax), %edx
testq %rdx, %rdx
je 0x4407e
leaq 0xf8(%rax), %rbx
cmpl %r13d, -0xf0(%rbx)
je 0x44087
addq $0x4, %rbx
decq %rdx
jne 0x4406c
movq 0x1e8(%rax), %rax
jmp 0x4405d
movl %ecx, (%rax)
movl 0x8(%rsp), %r13d
addl 0x14(%rsp), %r13d
movl (%rbx), %eax
movl %eax, 0x20(%r14)
movq %rbx, 0x18(%r14)
xorl %eax, %eax
movl %eax, (%rbx)
movq %r15, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
movq %r12, %rcx
movl 0xc(%rsp), %r8d
callq 0x13350
movq 0x4780(%r15), %rcx
movq 0xa8(%rcx), %rcx
movl 0x10(%rsp), %edi
cmpl $0x2, %edi
movl $0x1, %edx
cmovgel %edi, %edx
imull %r13d, %edx
movl %edx, 0xc(%r14)
movl 0x20(%r14), %edx
cvtsi2ss %rdx, %xmm0
cvtsi2ss %r13d, %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
testl %esi, %esi
movl $0x0, %ecx
cmovlel %ecx, %esi
subl %edx, %edi
cmpl %edi, %esi
cmovll %esi, %edi
movl %edi, 0x8(%r14)
addl %edx, %edi
movl %edi, 0x4(%r14)
movq %r15, 0x10(%r14)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x42e99(%rip), %r14     # 0x86ff0
movq (%r14), %rdi
leaq 0x2cc3b(%rip), %rsi     # 0x70d9c
leaq 0x2cc52(%rip), %rdx     # 0x70dba
movl $0x5a2f, %ecx           # imm = 0x5A2F
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
testq %rbx, %rbx
jne 0x4404f
movq 0x42e64(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x2cc06(%rip), %rsi     # 0x70d9c
leaq 0x2cc1d(%rip), %rdx     # 0x70dba
movl $0x5a30, %ecx           # imm = 0x5A30
jmp 0x44040