//
// SetupSmartBlockLayer::onCreateTemplate from 0x100078598 to 0x100078610 (120 bytes)
//
// 1 xrefs:
// > SetupSmartBlockLayer::init @ 0x100077af4
//
// 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::onCreateTemplate(_QWORD *a1)
{
__int64 v2; // x0
__int64 v3; // x20
__int64 v4; // x1
__int64 v5; // x1
__int64 v6; // x0
__int64 ActiveSmartTemplate; // x21
__int64 v8; // x0
v2 = sub_1002E736C(a1);
v3 = v2;
v4 = a1[86];
if ( v4 )
{
sub_1002E74E0(v2, v4);
}
else
{
v5 = a1[87];
if ( v5 )
v2 = sub_1002E7570(v2, v5);
}
v6 = GameLevelManager::sharedState(v2);
ActiveSmartTemplate = GameLevelManager::getActiveSmartTemplate(v6);
v8 = GameManager::sharedState(ActiveSmartTemplate);
EditorUI::addObjectsToSmartTemplate(*(_QWORD *)(*(_QWORD *)(v8 + 552) + 14248LL), ActiveSmartTemplate, v3);
return SetupSmartBlockLayer::onClose(a1);
}