{"type": "func", "start": 4297061624, "end": 4297061964, "name": "GJBaseGameLayer::processCommands", "pseudocode": "// \n// GJBaseGameLayer::processCommands from 0x1001ff4f8 to 0x1001ff64c (340 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::update @ 0x1001fe9d4\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 __fastcall GJBaseGameLayer::processCommands(GJBaseGameLayer *a1, float a2, bool a3, bool a4)\n{\n  unsigned int m_commandIndex; // w9\n  int v6; // w10\n  int v7; // w9\n  unsigned __int64 m_queuedRecordedButtonsSize; // x8\n  std::__vector_base<RecordButtonCommand>::pointer begin; // x10\n  unsigned __int64 v10; // x9\n  int m_unkUint4; // w11\n  int m_currentStep; // w12\n  int v13; // w11\n  int *p_m_step; // x10\n  unsigned int m_pauseCounter; // w8\n  bool v16; // vf\n  signed int v17; // w8\n  signed int m_pauseBufferTimer; // w9\n\n  m_commandIndex = a1->m_gameState.m_commandIndex;\n  a1->m_gameState.m_unkUint4 = m_commandIndex;\n  if ( a2 <= 0.0 )\n  {\n    if ( a1->m_playerDied )\n      goto LABEL_18;\n    goto LABEL_11;\n  }\n  v6 = llroundf(a1->m_gameState.m_timeWarp * 1000.0);\n  if ( !a3 )\n  {\n    a1->m_gameState.m_commandIndex = m_commandIndex + 2;\n    a1->m_gameState.m_unkUint6 += v6;\n    if ( a1->m_playerDied )\n      goto LABEL_18;\n    goto LABEL_9;\n  }\n  a1->m_gameState.m_commandIndex = m_commandIndex + 1;\n  a1->m_gameState.m_unkUint6 = (unsigned int)(float)((float)(unsigned int)a1->m_gameState.m_unkUint6\n                                                   + (float)((float)v6 * 0.5));\n  if ( a1->m_playerDied )\n    goto LABEL_18;\n  if ( !a3 )\n  {\nLABEL_9:\n    v7 = 2;\n    goto LABEL_10;\n  }\n  v7 = 1;\nLABEL_10:\n  a1->m_gameState.m_currentProgress += v7;\nLABEL_11:\n  if ( !a1->m_clickBetweenSteps && !a1->m_clickOnSteps )\n    a4 = 1;\n  GJBaseGameLayer::processQueuedButtons(a1, a2, a4);\n  m_queuedRecordedButtonsSize = a1->m_queuedRecordedButtonsSize;\n  begin = a1->m_queuedRecordedButtons.__begin_;\n  v10 = a1->m_queuedRecordedButtons.__end_ - begin;\n  if ( v10 > m_queuedRecordedButtonsSize )\n  {\n    m_unkUint4 = a1->m_gameState.m_unkUint4;\n    m_currentStep = a1->m_currentStep;\n    a1->m_currentStep = m_unkUint4;\n    v13 = m_unkUint4 - m_currentStep;\n    p_m_step = &begin[m_queuedRecordedButtonsSize].m_step;\n    do\n    {\n      *p_m_step = v13;\n      p_m_step += 4;\n      ++m_queuedRecordedButtonsSize;\n      v13 = 0;\n    }\n    while ( v10 > m_queuedRecordedButtonsSize );\n    a1->m_queuedRecordedButtonsSize = m_queuedRecordedButtonsSize;\n  }\nLABEL_18:\n  m_pauseCounter = a1->m_gameState.m_pauseCounter;\n  v16 = __OFSUB__(m_pauseCounter, 1);\n  v17 = m_pauseCounter - 1;\n  if ( v17 < 0 == v16 )\n  {\n    m_pauseBufferTimer = a1->m_gameState.m_pauseBufferTimer;\n    a1->m_gameState.m_pauseBufferTimer = m_pauseBufferTimer - 1;\n    if ( m_pauseBufferTimer <= 0 )\n    {\n      a1->m_gameState.m_pauseBufferTimer = 120;\n      a1->m_gameState.m_pauseCounter = v17;\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::processCommands from 0x1001ff4f8 to 0x1001ff64c (340 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::update @ 0x1001fe9d4\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             X20, X19, [SP,#-0x10+var_10]!                          ; +0x0, 0x1001ff4f8\nSTP             X29, X30, [SP,#0x10+var_s0]                            ; +0x4, 0x1001ff4fc\nADD             X29, SP, #0x10                                         ; +0x8, 0x1001ff500\nMOV             X19, X0                                                ; +0xc, 0x1001ff504\nADD             X8, X0, #3,LSL#12                                      ; +0x10, 0x1001ff508\nLDR             W9, [X0,#0x3B0]                                        ; +0x14, 0x1001ff50c\nSTR             W9, [X0,#0x3BC]                                        ; +0x18, 0x1001ff510\nFCMP            S0, #0.0                                               ; +0x1c, 0x1001ff514\nB.LE            loc_1001FF56C                                          ; +0x20, 0x1001ff518\nLDR             S1, [X19,#0x330]                                       ; +0x24, 0x1001ff51c\nMOV             W10, #0x447A0000                                       ; +0x28, 0x1001ff520\nFMOV            S2, W10                                                ; +0x2c, 0x1001ff524\nFMUL            S1, S1, S2                                             ; +0x30, 0x1001ff528\nFCVTAS          W10, S1                                                ; +0x34, 0x1001ff52c\nCBZ             W1, loc_1001FF578                                      ; +0x38, 0x1001ff530\nADD             W9, W9, #1                                             ; +0x3c, 0x1001ff534\nSTR             W9, [X19,#0x3B0]                                       ; +0x40, 0x1001ff538\nSCVTF           S1, W10                                                ; +0x44, 0x1001ff53c\nLDR             S2, [X19,#0x3C4]                                       ; +0x48, 0x1001ff540\nUCVTF           S2, S2                                                 ; +0x4c, 0x1001ff544\nFMOV            S3, #0.5                                               ; +0x50, 0x1001ff548\nFMADD           S1, S1, S3, S2                                         ; +0x54, 0x1001ff54c\nFCVTZU          W9, S1                                                 ; +0x58, 0x1001ff550\nSTR             W9, [X19,#0x3C4]                                       ; +0x5c, 0x1001ff554\nLDRB            W9, [X8,#0xDA]                                         ; +0x60, 0x1001ff558\nTBNZ            W9, #0, loc_1001FF614                                  ; +0x64, 0x1001ff55c\nTBZ             W1, #0, loc_1001FF594                                  ; +0x68, 0x1001ff560\nMOV             W9, #1                                                 ; +0x6c, 0x1001ff564\nB               loc_1001FF598                                          ; +0x70, 0x1001ff568\nLDRB            W9, [X8,#0xDA]                                         ; +0x74, 0x1001ff56c\nTBZ             W9, #0, loc_1001FF5A4                                  ; +0x78, 0x1001ff570\nB               loc_1001FF614                                          ; +0x7c, 0x1001ff574\nADD             W9, W9, #2                                             ; +0x80, 0x1001ff578\nSTR             W9, [X19,#0x3B0]                                       ; +0x84, 0x1001ff57c\nLDR             W9, [X19,#0x3C4]                                       ; +0x88, 0x1001ff580\nADD             W9, W9, W10                                            ; +0x8c, 0x1001ff584\nSTR             W9, [X19,#0x3C4]                                       ; +0x90, 0x1001ff588\nLDRB            W9, [X8,#0xDA]                                         ; +0x94, 0x1001ff58c\nTBNZ            W9, #0, loc_1001FF614                                  ; +0x98, 0x1001ff590\nMOV             W9, #2                                                 ; +0x9c, 0x1001ff594\nLDR             W10, [X19,#0x3B8]                                      ; +0xa0, 0x1001ff598\nADD             W9, W10, W9                                            ; +0xa4, 0x1001ff59c\nSTR             W9, [X19,#0x3B8]                                       ; +0xa8, 0x1001ff5a0\nLDRB            W9, [X8,#0x599]                                        ; +0xac, 0x1001ff5a4\nTBNZ            W9, #0, loc_1001FF5BC                                  ; +0xb0, 0x1001ff5a8\nLDRB            W8, [X8,#0x59A]                                        ; +0xb4, 0x1001ff5ac\nCMP             W8, #1                                                 ; +0xb8, 0x1001ff5b0\nB.EQ            loc_1001FF5BC                                          ; +0xbc, 0x1001ff5b4\nMOV             W2, #1                                                 ; +0xc0, 0x1001ff5b8\nMOV             X0, X19                                                ; +0xc4, 0x1001ff5bc\nMOV             X1, X2                                                 ; +0xc8, 0x1001ff5c0\nBL              GJBaseGameLayer__processQueuedButtons                  ; +0xcc, 0x1001ff5c4\nLDRSW           X8, [X19,#0x3258]                                      ; +0xd0, 0x1001ff5c8\nLDR             X9, [X19,#0x31A8]                                      ; +0xd4, 0x1001ff5cc\nLDR             X10, [X19,#0x31A0]                                     ; +0xd8, 0x1001ff5d0\nSUB             X9, X9, X10                                            ; +0xdc, 0x1001ff5d4\nASR             X9, X9, #4                                             ; +0xe0, 0x1001ff5d8\nCMP             X9, X8                                                 ; +0xe4, 0x1001ff5dc\nB.LS            loc_1001FF614                                          ; +0xe8, 0x1001ff5e0\nLDR             W11, [X19,#0x3BC]                                      ; +0xec, 0x1001ff5e4\nLDR             W12, [X19,#0x3184]                                     ; +0xf0, 0x1001ff5e8\nSTR             W11, [X19,#0x3184]                                     ; +0xf4, 0x1001ff5ec\nSUB             W11, W11, W12                                          ; +0xf8, 0x1001ff5f0\nADD             X10, X10, X8,LSL#4                                     ; +0xfc, 0x1001ff5f4\nADD             X10, X10, #8                                           ; +0x100, 0x1001ff5f8\nSTR             W11, [X10],#0x10                                       ; +0x104, 0x1001ff5fc\nADD             X8, X8, #1                                             ; +0x108, 0x1001ff600\nMOV             W11, #0                                                ; +0x10c, 0x1001ff604\nCMP             X9, X8                                                 ; +0x110, 0x1001ff608\nB.HI            loc_1001FF5FC                                          ; +0x114, 0x1001ff60c\nSTR             W8, [X19,#0x3258]                                      ; +0x118, 0x1001ff610\nLDR             W8, [X19,#0x784]                                       ; +0x11c, 0x1001ff614\nSUBS            W8, W8, #1                                             ; +0x120, 0x1001ff618\nB.LT            loc_1001FF640                                          ; +0x124, 0x1001ff61c\nLDR             W9, [X19,#0x788]                                       ; +0x128, 0x1001ff620\nSUB             W10, W9, #1                                            ; +0x12c, 0x1001ff624\nSTR             W10, [X19,#0x788]                                      ; +0x130, 0x1001ff628\nCMP             W9, #0                                                 ; +0x134, 0x1001ff62c\nB.GT            loc_1001FF640                                          ; +0x138, 0x1001ff630\nMOV             W9, #0x78 ; 'x'                                        ; +0x13c, 0x1001ff634\nSTR             W9, [X19,#0x788]                                       ; +0x140, 0x1001ff638\nSTR             W8, [X19,#0x784]                                       ; +0x144, 0x1001ff63c\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x148, 0x1001ff640\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x14c, 0x1001ff644\nRET                                                                    ; +0x150, 0x1001ff648", "xrefs": ["GJBaseGameLayer::update @ 0x1001fe9d4"], "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"}