{"type": "func", "start": 4298013644, "end": 4298013772, "name": "GManager::waitForSave", "pseudocode": "// \n// GManager::waitForSave from 0x1002e7bcc to 0x1002e7c4c (128 bytes)\n// \n// 8 xrefs:\n// > GManager::save @ 0x1002e7b30\n// > AppDelegate::applicationWillTerminate @ 0x10030717c\n// > AppDelegate::applicationWillTerminate @ 0x10030718c\n// > AppDelegate::trySaveGame @ 0x100307494\n// > AppDelegate::trySaveGame @ 0x1003074a0\n// > sub_1003074F8 @ 0x10030752c\n// > sub_1003074F8 @ 0x100307538\n// > EditorPauseLayer::saveLevel @ 0x1004449f0\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:02:51 +0000\n// \n\nstd::chrono::steady_clock::time_point __fastcall GManager::waitForSave(__int64 a1, double a2)\n{\n  std::chrono::duration<long long, std::ratio<1, 1000000000>>::rep rep; // x19\n  double v5; // d8\n  unsigned __int8 *v6; // x20\n  unsigned __int8 v7; // w8\n  std::chrono::nanoseconds __ns; // [xsp+8h] [xbp-38h] BYREF\n  std::chrono::steady_clock::time_point result; // 0:x0.8\n\n  result.__d_.__rep_ = std::chrono::steady_clock::now().__d_.__rep_;\n  rep = result.__d_.__rep_;\n  v5 = a2 * 1000000000.0;\n  v6 = (unsigned __int8 *)(a1 + 345);\n  do\n  {\n    v7 = atomic_load(v6);\n    if ( (v7 & 1) == 0 )\n      break;\n    __ns.__rep_ = 10000000;\n    std::this_thread::sleep_for(&__ns);\n    result.__d_.__rep_ = std::chrono::steady_clock::now().__d_.__rep_;\n  }\n  while ( v5 >= (double)(result.__d_.__rep_ - rep) );\n  return result;\n}", "assembly": "; \n; GManager::waitForSave from 0x1002e7bcc to 0x1002e7c4c (128 bytes)\n; \n; 8 xrefs:\n; > GManager::save @ 0x1002e7b30\n; > AppDelegate::applicationWillTerminate @ 0x10030717c\n; > AppDelegate::applicationWillTerminate @ 0x10030718c\n; > AppDelegate::trySaveGame @ 0x100307494\n; > AppDelegate::trySaveGame @ 0x1003074a0\n; > sub_1003074F8 @ 0x10030752c\n; > sub_1003074F8 @ 0x100307538\n; > EditorPauseLayer::saveLevel @ 0x1004449f0\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:02:51 +0000\n; \nSUB             SP, SP, #0x50                                          ; +0x0, 0x1002e7bcc\nSTP             D9, D8, [SP,#0x40+var_30]                              ; +0x4, 0x1002e7bd0\nSTP             X22, X21, [SP,#0x40+var_20]                            ; +0x8, 0x1002e7bd4\nSTP             X20, X19, [SP,#0x40+var_10]                            ; +0xc, 0x1002e7bd8\nSTP             X29, X30, [SP,#0x40+var_s0]                            ; +0x10, 0x1002e7bdc\nADD             X29, SP, #0x40                                         ; +0x14, 0x1002e7be0\nFMOV            D8, D0                                                 ; +0x18, 0x1002e7be4\nMOV             X20, X0                                                ; +0x1c, 0x1002e7be8\nBL              __ZNSt3__16chrono12steady_clock3nowEv; std::chrono::steady_clock::now(void) ; +0x20, 0x1002e7bec\nMOV             X19, X0                                                ; +0x24, 0x1002e7bf0\nADRP            X8, #qword_100764180@PAGE                              ; +0x28, 0x1002e7bf4\nLDR             D0, [X8,#qword_100764180@PAGEOFF]                      ; +0x2c, 0x1002e7bf8\nFMUL            D8, D8, D0                                             ; +0x30, 0x1002e7bfc\nADD             X20, X20, #0x159                                       ; +0x34, 0x1002e7c00\nMOV             W21, #0x989680                                         ; +0x38, 0x1002e7c04\nLDARB           W8, [X20]                                              ; +0x40, 0x1002e7c0c\nTBZ             W8, #0, loc_1002E7C34                                  ; +0x44, 0x1002e7c10\nSTR             X21, [SP,#0x40+__ns]                                   ; +0x48, 0x1002e7c14\nADD             X0, SP, #0x40+__ns; __ns                               ; +0x4c, 0x1002e7c18\nBL              __ZNSt3__111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE; std::this_thread::sleep_for(std::chrono::duration<long long,std::ratio<1l,1000000000l>> const&) ; +0x50, 0x1002e7c1c\nBL              __ZNSt3__16chrono12steady_clock3nowEv; std::chrono::steady_clock::now(void) ; +0x54, 0x1002e7c20\nSUB             X8, X0, X19                                            ; +0x58, 0x1002e7c24\nSCVTF           D0, X8                                                 ; +0x5c, 0x1002e7c28\nFCMP            D8, D0                                                 ; +0x60, 0x1002e7c2c\nB.PL            loc_1002E7C0C                                          ; +0x64, 0x1002e7c30\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0x68, 0x1002e7c34\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0x6c, 0x1002e7c38\nLDP             X22, X21, [SP,#0x40+var_20]                            ; +0x70, 0x1002e7c3c\nLDP             D9, D8, [SP,#0x40+var_30]                              ; +0x74, 0x1002e7c40\nADD             SP, SP, #0x50 ; 'P'                                    ; +0x78, 0x1002e7c44\nRET                                                                    ; +0x7c, 0x1002e7c48", "xrefs": ["GManager::save @ 0x1002e7b30", "AppDelegate::applicationWillTerminate @ 0x10030717c", "AppDelegate::applicationWillTerminate @ 0x10030718c", "AppDelegate::trySaveGame @ 0x100307494", "AppDelegate::trySaveGame @ 0x1003074a0", "sub_1003074F8 @ 0x10030752c", "sub_1003074F8 @ 0x100307538", "EditorPauseLayer::saveLevel @ 0x1004449f0"], "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"}