//
// GManager::save from 0x1004ac270 to 0x1004ac2e9 (121 bytes)
//
// 4 xrefs:
// > EditorPauseLayer::saveLevel @ 0x100294c46
// > GameManager::doQuickSave @ 0x10038ba70
// > AppDelegate::trySaveGame @ 0x10065c7d2
// > AppDelegate::trySaveGame @ 0x10065c7df
//
// 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
//
void __fastcall GManager::save(GManager *a1)
{
double v1; // xmm0_8
__int128 v2; // [rsp+0h] [rbp-20h] BYREF
void *__p; // [rsp+10h] [rbp-10h]
if ( !a1->m_saved )
{
a1->m_saved = 1;
if ( (a1->m_fileName.m_data.m_short.sizex2 & 1) != 0 )
{
sub_100006B70(&v2, a1->m_fileName.m_data.m_long.longStorage, a1->m_fileName.m_data.m_long.size, v1);
}
else
{
__p = a1->m_fileName.m_data.m_long.longStorage;
v2 = *(_OWORD *)&a1->m_fileName.m_data.m_short.sizex2;
}
GManager::saveGMTo(a1, &v2);
if ( (v2 & 1) != 0 )
operator delete(__p);
}
}