//
// FMOD::Sound::release from 0x1005e453c to 0x1005e462c (240 bytes)
//
// 3 xrefs:
// > sub_1001B5F0C @ 0x1001b5f78
// > FMODAudioEngine::preloadMusic @ 0x1001ba3a4
// > sub_1005790EC @ 0x1005790f0
//
// 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::release(__int64 a1)
{
__int64 v2; // x20
__int64 v4; // x21
__int64 *v5; // [xsp+0h] [xbp-130h] BYREF
_BYTE v6[256]; // [xsp+8h] [xbp-128h] BYREF
v2 = sub_1005E9E48(a1, &v5, 0);
if ( !(_DWORD)v2 )
{
v4 = v5[27];
if ( v4 )
{
v2 = sub_100568E64(v5[27]);
if ( !(_DWORD)v2 )
{
v2 = (*(__int64 (__fastcall **)(__int64 *, __int64))(*v5 + 24))(v5, 1);
sub_100568EE8(v4);
if ( !(_DWORD)v2 )
return v2;
}
}
else
{
v2 = 28;
}
}
if ( (*((_BYTE *)off_1009DA5E8 + 32) & 0x80) != 0 )
{
v6[0] = 0;
sub_1005AAA04(v2, 5, a1, (__int64)"Sound::release", (__int64)v6);
}
return v2;
}