//
// LevelEditorLayer::waitForAutoSave from 0x1003f6534 to 0x1003f65a4 (112 bytes)
//
// 3 xrefs:
// > sub_1003F603C @ 0x1003f6090
// > LevelEditorLayer::saveLevel @ 0x100404cdc
// > EditorPauseLayer::onExitEditor @ 0x100444b3c
//
// 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 11:04:33 +0000
//
std::chrono::steady_clock::time_point LevelEditorLayer::waitForAutoSave()
{
std::chrono::steady_clock::time_point v0; // x19
std::chrono::steady_clock::time_point result; // x0
unsigned __int8 v2; // w8
std::chrono::nanoseconds __ns; // [xsp+8h] [xbp-28h] BYREF
v0.__d_.__rep_ = std::chrono::steady_clock::now().__d_.__rep_;
do
{
result.__d_.__rep_ = LocalLevelManager::sharedState();
v2 = atomic_load((unsigned __int8 *)(result.__d_.__rep_ + 601));
if ( (v2 & 1) == 0 )
break;
__ns.__rep_ = 1000000;
std::this_thread::sleep_for(&__ns);
result.__d_.__rep_ = std::chrono::steady_clock::now().__d_.__rep_;
}
while ( result.__d_.__rep_ - v0.__d_.__rep_ < 0x6FC23AC01LL );
return result;
}