{"type": "func", "start": 4680808, "end": 4680884, "name": "GJBaseGameLayer::buttonIDToButton", "pseudocode": "// \n// GJBaseGameLayer::buttonIDToButton from 0x476c68 to 0x476cb4 (76 bytes)\n// \n// 0 xrefs:\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  if ( a2 == 7 )\n    return 2;\n  if ( a2 > 7 )\n  {\n    if ( a2 == 10 )\n      return 5;\n    if ( a2 > 10 )\n    {\n      if ( (unsigned int)(a2 - 98) <= 1 )\n        return a2;\n      return 1;\n    }\n    if ( a2 != 8 )\n      return 4;\n    return 3;\n  }\n  if ( a2 == 3 )\n    return 3;\n  if ( a2 > 3 )\n  {\n    if ( a2 != 4 )\n    {\n      if ( a2 != 5 )\n        return 1;\n      return 5;\n    }\n    return 4;\n  }\n  if ( a2 != 2 )\n    return 1;\n  return 2;\n}", "assembly": "; \n; GJBaseGameLayer::buttonIDToButton from 0x476c68 to 0x476cb4 (76 bytes)\n; \n; 0 xrefs:\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\nCMP             R1, #7                                                 ; +0x0, 0x476c68\nBEQ             loc_476CB0                                             ; +0x2, 0x476c6a\nBGT             loc_476C84                                             ; +0x4, 0x476c6c\nCMP             R1, #3                                                 ; +0x6, 0x476c6e\nBEQ             loc_476CA0                                             ; +0x8, 0x476c70\nBGT             loc_476C7A                                             ; +0xa, 0x476c72\nCMP             R1, #2                                                 ; +0xc, 0x476c74\nBEQ             loc_476CB0                                             ; +0xe, 0x476c76\nB               loc_476CAC                                             ; +0x10, 0x476c78\nCMP             R1, #4                                                 ; +0x12, 0x476c7a\nBEQ             loc_476CA4                                             ; +0x14, 0x476c7c\nCMP             R1, #5                                                 ; +0x16, 0x476c7e\nBEQ             loc_476CA8                                             ; +0x18, 0x476c80\nB               loc_476CAC                                             ; +0x1a, 0x476c82\nCMP             R1, #0xA                                               ; +0x1c, 0x476c84\nBEQ             loc_476CA8                                             ; +0x1e, 0x476c86\nBGT             loc_476C94                                             ; +0x20, 0x476c88\nCMP             R1, #8                                                 ; +0x22, 0x476c8a\nBEQ             loc_476CA0                                             ; +0x24, 0x476c8c\nCMP             R1, #9                                                 ; +0x26, 0x476c8e\nBEQ             loc_476CA4                                             ; +0x28, 0x476c90\nB               loc_476CAC                                             ; +0x2a, 0x476c92\nSUB.W           R3, R1, #0x62 ; 'b'                                    ; +0x2c, 0x476c94\nCMP             R3, #1                                                 ; +0x30, 0x476c98\nBHI             loc_476CAC                                             ; +0x32, 0x476c9a\nMOV             R0, R1                                                 ; +0x34, 0x476c9c\nBX              LR                                                     ; +0x36, 0x476c9e\nMOVS            R0, #3                                                 ; +0x38, 0x476ca0\nBX              LR                                                     ; +0x3a, 0x476ca2\nMOVS            R0, #4                                                 ; +0x3c, 0x476ca4\nBX              LR                                                     ; +0x3e, 0x476ca6\nMOVS            R0, #5                                                 ; +0x40, 0x476ca8\nBX              LR                                                     ; +0x42, 0x476caa\nMOVS            R0, #1                                                 ; +0x44, 0x476cac\nBX              LR                                                     ; +0x46, 0x476cae\nMOVS            R0, #2                                                 ; +0x48, 0x476cb0\nBX              LR                                                     ; +0x4a, 0x476cb2", "xrefs": [], "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"}