//
// GJAccountSettingsLayer::createToggleButton from 0xa1fbc8 to 0xa1fde0 (536 bytes)
//
// 13 xrefs:
// > GJAccountSettingsLayer::init @ 0xa37b30
// > GJAccountSettingsLayer::init @ 0xa37be0
// > GJAccountSettingsLayer::init @ 0xa37c80
// > GJAccountSettingsLayer::init @ 0xa37f6c
// > GJAccountSettingsLayer::init @ 0xa3800c
// > GJAccountSettingsLayer::init @ 0xa380ac
// > GJAccountSettingsLayer::init @ 0xa383a0
// > GJAccountSettingsLayer::init @ 0xa38444
// > GJAccountSettingsLayer::init @ 0xa384e4
// > GJAccountSettingsLayer::init @ 0xa386d4
// > GJAccountSettingsLayer::init @ 0xa3876c
// > GJAccountSettingsLayer::init @ 0xa38804
// > ??> @ 0x819d0
//
// 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 12:59:39 +0000
//
CCMenuItemToggler *__fastcall GJAccountSettingsLayer::createToggleButton(
__int64 a1,
__int64 a2,
__int64 a3,
__int64 a4,
unsigned __int8 a5,
cocos2d::CCNode *a6,
const cocos2d::CCPoint *a7,
float a8,
float a9)
{
__int64 v16; // x22
const char *v17; // x1
__int64 v18; // x21
CCMenuItemToggler *v19; // x21
cocos2d::CCNode *v20; // x0
void (__fastcall *v21)(CCMenuItemToggler *, __int64 *); // x19
const char *v22; // x2
cocos2d::CCLabelBMFont *v23; // x0
cocos2d::CCLabelBMFont *v24; // x19
void (__fastcall *v25)(cocos2d::CCLabelBMFont *, __int64 *); // x26
__int64 v26; // x0
__int64 (__fastcall *v27)(__int64); // x1
void (__fastcall *v28)(cocos2d::CCLabelBMFont *, __int64 *); // x22
float *v29; // x0
_BYTE v33[8]; // [xsp+88h] [xbp+88h] BYREF
__int64 v34; // [xsp+90h] [xbp+90h] BYREF
v16 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_checkOn_001.png", _stack_chk_guard);
v18 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_checkOff_001.png", v17);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v16 + 160LL))(v16, 0.5);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v18 + 160LL))(v18, 0.5);
v19 = (CCMenuItemToggler *)CCMenuItemToggler::create(v16, v18, a1, a3, a4);
CCMenuItemToggler::toggle(v19, a5);
(*(void (__fastcall **)(cocos2d::CCNode *, CCMenuItemToggler *))(*(_QWORD *)a6 + 456LL))(a6, v19);
v20 = a6;
v21 = *(void (__fastcall **)(CCMenuItemToggler *, __int64 *))(*(_QWORD *)v19 + 184LL);
cocos2d::CCNode::convertToNodeSpace(&v34, v20, a7);
v21(v19, &v34);
CCMenuItemToggler::setSizeMult(v19, 1.5);
v23 = (cocos2d::CCLabelBMFont *)(a2 + 1);
if ( (*(_BYTE *)a2 & 1) != 0 )
v23 = *(cocos2d::CCLabelBMFont **)(a2 + 16);
v24 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(v23, "bigFont.fnt", v22);
(*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v24);
v25 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, __int64 *))(*(_QWORD *)v24 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v34, 0.0, 0.5);
v25(v24, &v34);
v26 = v16;
v27 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v16 + 328LL);
v28 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, __int64 *))(*(_QWORD *)v24 + 184LL);
v29 = (float *)v27(v26);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v33, (float)((float)(*v29 * 0.5) * 0.5) + 4.0, 0.0);
cocos2d::CCPoint::operator+(&v34, a7);
v28(v24, &v34);
cocos2d::CCLabelBMFont::limitLabelWidth(v24, a8, a9, 0.0);
return v19;
}