// File: /workspace/github_cpp_makefile_star2_O2/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
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0xa0a54(%rip), %r13     # 0xe3ce0
leaq 0x1c10(%r13), %rax
movq %rax, -0x30(%rbp)
pushq $0x1
popq %r12
movq %r13, -0x38(%rbp)
cmpl $0x0, 0x1ab8(%r13)
jle 0x434bf
movq 0x20a8(%r13), %rcx
movq 0x1ae0(%r13), %r15
testq %rcx, %rcx
je 0x432f3
movq 0x1c8(%rcx), %rax
cmpq %r15, %rax
je 0x432d5
cmpq %r15, 0x1d0(%rcx)
jne 0x432f3
testq %r14, %r14
je 0x432ec
movq (%rax), %rdx
movq %rbx, %rdi
leaq 0x5b706(%rip), %rsi     # 0x9e9ed
xorl %eax, %eax
callq *%r14
callq 0x72b76
jmp 0x432ad
testq %r15, %r15
je 0x434ce
cmpq $0x0, 0x2108(%r13)
je 0x43340
testq %r14, %r14
je 0x4331d
movq (%r15), %rdx
movq %rbx, %rdi
leaq 0x5b755(%rip), %rsi     # 0x9ea6d
xorl %eax, %eax
callq *%r14
callq 0x8bbdb
jmp 0x432fc
testq %r14, %r14
je 0x4333b
movq (%r15), %rdx
movq %rbx, %rdi
leaq 0x5b762(%rip), %rsi     # 0x9ea98
xorl %eax, %eax
callq *%r14
callq 0x89637
cmpl $0x0, 0x18c(%r15)
jg 0x43324
jmp 0x43368
testq %r14, %r14
je 0x43363
movq (%r15), %rdx
movq %rbx, %rdi
leaq 0x5b763(%rip), %rsi     # 0x9eac1
xorl %eax, %eax
callq *%r14
callq 0x4352b
movswl 0x202(%r15), %eax
cmpl %eax, 0x1c60(%r13)
jg 0x4334c
jmp 0x43397
testq %r14, %r14
je 0x43392
movq (%r15), %rdx
movq %rbx, %rdi
leaq 0x5b75e(%rip), %rsi     # 0x9eaeb
xorl %eax, %eax
callq *%r14
callq 0x42fea
cmpl $0x1, 0xc8(%r15)
jg 0x4337b
jmp 0x433e2
testq %r14, %r14
je 0x433da
movl %r12d, %r13d
movq (%r15), %r12
movq -0x30(%rbp), %rdi
callq 0x49dce
movl (%rax), %edi
callq 0x360ea
movq %rbx, %rdi
leaq 0x5b74a(%rip), %rsi     # 0x9eb12
movq %r12, %rdx
movl %r13d, %r12d
movq -0x38(%rbp), %r13
movq %rax, %rcx
xorl %eax, %eax
callq *%r14
movl %r12d, %edi
callq 0x35eb4
movswl 0x1fa(%r15), %eax
movq -0x30(%rbp), %rcx
cmpl %eax, (%rcx)
jg 0x433a3
jmp 0x43413
testq %r14, %r14
je 0x4340b
movq (%r15), %rdx
movq %rbx, %rdi
leaq 0x5b74b(%rip), %rsi     # 0x9eb51
xorl %eax, %eax
callq *%r14
movl %r12d, %edi
callq 0x3605c
movswl 0x1fc(%r15), %eax
cmpl %eax, 0x1c20(%r13)
jg 0x433f4
jmp 0x43442
testq %r14, %r14
je 0x4343d
movq (%r15), %rdx
movq %rbx, %rdi
leaq 0x5b746(%rip), %rsi     # 0x9eb7e
xorl %eax, %eax
callq *%r14
callq 0x42c07
movswl 0x200(%r15), %eax
cmpl %eax, 0x1c40(%r13)
jg 0x43426
cmpl $0x1, 0x1ab8(%r13)
movq 0x1ae0(%r13), %rax
je 0x434b6
cmpq %rax, %r15
jne 0x434ed
testb $0x1, 0xf(%r15)
jne 0x43495
testq %r14, %r14
je 0x4348b
movq (%r15), %rdx
movq %rbx, %rdi
leaq 0x5b774(%rip), %rsi     # 0x9ebfa
xorl %eax, %eax
callq *%r14
callq 0x3f958
jmp 0x4329f
testq %r14, %r14
je 0x434ac
movq (%r15), %rdx
movq %rbx, %rdi
leaq 0x5b728(%rip), %rsi     # 0x9ebcf
xorl %eax, %eax
callq *%r14
callq 0x40b4b
jmp 0x4329f
cmpb $0x0, 0x96(%rax)
je 0x4350c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5b542(%rip), %rdi     # 0x9ea17
leaq 0x59cb9(%rip), %rsi     # 0x9d195
leaq 0x5b545(%rip), %rcx     # 0x9ea28
movl $0x1b7f, %edx           # imm = 0x1B7F
callq 0xc140
leaq 0x72fb6(%rip), %rdi     # 0xb64aa
leaq 0x59c9a(%rip), %rsi     # 0x9d195
leaq 0x5b526(%rip), %rcx     # 0x9ea28
movl $0x1ba8, %edx           # imm = 0x1BA8
callq 0xc140
leaq 0x5b69a(%rip), %rdi     # 0x9ebad
leaq 0x59c7b(%rip), %rsi     # 0x9d195
leaq 0x5b507(%rip), %rcx     # 0x9ea28
movl $0x1ba5, %edx           # imm = 0x1BA5
callq 0xc140