//
// smartPrefabSort from 0x685794 to 0x685894 (256 bytes)
//
// 3 xrefs:
// > ??> @ 0x49920
// > EditorUI::addObjectsToSmartTemplate @ 0x6b4458
// > ??> @ 0x122a598
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall smartPrefabSort(__int64 *a1, __int64 *a2)
{
__int64 v2; // x21
__int64 v3; // x20
float v4; // s8
float v5; // s0
__int64 v7; // [xsp+40h] [xbp+40h] BYREF
v2 = *a1;
v3 = *a2;
(*(void (__fastcall **)(__int64 *__return_ptr, __int64))(*(_QWORD *)v2 + 1344LL))(&v7, v2);
v4 = *(float *)&v7;
(*(void (__fastcall **)(__int64 *__return_ptr, __int64))(*(_QWORD *)v3 + 1344LL))(&v7, v3);
v5 = *(float *)&v7;
if ( v4 == *(float *)&v7 )
{
(*(void (__fastcall **)(__int64 *__return_ptr, __int64))(*(_QWORD *)v2 + 1344LL))(&v7, v2);
v4 = *((float *)&v7 + 1);
(*(void (__fastcall **)(__int64 *__return_ptr, __int64))(*(_QWORD *)v3 + 1344LL))(&v7, v3);
v5 = *((float *)&v7 + 1);
if ( v4 == *((float *)&v7 + 1) )
{
v4 = (float)*(int *)(v2 + 1012);
v5 = (float)*(int *)(v3 + 1012);
if ( v4 == v5 )
{
v4 = (float)*(unsigned int *)(v2 + 900);
v5 = (float)*(unsigned int *)(v3 + 900);
}
}
}
return (unsigned int)(int)(float)(v4 - v5);
}