// File: /workspace/github_cpp_makefile_star2_O1/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 $0x58, %rsp
leaq 0x5aa10(%rip), %rax     # 0xfdcd0
movq (%rax), %r12
movq 0x1ae0(%r12), %r13
movb $0x1, 0x90(%r13)
cmpb $0x0, 0x93(%r13)
je 0xa32e5
xorl %r15d, %r15d
jmp 0xa349e
movq %rsi, %r15
movq %rdi, %r14
callq 0x561cd
movl %eax, %ebx
movss 0x13cd6(%rip), %xmm0    # 0xb6fd0
movq %r14, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x4548d
movaps %xmm0, -0x50(%rbp)
movsd (%r15), %xmm0
movaps %xmm0, -0x80(%rbp)
callq 0x57252
movss %xmm0, -0x3c(%rbp)
callq 0x573e7
movaps %xmm0, %xmm2
mulss 0x2fbbc(%rip), %xmm2    # 0xd2eec
addss 0x15ac(%r12), %xmm2
movaps -0x80(%rbp), %xmm0
movss -0x3c(%rbp), %xmm1
callq 0x57311
movss 0xd8(%r13), %xmm1
addss %xmm0, %xmm1
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movaps -0x50(%rbp), %xmm5
movaps %xmm5, %xmm2
shufps $0x55, %xmm5, %xmm2     # xmm2 = xmm2[1,1],xmm5[1,1]
movaps %xmm2, %xmm3
cmpless %xmm0, %xmm3
movaps %xmm3, %xmm4
andnps %xmm2, %xmm4
andps %xmm0, %xmm3
orps %xmm4, %xmm3
addss 0xdc(%r13), %xmm3
unpcklps %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
movq 0xd8(%r13), %rax
movq %rax, -0x38(%rbp)
movlps %xmm1, -0x30(%rbp)
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm5
xorps %xmm1, %xmm1
jbe 0xa33ad
movss 0x15b0(%r12), %xmm1
addss -0x50(%rbp), %xmm1
addss -0x30(%rbp), %xmm1
addss -0x2c(%rbp), %xmm0
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
leaq -0x60(%rbp), %rsi
movq %rax, -0x8(%rsi)
movlps %xmm1, (%rsi)
movq -0x8(%rsi), %rax
movq %rax, 0x12c(%r13)
movq (%rsi), %rax
movq %rax, 0x134(%r13)
movl $0x0, 0x1bf8(%r12)
leaq -0x68(%rbp), %rdi
callq 0x56285
movl %eax, %r15d
testb %al, %al
je 0xa3460
callq 0x5752d
xorps %xmm0, %xmm0
movaps -0x50(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jbe 0xa3437
movss -0x30(%rbp), %xmm0
addss 0x15b0(%r12), %xmm0
movss -0x34(%rbp), %xmm1
addss 0x159c(%r12), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movq %r14, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x44ec4
movss -0x30(%rbp), %xmm0
movss -0x2c(%rbp), %xmm1
subss -0x38(%rbp), %xmm0
subss -0x34(%rbp), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
leaq -0x58(%rbp), %rsi
movlps %xmm0, (%rsi)
movl %ebx, %edi
xorl %edx, %edx
callq 0x53844
jmp 0xa349e
leaq -0x68(%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 -0x58(%rbp), %rdi
movlps %xmm0, (%rdi)
movss 0x159c(%r12), %xmm0
callq 0x532de
leaq -0x38(%rbp), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5346f
movl %r15d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq