//
// SetupTriggerPopup::goToPage from 0x676af6 to 0x676c34 (318 bytes)
//
// 21 xrefs:
// > SetupSpawnPopup::init @ 0x5eb7e0
// > SetupRotateCommandPopup::init @ 0x610bf0
// > SetupSongTriggerPopup::updateApplyPrepare @ 0x6583f4
// > SetupSongTriggerPopup::init @ 0x658d98
// > SetupOptionsTriggerPopup::init @ 0x675f24
// > SetupTriggerPopup::onPage @ 0x676c6e
// > SetupTriggerPopup::hideAll @ 0x676c76
// > SetupAreaMoveTriggerPopup::init @ 0x690676
// > SetupAreaTransformTriggerPopup::init @ 0x690c74
// > SetupAreaRotateTriggerPopup::init @ 0x6911a6
// > SetupAreaFadeTriggerPopup::init @ 0x6916be
// > SetupAreaTintTriggerPopup::init @ 0x691d9e
// > SetupAreaTriggerPopup::init @ 0x692180
// > SetupAdvFollowPopup::init @ 0x69902c
// > SetupAdvFollowPopup::updateMode @ 0x6996a8
// > SetupKeyframeAnimPopup::init @ 0x6ae094
// > SetupSFXEditPopup::init @ 0x6b124a
// > SetupSFXPopup::init @ 0x6b2258
// > SelectEventLayer::init @ 0x6bb9f8
// > TabbedPopupLayer::showTab @ 0x72dffa
// > AccountBanPopup::init @ 0x764c32
//
// 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:56 +0000
//
int __fastcall SetupTriggerPopup::goToPage(cocos2d::CCArray **this, cocos2d::CCArray *a2, int a3)
{
int result; // r0
bool v7; // cc
unsigned int v9; // r6
cocos2d::CCArray *v10; // r0
unsigned int v11; // r8
int v12; // r11
cocos2d::CCArray *v13; // r9
int *v14; // r10
int v15; // r0
int v16; // r0
int v17; // r0
int v18; // r0
int v19; // r0
cocos2d::CCDictionary *v20; // [sp+8h] [bp-Ch]
cocos2d::CCDictionary *v21; // [sp+8h] [bp-Ch]
int v22; // [sp+Ch] [bp-8h]
result = cocos2d::CCArray::count(*(this + 164));
if ( result )
{
if ( cocos2d::CCArray::count(*(this + 164)) > (int)a2 )
v7 = (int)a2 <= 0;
else
v7 = cocos2d::CCArray::count(*(this + 164)) <= 1;
if ( !v7 )
{
if ( cocos2d::CCArray::count(*(this + 164)) <= (int)a2 )
a2 = (cocos2d::CCArray *)(cocos2d::CCArray::count(*(this + 164)) - 1);
}
else
{
a2 = nullptr;
}
v9 = 0;
*(this + 165) = a2;
*((_BYTE *)this + 700) = a3;
while ( v9 < cocos2d::CCArray::count(*(this + 164)) )
{
v10 = (cocos2d::CCArray *)cocos2d::CCArray::objectAtIndex(*(this + 164), v9);
v11 = 0;
if ( (cocos2d::CCArray *)v9 == a2 )
v12 = a3 ^ 1;
else
v12 = 0;
v13 = v10;
while ( v11 < cocos2d::CCArray::count(v13) )
{
v14 = (int *)cocos2d::CCArray::objectAtIndex(v13, v11);
if ( !cocos2d::CCDictionary::objectForKey(*(this + 172), v14[1]) )
(*(void (__fastcall **)(int *, int))(*v14 + 172))(v14, v12);
v20 = *(this + 144);
v15 = (*(int (__fastcall **)(int *))(*v14 + 32))(v14);
v16 = cocos2d::CCDictionary::objectForKey(v20, v15);
if ( v16 )
{
v22 = v16;
v21 = *(cocos2d::CCDictionary **)(*(_DWORD *)v16 + 500);
v17 = (*(int (__fastcall **)(int))(*(_DWORD *)v16 + 176))(v16);
((void (__fastcall *)(int, int))v21)(v22, v17);
}
++v11;
}
++v9;
}
v18 = (int)*(this + 173);
if ( v18 )
(*(void (__fastcall **)(int, int))(*(_DWORD *)v18 + 172))(v18, a3 ^ 1);
v19 = (int)*(this + 174);
if ( v19 )
(*(void (__fastcall **)(int, int))(*(_DWORD *)v19 + 172))(v19, a3 ^ 1);
SetupTriggerPopup::refreshGroupVisibility(this);
return (*((int (__fastcall **)(cocos2d::CCArray **))*this + 168))(this);
}
return result;
}