//
// GJTransformControl::moveAnchorTo from 0xbd1a20 to 0xbd1bc0 (416 bytes)
//
// 3 xrefs:
// > GJTransformControl::ccTouchBegan @ 0xbd2098
// > GJTransformControl::ccTouchEnded @ 0xbd3b34
// > ??> @ 0x83bf0
//
// 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 13:03:37 +0000
//
__int64 __fastcall GJTransformControl::moveAnchorTo(__int64 a1, const cocos2d::CCPoint *a2)
{
cocos2d::CCArray *v4; // x0
__int64 v6; // x0
const cocos2d::CCPoint *v7; // x0
__int64 v8; // x26
const cocos2d::CCPoint *v9; // x1
void (__fastcall *v10)(__int64, _BYTE *); // x24
__int64 v11; // x0
__int64 v12; // x0
const cocos2d::CCPoint *v13; // x0
long double v14; // q0
__int64 v15; // x23
_QWORD v16[3]; // [xsp+50h] [xbp+50h] BYREF
_BYTE v17[8]; // [xsp+68h] [xbp+68h] BYREF
_BYTE v18[8]; // [xsp+70h] [xbp+70h] BYREF
__int64 v19; // [xsp+78h] [xbp+78h] BYREF
_BYTE v20[8]; // [xsp+80h] [xbp+80h] BYREF
if ( *(_QWORD *)(a1 + 440) )
{
v4 = *(cocos2d::CCArray **)(a1 + 424);
if ( v4 )
{
if ( (unsigned int)cocos2d::CCArray::count(v4) )
{
v6 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 424), 0);
v7 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 192LL))(v6);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v17, v7);
v8 = *(_QWORD *)(a1 + 440);
v9 = a2;
v10 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v8 + 104LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, v9);
v10(v8, v20);
v11 = GJTransformControl::spriteByTag((cocos2d::CCArray **)a1, 1);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v11 + 184LL))(v11, &unk_155E9F0);
GJTransformControl::updateButtons((GJTransformControl *)a1, 0, 1u);
GJTransformControl::updateButtons((GJTransformControl *)a1, 0, 0);
v12 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 424), 0);
v13 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v12 + 192LL))(v12);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, v13);
cocos2d::CCPoint::operator-(&v19, v17, v18, v14);
v15 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 440) + 120LL))(*(_QWORD *)(a1 + 440));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, (const cocos2d::CCPoint *)&v19);
EditorUI::checkDiffAfterTransformAnchor(v16, v15, v20, *(_QWORD *)(a1 + 424));
GJTransformControl::updateButtons((GJTransformControl *)a1, 0, 1u);
GJTransformControl::updateButtons((GJTransformControl *)a1, 0, 0);
}
}
}
return _stack_chk_guard;
}