{"type": "func", "start": 4675812, "end": 4675936, "name": "GJBaseGameLayer::shouldUseSubstepForButton", "pseudocode": "// \n// GJBaseGameLayer::shouldUseSubstepForButton from 0x4758e4 to 0x475960 (124 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::update @ 0x4974da\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  _BOOL4 IsRelevant; // r0\n  double m_timestamp; // d11\n  PlayerButtonCommand *m_finish; // r6\n  PlayerButtonCommand *m_start; // r4\n  double v7; // d9\n  double v8; // d8\n  double v9; // d10\n\n  if ( a1->m_clickBetweenSteps )\n  {\n    m_timestamp = a1->m_timestamp;\n    m_finish = a1->m_queuedButtons.m_finish;\n    m_start = a1->m_queuedButtons.m_start;\n    v7 = a2 * 0.5;\n    v8 = m_timestamp + a2;\n    while ( m_start != m_finish )\n    {\n      v9 = m_start->m_timestamp;\n      if ( v9 >= m_timestamp + v7 && v9 < v8 )\n      {\n        IsRelevant = GJBaseGameLayer::buttonIsRelevant(a1, m_start);\n        if ( IsRelevant )\n          return IsRelevant;\n      }\n      ++m_start;\n      if ( v9 >= v8 )\n        break;\n    }\n  }\n  LOBYTE(IsRelevant) = 0;\n  return IsRelevant;\n}", "assembly": "; \n; GJBaseGameLayer::shouldUseSubstepForButton from 0x4758e4 to 0x475960 (124 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::update @ 0x4974da\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\nMOVW            R3, #0x2DE9                                            ; +0x0, 0x4758e4\nLDRB            R3, [R0,R3]                                            ; +0x4, 0x4758e8\nPUSH            {R4-R6,LR}                                             ; +0x6, 0x4758ea\nMOV             R5, R0                                                 ; +0x8, 0x4758ec\nVPUSH           {D8-D11}                                               ; +0xa, 0x4758ee\nVMOV            S16, R1                                                ; +0xe, 0x4758f2\nCBNZ            R3, loc_4758FC                                         ; +0x12, 0x4758f6\nMOVS            R0, #0                                                 ; +0x14, 0x4758f8\nB               loc_47595A                                             ; +0x16, 0x4758fa\nVMOV.F64        D9, #0.5                                               ; +0x18, 0x4758fc\nADD.W           R3, R0, #0x2DC0                                        ; +0x1c, 0x475900\nVLDR            D11, [R3,#0x20]                                        ; +0x20, 0x475904\nMOVW            R3, #0x2B84                                            ; +0x24, 0x475908\nLDR             R6, [R0,R3]                                            ; +0x28, 0x47590c\nADD.W           R3, R0, #0x2B80                                        ; +0x2a, 0x47590e\nLDR             R4, [R3]                                               ; +0x2e, 0x475912\nVCVT.F64.F32    D8, S16                                                ; +0x30, 0x475914\nVMUL.F64        D9, D8, D9                                             ; +0x34, 0x475918\nVADD.F64        D8, D11, D8                                            ; +0x38, 0x47591c\nCMP             R4, R6                                                 ; +0x3c, 0x475920\nBEQ             loc_4758F8                                             ; +0x3e, 0x475922\nVLDR            D10, [R4,#0x10]                                        ; +0x40, 0x475924\nVADD.F64        D7, D11, D9                                            ; +0x44, 0x475928\nVCMPE.F64       D10, D7                                                ; +0x48, 0x47592c\nVMRS            APSR_nzcv, FPSCR                                       ; +0x4c, 0x475930\nBGE             loc_475944                                             ; +0x50, 0x475934\nVCMPE.F64       D10, D8                                                ; +0x52, 0x475936\nADDS            R4, #0x18                                              ; +0x56, 0x47593a\nVMRS            APSR_nzcv, FPSCR                                       ; +0x58, 0x47593c\nBLT             loc_475920                                             ; +0x5c, 0x475940\nB               loc_4758F8                                             ; +0x5e, 0x475942\nVCMPE.F64       D10, D8                                                ; +0x60, 0x475944\nVMRS            APSR_nzcv, FPSCR                                       ; +0x64, 0x475948\nBPL             loc_475936                                             ; +0x68, 0x47594c\nMOV             R0, R5                                                 ; +0x6a, 0x47594e\nMOV             R1, R4                                                 ; +0x6c, 0x475950\nBL              _ZN15GJBaseGameLayer16buttonIsRelevantERK19PlayerButtonCommand; GJBaseGameLayer::buttonIsRelevant(PlayerButtonCommand const&) ; +0x6e, 0x475952\nCMP             R0, #0                                                 ; +0x72, 0x475956\nBEQ             loc_475936                                             ; +0x74, 0x475958\nVPOP            {D8-D11}                                               ; +0x76, 0x47595a\nPOP             {R4-R6,PC}                                             ; +0x7a, 0x47595e", "xrefs": ["GJBaseGameLayer::update @ 0x4974da"], "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"}