//
// cocos2d::CCDirector::toggleShowFPS from 0xad6914 to 0xad6a44 (304 bytes)
//
// 6 xrefs:
// > LoadingLayer::loadAssets @ 0x5c4960
// > GraphicsReloadLayer::performReload @ 0x7c8048
// > MoreOptionsLayer::onToggle @ 0x7c8f28
// > MoreVideoOptionsLayer::onToggle @ 0x7d0ac8
// > cocos2d::CCDirector::removeStatsLabel @ 0xad77a4
// > ??> @ 0x43c68
//
// 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
//
__int64 __fastcall cocos2d::CCDirector::toggleShowFPS(__int64 a1, unsigned __int8 a2, __int64 a3, float *a4)
{
int v5; // w21
cocos2d::CCObject *v6; // x0
cocos2d::CCLabelBMFont *v8; // x0
cocos2d::CCLabelBMFont_vtbl *v9; // x1
__int64 v10; // x22
void (__fastcall *v11)(__int64, cocos2d::CCPoint *); // x23
cocos2d::CCDirector *v12; // x0
__int64 v13; // x20
void (__fastcall *v14)(__int64, cocos2d::CCPoint *); // x22
float *v15; // [xsp+40h] [xbp+40h]
float *v16; // [xsp+48h] [xbp+48h]
float v17; // [xsp+5Ch] [xbp+5Ch]
cocos2d::CCPoint v18; // [xsp+60h] [xbp+60h] BYREF
v5 = a2;
v6 = *(cocos2d::CCObject **)(a1 + 368);
if ( v6 )
{
v15 = a4;
cocos2d::CCObject::release(v6);
a4 = v15;
*(_QWORD *)(a1 + 368) = 0;
}
*(_BYTE *)(a1 + 360) = v5;
if ( v5 )
{
v16 = a4;
v8 = cocos2d::CCLabelBMFont::create();
v9 = v8->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
*(_QWORD *)(a1 + 368) = v8;
((void (__fastcall *)(float))v9->setScale)(0.5);
v10 = *(_QWORD *)(a1 + 368);
v11 = *(void (__fastcall **)(__int64, cocos2d::CCPoint *))(*(_QWORD *)v10 + 280LL);
cocos2d::CCPoint::CCPoint(&v18, 0.0, 1.0);
v11(v10, &v18);
cocos2d::CCObject::retain(*(cocos2d::CCObject **)(a1 + 368));
v12 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v12);
v13 = *(_QWORD *)(a1 + 368);
v14 = *(void (__fastcall **)(__int64, cocos2d::CCPoint *))(*(_QWORD *)v13 + 184LL);
cocos2d::CCPoint::CCPoint(&v18, *v16 + 1.0, v17 + v16[1]);
v14(v13, &v18);
}
return _stack_chk_guard;
}