//
// FMOD::Sound::get3DCustomRolloff from 0x1005e5598 to 0x1005e56f8 (352 bytes)
//
// 1 xrefs:
// > sub_10057919C @ 0x1005791a0
//
// 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:42 +0000
//
__int64 __fastcall FMOD::Sound::get3DCustomRolloff(__int64 a1, __int64 a2, __int64 a3)
{
int v6; // w3
int v7; // w4
int v8; // w5
int v9; // w6
int v10; // w7
__int64 v11; // x21
unsigned int v12; // w8
unsigned int v13; // w8
unsigned int v14; // w8
int v15; // w0
__int64 v16; // x22
int v17; // w3
int v18; // w4
int v19; // w5
int v20; // w6
int v21; // w7
int v22; // w0
int v23; // w3
int v24; // w4
int v25; // w5
int v26; // w6
int v27; // w7
unsigned int *v29; // [xsp+0h] [xbp-150h] BYREF
_BYTE v30[256]; // [xsp+8h] [xbp-148h] BYREF
v11 = sub_1005E9E48(a1, &v29, 0);
if ( !(_DWORD)v11 )
{
v12 = atomic_load(v29 + 68);
if ( !v12 || (v13 = atomic_load(v29 + 68), v13 == 7) || (v14 = atomic_load(v29 + 68), v14 == 5) )
{
v11 = (*(__int64 (__fastcall **)(unsigned int *, __int64, __int64))(*(_QWORD *)v29 + 112LL))(v29, a2, a3);
if ( !(_DWORD)v11 )
return v11;
}
else
{
v11 = 46;
}
}
if ( (*((_BYTE *)off_1009DA5E8 + 32) & 0x80) != 0 )
{
v15 = sub_10055C48C((int)v30, 0x100u, a2, v6, v7, v8, v9, v10);
v16 = v15;
v22 = sub_10055C01C(&v30[v15], (unsigned int)(256 - v15), ", ", v17, v18, v19, v20, v21);
sub_10055C214((int)&v30[v16 + v22], (unsigned int)(256 - (v16 + v22)), a3, v23, v24, v25, v26, v27);
sub_1005AAA04(v11, 5, a1, (__int64)"Sound::get3DCustomRolloff", (__int64)v30);
}
return v11;
}