//
// sub_100013008 from 0x100013008 to 0x1000130cc (196 bytes)
//
// 2 xrefs:
// > GJEffectManager::prepareMoveActions @ 0x100013120
// > LevelEditorLayer::updateDebugDraw @ 0x10040a4a4
//
// 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:57:17 +0000
//
void __fastcall sub_100013008(_QWORD *a1, char a2)
{
__int64 *v3; // x22
__int64 *v4; // x23
__int64 v6; // x21
void *v7; // x0
__int64 v8; // [xsp+0h] [xbp-40h] BYREF
void **v9; // [xsp+8h] [xbp-38h] BYREF
v3 = (__int64 *)a1[145];
v4 = (__int64 *)a1[146];
if ( v3 != v4 )
{
do
{
v6 = *v3;
v8 = *v3;
if ( (a2 & 1) != 0 || (a1[149] - a1[148]) >> 6 > 0x7Cu )
{
if ( v6 )
{
v7 = *(void **)(v6 + 488);
if ( v7 )
{
*(_QWORD *)(v6 + 496) = v7;
operator delete(v7);
}
v9 = (void **)(v6 + 440);
sub_10000B044(&v9);
operator delete((void *)v6);
}
}
else
{
sub_10000AAA0(v6);
sub_100011A50((__int64)(a1 + 148), &v8);
}
++v3;
}
while ( v3 != v4 );
v3 = (__int64 *)a1[145];
}
a1[146] = v3;
}