//
// LevelStatsInfoPopup::updatePage from 0x79b4bc to 0x79b738 (636 bytes)
//
// 3 xrefs:
// > LevelStatsInfoPopup::onNextPage @ 0x79b752
// > LevelStatsInfoPopup::onPrevPage @ 0x79b75c
// > LevelStatsInfoPopup::init @ 0x79c5c0
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:59:49 +0000
//
int __fastcall LevelStatsInfoPopup::updatePage(LevelStatsInfoPopup *this)
{
_BOOL4 v2; // r6
cocos2d::CCDirector *v3; // r0
float *v4; // r7
float v5; // s19
float v6; // s17
int v7; // r11
float v8; // s16
int v9; // r0
const char *v10; // r1
float v11; // s16
int v12; // r10
void (__fastcall *v13)(int, _BYTE *); // r11
void (__fastcall *v14)(float *, _BYTE *); // r10
int v15; // r10
void (__fastcall *v16)(int, _BYTE *); // r11
int v17; // r10
void (__fastcall *v18)(int, _BYTE *); // r11
int v19; // r10
void (__fastcall *v20)(int, _BYTE *); // r11
cocos2d::CCPoint *v22; // [sp+4h] [bp-30h]
cocos2d::CCPoint *v23; // [sp+4h] [bp-30h]
cocos2d::CCPoint *v24; // [sp+4h] [bp-30h]
cocos2d::CCPoint *v25; // [sp+4h] [bp-30h]
float v26; // [sp+Ch] [bp-28h] BYREF
float v27; // [sp+10h] [bp-24h]
float v28; // [sp+14h] [bp-20h] BYREF
float v29; // [sp+18h] [bp-1Ch]
_BYTE v30[8]; // [sp+1Ch] [bp-18h] BYREF
_BYTE v31[8]; // [sp+24h] [bp-10h] BYREF
v2 = *((_DWORD *)this + 139) == 0;
(*(void (__fastcall **)(_DWORD, _BOOL4))(**((_DWORD **)this + 131) + 172))(*((_DWORD *)this + 131), v2);
v3 = (cocos2d::CCDirector *)(*(int (__fastcall **)(_DWORD, bool))(**((_DWORD **)this + 132) + 172))(
*((_DWORD *)this + 132),
!v2);
v4 = *((float **)this + 132);
if ( v2 )
v4 = *((float **)this + 131);
cocos2d::CCDirector::sharedDirector(v3);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v26);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v28, v26 * 0.5, v27 * 0.5);
v5 = v4[87];
if ( (float)(v5 + 120.0) <= (float)(v27 - 30.0) )
v6 = 1.0;
else
v6 = (float)((float)(v27 - 30.0) - 120.0) / v5;
(*(void (__fastcall **)(float *, float))(*(_DWORD *)v4 + 80))(v4, COERCE_FLOAT(LODWORD(v6)));
v7 = *((_DWORD *)this + 137);
v8 = (float)(v5 * v6) + 120.0;
v22 = *(cocos2d::CCPoint **)(*(_DWORD *)v7 + 160);
if ( v8 <= 140.0 )
v8 = 140.0;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v31, *((float *)this + 138), v8);
((void (__fastcall *)(int, _BYTE *))v22)(v7, v31);
(*(void (__fastcall **)(_DWORD, float *))(**((_DWORD **)this + 137) + 92))(*((_DWORD *)this + 137), &v28);
*((float *)this + 128) = v8;
v9 = *((_DWORD *)this + 133);
*((_DWORD *)this + 127) = *((_DWORD *)this + 138);
if ( v2 )
v10 = "Level Stats";
else
v10 = "Level Info";
(*(void (__fastcall **)(int, const char *))(*(_DWORD *)v9 + 464))(v9, v10);
v11 = v8 * 0.5;
v12 = *((_DWORD *)this + 133);
v13 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v12 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v31, v28, (float)(v11 + v29) - 15.0);
v13(v12, v31);
v14 = *(void (__fastcall **)(float *, _BYTE *))(*(_DWORD *)v4 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v31, v28, v29 + 5.0);
v14(v4, v31);
v15 = *((_DWORD *)this + 136);
v16 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v15 + 92);
v23 = *((cocos2d::CCPoint **)this + 111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v30, v28, (float)(v29 - v11) + 30.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v31, v23);
v16(v15, v31);
v17 = *((_DWORD *)this + 134);
v18 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v17 + 92);
v24 = *((cocos2d::CCPoint **)this + 111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v30, (float)(v28 - (float)(*((float *)this + 138) * 0.5)) - 17.0, v29);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v31, v24);
v18(v17, v31);
v19 = *((_DWORD *)this + 135);
v20 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v19 + 92);
v25 = *((cocos2d::CCPoint **)this + 111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v30, (float)(v28 + (float)(*((float *)this + 138) * 0.5)) + 17.0, v29);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v31, v25);
v20(v19, v31);
(*(void (__fastcall **)(_DWORD, bool))(**((_DWORD **)this + 134) + 172))(*((_DWORD *)this + 134), !v2);
return (*(int (__fastcall **)(_DWORD, _BOOL4))(**((_DWORD **)this + 135) + 172))(*((_DWORD *)this + 135), v2);
}