// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui.cpp
// Function: ImGui::EndFrame()
void ImGui::EndFrame()
{
    ImGuiState& g = *GImGui;
    IM_ASSERT(g.Initialized);                       // Forgot to call ImGui::NewFrame()
    IM_ASSERT(g.FrameCountEnded != g.FrameCount);   // ImGui::EndFrame() called multiple times, or forgot to call ImGui::NewFrame() again

    g.FrameCountEnded = g.FrameCount;

    // Hide implicit "Debug" window if it hasn't been used
    IM_ASSERT(g.CurrentWindowStack.Size == 1);    // Mismatched Begin/End
    if (g.CurrentWindow && !g.CurrentWindow->Accessed)
        g.CurrentWindow->Active = false;
    ImGui::End();

    // Click to focus window and start moving (after we're done with all our widgets)
    if (!g.ActiveId)
        g.MovedWindow = NULL;
    if (g.ActiveId == 0 && g.HoveredId == 0 && g.IO.MouseClicked[0])
    {
        if (!(g.FocusedWindow && !g.FocusedWindow->WasActive && g.FocusedWindow->Active)) // Unless we just made a popup appear
        {
            if (g.HoveredRootWindow != NULL)
            {
                FocusWindow(g.HoveredWindow);
                if (!(g.HoveredWindow->Flags & ImGuiWindowFlags_NoMove))
                {
                    g.MovedWindow = g.HoveredWindow;
                    SetActiveID(g.HoveredRootWindow->MoveID, g.HoveredRootWindow);
                }
            }
            else if (g.FocusedWindow != NULL && GetFrontMostModalRootWindow() == NULL)
            {
                // Clicking on void disable focus
                FocusWindow(NULL);
            }
        }
    }

    // Sort the window list so that all child windows are after their parent
    // We cannot do that on FocusWindow() because childs may not exist yet
    g.WindowsSortBuffer.resize(0);
    g.WindowsSortBuffer.reserve(g.Windows.Size);
    for (int i = 0; i != g.Windows.Size; i++)
    {
        ImGuiWindow* window = g.Windows[i];
        if (window->Flags & ImGuiWindowFlags_ChildWindow)       // if a child is active its parent will add it
            if (window->Active)
                continue;
        AddWindowToSortedBuffer(g.WindowsSortBuffer, window);
    }
    IM_ASSERT(g.Windows.Size == g.WindowsSortBuffer.Size);  // we done something wrong
    g.Windows.swap(g.WindowsSortBuffer);

    // Clear Input data for next frame
    g.IO.MouseWheel = 0.0f;
    memset(g.IO.InputCharacters, 0, sizeof(g.IO.InputCharacters));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x48bab(%rip), %r14     # 0x55480
cmpb $0x0, (%r14)
je 0xcbc7
movl 0x172c(%r14), %eax
cmpl %eax, 0x1730(%r14)
je 0xcbe6
movl %eax, 0x1730(%r14)
cmpl $0x1, 0x1760(%r14)
jne 0xcc05
movq 0x1758(%r14), %rax
testq %rax, %rax
je 0xc91e
cmpb $0x0, 0x72(%rax)
jne 0xc91e
movb $0x0, 0x70(%rax)
callq 0xcc43
cmpl $0x0, 0x1790(%r14)
jne 0xc9e9
movq $0x0, 0x17a8(%r14)
cmpl $0x0, 0x1788(%r14)
jne 0xc9e9
cmpb $0x1, 0x354(%r14)
jne 0xc9e9
movq 0x1770(%r14), %rax
testq %rax, %rax
je 0xc998
cmpb $0x0, 0x71(%rax)
jne 0xc970
cmpb $0x0, 0x70(%rax)
jne 0xc9e9
cmpq $0x0, 0x1780(%r14)
jne 0xc9a2
callq 0xc3d3
testq %rax, %rax
jne 0xc9e9
movq 0x48af5(%rip), %rax     # 0x55480
movq $0x0, 0x1770(%rax)
jmp 0xc9e9
cmpq $0x0, 0x1780(%r14)
je 0xc9e9
movq 0x1778(%r14), %rdi
callq 0xce68
movq 0x1778(%r14), %rax
testb $0x4, 0xc(%rax)
jne 0xc9e9
movq %rax, 0x17a8(%r14)
movq 0x1780(%r14), %rax
movl 0x48(%rax), %ecx
movq 0x48aad(%rip), %rdx     # 0x55480
movl %ecx, 0x1790(%rdx)
movw $0x1, 0x1799(%rdx)
movq %rax, 0x17a0(%rdx)
movl 0x174c(%r14), %r12d
testl %r12d, %r12d
jns 0xca5b
movq 0x48a84(%rip), %rax     # 0x55480
incl 0x334(%rax)
xorl %r12d, %r12d
xorl %edi, %edi
callq *0xd0(%rax)
movq %rax, %rbx
movq 0x1750(%r14), %rsi
movslq 0x1748(%r14), %rdx
shlq $0x3, %rdx
movq %rax, %rdi
callq 0x7080
movq 0x1750(%r14), %rdi
movq 0x48a48(%rip), %rax     # 0x55480
testq %rdi, %rdi
je 0xca43
decl 0x334(%rax)
callq *0xd8(%rax)
movq %rbx, 0x1750(%r14)
movl $0x0, 0x174c(%r14)
movl $0x0, 0x1748(%r14)
movl 0x1738(%r14), %r15d
cmpl %r15d, %r12d
jge 0xcade
leaq (,%r15,8), %rdi
movq 0x489ff(%rip), %rax     # 0x55480
incl 0x334(%rax)
callq *0xd0(%rax)
movq %rax, %rbx
movq 0x1750(%r14), %rsi
movslq 0x1748(%r14), %rdx
shlq $0x3, %rdx
movq %rax, %rdi
callq 0x7080
movq 0x1750(%r14), %rdi
movq 0x489c8(%rip), %rax     # 0x55480
testq %rdi, %rdi
je 0xcac3
decl 0x334(%rax)
callq *0xd8(%rax)
movq %rbx, 0x1750(%r14)
movl %r15d, 0x174c(%r14)
movl 0x1738(%r14), %r15d
leaq 0x1748(%r14), %rbx
testl %r15d, %r15d
je 0xcb2c
xorl %r12d, %r12d
movslq %r15d, %rax
cmpq %rax, %r12
jge 0xcba8
movq 0x1740(%r14), %rax
movq (%rax,%r12,8), %rsi
testb $0x10, 0xe(%rsi)
je 0xcb10
cmpb $0x0, 0x70(%rsi)
jne 0xcb1f
movq %rbx, %rdi
callq 0xd017
movl 0x1738(%r14), %r15d
incq %r12
movl %r15d, %eax
cmpq %rax, %r12
jne 0xcaed
jmp 0xcb2f
xorl %r15d, %r15d
cmpl (%rbx), %r15d
jne 0xcc24
movl %r15d, 0x1738(%r14)
movl 0x174c(%r14), %eax
movl 0x173c(%r14), %ecx
movl %ecx, 0x174c(%r14)
movl %eax, 0x173c(%r14)
movq 0x1750(%r14), %rax
movq 0x1740(%r14), %rcx
movq %rcx, 0x1750(%r14)
movq %rax, 0x1740(%r14)
movl $0x0, 0x100(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x308(%r14)
movups %xmm0, 0x318(%r14)
movw $0x0, 0x328(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x32231(%rip), %rdi     # 0x3ede0
leaq 0x31f0d(%rip), %rsi     # 0x3eac3
leaq 0x32683(%rip), %rcx     # 0x3f240
movl $0x31c, %edx            # imm = 0x31C
callq 0x7140
leaq 0x30d03(%rip), %rdi     # 0x3d8d1
leaq 0x30ae0(%rip), %rsi     # 0x3d6b5
leaq 0x30d03(%rip), %rcx     # 0x3d8df
movl $0x8dd, %edx            # imm = 0x8DD
callq 0x7140
leaq 0x30d09(%rip), %rdi     # 0x3d8f6
leaq 0x30ac1(%rip), %rsi     # 0x3d6b5
leaq 0x30ce4(%rip), %rcx     # 0x3d8df
movl $0x8de, %edx            # imm = 0x8DE
callq 0x7140
leaq 0x30d0c(%rip), %rdi     # 0x3d918
leaq 0x30aa2(%rip), %rsi     # 0x3d6b5
leaq 0x30cc5(%rip), %rcx     # 0x3d8df
movl $0x8e3, %edx            # imm = 0x8E3
callq 0x7140
leaq 0x30d0c(%rip), %rdi     # 0x3d937
leaq 0x30a83(%rip), %rsi     # 0x3d6b5
leaq 0x30ca6(%rip), %rcx     # 0x3d8df
movl $0x90c, %edx            # imm = 0x90C
callq 0x7140