//
// EditorUI::uncheckPortals from 0x483144 to 0x4831bc (120 bytes)
//
// 2 xrefs:
// > EditorUI::handleEditorAction @ 0x6f20ee
// > EditorCommandsPopup::onCommand @ 0x77a86e
//
// 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:23 +0000
//
int __fastcall EditorUI::uncheckPortals(LevelEditorLayer **this)
{
int result; // r0
cocos2d::CCArray *v3; // r6
signed int v4; // r5
signed int i; // r4
int v6; // r3
int v7; // r11
bool v8; // zf
result = LevelEditorLayer::getAllObjects(*(this + 236));
v3 = (cocos2d::CCArray *)result;
if ( result )
{
result = cocos2d::CCArray::count((cocos2d::CCArray *)result);
v4 = result;
}
else
{
v4 = 0;
}
for ( i = 0; i < v4; ++i )
{
result = cocos2d::CCArray::objectAtIndex(v3, i);
v6 = *(_DWORD *)(result + 892);
v7 = result;
if ( v6 != 111 )
{
if ( v6 > 111 )
{
if ( v6 != 1331 && v6 != 1933 )
{
v8 = v6 == 660;
LABEL_13:
if ( !v8 )
continue;
}
}
else if ( v6 != 13 )
{
v8 = v6 == 47;
goto LABEL_13;
}
}
if ( *(_BYTE *)(result + 1584) )
{
result = DrawGridLayer::removeFromGuides(*((cocos2d::CCArray ***)*(this + 236) + 2970), (GameObject *)result);
*(_BYTE *)(v7 + 1584) = 0;
}
}
return result;
}