//
// sub_69AEE4 from 0x69aee4 to 0x69b0d8 (500 bytes)
//
// 2 xrefs:
// > sub_69B0D8 @ 0x69b104
// > sub_69B118 @ 0x69b144
//
// 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 12:50:40 +0000
//
void __fastcall sub_69AEE4(__int64 a1)
{
unsigned __int64 v2; // x19
void **v3; // x2
void **v4; // x22
unsigned __int64 v5; // x20
unsigned __int64 v6; // x5
void **v7; // x23
unsigned __int64 v8; // x1
unsigned __int64 v9; // x4
char *v10; // x5
void **v11; // x20
void **v12; // x19
unsigned __int64 v13; // x24
unsigned __int64 i; // x0
void *v15; // t1
__int64 v16; // x2
__int64 v17; // x1
v2 = *(_QWORD *)(a1 + 32);
v3 = *(void ***)(a1 + 8);
v4 = *(void ***)(a1 + 16);
v5 = v2 / 0x38;
v6 = v2 / 0x38;
v7 = &v3[v6];
if ( v3 == v4 )
{
v11 = *(void ***)(a1 + 16);
goto LABEL_14;
}
v8 = v2 + *(_QWORD *)(a1 + 40);
v9 = (v5 << 6) - v6 * 8;
v10 = (char *)v3[v5];
v11 = *(void ***)(a1 + 8);
v12 = (void **)&v10[72 * (v2 - v9)];
v13 = (unsigned __int64)v3[v8 / 0x38] + 72 * (v8 % 0x38);
if ( v12 != (void **)v13 )
{
while ( 1 )
{
if ( ((_BYTE)v12[6] & 1) != 0 )
{
operator delete(v12[8]);
if ( ((_BYTE)v12[3] & 1) != 0 )
LABEL_12:
operator delete(v12[5]);
}
else if ( ((_BYTE)v12[3] & 1) != 0 )
{
goto LABEL_12;
}
if ( (*(_BYTE *)v12 & 1) != 0 )
operator delete(v12[2]);
v12 += 9;
if ( (unsigned __int64)((char *)v12 - (_BYTE *)*v7 - 4032) <= 0x47 )
{
v12 = (void **)v7[1];
++v7;
}
if ( (void **)v13 == v12 )
{
v4 = *(void ***)(a1 + 16);
v11 = *(void ***)(a1 + 8);
break;
}
}
}
LABEL_14:
*(_QWORD *)(a1 + 40) = 0;
for ( i = v4 - v11; i > 2; i = v4 - v11 )
{
operator delete(*v11);
v4 = *(void ***)(a1 + 16);
v11 = (void **)(*(_QWORD *)(a1 + 8) + 8LL);
*(_QWORD *)(a1 + 8) = v11;
}
if ( i == 1 )
{
*(_QWORD *)(a1 + 32) = 28;
goto LABEL_20;
}
if ( i != 2 )
goto LABEL_20;
*(_QWORD *)(a1 + 32) = 56;
while ( v11 != v4 )
{
v15 = *v11++;
operator delete(v15);
LABEL_20:
;
}
v16 = *(_QWORD *)(a1 + 8);
v17 = *(_QWORD *)(a1 + 16);
if ( v16 != v17 )
*(_QWORD *)(a1 + 16) = v17 + 8 * ~((unsigned __int64)(v17 - 8 - v16) >> 3);
if ( *(_QWORD *)a1 )
operator delete(*(void **)a1);
}