//
// GJOptionsLayer::layerForPage from 0x4ab22c to 0x4ab2c2 (150 bytes)
//
// 2 xrefs:
// > GJOptionsLayer::addToggleInternal @ 0x4b438a
// > GameOptionsLayer::setupOptions @ 0x4b505c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
cocos2d::CCLayer *GJOptionsLayer::layerForPage(GJOptionsLayer *a1, int a2)
{
cocos2d::CCDictionary *m_values; // r5
char *v5; // r0
cocos2d::CCLayer *v6; // r5
cocos2d::CCDictionary *v7; // r10
char *v8; // r0
std::string v10; // [sp+8h] [bp-8h] BYREF
m_values = a1->m_values;
v5 = (char *)GJOptionsLayer::layerKey(a1, a2);
sub_776584((int)&v10, v5);
v6 = (cocos2d::CCLayer *)cocos2d::CCDictionary::objectForKey(m_values, &v10);
sub_774008(&v10);
if ( !v6 )
{
v6 = cocos2d::CCLayer::create();
a1->m_mainLayer->addChild(a1->m_mainLayer, v6);
v7 = a1->m_values;
v8 = (char *)GJOptionsLayer::layerKey(a1, a2);
sub_776584((int)&v10, v8);
cocos2d::CCDictionary::setObject((int)v7, v6);
sub_774008(&v10);
}
return v6;
}