//
// cocos2d::CCRotateTo::startWithTarget from 0x10018b29c to 0x10018b37c (224 bytes)
//
// 1 xrefs:
// > ??> @ 0x1007a57d8
//
// 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 cocos2d::CCRotateTo::startWithTarget(cocos2d::CCRotateTo *a1, cocos2d::CCNode *a2)
{
float v4; // s0
float v5; // s1
float v6; // s0
float v7; // s1
float v8; // s0
float v9; // s1
int v10; // s0
int v11; // s1
cocos2d::CCAction::startWithTarget(a1, a2);
a1->m_elapsed = 0.0;
a1->m_bFirstTick = 1;
v4 = ((float (__fastcall *)(cocos2d::CCNode *))a2->getRotationX)(a2);
if ( v4 <= 0.0 )
v5 = -360.0;
else
v5 = 360.0;
v6 = fmodf(v4, v5);
v7 = *((float *)&a1->m_bFirstTick + 1) - v6;
if ( v7 > 180.0 )
v7 = v7 + -360.0;
if ( v7 < -180.0 )
v7 = v7 + 360.0;
*(float *)&a1[1].__vftable = v6;
*((float *)&a1[1].__vftable + 1) = v7;
v8 = ((float (__fastcall *)(cocos2d::CCNode *))a1->m_pTarget->getRotationY)(a1->m_pTarget);
if ( v8 <= 0.0 )
v9 = -360.0;
else
v9 = 360.0;
*(float *)&v10 = fmodf(v8, v9);
*(float *)&v11 = *(float *)&a1[1].m_uID - *(float *)&v10;
if ( *(float *)&v11 > 180.0 )
*(float *)&v11 = *(float *)&v11 + -360.0;
if ( *(float *)&v11 < -180.0 )
*(float *)&v11 = *(float *)&v11 + 360.0;
a1[1].m_nLuaID = v10;
a1[1].cocos2d::CCActionInterval::cocos2d::CCFiniteTimeAction::cocos2d::CCAction::cocos2d::CCObject::m_nTag = v11;
}