// File: Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::ItemHoverable(ImRect const&, unsigned int)
bool ImGui::ItemHoverable(const ImRect& bb, ImGuiID id)
{
    ImGuiContext& g = *GImGui;
    if (g.HoveredId != 0 && g.HoveredId != id && !g.HoveredIdAllowOverlap)
        return false;

    ImGuiWindow* window = g.CurrentWindow;
    if (g.HoveredWindow != window)
        return false;
    if (g.ActiveId != 0 && g.ActiveId != id && !g.ActiveIdAllowOverlap)
        return false;
    if (!IsMouseHoveringRect(bb.Min, bb.Max))
        return false;
    if (g.NavDisableMouseHover)
        return false;
    if (!IsWindowContentHoverable(window, ImGuiHoveredFlags_None) || (window->DC.ItemFlags & ImGuiItemFlags_Disabled))
    {
        g.HoveredIdDisabled = true;
        return false;
    }

    // We exceptionally allow this function to be called with id==0 to allow using it for easy high-level
    // hover test in widgets code. We could also decide to split this function is two.
    if (id != 0)
    {
        SetHoveredID(id);

        // [DEBUG] Item Picker tool!
        // We perform the check here because SetHoveredID() is not frequently called (1~ time a frame), making
        // the cost of this tool near-zero. We can get slightly better call-stack and support picking non-hovered
        // items if we perform the test in ItemAdd(), but that would incur a small runtime cost.
        // #define IMGUI_DEBUG_TOOL_ITEM_PICKER_EX in imconfig.h if you want this check to also be performed in ItemAdd().
        if (g.DebugItemPickerActive && g.HoveredIdPreviousFrame == id)
            GetForegroundDrawList()->AddRect(bb.Min, bb.Max, IM_COL32(255, 255, 0, 255));
        if (g.DebugItemPickerBreakId == id)
            IM_DEBUG_BREAK();
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq 0x148aca(%rip), %rax    # 0x212f40
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x1b1c(%rax)
je 0xca4ac
movq -0x20(%rbp), %rax
movl 0x1b1c(%rax), %eax
cmpl -0x14(%rbp), %eax
je 0xca4ac
movq -0x20(%rbp), %rax
testb $0x1, 0x1b24(%rax)
jne 0xca4ac
movb $0x0, -0x1(%rbp)
jmp 0xca5e3
movq -0x20(%rbp), %rax
movq 0x1ae0(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x1ae8(%rax), %rax
cmpq -0x28(%rbp), %rax
je 0xca4d5
movb $0x0, -0x1(%rbp)
jmp 0xca5e3
movq -0x20(%rbp), %rax
cmpl $0x0, 0x1b30(%rax)
je 0xca507
movq -0x20(%rbp), %rax
movl 0x1b30(%rax), %eax
cmpl -0x14(%rbp), %eax
je 0xca507
movq -0x20(%rbp), %rax
testb $0x1, 0x1b3d(%rax)
jne 0xca507
movb $0x0, -0x1(%rbp)
jmp 0xca5e3
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
movl $0x1, %edx
callq 0xca5f0
testb $0x1, %al
jne 0xca52a
movb $0x0, -0x1(%rbp)
jmp 0xca5e3
movq -0x20(%rbp), %rax
testb $0x1, 0x1ce7(%rax)
je 0xca540
movb $0x0, -0x1(%rbp)
jmp 0xca5e3
movq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0xca3b0
testb $0x1, %al
jne 0xca551
jmp 0xca563
movq -0x28(%rbp), %rax
movl 0x1cc(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xca574
movq -0x20(%rbp), %rax
movb $0x1, 0x1b27(%rax)
movb $0x0, -0x1(%rbp)
jmp 0xca5e3
cmpl $0x0, -0x14(%rbp)
je 0xca5df
movl -0x14(%rbp), %edi
callq 0xca060
movq -0x20(%rbp), %rax
testb $0x1, 0x316c(%rax)
je 0xca5cd
movq -0x20(%rbp), %rax
movl 0x1b20(%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0xca5cd
callq 0xca6c0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x8, %rdx
movl $0xff00ffff, %ecx       # imm = 0xFF00FFFF
xorps %xmm0, %xmm0
movl $0xf, %r8d
movss 0xa6674(%rip), %xmm1    # 0x170c3c
callq 0x112ef0
movq -0x20(%rbp), %rax
movl 0x3170(%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0xca5dd
int3
jmp 0xca5df
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nop