//
// GJSongBrowser::FLAlert_Clicked from 0x1402b7b30 to 0x1402b7c29 (249 bytes)
//
// 4 xrefs:
// > ??> @ 0x14057fa30
// > ??> @ 0x14068bdac
// > ??> @ 0x14068bdbc
// > ??> @ 0x1406d257c
//
// 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 GJSongBrowser::FLAlert_Clicked(GJSongBrowser *a1, FLAlertLayer *a2, bool a3)
{
MusicDownloadManager *v5; // rax
cocos2d::CCArray *DownloadedSongs; // rsi
unsigned int i; // edi
unsigned int m_unknown2; // ebx
MusicDownloadManager *v9; // rax
const char *v10; // rcx
MusicDownloadManager *v11; // rax
char *FileName[4]; // [rsp+20h] [rbp-48h] BYREF
if ( a2->getTag(a2) == 1 && a3 )
{
v5 = MusicDownloadManager::sharedState();
DownloadedSongs = MusicDownloadManager::getDownloadedSongs(v5);
for ( i = 0; i < cocos2d::CCArray::count(DownloadedSongs); ++i )
{
m_unknown2 = cocos2d::CCArray::objectAtIndex(DownloadedSongs, i)[5].m_unknown2;
v9 = MusicDownloadManager::sharedState();
MusicDownloadManager::pathForSong(v9, FileName, m_unknown2);
v10 = (const char *)FileName;
if ( FileName[3] > (char *)0xF )
v10 = FileName[0];
remove(v10);
sub_14003A830((__int64)FileName);
}
v11 = MusicDownloadManager::sharedState();
MusicDownloadManager::clearUnusedSongs(v11);
(*(void (__fastcall **)(float *, _QWORD))(*(_QWORD *)&a1[-1].m_obPosition.y + 1056LL))(&a1[-1].m_obPosition.y, 0);
}
}