//
// cocos2d::CCDirector::showFPSLabel from 0x100477df0 to 0x100477ed6 (230 bytes)
//
// 0 xrefs:
//
// 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 12:30:36 +0000
//
__int64 __fastcall cocos2d::CCDirector::showFPSLabel(__int64 a1, double a2, __m128 a3)
{
__int64 result; // rax
int v4; // ecx
float v5; // xmm0_4
__m128 v6; // xmm0
result = *(_QWORD *)(a1 + 376);
if ( result )
{
v4 = *(_DWORD *)(a1 + 264) + 1;
*(_DWORD *)(a1 + 264) = v4;
v5 = *(float *)(a1 + 168) + *(float *)(a1 + 220);
*(float *)(a1 + 220) = v5;
if ( v5 > 0.1 )
{
a3.f32[0] = (float)v4 / v5;
*(_DWORD *)(a1 + 228) = a3.i32[0];
*(_DWORD *)(a1 + 264) = 0;
*(_DWORD *)(a1 + 220) = 0;
v6 = _mm_or_ps(_mm_and_ps((__m128)xmmword_100A035F0, a3), (__m128)xmmword_100A03600);
v6.f32[0] = v6.f32[0] + a3.f32[0];
snprintf(*(char **)(a1 + 336), 0x10u, "FPS: %i", (int)_mm_round_ss(v6, v6, 11).f32[0]);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 376) + 928LL))(
*(_QWORD *)(a1 + 376),
*(_QWORD *)(a1 + 336));
result = *(_QWORD *)(a1 + 376);
}
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)result + 752LL))(result);
}
return result;
}