// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::ErrorCheckEndFrameRecover(void (*)(void*, char const*, ...), void*)
void    ImGui::ErrorCheckEndFrameRecover(ImGuiErrorLogCallback log_callback, void* user_data)
{
    // PVS-Studio V1044 is "Loop break conditions do not depend on the number of iterations"
    ImGuiContext& g = *GImGui;
    while (g.CurrentWindowStack.Size > 0)
    {
#ifdef IMGUI_HAS_TABLE
        while (g.CurrentTable && (g.CurrentTable->OuterWindow == g.CurrentWindow || g.CurrentTable->InnerWindow == g.CurrentWindow))
        {
            if (log_callback) log_callback(user_data, "Recovered from missing EndTable() in '%s'", g.CurrentTable->OuterWindow->Name);
            EndTable();
        }
#endif
        ImGuiWindow* window = g.CurrentWindow;
        IM_ASSERT(window != NULL);
        while (g.CurrentTabBar != NULL) //-V1044
        {
            if (log_callback) log_callback(user_data, "Recovered from missing EndTabBar() in '%s'", window->Name);
            EndTabBar();
        }
        while (window->DC.TreeDepth > 0)
        {
            if (log_callback) log_callback(user_data, "Recovered from missing TreePop() in '%s'", window->Name);
            TreePop();
        }
        while (g.GroupStack.Size > window->DC.StackSizesOnBegin.SizeOfGroupStack)
        {
            if (log_callback) log_callback(user_data, "Recovered from missing EndGroup() in '%s'", window->Name);
            EndGroup();
        }
        while (window->IDStack.Size > 1)
        {
            if (log_callback) log_callback(user_data, "Recovered from missing PopID() in '%s'", window->Name);
            PopID();
        }
        while (g.ColorStack.Size > window->DC.StackSizesOnBegin.SizeOfColorStack)
        {
            if (log_callback) log_callback(user_data, "Recovered from missing PopStyleColor() in '%s' for ImGuiCol_%s", window->Name, GetStyleColorName(g.ColorStack.back().Col));
            PopStyleColor();
        }
        while (g.StyleVarStack.Size > window->DC.StackSizesOnBegin.SizeOfStyleVarStack)
        {
            if (log_callback) log_callback(user_data, "Recovered from missing PopStyleVar() in '%s'", window->Name);
            PopStyleVar();
        }
        while (g.FocusScopeStack.Size > window->DC.StackSizesOnBegin.SizeOfFocusScopeStack)
        {
            if (log_callback) log_callback(user_data, "Recovered from missing PopFocusScope() in '%s'", window->Name);
            PopFocusScope();
        }
        if (g.CurrentWindowStack.Size == 1)
        {
            IM_ASSERT(g.CurrentWindow->IsFallbackWindow);
            break;
        }
        IM_ASSERT(window == g.CurrentWindow);
        if (window->Flags & ImGuiWindowFlags_ChildWindow)
        {
            if (log_callback) log_callback(user_data, "Recovered from missing EndChild() for '%s'", window->Name);
            EndChild();
        }
        else
        {
            if (log_callback) log_callback(user_data, "Recovered from missing End() for '%s'", window->Name);
            End();
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0xa788f(%rip), %r15     # 0xfdcd0
leaq 0x63575(%rip), %r12     # 0xb99bd
cmpl $0x0, 0x1ab8(%r15)
jle 0x56698
movq 0x20a8(%r15), %rax
testq %rax, %rax
je 0x56498
movq 0x1c8(%rax), %rcx
movq 0x1ae0(%r15), %rdx
cmpq %rdx, %rcx
je 0x5647e
cmpq %rdx, 0x1d0(%rax)
jne 0x56498
testq %r14, %r14
je 0x56491
movq (%rcx), %rdx
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq *%r14
callq 0x8ae29
jmp 0x56456
movq 0x1ae0(%r15), %r13
testq %r13, %r13
je 0x566c6
cmpq $0x0, 0x2108(%r15)
je 0x564ee
testq %r14, %r14
je 0x564ca
movq (%r13), %rdx
movq %rbx, %rdi
leaq 0x63578(%rip), %rsi     # 0xb9a3d
xorl %eax, %eax
callq *%r14
callq 0xa5873
jmp 0x564a8
testq %r14, %r14
je 0x564e9
movq (%r13), %rdx
movq %rbx, %rdi
leaq 0x63584(%rip), %rsi     # 0xb9a68
xorl %eax, %eax
callq *%r14
callq 0xa2f4e
cmpl $0x0, 0x18c(%r13)
jg 0x564d1
jmp 0x56517
testq %r14, %r14
je 0x56512
movq (%r13), %rdx
movq %rbx, %rdi
leaq 0x63584(%rip), %rsi     # 0xb9a91
xorl %eax, %eax
callq *%r14
callq 0x56723
movswl 0x202(%r13), %eax
cmpl %eax, 0x1c60(%r15)
jg 0x564fa
cmpl $0x2, 0xc8(%r13)
jl 0x565a1
testq %r14, %r14
je 0x5654a
movq (%r13), %rdx
movq %rbx, %rdi
leaq 0x63576(%rip), %rsi     # 0xb9abb
xorl %eax, %eax
callq *%r14
callq 0x56188
cmpl $0x1, 0xc8(%r13)
jg 0x56532
jmp 0x565a1
testq %r14, %r14
je 0x56597
testl %eax, %eax
jle 0x566a7
movq (%r13), %r12
movq 0x1c18(%r15), %rcx
movl %eax, %eax
leaq (%rax,%rax,4), %rax
movl -0x14(%rcx,%rax,4), %edi
callq 0x44e52
movq %rbx, %rdi
leaq 0x63556(%rip), %rsi     # 0xb9ae2
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq *%r14
movl $0x1, %edi
callq 0x44964
movl 0x1c10(%r15), %eax
movswl 0x1fa(%r13), %ecx
cmpl %ecx, %eax
jg 0x5655b
jmp 0x565d8
testq %r14, %r14
je 0x565ce
movq (%r13), %rdx
movq %rbx, %rdi
leaq 0x63558(%rip), %rsi     # 0xb9b21
xorl %eax, %eax
callq *%r14
movl $0x1, %edi
callq 0x44d5f
movswl 0x1fc(%r13), %eax
cmpl %eax, 0x1c20(%r15)
jg 0x565b6
jmp 0x56608
testq %r14, %r14
je 0x56603
movq (%r13), %rdx
movq %rbx, %rdi
leaq 0x63550(%rip), %rsi     # 0xb9b4e
xorl %eax, %eax
callq *%r14
callq 0x559bf
movswl 0x200(%r13), %eax
cmpl %eax, 0x1c40(%r15)
jg 0x565eb
movl 0x1ab8(%r15), %r12d
movq 0x1ae0(%r15), %rax
cmpl $0x1, %r12d
jne 0x5663b
cmpb $0x0, 0x96(%rax)
jne 0x56687
jmp 0x56704
cmpq %rax, %r13
jne 0x566e5
testb $0x1, 0xf(%r13)
jne 0x5666a
testq %r14, %r14
je 0x56663
movq (%r13), %rdx
movq %rbx, %rdi
leaq 0x6356c(%rip), %rsi     # 0xb9bca
xorl %eax, %eax
callq *%r14
callq 0x51ace
jmp 0x56687
testq %r14, %r14
je 0x56682
movq (%r13), %rdx
movq %rbx, %rdi
leaq 0x63522(%rip), %rsi     # 0xb9b9f
xorl %eax, %eax
callq *%r14
callq 0x53104
cmpl $0x1, %r12d
leaq 0x6332b(%rip), %r12     # 0xb99bd
jne 0x56448
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7932c(%rip), %rdi     # 0xcf9da
leaq 0x64fd6(%rip), %rsi     # 0xbb68b
leaq 0x6624d(%rip), %rcx     # 0xbc909
movl $0x666, %edx            # imm = 0x666
callq 0xc140
leaq 0x6331a(%rip), %rdi     # 0xb99e7
leaq 0x61a91(%rip), %rsi     # 0xb8165
leaq 0x6331d(%rip), %rcx     # 0xb99f8
movl $0x1b7f, %edx           # imm = 0x1B7F
callq 0xc140
leaq 0x7ab72(%rip), %rdi     # 0xd125e
leaq 0x61a72(%rip), %rsi     # 0xb8165
leaq 0x632fe(%rip), %rcx     # 0xb99f8
movl $0x1ba8, %edx           # imm = 0x1BA8
callq 0xc140
leaq 0x63472(%rip), %rdi     # 0xb9b7d
leaq 0x61a53(%rip), %rsi     # 0xb8165
leaq 0x632df(%rip), %rcx     # 0xb99f8
movl $0x1ba5, %edx           # imm = 0x1BA5
callq 0xc140