//
// sub_58500 from 0x58500 to 0x5854c (76 bytes)
//
// 1 xrefs:
// > FMOD::System::setDSPBufferSize @ 0xb75f0
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:40:47 +0000
//
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;
}