{"type": "func", "start": 8964768, "end": 8965184, "name": "GJBaseGameLayer::processCommands", "pseudocode": "// \n// GJBaseGameLayer::processCommands from 0x88caa0 to 0x88cc40 (416 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::update @ 0x89de6c\n// > <???> @ 0x70aa0\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 v4; // w5\n  unsigned int m_commandIndex; // w4\n  int v8; // w0\n  unsigned int m_unkUint6; // w2\n  float *v10; // x3\n  float v11; // s1\n  _BOOL4 m_playerDied; // w2\n  int m_queuedRecordedButtonsSize; // w5\n  RecordButtonCommand *m_start; // x0\n  RecordButtonCommand *m_finish; // x2\n  unsigned __int64 v16; // x4\n  signed int m_pauseCounter; // w1\n  signed int v18; // w0\n  int v19; // w2\n  int m_unkUint4; // w1\n  RecordButtonCommand *v21; // x0\n  int m_currentStep; // w6\n  int v23; // w1\n\n  v4 = a3;\n  m_commandIndex = a1->m_gameState.m_commandIndex;\n  a1->m_gameState.m_unkUint4 = m_commandIndex;\n  if ( a2 <= 0.0 )\n  {\n    v10 = &a1->m_varianceValues.__elems_[1975];\n    if ( a1->m_playerDied )\n      goto LABEL_10;\n    if ( a2 <= 0.0 )\n    {\nLABEL_5:\n      if ( !*((_BYTE *)v10 + 1913) )\n        goto LABEL_6;\n      goto LABEL_8;\n    }\n    if ( v4 )\n    {\nLABEL_4:\n      ++a1->m_gameState.m_currentProgress;\n      goto LABEL_5;\n    }\n    a1->m_gameState.m_currentProgress += 2;\n  }\n  else\n  {\n    v8 = llroundf(a1->m_gameState.m_timeWarp * 1000.0);\n    if ( v4 )\n    {\n      m_unkUint6 = a1->m_gameState.m_unkUint6;\n      v10 = &a1->m_varianceValues.__elems_[1975];\n      a1->m_gameState.m_commandIndex = m_commandIndex + 1;\n      v11 = (float)m_unkUint6;\n      m_playerDied = a1->m_playerDied;\n      a1->m_gameState.m_unkUint6 = (unsigned int)(float)(v11 + (float)((float)v8 * 0.5));\n      if ( m_playerDied )\n        goto LABEL_10;\n      goto LABEL_4;\n    }\n    v19 = a1->m_gameState.m_unkUint6;\n    v10 = &a1->m_varianceValues.__elems_[1975];\n    a1->m_gameState.m_commandIndex = m_commandIndex + 2;\n    a1->m_gameState.m_unkUint6 = v19 + v8;\n    if ( a1->m_playerDied )\n      goto LABEL_10;\n    a1->m_gameState.m_currentProgress += 2;\n  }\n  if ( !*((_BYTE *)v10 + 1913) )\n  {\nLABEL_6:\n    if ( !*((_BYTE *)v10 + 1914) )\n      a4 = 1;\n  }\nLABEL_8:\n  GJBaseGameLayer::processQueuedButtons(a1, a2, a4);\n  m_queuedRecordedButtonsSize = a1->m_queuedRecordedButtonsSize;\n  m_start = a1->m_queuedRecordedButtons.m_start;\n  m_finish = a1->m_queuedRecordedButtons.m_finish;\n  v16 = m_finish - m_start;\n  if ( m_queuedRecordedButtonsSize < v16 )\n  {\n    m_unkUint4 = a1->m_gameState.m_unkUint4;\n    v21 = &m_start[m_queuedRecordedButtonsSize];\n    m_currentStep = a1->m_currentStep;\n    a1->m_currentStep = m_unkUint4;\n    v23 = m_unkUint4 - m_currentStep;\n    do\n    {\n      v21->m_step = v23;\n      ++v21;\n      v23 = 0;\n    }\n    while ( v21 != m_finish );\n    a1->m_queuedRecordedButtonsSize = m_queuedRecordedButtonsSize + 1 + v16 + ~m_queuedRecordedButtonsSize;\n  }\n  GJBaseGameLayer::updateReplay(a1);\nLABEL_10:\n  m_pauseCounter = a1->m_gameState.m_pauseCounter;\n  if ( m_pauseCounter > 0 )\n  {\n    v18 = a1->m_gameState.m_pauseBufferTimer - 1;\n    if ( v18 < 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 = v18;\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::processCommands from 0x88caa0 to 0x88cc40 (416 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::update @ 0x89de6c\n; > <???> @ 0x70aa0\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,#var_20]!                                ; +0x0, 0x88caa0\nFCMPE           S0, #0.0; float                                        ; +0x4, 0x88caa4\nUXTB            W5, W1                                                 ; +0x8, 0x88caa8\nMOV             X29, SP                                                ; +0xc, 0x88caac\nSTR             X19, [SP,#0x20+var_10]                                 ; +0x10, 0x88cab0\nUXTB            W1, W2                                                 ; +0x14, 0x88cab4\nLDR             W4, [X0,#0x3D0]                                        ; +0x18, 0x88cab8\nMOV             X19, X0                                                ; +0x1c, 0x88cabc\nSTR             W4, [X0,#0x3DC]                                        ; +0x20, 0x88cac0\nB.LE            loc_88CB84                                             ; +0x24, 0x88cac4\nLDR             S1, [X0,#0x330]                                        ; +0x28, 0x88cac8\nLDR             S2, =0x447A0000                                        ; +0x2c, 0x88cacc\nFMUL            S1, S1, S2                                             ; +0x30, 0x88cad0\nFCVTAS          W0, S1                                                 ; +0x34, 0x88cad4\nCBZ             W5, loc_88CBB4                                         ; +0x38, 0x88cad8\nLDR             W2, [X19,#0x3E4]                                       ; +0x3c, 0x88cadc\nADD             X3, X19, #3,LSL#12                                     ; +0x40, 0x88cae0\nSCVTF           S2, W0                                                 ; +0x44, 0x88cae4\nADD             W4, W4, #1                                             ; +0x48, 0x88cae8\nFMOV            S3, #0.5                                               ; +0x4c, 0x88caec\nSTR             W4, [X19,#0x3D0]                                       ; +0x50, 0x88caf0\nUCVTF           S1, W2                                                 ; +0x54, 0x88caf4\nLDRB            W2, [X3,#0x2AA]                                        ; +0x58, 0x88caf8\nFMADD           S1, S2, S3, S1                                         ; +0x5c, 0x88cafc\nFCVTZU          W0, S1                                                 ; +0x60, 0x88cb00\nSTR             W0, [X19,#0x3E4]                                       ; +0x64, 0x88cb04\nCBNZ            W2, loc_88CB5C                                         ; +0x68, 0x88cb08\nLDR             W0, [X19,#0x3D8]                                       ; +0x6c, 0x88cb0c\nADD             W0, W0, #1                                             ; +0x70, 0x88cb10\nSTR             W0, [X19,#0x3D8]                                       ; +0x74, 0x88cb14\nLDRB            W0, [X3,#0x779]                                        ; +0x78, 0x88cb18\nCBNZ            W0, loc_88CB2C                                         ; +0x7c, 0x88cb1c\nLDRB            W0, [X3,#0x77A]                                        ; +0x80, 0x88cb20\nCMP             W0, WZR                                                ; +0x84, 0x88cb24\nCSINC           W1, W1, WZR, NE; bool                                  ; +0x88, 0x88cb28\nMOV             X0, X19; this                                          ; +0x8c, 0x88cb2c\nBL              _ZN15GJBaseGameLayer20processQueuedButtonsEfb; GJBaseGameLayer::processQueuedButtons(float,bool) ; +0x90, 0x88cb30\nLDR             W5, [X19,#0x3438]                                      ; +0x94, 0x88cb34\nLDR             X0, [X19,#0x3360]                                      ; +0x98, 0x88cb38\nLDR             X2, [X19,#0x3368]                                      ; +0x9c, 0x88cb3c\nSXTW            X3, W5                                                 ; +0xa0, 0x88cb40\nSUB             X4, X2, X0                                             ; +0xa4, 0x88cb44\nASR             X4, X4, #4                                             ; +0xa8, 0x88cb48\nCMP             X3, X4                                                 ; +0xac, 0x88cb4c\nB.CC            loc_88CBE4                                             ; +0xb0, 0x88cb50\nMOV             X0, X19; this                                          ; +0xb4, 0x88cb54\nBL              _ZN15GJBaseGameLayer12updateReplayEv; GJBaseGameLayer::updateReplay(void) ; +0xb8, 0x88cb58\nLDR             W1, [X19,#0x894]                                       ; +0xbc, 0x88cb5c\nCMP             W1, WZR                                                ; +0xc0, 0x88cb60\nB.LE            loc_88CB78                                             ; +0xc4, 0x88cb64\nLDR             W0, [X19,#0x898]                                       ; +0xc8, 0x88cb68\nSUBS            W0, W0, #1                                             ; +0xcc, 0x88cb6c\nB.MI            loc_88CC24                                             ; +0xd0, 0x88cb70\nSTR             W0, [X19,#0x898]                                       ; +0xd4, 0x88cb74\nLDR             X19, [SP,#0x20+var_10]                                 ; +0xd8, 0x88cb78\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0xdc, 0x88cb7c\nRET                                                                    ; +0xe0, 0x88cb80\nADD             X3, X0, #3,LSL#12                                      ; +0xe4, 0x88cb84\nLDRB            W0, [X3,#0x2AA]                                        ; +0xe8, 0x88cb88\nCBNZ            W0, loc_88CB5C                                         ; +0xec, 0x88cb8c\nFCMPE           S0, #0.0                                               ; +0xf0, 0x88cb90\nB.LE            loc_88CB18                                             ; +0xf4, 0x88cb94\nCBNZ            W5, loc_88CB0C                                         ; +0xf8, 0x88cb98\nLDR             W0, [X19,#0x3D8]                                       ; +0xfc, 0x88cb9c\nADD             W0, W0, #2                                             ; +0x100, 0x88cba0\nSTR             W0, [X19,#0x3D8]                                       ; +0x104, 0x88cba4\nLDRB            W0, [X3,#0x779]                                        ; +0x108, 0x88cba8\nCBNZ            W0, loc_88CB2C                                         ; +0x10c, 0x88cbac\nB               loc_88CB20                                             ; +0x110, 0x88cbb0\nLDR             W2, [X19,#0x3E4]                                       ; +0x114, 0x88cbb4\nADD             X3, X19, #3,LSL#12                                     ; +0x118, 0x88cbb8\nADD             W4, W4, #2                                             ; +0x11c, 0x88cbbc\nSTR             W4, [X19,#0x3D0]                                       ; +0x120, 0x88cbc0\nADD             W0, W2, W0                                             ; +0x124, 0x88cbc4\nSTR             W0, [X19,#0x3E4]                                       ; +0x128, 0x88cbc8\nLDRB            W0, [X3,#0x2AA]                                        ; +0x12c, 0x88cbcc\nCBNZ            W0, loc_88CB5C                                         ; +0x130, 0x88cbd0\nLDR             W0, [X19,#0x3D8]                                       ; +0x134, 0x88cbd4\nADD             W0, W0, #2                                             ; +0x138, 0x88cbd8\nSTR             W0, [X19,#0x3D8]                                       ; +0x13c, 0x88cbdc\nB               loc_88CBA8                                             ; +0x140, 0x88cbe0\nLDR             W1, [X19,#0x3DC]                                       ; +0x144, 0x88cbe4\nADD             X0, X0, X3,LSL#4                                       ; +0x148, 0x88cbe8\nLDR             W6, [X19,#0x3344]                                      ; +0x14c, 0x88cbec\nSTR             W1, [X19,#0x3344]                                      ; +0x150, 0x88cbf0\nSUB             W1, W1, W6                                             ; +0x154, 0x88cbf4\nSTR             W1, [X0,#8]                                            ; +0x158, 0x88cbf8\nADD             X0, X0, #0x10                                          ; +0x15c, 0x88cbfc\nCMP             X0, X2                                                 ; +0x160, 0x88cc00\nMOV             W1, #0                                                 ; +0x164, 0x88cc04\nB.NE            loc_88CBF8                                             ; +0x168, 0x88cc08\nMVN             X3, X3                                                 ; +0x16c, 0x88cc0c\nADD             W5, W5, #1                                             ; +0x170, 0x88cc10\nADD             X1, X4, X3                                             ; +0x174, 0x88cc14\nADD             W3, W5, W1                                             ; +0x178, 0x88cc18\nSTR             W3, [X19,#0x3438]                                      ; +0x17c, 0x88cc1c\nB               loc_88CB54                                             ; +0x180, 0x88cc20\nSUB             W1, W1, #1                                             ; +0x184, 0x88cc24\nMOV             W0, #0x78 ; 'x'                                        ; +0x188, 0x88cc28\nSTR             W1, [X19,#0x894]                                       ; +0x18c, 0x88cc2c\nSTR             W0, [X19,#0x898]                                       ; +0x190, 0x88cc30\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x194, 0x88cc34\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x198, 0x88cc38\nRET                                                                    ; +0x19c, 0x88cc3c", "xrefs": ["GJBaseGameLayer::update @ 0x89de6c", "<???> @ 0x70aa0"], "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"}