// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::ListBoxHeader(char const*, ImVec2 const&)
bool ImGui::ListBoxHeader(const char* label, const ImVec2& size_arg)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = GetCurrentWindow();
    if (window->SkipItems)
        return false;

    const ImGuiStyle& style = g.Style;
    const ImGuiID id = GetID(label);
    const ImVec2 label_size = CalcTextSize(label, NULL, true);

    // Size default to hold ~7 items. Fractional number of items helps seeing that we can scroll down/up without looking at scrollbar.
    ImVec2 size = CalcItemSize(size_arg, CalcItemWidth(), GetTextLineHeightWithSpacing() * 7.4f + style.ItemSpacing.y);
    ImVec2 frame_size = ImVec2(size.x, ImMax(size.y, label_size.y));
    ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + frame_size);
    ImRect bb(frame_bb.Min, frame_bb.Max + ImVec2(label_size.x > 0.0f ? style.ItemInnerSpacing.x + label_size.x : 0.0f, 0.0f));
    window->DC.LastItemRect = bb; // Forward storage for ListBoxFooter.. dodgy.
    g.NextItemData.ClearFlags();

    if (!IsRectVisible(bb.Min, bb.Max))
    {
        ItemSize(bb.GetSize(), style.FramePadding.y);
        ItemAdd(bb, 0, &frame_bb);
        return false;
    }

    BeginGroup();
    if (label_size.x > 0)
        RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label);

    BeginChildFrame(id, frame_bb.GetSize());
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
leaq 0x5a387(%rip), %rax     # 0xe3ce0
movq (%rax), %r12
movq 0x1ae0(%r12), %r13
movb $0x1, 0x90(%r13)
cmpb $0x0, 0x93(%r13)
je 0x8997e
xorl %r15d, %r15d
jmp 0x89b55
movq %rsi, %r15
movq %rdi, %r14
callq 0x43030
movl %eax, -0x34(%rbp)
pushq $0x1
popq %rdx
movss 0x12659(%rip), %xmm0    # 0x9bff0
movq %r14, %rdi
xorl %esi, %esi
callq 0x365e8
movaps %xmm0, -0x70(%rbp)
movsd (%r15), %xmm0
movaps %xmm0, -0x50(%rbp)
callq 0x43d17
movss %xmm0, -0x60(%rbp)
callq 0x43eac
movaps %xmm0, %xmm2
mulss 0x2e764(%rip), %xmm2    # 0xb812c
addss 0x15ac(%r12), %xmm2
movaps -0x50(%rbp), %xmm0
movss -0x60(%rbp), %xmm1
callq 0x43dc5
movss 0xd8(%r13), %xmm3
addss %xmm0, %xmm3
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movaps -0x70(%rbp), %xmm5
movaps %xmm5, %xmm1
shufps $0x55, %xmm5, %xmm1     # xmm1 = xmm1[1,1],xmm5[1,1]
movaps %xmm1, %xmm4
cmpless %xmm0, %xmm4
movaps %xmm4, %xmm2
andnps %xmm1, %xmm2
andps %xmm0, %xmm4
orps %xmm2, %xmm4
addss 0xdc(%r13), %xmm4
movaps %xmm3, %xmm0
unpcklps %xmm4, %xmm0            # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1]
movq 0xd8(%r13), %rbx
movq %rbx, -0x98(%rbp)
movlps %xmm0, -0x90(%rbp)
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm5
xorps %xmm1, %xmm1
jbe 0x89a4e
movss 0x15b0(%r12), %xmm1
addss -0x70(%rbp), %xmm1
movaps %xmm3, -0x50(%rbp)
addss %xmm3, %xmm1
movaps %xmm4, -0x60(%rbp)
addss %xmm4, %xmm0
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
leaq -0x80(%rbp), %rsi
movq %rbx, -0x8(%rsi)
movlps %xmm1, (%rsi)
movq -0x8(%rsi), %rax
movq %rax, 0x12c(%r13)
movq (%rsi), %rax
movq %rax, 0x134(%r13)
andl $0x0, 0x1bf8(%r12)
leaq -0x88(%rbp), %rdi
callq 0x430df
movl %eax, %r15d
testb %al, %al
je 0x89b11
movq %rbx, %rax
shrq $0x20, %rax
movl %eax, -0x2c(%rbp)
movl %ebx, -0x30(%rbp)
callq 0x43ff2
xorps %xmm0, %xmm0
movaps -0x70(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x89ae9
movss 0x15b0(%r12), %xmm0
addss -0x50(%rbp), %xmm0
movss 0x159c(%r12), %xmm1
addss -0x2c(%rbp), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
pushq $0x1
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x36156
movaps -0x50(%rbp), %xmm0
subss -0x30(%rbp), %xmm0
movaps -0x60(%rbp), %xmm1
subss -0x2c(%rbp), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
leaq -0x78(%rbp), %rsi
movlps %xmm0, (%rsi)
movl -0x34(%rbp), %edi
xorl %edx, %edx
callq 0x41204
jmp 0x89b55
leaq -0x88(%rbp), %rbx
movss 0x8(%rbx), %xmm0
movss 0xc(%rbx), %xmm1
subss (%rbx), %xmm0
subss 0x4(%rbx), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
leaq -0x78(%rbp), %rdi
movlps %xmm0, (%rdi)
movss 0x159c(%r12), %xmm0
callq 0x40d3b
leaq -0x98(%rbp), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x40ea5
movl %r15d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq