//
// GameManager::fadeInMenuMusic from 0x1003772f0 to 0x1003773a7 (183 bytes)
//
// 27 xrefs:
// > PlayLayer::onQuit @ 0x1000b2fcf
// > LevelAreaLayer::onBack @ 0x1002786e6
// > LevelAreaLayer::keyBackClicked @ 0x100279aa6
// > sub_100279AF0 @ 0x100279b21
// > GJShopLayer::onBack @ 0x100324b59
// > GameManager::returnToLastScene @ 0x10038c207
// > MenuLayer::init @ 0x1003901af
// > LoadingLayer::loadAssets @ 0x1003a3210
// > SecretLayer4::onBack @ 0x1003b20c2
// > SecretLayer4::keyBackClicked @ 0x1003b5082
// > sub_1003B50C0 @ 0x1003b50fa
// > SecretLayer6::onBack @ 0x10047f059
// > SecretLayer6::keyBackClicked @ 0x10047f7f9
// > sub_10047F830 @ 0x10047f854
// > SecretLayer2::onBack @ 0x10049e3f2
// > SecretLayer2::keyBackClicked @ 0x1004a30a2
// > sub_1004A30E0 @ 0x1004a311a
// > SecretLayer::onBack @ 0x1005fb921
// > SecretLayer::keyBackClicked @ 0x1005fe831
// > sub_1005FE870 @ 0x1005fe8aa
// > SongInfoLayer::onMenuMusic @ 0x100601cfe
// > SecretRewardsLayer::onBack @ 0x10063210a
// > SecretRewardsLayer::keyBackClicked @ 0x10063a37a
// > sub_10063A3C0 @ 0x10063a3de
// > OptionsLayer::onMenuMusic @ 0x10079b208
// > MoreOptionsLayer::dropDownLayerWillClose @ 0x10079e94d
// > sub_10079E960 @ 0x10079e96d
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall GameManager::fadeInMenuMusic(GameManager *a1)
{
double v1; // xmm0_8
FMODAudioEngine *v2; // rax
void *v3; // r14
_BYTE v4[16]; // [rsp+8h] [rbp-28h] BYREF
void *__p; // [rsp+18h] [rbp-18h]
if ( qword_1009A0E18 )
{
if ( GameManager::getGameVariable((GameManager *)qword_1009A0E18, "0122") )
{
LABEL_3:
v2 = FMODAudioEngine::sharedEngine();
FMODAudioEngine::stopAllMusic(v2, 1);
return;
}
}
else
{
v3 = operator new(0x638u);
sub_10038CE40(v3);
qword_1009A0E18 = (__int64)v3;
(*(void (__fastcall **)(void *))(*(_QWORD *)v3 + 80LL))(v3);
if ( GameManager::getGameVariable((GameManager *)qword_1009A0E18, "0122") )
goto LABEL_3;
}
GameManager::getMenuMusicFile((__int64)v4, (__int64)a1, v1);
GameManager::fadeInMusic(v4, v4);
if ( (v4[0] & 1) != 0 )
operator delete(__p);
}