// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui.cpp
// Function: ImGui::Render()
void ImGui::Render()
{
    ImGuiState& g = *GImGui;
    IM_ASSERT(g.Initialized);   // Forgot to call ImGui::NewFrame()

    if (g.FrameCountEnded != g.FrameCount)
        ImGui::EndFrame();
    g.FrameCountRendered = g.FrameCount;

    // Skip render altogether if alpha is 0.0
    // Note that vertex buffers have been created and are wasted, so it is best practice that you don't create windows in the first place, or consistently respond to Begin() returning false.
    if (g.Style.Alpha > 0.0f)
    {
        // Render tooltip
        if (g.Tooltip[0])
        {
            ImGui::BeginTooltip();
            ImGui::TextUnformatted(g.Tooltip);
            ImGui::EndTooltip();
        }

        // Gather windows to render
        g.IO.MetricsRenderVertices = g.IO.MetricsRenderIndices = g.IO.MetricsActiveWindows = 0;
        for (int i = 0; i < IM_ARRAYSIZE(g.RenderDrawLists); i++)
            g.RenderDrawLists[i].resize(0);
        for (int i = 0; i != g.Windows.Size; i++)
        {
            ImGuiWindow* window = g.Windows[i];
            if (window->Active && window->HiddenFrames <= 0 && (window->Flags & (ImGuiWindowFlags_ChildWindow)) == 0)
            {
                // FIXME: Generalize this with a proper layering system so e.g. user can draw in specific layers, below text, ..
                g.IO.MetricsActiveWindows++;
                if (window->Flags & ImGuiWindowFlags_Popup)
                    AddWindowToRenderList(g.RenderDrawLists[1], window);
                else if (window->Flags & ImGuiWindowFlags_Tooltip)
                    AddWindowToRenderList(g.RenderDrawLists[2], window);
                else
                    AddWindowToRenderList(g.RenderDrawLists[0], window);
            }
        }

        // Flatten layers
        int n = g.RenderDrawLists[0].Size;
        int flattened_size = n;
        for (int i = 1; i < IM_ARRAYSIZE(g.RenderDrawLists); i++)
            flattened_size += g.RenderDrawLists[i].Size;
        g.RenderDrawLists[0].resize(flattened_size);
        for (int i = 1; i < IM_ARRAYSIZE(g.RenderDrawLists); i++)
        {
            ImVector<ImDrawList*>& layer = g.RenderDrawLists[i];
            if (layer.empty())
                continue;
            memcpy(&g.RenderDrawLists[0][n], &layer[0], layer.Size * sizeof(ImDrawList*));
            n += layer.Size;
        }

        // Draw software mouse cursor if requested
        if (g.IO.MouseDrawCursor)
        {
            const ImGuiMouseCursorData& cursor_data = g.MouseCursorData[g.MouseCursor];
            const ImVec2 pos = g.IO.MousePos - cursor_data.HotOffset;
            const ImVec2 size = cursor_data.Size;
            const ImTextureID tex_id = g.IO.Fonts->TexID;
            g.OverlayDrawList.PushTextureID(tex_id);
            g.OverlayDrawList.AddImage(tex_id, pos+ImVec2(1,0), pos+ImVec2(1,0) + size, cursor_data.TexUvMin[1], cursor_data.TexUvMax[1], 0x30000000); // Shadow
            g.OverlayDrawList.AddImage(tex_id, pos+ImVec2(2,0), pos+ImVec2(2,0) + size, cursor_data.TexUvMin[1], cursor_data.TexUvMax[1], 0x30000000); // Shadow
            g.OverlayDrawList.AddImage(tex_id, pos,             pos + size,             cursor_data.TexUvMin[1], cursor_data.TexUvMax[1], 0xFF000000); // Black border
            g.OverlayDrawList.AddImage(tex_id, pos,             pos + size,             cursor_data.TexUvMin[0], cursor_data.TexUvMax[0], 0xFFFFFFFF); // White fill
            g.OverlayDrawList.PopTextureID();
        }
        if (!g.OverlayDrawList.VtxBuffer.empty())
            AddDrawListToRenderList(g.RenderDrawLists[0], &g.OverlayDrawList);

        // Setup draw data
        g.RenderDrawData.Valid = true;
        g.RenderDrawData.CmdLists = (g.RenderDrawLists[0].Size > 0) ? &g.RenderDrawLists[0][0] : NULL;
        g.RenderDrawData.CmdListsCount = g.RenderDrawLists[0].Size;
        g.RenderDrawData.TotalVtxCount = g.IO.MetricsRenderVertices;
        g.RenderDrawData.TotalIdxCount = g.IO.MetricsRenderIndices;

        // Render. If user hasn't set a callback then they may retrieve the draw data via GetDrawData()
        if (g.RenderDrawData.CmdListsCount > 0 && g.IO.RenderDrawListsFn != NULL)
            g.IO.RenderDrawListsFn(&g.RenderDrawData);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq 0x4831e(%rip), %rbx     # 0x55480
cmpb $0x0, (%rbx)
je 0xd6e7
movl 0x1730(%rbx), %eax
cmpl 0x172c(%rbx), %eax
je 0xd184
callq 0xc8c3
movl 0x172c(%rbx), %eax
movl %eax, 0x1734(%rbx)
movss 0x13e8(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0xd69f
cmpb $0x0, 0x27e0(%rbx)
je 0xd1ea
leaq 0x27e0(%rbx), %r14
movq 0x482cb(%rip), %rax     # 0x55480
leaq -0x40(%rbp), %rdx
movq $0x0, (%rdx)
movss 0x16fc(%rax), %xmm0
leaq 0x30a4f(%rip), %rdi     # 0x3dc1e
xorl %esi, %esi
movl $0x1000147, %ecx        # imm = 0x1000147
callq 0xf554
movq %r14, %rdi
xorl %esi, %esi
callq 0xd741
callq 0xdc24
movl $0x0, 0x340(%rbx)
movq $0x0, 0x338(%rbx)
leaq 0x1870(%rbx), %r14
xorl %r12d, %r12d
cmpl $0x0, 0x1874(%rbx,%r12)
jns 0xd27c
movq 0x48265(%rip), %rax     # 0x55480
incl 0x334(%rax)
xorl %edi, %edi
callq *0xd0(%rax)
movq %rax, %r15
movq 0x1878(%rbx,%r12), %rsi
movslq 0x1870(%rbx,%r12), %rdx
shlq $0x3, %rdx
movq %rax, %rdi
callq 0x7080
movq 0x1878(%rbx,%r12), %rdi
movq 0x48229(%rip), %rax     # 0x55480
testq %rdi, %rdi
je 0xd262
decl 0x334(%rax)
callq *0xd8(%rax)
movq %r15, 0x1878(%rbx,%r12)
movl $0x0, 0x1874(%rbx,%r12)
movl $0x0, 0x1870(%rbx,%r12)
addq $0x10, %r12
cmpq $0x30, %r12
jne 0xd209
movl 0x1738(%rbx), %eax
testl %eax, %eax
je 0xd30c
leaq 0x1880(%rbx), %r15
leaq 0x1890(%rbx), %r12
xorl %r13d, %r13d
cltq
cmpq %rax, %r13
jge 0xd6c8
movq 0x1740(%rbx), %rax
movq (%rax,%r13,8), %rsi
cmpb $0x1, 0x70(%rsi)
jne 0xd2fe
cmpl $0x0, 0x90(%rsi)
jg 0xd2fe
movl 0xc(%rsi), %eax
btl $0x14, %eax
jb 0xd2fe
incl 0x340(%rbx)
btl $0x18, %eax
movq %r14, %rdi
jae 0xd2f1
movq %r12, %rdi
btl $0x19, %eax
cmovbq %r15, %rdi
callq 0xdc5f
incq %r13
movl 0x1738(%rbx), %eax
cmpq %rax, %r13
jne 0xd2b1
movl 0x1870(%rbx), %r12d
movl 0x1874(%rbx), %eax
movl 0x1880(%rbx), %r13d
addl %r12d, %r13d
addl 0x1890(%rbx), %r13d
cmpl %r13d, %eax
jge 0xd3bf
testl %eax, %eax
je 0xd349
movl %eax, %r15d
shrl $0x1f, %r15d
addl %eax, %r15d
sarl %r15d
addl %eax, %r15d
jmp 0xd34f
movl $0x8, %r15d
cmpl %r13d, %r15d
cmovlel %r13d, %r15d
movslq %r15d, %rdi
shlq $0x3, %rdi
movq 0x4811c(%rip), %rax     # 0x55480
incl 0x334(%rax)
callq *0xd0(%rax)
movq 0x1878(%rbx), %rsi
movslq 0x1870(%rbx), %rdx
shlq $0x3, %rdx
movq %rax, -0x50(%rbp)
movq %rax, %rdi
callq 0x7080
movq 0x1878(%rbx), %rdi
movq 0x480e4(%rip), %rax     # 0x55480
testq %rdi, %rdi
je 0xd3a7
decl 0x334(%rax)
callq *0xd8(%rax)
movq -0x50(%rbp), %rax
movq %rax, 0x1878(%rbx)
movl %r15d, 0x1874(%rbx)
movl %r13d, 0x1870(%rbx)
xorl %r15d, %r15d
movl 0x1880(%rbx,%r15), %edx
testq %rdx, %rdx
je 0xd412
cmpl %r12d, (%r14)
jle 0xd6b1
testl %edx, %edx
jle 0xd6b1
movslq %r12d, %r12
leaq (,%r12,8), %rdi
addq 0x1878(%rbx), %rdi
movq 0x1888(%rbx,%r15), %rsi
shlq $0x3, %rdx
callq 0x7080
addl 0x1880(%rbx,%r15), %r12d
addq $0x10, %r15
cmpq $0x20, %r15
jne 0xd3c9
cmpb $0x0, 0x104(%rbx)
je 0xd61b
movslq 0x1940(%rbx), %rax
imulq $0x34, %rax, %r15
movss 0xf0(%rbx), %xmm0
movss 0xf4(%rbx), %xmm1
leaq (%rbx,%r15), %rax
addq $0x1958, %rax           # imm = 0x1958
movq %rax, -0x90(%rbp)
subss -0x10(%rax), %xmm0
movaps %xmm0, -0x70(%rbp)
subss -0xc(%rax), %xmm1
movaps %xmm1, -0xa0(%rbp)
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
leaq -0x40(%rbp), %rcx
movlps %xmm0, (%rcx)
movss -0x8(%rax), %xmm0
movaps %xmm0, -0x50(%rbp)
movss -0x4(%rax), %xmm0
movaps %xmm0, -0x80(%rbp)
movq 0x90(%rbx), %rax
movq (%rax), %rax
leaq -0x38(%rbp), %r12
movq %rax, (%r12)
leaq 0x18a8(%rbx), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x2d11e
movq (%r12), %rsi
movss 0x2feda(%rip), %xmm0    # 0x3d390
addss -0x70(%rbp), %xmm0
xorps %xmm2, %xmm2
addss -0xa0(%rbp), %xmm2
movaps %xmm2, -0xb0(%rbp)
movaps -0x50(%rbp), %xmm1
addss %xmm0, %xmm1
unpcklps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
leaq -0x30(%rbp), %rax
movlps %xmm0, (%rax)
movq %rax, %rdx
movaps -0x80(%rbp), %xmm0
addss %xmm2, %xmm0
movaps %xmm0, -0xc0(%rbp)
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
leaq -0x58(%rbp), %rax
movlps %xmm1, (%rax)
movq %rax, %rcx
leaq 0x1960(%rbx,%r15), %r12
leaq 0x1968(%rbx,%r15), %rax
movq %rax, -0x88(%rbp)
leaq 0x1970(%rbx,%r15), %r15
movl $0x30000000, %eax       # imm = 0x30000000
movl %eax, (%rsp)
movq %r13, %rdi
movq %r12, %r8
movq %r15, %r9
callq 0x3090a
leaq -0x38(%rbp), %rax
movq (%rax), %rsi
movss 0x2fe92(%rip), %xmm0    # 0x3d3d4
addss -0x70(%rbp), %xmm0
movaps -0x50(%rbp), %xmm1
addss %xmm0, %xmm1
unpcklps -0xb0(%rbp), %xmm0      # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
leaq -0x30(%rbp), %rax
movlps %xmm0, (%rax)
unpcklps -0xc0(%rbp), %xmm1      # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
leaq -0x58(%rbp), %rax
movlps %xmm1, (%rax)
movl $0x30000000, %eax       # imm = 0x30000000
movl %eax, (%rsp)
leaq -0x30(%rbp), %rdx
leaq -0x58(%rbp), %rcx
movq %r13, %rdi
movq %r12, %r8
movq %r15, %r9
callq 0x3090a
leaq -0x38(%rbp), %rax
movq (%rax), %rsi
movaps -0x70(%rbp), %xmm0
addss -0x50(%rbp), %xmm0
movaps -0xa0(%rbp), %xmm1
addss -0x80(%rbp), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
leaq -0x30(%rbp), %rax
movlps %xmm0, (%rax)
movl $0xff000000, (%rsp)     # imm = 0xFF000000
leaq -0x30(%rbp), %rcx
movq %r13, %rdi
leaq -0x40(%rbp), %rdx
movq %r12, %r8
movq %r15, %r9
callq 0x3090a
leaq -0x38(%rbp), %rax
movq (%rax), %rsi
leaq -0x40(%rbp), %rdx
movaps -0x50(%rbp), %xmm0
addss (%rdx), %xmm0
movaps -0x80(%rbp), %xmm1
addss 0x4(%rdx), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
leaq -0x30(%rbp), %rax
movlps %xmm0, (%rax)
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
leaq -0x30(%rbp), %rcx
movq %r13, %rdi
movq -0x90(%rbp), %r8
movq -0x88(%rbp), %r9
callq 0x3090a
movq %r13, %rdi
callq 0x2d1b6
cmpl $0x0, 0x18c8(%rbx)
je 0xd633
leaq 0x18a8(%rbx), %rsi
movq %r14, %rdi
callq 0xdccc
movb $0x1, 0x1850(%rbx)
movl 0x1870(%rbx), %eax
testl %eax, %eax
jle 0xd680
movq 0x1878(%rbx), %rcx
movq %rcx, 0x1858(%rbx)
movl %eax, 0x1860(%rbx)
movq 0x338(%rbx), %rax
movq %rax, 0x1864(%rbx)
movq 0xb8(%rbx), %rax
testq %rax, %rax
je 0xd69f
addq $0x1850, %rbx           # imm = 0x1850
movq %rbx, %rdi
callq *%rax
jmp 0xd69f
movq $0x0, 0x1858(%rbx)
movl %eax, 0x1860(%rbx)
movq 0x338(%rbx), %rax
movq %rax, 0x1864(%rbx)
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x31728(%rip), %rdi     # 0x3ede0
leaq 0x31404(%rip), %rsi     # 0x3eac3
leaq 0x31c49(%rip), %rcx     # 0x3f30f
jmp 0xd6dd
leaq 0x31711(%rip), %rdi     # 0x3ede0
leaq 0x313ed(%rip), %rsi     # 0x3eac3
leaq 0x31b63(%rip), %rcx     # 0x3f240
movl $0x31c, %edx            # imm = 0x31C
callq 0x7140
leaq 0x301e3(%rip), %rdi     # 0x3d8d1
leaq 0x2ffc0(%rip), %rsi     # 0x3d6b5
leaq 0x30266(%rip), %rcx     # 0x3d962
movl $0x917, %edx            # imm = 0x917
callq 0x7140