//
// EditorUI::getCycledObject from 0x7c74d4 to 0x7c7598 (196 bytes)
//
// 4 xrefs:
// > EditorUI::onDelete @ 0x7d1850
// > EditorUI::ccTouchEnded @ 0xbd6584
// > EditorUI::ccTouchEnded @ 0xbd6668
// > ??> @ 0x860e0
//
// 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 12:54:09 +0000
//
__int64 __fastcall EditorUI::getCycledObject(EditorUI *this, cocos2d::CCArray *a2, unsigned __int8 a3)
{
unsigned int v5; // w23
unsigned int v6; // w19
__int64 v7; // x21
bool v8; // cf
unsigned int v9; // w1
cocos2d::CCArray *v10; // x0
__int64 v11; // x20
v5 = a3;
v6 = 0;
v7 = 0;
while ( 1 )
{
v8 = v6 >= (unsigned int)cocos2d::CCArray::count(a2);
v9 = v6;
v10 = a2;
++v6;
if ( v8 )
break;
while ( 1 )
{
v11 = cocos2d::CCArray::objectAtIndex(v10, v9);
if ( *(unsigned __int8 *)(v11 + 1133) > v5 || v7 && *(_DWORD *)(v11 + 1136) >= *(_DWORD *)(v7 + 1136) )
break;
if ( (unsigned __int8)EditorUI::canSelectObject(this, (GameObject *)v11) )
v7 = v11;
v8 = v6 >= (unsigned int)cocos2d::CCArray::count(a2);
v9 = v6;
v10 = a2;
++v6;
if ( v8 )
goto LABEL_10;
}
}
LABEL_10:
if ( v7 )
*(_DWORD *)(v7 + 1136) = *((_DWORD *)this + 385);
return v7;
}