//
// SecretRewardsLayer::onSwitchPage from 0xb9a240 to 0xb9a298 (88 bytes)
//
// 4 xrefs:
// > ??> @ 0x95bf0
// > SecretRewardsLayer::init @ 0xba0418
// > SecretRewardsLayer::init @ 0xba04bc
// > ??> @ 0x15440c8
//
// 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:02:43 +0000
//
cocos2d::CCArray **__fastcall SecretRewardsLayer::onSwitchPage(SecretRewardsLayer *this, cocos2d::CCObject *a2)
{
__int64 v4; // x2
__int64 v5; // x1
__int64 (__fastcall *v6)(cocos2d::CCObject *); // x2
int v7; // w20
int v8; // w0
int v9; // w1
v4 = *(_QWORD *)a2;
v5 = *((_QWORD *)this + 68);
v6 = *(__int64 (__fastcall **)(cocos2d::CCObject *))(v4 + 64);
if ( !*((_BYTE *)this + 584) )
v5 = *((_QWORD *)this + 69);
v7 = *(_DWORD *)(v5 + 588);
v8 = v6(a2);
v9 = v7 + 1;
if ( v8 != 1 )
v9 = v7 - 1;
return SecretRewardsLayer::goToPage(this, v9);
}