{"type": "func", "start": 4299121972, "end": 4299122084, "name": "LevelEditorLayer::waitForAutoSave", "pseudocode": "// \n// LevelEditorLayer::waitForAutoSave from 0x1003f6534 to 0x1003f65a4 (112 bytes)\n// \n// 3 xrefs:\n// > sub_1003F603C @ 0x1003f6090\n// > LevelEditorLayer::saveLevel @ 0x100404cdc\n// > EditorPauseLayer::onExitEditor @ 0x100444b3c\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:04:33 +0000\n// \n\nstd::chrono::steady_clock::time_point LevelEditorLayer::waitForAutoSave()\n{\n  std::chrono::steady_clock::time_point v0; // x19\n  std::chrono::steady_clock::time_point result; // x0\n  unsigned __int8 v2; // w8\n  std::chrono::nanoseconds __ns; // [xsp+8h] [xbp-28h] BYREF\n\n  v0.__d_.__rep_ = std::chrono::steady_clock::now().__d_.__rep_;\n  do\n  {\n    result.__d_.__rep_ = LocalLevelManager::sharedState();\n    v2 = atomic_load((unsigned __int8 *)(result.__d_.__rep_ + 601));\n    if ( (v2 & 1) == 0 )\n      break;\n    __ns.__rep_ = 1000000;\n    std::this_thread::sleep_for(&__ns);\n    result.__d_.__rep_ = std::chrono::steady_clock::now().__d_.__rep_;\n  }\n  while ( result.__d_.__rep_ - v0.__d_.__rep_ < 0x6FC23AC01LL );\n  return result;\n}", "assembly": "; \n; LevelEditorLayer::waitForAutoSave from 0x1003f6534 to 0x1003f65a4 (112 bytes)\n; \n; 3 xrefs:\n; > sub_1003F603C @ 0x1003f6090\n; > LevelEditorLayer::saveLevel @ 0x100404cdc\n; > EditorPauseLayer::onExitEditor @ 0x100444b3c\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:04:33 +0000\n; \nSUB             SP, SP, #0x40                                          ; +0x0, 0x1003f6534\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0x4, 0x1003f6538\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x1003f653c\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x1003f6540\nADD             X29, SP, #0x30                                         ; +0x10, 0x1003f6544\nBL              __ZNSt3__16chrono12steady_clock3nowEv; std::chrono::steady_clock::now(void) ; +0x14, 0x1003f6548\nMOV             X19, X0                                                ; +0x18, 0x1003f654c\nMOV             W20, #0xF4240                                          ; +0x1c, 0x1003f6550\nMOV             X21, #0x6FC23AC01                                      ; +0x24, 0x1003f6558\nBL              LocalLevelManager__sharedState                         ; +0x30, 0x1003f6564\nADD             X8, X0, #0x259                                         ; +0x34, 0x1003f6568\nLDARB           W8, [X8]                                               ; +0x38, 0x1003f656c\nTBZ             W8, #0, loc_1003F6590                                  ; +0x3c, 0x1003f6570\nSTR             X20, [SP,#0x30+__ns]                                   ; +0x40, 0x1003f6574\nADD             X0, SP, #0x30+__ns; __ns                               ; +0x44, 0x1003f6578\nBL              __ZNSt3__111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE; std::this_thread::sleep_for(std::chrono::duration<long long,std::ratio<1l,1000000000l>> const&) ; +0x48, 0x1003f657c\nBL              __ZNSt3__16chrono12steady_clock3nowEv; std::chrono::steady_clock::now(void) ; +0x4c, 0x1003f6580\nSUB             X8, X0, X19                                            ; +0x50, 0x1003f6584\nCMP             X8, X21                                                ; +0x54, 0x1003f6588\nB.LT            loc_1003F6564                                          ; +0x58, 0x1003f658c\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x5c, 0x1003f6590\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x60, 0x1003f6594\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0x64, 0x1003f6598\nADD             SP, SP, #0x40 ; '@'                                    ; +0x68, 0x1003f659c\nRET                                                                    ; +0x6c, 0x1003f65a0", "xrefs": ["sub_1003F603C @ 0x1003f6090", "LevelEditorLayer::saveLevel @ 0x100404cdc", "EditorPauseLayer::onExitEditor @ 0x100444b3c"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}