//
// sub_1005168D0 from 0x1005168d0 to 0x100516924 (84 bytes)
//
// 1 xrefs:
// > sub_10051689C @ 0x1005168b0
//
// 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:06 +0000
//
void __fastcall sub_1005168D0(__int64 a1, __int64 a2)
{
__int64 v2; // x8
__int64 v5; // x9
v2 = *(_QWORD *)(a1 + 16);
if ( v2 != a2 )
{
do
{
v5 = v2 - 56;
*(_QWORD *)(a1 + 16) = v2 - 56;
if ( *(char *)(v2 - 9) < 0 )
{
operator delete(*(void **)(v2 - 32));
v5 = *(_QWORD *)(a1 + 16);
}
v2 = v5;
}
while ( v5 != a2 );
}
}