//
// EditorUI::flipObjectsX from 0xc01418 to 0xc015d0 (440 bytes)
//
// 3 xrefs:
// > EditorUI::createSmartObjectsFromTemplate @ 0x7cb974
// > EditorUI::transformObjectCall @ 0xc01a80
// > ??> @ 0xe2e58
//
// 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 13:03:48 +0000
//
__int64 __fastcall EditorUI::flipObjectsX(EditorUI *this, cocos2d::CCArray *a2)
{
unsigned int v4; // w19
float v5; // s8
float v6; // s9
GameObject *v7; // x21
float v8; // s0
float v9; // s10
float v10; // s0
unsigned int v11; // w21
unsigned int v12; // w1
__int64 v13; // x19
__int64 v14; // x0
__int64 v15; // x0
long double v16; // q0
float v18; // [xsp+70h] [xbp+70h]
_BYTE v19[8]; // [xsp+80h] [xbp+80h] BYREF
_QWORD v20[2]; // [xsp+88h] [xbp+88h] BYREF
v4 = 0;
v5 = -9999.0;
v6 = -9999.0;
while ( v4 < (unsigned int)cocos2d::CCArray::count(a2) )
{
v7 = (GameObject *)cocos2d::CCArray::objectAtIndex(a2, v4);
GameObject::updateStartPos(v7);
(*(void (__fastcall **)(_QWORD *__return_ptr, GameObject *, float, float))(*(_QWORD *)v7 + 1336LL))(
v20,
v7,
1.0,
1.0);
cocos2d::CCRect::getMaxX((cocos2d::CCRect *)v20);
v9 = v8;
cocos2d::CCRect::getMinX((cocos2d::CCRect *)v20);
if ( v6 < v9 )
v6 = v9;
if ( v5 <= v10 && v5 != -9999.0 )
v10 = v5;
v5 = v10;
++v4;
EditorUI::transformObject((__int64)this, (__int64)v7, 37, 1);
}
v11 = 0;
while ( v11 < (unsigned int)cocos2d::CCArray::count(a2) )
{
v12 = v11++;
v13 = cocos2d::CCArray::objectAtIndex(a2, v12);
v18 = v6 - (float)(*(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v13 + 192LL))(v13) - v5);
v14 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v13 + 192LL))(v13);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v19, v18, *(float *)(v14 + 4));
v15 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v13 + 192LL))(v13);
cocos2d::CCPoint::operator-(v20, v19, v15, v16);
EditorUI::moveObject((__int64)this, v13);
}
return _stack_chk_guard;
}