//
// sub_998FF8 from 0x998ff8 to 0x99905c (100 bytes)
//
// 9 xrefs:
// > GJBaseGameLayer::~GJBaseGameLayer @ 0x9b1a7c
// > GJBaseGameLayer::addRemapTargets @ 0x9c4d6c
// > GJBaseGameLayer::addRemapTargets @ 0x9c4f0c
// > GJBaseGameLayer::generateTargetGroups @ 0x9cba50
// > GJBaseGameLayer::generateTargetGroups @ 0x9cbe78
// > GJBaseGameLayer::generateVisibilityGroups @ 0x9dc228
// > GJBaseGameLayer::generateVisibilityGroups @ 0x9dc28c
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x9f27e4
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x9f39fc
//
// 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 sub_998FF8(_QWORD *a1)
{
_QWORD *v1; // x20
_QWORD *v2; // x0
_QWORD *v3; // x21
_QWORD *v4; // x19
void *v5; // x0
void *v6; // x0
v1 = a1;
if ( a1 )
{
do
{
v2 = (_QWORD *)v1[5];
v3 = (_QWORD *)*v1;
if ( v2 )
{
do
{
v4 = (_QWORD *)*v2;
operator delete(v2);
v2 = v4;
}
while ( v4 );
}
v5 = (void *)v1[3];
v1[3] = 0;
if ( v5 )
operator delete(v5);
v6 = v1;
v1 = v3;
operator delete(v6);
}
while ( v3 );
}
}