{"type": "func", "start": 7932728, "end": 7932920, "name": "DrawGridLayer::getPortalMinMax", "pseudocode": "// \n// DrawGridLayer::getPortalMinMax from 0x790b38 to 0x790bf8 (192 bytes)\n// \n// 2 xrefs:\n// > DrawGridLayer::draw @ 0x791cb8\n// > <???> @ 0xe1940\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 12:53:29 +0000\n// \n\ncocos2d::CCPoint *__usercall DrawGridLayer::getPortalMinMax@<X0>(GameObject *a1@<X1>, cocos2d::CCPoint *a2@<X8>)\n{\n  float v5; // s8\n  float v6; // s0\n\n  if ( (*(unsigned int (__fastcall **)(GameObject *))(*(_QWORD *)a1 + 1800LL))(a1) == 16 )\n  {\n    v5 = 240.0;\n  }\n  else if ( (*(unsigned int (__fastcall **)(GameObject *))(*(_QWORD *)a1 + 1800LL))(a1) == 33 )\n  {\n    v5 = 270.0;\n  }\n  else\n  {\n    v5 = 300.0;\n  }\n  v6 = floorf(\n         (float)((float)(*(float *)((*(__int64 (__fastcall **)(GameObject *))(*(_QWORD *)a1 + 192LL))(a1) + 4)\n                       - (float)(v5 * 0.5))\n               + 0.0)\n       / 30.0)\n     * 30.0;\n  if ( v6 <= 90.0 )\n    v6 = 90.0;\n  cocos2d::CCPoint::CCPoint(a2, v6, v5 + v6);\n  return a2;\n}", "assembly": "; \n; DrawGridLayer::getPortalMinMax from 0x790b38 to 0x790bf8 (192 bytes)\n; \n; 2 xrefs:\n; > DrawGridLayer::draw @ 0x791cb8\n; > <???> @ 0xe1940\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 12:53:29 +0000\n; \nSTP             X29, X30, [SP,#var_30]!                                ; +0x0, 0x790b38\nMOV             X0, X1                                                 ; +0x4, 0x790b3c\nMOV             X29, SP                                                ; +0x8, 0x790b40\nSTP             X19, X20, [SP,#0x30+var_20]                            ; +0xc, 0x790b44\nSTR             D8, [SP,#0x30+var_10]                                  ; +0x10, 0x790b48\nMOV             X19, X1                                                ; +0x14, 0x790b4c\nLDR             X1, [X1]                                               ; +0x18, 0x790b50\nMOV             X20, X8                                                ; +0x1c, 0x790b54\nLDR             X1, [X1,#0x708]                                        ; +0x20, 0x790b58\nBLR             X1                                                     ; +0x24, 0x790b5c\nCMP             W0, #0x10                                              ; +0x28, 0x790b60\nB.EQ            loc_790BE8                                             ; +0x2c, 0x790b64\nLDR             X1, [X19]                                              ; +0x30, 0x790b68\nMOV             X0, X19                                                ; +0x34, 0x790b6c\nLDR             X1, [X1,#0x708]                                        ; +0x38, 0x790b70\nBLR             X1                                                     ; +0x3c, 0x790b74\nCMP             W0, #0x21 ; '!'                                        ; +0x40, 0x790b78\nB.EQ            loc_790BF0                                             ; +0x44, 0x790b7c\nLDR             S8, =0x43960000                                        ; +0x48, 0x790b80\nLDR             X1, [X19]                                              ; +0x4c, 0x790b84\nMOV             X0, X19                                                ; +0x50, 0x790b88\nLDR             X1, [X1,#0xC0]                                         ; +0x54, 0x790b8c\nBLR             X1                                                     ; +0x58, 0x790b90\nFMOV            S0, #0.5                                               ; +0x5c, 0x790b94\nLDR             S1, [X0,#4]                                            ; +0x60, 0x790b98\nFMOV            S3, WZR                                                ; +0x64, 0x790b9c\nFMSUB           S0, S8, S0, S1                                         ; +0x68, 0x790ba0\nFMOV            S2, #30.0                                              ; +0x6c, 0x790ba4\nLDR             S1, =0x42B40000                                        ; +0x70, 0x790ba8\nFADD            S0, S0, S3                                             ; +0x74, 0x790bac\nFDIV            S0, S0, S2                                             ; +0x78, 0x790bb0\nFRINTM          S0, S0                                                 ; +0x7c, 0x790bb4\nFMUL            S0, S0, S2                                             ; +0x80, 0x790bb8\nFCMPE           S0, S1                                                 ; +0x84, 0x790bbc\nB.GT            loc_790BC8                                             ; +0x88, 0x790bc0\nFMOV            S0, S1; float                                          ; +0x8c, 0x790bc4\nFADD            S1, S8, S0; float                                      ; +0x90, 0x790bc8\nMOV             X0, X20; this                                          ; +0x94, 0x790bcc\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x98, 0x790bd0\nMOV             X0, X20                                                ; +0x9c, 0x790bd4\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0xa0, 0x790bd8\nLDR             D8, [SP,#0x30+var_10]                                  ; +0xa4, 0x790bdc\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0xa8, 0x790be0\nRET                                                                    ; +0xac, 0x790be4\nLDR             S8, =0x43700000                                        ; +0xb0, 0x790be8\nB               loc_790B84                                             ; +0xb4, 0x790bec\nLDR             S8, =0x43870000                                        ; +0xb8, 0x790bf0\nB               loc_790B84                                             ; +0xbc, 0x790bf4", "xrefs": ["DrawGridLayer::draw @ 0x791cb8", "<???> @ 0xe1940"], "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"}