//
// FMOD::Sound::getMusicNumChannels from 0xd9f68 to 0xd9ff0 (136 bytes)
//
// 4 xrefs:
// > FMOD::Sound::getMusicNumChannels @ 0x10737c
// > ??> @ 0x2590
// > FMOD::Sound::getMusicNumChannels @ 0x107374
// > ??> @ 0x110280
//
// 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 12:14:54 +0000
//
__int64 __fastcall FMOD::Sound::getMusicNumChannels(FMOD::Sound *this, int *a2)
{
unsigned int v2; // w21
__int64 v3; // x0
int v4; // w8
char v5; // zf
__int64 v6; // x0
__int64 v7; // x8
__int64 v8; // x0
char v9; // w8
__int64 v10; // x0
__int64 v12; // [xsp+0h] [xbp-130h] BYREF
v2 = sub_DA3C4(this);
if ( !v2 )
{
v3 = sub_DA368();
if ( !v4 || (v3 = sub_DA358(v3), v5) || (v3 = sub_DA410(v3), v5) )
{
v6 = sub_DA478(v3);
v8 = (*(__int64 (__fastcall **)(__int64))(v7 + 328))(v6);
v2 = v8;
if ( !(_DWORD)v8 )
goto LABEL_9;
}
else
{
v2 = 46;
}
}
v8 = sub_DA344();
if ( v9 < 0 )
{
v10 = sub_DA540(&v12);
v8 = sub_DA388(v10);
}
LABEL_9:
sub_DA538(v8);
return v2;
}