//
// EditorUI::activateRotationControl from 0xc02320 to 0xc024a8 (392 bytes)
//
// 8 xrefs:
// > EditorUI::toggleSpecialEditButtons @ 0x7c8038
// > EditorUI::undoLastAction @ 0x7d1f04
// > EditorUI::redoLastAction @ 0x7d1f70
// > EditorUI::moveObjectCall @ 0xc025b8
// > EditorUI::updateControlsAfterAlign @ 0xc02a8c
// > ??> @ 0x101a58
// > EditorUI::createMoveMenu @ 0xbe14a4
// > ??> @ 0x1547e00
//
// 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:49 +0000
//
__int64 __fastcall EditorUI::activateRotationControl(GJRotationControl **this, cocos2d::CCObject *a2)
{
__int64 v4; // x21
void (__fastcall *v5)(__int64, __int64); // x22
__int64 v6; // x0
__int64 v7; // x21
void (__fastcall *v8)(__int64, float); // x22
float v9; // s0
long double v10; // q0
_BYTE v11[8]; // [xsp+30h] [xbp+30h] BYREF
if ( ((unsigned int)cocos2d::CCArray::count(*(this + 112)) || *(this + 187))
&& (!(*(unsigned __int8 (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 95) + 352LL))(*(this + 95))
|| *((_BYTE *)this + 776)) )
{
EditorUI::deactivateTransformControl((EditorUI *)this);
*((_BYTE *)this + 776) = 0;
if ( (unsigned int)cocos2d::CCArray::count(*(this + 112)) )
{
EditorUI::getGroupCenter((cocos2d::CCPoint *)v11, *(this + 112), 0);
*(__n128 *)&v10 = cocos2d::CCPoint::operator=(this + 96, v11);
(*(void (__fastcall **)(_QWORD, char *, long double))(*(_QWORD *)*(this + 95) + 184LL))(
*(this + 95),
(char *)this + 768,
v10);
}
else
{
v4 = (__int64)*(this + 95);
v5 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v4 + 184LL);
v6 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 187) + 192LL))(*(this + 187));
v5(v4, v6);
}
v7 = (__int64)*(this + 95);
v8 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v7 + 160LL);
v9 = (*(float (__fastcall **)(_QWORD))(**((_QWORD **)*(this + 180) + 490) + 168LL))(*((_QWORD *)*(this + 180) + 490));
v8(v7, 1.0 / v9);
if ( !(*(unsigned __int8 (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 95) + 352LL))(*(this + 95)) )
GJRotationControl::setAngle(*(this + 95), 0.0);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 95) + 344LL))(*(this + 95), 1);
}
return _stack_chk_guard;
}