// File: Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::ErrorCheckEndFrameSanityChecks()
static void ImGui::ErrorCheckEndFrameSanityChecks()
{
    ImGuiContext& g = *GImGui;

    // Verify that io.KeyXXX fields haven't been tampered with. Key mods should not be modified between NewFrame() and EndFrame()
    // One possible reason leading to this assert is that your backends update inputs _AFTER_ NewFrame().
    // It is known that when some modal native windows called mid-frame takes focus away, some backends such as GLFW will
    // send key release events mid-frame. This would normally trigger this assertion and lead to sheared inputs.
    // We silently accommodate for this case by ignoring/ the case where all io.KeyXXX modifiers were released (aka key_mod_flags == 0),
    // while still correctly asserting on mid-frame key press events.
    const ImGuiKeyModFlags key_mod_flags = GetMergedKeyModFlags();
    IM_ASSERT((key_mod_flags == 0 || g.IO.KeyMods == key_mod_flags) && "Mismatching io.KeyCtrl/io.KeyShift/io.KeyAlt/io.KeySuper vs io.KeyMods");
    IM_UNUSED(key_mod_flags);

    // Recover from errors
    //ErrorCheckEndFrameRecover();

    // Report when there is a mismatch of Begin/BeginChild vs End/EndChild calls. Important: Remember that the Begin/BeginChild API requires you
    // to always call End/EndChild even if Begin/BeginChild returns false! (this is unfortunately inconsistent with most other Begin* API).
    if (g.CurrentWindowStack.Size != 1)
    {
        if (g.CurrentWindowStack.Size > 1)
        {
            IM_ASSERT_USER_ERROR(g.CurrentWindowStack.Size == 1, "Mismatched Begin/BeginChild vs End/EndChild calls: did you forget to call End/EndChild?");
            while (g.CurrentWindowStack.Size > 1)
                End();
        }
        else
        {
            IM_ASSERT_USER_ERROR(g.CurrentWindowStack.Size == 1, "Mismatched Begin/BeginChild vs End/EndChild calls: did you call End/EndChild too much?");
        }
    }

    IM_ASSERT_USER_ERROR(g.GroupStack.Size == 0, "Missing EndGroup call!");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x13f541(%rip), %rax    # 0x212f40
movq %rax, -0x8(%rbp)
callq 0xcc600
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0xd3a25
movq -0x8(%rbp), %rax
movl 0x3c0(%rax), %ecx
xorl %eax, %eax
cmpl -0xc(%rbp), %ecx
movb %al, -0xd(%rbp)
jne 0xd3a2c
movb $0x1, %al
movb %al, -0xd(%rbp)
jmp 0xd3a2c
movb -0xd(%rbp), %al
testb $0x1, %al
jne 0xd3a35
jmp 0xd3a37
jmp 0xd3a56
leaq 0xa3864(%rip), %rdi     # 0x1772a2
leaq 0x9f4c4(%rip), %rsi     # 0x172f09
movl $0x1b53, %edx           # imm = 0x1B53
leaq 0xa38d3(%rip), %rcx     # 0x177324
callq 0xd180
movq -0x8(%rbp), %rax
cmpl $0x1, 0x1ab8(%rax)
je 0xd3b16
movq -0x8(%rbp), %rax
cmpl $0x1, 0x1ab8(%rax)
jle 0xd3acf
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl $0x1, 0x1ab8(%rcx)
movb %al, -0xe(%rbp)
jne 0xd3a8d
movb $0x1, %al
movb %al, -0xe(%rbp)
jmp 0xd3a8d
movb -0xe(%rbp), %al
testb $0x1, %al
jne 0xd3a96
jmp 0xd3a98
jmp 0xd3ab7
leaq 0xa390a(%rip), %rdi     # 0x1773a9
leaq 0x9f463(%rip), %rsi     # 0x172f09
movl $0x1b5f, %edx           # imm = 0x1B5F
leaq 0xa3872(%rip), %rcx     # 0x177324
callq 0xd180
jmp 0xd3ab9
movq -0x8(%rbp), %rax
cmpl $0x1, 0x1ab8(%rax)
jle 0xd3acd
callq 0xd3b60
jmp 0xd3ab9
jmp 0xd3b14
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl $0x1, 0x1ab8(%rcx)
movb %al, -0xf(%rbp)
jne 0xd3ae8
movb $0x1, %al
movb %al, -0xf(%rbp)
jmp 0xd3ae8
movb -0xf(%rbp), %al
testb $0x1, %al
jne 0xd3af1
jmp 0xd3af3
jmp 0xd3b12
leaq 0xa3984(%rip), %rdi     # 0x17747e
leaq 0x9f408(%rip), %rsi     # 0x172f09
movl $0x1b65, %edx           # imm = 0x1B65
leaq 0xa3817(%rip), %rcx     # 0x177324
callq 0xd180
jmp 0xd3b14
jmp 0xd3b16
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x1c60(%rcx)
movb %al, -0x10(%rbp)
jne 0xd3b2f
movb $0x1, %al
movb %al, -0x10(%rbp)
jmp 0xd3b2f
movb -0x10(%rbp), %al
testb $0x1, %al
jne 0xd3b38
jmp 0xd3b3a
jmp 0xd3b59
leaq 0xa39d1(%rip), %rdi     # 0x177512
leaq 0x9f3c1(%rip), %rsi     # 0x172f09
movl $0x1b69, %edx           # imm = 0x1B69
leaq 0xa37d0(%rip), %rcx     # 0x177324
callq 0xd180
addq $0x10, %rsp
popq %rbp
retq
nop