//
// sub_140053B20 from 0x140053b20 to 0x140053b8d (109 bytes)
//
// 3 xrefs:
// > FMODAudioEngine::loadMusic @ 0x14005a413
// > ??> @ 0x1406c4f38
// > ??> @ 0x1406c4f44
//
// 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
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall sub_140053B20(FMOD::Channel *a1, int a2, int a3)
{
FMODAudioEngine *v4; // rcx
MusicDownloadManager *v5; // rax
FMODAudioEngine *v7; // [rsp+20h] [rbp-18h]
if ( !a2 && !a3 )
{
v4 = (FMODAudioEngine *)qword_1406C2E88;
if ( !qword_1406C2E88 )
{
v7 = (FMODAudioEngine *)operator new(0x888u);
qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v7);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88);
v4 = (FMODAudioEngine *)qword_1406C2E88;
}
FMODAudioEngine::channelStopped(v4, a1, 1);
v5 = MusicDownloadManager::sharedState();
MusicDownloadManager::songStateChanged(v5);
}
return 0;
}