{"type": "func", "start": 4297582892, "end": 4297583068, "name": "GJBaseGameLayer::getPortalTarget", "pseudocode": "// \n// GJBaseGameLayer::getPortalTarget from 0x10027e92c to 0x10027e9dc (176 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::teleportPlayer @ 0x10027e478\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:01:54 +0000\n// \n\n__int64 __fastcall GJBaseGameLayer::getPortalTarget(__int64 a1, __int64 a2)\n{\n  __int64 v2; // x8\n  int v3; // w1\n  __int64 Group; // x19\n  int v5; // w0\n  float v6; // s0\n  float v7; // s1\n\n  v2 = *(_QWORD *)(a2 + 1848);\n  if ( v2 )\n    return v2;\n  v3 = *(_DWORD *)(a2 + 1464);\n  if ( v3 < 1 )\n    return 0;\n  Group = GJBaseGameLayer::getGroup(a1, v3);\n  v5 = sub_1002E757C(Group);\n  if ( v5 < 1 )\n    return 0;\n  v6 = 0.0;\n  v7 = 0.0;\n  if ( v5 != 1 )\n  {\n    qword_1009F5858 = 214013 * qword_1009F5858 + 2531011;\n    v7 = (float)(((unsigned __int64)qword_1009F5858 >> 16) & 0x7FFF) / 32767.0;\n  }\n  if ( v7 != 1.0 )\n    v6 = v7;\n  return sub_1002E75A0(Group, (unsigned int)(int)(float)(v6 * (float)(unsigned int)v5));\n}", "assembly": "; \n; GJBaseGameLayer::getPortalTarget from 0x10027e92c to 0x10027e9dc (176 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::teleportPlayer @ 0x10027e478\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:01:54 +0000\n; \nSTP             X20, X19, [SP,#-0x10+var_10]!                          ; +0x0, 0x10027e92c\nSTP             X29, X30, [SP,#0x10+var_s0]                            ; +0x4, 0x10027e930\nADD             X29, SP, #0x10                                         ; +0x8, 0x10027e934\nLDR             X8, [X1,#0x738]                                        ; +0xc, 0x10027e938\nCBNZ            X8, loc_10027E9CC                                      ; +0x10, 0x10027e93c\nLDR             W1, [X1,#0x5B8]                                        ; +0x14, 0x10027e940\nCMP             W1, #1                                                 ; +0x18, 0x10027e944\nB.LT            loc_10027E9C8                                          ; +0x1c, 0x10027e948\nBL              GJBaseGameLayer__getGroup                              ; +0x20, 0x10027e94c\nMOV             X19, X0                                                ; +0x24, 0x10027e950\nBL              sub_1002E757C                                          ; +0x28, 0x10027e954\nCMP             W0, #1                                                 ; +0x2c, 0x10027e958\nB.LT            loc_10027E9C8                                          ; +0x30, 0x10027e95c\nFMOV            S0, WZR                                                ; +0x34, 0x10027e960\nFMOV            S1, WZR                                                ; +0x38, 0x10027e964\nB.EQ            loc_10027E9A0                                          ; +0x3c, 0x10027e968\nADRP            X8, #qword_1009F5858@PAGE                              ; +0x40, 0x10027e96c\nLDR             X9, [X8,#qword_1009F5858@PAGEOFF]                      ; +0x44, 0x10027e970\nMOV             W10, #0x343FD                                          ; +0x48, 0x10027e974\nMOV             W11, #0x269EC3                                         ; +0x50, 0x10027e97c\nMADD            X9, X9, X10, X11                                       ; +0x58, 0x10027e984\nSTR             X9, [X8,#qword_1009F5858@PAGEOFF]                      ; +0x5c, 0x10027e988\nUBFX            X8, X9, #0x10, #0xF                                    ; +0x60, 0x10027e98c\nUCVTF           S1, X8                                                 ; +0x64, 0x10027e990\nADRP            X8, #dword_10075CAAC@PAGE                              ; +0x68, 0x10027e994\nLDR             S2, [X8,#dword_10075CAAC@PAGEOFF]                      ; +0x6c, 0x10027e998\nFDIV            S1, S1, S2                                             ; +0x70, 0x10027e99c\nFMOV            S2, #1.0                                               ; +0x74, 0x10027e9a0\nFCMP            S1, S2                                                 ; +0x78, 0x10027e9a4\nUCVTF           S2, W0                                                 ; +0x7c, 0x10027e9a8\nFCSEL           S0, S0, S1, EQ                                         ; +0x80, 0x10027e9ac\nFMUL            S0, S0, S2                                             ; +0x84, 0x10027e9b0\nFCVTZS          W1, S0                                                 ; +0x88, 0x10027e9b4\nMOV             X0, X19                                                ; +0x8c, 0x10027e9b8\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x90, 0x10027e9bc\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x94, 0x10027e9c0\nB               sub_1002E75A0                                          ; +0x98, 0x10027e9c4\nMOV             X8, #0                                                 ; +0x9c, 0x10027e9c8\nMOV             X0, X8                                                 ; +0xa0, 0x10027e9cc\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0xa4, 0x10027e9d0\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0xa8, 0x10027e9d4\nRET                                                                    ; +0xac, 0x10027e9d8", "xrefs": ["GJBaseGameLayer::teleportPlayer @ 0x10027e478"], "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"}