// File: /workspace/github_cpp_makefile_star2_O3/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 0xa699f(%rip), %r15     # 0xfbcd0
cmpl $0x0, 0x1ab8(%r15)
jle 0x5558c
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x62671(%rip), %r12     # 0xb79bd
movq 0x20a8(%r15), %rax
testq %rax, %rax
je 0x5538e
movq 0x1c8(%rax), %rcx
movq 0x1ae0(%r15), %rdx
cmpq %rdx, %rcx
je 0x55374
cmpq %rdx, 0x1d0(%rax)
jne 0x5538e
testq %r14, %r14
je 0x55387
movq (%rcx), %rdx
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq *%r14
callq 0x891e4
jmp 0x5534c
movq 0x1ae0(%r15), %r13
testq %r13, %r13
je 0x555ba
cmpq $0x0, 0x2108(%r15)
je 0x553e4
testq %r14, %r14
je 0x553c0
movq (%r13), %rdx
movq %rbx, %rdi
leaq 0x62682(%rip), %rsi     # 0xb7a3d
xorl %eax, %eax
callq *%r14
callq 0xa3eca
jmp 0x5539e
testq %r14, %r14
je 0x553df
movq (%r13), %rdx
movq %rbx, %rdi
leaq 0x6268e(%rip), %rsi     # 0xb7a68
xorl %eax, %eax
callq *%r14
callq 0xa1609
cmpl $0x0, 0x18c(%r13)
jg 0x553c7
jmp 0x5540d
testq %r14, %r14
je 0x55408
movq (%r13), %rdx
movq %rbx, %rdi
leaq 0x6268e(%rip), %rsi     # 0xb7a91
xorl %eax, %eax
callq *%r14
callq 0x55617
movswl 0x202(%r13), %eax
cmpl %eax, 0x1c60(%r15)
jg 0x553f0
cmpl $0x2, 0xc8(%r13)
jl 0x55497
testq %r14, %r14
je 0x55440
movq (%r13), %rdx
movq %rbx, %rdi
leaq 0x62680(%rip), %rsi     # 0xb7abb
xorl %eax, %eax
callq *%r14
callq 0x55082
cmpl $0x1, 0xc8(%r13)
jg 0x55428
jmp 0x55497
testq %r14, %r14
je 0x5548d
testl %eax, %eax
jle 0x5559b
movq (%r13), %r12
movq 0x1c18(%r15), %rcx
movl %eax, %eax
leaq (%rax,%rax,4), %rax
movl -0x14(%rcx,%rax,4), %edi
callq 0x44404
movq %rbx, %rdi
leaq 0x62660(%rip), %rsi     # 0xb7ae2
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq *%r14
movl $0x1, %edi
callq 0x43f55
movl 0x1c10(%r15), %eax
movswl 0x1fa(%r13), %ecx
cmpl %ecx, %eax
jg 0x55451
jmp 0x554ce
testq %r14, %r14
je 0x554c4
movq (%r13), %rdx
movq %rbx, %rdi
leaq 0x62662(%rip), %rsi     # 0xb7b21
xorl %eax, %eax
callq *%r14
movl $0x1, %edi
callq 0x44325
movswl 0x1fc(%r13), %eax
cmpl %eax, 0x1c20(%r15)
jg 0x554ac
jmp 0x554fe
testq %r14, %r14
je 0x554f9
movq (%r13), %rdx
movq %rbx, %rdi
leaq 0x6265a(%rip), %rsi     # 0xb7b4e
xorl %eax, %eax
callq *%r14
callq 0x5491c
movswl 0x200(%r13), %eax
cmpl %eax, 0x1c40(%r15)
jg 0x554e1
cmpl $0x1, 0x1ab8(%r15)
movq 0x1ae0(%r15), %rax
je 0x55583
cmpq %rax, %r13
jne 0x555d9
testb $0x1, 0xf(%r13)
jne 0x5554f
testq %r14, %r14
je 0x55548
movq (%r13), %rdx
movq %rbx, %rdi
leaq 0x62687(%rip), %rsi     # 0xb7bca
xorl %eax, %eax
callq *%r14
callq 0x50af3
jmp 0x5556c
testq %r14, %r14
je 0x55567
movq (%r13), %rdx
movq %rbx, %rdi
leaq 0x6263d(%rip), %rsi     # 0xb7b9f
xorl %eax, %eax
callq *%r14
callq 0x52109
cmpl $0x0, 0x1ab8(%r15)
leaq 0x62442(%rip), %r12     # 0xb79bd
jg 0x5534c
jmp 0x5558c
cmpb $0x0, 0x96(%rax)
je 0x555f8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x78408(%rip), %rdi     # 0xcd9aa
leaq 0x640e2(%rip), %rsi     # 0xb968b
leaq 0x65359(%rip), %rcx     # 0xba909
movl $0x666, %edx            # imm = 0x666
callq 0xc140
leaq 0x62426(%rip), %rdi     # 0xb79e7
leaq 0x60b9d(%rip), %rsi     # 0xb6165
leaq 0x62429(%rip), %rcx     # 0xb79f8
movl $0x1b7f, %edx           # imm = 0x1B7F
callq 0xc140
leaq 0x79c4e(%rip), %rdi     # 0xcf22e
leaq 0x60b7e(%rip), %rsi     # 0xb6165
leaq 0x6240a(%rip), %rcx     # 0xb79f8
movl $0x1ba8, %edx           # imm = 0x1BA8
callq 0xc140
leaq 0x6257e(%rip), %rdi     # 0xb7b7d
leaq 0x60b5f(%rip), %rsi     # 0xb6165
leaq 0x623eb(%rip), %rcx     # 0xb79f8
movl $0x1ba5, %edx           # imm = 0x1BA5
callq 0xc140