//
// EditorUI::getGridSnappedPos from 0x1401bf900 to 0x1401bf9dd (221 bytes)
//
// 11 xrefs:
// > EditorUI::onCreateObject @ 0x1401b2983
// > EditorUI::createPrefab @ 0x1401b74b8
// > EditorUI::createGradientFromSelection @ 0x1401b9df3
// > EditorUI::findSnapObject_1 @ 0x1401bf625
// > EditorUI::findSnapObject_1 @ 0x1401bf7ad
// > EditorUI::swipeToPosition @ 0x1401bfe2c
// > EditorUI::ccTouchEnded @ 0x1401c1092
// > EditorUI::doPasteObjects @ 0x1401c60a8
// > EditorUI::applySpecialOffset @ 0x1402020a6
// > SetupSmartBlockLayer::onPasteTemplate @ 0x1405ed961
// > ??> @ 0x14091a624
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:28:02 +0000
//
__int64 __fastcall EditorUI::getGridSnappedPos(__int64 a1, __int64 a2, float *a3)
{
float v6; // xmm9_4
float v7; // xmm7_4
float v8; // xmm8_4
float v9; // xmm0_4
__int64 v10; // rax
char v12; // [rsp+60h] [rbp+8h] BYREF
v6 = *(float *)(*(_QWORD *)(*(_QWORD *)(a1 + 1512) + 14944LL) + 636LL);
v7 = fmodf(90.0, v6);
v8 = floorf((float)(a3[1] - v7) / v6);
v9 = (float)(floorf(*a3 / v6) + 0.5) * v6;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v12, v9, (float)((float)(v8 + 0.5) * v6) + v7);
EditorUI::getLimitedPosition(a1, a2, v10);
return a2;
}