// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::End()
void ImGui::End()
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;

    // Error checking: verify that user hasn't called End() too many times!
    if (g.CurrentWindowStack.Size <= 1 && g.WithinFrameScopeWithImplicitWindow)
    {
        IM_ASSERT_USER_ERROR(g.CurrentWindowStack.Size > 1, "Calling End() too many times!");
        return;
    }
    IM_ASSERT(g.CurrentWindowStack.Size > 0);

    // Error checking: verify that user doesn't directly call End() on a child window.
    if (window->Flags & ImGuiWindowFlags_ChildWindow)
        IM_ASSERT_USER_ERROR(g.WithinEndChild, "Must call EndChild() and not End()!");

    // Close anything that is open
    if (window->DC.CurrentColumns)
        EndColumns();
    PopClipRect();   // Inner window clip rectangle

    // Stop logging
    if (!(window->Flags & ImGuiWindowFlags_ChildWindow))    // FIXME: add more options for scope of logging
        LogFinish();

    // Pop from window stack
    g.CurrentWindowStack.pop_back();
    if (window->Flags & ImGuiWindowFlags_Popup)
        g.BeginPopupStack.pop_back();
    window->DC.StackSizesOnBegin.CompareWithCurrentState();
    SetCurrentWindow(g.CurrentWindowStack.empty() ? NULL : g.CurrentWindowStack.back());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0xac1f4(%rip), %r14     # 0xfdcd0
movq 0x1ae0(%r14), %rbx
movl 0x1ab8(%r14), %eax
cmpl $0x1, %eax
jg 0x51afd
cmpb $0x1, 0x1a75(%r14)
je 0x51bf7
testl %eax, %eax
jle 0x51ba2
testb $0x1, 0xf(%rbx)
je 0x51b19
cmpb $0x0, 0x1a76(%r14)
je 0x51c16
cmpq $0x0, 0x1b0(%rbx)
je 0x51b28
callq 0x91148
callq 0x50f2c
testb $0x1, 0xf(%rbx)
jne 0x51b38
callq 0x54763
movl 0x1ab8(%r14), %eax
testl %eax, %eax
jle 0x51bc1
decl %eax
movl %eax, 0x1ab8(%r14)
testb $0x4, 0xf(%rbx)
je 0x51b6a
movl 0x1c80(%r14), %eax
testl %eax, %eax
jle 0x51c35
decl %eax
movl %eax, 0x1c80(%r14)
addq $0x1f8, %rbx            # imm = 0x1F8
movq %rbx, %rdi
callq 0x54850
movl 0x1ab8(%r14), %eax
testq %rax, %rax
je 0x51b97
testl %eax, %eax
jle 0x51bd8
movq 0x1ac0(%r14), %rcx
movq -0x8(%rcx,%rax,8), %rdi
jmp 0x51b99
xorl %edi, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x5416b
leaq 0x67754(%rip), %rdi     # 0xb92fd
leaq 0x665b5(%rip), %rsi     # 0xb8165
leaq 0x67734(%rip), %rcx     # 0xb92eb
movl $0x1831, %edx           # imm = 0x1831
callq 0xc140
leaq 0x7de12(%rip), %rdi     # 0xcf9da
leaq 0x69abc(%rip), %rsi     # 0xbb68b
leaq 0x6b078(%rip), %rcx     # 0xbcc4e
jmp 0x51c4a
leaq 0x7ddfb(%rip), %rdi     # 0xcf9da
leaq 0x69aa5(%rip), %rsi     # 0xbb68b
leaq 0x6af9f(%rip), %rcx     # 0xbcb8c
movl $0x666, %edx            # imm = 0x666
callq 0xc140
leaq 0x676aa(%rip), %rdi     # 0xb92a8
leaq 0x66560(%rip), %rsi     # 0xb8165
leaq 0x676df(%rip), %rcx     # 0xb92eb
movl $0x182e, %edx           # imm = 0x182E
callq 0xc140
leaq 0x676fe(%rip), %rdi     # 0xb931b
leaq 0x66541(%rip), %rsi     # 0xb8165
leaq 0x676c0(%rip), %rcx     # 0xb92eb
movl $0x1835, %edx           # imm = 0x1835
callq 0xc140
leaq 0x7dd9e(%rip), %rdi     # 0xcf9da
leaq 0x69a48(%rip), %rsi     # 0xbb68b
leaq 0x6b041(%rip), %rcx     # 0xbcc8b
movl $0x672, %edx            # imm = 0x672
callq 0xc140