// File: /workspace/github_cpp_makefile_star2_O3/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 0xab1cf(%rip), %r14     # 0xfbcd0
movq 0x1ae0(%r14), %rbx
movl 0x1ab8(%r14), %eax
cmpl $0x1, %eax
jg 0x50b2b
cmpb $0x1, 0x1a75(%r14)
je 0x50c01
cmpl $0x1, %eax
jne 0x50c20
testb $0x1, 0xf(%rbx)
je 0x50b3f
cmpb $0x0, 0x1a76(%r14)
je 0x50c3f
cmpq $0x0, 0x1b0(%rbx)
je 0x50b4e
callq 0x8f3f4
callq 0x4ff37
testb $0x1, 0xf(%rbx)
jne 0x50b5e
callq 0x53716
movl 0x1ab8(%r14), %eax
testl %eax, %eax
jle 0x50bc8
decl %eax
movl %eax, 0x1ab8(%r14)
testb $0x4, 0xf(%rbx)
je 0x50b90
movl 0x1c80(%r14), %eax
testl %eax, %eax
jle 0x50c5e
decl %eax
movl %eax, 0x1c80(%r14)
addq $0x1f8, %rbx            # imm = 0x1F8
movq %rbx, %rdi
callq 0x53804
movl 0x1ab8(%r14), %eax
testq %rax, %rax
je 0x50bbd
testl %eax, %eax
jle 0x50be2
movq 0x1ac0(%r14), %rcx
movq -0x8(%rcx,%rax,8), %rdi
jmp 0x50bbf
xorl %edi, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x5312b
leaq 0x7cddb(%rip), %rdi     # 0xcd9aa
leaq 0x68ab5(%rip), %rsi     # 0xb968b
leaq 0x6a071(%rip), %rcx     # 0xbac4e
jmp 0x50c73
leaq 0x7cdc1(%rip), %rdi     # 0xcd9aa
leaq 0x68a9b(%rip), %rsi     # 0xb968b
leaq 0x69f95(%rip), %rcx     # 0xbab8c
movl $0x666, %edx            # imm = 0x666
callq 0xc140
leaq 0x666a0(%rip), %rdi     # 0xb72a8
leaq 0x65556(%rip), %rsi     # 0xb6165
leaq 0x666d5(%rip), %rcx     # 0xb72eb
movl $0x182e, %edx           # imm = 0x182E
callq 0xc140
leaq 0x666d6(%rip), %rdi     # 0xb72fd
leaq 0x65537(%rip), %rsi     # 0xb6165
leaq 0x666b6(%rip), %rcx     # 0xb72eb
movl $0x1831, %edx           # imm = 0x1831
callq 0xc140
leaq 0x666d5(%rip), %rdi     # 0xb731b
leaq 0x65518(%rip), %rsi     # 0xb6165
leaq 0x66697(%rip), %rcx     # 0xb72eb
movl $0x1835, %edx           # imm = 0x1835
callq 0xc140
leaq 0x7cd45(%rip), %rdi     # 0xcd9aa
leaq 0x68a1f(%rip), %rsi     # 0xb968b
leaq 0x6a018(%rip), %rcx     # 0xbac8b
movl $0x672, %edx            # imm = 0x672
callq 0xc140