//
// MusicSearchResult::applyArtistFilters from 0x10015c888 to 0x10015c978 (240 bytes)
//
// 1 xrefs:
// > MusicSearchResult::updateObjects_1 @ 0x10015cb4c
//
// 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 MusicSearchResult::applyArtistFilters(MusicSearchResult *a1, cocos2d::CCArray *a2)
{
cocos2d::CCArray *v2; // x19
__int64 v4; // x0
__int64 v5; // x0
cocos2d::CCArray *m_artistFilterObjects; // x8
cocos2d::ccArray *data; // x9
__int64 num; // x8
cocos2d::CCArray *v9; // x21
cocos2d::CCObject **arr; // x22
unsigned __int64 v11; // x23
cocos2d::CCObject *v12; // x25
MusicDownloadManager *v13; // x0
cocos2d::CCArray *v14; // x0
cocos2d::ccArray *v15; // x9
__int64 v16; // x8
cocos2d::CCObject **v17; // x25
unsigned __int64 v18; // x26
v2 = a2;
v4 = sub_10024A36C(a2);
if ( (_DWORD)v4 )
{
v5 = sub_10024A15C(v4);
a1->m_artistFilter = 0;
m_artistFilterObjects = a1->m_artistFilterObjects;
if ( m_artistFilterObjects )
{
data = m_artistFilterObjects->data;
num = data->num;
if ( (_DWORD)num )
{
v9 = (cocos2d::CCArray *)v5;
arr = data->arr;
v11 = (unsigned __int64)&arr[num - 1];
do
{
v12 = *arr;
if ( !*arr )
break;
if ( BYTE4(v12[1].__vftable) == 1 )
{
a1->m_artistFilter = 1;
v13 = MusicDownloadManager::sharedState();
v14 = MusicDownloadManager::filterMusicByArtistID(v13, (int)v12[1].__vftable, v2);
if ( v14 )
{
v15 = v14->data;
v16 = v15->num;
if ( (_DWORD)v16 )
{
v17 = v15->arr;
v18 = (unsigned __int64)&v17[v16 - 1];
do
{
if ( !*v17 )
break;
sub_10024A2D0(v9, *v17++);
}
while ( (unsigned __int64)v17 <= v18 );
}
}
}
++arr;
}
while ( (unsigned __int64)arr <= v11 );
if ( a1->m_artistFilter )
return v9;
}
}
}
return v2;
}