//
// sub_75BD2C from 0x75bd2c to 0x75bd7a (78 bytes)
//
// 0 xrefs:
//
// 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_75BD2C(_DWORD *a1, int a2)
{
unsigned int v2; // r2
_BOOL4 v4; // r0
int v6; // r1
v2 = a1[2];
if ( a1[1] >= v2 )
return -1;
if ( a2 == -1 )
{
v6 = 0;
a1[2] = v2 - 1;
return v6;
}
v4 = *(unsigned __int8 *)(v2 - 1) == (unsigned __int8)a2;
if ( !((a1[8] >> 4) & 1 | v4) )
return -1;
a1[2] = v2 - 1;
if ( !v4 )
*(_BYTE *)(v2 - 1) = a2;
return a2;
}