//
// sub_54E1C from 0x54e1c to 0x54e6a (78 bytes)
//
// 3 xrefs:
// > sub_5A3F8 @ 0x5a44a
// > sub_6586C @ 0x658c6
// > FMOD::SoundGroup::getNumPlaying @ 0xb6db0
//
// 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
//
int __fastcall sub_54E1C(int a1, _DWORD *a2)
{
_DWORD *v4; // r0
_DWORD *v5; // r5
_DWORD *v6; // t1
int v7; // r1
if ( !a2 )
return 31;
j_FMOD_OS_CriticalSection_Enter(*(int *)((char *)&dword_10C + (_DWORD)off_E8000));
v6 = *(_DWORD **)(a1 + 20);
v5 = (_DWORD *)(a1 + 20);
v4 = v6;
v7 = 0;
*a2 = 0;
while ( v4 != v5 )
{
v7 += *(_DWORD *)(v4[2] + 208);
*a2 = v7;
v4 = (_DWORD *)*v4;
}
j_FMOD_OS_CriticalSection_Leave(*(int *)((char *)&dword_10C + (_DWORD)off_E8000));
return 0;
}