// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::UpdateMouseMovingWindowNewFrame()
void ImGui::UpdateMouseMovingWindowNewFrame()
{
    ImGuiContext& g = *GImGui;
    if (g.MovingWindow != NULL)
    {
        // We actually want to move the root window. g.MovingWindow == window we clicked on (could be a child window).
        // We track it to preserve Focus and so that generally ActiveIdWindow == MovingWindow and ActiveId == MovingWindow->MoveId for consistency.
        KeepAliveID(g.ActiveId);
        IM_ASSERT(g.MovingWindow && g.MovingWindow->RootWindow);
        ImGuiWindow* moving_window = g.MovingWindow->RootWindow;
        if (g.IO.MouseDown[0] && IsMousePosValid(&g.IO.MousePos))
        {
            ImVec2 pos = g.IO.MousePos - g.ActiveIdClickOffset;
            if (moving_window->Pos.x != pos.x || moving_window->Pos.y != pos.y)
            {
                MarkIniSettingsDirty(moving_window);
                SetWindowPos(moving_window, pos, ImGuiCond_Always);
            }
            FocusWindow(g.MovingWindow);
        }
        else
        {
            ClearActiveID();
            g.MovingWindow = NULL;
        }
    }
    else
    {
        // When clicking/dragging from a window that has the _NoMove flag, we still set the ActiveId in order to prevent hovering others.
        if (g.ActiveIdWindow && g.ActiveIdWindow->MoveId == g.ActiveId)
        {
            KeepAliveID(g.ActiveId);
            if (!g.IO.MouseDown[0])
                ClearActiveID();
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq 0xb5ddb(%rip), %r14     # 0xfdcd0
movq 0x1b00(%r14), %rax
testq %rax, %rax
je 0x47ff8
movl 0x1b30(%r14), %ecx
movl 0x1b70(%r14), %edx
movl %ecx, 0x1b34(%r14)
cmpl %ecx, %edx
jne 0x47f26
movb $0x1, 0x1b74(%r14)
movq 0x390(%rax), %rbx
testq %rbx, %rbx
je 0x4804c
cmpb $0x1, 0x130(%r14)
jne 0x47fe2
leaq 0x128(%r14), %rdi
callq 0x4806b
testb %al, %al
je 0x47fe2
movss 0x128(%r14), %xmm0
movss 0x12c(%r14), %xmm1
subss 0x1b58(%r14), %xmm0
subss 0x1b5c(%r14), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movlps %xmm0, -0x18(%rbp)
movss 0x10(%rbx), %xmm0
ucomiss -0x18(%rbp), %xmm0
jne 0x47f9d
jp 0x47f9d
movss 0x14(%rbx), %xmm0
ucomiss -0x14(%rbp), %xmm0
jne 0x47f9d
jnp 0x47fd4
testb $0x1, 0xd(%rbx)
jne 0x47fc3
movq 0xb5d26(%rip), %rax     # 0xfdcd0
xorps %xmm0, %xmm0
ucomiss 0x30e4(%rax), %xmm0
jb 0x47fc3
movss 0x1c(%rax), %xmm0
movss %xmm0, 0x30e4(%rax)
leaq -0x18(%rbp), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x480f9
movq 0x1b00(%r14), %rdi
callq 0x47d9b
jmp 0x48032
xorl %edi, %edi
xorl %esi, %esi
callq 0x46b95
movq $0x0, 0x1b00(%r14)
jmp 0x48032
movq 0x1b60(%r14), %rax
testq %rax, %rax
je 0x48032
movl 0x1b30(%r14), %ecx
cmpl %ecx, 0x54(%rax)
jne 0x48032
movl %ecx, 0x1b34(%r14)
cmpl %ecx, 0x1b70(%r14)
jne 0x48028
movb $0x1, 0x1b74(%r14)
cmpb $0x0, 0x130(%r14)
je 0x4803b
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
xorl %edi, %edi
xorl %esi, %esi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x46b95
leaq 0x70984(%rip), %rdi     # 0xb89d7
leaq 0x7010b(%rip), %rsi     # 0xb8165
leaq 0x709a3(%rip), %rcx     # 0xb8a04
movl $0xd6c, %edx            # imm = 0xD6C
callq 0xc140