{"type": "func", "start": 8798768, "end": 8799088, "name": "GJBaseGameLayer::buttonIsRelevant", "pseudocode": "// \n// GJBaseGameLayer::buttonIsRelevant from 0x864230 to 0x864370 (320 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::shouldUseSubstepForButton @ 0x8643f4\n// > <???> @ 0x37e90\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\nbool GJBaseGameLayer::buttonIsRelevant(GJBaseGameLayer *a1, const PlayerButtonCommand *a2)\n{\n  float *v3; // x21\n  _BOOL4 m_isPlayer2; // w24\n  unsigned int m_twoPlayerMode; // w22\n  unsigned int v8; // w23\n  GameManager *v9; // x0\n  bool hasActiveDualTouch; // w0\n  _BOOL4 v11; // w21\n\n  if ( a2->m_button != Jump )\n    return 0;\n  v3 = &a1->m_varianceValues.__elems_[1975];\n  m_isPlayer2 = a2->m_isPlayer2;\n  m_twoPlayerMode = a1->m_levelSettings->m_twoPlayerMode;\n  v8 = !m_isPlayer2;\n  if ( !a1->m_isPlatformer && !a1->m_useReplay )\n  {\n    v9 = GameManager::sharedState();\n    if ( GameManager::getGameVariable(v9, \"0010\") )\n      v8 = m_isPlayer2;\n  }\n  hasActiveDualTouch = GJEffectManager::hasActiveDualTouch(a1->m_effectManager);\n  if ( !a2->m_isPush && !*((_BYTE *)v3 + 236) )\n  {\n    if ( m_twoPlayerMode > v8 )\n    {\nLABEL_20:\n      if ( !a1->m_gameState.m_isDualMode )\n        return 0;\n      v11 = v8 <= (m_twoPlayerMode ^ 1);\n      return v11 && (unsigned __int8)isRelevantForPlayer(a1->m_player2, (__int64)a2);\n    }\nLABEL_14:\n    if ( a1->m_gameState.m_isDualMode )\n    {\n      v11 = v8 <= (m_twoPlayerMode ^ 1);\n      if ( (unsigned __int8)isRelevantForPlayer(a1->m_player1, (__int64)a2) )\n        return 1;\n      return v11 && (unsigned __int8)isRelevantForPlayer(a1->m_player2, (__int64)a2);\n    }\n    return (unsigned __int8)isRelevantForPlayer(a1->m_player1, (__int64)a2) != 0;\n  }\n  if ( hasActiveDualTouch > v8 )\n    return 0;\n  if ( m_twoPlayerMode > v8 )\n  {\n    if ( *((_BYTE *)v3 + 236) )\n      return 0;\n    goto LABEL_20;\n  }\n  if ( !*((_BYTE *)v3 + 236) )\n    goto LABEL_14;\n  return (unsigned __int8)isRelevantForPlayer(a1->m_player1, (__int64)a2) != 0;\n}", "assembly": "; \n; GJBaseGameLayer::buttonIsRelevant from 0x864230 to 0x864370 (320 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::shouldUseSubstepForButton @ 0x8643f4\n; > <???> @ 0x37e90\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\nSTP             X29, X30, [SP,#-0x40+var_s0]!                          ; +0x0, 0x864230\nMOV             X29, SP                                                ; +0x4, 0x864234\nLDR             W2, [X1]                                               ; +0x8, 0x864238\nSTP             X19, X20, [SP,#var_s10]                                ; +0xc, 0x86423c\nSTP             X21, X22, [SP,#var_s20]                                ; +0x10, 0x864240\nSTP             X23, X24, [SP,#var_s30]                                ; +0x14, 0x864244\nCMP             W2, #1                                                 ; +0x18, 0x864248\nB.EQ            loc_864268                                             ; +0x1c, 0x86424c\nMOV             W0, #0                                                 ; +0x20, 0x864250\nLDP             X19, X20, [SP,#var_s10]                                ; +0x24, 0x864254\nLDP             X21, X22, [SP,#var_s20]                                ; +0x28, 0x864258\nLDP             X23, X24, [SP,#var_s30]                                ; +0x2c, 0x86425c\nLDP             X29, X30, [SP+var_s0],#0x40                            ; +0x30, 0x864260\nRET                                                                    ; +0x34, 0x864264\nADD             X21, X0, #3,LSL#12                                     ; +0x38, 0x864268\nMOV             X19, X1                                                ; +0x3c, 0x86426c\nMOV             X20, X0                                                ; +0x40, 0x864270\nLDR             X1, [X0,#0xE08]                                        ; +0x44, 0x864274\nLDRB            W0, [X21,#0x10E]                                       ; +0x48, 0x864278\nLDRB            W24, [X19,#5]                                          ; +0x4c, 0x86427c\nLDRB            W22, [X1,#0x154]                                       ; +0x50, 0x864280\nEOR             W23, W24, #1                                           ; +0x54, 0x864284\nCBNZ            W0, loc_8642B0                                         ; +0x58, 0x864288\nLDRB            W0, [X21,#0x1F0]; this                                 ; +0x5c, 0x86428c\nCBNZ            W0, loc_8642B0                                         ; +0x60, 0x864290\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x64, 0x864294\nADRL            X1, a0010; \"0010\"                                      ; +0x68, 0x864298\nBL              _ZN11GameManager15getGameVariableEPKc; GameManager::getGameVariable(char const*) ; +0x70, 0x8642a0\nUXTB            W0, W0                                                 ; +0x74, 0x8642a4\nCMP             W0, WZR                                                ; +0x78, 0x8642a8\nCSEL            W23, W23, W24, EQ                                      ; +0x7c, 0x8642ac\nLDR             X0, [X20,#0x9A8]; this                                 ; +0x80, 0x8642b0\nBL              _ZN15GJEffectManager18hasActiveDualTouchEv; GJEffectManager::hasActiveDualTouch(void) ; +0x84, 0x8642b4\nUXTB            W0, W0                                                 ; +0x88, 0x8642b8\nLDRB            W1, [X19,#4]                                           ; +0x8c, 0x8642bc\nCBNZ            W1, loc_8642D8                                         ; +0x90, 0x8642c0\nLDRB            W1, [X21,#0xEC]                                        ; +0x94, 0x8642c4\nCBNZ            W1, loc_8642D8                                         ; +0x98, 0x8642c8\nCMP             W22, W23                                               ; +0x9c, 0x8642cc\nB.LS            loc_8642F0                                             ; +0xa0, 0x8642d0\nB               loc_86433C                                             ; +0xa4, 0x8642d4\nCMP             W0, W23                                                ; +0xa8, 0x8642d8\nB.HI            loc_864250                                             ; +0xac, 0x8642dc\nCMP             W22, W23                                               ; +0xb0, 0x8642e0\nLDRB            W0, [X21,#0xEC]                                        ; +0xb4, 0x8642e4\nB.HI            loc_864338                                             ; +0xb8, 0x8642e8\nCBNZ            W0, loc_864354                                         ; +0xbc, 0x8642ec\nLDRB            W0, [X20,#0x412]                                       ; +0xc0, 0x8642f0\nCBZ             W0, loc_864354                                         ; +0xc4, 0x8642f4\nEOR             W22, W22, #1                                           ; +0xc8, 0x8642f8\nLDR             X0, [X20,#0xDF8]; this                                 ; +0xcc, 0x8642fc\nCMP             W23, W22                                               ; +0xd0, 0x864300\nMOV             X1, X19                                                ; +0xd4, 0x864304\nCSET            W21, LS                                                ; +0xd8, 0x864308\nBL              _Z19isRelevantForPlayerP12PlayerObjectRK19PlayerButtonCommand; isRelevantForPlayer(PlayerObject *,PlayerButtonCommand const&) ; +0xdc, 0x86430c\nUXTB            W0, W0                                                 ; +0xe0, 0x864310\nCBNZ            W0, loc_864330                                         ; +0xe4, 0x864314\nCBZ             W21, loc_864250                                        ; +0xe8, 0x864318\nLDR             X0, [X20,#0xE00]; this                                 ; +0xec, 0x86431c\nMOV             X1, X19                                                ; +0xf0, 0x864320\nBL              _Z19isRelevantForPlayerP12PlayerObjectRK19PlayerButtonCommand; isRelevantForPlayer(PlayerObject *,PlayerButtonCommand const&) ; +0xf4, 0x864324\nUXTB            W0, W0                                                 ; +0xf8, 0x864328\nCBZ             W0, loc_864250                                         ; +0xfc, 0x86432c\nMOV             W0, #1                                                 ; +0x100, 0x864330\nB               loc_864254                                             ; +0x104, 0x864334\nCBNZ            W0, loc_864250                                         ; +0x108, 0x864338\nLDRB            W0, [X20,#0x412]                                       ; +0x10c, 0x86433c\nCBZ             W0, loc_864250                                         ; +0x110, 0x864340\nEOR             W22, W22, #1                                           ; +0x114, 0x864344\nCMP             W23, W22                                               ; +0x118, 0x864348\nCSET            W21, LS                                                ; +0x11c, 0x86434c\nB               loc_864318                                             ; +0x120, 0x864350\nLDR             X0, [X20,#0xDF8]; this                                 ; +0x124, 0x864354\nMOV             X1, X19                                                ; +0x128, 0x864358\nBL              _Z19isRelevantForPlayerP12PlayerObjectRK19PlayerButtonCommand; isRelevantForPlayer(PlayerObject *,PlayerButtonCommand const&) ; +0x12c, 0x86435c\nUXTB            W0, W0                                                 ; +0x130, 0x864360\nCBZ             W0, loc_864250                                         ; +0x134, 0x864364\nMOV             W0, #1                                                 ; +0x138, 0x864368\nB               loc_864254                                             ; +0x13c, 0x86436c", "xrefs": ["GJBaseGameLayer::shouldUseSubstepForButton @ 0x8643f4", "<???> @ 0x37e90"], "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"}