//
// EditorUI::flipObjectsX from 0x70e16c to 0x70e28c (288 bytes)
//
// 2 xrefs:
// > EditorUI::createSmartObjectsFromTemplate @ 0x48818a
// > EditorUI::transformObjectCall @ 0x70e560
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:57:42 +0000
//
unsigned int __fastcall EditorUI::flipObjectsX(EditorUI *this, cocos2d::CCArray *a2)
{
unsigned int v4; // r4
float v5; // s16
float v6; // s18
GameObject *v7; // r9
float v8; // r1
float v9; // r2
int v10; // r3
float v11; // s19
float v12; // r0
float v13; // s17
unsigned int v14; // r5
unsigned int result; // r0
GameObject *v16; // r0
GameObject *v17; // r4
float v18; // s17
int v19; // r0
int v20; // r0
_BYTE v21[8]; // [sp+4h] [bp-1Ch] BYREF
_BYTE v22[16]; // [sp+Ch] [bp-14h] BYREF
v4 = 0;
v5 = -9999.0;
v6 = -9999.0;
while ( v4 < cocos2d::CCArray::count(a2) )
{
v7 = (GameObject *)cocos2d::CCArray::objectAtIndex(a2, v4);
GameObject::updateStartPos(v7, v8, v9, v10);
(*(void (__fastcall **)(_BYTE *, GameObject *, int, int))(*(_DWORD *)v7 + 668))(v22, v7, 1065353216, 1065353216);
v11 = COERCE_FLOAT(cocos2d::CCRect::getMaxX((cocos2d::CCRect *)v22));
v12 = COERCE_FLOAT(cocos2d::CCRect::getMinX((cocos2d::CCRect *)v22));
if ( v11 > v6 )
v6 = v11;
v13 = v12;
if ( v12 >= v5 && v5 != -9999.0 )
v13 = v5;
EditorUI::transformObject((int)this, (int *)v7, 37, 1);
++v4;
v5 = v13;
}
v14 = 0;
while ( 1 )
{
result = cocos2d::CCArray::count(a2);
if ( v14 >= result )
break;
v16 = (GameObject *)cocos2d::CCArray::objectAtIndex(a2, v14++);
v17 = v16;
v18 = *(float *)(*(int (__fastcall **)(GameObject *))(*(_DWORD *)v16 + 96))(v16);
v19 = (*(int (__fastcall **)(GameObject *))(*(_DWORD *)v17 + 96))(v17);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v21, v6 - (float)(v18 - v5), *(float *)(v19 + 4));
v20 = (*(int (__fastcall **)(GameObject *))(*(_DWORD *)v17 + 96))(v17);
cocos2d::CCPoint::operator-(v22, v21, v20);
EditorUI::moveObject((int)this, v17, (int)v22);
}
return result;
}