//
// EditorUI::flipObjectsX from 0x10015d86c to 0x10015d9f4 (392 bytes)
//
// 2 xrefs:
// > EditorUI::transformObjectCall_1 @ 0x10015d598
// > EditorUI::createSmartObjectsFromTemplate @ 0x100479354
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 10:59:44 +0000
//
__int64 __fastcall EditorUI::flipObjectsX(__int64 a1, __int64 a2)
{
__int64 v4; // x21
float v5; // s10
float v6; // s9
__int64 v7; // x22
float v8; // s8
float v9; // s0
__int64 result; // x0
__int64 v12; // x21
__int64 v13; // x22
float v14; // s8
__int64 v15; // x0
float32x2_t *v16; // x0
float32x2_t v17; // [xsp+8h] [xbp-58h] BYREF
float32x2_t v18[2]; // [xsp+10h] [xbp-50h] BYREF
if ( (unsigned int)sub_1002E757C(a2) )
{
v4 = 0;
v5 = -9999.0;
v6 = -9999.0;
do
{
v7 = sub_1002E75A0(a2, v4);
GameObject::updateStartPos();
(*(void (__fastcall **)(float32x2_t *__return_ptr, __int64, float, float))(*(_QWORD *)v7 + 1336LL))(
v18,
v7,
1.0,
1.0);
v8 = sub_10002656C((float *)v18);
v9 = sub_1000265A0((__int64)v18);
if ( v8 > v5 )
v5 = v8;
if ( v9 < v6 || v6 == -9999.0 )
v6 = v9;
EditorUI::transformObject(a1, v7, 37, 1);
v4 = (unsigned int)(v4 + 1);
}
while ( (unsigned int)v4 < (unsigned int)sub_1002E757C(a2) );
}
else
{
v6 = -9999.0;
v5 = -9999.0;
}
result = sub_1002E757C(a2);
if ( (_DWORD)result )
{
v12 = 0;
do
{
v13 = sub_1002E75A0(a2, v12);
v14 = v5 - (float)(*(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v13 + 192LL))(v13) - v6);
v15 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v13 + 192LL))(v13);
sub_1000262BC((float *)&v17, v14, *(float *)(v15 + 4));
v16 = (float32x2_t *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v13 + 192LL))(v13);
sub_10002632C(&v17, v16, v18);
EditorUI::moveObject(a1, v13, v18);
v12 = (unsigned int)(v12 + 1);
result = sub_1002E757C(a2);
}
while ( (unsigned int)v12 < (unsigned int)result );
}
return result;
}