// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %r14d
movq 0xac7d2(%rip), %rax     # 0xe3ce0
movq 0x1ae0(%rax), %rbx
cmpb $0x1, 0x1ce7(%rax)
jne 0x37527
cmpb $0x0, 0x1ce6(%rax)
je 0x3759c
testb $0x1, 0x128(%rbx)
je 0x37595
testb $0x3, %r14b
jne 0x375bd
testb $0x40, %r14b
jne 0x37550
movq 0x390(%rbx), %rcx
cmpq %rcx, 0x1af0(%rax)
jne 0x37595
testb $0x20, %r14b
jne 0x37576
movl 0x1b30(%rax), %ecx
testl %ecx, %ecx
je 0x37576
cmpl 0x124(%rbx), %ecx
je 0x37576
cmpb $0x0, 0x1b3d(%rax)
jne 0x37576
cmpl 0x54(%rbx), %ecx
jne 0x37595
movq %rbx, %rdi
movl %r14d, %esi
callq 0x37606
testb %al, %al
je 0x37595
testb %r14b, %r14b
js 0x375a5
movl 0x1cc(%rbx), %eax
andl $0x4, %eax
je 0x375a5
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
popq %rbx
popq %r14
popq %rbp
jmp 0x375dc
movl 0x124(%rbx), %eax
cmpl 0x54(%rbx), %eax
jne 0x375b9
cmpb $0x0, 0x90(%rbx)
jne 0x37595
movb $0x1, %al
jmp 0x37597
leaq 0x66351(%rip), %rdi     # 0x9d915
leaq 0x65bca(%rip), %rsi     # 0x9d195
leaq 0x66392(%rip), %rcx     # 0x9d964
movl $0xc26, %edx            # imm = 0xC26
callq 0xc140