{"type": "func", "start": 4296957220, "end": 4296957520, "name": "GJBaseGameLayer::resetPlayer", "pseudocode": "// \n// GJBaseGameLayer::resetPlayer from 0x1001e5d24 to 0x1001e5e50 (300 bytes)\n// \n// 3 xrefs:\n// > PlayLayer::setupHasCompleted @ 0x100116b1c\n// > GJBaseGameLayer::resetLevelVariables @ 0x100202740\n// > LevelEditorLayer::onPlaytest @ 0x100362de4\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::resetPlayer(GJBaseGameLayer *a1)\n{\n  __n128 v1; // q0\n  __n128 v2; // q1\n  StartPosObject *m_startPosObject; // x0\n  double *v5; // x0\n  PlayerObject *m_player1; // x20\n  float v7; // s0\n  PlayerObject *m_player2; // x20\n  float v9; // s0\n  bool v10; // w8\n  int m_spawnGroup; // w1\n  GameObject *Object; // x0\n  __int64 v13; // [xsp+0h] [xbp-20h] BYREF\n  __int64 v14; // [xsp+8h] [xbp-18h] BYREF\n\n  v2.n128_u32[0] = 1121058816;\n  v1.n128_u32[0] = 0;\n  sub_100022980(v1, v2, &v14);\n  m_startPosObject = a1->m_startPosObject;\n  if ( m_startPosObject )\n  {\n    v5 = (double *)((__int64 (__fastcall *)(StartPosObject *))m_startPosObject->getPosition)(m_startPosObject);\n    sub_1000229D0(&v14, v5);\n  }\n  else\n  {\n    m_spawnGroup = a1->m_levelSettings->m_spawnGroup;\n    if ( m_spawnGroup >= 1 )\n    {\n      Object = GJBaseGameLayer::tryGetObject(a1, m_spawnGroup);\n      if ( Object )\n      {\n        ((void (__fastcall *)(__int64 *__return_ptr))Object->getRealPosition)(&v13);\n        sub_1000229D0(&v14, (double *)&v13);\n        if ( !a1->m_levelSettings->m_platformerMode )\n          LODWORD(v14) = 0;\n      }\n    }\n  }\n  m_player1 = a1->m_player1;\n  v7 = sub_1000229B8(&v13, &v14);\n  ((void (__fastcall *)(PlayerObject *, __int64 *, float))m_player1->setStartPos)(m_player1, &v13, v7);\n  ((void (__fastcall *)(PlayerObject *))a1->m_player1->resetObject)(a1->m_player1);\n  m_player2 = a1->m_player2;\n  v9 = sub_1000229B8(&v13, &v14);\n  ((void (__fastcall *)(PlayerObject *, __int64 *, float))m_player2->setStartPos)(m_player2, &v13, v9);\n  ((void (__fastcall *)(PlayerObject *))a1->m_player2->resetObject)(a1->m_player2);\n  v10 = !a1->m_levelSettings->m_decreaseBoostSlide;\n  a1->m_player1->m_decreaseBoostSlide = v10;\n  a1->m_player2->m_decreaseBoostSlide = v10;\n}", "assembly": "; \n; GJBaseGameLayer::resetPlayer from 0x1001e5d24 to 0x1001e5e50 (300 bytes)\n; \n; 3 xrefs:\n; > PlayLayer::setupHasCompleted @ 0x100116b1c\n; > GJBaseGameLayer::resetLevelVariables @ 0x100202740\n; > LevelEditorLayer::onPlaytest @ 0x100362de4\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, #0x30                                          ; +0x0, 0x1001e5d24\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x1001e5d28\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x1001e5d2c\nADD             X29, SP, #0x20                                         ; +0xc, 0x1001e5d30\nMOV             X19, X0                                                ; +0x10, 0x1001e5d34\nMOV             W8, #0x42D20000                                        ; +0x14, 0x1001e5d38\nFMOV            S1, W8                                                 ; +0x18, 0x1001e5d3c\nADD             X0, SP, #0x20+var_18                                   ; +0x1c, 0x1001e5d40\nFMOV            S0, WZR                                                ; +0x20, 0x1001e5d44\nBL              sub_100022980                                          ; +0x24, 0x1001e5d48\nLDR             X0, [X19,#0x3018]                                      ; +0x28, 0x1001e5d4c\nCBZ             X0, loc_1001E5E04                                      ; +0x2c, 0x1001e5d50\nLDR             X8, [X0]                                               ; +0x30, 0x1001e5d54\nLDR             X8, [X8,#0xC0]                                         ; +0x34, 0x1001e5d58\nBLR             X8                                                     ; +0x38, 0x1001e5d5c\nMOV             X1, X0                                                 ; +0x3c, 0x1001e5d60\nADD             X0, SP, #0x20+var_18                                   ; +0x40, 0x1001e5d64\nBL              sub_1000229D0                                          ; +0x44, 0x1001e5d68\nLDR             X20, [X19,#0xCC8]                                      ; +0x48, 0x1001e5d6c\nMOV             X0, SP                                                 ; +0x4c, 0x1001e5d70\nADD             X1, SP, #0x20+var_18                                   ; +0x50, 0x1001e5d74\nBL              sub_1000229B8                                          ; +0x54, 0x1001e5d78\nLDR             X8, [X20]                                              ; +0x58, 0x1001e5d7c\nLDR             X8, [X8,#0x548]                                        ; +0x5c, 0x1001e5d80\nMOV             X1, SP                                                 ; +0x60, 0x1001e5d84\nMOV             X0, X20                                                ; +0x64, 0x1001e5d88\nBLR             X8                                                     ; +0x68, 0x1001e5d8c\nLDR             X0, [X19,#0xCC8]                                       ; +0x6c, 0x1001e5d90\nLDR             X8, [X0]                                               ; +0x70, 0x1001e5d94\nLDR             X8, [X8,#0x4F8]                                        ; +0x74, 0x1001e5d98\nBLR             X8                                                     ; +0x78, 0x1001e5d9c\nLDR             X20, [X19,#0xCD0]                                      ; +0x7c, 0x1001e5da0\nMOV             X0, SP                                                 ; +0x80, 0x1001e5da4\nADD             X1, SP, #0x20+var_18                                   ; +0x84, 0x1001e5da8\nBL              sub_1000229B8                                          ; +0x88, 0x1001e5dac\nLDR             X8, [X20]                                              ; +0x8c, 0x1001e5db0\nLDR             X8, [X8,#0x548]                                        ; +0x90, 0x1001e5db4\nMOV             X1, SP                                                 ; +0x94, 0x1001e5db8\nMOV             X0, X20                                                ; +0x98, 0x1001e5dbc\nBLR             X8                                                     ; +0x9c, 0x1001e5dc0\nLDR             X0, [X19,#0xCD0]                                       ; +0xa0, 0x1001e5dc4\nLDR             X8, [X0]                                               ; +0xa4, 0x1001e5dc8\nLDR             X8, [X8,#0x4F8]                                        ; +0xa8, 0x1001e5dcc\nBLR             X8                                                     ; +0xac, 0x1001e5dd0\nLDR             X8, [X19,#0xCD8]                                       ; +0xb0, 0x1001e5dd4\nLDRB            W8, [X8,#0x1CB]                                        ; +0xb4, 0x1001e5dd8\nLDR             X9, [X19,#0xCC8]                                       ; +0xb8, 0x1001e5ddc\nMOV             W10, #1                                                ; +0xbc, 0x1001e5de0\nBIC             W8, W10, W8                                            ; +0xc0, 0x1001e5de4\nSTRB            W8, [X9,#0x9E0]                                        ; +0xc4, 0x1001e5de8\nLDR             X9, [X19,#0xCD0]                                       ; +0xc8, 0x1001e5dec\nSTRB            W8, [X9,#0x9E0]                                        ; +0xcc, 0x1001e5df0\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0xd0, 0x1001e5df4\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0xd4, 0x1001e5df8\nADD             SP, SP, #0x30 ; '0'                                    ; +0xd8, 0x1001e5dfc\nRET                                                                    ; +0xdc, 0x1001e5e00\nLDR             X8, [X19,#0xCD8]                                       ; +0xe0, 0x1001e5e04\nLDR             W1, [X8,#0x1BC]                                        ; +0xe4, 0x1001e5e08\nCMP             W1, #1                                                 ; +0xe8, 0x1001e5e0c\nB.LT            loc_1001E5D6C                                          ; +0xec, 0x1001e5e10\nMOV             X0, X19                                                ; +0xf0, 0x1001e5e14\nBL              GJBaseGameLayer__tryGetObject                          ; +0xf4, 0x1001e5e18\nCBZ             X0, loc_1001E5D6C                                      ; +0xf8, 0x1001e5e1c\nLDR             X8, [X0]                                               ; +0xfc, 0x1001e5e20\nLDR             X9, [X8,#0x540]                                        ; +0x100, 0x1001e5e24\nMOV             X8, SP                                                 ; +0x104, 0x1001e5e28\nBLR             X9                                                     ; +0x108, 0x1001e5e2c\nADD             X0, SP, #0x20+var_18                                   ; +0x10c, 0x1001e5e30\nMOV             X1, SP                                                 ; +0x110, 0x1001e5e34\nBL              sub_1000229D0                                          ; +0x114, 0x1001e5e38\nLDR             X8, [X19,#0xCD8]                                       ; +0x118, 0x1001e5e3c\nLDRB            W8, [X8,#0x155]                                        ; +0x11c, 0x1001e5e40\nTBNZ            W8, #0, loc_1001E5D6C                                  ; +0x120, 0x1001e5e44\nSTR             WZR, [SP,#0x20+var_18]                                 ; +0x124, 0x1001e5e48\nB               loc_1001E5D6C                                          ; +0x128, 0x1001e5e4c", "xrefs": ["PlayLayer::setupHasCompleted @ 0x100116b1c", "GJBaseGameLayer::resetLevelVariables @ 0x100202740", "LevelEditorLayer::onPlaytest @ 0x100362de4"], "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"}