//
// GameManager::didEncodeForSave from 0x714984 to 0x714a38 (180 bytes)
//
// 2 xrefs:
// > ??> @ 0x4ef28
// > ??> @ 0x14295f0
//
// 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:52:15 +0000
//
__int64 __fastcall GameManager::didEncodeForSave(GameManager *this)
{
GameLevelManager *v2; // x0
void **v3; // x20
void **v4; // x0
__int64 v6[3]; // [xsp+30h] [xbp+30h] BYREF
v2 = (GameLevelManager *)GameLevelManager::sharedState(_stack_chk_guard);
GameLevelManager::collectPlatformerJournalKeys(v6, v2, 0);
v3 = *((void ***)this + 44);
if ( v3 )
{
v4 = *((void ***)this + 45);
if ( v3 != v4 )
{
do
{
*((_QWORD *)this + 45) = v4 - 4;
if ( (*(_BYTE *)(v4 - 4) & 1) != 0 )
operator delete(*(v4 - 2));
v4 = *((void ***)this + 45);
}
while ( v3 != v4 );
v4 = *((void ***)this + 44);
}
operator delete(v4);
}
*((_QWORD *)this + 44) = v6[0];
*((_QWORD *)this + 45) = v6[1];
*((_QWORD *)this + 46) = v6[2];
return _stack_chk_guard;
}