//
// PlayLayer::resetLevelFromStart from 0x10014b03c to 0x10014b0e8 (172 bytes)
//
// 4 xrefs:
// > PlayLayer::switchToStartPosObject @ 0x10014afec
// > PlayLayer::fullReset @ 0x10014b3b8
// > PlayLayer::togglePracticeMode @ 0x10014b4c4
// > PlayLayer::resumeAndRestart @ 0x10014c63c
//
// 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:59:36 +0000
//
__int64 __fastcall PlayLayer::resetLevelFromStart(_BYTE *a1)
{
_BYTE *v2; // x22
__int64 v3; // x0
__int64 v4; // x0
__int64 v5; // x20
__int64 v6; // x0
__int64 v7; // x0
__int64 v8; // x0
__int64 v9; // x0
__int64 v10; // x0
v2 = a1 + 12288;
v3 = GameManager::sharedState(a1);
GameManager::getGameVariable(v3, "0146");
v5 = v4;
v6 = GameManager::sharedState(v4);
GameManager::setGameVariable(v6, "0146", 1);
v7 = (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)a1 + 1584LL))(a1);
if ( v2[256] != 1 || v2[257] == 1 )
{
v8 = FMODAudioEngine::sharedEngine(v7);
FMODAudioEngine::stopAllMusic(v8, 1);
}
v2[329] = 1;
v9 = (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)a1 + 1608LL))(a1);
v10 = GameManager::sharedState(v9);
return GameManager::setGameVariable(v10, "0146", v5);
}