//
// sub_100018054 from 0x100018054 to 0x1000180b8 (100 bytes)
//
// 58 xrefs:
// > sub_10000E6D0 @ 0x10000e854
// > sub_10000E6D0 @ 0x10000e85c
// > sub_10000E6D0 @ 0x10000e864
// > GJEffectManager::reset @ 0x10000ee1c
// > GJEffectManager::resetEffects @ 0x10000eed8
// > GJEffectManager::resetEffects @ 0x10000ef00
// > GJEffectManager::resetEffects @ 0x10000ef34
// > GJEffectManager::resetMoveActions @ 0x10000efd8
// > GJEffectManager::resetMoveActions @ 0x10000efe0
// > GJEffectManager::resetToggledGroups @ 0x10001004c
// > GJEffectManager::prepareMoveActions @ 0x100012d18
// > GJEffectManager::prepareMoveActions @ 0x100012da0
// > GJEffectManager::prepareMoveActions @ 0x100012e28
// > GJEffectManager::resetUsedItemState @ 0x1000159a8
// > GJEffectManager::resetUsedItemState @ 0x1000159b8
// > GJEffectManager::removePersistentFromAllItems @ 0x100015a68
// > GJEffectManager::removePersistentFromAllTimers @ 0x100015aa8
// > PlayLayer::updateVisibility @ 0x10011cd7c
// > sub_100127088 @ 0x10012709c
// > FMODAudioEngine::stopAllEffects @ 0x100138c98
// > FMODAudioEngine::stopAllEffects @ 0x100138ca0
// > FMODAudioEngine::stopAllEffects @ 0x100138ca8
// > FMODAudioEngine::stopAllEffects @ 0x100138cb0
// > FMODAudioEngine::stopAllEffects @ 0x100138cb8
// > FMODAudioEngine::stopAllEffects @ 0x100138cc0
// > FMODAudioEngine::stopAllEffects @ 0x100138cc8
// > FMODAudioEngine::stopAllEffects @ 0x100138cd0
// > FMODAudioEngine::stopAllEffects @ 0x100138ce0
// > FMODAudioEngine::stopAllMusic @ 0x100138d10
// > FMODAudioEngine::stopAllMusic @ 0x100138d18
// > FMODAudioEngine::stopAllMusic @ 0x100138d30
// > SongInfoObject::updateArtists @ 0x10015b534
// > GJBaseGameLayer::regenerateEnterEasingBuffers @ 0x1001dfd38
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x1001e0294
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x1001e02a0
// > GJBaseGameLayer::generateTargetGroups @ 0x1001e0cbc
// > GJBaseGameLayer::restoreAllUIObjects @ 0x1001f34e8
// > GJBaseGameLayer::update @ 0x1001fe84c
// > GJBaseGameLayer::resetLevelVariables @ 0x100202278
// > GJBaseGameLayer::resetLevelVariables @ 0x1002022f4
// > GJBaseGameLayer::resetLevelVariables @ 0x100202420
// > GJBaseGameLayer::resetLevelVariables @ 0x100202428
// > GJBaseGameLayer::resetLevelVariables @ 0x100202598
// > GJBaseGameLayer::clearActivatedAudioTriggers @ 0x10020294c
// > GJBaseGameLayer::processActivatedAudioTriggers @ 0x100206b8c
// > PlayerObject::preCollision @ 0x10021e9e0
// > PlayerObject::resetObject @ 0x100226a74
// > PlayerObject::resetObject @ 0x100226b34
// > PlayerObject::resetTouchedRings @ 0x100227028
// > PlayerObject::pushButton @ 0x100227f48
// > GJShaderState::reset @ 0x10026d9ac
// > GJShaderState::reset @ 0x10026d9b4
// > GameStatsManager::firstSetup @ 0x10033e588
// > GameStatsManager::firstSetup @ 0x10033e590
// > sub_100369500 @ 0x1003695a0
// > SequenceTriggerGameObject::resetObject @ 0x10038a270
// > SequenceTriggerGameObject::resetObject @ 0x10038a280
// > EditorUI::dynamicGroupUpdate @ 0x1003f2cac
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
_QWORD *__fastcall sub_100018054(_QWORD *result)
{
_QWORD *v1; // x19
_QWORD *v2; // x20
__int64 v3; // x8
__int64 i; // x9
if ( result[3] )
{
v1 = result;
result = (_QWORD *)result[2];
if ( result )
{
do
{
v2 = (_QWORD *)*result;
operator delete(result);
result = v2;
}
while ( v2 );
}
v1[2] = 0;
v3 = v1[1];
if ( v3 )
{
for ( i = 0; i != v3; ++i )
*(_QWORD *)(*v1 + 8 * i) = 0;
}
v1[3] = 0;
}
return result;
}