//
// EditorUI::getCycledObject from 0x484f94 to 0x484ff6 (98 bytes)
//
// 3 xrefs:
// > EditorUI::onDelete @ 0x48c546
// > EditorUI::ccTouchEnded @ 0x6f0cc6
// > EditorUI::ccTouchEnded @ 0x6f0d84
//
// 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:49:24 +0000
//
int __fastcall EditorUI::getCycledObject(EditorUI *this, cocos2d::CCArray *a2, int a3)
{
unsigned int v3; // r6
int v7; // r4
int v8; // r0
int v9; // r5
v3 = 0;
v7 = 0;
while ( v3 < cocos2d::CCArray::count(a2) )
{
v8 = cocos2d::CCArray::objectAtIndex(a2, v3);
v9 = v8;
if ( *(_BYTE *)(v8 + 989) && !a3
|| v7 && *(_DWORD *)(v8 + 992) >= *(_DWORD *)(v7 + 992)
|| !EditorUI::canSelectObject(this, (GameObject *)v8) )
{
v9 = v7;
}
++v3;
v7 = v9;
}
if ( v7 )
*(_DWORD *)(v7 + 992) = *((_DWORD *)this + 255);
return v7;
}