//
// sub_5B99A from 0x5b99a to 0x5b9d4 (58 bytes)
//
// 1 xrefs:
// > sub_5793C @ 0x57944
//
// 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_5B99A(_DWORD *a1, int a2)
{
int v3; // r0
int result; // r0
int v6; // r1
v3 = a1[2];
if ( v3 < 0 )
v3 = -v3;
if ( v3 >= a2 || (result = sub_5B9F2(a1, a2)) == 0 )
{
v6 = a1[1];
if ( v6 < a2 )
memset((void *)(*a1 + 4 * v6), 0, 4 * (a2 - v6));
a1[1] = a2;
return 0;
}
return result;
}