//
// sub_10051A1B0 from 0x10051a1b0 to 0x10051a218 (104 bytes)
//
// 1 xrefs:
// > sub_10051A044 @ 0x10051a09c
//
// 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 11:07:08 +0000
//
void __fastcall sub_10051A1B0(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 -= 80;
sub_1001E823C((__int64)a1, v3);
}
while ( (void *)v3 != v1 );
v4 = *a1;
}
a1[1] = v1;
operator delete(v4);
*a1 = nullptr;
a1[1] = nullptr;
a1[2] = nullptr;
}
}