//
// EndLevelLayer::onRestartCheckpoint from 0x8fb238 to 0x8fb3f0 (440 bytes)
//
// 3 xrefs:
// > ??> @ 0xbb048
// > EndLevelLayer::customSetup @ 0x8fce20
// > ??> @ 0x1545690
//
// 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 12:57:03 +0000
//
__int64 __fastcall EndLevelLayer::onRestartCheckpoint(EndLevelLayer *this, cocos2d::CCObject *a2)
{
GameManager *v4; // x0
PlatformToolbox *GameVariable; // x0
FMOD::ChannelControl **v6; // x0
PlayLayer *v7; // x0
__int64 v8; // x22
cocos2d::CCDelayTime *v9; // x0
cocos2d::CCSequence *v10; // x21
cocos2d::CCFiniteTimeAction *v11; // x0
cocos2d::CCAction *v12; // x21
__int64 v13[2]; // [xsp+30h] [xbp+30h] BYREF
void *v14; // [xsp+40h] [xbp+40h]
if ( !*((_BYTE *)this + 619) )
{
*((_BYTE *)this + 619) = (unsigned __int8)&dword_0 + 1;
v4 = (GameManager *)GameManager::sharedState((GameManager *)((char *)&dword_0 + 1));
GameVariable = (PlatformToolbox *)(unsigned __int8)GameManager::getGameVariable(v4, "0024");
if ( !(_BYTE)GameVariable )
PlatformToolbox::hideCursor(GameVariable);
v6 = (FMOD::ChannelControl **)FMODAudioEngine::sharedEngine(GameVariable);
FMODAudioEngine::clearAllAudio(v6);
v7 = *((PlayLayer **)this + 76);
if ( *((_BYTE *)v7 + 12544) && !*((_BYTE *)v7 + 12545) )
v7 = (PlayLayer *)PlayLayer::playPracticeMusic(v7);
v8 = FMODAudioEngine::sharedEngine(v7);
v13[0] = 0;
v13[1] = 0;
v14 = nullptr;
std::string::__init(v13, "playSound_01.ogg", 0x10u);
FMODAudioEngine::playEffect(v8, (char *)v13, 1.0, 0.0, 0.3);
if ( (v13[0] & 1) != 0 )
operator delete(v14);
(*(void (__fastcall **)(EndLevelLayer *, _QWORD))(*(_QWORD *)this + 1320LL))(this, 0);
(*(void (__fastcall **)(EndLevelLayer *, _QWORD))(*(_QWORD *)this + 1000LL))(this, 0);
(*(void (__fastcall **)(EndLevelLayer *, _QWORD))(*(_QWORD *)this + 1088LL))(this, 0);
v9 = (cocos2d::CCDelayTime *)(*(__int64 (__fastcall **)(EndLevelLayer *, _QWORD))(*(_QWORD *)this + 1072LL))(
this,
0);
v10 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(v9, 0.5);
v11 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(*((_QWORD *)this + 76), 1608, 1);
v12 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v10, v11, 0);
(*(void (__fastcall **)(cocos2d::CCAction *, __int64))(*(_QWORD *)v12 + 72LL))(v12, 16);
cocos2d::CCNode::runAction(*((cocos2d::CCNode **)this + 76), v12);
}
return _stack_chk_guard;
}