{"type": "func", "start": 8807648, "end": 8807732, "name": "GJBaseGameLayer::buttonIDToButton", "pseudocode": "// \n// GJBaseGameLayer::buttonIDToButton from 0x8664e0 to 0x866534 (84 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x34188\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\nint GJBaseGameLayer::buttonIDToButton(GJBaseGameLayer *a1, int a2)\n{\n  int result; // w0\n\n  switch ( a2 )\n  {\n    case 2:\n    case 7:\n      result = 2;\n      break;\n    case 3:\n    case 8:\n      result = 3;\n      break;\n    case 4:\n    case 9:\n      result = 4;\n      break;\n    case 5:\n    case 10:\n      result = 5;\n      break;\n    case 98:\n    case 99:\n      result = a2;\n      break;\n    default:\n      result = 1;\n      break;\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::buttonIDToButton from 0x8664e0 to 0x866534 (84 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x34188\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             W0, W1, #2; switch 98 cases                            ; +0x0, 0x8664e0\nCMP             W0, #0x61                                              ; +0x4, 0x8664e4\nB.LS            loc_8664F4                                             ; +0x8, 0x8664e8\nMOV             W0, #1; jumptable 0000000000866508 default case, cases 6,11-97 ; +0xc, 0x8664ec\nRET                                                                    ; +0x10, 0x8664f0\nADRL            X2, jpt_866508                                         ; +0x14, 0x8664f4\nLDRB            W0, [X2,W0,UXTW]                                       ; +0x1c, 0x8664fc\nADR             X2, loc_86650C; jumptable 0000000000866508 cases 2,7   ; +0x20, 0x866500\nADD             X0, X2, W0,SXTB#2                                      ; +0x24, 0x866504\nBR              X0; switch jump                                        ; +0x28, 0x866508\nMOV             W0, #2; jumptable 0000000000866508 cases 2,7           ; +0x2c, 0x86650c\nRET                                                                    ; +0x30, 0x866510\nMOV             W0, #4; jumptable 0000000000866508 cases 4,9           ; +0x34, 0x866514\nRET                                                                    ; +0x38, 0x866518\nMOV             W0, W1; jumptable 0000000000866508 cases 98,99         ; +0x3c, 0x86651c\nRET                                                                    ; +0x40, 0x866520\nMOV             W0, #5; jumptable 0000000000866508 cases 5,10          ; +0x44, 0x866524\nRET                                                                    ; +0x48, 0x866528\nMOV             W0, #3; jumptable 0000000000866508 cases 3,8           ; +0x4c, 0x86652c\nRET                                                                    ; +0x50, 0x866530", "xrefs": ["<???> @ 0x34188"], "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"}