//
// AccountLayer::createToggleButton from 0x10009b390 to 0x10009b5a0 (528 bytes)
//
// 0 xrefs:
//
// 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 12:20:11 +0000
//
__int64 __fastcall AccountLayer::createToggleButton(
__int64 a1,
__int64 a2,
__int64 a3,
__int64 a4,
unsigned int a5,
__int64 a6,
__int64 a7)
{
__int64 v8; // r15
__int64 v9; // r12
char *v10; // rbx
__int64 v11; // r14
__int64 v12; // r14
float *v13; // rax
float *v14; // rax
double v15; // xmm0_8
_BYTE v17[8]; // [rsp+8h] [rbp-58h] BYREF
__int64 v18; // [rsp+10h] [rbp-50h]
__int64 v19; // [rsp+18h] [rbp-48h]
__int64 v20; // [rsp+20h] [rbp-40h]
_BYTE v21[8]; // [rsp+2Ch] [rbp-34h] BYREF
unsigned int v22; // [rsp+34h] [rbp-2Ch]
v22 = a5;
v19 = a4;
v20 = a3;
v8 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png");
v9 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png");
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v8 + 160LL))(v8, 0.80000001);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v9 + 160LL))(v9, 0.80000001);
v18 = a1;
v10 = CCMenuItemToggler::create(v8, v9, a1, v20, v19);
CCMenuItemToggler::toggle((__int64)v10, v22);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)a6 + 456LL))(a6, v10);
cocos2d::CCNode::convertToNodeSpace(v21, a6, a7);
(*(void (__fastcall **)(char *, _BYTE *))(*(_QWORD *)v10 + 184LL))(v10, v21);
CCMenuItemToggler::setSizeMult((__int64)v10, 1.5);
if ( (*(_BYTE *)a2 & 1) != 0 )
v11 = *(_QWORD *)(a2 + 16);
else
v11 = a2 + 1;
v12 = cocos2d::CCLabelBMFont::create_3(v11, "bigFont.fnt");
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v18 + 576) + 456LL))(*(_QWORD *)(v18 + 576), v12);
sub_100278250(v21, 0.0, 0.5);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v12 + 296LL))(v12, v21);
v13 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 328LL))(v8);
sub_100278250(v17, (float)((float)(0.5 * *v13) * 0.80000001) + 8.0, 0.0);
sub_100278350(v21, a7, v17);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v12 + 184LL))(v12, v21);
if ( *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v12 + 328LL))(v12) > 120.0 )
{
v14 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v12 + 328LL))(v12);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v12 + 160LL))(v12, 120.0 / *v14);
}
v15 = (*(double (__fastcall **)(__int64))(*(_QWORD *)v12 + 168LL))(v12);
if ( *(float *)&v15 <= 0.34999999 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v12 + 168LL))(v12);
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v12 + 160LL))(v12);
}