//
// CustomSongLayer::onClose from 0x97e090 to 0x97e10c (124 bytes)
//
// 4 xrefs:
// > CustomSongLayer::keyBackClicked @ 0x97e110
// > ??> @ 0x9c2f8
// > CustomSongLayer::init @ 0x9808f8
// > ??> @ 0x15444f0
//
// 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:57:49 +0000
//
__int64 __fastcall CustomSongLayer::onClose(CustomSongLayer *this, cocos2d::CCObject *a2)
{
void (__fastcall ***v3)(_QWORD); // x0
FMODAudioEngine *v4; // x0
FMODAudioEngine *v5; // x0
v3 = *((void (__fastcall ****)(_QWORD))this + 88);
if ( v3 )
(**v3)(v3);
v4 = (FMODAudioEngine *)(*(__int64 (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 86) + 1160LL))(
*((_QWORD *)this + 86),
0);
v5 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(v4);
FMODAudioEngine::stopAllMusic(v5, 1);
(*(void (__fastcall **)(CustomSongLayer *, _QWORD))(*(_QWORD *)this + 1072LL))(this, 0);
return (*(__int64 (__fastcall **)(CustomSongLayer *, __int64))(*(_QWORD *)this + 528LL))(this, 1);
}