//
// GManager::save from 0x14006a9d0 to 0x14006aab4 (228 bytes)
//
// 6 xrefs:
// > AppDelegate::trySaveGame @ 0x140083593
// > AppDelegate::trySaveGame @ 0x1400835a0
// > EditorPauseLayer::saveLevel @ 0x1400dde8d
// > EndLevelLayer::onMenu @ 0x140135121
// > ??> @ 0x1406c5f58
// > ??> @ 0x1406c5f64
//
// 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
//
// Hidden C++ exception states: #wind=3
void GManager::save(GManager *a1)
{
__int64 v2; // rbp
DS_Dictionary *v3; // rax
DS_Dictionary *v4; // rbx
__int64 v5; // rax
__int64 v6; // rsi
const char *v7; // rdx
_BYTE v8[32]; // [rsp+30h] [rbp-48h] BYREF
_BYTE v9[32]; // [rsp+50h] [rbp-28h] BYREF
if ( !a1->m_saved )
{
a1->m_saved = 1;
v2 = sub_14003BDB0((__int64)v8, (__int64)&a1->m_fileName);
v3 = (DS_Dictionary *)operator new(0xF0u);
v4 = DS_Dictionary::DS_Dictionary(v3);
a1->encodeDataTo(a1, v4);
v5 = sub_14003BDB0((__int64)v9, v2);
v6 = v5;
v7 = (const char *)v5;
if ( *(_QWORD *)(v5 + 24) > 0xFu )
v7 = *(const char **)v5;
DS_Dictionary::saveRootSubDictToCompressedFile(v4, v7);
sub_14003A830(v6);
a1->m_saved = 0;
if ( v4 )
{
DS_Dictionary::~DS_Dictionary(v4);
j_j_free(v4);
}
sub_14003A830(v2);
}
}