//
// cocos2d::CCTimer::update from 0x1800c66b0 to 0x1800c6840 (400 bytes)
//
// 5 xrefs:
// > ??> @ 0x18010dd28
// > ??> @ 0x18014b36c
// > ??> @ 0x18014b380
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c3924
//
// This function is hookable on this platform (idp: pc, 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:22:27 +0000
//
void __fastcall cocos2d::CCTimer::update(cocos2d::CCTimer *this, float a2)
{
float v4; // xmm1_4
_BYTE *v5; // rax
_BYTE *v6; // rbx
float v7; // xmm1_4
bool v8; // cf
void (*v9)(void); // rax
struct cocos2d::CCScriptEngineManager *v10; // rax
__int64 v11; // r8
bool v12; // zf
float v13; // xmm1_4
char *v14; // rsi
void (*v15)(void); // rax
struct cocos2d::CCScriptEngineManager *v16; // rax
__int64 v17; // r8
float v18; // xmm0_4
void (*v19)(void); // rax
struct cocos2d::CCScriptEngineManager *v20; // rax
__int64 v21; // r8
struct cocos2d::CCDirector *v22; // rax
__int64 v23; // rbx
__int64 v24; // rdi
cocos2d::CCScheduler *v25; // rax
v4 = *((float *)this + 16);
if ( v4 == -1.0 )
{
*((_DWORD *)this + 16) = 0;
*((_DWORD *)this + 18) = 0;
return;
}
v5 = (char *)this + 68;
v6 = (char *)this + 69;
if ( *((_BYTE *)this + 68) && !*v6 )
{
v7 = v4 + a2;
v8 = v7 < *((float *)this + 21);
*((float *)this + 16) = v7;
if ( !v8 )
{
if ( *((_QWORD *)this + 7) )
{
v9 = *((void (**)(void))this + 11);
if ( v9 )
v9();
}
if ( *((_DWORD *)this + 24) )
{
v10 = cocos2d::CCScriptEngineManager::sharedManager();
(*(void (__fastcall **)(_QWORD, _QWORD, __int64, _QWORD))(**(_QWORD **)v10 + 96LL))(
*(_QWORD *)v10,
*((unsigned int *)this + 24),
v11,
0);
}
*((_DWORD *)this + 16) = 0;
}
return;
}
v12 = *v6 == 0;
v13 = v4 + a2;
*((float *)this + 16) = v13;
if ( v12 )
{
if ( v13 >= *((float *)this + 21) )
{
if ( *((_QWORD *)this + 7) )
{
v19 = *((void (**)(void))this + 11);
if ( v19 )
v19();
}
if ( *((_DWORD *)this + 24) )
{
v20 = cocos2d::CCScriptEngineManager::sharedManager();
(*(void (__fastcall **)(_QWORD, _QWORD, __int64, _QWORD))(**(_QWORD **)v20 + 96LL))(
*(_QWORD *)v20,
*((unsigned int *)this + 24),
v21,
0);
}
*((_DWORD *)this + 16) = 0;
goto LABEL_27;
}
}
else if ( v13 >= *((float *)this + 20) )
{
v14 = (char *)this + 69;
if ( *((_QWORD *)this + 7) )
{
v15 = *((void (**)(void))this + 11);
if ( v15 )
{
v15();
v14 = (char *)this + 69;
}
}
if ( *((_DWORD *)this + 24) )
{
v16 = cocos2d::CCScriptEngineManager::sharedManager();
(*(void (__fastcall **)(_QWORD, _QWORD, __int64, _QWORD))(**(_QWORD **)v16 + 96LL))(
*(_QWORD *)v16,
*((unsigned int *)this + 24),
v17,
0);
v6 = v14;
}
v18 = *((float *)this + 16) - *((float *)this + 20);
*v6 = 0;
*((float *)this + 16) = v18;
LABEL_27:
++*((_DWORD *)this + 18);
v5 = (char *)this + 68;
}
if ( !*v5 && *((_DWORD *)this + 18) > *((_DWORD *)this + 19) )
{
v22 = cocos2d::CCDirector::sharedDirector();
v23 = *((_QWORD *)this + 7);
v24 = *((_QWORD *)this + 11);
v25 = (cocos2d::CCScheduler *)(*(__int64 (__fastcall **)(struct cocos2d::CCDirector *))(*(_QWORD *)v22 + 112LL))(v22);
cocos2d::CCScheduler::unscheduleSelector(v25, v24, v23);
}
}