//
// sub_51AF4 from 0x51af4 to 0x51b12 (30 bytes)
//
// 1 xrefs:
// > sub_58894 @ 0x588b6
//
// 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_51AF4(int a1, int a2, int *a3, int a4)
{
int *v5; // r0
int v6; // r0
if ( !a3 )
return 31;
v5 = (int *)sub_51802(a1, a2, (int)a3, a4);
if ( v5 )
v6 = *v5;
else
v6 = 1;
*a3 = v6;
return 0;
}