//
// 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 (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:40:45 +0000
//
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;
}