//
// sub_58500 from 0x58500 to 0x5854c (76 bytes)
//
// 1 xrefs:
// > FMOD::System::setDSPBufferSize @ 0xb75f0
//
// 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
//
int __fastcall sub_58500(int a1, unsigned int a2, int a3)
{
int v3; // r3
if ( *(_BYTE *)(a1 + 4) )
return 27;
v3 = 31;
if ( a2 && a3 >= 2 )
{
if ( (a3 * (unsigned __int64)a2) >> 31 )
{
return 31;
}
else
{
if ( a2 << 30 )
a2 = (a2 + 3) & 0xFFFFFFFC;
v3 = 0;
*(_DWORD *)(a1 + 1192) = a2;
*(_DWORD *)(a1 + 1196) = a3 * a2;
}
}
return v3;
}