//
// GJEffectManager::removePersistentFromAllItems from 0x9fa870 to 0x9fa8d4 (100 bytes)
//
// 3 xrefs:
// > LevelEditorLayer::onPlaytest @ 0x796354
// > GJBaseGameLayer::activatePersistentItemTrigger @ 0x9ed070
// > ??> @ 0x4ab90
//
// 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:59:16 +0000
//
_QWORD *__fastcall GJEffectManager::removePersistentFromAllItems(_QWORD *this)
{
_QWORD *v1; // x20
_QWORD *v2; // x0
_QWORD *v3; // x19
_QWORD *v4; // x1
if ( *(this + 97) )
{
v1 = this;
v2 = (_QWORD *)*(this + 96);
if ( v2 )
{
do
{
v3 = (_QWORD *)*v2;
operator delete(v2);
v2 = v3;
}
while ( v3 );
}
this = (_QWORD *)v1[95];
v4 = nullptr;
v1[96] = 0;
if ( this )
{
do
{
*(_QWORD *)(v1[94] + 8LL * (_QWORD)v4) = 0;
v4 = (_QWORD *)((char *)v4 + 1);
}
while ( v4 != this );
}
v1[97] = 0;
}
return this;
}