//
// LevelEditorLayer::canAutoSave from 0x46386c to 0x463916 (170 bytes)
//
// 4 xrefs:
// > LevelEditorLayer::doAutoSave @ 0x472960
// > LevelEditorLayer::doAutoBackup @ 0x472bfe
// > LevelEditorLayer::checkAutoSave @ 0x473008
// > LevelEditorLayer::checkAutoSave @ 0x4730aa
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:48:54 +0000
//
bool __fastcall LevelEditorLayer::canAutoSave(LevelEditorLayer *this)
{
int v2; // r0
int v3; // r3
int v5; // r3
int v6; // r0
int v7; // r0
int v8; // r0
v2 = LocalLevelManager::sharedState(this);
__dmb(0xFu);
v3 = *(unsigned __int8 *)(v2 + 377);
__dmb(0xFu);
if ( v3 || *(_DWORD *)(*((_DWORD *)this + 352) + 952) != 2 || *((_DWORD *)this + 357) || *((_BYTE *)this + 12208) )
return 0;
v5 = *((_DWORD *)this + 2964);
if ( !v5 )
return 1;
if ( *(_BYTE *)(v5 + 1005) )
return 0;
if ( *(_BYTE *)(v5 + 1004) )
return 0;
v6 = *(_DWORD *)(v5 + 576);
if ( v6 )
{
if ( (*(int (__fastcall **)(int))(*(_DWORD *)v6 + 176))(v6) )
return 0;
}
v7 = *(_DWORD *)(*((_DWORD *)this + 2964) + 592);
if ( v7 )
{
if ( (*(int (__fastcall **)(int))(*(_DWORD *)v7 + 176))(v7) )
return 0;
}
v8 = *(_DWORD *)(*((_DWORD *)this + 2964) + 596);
if ( v8 )
{
if ( (*(int (__fastcall **)(int))(*(_DWORD *)v8 + 176))(v8) )
return 0;
}
return *(_DWORD *)(*((_DWORD *)this + 2964) + 524) == -1;
}