//
// FMOD::System::getChannelsPlaying from 0x1004cb758 to 0x1004cb870 (280 bytes)
//
// 1 xrefs:
// > sub_100452CB4 @ 0x100452cb8
//
// 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
//
FMOD_RESULT __fastcall FMOD::System::getChannelsPlaying(FMOD::System *a1, int *a2, int *a3)
{
int v6; // w3
int v7; // w4
int v8; // w5
int v9; // w6
int v10; // w7
__int64 v11; // x20
int v12; // w0
__int64 v13; // x22
int v14; // w3
int v15; // w4
int v16; // w5
int v17; // w6
int v18; // w7
int v19; // w0
int v20; // w3
int v21; // w4
int v22; // w5
int v23; // w6
int v24; // w7
__int64 v26; // [xsp+0h] [xbp-150h] BYREF
_BYTE v27[256]; // [xsp+8h] [xbp-148h] BYREF
v11 = sub_1004CE440(a1, &v26, 0);
if ( (_DWORD)v11 || (v11 = sub_1004D2814(v26, a2, a3), (_DWORD)v11) )
{
if ( (*((_BYTE *)off_1008524C8 + 32) & 0x80) != 0 )
{
v12 = sub_1004360AC((int)v27, 0x100u, (__int64)a2, v6, v7, v8, v9, v10);
v13 = v12;
v19 = sub_100435EB4(&v27[v12], (unsigned int)(256 - v12), ", ", v14, v15, v16, v17, v18);
sub_1004360AC((int)&v27[v13 + v19], (unsigned int)(256 - (v13 + v19)), (__int64)a3, v20, v21, v22, v23, v24);
sub_10048489C(v11, 1, (__int64)a1, (__int64)"System::getChannelsPlaying", (__int64)v27);
}
}
return (unsigned int)v11;
}