//
// MusicDownloadManager::getDownloadedSongs from 0x10064e4d0 to 0x10064e569 (153 bytes)
//
// 2 xrefs:
// > GJSongBrowser::customSetup @ 0x1006d6097
// > GJSongBrowser::FLAlert_Clicked @ 0x1006d6355
//
// 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:34:48 +0000
//
__int64 __fastcall MusicDownloadManager::getDownloadedSongs(__int64 a1, double a2)
{
__int64 v2; // rbx
__int64 v3; // rax
__int64 v4; // r12
__int64 v5; // r15
v2 = sub_1007FE900(a1);
v3 = *(_QWORD *)(a1 + 344);
if ( v3 )
{
v4 = *(_QWORD *)(v3 + 56);
while ( v4 )
{
v5 = *(_QWORD *)(v4 + 264);
v4 = *(_QWORD *)(v4 + 288);
if ( (unsigned __int8)MusicDownloadManager::isSongDownloaded(a1, *(unsigned int *)(v5 + 316), a2) )
sub_1007FEBF0(v2, v5);
}
}
if ( (unsigned int)sub_1007FEF90(v2) >= 2 )
qsort(
*(void **)(*(_QWORD *)(v2 + 56) + 16LL),
**(unsigned int **)(v2 + 56),
8u,
(int (__cdecl *)(const void *, const void *))sub_100649600);
return v2;
}