//
// LevelEditorLayer::canAutoSave from 0x78f3a4 to 0x78f48c (232 bytes)
//
// 5 xrefs:
// > LevelEditorLayer::doAutoSave @ 0x7a7de8
// > LevelEditorLayer::doAutoBackup @ 0x7a8324
// > LevelEditorLayer::checkAutoSave @ 0x7a8c0c
// > LevelEditorLayer::checkAutoSave @ 0x7a8c6c
// > ??> @ 0x100948
//
// 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:53:28 +0000
//
bool __fastcall LevelEditorLayer::canAutoSave(LevelEditorLayer *this)
{
unsigned __int8 v2; // w0
__int64 v4; // x1
__int64 v5; // x0
__int64 v6; // x0
__int64 v7; // x0
v2 = atomic_load((unsigned __int8 *)(LocalLevelManager::sharedState(this) + 577));
if ( !v2
&& *(_DWORD *)(*((_QWORD *)this + 242) + 1140LL) == 2
&& !*((_DWORD *)this + 493)
&& !*((_BYTE *)this + 14808) )
{
v4 = *((_QWORD *)this + 1781);
if ( !v4 )
return 1;
if ( !*(_BYTE *)(v4 + 1513) && !*(_BYTE *)(v4 + 1512) )
{
v5 = *(_QWORD *)(v4 + 760);
if ( v5 )
{
if ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v5 + 352LL))(v5) )
return 0;
v4 = *((_QWORD *)this + 1781);
}
v6 = *(_QWORD *)(v4 + 784);
if ( !v6 )
{
LABEL_16:
v7 = *(_QWORD *)(v4 + 792);
if ( !v7 )
return *(_DWORD *)(v4 + 704) == -1;
if ( !(*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v7 + 352LL))(v7) )
{
v4 = *((_QWORD *)this + 1781);
return *(_DWORD *)(v4 + 704) == -1;
}
return 0;
}
if ( !(*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v6 + 352LL))(v6) )
{
v4 = *((_QWORD *)this + 1781);
goto LABEL_16;
}
}
}
return 0;
}