//
// CustomSongCell::onDelete from 0x100137aa4 to 0x100137b44 (160 bytes)
//
// 1 xrefs:
// > CustomSongCell::loadFromObject @ 0x1001273b4
//
// 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 10:59:27 +0000
//
__int64 __fastcall CustomSongCell::onDelete(__int64 a1)
{
__int64 v2; // x20
__int64 v3; // x0
__int64 isMusicPlaying; // x0
int v5; // w20
__int64 v6; // x0
__int64 v7; // x0
void *__p[2]; // [xsp+8h] [xbp-28h] BYREF
char v10; // [xsp+1Fh] [xbp-11h]
if ( *(_QWORD *)(a1 + 560) )
{
v2 = FMODAudioEngine::sharedEngine(a1);
v3 = MusicDownloadManager::sharedState(v2);
MusicDownloadManager::pathForSong(__p, v3, *(unsigned int *)(*(_QWORD *)(a1 + 560) + 316LL));
isMusicPlaying = FMODAudioEngine::isMusicPlaying(v2, __p, 0);
v5 = isMusicPlaying;
if ( v10 < 0 )
{
operator delete(__p[0]);
if ( !v5 )
goto LABEL_5;
}
else if ( !(_DWORD)isMusicPlaying )
{
LABEL_5:
v7 = MusicDownloadManager::sharedState(isMusicPlaying);
MusicDownloadManager::deleteSong(v7, *(unsigned int *)(*(_QWORD *)(a1 + 560) + 316LL));
return TableView::deleteTableViewCell(*(_QWORD *)(a1 + 416), a1);
}
v6 = FMODAudioEngine::sharedEngine(isMusicPlaying);
isMusicPlaying = FMODAudioEngine::stopAllMusic(v6, 1);
goto LABEL_5;
}
return TableView::deleteTableViewCell(*(_QWORD *)(a1 + 416), a1);
}