//
// FMOD::Sound::set3DMinMaxDistance from 0x1800a97b0 to 0x1800a9925 (373 bytes)
//
// 6 xrefs:
// > FMOD_Sound_Set3DMinMaxDistance @ 0x1800c6789
// > ??> @ 0x180186e84
// > ??> @ 0x180186ebc
// > ??> @ 0x180194348
// > ??> @ 0x1801fbd24
// > ??> @ 0x1801fbd30
//
// This function is hookable on this platform (idp: pc, 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 10:53:55 +0000
//
__int64 __fastcall FMOD::Sound::set3DMinMaxDistance(__int64 a1)
{
int v1; // ebp
unsigned int v2; // esi
int v3; // ebx
int v4; // eax
_DWORD *v6; // [rsp+30h] [rbp-158h] BYREF
__int64 v7; // [rsp+38h] [rbp-150h] BYREF
_BYTE v8[256]; // [rsp+40h] [rbp-148h] BYREF
v7 = 0;
v1 = a1;
v2 = sub_1800E1460(a1, &v6, &v7);
if ( !v2 )
{
if ( !v6[68] || v6[68] == 7 )
{
v2 = (*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)v6 + 72LL))(v6);
if ( !v2 )
goto LABEL_8;
}
else
{
v2 = 46;
}
}
if ( *((char *)off_1801AED20 + 16) < 0 )
{
v3 = sub_1800F2F20(v8, 256);
v4 = sub_1800F2F70(&v8[v3]);
sub_1800F2F20(&v8[v4 + v3], (unsigned int)(256 - (v4 + v3)));
sub_1800B20E0(v2, 5, v1, (unsigned int)"Sound::set3DMinMaxDistance", (__int64)v8);
}
LABEL_8:
if ( v7 )
sub_180102300(v7, 12);
return v2;
}