// File: Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::IsWindowHovered(int)
bool ImGui::IsWindowHovered(ImGuiHoveredFlags flags)
{
    IM_ASSERT((flags & ImGuiHoveredFlags_AllowWhenOverlapped) == 0);   // Flags not supported by this function
    ImGuiContext& g = *GImGui;

    if (flags & ImGuiHoveredFlags_AnyWindow)
    {
        if (g.HoveredWindow == NULL)
            return false;
    }
    else
    {
        switch (flags & (ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows))
        {
        case ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows:
            if (g.HoveredRootWindow != g.CurrentWindow->RootWindow)
                return false;
            break;
        case ImGuiHoveredFlags_RootWindow:
            if (g.HoveredWindow != g.CurrentWindow->RootWindow)
                return false;
            break;
        case ImGuiHoveredFlags_ChildWindows:
            if (g.HoveredWindow == NULL || !IsWindowChildOf(g.HoveredWindow, g.CurrentWindow))
                return false;
            break;
        default:
            if (g.HoveredWindow != g.CurrentWindow)
                return false;
            break;
        }
    }

    if (!IsWindowContentHoverable(g.HoveredWindow, flags))
        return false;
    if (!(flags & ImGuiHoveredFlags_AllowWhenBlockedByActiveItem))
        if (g.ActiveId != 0 && !g.ActiveIdAllowOverlap && g.ActiveId != g.HoveredWindow->MoveId)
            return false;
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
jne 0xda3b8
jmp 0xda3d7
leaq 0x99fab(%rip), %rdi     # 0x17436a
leaq 0x98b43(%rip), %rsi     # 0x172f09
movl $0x1931, %edx           # imm = 0x1931
leaq 0x99fcd(%rip), %rcx     # 0x17439f
callq 0xd180
movq 0x138b62(%rip), %rax    # 0x212f40
movq %rax, -0x10(%rbp)
movl -0x8(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xda409
movq -0x10(%rbp), %rax
cmpq $0x0, 0x1ae8(%rax)
jne 0xda404
movb $0x0, -0x1(%rbp)
jmp 0xda54a
jmp 0xda4e2
movl -0x8(%rbp), %eax
andl $0x3, %eax
movl %eax, -0x14(%rbp)
subl $0x1, %eax
je 0xda488
jmp 0xda419
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0xda45e
jmp 0xda423
movl -0x14(%rbp), %eax
subl $0x3, %eax
jne 0xda4c0
jmp 0xda431
movq -0x10(%rbp), %rax
movq 0x1af0(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x1ae0(%rcx), %rcx
cmpq 0x390(%rcx), %rax
je 0xda459
movb $0x0, -0x1(%rbp)
jmp 0xda54a
jmp 0xda4e0
movq -0x10(%rbp), %rax
movq 0x1ae8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x1ae0(%rcx), %rcx
cmpq 0x390(%rcx), %rax
je 0xda486
movb $0x0, -0x1(%rbp)
jmp 0xda54a
jmp 0xda4e0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x1ae8(%rax)
je 0xda4b5
movq -0x10(%rbp), %rax
movq 0x1ae8(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x1ae0(%rax), %rsi
callq 0xcc5a0
testb $0x1, %al
jne 0xda4be
movb $0x0, -0x1(%rbp)
jmp 0xda54a
jmp 0xda4e0
movq -0x10(%rbp), %rax
movq 0x1ae8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x1ae0(%rcx), %rax
je 0xda4de
movb $0x0, -0x1(%rbp)
jmp 0xda54a
jmp 0xda4e0
jmp 0xda4e2
movq -0x10(%rbp), %rax
movq 0x1ae8(%rax), %rdi
movl -0x8(%rbp), %esi
callq 0xca3b0
testb $0x1, %al
jne 0xda4ff
movb $0x0, -0x1(%rbp)
jmp 0xda54a
movl -0x8(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0xda546
movq -0x10(%rbp), %rax
cmpl $0x0, 0x1b30(%rax)
je 0xda544
movq -0x10(%rbp), %rax
testb $0x1, 0x1b3d(%rax)
jne 0xda544
movq -0x10(%rbp), %rax
movl 0x1b30(%rax), %eax
movq -0x10(%rbp), %rcx
movq 0x1ae8(%rcx), %rcx
cmpl 0x54(%rcx), %eax
je 0xda544
movb $0x0, -0x1(%rbp)
jmp 0xda54a
jmp 0xda546
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)