//
// PlayLayer::resetLevelFromStart from 0x6f6b88 to 0x6f6c30 (168 bytes)
//
// 5 xrefs:
// > PlayLayer::resumeAndRestart @ 0x6f7448
// > PlayLayer::togglePracticeMode @ 0x7034d4
// > PlayLayer::fullReset @ 0x7035d8
// > PlayLayer::switchToStartPosObject @ 0x710fc8
// > ??> @ 0xd2ca0
//
// 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:51:51 +0000
//
__int64 __fastcall PlayLayer::resetLevelFromStart(PlayLayer *this)
{
GameManager *v2; // x0
GameManager *GameVariable; // x0
bool v4; // w23
GameManager *v5; // x0
FMODAudioEngine *v6; // x0
FMODAudioEngine *v7; // x0
GameManager *v8; // x0
GameManager *v9; // x0
v2 = (GameManager *)GameManager::sharedState(this);
GameVariable = (GameManager *)GameManager::getGameVariable(v2, "0146");
v4 = (char)GameVariable;
v5 = (GameManager *)GameManager::sharedState(GameVariable);
GameManager::setGameVariable(v5, "0146", 1);
(*(void (__fastcall **)(PlayLayer *))(*(_QWORD *)this + 1584LL))(this);
v6 = (FMODAudioEngine *)*((unsigned __int8 *)this + 12544);
if ( !*((_BYTE *)this + 12544)
|| (v6 = (FMODAudioEngine *)*((unsigned __int8 *)this + 12545), *((_BYTE *)this + 12545)) )
{
v7 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(v6);
FMODAudioEngine::stopAllMusic(v7, 1);
}
*((_BYTE *)this + 12617) = 1;
v8 = (GameManager *)(*(__int64 (__fastcall **)(PlayLayer *))(*(_QWORD *)this + 1608LL))(this);
v9 = (GameManager *)GameManager::sharedState(v8);
return GameManager::setGameVariable(v9, "0146", v4);
}