//
// MusicDownloadManager::getDownloadedSongs from 0x10058e4b0 to 0x10058e549 (153 bytes)
//
// 2 xrefs:
// > GJSongBrowser::customSetup @ 0x1005ff317
// > GJSongBrowser::FLAlert_Clicked @ 0x1005ff5d5
//
// 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
//
cocos2d::CCArray *__fastcall MusicDownloadManager::getDownloadedSongs(MusicDownloadManager *a1)
{
__int64 v1; // rsi
cocos2d::CCArray *v2; // rbx
cocos2d::CCDictionary *m_songObjects; // rax
cocos2d::CCDictElement *m_pElements; // r12
cocos2d::CCObject *m_pObject; // r15
v2 = (cocos2d::CCArray *)sub_10071F9E0(a1, v1);
m_songObjects = a1->m_songObjects;
if ( m_songObjects )
{
m_pElements = m_songObjects->m_pElements;
while ( m_pElements )
{
m_pObject = m_pElements->m_pObject;
m_pElements = (cocos2d::CCDictElement *)m_pElements->hh.next;
if ( MusicDownloadManager::isSongDownloaded(a1, m_pObject[5].m_uUnknown) )
sub_10071FCD0(v2, m_pObject);
}
}
if ( (unsigned int)sub_100720070(v2) >= 2 )
qsort(v2->data->arr, v2->data->num, 8u, (int (__cdecl *)(const void *, const void *))sub_1005895B0);
return v2;
}