//
// MoreOptionsLayer::incrementCountForPage from 0x7c9ba4 to 0x7c9cd0 (300 bytes)
//
// 2 xrefs:
// > MoreOptionsLayer::addToggle @ 0x7ca2cc
// > ??> @ 0x96408
//
// 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
//
void MoreOptionsLayer::incrementCountForPage(MoreOptionsLayer *a1, int a2)
{
int v4; // w0
cocos2d::CCDictionary *m_variables; // x23
cocos2d::CCObject *v6; // x22
char *v7; // x0
void *v8; // x0
unsigned int *v9; // x2
int v10; // w1
__int64 v11; // [xsp+50h] [xbp+50h] BYREF
v4 = MoreOptionsLayer::countForPage(a1, a2);
m_variables = a1->m_variables;
v6 = (cocos2d::CCObject *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)(unsigned int)(v4 + 1));
v7 = (char *)MoreOptionsLayer::pageKey(a1, a2);
sub_D153B8((int)&v11, v7);
cocos2d::CCDictionary::setObject((int)m_variables, v6);
v8 = (void *)(v11 - 24);
if ( (__int64 *)(v11 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v9 = (unsigned int *)(v11 - 8);
do
v10 = __ldaxr(v9);
while ( __stlxr(v10 - 1, v9) );
}
else
{
v10 = *(_DWORD *)(v11 - 8);
*(_DWORD *)(v11 - 8) = v10 - 1;
}
if ( v10 <= 0 )
operator delete(v8);
}
}