//
// SetupSmartTemplateLayer::FLAlert_Clicked from 0x1405ef160 to 0x1405ef240 (224 bytes)
//
// 2 xrefs:
// > ??> @ 0x140805570
// > ??> @ 0x14092f144
//
// 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:35:05 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall SetupSmartTemplateLayer::FLAlert_Clicked(__int64 a1, __int64 a2, char a3)
{
__int64 result; // rax
__int64 v6; // rcx
struct cocos2d::CCObject *v7; // rdx
__int64 v8; // r8
__int64 v9; // rax
cocos2d::CCObject *v10; // rax
void *v11; // [rsp+38h] [rbp+10h]
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);
if ( (_DWORD)result == 5 && a3 )
{
v6 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v11 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v11);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v6 = *(_QWORD *)&qword_14090BFB0;
}
v7 = *(struct cocos2d::CCObject **)(a1 + 8);
if ( v7 )
{
v8 = *(_QWORD *)(v6 + 1664);
if ( v8 )
{
if ( *(_DWORD *)(v8 + 200) == *((_DWORD *)v7 + 50) )
*(_QWORD *)(v6 + 1664) = 0;
}
cocos2d::CCArray::removeObject(*(cocos2d::CCArray **)(v6 + 1656), v7, 1);
}
SetupSmartTemplateLayer::onClose(a1 - 664);
v9 = GJSearchObject::create_2(101);
*(_BYTE *)(v9 + 462) = 1;
v10 = LevelBrowserLayer::create(v9);
return LevelBrowserLayer::show((__int64)v10);
}
return result;
}