{"type": "func", "start": 8799088, "end": 8799284, "name": "GJBaseGameLayer::shouldUseSubstepForButton", "pseudocode": "// \n// GJBaseGameLayer::shouldUseSubstepForButton from 0x864370 to 0x864434 (196 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::update @ 0x89dca8\n// > <???> @ 0x2ab10\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\nbool GJBaseGameLayer::shouldUseSubstepForButton(GJBaseGameLayer *a1, float a2)\n{\n  double v2; // d9\n  PlayerButtonCommand *m_start; // x19\n  PlayerButtonCommand *m_finish; // x21\n  double m_timestamp; // d10\n  double v6; // d0\n  double v7; // d9\n  double v9; // d10\n  double v10; // d8\n  bool result; // w0\n\n  if ( !a1->m_clickBetweenSteps )\n    return 0;\n  v2 = a2;\n  m_start = a1->m_queuedButtons.m_start;\n  m_finish = a1->m_queuedButtons.m_finish;\n  m_timestamp = a1->m_timestamp;\n  v6 = a2 * 0.5;\n  v7 = v2 + m_timestamp;\n  if ( m_start == m_finish )\n    return 0;\n  v9 = v6 + m_timestamp;\n  while ( 1 )\n  {\n    v10 = m_start->m_timestamp;\n    if ( v10 >= v9 && v7 > v10 )\n    {\n      result = GJBaseGameLayer::buttonIsRelevant(a1, m_start);\n      if ( result )\n        break;\n    }\n    ++m_start;\n    if ( v7 <= v10 || m_finish == m_start )\n      return 0;\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::shouldUseSubstepForButton from 0x864370 to 0x864434 (196 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::update @ 0x89dca8\n; > <???> @ 0x2ab10\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,#-0x40+var_s0]!                          ; +0x0, 0x864370\nADD             X1, X0, #3,LSL#12                                      ; +0x4, 0x864374\nMOV             X29, SP                                                ; +0x8, 0x864378\nSTP             D8, D9, [SP,#var_s28]                                  ; +0xc, 0x86437c\nSTP             X19, X20, [SP,#var_s10]                                ; +0x10, 0x864380\nLDRB            W1, [X1,#0x779]                                        ; +0x14, 0x864384\nSTR             X21, [SP,#var_s20]                                     ; +0x18, 0x864388\nSTR             D10, [SP,#var_s38]                                     ; +0x1c, 0x86438c\nCBZ             W1, loc_864418                                         ; +0x20, 0x864390\nFCVT            D9, S0                                                 ; +0x24, 0x864394\nLDR             X19, [X0,#0x3348]                                      ; +0x28, 0x864398\nLDR             X21, [X0,#0x3350]                                      ; +0x2c, 0x86439c\nLDR             D10, [X0,#0x3770]                                      ; +0x30, 0x8643a0\nFMOV            D8, #0.5                                               ; +0x34, 0x8643a4\nCMP             X19, X21                                               ; +0x38, 0x8643a8\nFMUL            D0, D9, D8                                             ; +0x3c, 0x8643ac\nFADD            D9, D9, D10                                            ; +0x40, 0x8643b0\nB.EQ            loc_864418                                             ; +0x44, 0x8643b4\nMOV             X20, X0                                                ; +0x48, 0x8643b8\nFADD            D10, D0, D10                                           ; +0x4c, 0x8643bc\nB               loc_8643D8                                             ; +0x50, 0x8643c0\nFCMPE           D9, D8                                                 ; +0x54, 0x8643c4\nADD             X19, X19, #0x18                                        ; +0x58, 0x8643c8\nB.LS            loc_864418                                             ; +0x5c, 0x8643cc\nCMP             X21, X19                                               ; +0x60, 0x8643d0\nB.EQ            loc_864418                                             ; +0x64, 0x8643d4\nLDR             D8, [X19,#0x10]                                        ; +0x68, 0x8643d8\nFCMPE           D8, D10                                                ; +0x6c, 0x8643dc\nB.LT            loc_8643C4                                             ; +0x70, 0x8643e0\nFCMPE           D9, D8                                                 ; +0x74, 0x8643e4\nMOV             X1, X19                                                ; +0x78, 0x8643e8\nMOV             X0, X20                                                ; +0x7c, 0x8643ec\nB.LE            loc_8643C4                                             ; +0x80, 0x8643f0\nBL              _ZN15GJBaseGameLayer16buttonIsRelevantERK19PlayerButtonCommand; GJBaseGameLayer::buttonIsRelevant(PlayerButtonCommand const&) ; +0x84, 0x8643f4\nUXTB            W0, W0                                                 ; +0x88, 0x8643f8\nCBZ             W0, loc_8643C4                                         ; +0x8c, 0x8643fc\nLDP             X19, X20, [SP,#var_s10]                                ; +0x90, 0x864400\nLDP             D8, D9, [SP,#var_s28]                                  ; +0x94, 0x864404\nLDR             X21, [SP,#var_s20]                                     ; +0x98, 0x864408\nLDR             D10, [SP,#var_s38]                                     ; +0x9c, 0x86440c\nLDP             X29, X30, [SP+var_s0],#0x40                            ; +0xa0, 0x864410\nRET                                                                    ; +0xa4, 0x864414\nMOV             W0, #0                                                 ; +0xa8, 0x864418\nLDR             X21, [SP,#var_s20]                                     ; +0xac, 0x86441c\nLDP             X19, X20, [SP,#var_s10]                                ; +0xb0, 0x864420\nLDP             D8, D9, [SP,#var_s28]                                  ; +0xb4, 0x864424\nLDR             D10, [SP,#var_s38]                                     ; +0xb8, 0x864428\nLDP             X29, X30, [SP+var_s0],#0x40                            ; +0xbc, 0x86442c\nRET                                                                    ; +0xc0, 0x864430", "xrefs": ["GJBaseGameLayer::update @ 0x89dca8", "<???> @ 0x2ab10"], "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"}