{"type": "func", "start": 4711064, "end": 4711170, "name": "GJBaseGameLayer::removeReleasedButtons", "pseudocode": "// \n// GJBaseGameLayer::removeReleasedButtons from 0x47e298 to 0x47e302 (106 bytes)\n// \n// 1 xrefs:\n// > PlayLayer::resetLevel @ 0x31fdec\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 GJBaseGameLayer::removeReleasedButtons(GJBaseGameLayer *a1)\n{\n  std::vector<PlayerButtonCommand> *p_m_queuedButtons; // r6\n  unsigned int i; // r4\n  PlayerButtonCommand *m_start; // r0\n  unsigned int v4; // r3\n  unsigned int v5; // r2\n  int v6; // r8\n  PlayerButtonCommand *v7; // r12\n  unsigned int v8; // lr\n  char *v9; // r1\n\n  p_m_queuedButtons = &a1->m_queuedButtons;\n  for ( i = 0; ; i = v5 )\n  {\n    m_start = p_m_queuedButtons->m_start;\n    v4 = -1431655765 * (((char *)p_m_queuedButtons->m_finish - (char *)p_m_queuedButtons->m_start) >> 3);\n    if ( i >= v4 )\n      break;\n    v5 = i + 1;\n    v6 = i;\n    v7 = &m_start[i];\n    if ( v7->m_isPush )\n    {\n      v8 = i + 1;\n      v9 = (char *)&m_start[v6 + 1];\n      while ( v8 != v4 )\n      {\n        if ( v7->m_button == *(_DWORD *)v9 && !v9[4] )\n        {\n          std::vector<PlayerButtonCommand>::erase((int)p_m_queuedButtons, v9);\n          std::vector<PlayerButtonCommand>::erase((int)p_m_queuedButtons, (char *)&p_m_queuedButtons->m_start[v6]);\n          v5 = i;\n          break;\n        }\n        ++v8;\n        v9 += 24;\n      }\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::removeReleasedButtons from 0x47e298 to 0x47e302 (106 bytes)\n; \n; 1 xrefs:\n; > PlayLayer::resetLevel @ 0x31fdec\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\nPUSH.W          {R4-R8,LR}                                             ; +0x0, 0x47e298\nADD.W           R6, R0, #0x2B80                                        ; +0x4, 0x47e29c\nLDR             R5, =0xAAAAAAAB                                        ; +0x8, 0x47e2a0\nMOVS            R4, #0                                                 ; +0xa, 0x47e2a2\nLDM.W           R6, {R0,R3}                                            ; +0xc, 0x47e2a4\nSUBS            R3, R3, R0                                             ; +0x10, 0x47e2a8\nASRS            R3, R3, #3                                             ; +0x12, 0x47e2aa\nMULS            R3, R5                                                 ; +0x14, 0x47e2ac\nCMP             R4, R3                                                 ; +0x16, 0x47e2ae\nBCS             locret_47E2FE                                          ; +0x18, 0x47e2b0\nMOV.W           R8, #0x18                                              ; +0x1a, 0x47e2b2\nADDS            R2, R4, #1                                             ; +0x1e, 0x47e2b6\nMUL             R8, R8, R4                                             ; +0x20, 0x47e2b8\nADD.W           R12, R0, R8                                            ; +0x24, 0x47e2bc\nLDRB.W          R1, [R12,#4]                                           ; +0x28, 0x47e2c0\nCBZ             R1, loc_47E2FA                                         ; +0x2c, 0x47e2c4\nADD.W           R1, R8, #0x18                                          ; +0x2e, 0x47e2c6\nMOV             LR, R2                                                 ; +0x32, 0x47e2ca\nADD             R1, R0; void *                                         ; +0x34, 0x47e2cc\nCMP             LR, R3                                                 ; +0x36, 0x47e2ce\nBEQ             loc_47E2FA                                             ; +0x38, 0x47e2d0\nLDR.W           R7, [R12]                                              ; +0x3a, 0x47e2d2\nLDR             R0, [R1]                                               ; +0x3e, 0x47e2d6\nCMP             R7, R0                                                 ; +0x40, 0x47e2d8\nBNE             loc_47E2E0                                             ; +0x42, 0x47e2da\nLDRB            R0, [R1,#4]                                            ; +0x44, 0x47e2dc\nCBZ             R0, loc_47E2E8                                         ; +0x46, 0x47e2de\nADD.W           LR, LR, #1                                             ; +0x48, 0x47e2e0\nADDS            R1, #0x18                                              ; +0x4c, 0x47e2e4\nB               loc_47E2CE                                             ; +0x4e, 0x47e2e6\nMOV             R0, R6; int                                            ; +0x50, 0x47e2e8\nBL              _ZNSt6vectorI19PlayerButtonCommandSaIS0_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EE; std::vector<PlayerButtonCommand>::erase(__gnu_cxx::__normal_iterator<PlayerButtonCommand const*,std::vector<PlayerButtonCommand>>) ; +0x52, 0x47e2ea\nLDR             R1, [R6]                                               ; +0x56, 0x47e2ee\nMOV             R0, R6; int                                            ; +0x58, 0x47e2f0\nADD             R1, R8; void *                                         ; +0x5a, 0x47e2f2\nBL              _ZNSt6vectorI19PlayerButtonCommandSaIS0_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EE; std::vector<PlayerButtonCommand>::erase(__gnu_cxx::__normal_iterator<PlayerButtonCommand const*,std::vector<PlayerButtonCommand>>) ; +0x5c, 0x47e2f4\nMOV             R2, R4                                                 ; +0x60, 0x47e2f8\nMOV             R4, R2                                                 ; +0x62, 0x47e2fa\nB               loc_47E2A4                                             ; +0x64, 0x47e2fc\nPOP.W           {R4-R8,PC}                                             ; +0x66, 0x47e2fe", "xrefs": ["PlayLayer::resetLevel @ 0x31fdec"], "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"}