//
// cocos2d::extension::CCControlSwitch::ccTouchBegan from 0x7aa8a8 to 0x7aa930 (136 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'cocos2d::extension::CCControlSwitch::ccTouchBegan @ 0x7aa93c
//
// 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::ccTouchBegan(cocos2d::extension::CCControlSwitchSprite **a1)
{
int v2; // r6
cocos2d::extension::CCControlSwitchSprite *v3; // r3
float v5[2]; // [sp+4h] [bp-10h] BYREF
if ( !(*((int (__fastcall **)(cocos2d::extension::CCControlSwitchSprite **))*a1 + 169))(a1) )
return 0;
if ( !(*((int (__fastcall **)(cocos2d::extension::CCControlSwitchSprite **))*a1 + 159))(a1) )
return 0;
v2 = (*((int (__fastcall **)(cocos2d::extension::CCControlSwitchSprite **))*a1 + 44))(a1);
if ( !v2 )
return 0;
*((_BYTE *)a1 + 364) = 0;
cocos2d::extension::CCControlSwitch::locationFromTouch(
(cocos2d::extension::CCControlSwitch *)v5,
(cocos2d::CCTouch *)a1);
v3 = a1[89];
*((float *)a1 + 90) = v5[0] - *((float *)v3 + 128);
(*(void (__fastcall **)(_DWORD, void *))(**((_DWORD **)v3 + 136) + 480))(*((_DWORD *)v3 + 136), &unk_BF15BC);
cocos2d::extension::CCControlSwitchSprite::needsLayout(a1[89]);
return v2;
}