//
// GJEffectManager::registerRotationCommand from 0x100012a9c to 0x100012b70 (212 bytes)
//
// 3 xrefs:
// > GJEffectManager::prepareMoveActions @ 0x10001316c
// > GJEffectManager::prepareMoveActions @ 0x10001379c
// > GJBaseGameLayer::processDynamicObjectActions @ 0x1001f7290
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall GJEffectManager::registerRotationCommand(GJEffectManager *a1, GroupCommandObject2 *a2, bool a3)
{
__int64 v4; // x8
std::__tree_end_node *>::pointer left; // x9
int v6; // w11
int v7; // w11
__int64 v8; // x0
__int64 v9; // x0
__int64 v10; // [xsp+0h] [xbp-30h] BYREF
GroupCommandObject2 *v11; // [xsp+8h] [xbp-28h] BYREF
char v12; // [xsp+17h] [xbp-19h] BYREF
__int64 *v13; // [xsp+18h] [xbp-18h] BYREF
v4 = *(_QWORD *)&a2->m_targetGroupID;
v10 = v4;
v11 = a2;
if ( a3 )
{
left = a1->m_unkMap770.__tree_.__pair1_.__value_.__left_;
if ( left )
{
while ( 1 )
{
v6 = *((_DWORD *)left + 8);
if ( v6 <= (int)v4 )
{
if ( v6 < (int)v4 )
goto LABEL_8;
v7 = *((_DWORD *)left + 9);
if ( v7 <= SHIDWORD(v4) )
break;
}
LABEL_9:
left = *(std::__tree_end_node *>::pointer *)left;
if ( !left )
goto LABEL_10;
}
if ( v7 >= SHIDWORD(v4) )
{
v13 = &v10;
v9 = sub_10001A144(&a1->m_unkMap770, &v10, &unk_10063553F, &v13, &v12);
*(_QWORD *)(v9 + 48) = *(_QWORD *)(v9 + 40);
goto LABEL_10;
}
LABEL_8:
left = (std::__tree_end_node *>::pointer)((char *)left + 8);
goto LABEL_9;
}
}
LABEL_10:
v13 = &v10;
v8 = sub_10001A144(&a1->m_unkMap770, &v10, &unk_10063553F, &v13, &v12);
sub_1000115B8(v8 + 40, &v11);
sub_1000115B8((__int64)&a1->m_unkVector5b0, &v11);
}