//
// FMOD::DSPI::validate from 0xc986c to 0xc98d8 (108 bytes)
//
// 4 xrefs:
// > FMOD::DSPI::validate @ 0x109a9c
// > ??> @ 0x2bd8
// > FMOD::DSPI::validate @ 0x109a94
// > ??> @ 0x111610
//
// 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:47 +0000
//
__int64 __fastcall FMOD::DSPI::validate(__int64 a1, _QWORD *a2, _QWORD *a3)
{
__int16 v3; // w8
__int64 result; // x0
if ( !a2 )
return 31;
*a2 = a1;
if ( !a1 )
return 30;
if ( (a1 & 3) != 0 )
return 30;
v3 = atomic_load((unsigned int *)(a1 + 100));
if ( (v3 & 0x400) != 0 || *(_DWORD *)(a1 + 92) != -1395763731 )
return 30;
if ( !a3 )
return 0;
result = sub_50238(a3, *(_QWORD *)(a1 + 168));
if ( !(_DWORD)result )
return 0;
return result;
}