//
// sub_1000213F8 from 0x1000213f8 to 0x100021460 (104 bytes)
//
// 2 xrefs:
// > sub_10002127C @ 0x1000212e4
// > sub_1001498A8 @ 0x1001499a4
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 10:57:23 +0000
//
void __fastcall sub_1000213F8(void **a1)
{
void *v1; // x21
__int64 v3; // x20
void *v4; // x0
v1 = *a1;
if ( *a1 )
{
v3 = (__int64)a1[1];
v4 = *a1;
if ( (void *)v3 != v1 )
{
do
{
v3 -= 520;
sub_1000194F0((__int64)a1, v3);
}
while ( (void *)v3 != v1 );
v4 = *a1;
}
a1[1] = v1;
operator delete(v4);
*a1 = nullptr;
a1[1] = nullptr;
a1[2] = nullptr;
}
}