{"type": "func", "start": 4297036644, "end": 4297037016, "name": "GJBaseGameLayer::getFollowSpeedVal", "pseudocode": "// \n// GJBaseGameLayer::getFollowSpeedVal from 0x1001f9364 to 0x1001f94d8 (372 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::modifyObjectPhysics @ 0x1001f9880\n// > GJBaseGameLayer::processAdvancedFollowAction @ 0x1001f9c98\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\ncocos2d::CCPoint __fastcall GJBaseGameLayer::getFollowSpeedVal(\n        GJBaseGameLayer *a1,\n        GameObject *a2,\n        int a3,\n        int a4,\n        float a5,\n        float a6)\n{\n  float32x2_t *v6; // x8\n  float32x2_t *v12; // x19\n  float v13; // s9\n  GameObject *Object; // x0\n  GameObject *v15; // x23\n  const cocos2d::CCPoint *LastPosition; // x20\n  float32x2_t *v17; // x1\n  float32x2_t *v18; // x0\n  GameObject *v19; // x0\n  GameObject *v20; // x21\n  float v21; // s9\n  float v22; // s0\n  __int64 v25; // [xsp+0h] [xbp-70h] BYREF\n  __int64 v26; // [xsp+8h] [xbp-68h] BYREF\n  float32x2_t v27; // [xsp+10h] [xbp-60h] BYREF\n  __int64 v28; // [xsp+18h] [xbp-58h] BYREF\n  cocos2d::CCPoint result; // 0:s0.4,4:s1.4\n\n  v12 = v6;\n  v13 = 90.0 - a5;\n  sub_1000229B8(&v28, &qword_10086C9A0);\n  if ( a3 >= 1 )\n  {\n    Object = GJBaseGameLayer::tryGetObject(a1, a3);\n    if ( Object )\n    {\n      v15 = Object;\n      LastPosition = GameObject::getLastPosition(Object);\n      ((void (__fastcall *)(__int64 *__return_ptr, GameObject *))v15->getRealPosition)(&v26, v15);\n      v17 = (float32x2_t *)&v26;\n      v18 = (float32x2_t *)LastPosition;\nLABEL_7:\n      sub_1000229F0(v18, v17, &v27);\n      sub_1000229D0(&v28, (double *)&v27);\n      goto LABEL_8;\n    }\n  }\n  if ( a4 >= 1 )\n  {\n    v19 = GJBaseGameLayer::tryGetObject(a1, a4);\n    if ( v19 )\n    {\n      v20 = v19;\n      ((void (__fastcall *)(__int64 *__return_ptr, GameObject *))a2->getRealPosition)(&v26, a2);\n      ((void (__fastcall *)(__int64 *__return_ptr, GameObject *))v20->getRealPosition)(&v25, v20);\n      v18 = (float32x2_t *)&v26;\n      v17 = (float32x2_t *)&v25;\n      goto LABEL_7;\n    }\n  }\nLABEL_8:\n  v21 = v13 * 0.017453;\n  if ( *(float *)&v28 != 0.0 || *((float *)&v28 + 1) != 0.0 )\n  {\n    v22 = atan2f(*((float *)&v28 + 1), *(float *)&v28) + 1.57079633;\n    v21 = v21 + v22;\n  }\n  cocos2d::ccpForAngle(v21);\n  result.x = sub_100022A14(&v27, v12, a6).f32[0];\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::getFollowSpeedVal from 0x1001f9364 to 0x1001f94d8 (372 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::modifyObjectPhysics @ 0x1001f9880\n; > GJBaseGameLayer::processAdvancedFollowAction @ 0x1001f9c98\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSUB             SP, SP, #0x80                                          ; +0x0, 0x1001f9364\nSTP             D11, D10, [SP,#0x70+var_50]                            ; +0x4, 0x1001f9368\nSTP             D9, D8, [SP,#0x70+var_40]                              ; +0x8, 0x1001f936c\nSTP             X24, X23, [SP,#0x70+var_30]                            ; +0xc, 0x1001f9370\nSTP             X22, X21, [SP,#0x70+var_20]                            ; +0x10, 0x1001f9374\nSTP             X20, X19, [SP,#0x70+var_10]                            ; +0x14, 0x1001f9378\nSTP             X29, X30, [SP,#0x70+var_s0]                            ; +0x18, 0x1001f937c\nADD             X29, SP, #0x70                                         ; +0x1c, 0x1001f9380\nFMOV            S8, S1                                                 ; +0x20, 0x1001f9384\nMOV             X21, X3                                                ; +0x24, 0x1001f9388\nMOV             X23, X2                                                ; +0x28, 0x1001f938c\nMOV             X20, X1                                                ; +0x2c, 0x1001f9390\nMOV             X22, X0                                                ; +0x30, 0x1001f9394\nMOV             X19, X8                                                ; +0x34, 0x1001f9398\nMOV             W8, #0x42B40000                                        ; +0x38, 0x1001f939c\nFMOV            S1, W8                                                 ; +0x3c, 0x1001f93a0\nFSUB            S9, S1, S0                                             ; +0x40, 0x1001f93a4\nADRP            X8, #dword_100636FB8@PAGE                              ; +0x44, 0x1001f93a8\nLDR             S10, [X8,#dword_100636FB8@PAGEOFF]                     ; +0x48, 0x1001f93ac\nADRL            X1, qword_10086C9A0                                    ; +0x4c, 0x1001f93b0\nADD             X0, SP, #0x70+var_58                                   ; +0x54, 0x1001f93b8\nBL              sub_1000229B8                                          ; +0x58, 0x1001f93bc\nCMP             W23, #1                                                ; +0x5c, 0x1001f93c0\nB.LT            loc_1001F9408                                          ; +0x60, 0x1001f93c4\nMOV             X0, X22                                                ; +0x64, 0x1001f93c8\nMOV             X1, X23                                                ; +0x68, 0x1001f93cc\nBL              GJBaseGameLayer__tryGetObject                          ; +0x6c, 0x1001f93d0\nCBZ             X0, loc_1001F9408                                      ; +0x70, 0x1001f93d4\nMOV             X23, X0                                                ; +0x74, 0x1001f93d8\nBL              GameObject__getLastPosition                            ; +0x78, 0x1001f93dc\nMOV             X20, X0                                                ; +0x7c, 0x1001f93e0\nLDR             X8, [X23]                                              ; +0x80, 0x1001f93e4\nLDR             X9, [X8,#0x540]                                        ; +0x84, 0x1001f93e8\nADD             X8, SP, #0x70+var_68                                   ; +0x88, 0x1001f93ec\nMOV             X0, X23                                                ; +0x8c, 0x1001f93f0\nBLR             X9                                                     ; +0x90, 0x1001f93f4\nADD             X8, SP, #0x70+var_60                                   ; +0x94, 0x1001f93f8\nADD             X1, SP, #0x70+var_68                                   ; +0x98, 0x1001f93fc\nMOV             X0, X20                                                ; +0x9c, 0x1001f9400\nB               loc_1001F9458                                          ; +0xa0, 0x1001f9404\nCMP             W21, #1                                                ; +0xa4, 0x1001f9408\nB.LT            loc_1001F9468                                          ; +0xa8, 0x1001f940c\nMOV             X0, X22                                                ; +0xac, 0x1001f9410\nMOV             X1, X21                                                ; +0xb0, 0x1001f9414\nBL              GJBaseGameLayer__tryGetObject                          ; +0xb4, 0x1001f9418\nCBZ             X0, loc_1001F9468                                      ; +0xb8, 0x1001f941c\nMOV             X21, X0                                                ; +0xbc, 0x1001f9420\nLDR             X8, [X20]                                              ; +0xc0, 0x1001f9424\nLDR             X9, [X8,#0x540]                                        ; +0xc4, 0x1001f9428\nADD             X8, SP, #0x70+var_68                                   ; +0xc8, 0x1001f942c\nMOV             X0, X20                                                ; +0xcc, 0x1001f9430\nBLR             X9                                                     ; +0xd0, 0x1001f9434\nLDR             X8, [X21]                                              ; +0xd4, 0x1001f9438\nLDR             X9, [X8,#0x540]                                        ; +0xd8, 0x1001f943c\nMOV             X8, SP                                                 ; +0xdc, 0x1001f9440\nMOV             X0, X21                                                ; +0xe0, 0x1001f9444\nBLR             X9                                                     ; +0xe4, 0x1001f9448\nADD             X8, SP, #0x70+var_60                                   ; +0xe8, 0x1001f944c\nADD             X0, SP, #0x70+var_68                                   ; +0xec, 0x1001f9450\nMOV             X1, SP                                                 ; +0xf0, 0x1001f9454\nBL              sub_1000229F0                                          ; +0xf4, 0x1001f9458\nADD             X0, SP, #0x70+var_58                                   ; +0xf8, 0x1001f945c\nADD             X1, SP, #0x70+var_60                                   ; +0xfc, 0x1001f9460\nBL              sub_1000229D0                                          ; +0x100, 0x1001f9464\nFMUL            S9, S9, S10                                            ; +0x104, 0x1001f9468\nLDP             S1, S0, [SP,#0x70+var_58]                              ; +0x108, 0x1001f946c\nFCMP            S1, #0.0; float                                        ; +0x10c, 0x1001f9470\nB.NE            loc_1001F9480                                          ; +0x110, 0x1001f9474\nFCMP            S0, #0.0; float                                        ; +0x114, 0x1001f9478\nB.EQ            loc_1001F949C                                          ; +0x118, 0x1001f947c\nBL              _atan2f                                                ; +0x11c, 0x1001f9480\nFCVT            D0, S0                                                 ; +0x120, 0x1001f9484\nADRP            X8, #qword_10063A580@PAGE                              ; +0x124, 0x1001f9488\nLDR             D1, [X8,#qword_10063A580@PAGEOFF]                      ; +0x128, 0x1001f948c\nFADD            D0, D0, D1                                             ; +0x12c, 0x1001f9490\nFCVT            S0, D0                                                 ; +0x130, 0x1001f9494\nFADD            S9, S9, S0                                             ; +0x134, 0x1001f9498\nADD             X8, SP, #0x70+var_60                                   ; +0x138, 0x1001f949c\nFMOV            S0, S9                                                 ; +0x13c, 0x1001f94a0\nBL              cocos2d__ccpForAngle                                   ; +0x140, 0x1001f94a4\nADD             X0, SP, #0x70+var_60                                   ; +0x144, 0x1001f94a8\nMOV             X8, X19                                                ; +0x148, 0x1001f94ac\nFMOV            S0, S8                                                 ; +0x14c, 0x1001f94b0\nBL              sub_100022A14                                          ; +0x150, 0x1001f94b4\nLDP             X29, X30, [SP,#0x70+var_s0]                            ; +0x154, 0x1001f94b8\nLDP             X20, X19, [SP,#0x70+var_10]                            ; +0x158, 0x1001f94bc\nLDP             X22, X21, [SP,#0x70+var_20]                            ; +0x15c, 0x1001f94c0\nLDP             X24, X23, [SP,#0x70+var_30]                            ; +0x160, 0x1001f94c4\nLDP             D9, D8, [SP,#0x70+var_40]                              ; +0x164, 0x1001f94c8\nLDP             D11, D10, [SP,#0x70+var_50]                            ; +0x168, 0x1001f94cc\nADD             SP, SP, #0x80                                          ; +0x16c, 0x1001f94d0\nRET                                                                    ; +0x170, 0x1001f94d4", "xrefs": ["GJBaseGameLayer::modifyObjectPhysics @ 0x1001f9880", "GJBaseGameLayer::processAdvancedFollowAction @ 0x1001f9c98"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}