//
// SetupSmartBlockLayer::onClose from 0x10007841c to 0x1000784bc (160 bytes)
//
// 6 xrefs:
// > SetupSmartBlockLayer::onCreate @ 0x100078594
// > SetupSmartBlockLayer::onCreateTemplate @ 0x10007860c
// > SetupSmartBlockLayer::onPasteTemplate @ 0x100078808
// > SetupSmartBlockLayer::keyBackClicked @ 0x100078c08
// > sub_100078C0C @ 0x100078c10
// > SetupSmartBlockLayer::init @ 0x100077a5c
//
// 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 10:58:14 +0000
//
__int64 __fastcall SetupSmartBlockLayer::onClose(_QWORD *a1)
{
__int64 v2; // x0
__int64 v3; // x0
__int64 v4; // x0
__int64 v6; // x0
__int64 v7; // x20
__int64 v8; // x0
v2 = cocos2d::CCDirector::sharedDirector(a1);
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 160LL))(v2);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v3, a1);
v4 = a1[86];
if ( v4 )
{
sub_100426AA8(v4);
}
else
{
v6 = a1[87];
if ( v6 && (unsigned int)sub_1002E757C(v6) )
{
v7 = 0;
do
{
v8 = sub_1002E75A0(a1[87], v7);
sub_100426AA8(v8);
v7 = (unsigned int)(v7 + 1);
}
while ( (unsigned int)v7 < (unsigned int)sub_1002E757C(a1[87]) );
}
}
(*(void (__fastcall **)(_QWORD *, _QWORD))(*a1 + 1072LL))(a1, 0);
return (*(__int64 (__fastcall **)(_QWORD *, __int64))(*a1 + 528LL))(a1, 1);
}