//
// EditorUI::getGridSnappedPos from 0x1004779c4 to 0x100477a64 (160 bytes)
//
// 10 xrefs:
// > SetupSmartBlockLayer::onPasteTemplate @ 0x100078790
// > EditorUI::applySpecialOffset @ 0x10015fa74
// > EditorUI::swipeToPosition @ 0x100160fb8
// > EditorUI::ccTouchEnded @ 0x1001620fc
// > EditorUI::doPasteObjects @ 0x10018ac60
// > EditorUI::onCreateObject @ 0x1004770d8
// > sub_1004796B4 @ 0x100479774
// > EditorUI::createGradientFromSelection @ 0x10047b46c
// > EditorUI::findSnapObject_1 @ 0x10047d0d0
// > EditorUI::findSnapObject_1 @ 0x10047d1d8
//
// This function is hookable on this platform (idp: arm, 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:05:41 +0000
//
void __usercall EditorUI::getGridSnappedPos(__int64 a1@, float *a2@, _QWORD *a3@)
{
float v6; // s8
float v7; // s0
float32x2_t v8; // [xsp+8h] [xbp-38h] BYREF
v6 = *(float *)(*(_QWORD *)(*(_QWORD *)(a1 + 1440) + 14288LL) + 604LL);
v7 = fmodf(90.0, v6);
sub_1000262BC(
(float *)&v8,
v6 * (float)(floorf(*a2 / v6) + 0.5),
v7 + (float)((float)(floorf((float)(a2[1] - v7) / v6) + 0.5) * v6));
EditorUI::getLimitedPosition(a1, &v8, a3);
}