//
// cocos2d::CCAnimate::update from 0x1003bc880 to 0x1003bcac3 (579 bytes)
//
// 1 xrefs:
// > ??> @ 0x100929bf0
//
// 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::CCAnimate::update(cocos2d::CCAnimate *a1, float a2)
{
__m128 v2; // xmm3
std::vector *m_pSplitTimes; // rax
unsigned int v4; // ecx
std::__vector_base::pointer begin; // r15
unsigned int v6; // eax
unsigned int m_pOrigFrame; // r12d
_QWORD *v8; // rcx
__int64 v9; // rax
__int64 v10; // rax
_QWORD *v11; // rax
cocos2d::CCNode *m_pTarget; // r14
__int64 v13; // rax
__int64 v14; // r14
_QWORD *v15; // rsi
unsigned int v16; // r15d
__int64 v17; // rax
float v18; // [rsp+8h] [rbp-48h] BYREF
float *v19; // [rsp+10h] [rbp-40h]
unsigned int v20; // [rsp+18h] [rbp-38h]
__int64 v21; // [rsp+1Ch] [rbp-34h] BYREF
float v22; // [rsp+24h] [rbp-2Ch]
m_pSplitTimes = a1->m_pSplitTimes;
if ( a2 >= 1.0 )
{
v22 = a2;
}
else
{
v2.f32[0] = (float)SHIDWORD(m_pSplitTimes[3].__end_) * a2;
v4 = (unsigned int)a1[1].__vftable;
if ( v4 < (int)v2.f32[0] )
{
LODWORD(a1->m_pOrigFrame) = 0;
LODWORD(a1[1].__vftable) = v4 + 1;
}
LODWORD(v22) = v2.i32[0] & 0x80000000
| COERCE_UNSIGNED_INT(fabs(v2.f32[0] - _mm_round_ss((__m128)0LL, v2, 11).f32[0]));
}
begin = m_pSplitTimes[3].__begin_;
v6 = sub_100720070(begin);
m_pOrigFrame = (unsigned int)a1->m_pOrigFrame;
v20 = v6;
if ( m_pOrigFrame < v6 )
{
v19 = begin;
do
{
v8 = *(_QWORD **)&a1->m_nNextFrame;
if ( (__int64)(v8[1] - *v8) >> 2 <= (unsigned __int64)m_pOrigFrame )
sub_1003BD010();
if ( v22 < *(float *)(*v8 + 4LL * m_pOrigFrame) )
break;
v9 = sub_1007200C0(begin, m_pOrigFrame);
((void (__fastcall *)(cocos2d::CCNode *, _QWORD))a1->m_pTarget->cocos2d::CCActionInterval::cocos2d::CCFiniteTimeAction::cocos2d::CCAction::__vftable[1].setSkewY)(
a1->m_pTarget,
*(_QWORD *)(v9 + 56));
if ( BYTE4(a1[1].__vftable) == 1
&& ((__int64 (__fastcall *)(cocos2d::CCNode *))a1->m_pTarget->getParent)(a1->m_pTarget) )
{
v10 = ((__int64 (__fastcall *)(cocos2d::CCNode *))a1->m_pTarget->getParent)(a1->m_pTarget);
v11 = (_QWORD *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v10 + 312LL))(v10);
sub_10028CFC0(&v21, v11);
m_pTarget = a1->m_pTarget;
sub_10028CBE0(&v18, *(float *)&v21 * 0.5, *((float *)&v21 + 1) * 0.5);
((void (__fastcall *)(cocos2d::CCNode *, float *))m_pTarget->setPosition)(m_pTarget, &v18);
}
if ( BYTE5(a1[1].__vftable) == 1 )
{
v13 = ((__int64 (__fastcall *)(cocos2d::CCNode *))a1->m_pTarget->getChildren)(a1->m_pTarget);
if ( v13 )
{
v14 = v13;
v15 = (_QWORD *)((__int64 (__fastcall *)(cocos2d::CCNode *))a1->m_pTarget->getContentSize)(a1->m_pTarget);
sub_10028CFC0(&v21, v15);
sub_10028CBE0(&v18, *(float *)&v21 * 0.5, *((float *)&v21 + 1) * 0.5);
if ( (unsigned int)sub_100720070(v14) )
{
v16 = 0;
do
{
v17 = sub_1007200C0(v14, v16);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v17 + 184LL))(v17, &v18);
++v16;
}
while ( v16 < (unsigned int)sub_100720070(v14) );
}
begin = v19;
}
}
LODWORD(a1->m_pOrigFrame) = ++m_pOrigFrame;
}
while ( m_pOrigFrame != v20 );
}
}