m/windows: windows_sort rewrite (v2)