//
// GJSongBrowser::FLAlert_Clicked from 0x1006d6320 to 0x1006d63d2 (178 bytes)
//
// 2 xrefs:
// > sub_1006D63E0 @ 0x1006d63ec
// > ??> @ 0x100b90f58
//
// This function is hookable on this platform (idp: pc, 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:35:40 +0000
//
char __fastcall GJSongBrowser::FLAlert_Clicked(__int64 a1, __int64 a2, char a3, double a4)
{
char result; // al
__int64 v5; // rax
__int64 DownloadedSongs; // r14
unsigned int v7; // r15d
std::error_code *v8; // rax
__int64 v9; // rax
result = a3 ^ 1 | ((*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) != 1);
if ( !result )
{
v5 = MusicDownloadManager::sharedState();
DownloadedSongs = MusicDownloadManager::getDownloadedSongs(v5, a4);
if ( (unsigned int)sub_1007FEF90(DownloadedSongs) )
{
v7 = 0;
do
{
sub_1007FEFE0(DownloadedSongs, v7);
v8 = (std::error_code *)MusicDownloadManager::sharedState();
MusicDownloadManager::deleteSong(v8);
++v7;
}
while ( v7 < (unsigned int)sub_1007FEF90(DownloadedSongs) );
}
v9 = MusicDownloadManager::sharedState();
MusicDownloadManager::clearUnusedSongs(v9, a4);
return (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1320LL))(a1, 0);
}
return result;
}