//
// CustomSongLayer::onClose from 0x57ad1c to 0x57ad60 (68 bytes)
//
// 1 xrefs:
// > CustomSongLayer::keyBackClicked @ 0x57ad62
//
// 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:52:48 +0000
//
int __fastcall CustomSongLayer::onClose(CustomSongLayer *this, cocos2d::CCObject *a2)
{
void (__fastcall ***v3)(_DWORD, cocos2d::CCObject *); // r0
FMODAudioEngine *v4; // r0
FMODAudioEngine *v5; // r0
v3 = *((void (__fastcall ****)(_DWORD, cocos2d::CCObject *))this + 135);
if ( v3 )
(**v3)(v3, a2);
v4 = (FMODAudioEngine *)(*(int (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 133) + 580))(
*((_DWORD *)this + 133),
0);
v5 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(v4);
FMODAudioEngine::stopAllMusic(v5, 1);
(*(void (__fastcall **)(CustomSongLayer *, _DWORD))(*(_DWORD *)this + 536))(this, 0);
return (*(int (__fastcall **)(CustomSongLayer *, int))(*(_DWORD *)this + 264))(this, 1);
}