//
// FMOD::Sound::release from 0x1800a9280 to 0x1800a9356 (214 bytes)
//
// 3 xrefs:
// > FMOD_Sound_Release @ 0x1800c6749
// > ??> @ 0x180194348
// > ??> @ 0x1801fbca0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall FMOD::Sound::release(__int64 a1)
{
int v1; // esi
unsigned int v2; // ebx
__int64 v3; // rdi
__int64 v4; // rdx
_QWORD *v6; // [rsp+30h] [rbp-128h] BYREF
_BYTE v7[256]; // [rsp+40h] [rbp-118h] BYREF
v1 = a1;
v2 = sub_1800E1460(a1, &v6, 0);
if ( !v2 )
{
v3 = v6[27];
if ( v3 )
{
v2 = sub_1801021E0(v6[27]);
if ( !v2 )
{
LOBYTE(v4) = 1;
v2 = (*(__int64 (__fastcall **)(_QWORD *, __int64))(*v6 + 24LL))(v6, v4);
sub_180102320(v3);
if ( !v2 )
return 0;
}
}
else
{
v2 = 28;
}
}
if ( *((char *)off_1801AED20 + 16) < 0 )
{
v7[0] = 0;
sub_1800B20E0(v2, 5, v1, (unsigned int)"Sound::release", (__int64)v7);
}
return v2;
}