//
// sub_10054BA4C from 0x10054ba4c to 0x10054baac (96 bytes)
//
// 2 xrefs:
// > sub_1005442EC @ 0x1005444d8
// > sub_100544518 @ 0x100544520
//
// 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:50 +0000
//
__int64 __fastcall sub_10054BA4C(__int64 a1)
{
void **v2; // x9
void **v3; // x20
void **v4; // x8
v3 = *(void ***)(a1 + 8);
v2 = *(void ***)(a1 + 16);
if ( v2 != v3 )
{
do
{
v4 = v2 - 4;
*(_QWORD *)(a1 + 16) = v2 - 4;
if ( *((char *)v2 - 9) < 0 )
{
operator delete(*v4);
v4 = *(void ***)(a1 + 16);
}
v2 = v4;
}
while ( v4 != v3 );
}
if ( *(_QWORD *)a1 )
operator delete(*(void **)a1);
return a1;
}