//
// GameManager::fadeInMenuMusic from 0x4168dc to 0x416938 (92 bytes)
//
// 16 xrefs:
// > MenuLayer::init @ 0x3f9f88
// > LoadingLayer::loadAssets @ 0x3fbfcc
// > PlayLayer::onQuit @ 0x407b50
// > GameManager::returnToLastScene @ 0x416af6
// > MoreOptionsLayer::dropDownLayerWillClose @ 0x52c2ba
// > OptionsLayer::onMenuMusic @ 0x52c912
// > SongInfoLayer::onMenuMusic @ 0x53aeb0
// > SecretLayer::onBack @ 0x5fc96e
// > GauntletSelectLayer::unlockAnimationStep3 @ 0x60b618
// > GJShopLayer::onBack @ 0x61150a
// > SecretLayer2::onBack @ 0x61a430
// > SecretLayer4::onBack @ 0x620c8e
// > LevelAreaLayer::onBack @ 0x6a3856
// > SecretRewardsLayer::onBack @ 0x6caa2a
// > SecretLayer6::onBack @ 0x6e27f4
// > GameSettingsLayer::dropDownLayerWillClose @ 0x710596
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:47:41 +0000
//
char **__fastcall GameManager::fadeInMenuMusic(GameManager *this, int a2, int a3, int a4)
{
GameManager *v5; // r0
FMODAudioEngine *GameVariable; // r0
FMODAudioEngine *v7; // r0
_DWORD v9[4]; // [sp+0h] [bp-10h] BYREF
v9[0] = this;
v9[1] = a2;
v9[2] = a3;
v9[3] = a4;
v5 = (GameManager *)GameManager::sharedState(this);
GameVariable = (FMODAudioEngine *)GameManager::getGameVariable(v5, "0122");
if ( GameVariable )
{
v7 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(GameVariable);
return FMODAudioEngine::stopAllMusic(v7, 1);
}
else
{
GameManager::getMenuMusicFile((GameManager *)v9, (int)this);
GameManager::fadeInMusic(this, (unsigned __int8 *)v9);
return (char **)std::string::~string((int)v9);
}
}