//
// MusicDownloadManager::getDownloadedSongs from 0x82fd40 to 0x82fdfc (188 bytes)
//
// 4 xrefs:
// > GJSongBrowser::customSetup @ 0x5be880
// > GJSongBrowser::FLAlert_Clicked @ 0x5be990
// > MusicDownloadManager::limitDownloadedSongs @ 0x82fe24
// > ??> @ 0xc11e8
//
// 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 *MusicDownloadManager::getDownloadedSongs(MusicDownloadManager *a1)
{
cocos2d::CCArray *v2; // x22
cocos2d::CCDictionary *m_songObjects; // x0
cocos2d::CCDictElement *m_pElements; // x0
cocos2d::CCObject *m_pObject; // x20
_QWORD *next; // x19
_QWORD *v7; // x0
v2 = (cocos2d::CCArray *)cocos2d::CCArray::create((cocos2d::CCArray *)a1);
m_songObjects = a1->m_songObjects;
if ( m_songObjects )
{
m_pElements = m_songObjects->m_pElements;
if ( m_pElements )
{
m_pObject = m_pElements->m_pObject;
next = m_pElements->hh.next;
if ( MusicDownloadManager::isSongDownloaded(a1, m_pObject[5].m_uUnknown) )
goto LABEL_6;
while ( next )
{
while ( 1 )
{
v7 = next;
next = (_QWORD *)next[36];
m_pObject = (cocos2d::CCObject *)v7[33];
if ( !MusicDownloadManager::isSongDownloaded(a1, m_pObject[5].m_uUnknown) )
break;
LABEL_6:
cocos2d::CCArray::addObject(v2, m_pObject);
if ( !next )
goto LABEL_7;
}
}
}
}
LABEL_7:
if ( (unsigned int)cocos2d::CCArray::count(v2) > 1 )
qsort(v2->data->arr, v2->data->num, 8u, (int (*)(const void *, const void *))songCompare);
return v2;
}