{"type": "func", "start": 4796180, "end": 4796482, "name": "GJBaseGameLayer::processCommands", "pseudocode": "// \n// GJBaseGameLayer::processCommands from 0x492f14 to 0x493042 (302 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::update @ 0x497696\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::processCommands(GJBaseGameLayer *a1, float a2, bool a3, bool a4)\n{\n  _BOOL4 v6; // r7\n  unsigned int v8; // r0\n  unsigned int m_commandIndex; // r5\n  int m_unkUint6; // r1\n  unsigned int m_currentProgress; // r1\n  unsigned int v12; // r1\n  bool v13; // r2\n  RecordButtonCommand *m_start; // r5\n  unsigned int v15; // r3\n  int m_unkUint4; // r1\n  int m_currentStep; // r0\n  int v18; // r0\n  int *i; // r1\n  int v20; // r2\n  signed int m_pauseCounter; // r3\n  signed int v22; // r2\n\n  v6 = a3;\n  a1->m_gameState.m_unkUint4 = a1->m_gameState.m_commandIndex;\n  if ( a2 > 0.0 )\n  {\n    v8 = lroundf();\n    m_commandIndex = a1->m_gameState.m_commandIndex;\n    m_unkUint6 = a1->m_gameState.m_unkUint6;\n    if ( v6 )\n    {\n      a1->m_gameState.m_commandIndex = m_commandIndex + 1;\n      a1->m_gameState.m_unkUint6 = (unsigned int)(float)((float)(unsigned int)m_unkUint6 + vcvts_n_f32_s32(v8, 1u));\n    }\n    else\n    {\n      a1->m_gameState.m_commandIndex = m_commandIndex + 2;\n      a1->m_gameState.m_unkUint6 = v8 + m_unkUint6;\n    }\n  }\n  if ( !a1->m_playerDied )\n  {\n    if ( a2 > 0.0 )\n    {\n      m_currentProgress = a1->m_gameState.m_currentProgress;\n      if ( v6 )\n        v12 = m_currentProgress + 1;\n      else\n        v12 = m_currentProgress + 2;\n      a1->m_gameState.m_currentProgress = v12;\n    }\n    if ( a1->m_clickBetweenSteps )\n      v13 = a4;\n    else\n      v13 = !a1->m_clickOnSteps || a4;\n    GJBaseGameLayer::processQueuedButtons(a1, a2, v13);\n    m_start = a1->m_queuedRecordedButtons.m_start;\n    v15 = a1->m_queuedRecordedButtons.m_finish - m_start;\n    if ( a1->m_queuedRecordedButtonsSize < v15 )\n    {\n      m_unkUint4 = a1->m_gameState.m_unkUint4;\n      m_currentStep = a1->m_currentStep;\n      a1->m_currentStep = m_unkUint4;\n      v18 = m_unkUint4 - m_currentStep;\n      for ( i = &a1->m_queuedRecordedButtonsSize; ; *i = v20 + 1 )\n      {\n        v20 = *i;\n        if ( *i >= v15 )\n          break;\n        m_start[v20].m_step = v18;\n        v18 = 0;\n      }\n    }\n    GJBaseGameLayer::updateReplay(a1);\n  }\n  m_pauseCounter = a1->m_gameState.m_pauseCounter;\n  if ( m_pauseCounter > 0 )\n  {\n    v22 = a1->m_gameState.m_pauseBufferTimer - 1;\n    if ( v22 < 0 )\n    {\n      a1->m_gameState.m_pauseCounter = m_pauseCounter - 1;\n      a1->m_gameState.m_pauseBufferTimer = 120;\n    }\n    else\n    {\n      a1->m_gameState.m_pauseBufferTimer = v22;\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::processCommands from 0x492f14 to 0x493042 (302 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::update @ 0x497696\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            {R3-R7,LR}                                             ; +0x0, 0x492f14\nMOV             R6, R3                                                 ; +0x2, 0x492f16\nVPUSH           {D8}                                                   ; +0x4, 0x492f18\nMOV             R4, R0                                                 ; +0x8, 0x492f1c\nLDR.W           R3, [R0,#0x338]                                        ; +0xa, 0x492f1e\nMOV             R7, R2                                                 ; +0xe, 0x492f22\nVMOV            S16, R1                                                ; +0x10, 0x492f24\nSTR.W           R3, [R0,#0x344]                                        ; +0x14, 0x492f28\nVCMPE.F32       S16, #0.0                                              ; +0x18, 0x492f2c\nVMRS            APSR_nzcv, FPSCR                                       ; +0x1c, 0x492f30\nBLE             loc_492F84                                             ; +0x20, 0x492f34\nVLDR            S14, [R0,#0x2D0]                                       ; +0x22, 0x492f36\nVLDR            S15, =1000.0                                           ; +0x26, 0x492f3a\nVMUL.F32        S15, S14, S15                                          ; +0x2a, 0x492f3e\nVMOV            R0, S15                                                ; +0x2e, 0x492f42\nBLX             lroundf                                                ; +0x32, 0x492f46\nLDR.W           R5, [R4,#0x338]                                        ; +0x36, 0x492f4a\nLDR.W           R1, [R4,#0x34C]                                        ; +0x3a, 0x492f4e\nCBZ             R7, loc_492F78                                         ; +0x3e, 0x492f52\nVMOV            S15, R1                                                ; +0x40, 0x492f54\nADDS            R5, #1                                                 ; +0x44, 0x492f58\nSTR.W           R5, [R4,#0x338]                                        ; +0x46, 0x492f5a\nVCVT.F32.U32    S14, S15                                               ; +0x4a, 0x492f5e\nVMOV            S15, R0                                                ; +0x4e, 0x492f62\nVCVT.F32.S32    S15, S15, #1                                           ; +0x52, 0x492f66\nVADD.F32        S15, S14, S15                                          ; +0x56, 0x492f6a\nVCVT.U32.F32    S15, S15                                               ; +0x5a, 0x492f6e\nVSTR            S15, [R4,#0x34C]                                       ; +0x5e, 0x492f72\nB               loc_492F84                                             ; +0x62, 0x492f76\nADDS            R5, #2                                                 ; +0x64, 0x492f78\nADD             R0, R1                                                 ; +0x66, 0x492f7a\nSTR.W           R5, [R4,#0x338]                                        ; +0x68, 0x492f7c\nSTR.W           R0, [R4,#0x34C]                                        ; +0x6c, 0x492f80\nMOVW            R3, #0x2B06                                            ; +0x70, 0x492f84\nLDRB            R3, [R4,R3]                                            ; +0x74, 0x492f88\nCMP             R3, #0                                                 ; +0x76, 0x492f8a\nBNE             loc_493018                                             ; +0x78, 0x492f8c\nVCMPE.F32       S16, #0.0                                              ; +0x7a, 0x492f8e\nVMRS            APSR_nzcv, FPSCR                                       ; +0x7e, 0x492f92\nBLE             loc_492FA8                                             ; +0x82, 0x492f96\nLDR.W           R1, [R4,#0x340]                                        ; +0x84, 0x492f98\nCBZ             R7, loc_492FA2                                         ; +0x88, 0x492f9c\nADDS            R1, #1                                                 ; +0x8a, 0x492f9e\nB               loc_492FA4                                             ; +0x8c, 0x492fa0\nADDS            R1, #2                                                 ; +0x8e, 0x492fa2\nSTR.W           R1, [R4,#0x340]                                        ; +0x90, 0x492fa4\nMOVW            R3, #0x2DE9                                            ; +0x94, 0x492fa8\nLDRB            R3, [R4,R3]                                            ; +0x98, 0x492fac\nCBNZ            R3, loc_492FC0                                         ; +0x9a, 0x492fae\nMOVW            R3, #0x2DEA                                            ; +0x9c, 0x492fb0\nLDRB            R3, [R4,R3]                                            ; +0xa0, 0x492fb4\nCMP             R3, #0                                                 ; +0xa2, 0x492fb6\nITE NE                                                                 ; +0xa4, 0x492fb8\nMOVNE           R2, R6                                                 ; +0xa6, 0x492fba\nMOVEQ           R2, #1                                                 ; +0xa8, 0x492fbc\nB               loc_492FC2                                             ; +0xaa, 0x492fbe\nMOV             R2, R6; bool                                           ; +0xac, 0x492fc0\nMOV             R0, R4; this                                           ; +0xae, 0x492fc2\nVMOV            R1, S16; float                                         ; +0xb0, 0x492fc4\nBL              _ZN15GJBaseGameLayer20processQueuedButtonsEfb; GJBaseGameLayer::processQueuedButtons(float,bool) ; +0xb4, 0x492fc8\nADD.W           R3, R4, #0x2B80                                        ; +0xb8, 0x492fcc\nADDS            R3, #0xC                                               ; +0xbc, 0x492fd0\nMOVW            R2, #0x2B8C                                            ; +0xbe, 0x492fd2\nLDR             R5, [R4,R2]                                            ; +0xc2, 0x492fd6\nMOVW            R2, #0x2BF8                                            ; +0xc4, 0x492fd8\nLDR             R3, [R3,#4]                                            ; +0xc8, 0x492fdc\nLDR             R2, [R4,R2]                                            ; +0xca, 0x492fde\nSUBS            R3, R3, R5                                             ; +0xcc, 0x492fe0\nASRS            R3, R3, #4                                             ; +0xce, 0x492fe2\nCMP             R2, R3                                                 ; +0xd0, 0x492fe4\nBCC             loc_492FF0                                             ; +0xd2, 0x492fe6\nMOV             R0, R4; this                                           ; +0xd4, 0x492fe8\nBL              _ZN15GJBaseGameLayer12updateReplayEv; GJBaseGameLayer::updateReplay(void) ; +0xd6, 0x492fea\nB               loc_493018                                             ; +0xda, 0x492fee\nLDR.W           R1, [R4,#0x344]                                        ; +0xdc, 0x492ff0\nMOVW            R2, #0x2B7C                                            ; +0xe0, 0x492ff4\nLDR             R0, [R4,R2]                                            ; +0xe4, 0x492ff8\nSTR             R1, [R4,R2]                                            ; +0xe6, 0x492ffa\nSUBS            R0, R1, R0                                             ; +0xe8, 0x492ffc\nADD.W           R1, R4, #0x2BC0                                        ; +0xea, 0x492ffe\nADDS            R1, #0x38 ; '8'                                        ; +0xee, 0x493002\nLDR             R2, [R1]                                               ; +0xf0, 0x493004\nCMP             R2, R3                                                 ; +0xf2, 0x493006\nBCS             loc_492FE8                                             ; +0xf4, 0x493008\nADD.W           R6, R5, R2,LSL#4                                       ; +0xf6, 0x49300a\nADDS            R2, #1                                                 ; +0xfa, 0x49300e\nSTR             R0, [R6,#8]                                            ; +0xfc, 0x493010\nMOVS            R0, #0                                                 ; +0xfe, 0x493012\nSTR             R2, [R1]                                               ; +0x100, 0x493014\nB               loc_493004                                             ; +0x102, 0x493016\nLDR.W           R3, [R4,#0x5FC]                                        ; +0x104, 0x493018\nCMP             R3, #0                                                 ; +0x108, 0x49301c\nBLE             loc_49303C                                             ; +0x10a, 0x49301e\nLDR.W           R2, [R4,#0x600]                                        ; +0x10c, 0x493020\nSUBS            R2, #1                                                 ; +0x110, 0x493024\nITEEE PL                                                               ; +0x112, 0x493026\nSTRPL.W         R2, [R4,#0x600]                                        ; +0x114, 0x493028\nADDMI.W         R3, R3, #0xFFFFFFFF                                    ; +0x118, 0x49302c\nSTRMI.W         R3, [R4,#0x5FC]                                        ; +0x11c, 0x493030\nMOVMI           R2, #0x78 ; 'x'                                        ; +0x120, 0x493034\nIT MI                                                                  ; +0x122, 0x493036\nSTRMI.W         R2, [R4,#0x600]                                        ; +0x124, 0x493038\nVPOP            {D8}                                                   ; +0x128, 0x49303c\nPOP             {R3-R7,PC}                                             ; +0x12c, 0x493040", "xrefs": ["GJBaseGameLayer::update @ 0x497696"], "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"}