//
// TouchControlEditLayer::onExit from 0x1404567c0 to 0x14045685b (155 bytes)
//
// 4 xrefs:
// > ??> @ 0x1407958a0
// > ??> @ 0x1408cd0d0
// > ??> @ 0x1408cd128
// > ??> @ 0x140927ae8
//
// This function is hookable on this platform (idp: pc, 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 11:32:29 +0000
//
void __fastcall TouchControlEditLayer::onExit(cocos2d::CCArray **a1)
{
cocos2d::CCArray *v1; // rax
unsigned int *v3; // rbx
__int64 v4; // rax
_QWORD *v5; // rbx
_QWORD *i; // rsi
__int64 v7; // rdi
__int64 v8; // rdx
v1 = a1[159];
if ( v1 )
{
v3 = *((unsigned int **)v1 + 7);
v4 = *v3;
if ( (_DWORD)v4 )
{
v5 = *((_QWORD **)v3 + 2);
for ( i = &v5[v4 - 1]; v5 <= i; ++v5 )
{
v7 = *v5;
if ( !*v5 )
break;
if ( (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v7 + 504LL))(*v5) )
{
LOBYTE(v8) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 336LL))(v7, v8);
}
}
}
cocos2d::CCArray::removeAllObjects(a1[159]);
}
cocos2d::CCLayer::onExit((cocos2d::CCLayer *)a1);
}