//
// sub_1005E9D94 from 0x1005e9d94 to 0x1005e9e1c (136 bytes)
//
// 3 xrefs:
// > sub_100569B08 @ 0x100569bd4
// > FMOD::SoundGroup::getNumPlaying @ 0x1005e93fc
// > sub_1005F921C @ 0x1005f92a8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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:09:44 +0000
//
__int64 __fastcall sub_1005E9D94(__int64 a1, _DWORD *a2)
{
_QWORD *v4; // x8
_QWORD *v5; // x20
_QWORD *v6; // t1
int v7; // w9
if ( !a2 )
return 31;
sub_1005DBDD8(*((pthread_mutex_t **)off_1009DA5E8 + 38));
v6 = *(_QWORD **)(a1 + 40);
v5 = (_QWORD *)(a1 + 40);
v4 = v6;
*a2 = 0;
if ( v6 != v5 )
{
v7 = 0;
do
{
v7 += *(_DWORD *)(v4[2] + 312LL);
*a2 = v7;
v4 = (_QWORD *)*v4;
}
while ( v4 != v5 );
}
sub_1005DBE08(*((pthread_mutex_t **)off_1009DA5E8 + 38));
return 0;
}