//
// EditorUI::editorLayerForArray from 0x37ddae to 0x37ddf4 (70 bytes)
//
// 4 xrefs:
// > EditorUI::onGoToLayer @ 0x380cb0
// > EditorUI::onGoToLayer @ 0x380cbe
// > EditorUI::updateButtons @ 0x39ccc4
// > EditorUI::updateButtons @ 0x39ccd6
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int EditorUI::editorLayerForArray(EditorUI *a1, cocos2d::CCArray *a2, bool a3)
{
_BOOL4 v3; // r7
unsigned int v5; // r6
int v6; // r5
int v7; // r0
int v8; // r3
v3 = a3;
if ( !a2 )
return 0;
v5 = 0;
v6 = -1;
while ( v5 < cocos2d::CCArray::count(a2) )
{
v7 = cocos2d::CCArray::objectAtIndex(a2, v5);
if ( v3 )
v8 = *(__int16 *)(v7 + 1032);
else
v8 = *(__int16 *)(v7 + 1030);
if ( v6 != -1 && v6 != v8 )
return 0;
++v5;
v6 = v8;
}
if ( v6 == -1 )
return 0;
else
return v6;
}