//
// MusicDownloadManager::deleteSong from 0x10058e9a0 to 0x10058e9eb (75 bytes)
//
// 3 xrefs:
// > CustomSongCell::onDelete @ 0x100253e9e
// > GJSongBrowser::FLAlert_Clicked @ 0x1005ff60e
// > CustomSongWidget::deleteSong @ 0x10061e9a2
//
// 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
//
void __fastcall MusicDownloadManager::deleteSong(MusicDownloadManager *a1, int a2)
{
std::string v2; // [rsp+8h] [rbp-18h] BYREF
MusicDownloadManager::pathForSong(&v2);
if ( (*(_BYTE *)&v2.__r_.__value_.__s.0 & 1) == 0 )
{
remove((const std::__fs::filesystem::path *)((char *)&v2.__r_.__value_.__l.0 + 1), (std::error_code *)a1);
if ( (*(_BYTE *)&v2.__r_.__value_.__s.0 & 1) == 0 )
return;
goto LABEL_5;
}
remove((const std::__fs::filesystem::path *)v2.__r_.__value_.__l.__data_, (std::error_code *)a1);
if ( (*(_BYTE *)&v2.__r_.__value_.__s.0 & 1) != 0 )
LABEL_5:
operator delete(v2.__r_.__value_.__l.__data_);
}