//
// sub_52EDC from 0x52edc to 0x52f12 (54 bytes)
//
// 1 xrefs:
// > sub_52A58 @ 0x52b2e
//
// 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:44 +0000
//
int __fastcall sub_52EDC(_DWORD *a1, int a2)
{
int v3; // r0
int v4; // r2
if ( a2 < 0 )
return 28;
v3 = a1[1];
if ( v3 <= a2 )
return 28;
v4 = ~a2 + v3;
if ( v4 >= 1 )
{
memmove((void *)(*a1 + 8 * a2), (const void *)(*a1 + 8 * a2 + 8), 8 * v4);
v3 = a1[1];
}
a1[1] = v3 - 1;
return 0;
}