//
// CommunityCreditsPage::goToPage from 0x637754 to 0x6377f8 (164 bytes)
//
// 2 xrefs:
// > CommunityCreditsPage::onSwitchPage @ 0x637818
// > CommunityCreditsPage::init @ 0x638f60
//
// 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:55:21 +0000
//
int __fastcall CommunityCreditsPage::goToPage(cocos2d::CCDictionary **this, cocos2d::CCDictionary *a2)
{
int result; // r0
int v5; // r8
int v6; // r9
int v7; // r0
_DWORD *v8; // r2
int *v9; // r7
int *v10; // r4
int v11; // r0
int v12; // t1
result = cocos2d::CCDictionary::count(*(this + 130));
v5 = result;
if ( (int)a2 >= 0 && result > (int)a2 && a2 != *(this + 133) )
{
v6 = 0;
*(this + 133) = a2;
do
{
v7 = cocos2d::CCDictionary::objectForKey(*(this + 130), v6);
if ( v7 )
{
v8 = *(_DWORD **)(v7 + 52);
if ( *v8 )
{
v9 = (int *)v8[3];
v10 = &v9[*v8 - 1];
while ( v9 <= v10 )
{
v12 = *v9++;
v11 = v12;
if ( !v12 )
break;
(*(void (__fastcall **)(int, bool))(*(_DWORD *)v11 + 172))(v11, v6 == (_DWORD)a2);
}
}
}
++v6;
}
while ( v6 < v5 );
(*(void (__fastcall **)(_DWORD, bool))(*(_DWORD *)*(this + 131) + 172))(*(this + 131), (int)a2 > 0);
return (*(int (__fastcall **)(_DWORD, bool))(*(_DWORD *)*(this + 132) + 172))(*(this + 132), (int)a2 < v5 - 1);
}
return result;
}