// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::IsItemHovered(int)
bool ImGui::IsItemHovered(ImGuiHoveredFlags flags)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    if (g.NavDisableMouseHover && !g.NavDisableHighlight)
        return IsItemFocused();

    // Test for bounding box overlap, as updated as ItemAdd()
    if (!(window->DC.LastItemStatusFlags & ImGuiItemStatusFlags_HoveredRect))
        return false;
    IM_ASSERT((flags & (ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows)) == 0);   // Flags not supported by this function

    // Test if we are hovering the right window (our window could be behind another window)
    // [2017/10/16] Reverted commit 344d48be3 and testing RootWindow instead. I believe it is correct to NOT test for RootWindow but this leaves us unable to use IsItemHovered() after EndChild() itself.
    // Until a solution is found I believe reverting to the test from 2017/09/27 is safe since this was the test that has been running for a long while.
    //if (g.HoveredWindow != window)
    //    return false;
    if (g.HoveredRootWindow != window->RootWindow && !(flags & ImGuiHoveredFlags_AllowWhenOverlapped))
        return false;

    // Test if another item is active (e.g. being dragged)
    if (!(flags & ImGuiHoveredFlags_AllowWhenBlockedByActiveItem))
        if (g.ActiveId != 0 && g.ActiveId != window->DC.LastItemId && !g.ActiveIdAllowOverlap && g.ActiveId != window->MoveId)
            return false;

    // Test if interactions on this window are blocked by an active popup or modal.
    // The ImGuiHoveredFlags_AllowWhenBlockedByPopup flag will be tested here.
    if (!IsWindowContentHoverable(window, flags))
        return false;

    // Test if the item is disabled
    if ((window->DC.ItemFlags & ImGuiItemFlags_Disabled) && !(flags & ImGuiHoveredFlags_AllowWhenDisabled))
        return false;

    // Special handling for calling after Begin() which represent the title bar or tab.
    // When the window is collapsed (SkipItems==true) that last item will never be overwritten so we need to detect the case.
    if (window->DC.LastItemId == window->MoveId && window->WriteAccessed)
        return false;
    return true;
}

// Assembly:
movq 0xb6fc6(%rip), %rcx     # 0xfdcd0
movq 0x1ae0(%rcx), %rax
cmpb $0x1, 0x1ce7(%rcx)
jne 0x46d27
cmpb $0x0, 0x1ce6(%rcx)
je 0x46dca
testb $0x1, 0x128(%rax)
je 0x46dc7
testb $0x3, %dil
jne 0x46df8
movq 0x390(%rax), %rdx
testb $0x40, %dil
jne 0x46d54
cmpq %rdx, 0x1af0(%rcx)
jne 0x46dc7
testb $0x20, %dil
jne 0x46d7a
movl 0x1b30(%rcx), %esi
testl %esi, %esi
je 0x46d7a
cmpl 0x124(%rax), %esi
je 0x46d7a
cmpb $0x0, 0x1b3d(%rcx)
jne 0x46d7a
cmpl 0x54(%rax), %esi
jne 0x46dc7
movq 0x1c90(%rcx), %rcx
testq %rcx, %rcx
je 0x46db7
movq 0x390(%rcx), %rcx
testq %rcx, %rcx
je 0x46db7
cmpq %rdx, %rcx
je 0x46db7
cmpb $0x0, 0x8f(%rcx)
je 0x46db7
movl 0xc(%rcx), %ecx
btl $0x1b, %ecx
jb 0x46dc7
testb $0x8, %dil
jne 0x46db7
andl $0x4000000, %ecx        # imm = 0x4000000
jne 0x46dc7
testb %dil, %dil
js 0x46de1
movl 0x1cc(%rax), %ecx
andl $0x4, %ecx
je 0x46de1
xorl %eax, %eax
retq
movl 0x1c98(%rcx), %ecx
cmpl 0x124(%rax), %ecx
sete %dl
testl %ecx, %ecx
setne %al
andb %dl, %al
retq
movl 0x124(%rax), %ecx
cmpl 0x54(%rax), %ecx
jne 0x46df5
cmpb $0x0, 0x90(%rax)
jne 0x46dc7
movb $0x1, %al
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x71ae2(%rip), %rdi     # 0xb88e5
leaq 0x7135b(%rip), %rsi     # 0xb8165
leaq 0x71b23(%rip), %rcx     # 0xb8934
movl $0xc26, %edx            # imm = 0xC26
callq 0xc140