//
// sub_10013DBA8 from 0x10013dba8 to 0x10013dc40 (152 bytes)
//
// 2 xrefs:
// > sub_10013C134 @ 0x10013c5b4
// > sub_10013C134 @ 0x10013c5cc
//
// 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:59:30 +0000
//
__int64 __fastcall sub_10013DBA8(_QWORD *a1)
{
void **v2; // x20
void **v3; // x21
unsigned __int64 v4; // x8
__int64 v5; // x8
void *v6; // t1
v2 = (void **)a1[1];
v3 = (void **)a1[2];
a1[5] = 0;
v4 = v3 - v2;
if ( v4 >= 3 )
{
do
{
operator delete(*v2);
v3 = (void **)a1[2];
v2 = (void **)(a1[1] + 8LL);
a1[1] = v2;
v4 = v3 - v2;
}
while ( v4 > 2 );
}
if ( v4 == 1 )
{
v5 = 256;
}
else
{
if ( v4 != 2 )
goto LABEL_9;
v5 = 512;
}
a1[4] = v5;
LABEL_9:
while ( v2 != v3 )
{
v6 = *v2++;
operator delete(v6);
}
return sub_10013DC40(a1);
}