//
// MusicDownloadManager::deleteSong from 0x96cee0 to 0x96cf6c (140 bytes)
//
// 5 xrefs:
// > GJSongBrowser::FLAlert_Clicked @ 0x6e7200
// > CustomSongCell::onDelete @ 0x7359a4
// > CustomSongWidget::deleteSong @ 0x86ad2c
// > MusicDownloadManager::limitDownloadedSongs @ 0x96d1ac
// > ??> @ 0xf5b48
//
// 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:39 +0000
//
__int64 __fastcall MusicDownloadManager::deleteSong(MusicDownloadManager *this, int a2)
{
char *v2; // x0
__int64 v4[2]; // [xsp+20h] [xbp+20h] BYREF
char *filename; // [xsp+30h] [xbp+30h]
MusicDownloadManager::pathForSong(v4, this, a2);
v2 = (char *)v4 + 1;
if ( (v4[0] & 1) != 0 )
v2 = filename;
remove(v2);
if ( (v4[0] & 1) != 0 )
operator delete(filename);
return _stack_chk_guard;
}