//
// FMOD::Sound::get3DCustomRolloff from 0xb5144 to 0xb51d6 (146 bytes)
//
// 1 xrefs:
// > FMOD::Sound::get3DCustomRolloff @ 0xe0538
//
// 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::get3DCustomRolloff(int a1, const void *a2, _DWORD *a3)
{
int v6; // r5
int v7; // r0
int v8; // r0
int v9; // r0
_BYTE v11[256]; // [sp+4h] [bp-11Ch] BYREF
_DWORD *v12; // [sp+104h] [bp-1Ch] BYREF
v6 = sub_54E84(a1, &v12, 0);
if ( !v6 )
{
v7 = v12[47];
__dmb(0xBu);
if ( !v7 || (v8 = v12[47], __dmb(0xBu), v8 == 7) || (v9 = v12[47], __dmb(0xBu), v9 == 5) )
{
v6 = (*(int (__fastcall **)(_DWORD *, const void *, _DWORD *))(*v12 + 56))(v12, a2, a3);
if ( !v6 )
return 0;
}
else
{
v6 = 46;
}
}
if ( (*((_BYTE *)&dword_14 + (_DWORD)off_E8000) & 0x80) != 0 )
{
sub_AF968((int)v11, 256, a2, a3);
sub_BAB40(v6, 5, a1, "Sound::get3DCustomRolloff", v11);
}
return v6;
}