//
// MusicDownloadManager::clearSortedMusicCache from 0x95f37c to 0x95f428 (172 bytes)
//
// 3 xrefs:
// > MusicDownloadManager::~MusicDownloadManager @ 0x95f4e8
// > MusicDownloadManager::parseMusicLibrary @ 0x976c98
// > ??> @ 0x71c50
//
// 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:57:30 +0000
//
void __fastcall MusicDownloadManager::clearSortedMusicCache(MusicDownloadManager *this)
{
char *v1; // x20
char *v3; // x19
char *v4; // x0
_QWORD **v5; // x19
char *v6; // x0
bool v7; // zf
v1 = (char *)this + 496;
v3 = *((char **)this + 61);
while ( v3 != v1 )
{
while ( 1 )
{
cocos2d::CCObject::release(*((cocos2d::CCObject **)v3 + 5));
v4 = *((char **)v3 + 1);
if ( !v4 )
break;
do
{
v3 = v4;
v4 = *(char **)v4;
}
while ( v4 );
if ( v3 == v1 )
goto LABEL_6;
}
v6 = v3;
do
{
v3 = *((char **)v3 + 2);
v7 = v6 == *(char **)v3;
v6 = v3;
}
while ( !v7 );
}
LABEL_6:
v5 = *((_QWORD ***)this + 62);
if ( v5 )
{
std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::destroy(
(__int64)this + 488,
*v5);
std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::destroy(
(__int64)this + 488,
v5[1]);
operator delete(v5);
}
*((_QWORD *)this + 63) = 0;
*((_QWORD *)this + 61) = v1;
*((_QWORD *)this + 62) = 0;
}