//
// UIPOptionsLayer::ccTouchBegan from 0xa21c28 to 0xa21d24 (252 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'UIPOptionsLayer::ccTouchBegan @ 0xa21d28
// > ??> @ 0x74308
// > ??> @ 0x1485910
//
// 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 12:59:40 +0000
//
__int64 __fastcall UIPOptionsLayer::ccTouchBegan(__int64 a1, cocos2d::CCTouch *this)
{
long double v5; // q0
__int64 v6; // x0
long double v7; // q0
__int64 v8; // [xsp+50h] [xbp+50h] BYREF
__int64 v9; // [xsp+58h] [xbp+58h] BYREF
__int64 v10; // [xsp+60h] [xbp+60h] BYREF
_BYTE v11[16]; // [xsp+68h] [xbp+68h] BYREF
cocos2d::CCTouch::getLocation(&v8, this);
cocos2d::CCNode::convertToNodeSpace(&v9, (cocos2d::CCNode *)a1, (const cocos2d::CCPoint *)&v8);
if ( (*(_DWORD *)(a1 + 1012) & 0x80000000) != 0 )
{
UIPOptionsLayer::getTouchRect((UIPOptionsLayer *)a1, (cocos2d::CCRect *)v11);
if ( (unsigned __int8)cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v11, (const cocos2d::CCPoint *)&v9) )
{
*(_DWORD *)(a1 + 1012) = *((_DWORD *)this + 14);
*(__n128 *)&v5 = cocos2d::CCPoint::operator=(a1 + 1024, &v9);
v6 = (*(__int64 (__fastcall **)(_QWORD, long double))(**(_QWORD **)(a1 + 1016) + 192LL))(
*(_QWORD *)(a1 + 1016),
v5);
cocos2d::CCPoint::operator-(&v10, &v9, v6, v7);
cocos2d::CCPoint::operator=(a1 + 1032, &v10);
}
}
return 1;
}