{"type": "func", "start": 6714012, "end": 6714204, "name": "DrawGridLayer::timeForPos", "pseudocode": "// \n// DrawGridLayer::timeForPos from 0x66729c to 0x66735c (192 bytes)\n// \n// 8 xrefs:\n// > LevelEditorLayer::timeForPos @ 0x6673c0\n// > LevelEditorLayer::updateGameObjects @ 0x67bc68\n// > LevelEditorLayer::updateGameObjects @ 0x67bd84\n// > EditorUI::onPlayback @ 0x6894c0\n// > EditorUI::onPlayback @ 0x6894fc\n// > EditorPauseLayer::init @ 0x78b680\n// > EditorPauseLayer::saveLevel @ 0x78e310\n// > <???> @ 0x60d80\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\n// local variable allocation has failed, the output may be wrong!\nfloat DrawGridLayer::timeForPos(\n        DrawGridLayer *a1,\n        cocos2d::CCPoint a2,\n        int a3,\n        int a4,\n        bool a5,\n        bool a6,\n        bool a7,\n        int a8)\n{\n  char v12; // w23\n  int v14; // [xsp+0h] [xbp-10h]\n  cocos2d::CCPoint v16; // [xsp+70h] [xbp+60h] BYREF\n  cocos2d::CCPoint v17; // 0:s0.4,4:s1.4\n\n  v12 = a8;\n  cocos2d::CCPoint::CCPoint(&v16, *(const cocos2d::CCPoint **)&a3);\n  LOBYTE(v14) = v12;\n  return LevelTools::timeForPos(\n           v17,\n           (cocos2d::CCArray *)&v16,\n           (int)a1->m_speedObjects,\n           a1->m_editorLayer->m_levelSettings->m_startSpeed,\n           a4,\n           a5,\n           a6,\n           a1->m_editorLayer->m_levelSettings->m_platformerMode,\n           a7,\n           v14);\n}", "assembly": "; \n; DrawGridLayer::timeForPos from 0x66729c to 0x66735c (192 bytes)\n; \n; 8 xrefs:\n; > LevelEditorLayer::timeForPos @ 0x6673c0\n; > LevelEditorLayer::updateGameObjects @ 0x67bc68\n; > LevelEditorLayer::updateGameObjects @ 0x67bd84\n; > EditorUI::onPlayback @ 0x6894c0\n; > EditorUI::onPlayback @ 0x6894fc\n; > EditorPauseLayer::init @ 0x78b680\n; > EditorPauseLayer::saveLevel @ 0x78e310\n; > <???> @ 0x60d80\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\nSUB             SP, SP, #0x80                                          ; +0x0, 0x66729c\nSTP             X29, X30, [SP,#0x80+var_70]                            ; +0x4, 0x6672a0\nADD             X29, SP, #0x10                                         ; +0x8, 0x6672a4\nSTP             X19, X20, [SP,#0x80+var_60]                            ; +0xc, 0x6672a8\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x6672ac\nADD             X20, X29, #0x70+var_10                                 ; +0x14, 0x6672b0\nSTP             X25, X26, [SP,#0x80+var_30]                            ; +0x18, 0x6672b4\nMOV             W26, W3                                                ; +0x1c, 0x6672b8\nUXTB            W25, W4                                                ; +0x20, 0x6672bc\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x24, 0x6672c0\nSTP             X21, X22, [SP,#0x80+var_50]                            ; +0x28, 0x6672c4\nMOV             X21, X0                                                ; +0x2c, 0x6672c8\nMOV             X0, X20; this                                          ; +0x30, 0x6672cc\nLDR             X3, [X19]                                              ; +0x34, 0x6672d0\nMOV             W22, W7                                                ; +0x38, 0x6672d4\nSTP             X23, X24, [SP,#0x80+var_40]                            ; +0x3c, 0x6672d8\nSTR             X2, [X29,#0x70+var_18]                                 ; +0x40, 0x6672dc\nUXTB            W24, W5                                                ; +0x44, 0x6672e0\nUXTB            W23, W6                                                ; +0x48, 0x6672e4\nSTR             X3, [X29,#0x70+var_8]                                  ; +0x4c, 0x6672e8\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x50, 0x6672ec\nLDR             X6, [X21,#0x200]                                       ; +0x54, 0x6672f0\nMOV             X0, X20                                                ; +0x58, 0x6672f4\nLDR             X2, [X29,#0x70+var_18]                                 ; +0x5c, 0x6672f8\nMOV             W4, W26                                                ; +0x60, 0x6672fc\nLDR             X1, [X21,#0x230]                                       ; +0x64, 0x667300\nMOV             W5, W25                                                ; +0x68, 0x667304\nLDR             X8, [X6,#0xE08]                                        ; +0x6c, 0x667308\nMOV             W3, W2                                                 ; +0x70, 0x66730c\nMOV             W7, W24                                                ; +0x74, 0x667310\nLDR             W2, [X8,#0x14C]                                        ; +0x78, 0x667314\nLDRB            W6, [X8,#0x155]                                        ; +0x7c, 0x667318\nSTRB            W23, [SP,#0x80+var_80]                                 ; +0x80, 0x66731c\nSTR             W22, [SP,#0x80+var_78]                                 ; +0x84, 0x667320\nBL              _ZN10LevelTools10timeForPosEN7cocos2d7CCPointEPNS0_7CCArrayEiiibbbbi; LevelTools::timeForPos(cocos2d::CCPoint,cocos2d::CCArray *,int,int,int,bool,bool,bool,bool,int) ; +0x88, 0x667324\nLDR             X1, [X29,#0x70+var_8]                                  ; +0x8c, 0x667328\nLDR             X0, [X19]                                              ; +0x90, 0x66732c\nCMP             X1, X0                                                 ; +0x94, 0x667330\nB.NE            loc_667358                                             ; +0x98, 0x667334\nSUB             SP, X29, #0x10                                         ; +0x9c, 0x667338\nLDP             X19, X20, [SP,#0x80+var_60]                            ; +0xa0, 0x66733c\nLDP             X21, X22, [SP,#0x80+var_50]                            ; +0xa4, 0x667340\nLDP             X23, X24, [SP,#0x80+var_40]                            ; +0xa8, 0x667344\nLDP             X25, X26, [SP,#0x80+var_30]                            ; +0xac, 0x667348\nLDP             X29, X30, [SP,#0x80+var_70]                            ; +0xb0, 0x66734c\nADD             SP, SP, #0x80                                          ; +0xb4, 0x667350\nRET                                                                    ; +0xb8, 0x667354\nBL              .__stack_chk_fail                                      ; +0xbc, 0x667358", "xrefs": ["LevelEditorLayer::timeForPos @ 0x6673c0", "LevelEditorLayer::updateGameObjects @ 0x67bc68", "LevelEditorLayer::updateGameObjects @ 0x67bd84", "EditorUI::onPlayback @ 0x6894c0", "EditorUI::onPlayback @ 0x6894fc", "EditorPauseLayer::init @ 0x78b680", "EditorPauseLayer::saveLevel @ 0x78e310", "<???> @ 0x60d80"], "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"}