{"type": "func", "start": 4297782924, "end": 4297783184, "name": "-[CCDirectorCaller startMainLoop]", "pseudocode": "// \n// -[CCDirectorCaller startMainLoop] from 0x1002af68c to 0x1002af790 (260 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x1009cdcb0\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:19 +0000\n// \n\nvoid __cdecl -[CCDirectorCaller startMainLoop](CCDirectorCaller *self, SEL a2)\n{\n  __int64 v3; // x0\n  __int64 v4; // x20\n  int v5; // w0\n  id displayLink; // x21\n  float v7; // s8\n  __int64 v8; // x0\n  double v9; // d0\n  double v10; // d1\n  double v11; // d2\n  CAFrameRateRange v12; // 0:kr00_12.12\n\n  self->_lastTime = 0.0;\n  objc_msgSend(self->displayLink, \"invalidate\");\n  self->displayLink = nullptr;\n  self->displayLink = -[objc_class displayLinkWithTarget:selector:](\n                        NSClassFromString(&CFSTR(\"CADisplayLink\").isa),\n                        \"displayLinkWithTarget:selector:\",\n                        self,\n                        \"doCaller:\");\n  v3 = -[UIScreen maximumFramesPerSecond](\n         +[UIScreen mainScreen](&OBJC_CLASS___UIScreen, \"mainScreen\"),\n         \"maximumFramesPerSecond\");\n  if ( v3 >= 60 )\n    v4 = 60;\n  else\n    v4 = v3;\n  v5 = sub_100754934(2, 15, 0, 0);\n  displayLink = self->displayLink;\n  if ( v5 )\n  {\n    v7 = (float)v4;\n    v12 = CAFrameRateRangeMake((float)v4, (float)v4, (float)v4);\n    *(float *)&v9 = v12.minimum;\n    *(float *)&v10 = v12.maximum;\n    *(float *)&v11 = v12.preferred;\n    objc_msgSend(displayLink, \"setPreferredFrameRateRange:\", v9, v10, v11);\n  }\n  else\n  {\n    objc_msgSend(self->displayLink, \"setPreferredFramesPerSecond:\", v4);\n    v7 = (float)v4;\n  }\n  objc_msgSend(\n    self->displayLink,\n    \"addToRunLoop:forMode:\",\n    +[NSRunLoop currentRunLoop](&OBJC_CLASS___NSRunLoop, \"currentRunLoop\"),\n    NSRunLoopCommonModes);\n  v8 = cocos2d::CCDirector::sharedDirector();\n  (*(void (__fastcall **)(__int64, double))(*(_QWORD *)v8 + 96LL))(v8, (float)(1.0 / v7));\n}", "assembly": "; \n; -[CCDirectorCaller startMainLoop] from 0x1002af68c to 0x1002af790 (260 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x1009cdcb0\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:19 +0000\n; \nSTP             D9, D8, [SP,#-0x10+var_30]!                            ; +0x0, 0x1002af68c\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0x4, 0x1002af690\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x1002af694\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x1002af698\nADD             X29, SP, #0x30                                         ; +0x10, 0x1002af69c\nMOV             X19, X0                                                ; +0x14, 0x1002af6a0\nSTR             XZR, [X0,#0x18]                                        ; +0x18, 0x1002af6a4\nLDR             X0, [X0,#8]                                            ; +0x1c, 0x1002af6a8\nBL              _objc_msgSend$invalidate                               ; +0x20, 0x1002af6ac\nSTR             XZR, [X19,#8]                                          ; +0x24, 0x1002af6b0\nADRL            X0, cfstr_Cadisplaylink; aClassName                    ; +0x28, 0x1002af6b4\nBL              _NSClassFromString                                     ; +0x30, 0x1002af6bc\nADRP            X8, #selRef_doCaller_@PAGE                             ; +0x34, 0x1002af6c0\nLDR             X3, [X8,#selRef_doCaller_@PAGEOFF]; \"doCaller:\" ...    ; +0x38, 0x1002af6c4\nMOV             X2, X19                                                ; +0x3c, 0x1002af6c8\nBL              _objc_msgSend$displayLinkWithTarget_selector_; -[objc_class displayLinkWithTarget:selector:] ... ; +0x40, 0x1002af6cc\nSTR             X0, [X19,#8]                                           ; +0x44, 0x1002af6d0\nADRP            X8, #classRef_UIScreen@PAGE                            ; +0x48, 0x1002af6d4\nLDR             X0, [X8,#classRef_UIScreen@PAGEOFF]; _OBJC_CLASS_$_UIScreen ; +0x4c, 0x1002af6d8\nBL              _objc_msgSend$mainScreen; +[UIScreen mainScreen] ...   ; +0x50, 0x1002af6dc\nBL              _objc_msgSend$maximumFramesPerSecond; -[UIScreen maximumFramesPerSecond] ... ; +0x54, 0x1002af6e0\nCMP             X0, #0x3C ; '<'                                        ; +0x58, 0x1002af6e4\nMOV             W8, #0x3C ; '<'                                        ; +0x5c, 0x1002af6e8\nCSEL            X20, X0, X8, LT                                        ; +0x60, 0x1002af6ec\nMOV             W0, #2                                                 ; +0x64, 0x1002af6f0\nMOV             W1, #0xF                                               ; +0x68, 0x1002af6f4\nMOV             W2, #0                                                 ; +0x6c, 0x1002af6f8\nMOV             W3, #0                                                 ; +0x70, 0x1002af6fc\nBL              sub_100754934                                          ; +0x74, 0x1002af700\nLDR             X21, [X19,#8]                                          ; +0x78, 0x1002af704\nCBZ             W0, loc_1002AF72C                                      ; +0x7c, 0x1002af708\nSCVTF           S8, X20                                                ; +0x80, 0x1002af70c\nFMOV            S0, S8; minimum                                        ; +0x84, 0x1002af710\nFMOV            S1, S8; maximum                                        ; +0x88, 0x1002af714\nFMOV            S2, S8; preferred                                      ; +0x8c, 0x1002af718\nBL              _CAFrameRateRangeMake                                  ; +0x90, 0x1002af71c\nMOV             X0, X21                                                ; +0x94, 0x1002af720\nBL              _objc_msgSend$setPreferredFrameRateRange_              ; +0x98, 0x1002af724\nB               loc_1002AF73C                                          ; +0x9c, 0x1002af728\nMOV             X0, X21                                                ; +0xa0, 0x1002af72c\nMOV             X2, X20                                                ; +0xa4, 0x1002af730\nBL              _objc_msgSend$setPreferredFramesPerSecond_             ; +0xa8, 0x1002af734\nSCVTF           S8, X20                                                ; +0xac, 0x1002af738\nLDR             X19, [X19,#8]                                          ; +0xb0, 0x1002af73c\nADRP            X8, #classRef_NSRunLoop@PAGE                           ; +0xb4, 0x1002af740\nLDR             X0, [X8,#classRef_NSRunLoop@PAGEOFF]; _OBJC_CLASS_$_NSRunLoop ; +0xb8, 0x1002af744\nBL              _objc_msgSend$currentRunLoop; +[NSRunLoop currentRunLoop] ... ; +0xbc, 0x1002af748\nMOV             X2, X0                                                 ; +0xc0, 0x1002af74c\nADRP            X8, #_NSRunLoopCommonModes_ptr@PAGE                    ; +0xc4, 0x1002af750\nLDR             X8, [X8,#_NSRunLoopCommonModes_ptr@PAGEOFF]; _NSRunLoopCommonModes ; +0xc8, 0x1002af754\nLDR             X3, [X8]                                               ; +0xcc, 0x1002af758\nMOV             X0, X19                                                ; +0xd0, 0x1002af75c\nBL              _objc_msgSend$addToRunLoop_forMode_                    ; +0xd4, 0x1002af760\nBL              cocos2d__CCDirector__sharedDirector                    ; +0xd8, 0x1002af764\nFMOV            S0, #1.0                                               ; +0xdc, 0x1002af768\nFDIV            S0, S0, S8                                             ; +0xe0, 0x1002af76c\nFCVT            D0, S0                                                 ; +0xe4, 0x1002af770\nLDR             X8, [X0]                                               ; +0xe8, 0x1002af774\nLDR             X1, [X8,#0x60]                                         ; +0xec, 0x1002af778\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0xf0, 0x1002af77c\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0xf4, 0x1002af780\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0xf8, 0x1002af784\nLDP             D9, D8, [SP+0x30+var_30],#0x40                         ; +0xfc, 0x1002af788\nBR              X1                                                     ; +0x100, 0x1002af78c", "xrefs": ["<???> @ 0x1009cdcb0"], "is_objc": true, "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"}