//
// EditorUI::onGoToLayer from 0x4843b0 to 0x48441c (108 bytes)
//
// 1 xrefs:
// > EditorUI::handleEditorAction @ 0x6f218a
//
// 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::onGoToLayer(EditorUI *this, cocos2d::CCObject *a2)
{
int result; // r0
__int16 v4; // r6
int v5; // r2
int v6; // r5
int v7; // r0
if ( *((_DWORD *)this + 249) || (result = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 167))) != 0 )
{
v4 = *(_WORD *)(*((_DWORD *)this + 236) + 11826);
v5 = *((_DWORD *)this + 249);
if ( v5 )
{
v6 = *(__int16 *)(v5 + 1038);
v7 = *(__int16 *)(v5 + 1040);
}
else
{
v6 = EditorUI::editorLayerForArray(this, *((cocos2d::CCArray **)this + 167), 0);
v7 = EditorUI::editorLayerForArray(this, *((cocos2d::CCArray **)this + 167), 1);
}
if ( v6 )
{
if ( v7 )
{
if ( v4 != v7 )
LOWORD(v6) = v7;
}
}
else
{
LOWORD(v6) = v7;
}
*(_WORD *)(*((_DWORD *)this + 236) + 11826) = v6;
return EditorUI::updateGroupIDLabel(this, (int)a2);
}
return result;
}