//
// cocos2d::CCTimer::update from 0x10023eb94 to 0x10023ed78 (484 bytes)
//
// 1 xrefs:
// > ??> @ 0x100905ed8
//
// 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:01:23 +0000
//
__int64 __fastcall cocos2d::CCTimer::update(__int64 result, float a2)
{
__int64 v2; // x19
float v3; // s1
char v4; // w9
char v5; // w8
float v6; // s0
__int64 v7; // x9
unsigned __int64 v8; // x8
__int64 v9; // x11
_QWORD *v10; // x0
_QWORD *v11; // x0
__int64 v12; // x9
unsigned __int64 v13; // x8
__int64 v14; // x11
_QWORD *v15; // x0
_QWORD *v16; // x0
__int64 v17; // x9
unsigned __int64 v18; // x8
__int64 v19; // x11
_QWORD *v20; // x0
_QWORD *v21; // x0
__int64 v22; // x0
__int64 v23; // x0
v2 = result;
v3 = *(float *)(result + 64);
if ( v3 == -1.0 )
{
*(_DWORD *)(result + 64) = 0;
*(_DWORD *)(result + 72) = 0;
return result;
}
v4 = *(_BYTE *)(result + 68);
v5 = *(_BYTE *)(result + 69);
v6 = v3 + a2;
*(float *)(result + 64) = v6;
if ( (v4 & 1) != 0 )
{
if ( (v5 & 1) == 0 )
{
if ( v6 >= *(float *)(result + 84) )
{
v7 = *(_QWORD *)(result + 56);
if ( v7 )
{
v8 = *(_QWORD *)(result + 88);
v9 = *(_QWORD *)(result + 96);
if ( v9 & 1 | v8 )
{
v10 = (_QWORD *)(v7 + (v9 >> 1));
if ( (v9 & 1) != 0 )
v8 = *(_QWORD *)(*v10 + (unsigned int)v8);
result = ((__int64 (__fastcall *)(_QWORD *))v8)(v10);
}
}
if ( *(_DWORD *)(v2 + 104) )
{
v11 = (_QWORD *)cocos2d::CCScriptEngineManager::sharedManager(result);
result = (*(__int64 (__fastcall **)(_QWORD, _QWORD, _QWORD, float))(*(_QWORD *)*v11 + 104LL))(
*v11,
*(unsigned int *)(v2 + 104),
0,
*(float *)(v2 + 64));
}
*(_DWORD *)(v2 + 64) = 0;
}
return result;
}
}
else if ( (v5 & 1) == 0 )
{
if ( v6 >= *(float *)(result + 84) )
{
v17 = *(_QWORD *)(result + 56);
if ( v17 )
{
v18 = *(_QWORD *)(result + 88);
v19 = *(_QWORD *)(result + 96);
if ( v19 & 1 | v18 )
{
v20 = (_QWORD *)(v17 + (v19 >> 1));
if ( (v19 & 1) != 0 )
v18 = *(_QWORD *)(*v20 + (unsigned int)v18);
result = ((__int64 (__fastcall *)(_QWORD *))v18)(v20);
}
}
if ( *(_DWORD *)(v2 + 104) )
{
v21 = (_QWORD *)cocos2d::CCScriptEngineManager::sharedManager(result);
result = (*(__int64 (__fastcall **)(_QWORD, _QWORD, _QWORD, float))(*(_QWORD *)*v21 + 104LL))(
*v21,
*(unsigned int *)(v2 + 104),
0,
*(float *)(v2 + 64));
}
*(_DWORD *)(v2 + 64) = 0;
++*(_DWORD *)(v2 + 72);
}
goto LABEL_34;
}
if ( v6 >= *(float *)(result + 80) )
{
v12 = *(_QWORD *)(result + 56);
if ( v12 )
{
v13 = *(_QWORD *)(result + 88);
v14 = *(_QWORD *)(result + 96);
if ( v14 & 1 | v13 )
{
v15 = (_QWORD *)(v12 + (v14 >> 1));
if ( (v14 & 1) != 0 )
v13 = *(_QWORD *)(*v15 + (unsigned int)v13);
result = ((__int64 (__fastcall *)(_QWORD *))v13)(v15);
}
}
if ( *(_DWORD *)(v2 + 104) )
{
v16 = (_QWORD *)cocos2d::CCScriptEngineManager::sharedManager(result);
result = (*(__int64 (__fastcall **)(_QWORD, _QWORD, _QWORD, float))(*(_QWORD *)*v16 + 104LL))(
*v16,
*(unsigned int *)(v2 + 104),
0,
*(float *)(v2 + 64));
}
*(float *)(v2 + 64) = *(float *)(v2 + 64) - *(float *)(v2 + 80);
++*(_DWORD *)(v2 + 72);
*(_BYTE *)(v2 + 69) = 0;
}
LABEL_34:
if ( (*(_BYTE *)(v2 + 68) & 1) == 0 && *(_DWORD *)(v2 + 72) > *(_DWORD *)(v2 + 76) )
{
v22 = cocos2d::CCDirector::sharedDirector();
v23 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v22 + 128LL))(v22);
return cocos2d::CCScheduler::unscheduleSelector(
v23,
*(_QWORD *)(v2 + 88),
*(_QWORD *)(v2 + 96),
*(_QWORD *)(v2 + 56));
}
return result;
}