//
// deallocateDoubleNested from 0x9992ac to 0x999380 (212 bytes)
//
// 1 xrefs:
// > ??> @ 0x4ce70
//
// 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:58:03 +0000
//
void __fastcall deallocateDoubleNested(void ****a1)
{
void ***v1; // x20
void ***v2; // x21
void **v4; // x19
char *v5; // x0
char *v6; // x2
void ***v7; // x1
v1 = *a1;
v2 = a1[1];
if ( *a1 != v2 )
{
while ( 1 )
{
v4 = *v1;
if ( *v1 )
{
v5 = (char *)v4[1];
if ( *v4 == v5 )
{
if ( v5 )
goto LABEL_8;
goto LABEL_9;
}
v4[1] = &v5[4 * ~((unsigned __int64)(v5 - 4 - (_BYTE *)*v4) >> 2)];
v4 = *v1;
if ( *v1 )
{
v5 = (char *)*v4;
if ( *v4 )
{
v6 = (char *)v4[1];
if ( v6 != v5 )
v4[1] = &v6[4 * ~((unsigned __int64)(v6 - 4 - v5) >> 2)];
LABEL_8:
operator delete(v5);
}
LABEL_9:
operator delete(v4);
}
}
if ( v2 == ++v1 )
{
v7 = a1[1];
if ( v7 != *a1 )
a1[1] = &v7[~((unsigned __int64)((char *)(v7 - 1) - (char *)*a1) >> 3)];
return;
}
}
}
}