//
// MusicSearchResult::updateFutureCount from 0x5751b4 to 0x57536e (442 bytes)
//
// 1 xrefs:
// > MusicSearchResult::updateObjects @ 0x5753fa
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:52:41 +0000
//
int __fastcall MusicSearchResult::updateFutureCount(
MusicSearchResult *this,
cocos2d::CCArray *a2,
cocos2d::CCArray *a3,
cocos2d::CCArray *a4)
{
int v8; // r0
int v9; // r3
int v10; // r3
_DWORD *v11; // r3
int *v12; // r5
int *v13; // r4
int v14; // r3
int v15; // t1
_DWORD *v16; // r8
_DWORD *v17; // r9
_DWORD *v18; // r0
_DWORD *v19; // r2
int *v20; // r4
int *v21; // r5
int v22; // r2
cocos2d::CCArray *v23; // r0
int v24; // r8
int v25; // t1
_DWORD *v26; // r2
int v27; // r3
int *v28; // r2
unsigned int v29; // r4
int *v30; // r8
int v31; // r3
int v32; // r10
int v33; // t1
_DWORD *v34; // r2
int *v35; // r6
int *v36; // r4
int v38; // r8
int v39; // t1
int v40; // r3
_DWORD *v41; // r0
_DWORD *v42; // r0
_DWORD *i; // r9
_DWORD *v44; // r0
_DWORD *v45; // r0
int v46; // r3
int v47; // [sp+0h] [bp-Ch]
int *v48; // [sp+8h] [bp-4h] BYREF
_DWORD *v49; // [sp+Ch] [bp+0h] BYREF
int v50; // [sp+10h] [bp+4h]
v8 = cocos2d::CCArray::count(a2);
v49 = nullptr;
v50 = 0;
v9 = *((unsigned __int8 *)this + 98);
v48 = (int *)&v49;
if ( !v9 )
a3 = a2;
v47 = v8;
if ( a3 )
{
v11 = *((_DWORD **)a3 + 13);
if ( *v11 )
{
v12 = (int *)v11[3];
v13 = &v12[*v11 - 1];
while ( v12 <= v13 )
{
v15 = *v12++;
v14 = v15;
if ( !v15 )
break;
v16 = *(_DWORD **)(v14 + 436);
v17 = (_DWORD *)(v14 + 440);
while ( v16 != v17 )
{
v18 = std::map::operator[](&v48, v16 + 4);
++*v18;
v16 = std::__tree_next *>(v16);
}
}
}
}
v10 = *((_DWORD *)this + 15);
if ( v10 )
{
v19 = *(_DWORD **)(v10 + 52);
if ( *v19 )
{
v20 = (int *)v19[3];
v21 = &v20[*v19 - 1];
while ( v20 <= v21 )
{
v25 = *v20++;
v24 = v25;
if ( !v25 )
break;
if ( *((_BYTE *)this + 98) || !*(_BYTE *)(v24 + 56) )
{
v41 = std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::find(
(int)&v48,
(_DWORD *)(v24 + 52));
if ( v41 == &v49 )
v40 = 0;
else
v40 = v41[5];
}
else
{
v40 = v47;
}
*(_DWORD *)(v24 + 80) = v40;
}
}
}
std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::destroy(
(int)&v48,
v49);
v48 = (int *)&v49;
v50 = 0;
v49 = nullptr;
v23 = MusicSearchResult::applyTagFilters(this, a4, v22, 0);
if ( v23 )
{
v26 = *((_DWORD **)v23 + 13);
if ( *v26 )
{
v27 = *v26 + 0x40000000;
v28 = (int *)v26[3];
v29 = (unsigned int)&v28[v27 - 1];
v30 = v28;
while ( (unsigned int)v30 <= v29 )
{
v33 = *v30++;
v32 = v33;
if ( !v33 )
break;
v42 = std::map::operator[](&v48, (int *)(v32 + 304));
++*v42;
for ( i = *(_DWORD **)(v32 + 376); i; i = (_DWORD *)*i )
{
if ( i[2] != *(_DWORD *)(v32 + 304) )
{
v44 = std::map::operator[](&v48, i + 2);
++*v44;
}
}
}
}
}
v31 = *((_DWORD *)this + 16);
if ( v31 )
{
v34 = *(_DWORD **)(v31 + 52);
if ( *v34 )
{
v35 = (int *)v34[3];
v36 = &v35[*v34 - 1];
while ( v35 <= v36 )
{
v39 = *v35++;
v38 = v39;
if ( !v39 )
break;
v45 = std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::find(
(int)&v48,
(_DWORD *)(v38 + 52));
if ( v45 == &v49 )
v46 = 0;
else
v46 = v45[5];
*(_DWORD *)(v38 + 80) = v46;
}
}
}
return std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::~__tree((int)&v48);
}