//
// LevelStatsInfoPopup::updatePage from 0xcf812c to 0xcf8460 (820 bytes)
//
// 4 xrefs:
// > LevelStatsInfoPopup::onNextPage @ 0xcf8470
// > LevelStatsInfoPopup::onPrevPage @ 0xcf8478
// > LevelStatsInfoPopup::init @ 0xcf9bd8
// > ??> @ 0x85e58
//
// 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:06:49 +0000
//
__int64 __fastcall LevelStatsInfoPopup::updatePage(LevelStatsInfoPopup *this)
{
int v2; // w3
_BOOL4 v3; // w22
_BOOL4 v4; // w24
float *v5; // x25
cocos2d::CCDirector *v6; // x0
float v7; // s9
float v8; // s8
float v9; // s8
__int64 v10; // x26
void (__fastcall *v11)(__int64, __int64 *); // x27
int v12; // w1
__int64 v13; // x0
const char *v14; // x1
__int64 v15; // x26
void (__fastcall *v16)(__int64, __int64 *); // x27
void (__fastcall *v17)(float *, __int64 *); // x26
__int64 v18; // x25
cocos2d::CCNode *v19; // x27
void (__fastcall *v20)(__int64, __int64 *); // x26
__int64 v21; // x25
cocos2d::CCNode *v22; // x27
void (__fastcall *v23)(__int64, __int64 *); // x26
__int64 v24; // x25
cocos2d::CCNode *v25; // x27
void (__fastcall *v26)(__int64, __int64 *); // x26
__int64 v28; // [xsp+78h] [xbp+78h] BYREF
float v29; // [xsp+80h] [xbp+80h] BYREF
float v30; // [xsp+84h] [xbp+84h]
_BYTE v31[8]; // [xsp+88h] [xbp+88h] BYREF
__int64 v32; // [xsp+90h] [xbp+90h] BYREF
v2 = *((_DWORD *)this + 183);
v3 = v2 == 0;
v4 = v2 != 0;
(*(void (__fastcall **)(_QWORD, bool))(**((_QWORD **)this + 84) + 344LL))(*((_QWORD *)this + 84), v2 == 0);
(*(void (__fastcall **)(_QWORD, _BOOL4))(**((_QWORD **)this + 85) + 344LL))(*((_QWORD *)this + 85), v4);
v5 = *((float **)this + 85);
if ( v3 )
v5 = *((float **)this + 84);
v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(*((cocos2d::CCDirector **)this + 84));
cocos2d::CCDirector::getWinSize(&v28, v6);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v29, *(float *)&v28 * 0.5, *((float *)&v28 + 1) * 0.5);
v7 = v5[109];
if ( (float)(*((float *)&v28 + 1) - 30.0) >= (float)(v7 + 120.0) )
v8 = 1.0;
else
v8 = (float)((float)(*((float *)&v28 + 1) - 30.0) - 120.0) / v7;
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v5 + 160LL))(v5, v8);
v9 = (float)(v7 * v8) + 120.0;
if ( v9 <= 140.0 )
v9 = 140.0;
v10 = *((_QWORD *)this + 90);
v11 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v10 + 320LL);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v32, *((float *)this + 182), v9);
v11(v10, &v32);
(*(void (__fastcall **)(_QWORD, float *))(**((_QWORD **)this + 90) + 184LL))(*((_QWORD *)this + 90), &v29);
v12 = *((_DWORD *)this + 182);
v13 = *((_QWORD *)this + 86);
*((float *)this + 163) = v9;
*((_DWORD *)this + 162) = v12;
if ( v3 )
v14 = "Level Stats";
else
v14 = "Level Info";
(*(void (__fastcall **)(__int64, const char *))(*(_QWORD *)v13 + 928LL))(v13, v14);
v15 = *((_QWORD *)this + 86);
v16 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v15 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v32, v29, (float)(v30 + (float)(v9 * 0.5)) - 15.0);
v16(v15, &v32);
v17 = *(void (__fastcall **)(float *, __int64 *))(*(_QWORD *)v5 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v32, v29, v30 + 5.0);
v17(v5, &v32);
v18 = *((_QWORD *)this + 89);
v19 = *((cocos2d::CCNode **)this + 69);
v20 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v18 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v31, v29, (float)(v30 - (float)(v9 * 0.5)) + 30.0);
cocos2d::CCNode::convertToNodeSpace(&v32, v19, (const cocos2d::CCPoint *)v31);
v20(v18, &v32);
v21 = *((_QWORD *)this + 87);
v22 = *((cocos2d::CCNode **)this + 69);
v23 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v21 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v31, (float)(v29 - (float)(*((float *)this + 182) * 0.5)) - 17.0, v30);
cocos2d::CCNode::convertToNodeSpace(&v32, v22, (const cocos2d::CCPoint *)v31);
v23(v21, &v32);
v24 = *((_QWORD *)this + 88);
v25 = *((cocos2d::CCNode **)this + 69);
v26 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v24 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v31, (float)(v29 + (float)(*((float *)this + 182) * 0.5)) + 17.0, v30);
cocos2d::CCNode::convertToNodeSpace(&v32, v25, (const cocos2d::CCPoint *)v31);
v26(v24, &v32);
(*(void (__fastcall **)(_QWORD, _BOOL4))(**((_QWORD **)this + 87) + 344LL))(*((_QWORD *)this + 87), v4);
(*(void (__fastcall **)(_QWORD, _BOOL4))(**((_QWORD **)this + 88) + 344LL))(*((_QWORD *)this + 88), v3);
return _stack_chk_guard;
}