//
// FMOD::Sound::getSubSound from 0xb51e0 to 0xb527a (154 bytes)
//
// 1 xrefs:
// > FMOD::Sound::getSubSound @ 0xe0548
//
// 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:41:42 +0000
//
int __fastcall FMOD::Sound::getSubSound(FMOD::Sound *this, int a2, FMOD::Sound **a3)
{
int v6; // r5
int v7; // r1
_BOOL4 v8; // r1
int v9; // r0
_BYTE v11[256]; // [sp+8h] [bp-120h] BYREF
int v12; // [sp+108h] [bp-20h] BYREF
_DWORD *v13; // [sp+10Ch] [bp-1Ch] BYREF
v12 = 0;
v6 = sub_54E84((int)this, &v13, (int)&v12);
if ( !v6 )
{
v7 = v13[46];
if ( v7 )
v8 = *(_DWORD *)(v7 + 188) != 15;
else
v8 = 1;
v9 = v13[47];
__dmb(0xBu);
if ( v8 && v9 )
{
v6 = 46;
}
else
{
v6 = (*(int (__fastcall **)(_DWORD *, int, FMOD::Sound **))(*v13 + 60))(v13, a2, a3);
if ( !v6 )
{
v6 = 0;
goto LABEL_11;
}
}
}
if ( (*((_BYTE *)&dword_14 + (_DWORD)off_E8000) & 0x80) != 0 )
{
sub_B5284(v11, 256, a2, a3);
sub_BAB40(v6, 5, this, "Sound::getSubSound", v11);
}
LABEL_11:
sub_6429C(&v12);
return v6;
}