//
// GJSongBrowser::FLAlert_Clicked from 0x6e7198 to 0x6e724c (180 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'GJSongBrowser::FLAlert_Clicked @ 0x6e7250
// > ??> @ 0x992c8
// > ??> @ 0x14258a8
//
// 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:51:43 +0000
//
MusicDownloadManager *__fastcall GJSongBrowser::FLAlert_Clicked(
GJSongBrowser *this,
FLAlertLayer *a2,
unsigned __int8 a3)
{
int v4; // w19
MusicDownloadManager *result; // x0
MusicDownloadManager *v6; // x0
unsigned int v7; // w19
cocos2d::CCArray *DownloadedSongs; // x20
int *v9; // x21
MusicDownloadManager *v10; // x0
bool v11; // cf
unsigned int v12; // w1
MusicDownloadManager *v13; // x0
v4 = a3;
result = (MusicDownloadManager *)(*(__int64 (__fastcall **)(FLAlertLayer *))(*(_QWORD *)a2 + 64LL))(a2);
if ( (_DWORD)result == 1 && v4 )
{
v6 = (MusicDownloadManager *)MusicDownloadManager::sharedState(result);
v7 = 0;
DownloadedSongs = (cocos2d::CCArray *)MusicDownloadManager::getDownloadedSongs(v6);
while ( 1 )
{
v11 = v7 >= (unsigned int)cocos2d::CCArray::count(DownloadedSongs);
v12 = v7++;
if ( v11 )
break;
v9 = (int *)cocos2d::CCArray::objectAtIndex(DownloadedSongs, v12);
v10 = (MusicDownloadManager *)MusicDownloadManager::sharedState((MusicDownloadManager *)v9);
MusicDownloadManager::deleteSong(v10, v9[79]);
}
v13 = (MusicDownloadManager *)MusicDownloadManager::sharedState(DownloadedSongs);
MusicDownloadManager::clearUnusedSongs(v13);
return (MusicDownloadManager *)(*(__int64 (__fastcall **)(GJSongBrowser *, _QWORD))(*(_QWORD *)this + 1320LL))(
this,
0);
}
return result;
}