//
// EditorUI::onGoToLayer from 0x7c6298 to 0x7c6378 (224 bytes)
//
// 4 xrefs:
// > EditorUI::handleEditorAction @ 0xbd75a0
// > ??> @ 0x54dd8
// > EditorUI::init @ 0x7d08a0
// > ??> @ 0x1541df0
//
// 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:08 +0000
//
__int64 __fastcall EditorUI::onGoToLayer(EditorUI *this, cocos2d::CCObject *a2)
{
__int64 v3; // x0
__int64 v4; // x1
int v5; // w20
int v6; // w21
int v7; // w0
__int64 result; // x0
v3 = *((_QWORD *)this + 187);
if ( v3 )
{
v4 = *((_QWORD *)this + 180) + 12288LL;
v5 = *(__int16 *)(*((_QWORD *)this + 180) + 14210LL);
LABEL_3:
v6 = *(__int16 *)(v3 + 1202);
v7 = *(__int16 *)(v3 + 1204);
goto LABEL_4;
}
result = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 112));
if ( !(_DWORD)result )
return result;
v3 = *((_QWORD *)this + 187);
v4 = *((_QWORD *)this + 180) + 12288LL;
v5 = *(__int16 *)(*((_QWORD *)this + 180) + 14210LL);
if ( v3 )
goto LABEL_3;
v6 = EditorUI::editorLayerForArray(this, *((cocos2d::CCArray **)this + 112), 0);
v7 = EditorUI::editorLayerForArray(this, *((cocos2d::CCArray **)this + 112), 1u);
v4 = *((_QWORD *)this + 180) + 12288LL;
LABEL_4:
if ( (!v7 || v6) && (v5 == v7 || !v7) )
{
*(_WORD *)(v4 + 1922) = v6;
return EditorUI::updateGroupIDLabel(this);
}
else
{
*(_WORD *)(v4 + 1922) = v7;
return EditorUI::updateGroupIDLabel(this);
}
}