//
// cocos2d::extension::CCControlSwitch::setOn_1 from 0x1003922c0 to 0x10039232f (111 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:29:14 +0000
//
__int64 __fastcall cocos2d::extension::CCControlSwitch::setOn_1(__int64 a1, char a2)
{
__int64 v3; // rdi
unsigned __int8 v4; // si
float v5; // xmm1_4
float v6; // xmm0_4
*(_BYTE *)(a1 + 485) = a2;
v3 = *(_QWORD *)(a1 + 472);
v4 = a2 ^ 1;
v5 = *(float *)(v3 + 4LL * v4 + 612);
v6 = *(float *)(v3 + 616);
if ( v6 < v5 )
{
v6 = *(float *)(v3 + 4LL * v4 + 612);
if ( v5 >= *(float *)(v3 + 612) )
v6 = *(float *)(v3 + 612);
}
*(float *)(v3 + 608) = v6;
sub_1003914D0((unsigned __int8 *)v3);
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1320LL))(a1, 256);
}