//
// sub_BE162 from 0xbe162 to 0xbe198 (54 bytes)
//
// 2 xrefs:
// > FMOD_OS_Debug_Output @ 0xbe14c
// > sub_BE420 @ 0xbe42e
//
// 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
//
signed int __fastcall sub_BE162(char *a1, signed int a2, const char *a3, void *a4)
{
signed int v4; // r4
int v7; // r0
v4 = 0;
if ( a2 >= 1 )
{
*a1 = 0;
v7 = vsnprintf(a1, a2, a3, a4);
a1[a2 - 1] = 0;
v4 = a2;
if ( v7 < a2 )
v4 = v7;
if ( v7 <= -1 )
return a2;
}
return v4;
}