//
// GameSettingsLayer::onButtonsPerRow from 0x1402c6600 to 0x1402c6685 (133 bytes)
//
// 3 xrefs:
// > GameSettingsLayer::addSpecialContent @ 0x1402c5ffa
// > GameSettingsLayer::addSpecialContent @ 0x1402c6102
// > ??> @ 0x14091dbb8
//
// This function is hookable on this platform (idp: pc, 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 11:29:22 +0000
//
__int64 __fastcall GameSettingsLayer::onButtonsPerRow(__int64 a1, __int64 a2)
{
int v3; // eax
int v4; // edx
int v5; // edx
__int64 v6; // rdi
__int64 (__fastcall **v7)(__int64, const char *); // rbx
cocos2d::CCString *v8; // rax
const char *CString; // rax
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);
v4 = 1;
if ( v3 != 1 )
v4 = -1;
v5 = *(_DWORD *)(a1 + 1156) + v4;
if ( v5 < 6 )
{
v5 = 6;
}
else if ( v5 >= 12 )
{
v5 = 12;
}
v6 = *(_QWORD *)(a1 + 1168);
*(_DWORD *)(a1 + 1156) = v5;
v7 = *(__int64 (__fastcall ***)(__int64, const char *))(v6 + 360);
v8 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8);
CString = cocos2d::CCString::getCString(v8);
return (*v7)(v6 + 360, CString);
}