//
// sub_998D78 from 0x998d78 to 0x998dd4 (92 bytes)
//
// 3 xrefs:
// > GJGameState::operator= @ 0x9bc498
// > GJBaseGameLayer::regenerateEnterEasingBuffers @ 0x9c6f60
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x9f1d8c
//
// 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
//
__int64 __fastcall sub_998D78(_QWORD *a1)
{
_QWORD *v2; // x0
_QWORD *v3; // x19
__int64 v4; // x2
__int64 result; // x0
v2 = (_QWORD *)a1[2];
if ( v2 )
{
do
{
v3 = (_QWORD *)*v2;
operator delete(v2);
v2 = v3;
}
while ( v3 );
}
v4 = a1[1];
result = 0;
a1[2] = 0;
if ( v4 )
{
do
*(_QWORD *)(*a1 + 8 * result++) = 0;
while ( result != v4 );
}
a1[3] = 0;
return result;
}