//
// cocos2d::CCAnimate::update from 0xd32544 to 0xd327b0 (620 bytes)
//
// 2 xrefs:
// > ??> @ 0x99628
// > ??> @ 0x1514738
//
// 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 13:07:21 +0000
//
__int64 __fastcall cocos2d::CCAnimate::update(cocos2d::CCAnimate *this, float a2)
{
float v2; // s8
cocos2d::CCArray *v4; // x25
unsigned int v5; // w0
unsigned int v6; // w21
unsigned int v7; // w26
__int64 v8; // x0
__int64 v9; // x0
const cocos2d::CCSize *v10; // x0
__int64 v11; // x19
void (__fastcall *v12)(__int64, _BYTE *); // x22
cocos2d::CCArray *v13; // x22
unsigned int v14; // w19
const cocos2d::CCSize *v15; // x0
unsigned int v16; // w1
__int64 v17; // x0
unsigned int v19; // w1
float v20; // s0
float v21; // [xsp+78h] [xbp+78h] BYREF
float v22; // [xsp+7Ch] [xbp+7Ch]
_BYTE v23[8]; // [xsp+80h] [xbp+80h] BYREF
v2 = a2;
if ( a2 < 1.0 )
{
v19 = *((_DWORD *)this + 32);
v20 = (float)*(unsigned int *)(*((_QWORD *)this + 12) + 84LL) * a2;
if ( (unsigned int)v20 > v19 )
{
*((_DWORD *)this + 28) = 0;
*((_DWORD *)this + 32) = v19 + 1;
}
v2 = fmodf(v20, 1.0);
}
v4 = *(cocos2d::CCArray **)(*((_QWORD *)this + 12) + 72LL);
v5 = cocos2d::CCArray::count(v4);
v6 = *((_DWORD *)this + 28);
v7 = v5;
if ( v5 > v6 && v2 >= *(float *)(**((_QWORD **)this + 13) + 4LL * v6) )
{
do
{
v8 = cocos2d::CCArray::objectAtIndex(v4, v6);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 8) + 1160LL))(
*((_QWORD *)this + 8),
*(_QWORD *)(v8 + 56));
if ( *((_BYTE *)this + 132)
&& (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 8) + 512LL))(*((_QWORD *)this + 8)) )
{
v9 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 8) + 512LL))(*((_QWORD *)this + 8));
v10 = (const cocos2d::CCSize *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 328LL))(v9);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v21, v10);
v11 = *((_QWORD *)this + 8);
v12 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v11 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, v21 * 0.5, v22 * 0.5);
v12(v11, v23);
if ( !*((_BYTE *)this + 133) )
goto LABEL_6;
}
else if ( !*((_BYTE *)this + 133) )
{
goto LABEL_6;
}
v13 = (cocos2d::CCArray *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 8) + 488LL))(*((_QWORD *)this + 8));
if ( !v13 )
{
LABEL_6:
*((_DWORD *)this + 28) = ++v6;
if ( v7 <= v6 )
return _stack_chk_guard;
continue;
}
v14 = 0;
v15 = (const cocos2d::CCSize *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 8) + 328LL))(*((_QWORD *)this + 8));
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v21, v15);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, v21 * 0.5, v22 * 0.5);
while ( v14 < (unsigned int)cocos2d::CCArray::count(v13) )
{
v16 = v14++;
v17 = cocos2d::CCArray::objectAtIndex(v13, v16);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v17 + 184LL))(v17, v23);
}
*((_DWORD *)this + 28) = ++v6;
if ( v7 <= v6 )
return _stack_chk_guard;
}
while ( v2 >= *(float *)(**((_QWORD **)this + 13) + 4LL * v6) );
}
return _stack_chk_guard;
}