{"type": "func", "start": 8156168, "end": 8156368, "name": "EditorUI::getGridSnappedPos", "pseudocode": "// \n// EditorUI::getGridSnappedPos from 0x7c7408 to 0x7c74d0 (200 bytes)\n// \n// 11 xrefs:\n// > EditorUI::findSnapObject @ 0x7c76d4\n// > EditorUI::findSnapObject @ 0x7c7814\n// > EditorUI::createPrefab @ 0x7c9c5c\n// > EditorUI::onCreateObject @ 0x7c9ffc\n// > EditorUI::createGradientFromSelection @ 0x7cac88\n// > SetupSmartBlockLayer::onPasteTemplate @ 0xb15d84\n// > EditorUI::swipeToPosition @ 0xbd5298\n// > EditorUI::ccTouchEnded @ 0xbd66e4\n// > EditorUI::doPasteObjects @ 0xbd9fd8\n// > EditorUI::applySpecialOffset @ 0xc003d8\n// > <???> @ 0x4a050\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:54:09 +0000\n// \n\n__int64 __usercall EditorUI::getGridSnappedPos@<X0>(__int64 a1@<X0>, float *a2@<X1>, __int64 a3@<X8>)\n{\n  float v5; // s8\n  float v6; // s0\n  _BYTE v9[8]; // [xsp+50h] [xbp+50h] BYREF\n\n  v5 = *(float *)(*(_QWORD *)(*(_QWORD *)(a1 + 1440) + 14288LL) + 604LL);\n  v6 = fmodf(90.0, v5);\n  cocos2d::CCPoint::CCPoint(\n    (cocos2d::CCPoint *)v9,\n    v5 * (float)(floorf(*a2 / v5) + 0.5),\n    v6 + (float)(v5 * (float)(floorf((float)(a2[1] - v6) / v5) + 0.5)));\n  EditorUI::getLimitedPosition(a1, v9);\n  return a3;\n}", "assembly": "; \n; EditorUI::getGridSnappedPos from 0x7c7408 to 0x7c74d0 (200 bytes)\n; \n; 11 xrefs:\n; > EditorUI::findSnapObject @ 0x7c76d4\n; > EditorUI::findSnapObject @ 0x7c7814\n; > EditorUI::createPrefab @ 0x7c9c5c\n; > EditorUI::onCreateObject @ 0x7c9ffc\n; > EditorUI::createGradientFromSelection @ 0x7cac88\n; > SetupSmartBlockLayer::onPasteTemplate @ 0xb15d84\n; > EditorUI::swipeToPosition @ 0xbd5298\n; > EditorUI::ccTouchEnded @ 0xbd66e4\n; > EditorUI::doPasteObjects @ 0xbd9fd8\n; > EditorUI::applySpecialOffset @ 0xc003d8\n; > <???> @ 0x4a050\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:54:09 +0000\n; \nSTP             X29, X30, [SP,#var_60]!                                ; +0x0, 0x7c7408\nMOV             X29, SP                                                ; +0x4, 0x7c740c\nSTP             X19, X20, [SP,#0x60+var_50]                            ; +0x8, 0x7c7410\nSTP             X21, X22, [SP,#0x60+var_40]                            ; +0xc, 0x7c7414\nSTR             D8, [SP,#0x60+var_30]                                  ; +0x10, 0x7c7418\nMOV             X22, X0                                                ; +0x14, 0x7c741c\nLDR             X0, [X0,#0x5A0]                                        ; +0x18, 0x7c7420\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0x1c, 0x7c7424\nLDR             S0, flt_7C74D0; x                                      ; +0x20, 0x7c7428\nMOV             X19, X8                                                ; +0x24, 0x7c742c\nSTR             X1, [X29,#0x60+var_18]                                 ; +0x28, 0x7c7430\nADD             X21, X29, #0x60+var_10                                 ; +0x2c, 0x7c7434\nLDR             X0, [X0,#0x37D0]                                       ; +0x30, 0x7c7438\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x34, 0x7c743c\nLDR             S8, [X0,#0x25C]                                        ; +0x38, 0x7c7440\nLDR             X2, [X20]                                              ; +0x3c, 0x7c7444\nFMOV            S1, S8; y                                              ; +0x40, 0x7c7448\nSTR             X2, [X29,#0x60+var_8]                                  ; +0x44, 0x7c744c\nBL              .fmodf                                                 ; +0x48, 0x7c7450\nLDR             X1, [X29,#0x60+var_18]                                 ; +0x4c, 0x7c7454\nMOV             X0, X21; this                                          ; +0x50, 0x7c7458\nFMOV            S2, S0                                                 ; +0x54, 0x7c745c\nFMOV            S3, #0.5                                               ; +0x58, 0x7c7460\nLDR             S1, [X1,#4]                                            ; +0x5c, 0x7c7464\nLDR             S0, [X1]                                               ; +0x60, 0x7c7468\nFSUB            S1, S1, S2                                             ; +0x64, 0x7c746c\nFDIV            S0, S0, S8                                             ; +0x68, 0x7c7470\nFDIV            S1, S1, S8                                             ; +0x6c, 0x7c7474\nFRINTM          S0, S0                                                 ; +0x70, 0x7c7478\nFADD            S0, S0, S3                                             ; +0x74, 0x7c747c\nFMUL            S0, S8, S0; float                                      ; +0x78, 0x7c7480\nFRINTM          S1, S1                                                 ; +0x7c, 0x7c7484\nFADD            S1, S1, S3                                             ; +0x80, 0x7c7488\nFMADD           S1, S8, S1, S2; float                                  ; +0x84, 0x7c748c\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x88, 0x7c7490\nMOV             X0, X22                                                ; +0x8c, 0x7c7494\nMOV             X1, X21                                                ; +0x90, 0x7c7498\nMOV             X8, X19                                                ; +0x94, 0x7c749c\nBL              _ZN8EditorUI18getLimitedPositionEN7cocos2d7CCPointE; EditorUI::getLimitedPosition(cocos2d::CCPoint) ; +0x98, 0x7c74a0\nLDR             X2, [X29,#0x60+var_8]                                  ; +0x9c, 0x7c74a4\nMOV             X0, X19                                                ; +0xa0, 0x7c74a8\nLDR             X1, [X20]                                              ; +0xa4, 0x7c74ac\nCMP             X2, X1                                                 ; +0xa8, 0x7c74b0\nB.NE            loc_7C74CC                                             ; +0xac, 0x7c74b4\nLDP             X19, X20, [SP,#0x60+var_50]                            ; +0xb0, 0x7c74b8\nLDP             X21, X22, [SP,#0x60+var_40]                            ; +0xb4, 0x7c74bc\nLDR             D8, [SP,#0x60+var_30]                                  ; +0xb8, 0x7c74c0\nLDP             X29, X30, [SP+0x60+var_60],#0x60                       ; +0xbc, 0x7c74c4\nRET                                                                    ; +0xc0, 0x7c74c8\nBL              .__stack_chk_fail                                      ; +0xc4, 0x7c74cc", "xrefs": ["EditorUI::findSnapObject @ 0x7c76d4", "EditorUI::findSnapObject @ 0x7c7814", "EditorUI::createPrefab @ 0x7c9c5c", "EditorUI::onCreateObject @ 0x7c9ffc", "EditorUI::createGradientFromSelection @ 0x7cac88", "SetupSmartBlockLayer::onPasteTemplate @ 0xb15d84", "EditorUI::swipeToPosition @ 0xbd5298", "EditorUI::ccTouchEnded @ 0xbd66e4", "EditorUI::doPasteObjects @ 0xbd9fd8", "EditorUI::applySpecialOffset @ 0xc003d8", "<???> @ 0x4a050"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}