//
// cocos2d::extension::CCControlSwitch::ccTouchEnded from 0x7aa9ac to 0x7aaa38 (140 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'cocos2d::extension::CCControlSwitch::ccTouchEnded @ 0x7aaa44
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:00:02 +0000
//
int __fastcall cocos2d::extension::CCControlSwitch::ccTouchEnded(cocos2d::CCTouch *a1)
{
float v2; // s16
float v3; // s15
cocos2d::extension::CCControlSwitch *v4; // r0
int v5; // r1
float v7[2]; // [sp+4h] [bp-10h] BYREF
cocos2d::extension::CCControlSwitch::locationFromTouch((cocos2d::extension::CCControlSwitch *)v7, a1);
(*(void (__fastcall **)(_DWORD, void *))(**(_DWORD **)(*((_DWORD *)a1 + 89) + 544) + 480))(
*(_DWORD *)(*((_DWORD *)a1 + 89) + 544),
&unk_BF15BF);
if ( *((_BYTE *)a1 + 364) )
{
v2 = v7[0];
v3 = *(float *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)a1 + 89) + 164))(*((_DWORD *)a1 + 89));
v4 = a1;
v5 = v2 >= (float)(v3 * 0.5);
}
else
{
v4 = a1;
v5 = *((unsigned __int8 *)a1 + 365) ^ 1;
}
return cocos2d::extension::CCControlSwitch::setOn(v4, v5, 1);
}