//
// EndLevelLayer::onRestartCheckpoint from 0x100393d70 to 0x100393ec0 (336 bytes)
//
// 1 xrefs:
// > EndLevelLayer::customSetup @ 0x100392e84
//
// 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 11:03:39 +0000
//
__int64 __fastcall EndLevelLayer::onRestartCheckpoint(__int64 result)
{
__int64 *v1; // x19
__int64 v2; // x0
char v3; // w0
__int64 v4; // x0
__int64 v5; // x0
__int64 v6; // x20
float *v7; // x20
char v8; // w0
__int64 v9; // x1
__int64 v10; // x2
__int64 v11; // x3
__int64 v12; // x4
__int64 v13; // x5
__int64 v14; // x6
__int64 v15; // x7
__int64 v16; // x20
void *__p[2]; // [xsp+18h] [xbp-28h] BYREF
char v18; // [xsp+2Fh] [xbp-11h]
if ( (*(_BYTE *)(result + 619) & 1) == 0 )
{
v1 = (__int64 *)result;
*(_BYTE *)(result + 619) = 1;
v2 = GameManager::sharedState(result);
GameManager::getGameVariable(v2, "0024");
if ( (v3 & 1) == 0 )
PlatformToolbox::hideCursor();
v4 = FMODAudioEngine::sharedEngine();
FMODAudioEngine::clearAllAudio(v4);
v5 = v1[76];
if ( *(_BYTE *)(v5 + 12544) == 1 && (*(_BYTE *)(v5 + 12545) & 1) == 0 )
PlayLayer::playPracticeMusic(v5);
v6 = FMODAudioEngine::sharedEngine();
sub_100009900(__p, "playSound_01.ogg");
FMODAudioEngine::playEffect(v6, (__int64)__p, 1.0, 0.0, 0.3);
if ( v18 < 0 )
operator delete(__p[0]);
(*(void (__fastcall **)(__int64 *, _QWORD))(*v1 + 1320))(v1, 0);
(*(void (__fastcall **)(__int64 *, _QWORD))(*v1 + 1000))(v1, 0);
(*(void (__fastcall **)(__int64 *, _QWORD))(*v1 + 1088))(v1, 0);
(*(void (__fastcall **)(__int64 *, _QWORD))(*v1 + 1072))(v1, 0);
v7 = cocos2d::CCDelayTime::create(0.5);
v8 = (unsigned __int8)cocos2d::CCCallFunc::create(v1[76], 1608, 1);
v16 = sub_10021D420((__int64)v7, v9, v10, v11, v12, v13, v14, v15, v8);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v16 + 72LL))(v16, 16);
return cocos2d::CCNode::runAction(v1[76], v16);
}
return result;
}