//
// CCAnimatedSprite::tweenToAnimationFinished from 0x100350e20 to 0x100350ee3 (195 bytes)
//
// 1 xrefs:
// > CCAnimatedSprite::tweenToAnimation @ 0x100350d8e
//
// 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 CCAnimatedSprite::tweenToAnimationFinished(CCAnimatedSprite *a1)
{
__int128 v1; // xmm0
std::string *p_m_activeTween; // rbx
SpriteAnimationManager *m_animationManager; // r14
__int128 v4; // [rsp+0h] [rbp-50h] BYREF
void *__p; // [rsp+10h] [rbp-40h]
__int128 v6; // [rsp+20h] [rbp-30h] BYREF
void *longStorage; // [rsp+30h] [rbp-20h]
p_m_activeTween = (std::string *)&a1->m_activeTween;
if ( (a1->m_activeTween.m_data.m_short.sizex2 & 1) != 0 )
{
sub_100006B70(
&v6,
a1->m_activeTween.m_data.m_long.longStorage,
a1->m_activeTween.m_data.m_long.size,
*(double *)&v1);
m_animationManager = a1->m_animationManager;
if ( (v6 & 1) != 0 )
goto LABEL_3;
}
else
{
longStorage = a1->m_activeTween.m_data.m_long.longStorage;
v1 = *(_OWORD *)&p_m_activeTween->__r_.__value_.__l.0;
v6 = *(_OWORD *)&p_m_activeTween->__r_.__value_.__l.0;
m_animationManager = a1->m_animationManager;
if ( (v6 & 1) != 0 )
{
LABEL_3:
sub_100006B70(&v4, longStorage, *((unsigned __int64 *)&v6 + 1), *(double *)&v1);
goto LABEL_6;
}
}
__p = longStorage;
v4 = v6;
LABEL_6:
SpriteAnimationManager::runAnimation(m_animationManager, &v4);
if ( (v4 & 1) != 0 )
operator delete(__p);
if ( (v6 & 1) != 0 )
operator delete(longStorage);
std::string::assign(p_m_activeTween, "");
}