// File: /workspace/github_cpp_makefile_star2_O3/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 0xb5adc(%rip), %rcx     # 0xfbcd0
movq 0x1ae0(%rcx), %rax
cmpb $0x1, 0x1ce7(%rcx)
jne 0x46211
cmpb $0x0, 0x1ce6(%rcx)
je 0x462b4
testb $0x1, 0x128(%rax)
je 0x462b1
testb $0x3, %dil
jne 0x462e2
movq 0x390(%rax), %rdx
testb $0x40, %dil
jne 0x4623e
cmpq %rdx, 0x1af0(%rcx)
jne 0x462b1
testb $0x20, %dil
jne 0x46264
movl 0x1b30(%rcx), %esi
testl %esi, %esi
je 0x46264
cmpl 0x124(%rax), %esi
je 0x46264
cmpb $0x0, 0x1b3d(%rcx)
jne 0x46264
cmpl 0x54(%rax), %esi
jne 0x462b1
movq 0x1c90(%rcx), %rcx
testq %rcx, %rcx
je 0x462a1
movq 0x390(%rcx), %rcx
testq %rcx, %rcx
je 0x462a1
cmpq %rdx, %rcx
je 0x462a1
cmpb $0x0, 0x8f(%rcx)
je 0x462a1
movl 0xc(%rcx), %ecx
btl $0x1b, %ecx
jb 0x462b1
testb $0x8, %dil
jne 0x462a1
andl $0x4000000, %ecx        # imm = 0x4000000
jne 0x462b1
testb %dil, %dil
js 0x462cb
movl 0x1cc(%rax), %ecx
andl $0x4, %ecx
je 0x462cb
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 0x462df
cmpb $0x0, 0x90(%rax)
jne 0x462b1
movb $0x1, %al
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x705f8(%rip), %rdi     # 0xb68e5
leaq 0x6fe71(%rip), %rsi     # 0xb6165
leaq 0x70639(%rip), %rcx     # 0xb6934
movl $0xc26, %edx            # imm = 0xC26
callq 0xc140