{"type": "func", "start": 4297692048, "end": 4297692272, "name": "GJBaseGameLayer::getCameraEdgeValue", "pseudocode": "// \n// GJBaseGameLayer::getCameraEdgeValue from 0x100299390 to 0x100299470 (224 bytes)\n// \n// 5 xrefs:\n// > GJBaseGameLayer::updateCamera @ 0x10029ba0c\n// > GJBaseGameLayer::updateCamera @ 0x10029ba28\n// > GJBaseGameLayer::updateCamera @ 0x10029ba4c\n// > GJBaseGameLayer::updateCamera @ 0x10029ba70\n// > GJBaseGameLayer::updateCamera @ 0x10029ba88\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:07 +0000\n// \n\nfloat __fastcall GJBaseGameLayer::getCameraEdgeValue(unsigned int *a1, int a2)\n{\n  __int64 v4; // x21\n  __int64 MainObject; // x0\n  __int64 v7; // [xsp+0h] [xbp-30h] BYREF\n  __int64 v8; // [xsp+8h] [xbp-28h] BYREF\n\n  v4 = 0;\n  if ( a2 > 2 )\n  {\n    if ( a2 == 3 )\n    {\n      v4 = a1[266];\n    }\n    else if ( a2 == 4 )\n    {\n      v4 = a1[267];\n    }\n  }\n  else if ( a2 == 1 )\n  {\n    v4 = a1[264];\n  }\n  else if ( a2 == 2 )\n  {\n    v4 = a1[265];\n  }\n  sub_1000262F4(&v8, (double *)&qword_1009F5820);\n  MainObject = GJBaseGameLayer::tryGetMainObject((__int64)a1, v4);\n  if ( MainObject )\n  {\n    (*(void (__fastcall **)(__int64 *__return_ptr))(*(_QWORD *)MainObject + 1360LL))(&v7);\n    sub_10002630C(&v8, (double *)&v7);\n  }\n  if ( (unsigned int)(a2 - 3) < 2 )\n    return *((float *)&v8 + 1);\n  if ( (unsigned int)(a2 - 1) > 1 )\n    return 0.0;\n  return *(float *)&v8;\n}", "assembly": "; \n; GJBaseGameLayer::getCameraEdgeValue from 0x100299390 to 0x100299470 (224 bytes)\n; \n; 5 xrefs:\n; > GJBaseGameLayer::updateCamera @ 0x10029ba0c\n; > GJBaseGameLayer::updateCamera @ 0x10029ba28\n; > GJBaseGameLayer::updateCamera @ 0x10029ba4c\n; > GJBaseGameLayer::updateCamera @ 0x10029ba70\n; > GJBaseGameLayer::updateCamera @ 0x10029ba88\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:07 +0000\n; \nSUB             SP, SP, #0x40                                          ; +0x0, 0x100299390\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0x4, 0x100299394\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x100299398\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x10029939c\nADD             X29, SP, #0x30                                         ; +0x10, 0x1002993a0\nMOV             X19, X1                                                ; +0x14, 0x1002993a4\nMOV             X20, X0                                                ; +0x18, 0x1002993a8\nMOV             W21, #0                                                ; +0x1c, 0x1002993ac\nCMP             W1, #2                                                 ; +0x20, 0x1002993b0\nB.GT            loc_1002993D0                                          ; +0x24, 0x1002993b4\nCMP             W19, #1                                                ; +0x28, 0x1002993b8\nB.EQ            loc_1002993E8                                          ; +0x2c, 0x1002993bc\nCMP             W19, #2                                                ; +0x30, 0x1002993c0\nB.NE            loc_1002993F4                                          ; +0x34, 0x1002993c4\nLDR             W21, [X20,#0x424]                                      ; +0x38, 0x1002993c8\nB               loc_1002993F4                                          ; +0x3c, 0x1002993cc\nCMP             W19, #3                                                ; +0x40, 0x1002993d0\nB.EQ            loc_1002993F0                                          ; +0x44, 0x1002993d4\nCMP             W19, #4                                                ; +0x48, 0x1002993d8\nB.NE            loc_1002993F4                                          ; +0x4c, 0x1002993dc\nLDR             W21, [X20,#0x42C]                                      ; +0x50, 0x1002993e0\nB               loc_1002993F4                                          ; +0x54, 0x1002993e4\nLDR             W21, [X20,#0x420]                                      ; +0x58, 0x1002993e8\nB               loc_1002993F4                                          ; +0x5c, 0x1002993ec\nLDR             W21, [X20,#0x428]                                      ; +0x60, 0x1002993f0\nADRL            X1, qword_1009F5820                                    ; +0x64, 0x1002993f4\nADD             X0, SP, #0x30+var_28                                   ; +0x6c, 0x1002993fc\nBL              sub_1000262F4                                          ; +0x70, 0x100299400\nMOV             X0, X20                                                ; +0x74, 0x100299404\nMOV             X1, X21                                                ; +0x78, 0x100299408\nBL              GJBaseGameLayer__tryGetMainObject                      ; +0x7c, 0x10029940c\nCBZ             X0, loc_100299430                                      ; +0x80, 0x100299410\nLDR             X8, [X0]                                               ; +0x84, 0x100299414\nLDR             X9, [X8,#0x550]                                        ; +0x88, 0x100299418\nMOV             X8, SP                                                 ; +0x8c, 0x10029941c\nBLR             X9                                                     ; +0x90, 0x100299420\nADD             X0, SP, #0x30+var_28                                   ; +0x94, 0x100299424\nMOV             X1, SP                                                 ; +0x98, 0x100299428\nBL              sub_10002630C                                          ; +0x9c, 0x10029942c\nSUB             W8, W19, #3                                            ; +0xa0, 0x100299430\nCMP             W8, #2                                                 ; +0xa4, 0x100299434\nB.CC            loc_100299450                                          ; +0xa8, 0x100299438\nSUB             W8, W19, #1                                            ; +0xac, 0x10029943c\nCMP             W8, #1                                                 ; +0xb0, 0x100299440\nB.HI            loc_100299458                                          ; +0xb4, 0x100299444\nLDR             S0, [SP,#0x30+var_28]                                  ; +0xb8, 0x100299448\nB               loc_10029945C                                          ; +0xbc, 0x10029944c\nLDR             S0, [SP,#0x30+var_24]                                  ; +0xc0, 0x100299450\nB               loc_10029945C                                          ; +0xc4, 0x100299454\nFMOV            S0, WZR                                                ; +0xc8, 0x100299458\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0xcc, 0x10029945c\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0xd0, 0x100299460\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0xd4, 0x100299464\nADD             SP, SP, #0x40 ; '@'                                    ; +0xd8, 0x100299468\nRET                                                                    ; +0xdc, 0x10029946c", "xrefs": ["GJBaseGameLayer::updateCamera @ 0x10029ba0c", "GJBaseGameLayer::updateCamera @ 0x10029ba28", "GJBaseGameLayer::updateCamera @ 0x10029ba4c", "GJBaseGameLayer::updateCamera @ 0x10029ba70", "GJBaseGameLayer::updateCamera @ 0x10029ba88"], "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"}