//
// MusicDownloadManager::getAllMusicTags from 0x100594560 to 0x10059469c (316 bytes)
//
// 1 xrefs:
// > MusicSearchResult::createTagFilterObjects @ 0x100599307
//
// 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::getAllMusicTags(MusicDownloadManager *a1, OptionsObjectDelegate *a2)
{
__int128 v2; // xmm0
cocos2d::CCArray *v3; // rbx
std::__tree, std::__map_value_compare, std::less, true>, std::allocator>>::__iter_pointer begin_node; // r12
int left; // r13d
char *v6; // r13
MusicDownloadManager *v7; // rcx
MusicDownloadManager *v8; // rax
bool v9; // zf
std::string v11[2]; // [rsp+0h] [rbp-40h] BYREF
v3 = (cocos2d::CCArray *)sub_10071FD00(LODWORD(a1->m_musicTags.__tree_.__pair3_.__value_));
begin_node = a1->m_musicTags.__tree_.__begin_node_;
if ( begin_node != (std::__tree, std::__map_value_compare, std::less, true>, std::allocator>>::__iter_pointer)&a1->m_musicTags.__tree_.__pair1_ )
{
do
{
left = (int)begin_node[4].__left_;
if ( ((__int64)begin_node[5].__left_ & 1) != 0 )
{
sub_100006B70(v11, begin_node[7].__left_, (unsigned __int64)begin_node[6].__left_, *(double *)&v2);
}
else
{
v11[0].__r_.__value_.__r.__words[2] = (std::string::size_type)begin_node[7].__left_;
v2 = *(_OWORD *)&begin_node[5].__left_;
*(_OWORD *)&v11[0].__r_.__value_.__l.0 = v2;
}
v6 = OptionsObject::create(left, 0, v11, (__int64)a2);
if ( (*(_BYTE *)&v11[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(v11[0].__r_.__value_.__l.__data_);
sub_10071FCD0(v3, v6);
v7 = (MusicDownloadManager *)begin_node[1].__left_;
if ( v7 )
{
do
{
v8 = v7;
v7 = (MusicDownloadManager *)v7->cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
}
while ( v7 );
}
else
{
do
{
v8 = (MusicDownloadManager *)begin_node[2].__left_;
v9 = v8->cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable == (MusicDownloadManager_vtbl *)begin_node;
begin_node = (std::__tree, std::__map_value_compare, std::less, true>, std::allocator>>::__iter_pointer)v8;
}
while ( !v9 );
}
begin_node = (std::__tree, std::__map_value_compare, std::less, true>, std::allocator>>::__iter_pointer)v8;
}
while ( v8 != (MusicDownloadManager *)&a1->m_musicTags.__tree_.__pair1_ );
}
if ( (unsigned int)sub_100720070(v3) >= 2 )
qsort(v3->data->arr, v3->data->num, 8u, (int (__cdecl *)(const void *, const void *))sub_100589CA0);
return v3;
}