//
// SetupSmartBlockLayer::onClose from 0xb14118 to 0xb141b8 (160 bytes)
//
// 8 xrefs:
// > SetupSmartBlockLayer::keyBackClicked @ 0xb141bc
// > SetupSmartBlockLayer::onCreate @ 0xb14250
// > SetupSmartBlockLayer::onCreate @ 0xb142b0
// > SetupSmartBlockLayer::onCreateTemplate @ 0xb1430c
// > SetupSmartBlockLayer::onPasteTemplate @ 0xb15e04
// > ??> @ 0xa5df0
// > SetupSmartBlockLayer::init @ 0xb15040
// > ??> @ 0x1544a58
//
// 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 13:01:30 +0000
//
__int64 __fastcall SetupSmartBlockLayer::onClose(cocos2d::CCArray **this, cocos2d::CCObject *a2)
{
__int64 v3; // x0
cocos2d::CCTouchDispatcher *v4; // x0
SmartGameObject *v5; // x0
cocos2d::CCArray *v7; // x0
unsigned int v8; // w19
SmartGameObject *v9; // x0
bool v10; // cf
unsigned int v11; // w1
v3 = cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)this);
v4 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 160LL))(v3);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v4, (cocos2d::CCObject *)this);
v5 = *(this + 86);
if ( v5 )
{
SmartGameObject::updateSmartFrame(v5);
}
else
{
v7 = *(this + 87);
if ( v7 )
{
v8 = 0;
while ( 1 )
{
v10 = v8 >= (unsigned int)cocos2d::CCArray::count(v7);
v11 = v8++;
if ( v10 )
break;
v9 = (SmartGameObject *)cocos2d::CCArray::objectAtIndex(*(this + 87), v11);
SmartGameObject::updateSmartFrame(v9);
v7 = *(this + 87);
}
}
}
(*((void (__fastcall **)(cocos2d::CCArray **, _QWORD))*this + 134))(this, 0);
return (*((__int64 (__fastcall **)(cocos2d::CCArray **, __int64))*this + 66))(this, 1);
}