//
// sub_49EFD8 from 0x49efd8 to 0x49f01a (66 bytes)
//
// 2 xrefs:
// > GJEffectManager::getPersistentStateString @ 0x4a3708
// > GJEffectManager::getPersistentStateString @ 0x4a37fe
//
// 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
//
_DWORD *__fastcall sub_49EFD8(char *a1, char *a2)
{
char *v3; // r4
_DWORD *result; // r0
char *i; // r3
int v6; // r1
_DWORD *j; // r2
if ( a2 - a1 <= 67 )
return std::__insertion_sort<__gnu_cxx::__normal_iterator>,__gnu_cxx::__ops::_Iter_less_iter>(
a1,
a2);
v3 = a1 + 64;
result = std::__insertion_sort<__gnu_cxx::__normal_iterator>,__gnu_cxx::__ops::_Iter_less_iter>(
a1,
(_DWORD *)a1 + 16);
for ( i = v3; i != a2; i += 4 )
{
v6 = *(_DWORD *)i;
for ( j = i; ; --j )
{
result = (_DWORD *)*(j - 1);
if ( v6 >= (int)result )
break;
*j = result;
}
*j = v6;
}
return result;
}