//
// LevelEditorLayer::waitForAutoSave from 0x78f48c to 0x78f528 (156 bytes)
//
// 4 xrefs:
// > LevelEditorLayer::~LevelEditorLayer @ 0x7988b4
// > LevelEditorLayer::saveLevel @ 0x7a7c84
// > EditorPauseLayer::onExitEditor @ 0x8b6e34
// > ??> @ 0x88df8
//
// 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
//
__int64 __fastcall LevelEditorLayer::waitForAutoSave(LevelEditorLayer *this)
{
__int64 v1; // x0
__int64 v2; // x19
std::chrono::steady_clock *v3; // x0
__int64 v6; // [xsp+30h] [xbp+30h] BYREF
v1 = std::chrono::steady_clock::now(_stack_chk_guard);
v2 = v1;
do
{
if ( !atomic_load((unsigned __int8 *)(LocalLevelManager::sharedState((LocalLevelManager *)v1) + 577)) )
break;
v6 = 1000000;
v3 = (std::chrono::steady_clock *)std::this_thread::sleep_for(&v6);
v1 = std::chrono::steady_clock::now(v3) - v2;
}
while ( v1 <= 30000000000LL );
return _stack_chk_guard;
}