//
// CCAnimatedSprite::tweenToAnimation from 0x10039a554 to 0x10039a70c (440 bytes)
//
// 11 xrefs:
// > PlayerObject::updateJump @ 0x1002b7ab4
// > PlayerObject::updateJump @ 0x1002b7d14
// > PlayerObject::updateJump @ 0x1002b7d9c
// > PlayerObject::updateJump @ 0x1002b7dd4
// > PlayerObject::updateJump @ 0x1002b8054
// > PlayerObject::updateMove @ 0x1002b8718
// > PlayerObject::updateMove @ 0x1002b87c4
// > PlayerObject::boostPlayer @ 0x1002bcc38
// > PlayerObject::ringJump @ 0x1002c5918
// > sub_1002C9754 @ 0x1002c9794
// > sub_10042B060 @ 0x10042b118
//
// 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:03:43 +0000
//
void __fastcall CCAnimatedSprite::tweenToAnimation(std::string *a1, __int64 a2, float a3)
{
std::string::pointer data; // x21
int v7; // w21
__int64 v8; // x0
__int64 v9; // x1
__int64 v10; // x0
const char *v11; // x9
__int64 v12; // x21
void *v13; // x0
char *CString; // x0
__int64 v15; // x21
float *v16; // x20
char v17; // w0
__int64 v18; // x1
__int64 v19; // x2
__int64 v20; // x3
__int64 v21; // x4
__int64 v22; // x5
__int64 v23; // x6
__int64 v24; // x7
__int64 v25; // x20
void *v26[2]; // [xsp+18h] [xbp-68h] BYREF
char v27; // [xsp+2Fh] [xbp-51h]
void *__p[2]; // [xsp+30h] [xbp-50h] BYREF
__int64 v29; // [xsp+40h] [xbp-40h]
data = a1[27].__r_.__value_.__l.__data_;
if ( *(char *)(a2 + 23) < 0 )
{
sub_1000097D0(__p, *(void **)a2, *(_QWORD *)(a2 + 8));
}
else
{
*(_OWORD *)__p = *(_OWORD *)a2;
v29 = *(_QWORD *)(a2 + 16);
}
v7 = sub_1003C20D8(data, __p);
if ( SHIBYTE(v29) < 0 )
operator delete(__p[0]);
if ( v7 == 2
&& (!sub_1000045BC(a1[26].__r_.__value_.__r.__words, (_QWORD *)a2)
|| !cocos2d::CCNode::getActionByTag((__int64)a1, 1)) )
{
SpriteAnimationManager::stopAnimations(a1[27].__r_.__value_.__r.__words[0]);
cocos2d::CCNode::stopActionByTag((__int64)a1, 1);
std::string::operator=(a1 + 26, (const std::string *)a2);
v8 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1[27].__r_.__value_.__r.__words[0] + 392), a2);
if ( v8 )
{
v9 = v8;
if ( *(_DWORD *)(v8 + 28) )
{
v10 = (__int64)a1[28].__r_.__value_.__l.__data_;
}
else
{
v11 = (const char *)a2;
if ( *(char *)(a2 + 23) < 0 )
v11 = *(const char **)a2;
v12 = *(_QWORD *)(a1[27].__r_.__value_.__r.__words[0] + 392);
v13 = sub_1003065B0("%s_first", v11);
CString = (char *)cocos2d::CCString::getCString((__int64)v13);
sub_100009900(v26, CString);
v15 = cocos2d::CCDictionary::objectForKey(v12, v26);
if ( v27 < 0 )
operator delete(v26[0]);
v10 = (__int64)a1[28].__r_.__value_.__l.__data_;
v9 = v15;
}
sub_1000879B8(v10, v9, a3);
std::string::operator=(a1 + 26, (const std::string *)a2);
v16 = cocos2d::CCDelayTime::create(a3);
v17 = (unsigned __int8)cocos2d::CCCallFunc::create(
(__int64)a1,
(__int64)CCAnimatedSprite::tweenToAnimationFinished,
0);
v25 = sub_10021D420((__int64)v16, v18, v19, v20, v21, v22, v23, v24, v17);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v25 + 72LL))(v25, 1);
cocos2d::CCNode::runAction((__int64)a1, v25);
}
}
}