{"type": "func", "start": 4296980512, "end": 4296980828, "name": "GJBaseGameLayer::updateSavePositionObjects", "pseudocode": "// \n// GJBaseGameLayer::updateSavePositionObjects from 0x1001eb820 to 0x1001eb95c (316 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::update @ 0x1001fedcc\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\nvoid __fastcall GJBaseGameLayer::updateSavePositionObjects(GJBaseGameLayer *p_m_cameraPosition2)\n{\n  GJBaseGameLayer *v1; // x19\n  int m_unkUint5; // w8\n  unsigned int v3; // w9\n  unsigned int m_unkUint6; // w8\n  std::__hash_node_base<std::__hash_node<std::__hash_value_type<int, int>, void *> *>::__next_pointer next; // x22\n  int v6; // w8\n  int next_high; // w26\n  GameObject *v8; // x21\n  int m_unkUint12; // w21\n  GameObject *m_player2; // x0\n  int v11; // w8\n  std::__vector_base<float>::pointer begin; // x10\n  int v13; // [xsp+0h] [xbp-50h] BYREF\n  int *v14; // [xsp+8h] [xbp-48h] BYREF\n\n  v1 = p_m_cameraPosition2;\n  m_unkUint5 = p_m_cameraPosition2->m_gameState.m_unkUint5;\n  if ( !m_unkUint5 )\n  {\n    m_unkUint6 = p_m_cameraPosition2->m_gameState.m_unkUint6;\nLABEL_5:\n    p_m_cameraPosition2->m_gameState.m_unkUint5 = m_unkUint6;\n    ++p_m_cameraPosition2->m_gameState.m_unkUint11;\n    next = p_m_cameraPosition2->m_savePositionValues.__table_.__p1_.__value_.__next_;\n    if ( !next )\n      return;\n    while ( 1 )\n    {\n      v6 = (int)next[2].__next_;\n      next_high = HIDWORD(next[2].__next_);\n      v13 = v6;\n      if ( v6 < 1 )\n      {\n        if ( v6 == -3 )\n        {\n          m_unkUint12 = v1->m_gameState.m_unkUint12;\n          p_m_cameraPosition2 = (GJBaseGameLayer *)&v1->m_gameState.m_cameraPosition2;\n        }\n        else\n        {\n          if ( v6 == -2 )\n          {\n            m_player2 = v1->m_player2;\n          }\n          else\n          {\n            if ( v6 != -1 )\n            {\n              m_unkUint12 = 0;\n              goto LABEL_16;\n            }\n            m_player2 = v1->m_player1;\n          }\n          m_unkUint12 = m_player2->m_unk52C;\n          p_m_cameraPosition2 = (GJBaseGameLayer *)GameObject::getLastPosition(m_player2);\n        }\n      }\n      else\n      {\n        v14 = &v13;\n        v8 = (GameObject *)sub_100019F24(\n                             (unsigned __int64)&v1->m_savePositionObjects,\n                             &v13,\n                             (__int64)&unk_10063A31C,\n                             &v14)[3];\n        p_m_cameraPosition2 = (GJBaseGameLayer *)GameObject::getLastPosition(v8);\n        m_unkUint12 = v8->m_unk52C;\n      }\nLABEL_16:\n      v11 = v1->m_gameState.m_unkUint11 % next_high + m_unkUint12;\n      begin = v1->m_gameState.m_unkVecFloat1.__begin_;\n      begin[2 * v11] = *(std::__vector_base<float>::pointer)&p_m_cameraPosition2->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n      begin[2 * v11 + 1] = *((std::__vector_base<float>::pointer)&p_m_cameraPosition2->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable\n                           + 1);\n      next = next->__next_;\n      if ( !next )\n        return;\n    }\n  }\n  v3 = m_unkUint5 + 1000;\n  m_unkUint6 = p_m_cameraPosition2->m_gameState.m_unkUint6;\n  if ( v3 <= m_unkUint6 )\n    goto LABEL_5;\n}", "assembly": "; \n; GJBaseGameLayer::updateSavePositionObjects from 0x1001eb820 to 0x1001eb95c (316 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::update @ 0x1001fedcc\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, #0x60                                          ; +0x0, 0x1001eb820\nSTP             X26, X25, [SP,#0x50+var_40]                            ; +0x4, 0x1001eb824\nSTP             X24, X23, [SP,#0x50+var_30]                            ; +0x8, 0x1001eb828\nSTP             X22, X21, [SP,#0x50+var_20]                            ; +0xc, 0x1001eb82c\nSTP             X20, X19, [SP,#0x50+var_10]                            ; +0x10, 0x1001eb830\nSTP             X29, X30, [SP,#0x50+var_s0]                            ; +0x14, 0x1001eb834\nADD             X29, SP, #0x50                                         ; +0x18, 0x1001eb838\nMOV             X19, X0                                                ; +0x1c, 0x1001eb83c\nLDR             W8, [X0,#0x3C0]                                        ; +0x20, 0x1001eb840\nCBZ             W8, loc_1001EB85C                                      ; +0x24, 0x1001eb844\nADD             W9, W8, #0x3E8                                         ; +0x28, 0x1001eb848\nLDR             W8, [X19,#0x3C4]                                       ; +0x2c, 0x1001eb84c\nCMP             W9, W8                                                 ; +0x30, 0x1001eb850\nB.LS            loc_1001EB860                                          ; +0x34, 0x1001eb854\nB               loc_1001EB940                                          ; +0x38, 0x1001eb858\nLDR             W8, [X19,#0x3C4]                                       ; +0x3c, 0x1001eb85c\nSTR             W8, [X19,#0x3C0]                                       ; +0x40, 0x1001eb860\nLDR             W8, [X19,#0x474]                                       ; +0x44, 0x1001eb864\nADD             W8, W8, #1                                             ; +0x48, 0x1001eb868\nSTR             W8, [X19,#0x474]                                       ; +0x4c, 0x1001eb86c\nLDR             X22, [X19,#0x3330]                                     ; +0x50, 0x1001eb870\nCBZ             X22, loc_1001EB940                                     ; +0x54, 0x1001eb874\nADD             X23, X19, #0x4B4                                       ; +0x58, 0x1001eb878\nMOV             W24, #0x32F8                                           ; +0x5c, 0x1001eb87c\nMOV             X25, SP                                                ; +0x60, 0x1001eb880\nADRL            X20, unk_10063A31C                                     ; +0x64, 0x1001eb884\nLDP             W8, W26, [X22,#0x10]                                   ; +0x6c, 0x1001eb88c\nSTR             W8, [SP,#0x50+var_50]                                  ; +0x70, 0x1001eb890\nCMP             W8, #1                                                 ; +0x74, 0x1001eb894\nB.LT            loc_1001EB8CC                                          ; +0x78, 0x1001eb898\nSTR             X25, [SP,#0x50+var_48]                                 ; +0x7c, 0x1001eb89c\nADD             X0, X19, X24                                           ; +0x80, 0x1001eb8a0\nMOV             X1, SP                                                 ; +0x84, 0x1001eb8a4\nADD             X3, SP, #0x50+var_48                                   ; +0x88, 0x1001eb8a8\nADD             X4, SP, #0x50+var_49                                   ; +0x8c, 0x1001eb8ac\nMOV             X2, X20                                                ; +0x90, 0x1001eb8b0\nBL              sub_100019F24                                          ; +0x94, 0x1001eb8b4\nLDR             X21, [X0,#0x18]                                        ; +0x98, 0x1001eb8b8\nMOV             X0, X21                                                ; +0x9c, 0x1001eb8bc\nBL              GameObject__getLastPosition                            ; +0xa0, 0x1001eb8c0\nLDR             W21, [X21,#0x53C]                                      ; +0xa4, 0x1001eb8c4\nB               loc_1001EB90C                                          ; +0xa8, 0x1001eb8c8\nCMN             W8, #3                                                 ; +0xac, 0x1001eb8cc\nB.EQ            loc_1001EB8FC                                          ; +0xb0, 0x1001eb8d0\nCMN             W8, #2                                                 ; +0xb4, 0x1001eb8d4\nB.EQ            loc_1001EB8EC                                          ; +0xb8, 0x1001eb8d8\nCMN             W8, #1                                                 ; +0xbc, 0x1001eb8dc\nB.NE            loc_1001EB908                                          ; +0xc0, 0x1001eb8e0\nLDR             X0, [X19,#0xCC8]                                       ; +0xc4, 0x1001eb8e4\nB               loc_1001EB8F0                                          ; +0xc8, 0x1001eb8e8\nLDR             X0, [X19,#0xCD0]                                       ; +0xcc, 0x1001eb8ec\nLDR             W21, [X0,#0x53C]                                       ; +0xd0, 0x1001eb8f0\nBL              GameObject__getLastPosition                            ; +0xd4, 0x1001eb8f4\nB               loc_1001EB90C                                          ; +0xd8, 0x1001eb8f8\nLDR             W21, [X19,#0x478]                                      ; +0xdc, 0x1001eb8fc\nMOV             X0, X23                                                ; +0xe0, 0x1001eb900\nB               loc_1001EB90C                                          ; +0xe4, 0x1001eb904\nMOV             W21, #0                                                ; +0xe8, 0x1001eb908\nLDR             W8, [X19,#0x474]                                       ; +0xec, 0x1001eb90c\nSDIV            W9, W8, W26                                            ; +0xf0, 0x1001eb910\nMSUB            W8, W9, W26, W8                                        ; +0xf4, 0x1001eb914\nADD             W8, W8, W21                                            ; +0xf8, 0x1001eb918\nSBFIZ           X9, X8, #1, #0x20 ; ' '                                ; +0xfc, 0x1001eb91c\nLDR             S0, [X0]                                               ; +0x100, 0x1001eb920\nLDR             X10, [X19,#0x458]                                      ; +0x104, 0x1001eb924\nSTR             S0, [X10,W9,SXTW#2]                                    ; +0x108, 0x1001eb928\nLDR             S0, [X0,#4]                                            ; +0x10c, 0x1001eb92c\nADD             X8, X10, W8,SXTW#3                                     ; +0x110, 0x1001eb930\nSTR             S0, [X8,#4]                                            ; +0x114, 0x1001eb934\nLDR             X22, [X22]                                             ; +0x118, 0x1001eb938\nCBNZ            X22, loc_1001EB88C                                     ; +0x11c, 0x1001eb93c\nLDP             X29, X30, [SP,#0x50+var_s0]                            ; +0x120, 0x1001eb940\nLDP             X20, X19, [SP,#0x50+var_10]                            ; +0x124, 0x1001eb944\nLDP             X22, X21, [SP,#0x50+var_20]                            ; +0x128, 0x1001eb948\nLDP             X24, X23, [SP,#0x50+var_30]                            ; +0x12c, 0x1001eb94c\nLDP             X26, X25, [SP,#0x50+var_40]                            ; +0x130, 0x1001eb950\nADD             SP, SP, #0x60 ; '`'                                    ; +0x134, 0x1001eb954\nRET                                                                    ; +0x138, 0x1001eb958", "xrefs": ["GJBaseGameLayer::update @ 0x1001fedcc"], "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"}