//
// cocos2d::extension::CCControlSwitch::ccTouchBegan from 0xd119cc to 0xd11ab8 (236 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'cocos2d::extension::CCControlSwitch::ccTouchBegan @ 0xd11abc
// > ??> @ 0x1013f8
// > ??> @ 0x150d270
//
// 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 13:07:03 +0000
//
__int64 __fastcall cocos2d::extension::CCControlSwitch::ccTouchBegan(__int64 a1, cocos2d::CCTouch *a2)
{
unsigned int v4; // w21
unsigned __int8 v6; // w0
__int64 v7; // x0
__int64 v8; // [xsp+30h] [xbp+30h] BYREF
if ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)a1 + 1352LL))(a1)
&& (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)a1 + 1272LL))(a1)
&& (v6 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 352LL))(a1), (v4 = v6) != 0) )
{
*(_BYTE *)(a1 + 484) = 0;
cocos2d::extension::CCControlSwitch::locationFromTouch((cocos2d::extension::CCControlSwitch *)a1, a2, &v8);
v7 = *(_QWORD *)(a1 + 472);
*(float *)(a1 + 480) = *(float *)&v8 - *(float *)(v7 + 608);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v7 + 656) + 960LL))(*(_QWORD *)(v7 + 656), &unk_11A60B0);
cocos2d::extension::CCControlSwitchSprite::needsLayout(*(cocos2d::extension::CCControlSwitchSprite **)(a1 + 472));
}
else
{
return 0;
}
return v4;
}