{"type": "func", "start": 6708124, "end": 6708316, "name": "DrawGridLayer::getPortalMinMax", "pseudocode": "// \n// DrawGridLayer::getPortalMinMax from 0x665b9c to 0x665c5c (192 bytes)\n// \n// 2 xrefs:\n// > DrawGridLayer::draw @ 0x666c1c\n// > <???> @ 0xac2c0\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 DrawGridLayer::getPortalMinMax(DrawGridLayer *a1, GameObject *a2)\n{\n  cocos2d::CCPoint *v2; // x8\n  cocos2d::CCPoint *v4; // x20\n  float v5; // s8\n  float v6; // s0\n  cocos2d::CCPoint result; // 0:s0.4,4:s1.4\n\n  v4 = v2;\n  if ( a2->getType(a2) == BallPortal )\n  {\n    v5 = 240.0;\n  }\n  else if ( a2->getType(a2) == SpiderPortal )\n  {\n    v5 = 270.0;\n  }\n  else\n  {\n    v5 = 300.0;\n  }\n  v6 = floorf((float)((float)(a2->getPosition(a2)->y - (float)(v5 * 0.5)) + 0.0) / 30.0) * 30.0;\n  if ( v6 <= 90.0 )\n    v6 = 90.0;\n  cocos2d::CCPoint::CCPoint(v4, v6, v5 + v6);\n  return result;\n}", "assembly": "; \n; DrawGridLayer::getPortalMinMax from 0x665b9c to 0x665c5c (192 bytes)\n; \n; 2 xrefs:\n; > DrawGridLayer::draw @ 0x666c1c\n; > <???> @ 0xac2c0\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\nSTP             X29, X30, [SP,#var_30]!                                ; +0x0, 0x665b9c\nMOV             X0, X1                                                 ; +0x4, 0x665ba0\nMOV             X29, SP                                                ; +0x8, 0x665ba4\nSTP             X19, X20, [SP,#0x30+var_20]                            ; +0xc, 0x665ba8\nMOV             X19, X1                                                ; +0x10, 0x665bac\nLDR             X1, [X1]                                               ; +0x14, 0x665bb0\nSTR             D8, [SP,#0x30+var_10]                                  ; +0x18, 0x665bb4\nMOV             X20, X8                                                ; +0x1c, 0x665bb8\nLDR             X1, [X1,#0x6F8]                                        ; +0x20, 0x665bbc\nBLR             X1                                                     ; +0x24, 0x665bc0\nCMP             W0, #0x10                                              ; +0x28, 0x665bc4\nB.EQ            loc_665C4C                                             ; +0x2c, 0x665bc8\nLDR             X1, [X19]                                              ; +0x30, 0x665bcc\nMOV             X0, X19                                                ; +0x34, 0x665bd0\nLDR             X1, [X1,#0x6F8]                                        ; +0x38, 0x665bd4\nBLR             X1                                                     ; +0x3c, 0x665bd8\nCMP             W0, #0x21 ; '!'                                        ; +0x40, 0x665bdc\nB.EQ            loc_665C54                                             ; +0x44, 0x665be0\nLDR             S8, =0x43960000                                        ; +0x48, 0x665be4\nLDR             X1, [X19]                                              ; +0x4c, 0x665be8\nMOV             X0, X19                                                ; +0x50, 0x665bec\nLDR             X1, [X1,#0xC0]                                         ; +0x54, 0x665bf0\nBLR             X1                                                     ; +0x58, 0x665bf4\nFMOV            S0, #0.5                                               ; +0x5c, 0x665bf8\nLDR             S1, [X0,#4]                                            ; +0x60, 0x665bfc\nFMOV            S3, WZR                                                ; +0x64, 0x665c00\nFMSUB           S0, S8, S0, S1                                         ; +0x68, 0x665c04\nFMOV            S2, #30.0                                              ; +0x6c, 0x665c08\nLDR             S1, =0x42B40000                                        ; +0x70, 0x665c0c\nFADD            S0, S0, S3                                             ; +0x74, 0x665c10\nFDIV            S0, S0, S2                                             ; +0x78, 0x665c14\nFRINTM          S0, S0                                                 ; +0x7c, 0x665c18\nFMUL            S0, S0, S2                                             ; +0x80, 0x665c1c\nFCMPE           S0, S1                                                 ; +0x84, 0x665c20\nB.GT            loc_665C2C                                             ; +0x88, 0x665c24\nFMOV            S0, S1; float                                          ; +0x8c, 0x665c28\nFADD            S1, S8, S0; float                                      ; +0x90, 0x665c2c\nMOV             X0, X20; this                                          ; +0x94, 0x665c30\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x98, 0x665c34\nMOV             X0, X20                                                ; +0x9c, 0x665c38\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0xa0, 0x665c3c\nLDR             D8, [SP,#0x30+var_10]                                  ; +0xa4, 0x665c40\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0xa8, 0x665c44\nRET                                                                    ; +0xac, 0x665c48\nLDR             S8, =0x43700000                                        ; +0xb0, 0x665c4c\nB               loc_665BE8                                             ; +0xb4, 0x665c50\nLDR             S8, =0x43870000                                        ; +0xb8, 0x665c54\nB               loc_665BE8                                             ; +0xbc, 0x665c58", "xrefs": ["DrawGridLayer::draw @ 0x666c1c", "<???> @ 0xac2c0"], "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"}