// File: /workspace/github_cpp_makefile_star2_O2/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 $0xb8, %rsp
movq 0x44d48(%rip), %r14     # 0x50480
cmpb $0x0, (%r14)
je 0xbb4a
movl 0x1730(%r14), %eax
cmpl 0x172c(%r14), %eax
je 0xb75e
callq 0xb2d3
movl 0x172c(%r14), %eax
movl %eax, 0x1734(%r14)
movss 0x13e8(%r14), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0xbb38
cmpb $0x0, 0x27e0(%r14)
movq %r14, -0x40(%rbp)
je 0xb7ab
movq -0x40(%rbp), %rax
leaq 0x27e0(%rax), %r14
callq 0xbb69
movq %r14, %rdi
movq -0x40(%rbp), %r14
xorl %esi, %esi
callq 0xbba1
callq 0xbf7a
andl $0x0, 0x340(%r14)
andq $0x0, 0x338(%r14)
leaq 0x1870(%r14), %r15
xorl %ebx, %ebx
cmpq $0x30, %rbx
je 0xb7db
leaq (%r15,%rbx), %rdi
xorl %esi, %esi
callq 0x1ea72
addq $0x10, %rbx
jmp 0xb7c4
movq %r15, -0x38(%rbp)
leaq 0x1738(%r14), %r15
leaq 0x1880(%r14), %rbx
leaq 0x1890(%r14), %r13
xorl %r12d, %r12d
cmpl (%r15), %r12d
je 0xb848
movq %r15, %rdi
movl %r12d, %esi
callq 0x1e6f4
movq (%rax), %rsi
cmpb $0x1, 0x70(%rsi)
jne 0xb843
cmpl $0x0, 0x90(%rsi)
jg 0xb843
movl 0xc(%rsi), %eax
btl $0x14, %eax
jb 0xb843
incl 0x340(%r14)
btl $0x18, %eax
movq -0x38(%rbp), %rdi
jae 0xb836
movq %r13, %rdi
btl $0x19, %eax
cmovbq %rbx, %rdi
callq 0xbfb5
incl %r12d
jmp 0xb7f7
movl 0x1870(%r14), %r15d
movl 0x1880(%r14), %esi
addl %r15d, %esi
addl 0x1890(%r14), %esi
movq -0x38(%rbp), %r13
movq %r13, %rdi
callq 0x1ea72
xorl %r14d, %r14d
cmpq $0x20, %r14
je 0xb8b9
cmpl $0x0, (%rbx,%r14)
je 0xb8b3
leaq (%rbx,%r14), %r12
movq %r13, %rdi
movl %r15d, %esi
callq 0x1eab0
movq %rax, %r13
movq %r12, %rdi
xorl %esi, %esi
callq 0x1eab0
movslq (%r12), %rdx
shlq $0x3, %rdx
movq %r13, %rdi
movq -0x38(%rbp), %r13
movq %rax, %rsi
callq 0x7080
addl (%r12), %r15d
addq $0x10, %r14
jmp 0xb86f
movq -0x40(%rbp), %r14
cmpb $0x0, 0x104(%r14)
je 0xbac2
movslq 0x1940(%r14), %rax
imulq $0x34, %rax, %rbx
movss 0xf0(%r14), %xmm0
movss 0xf4(%r14), %xmm1
leaq (%r14,%rbx), %rax
addq $0x1958, %rax           # imm = 0x1958
movq %rax, -0x90(%rbp)
subss -0x10(%rax), %xmm0
movaps %xmm0, -0x70(%rbp)
subss -0xc(%rax), %xmm1
movaps %xmm1, -0xb0(%rbp)
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
leaq -0x98(%rbp), %rcx
movlps %xmm0, (%rcx)
movss -0x8(%rax), %xmm0
movaps %xmm0, -0x60(%rbp)
movss -0x4(%rax), %xmm0
movaps %xmm0, -0x80(%rbp)
movq 0x90(%r14), %rax
movq (%rax), %rax
leaq -0x50(%rbp), %r15
movq %rax, (%r15)
leaq 0x18a8(%r14), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x27e64
movq (%r15), %rsi
movss 0x2aa35(%rip), %xmm0    # 0x36390
addss -0x70(%rbp), %xmm0
xorps %xmm2, %xmm2
addss -0xb0(%rbp), %xmm2
movaps %xmm2, -0xc0(%rbp)
movaps -0x60(%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, -0xd0(%rbp)
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
leaq -0x48(%rbp), %rax
movlps %xmm1, (%rax)
movq %rax, %rcx
leaq 0x1960(%r14,%rbx), %r12
leaq 0x1968(%r14,%rbx), %rax
movq %rax, -0x88(%rbp)
leaq 0x1970(%r14,%rbx), %r15
movl $0x30000000, %eax       # imm = 0x30000000
movl %eax, (%rsp)
movq %r13, %rdi
movq %r12, %r8
movq %r15, %r9
callq 0x2a510
leaq -0x50(%rbp), %rbx
movq (%rbx), %rsi
movss 0x2a9f1(%rip), %xmm0    # 0x363d8
addss -0x70(%rbp), %xmm0
movaps -0x60(%rbp), %xmm1
addss %xmm0, %xmm1
unpcklps -0xc0(%rbp), %xmm0      # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
leaq -0x30(%rbp), %rax
movlps %xmm0, (%rax)
unpcklps -0xd0(%rbp), %xmm1      # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
leaq -0x48(%rbp), %rax
movlps %xmm1, (%rax)
movl $0x30000000, %eax       # imm = 0x30000000
movl %eax, (%rsp)
leaq -0x30(%rbp), %rdx
leaq -0x48(%rbp), %rcx
movq %r13, %rdi
movq %r12, %r8
movq %r15, %r9
callq 0x2a510
movq (%rbx), %rsi
movaps -0x70(%rbp), %xmm0
addss -0x60(%rbp), %xmm0
movaps -0xb0(%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 -0x98(%rbp), %rbx
movq %rbx, %rdx
movq %r12, %r8
movq %r15, %r9
callq 0x2a510
leaq -0x50(%rbp), %rax
movq (%rax), %rsi
movaps -0x60(%rbp), %xmm0
addss (%rbx), %xmm0
movaps -0x80(%rbp), %xmm1
addss 0x4(%rbx), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
leaq -0x30(%rbp), %rax
movlps %xmm0, (%rax)
orl $-0x1, (%rsp)
leaq -0x30(%rbp), %rcx
movq %r13, %rdi
movq %rbx, %rdx
movq -0x90(%rbp), %r8
movq -0x88(%rbp), %r9
callq 0x2a510
movq %r13, %rdi
movq -0x38(%rbp), %r13
callq 0x27e84
cmpl $0x0, 0x18c8(%r14)
je 0xbadb
leaq 0x18a8(%r14), %rsi
movq %r13, %rdi
callq 0xc01b
movb $0x1, 0x1850(%r14)
movl 0x1870(%r14), %ecx
testl %ecx, %ecx
jle 0xbafe
movq %r13, %rdi
xorl %esi, %esi
callq 0x1eab0
movl (%r13), %ecx
jmp 0xbb00
xorl %eax, %eax
movq %rax, 0x1858(%r14)
movl %ecx, 0x1860(%r14)
movq 0x338(%r14), %rax
movq %rax, 0x1864(%r14)
testl %ecx, %ecx
jle 0xbb38
movq 0xb8(%r14), %rax
testq %rax, %rax
je 0xbb38
addq $0x1850, %r14           # imm = 0x1850
movq %r14, %rdi
callq *%rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2ad38(%rip), %rdi     # 0x36889
leaq 0x2ab15(%rip), %rsi     # 0x3666d
leaq 0x2adbb(%rip), %rcx     # 0x3691a
movl $0x917, %edx            # imm = 0x917
callq 0x7140