//
// cocos2d::CCTouchDispatcher::touchesBegan from 0x1001ce250 to 0x1001ce324 (212 bytes)
//
// 2 xrefs:
// > sub_1001CE33C @ 0x1001ce340
// > ??> @ 0x1008ef008
//
// 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 11:00:21 +0000
//
double __fastcall cocos2d::CCTouchDispatcher::touchesBegan(__int64 a1, _DWORD *a2, __int64 a3)
{
__int64 v6; // x0
double result; // d0
__int64 v8; // x22
unsigned __int8 v9; // w8
__int64 v10; // [xsp+8h] [xbp-28h] BYREF
++*(_DWORD *)(a1 + 124);
if ( a2 )
{
v6 = sub_100241358(a2);
if ( v6 )
{
v8 = v6;
v9 = atomic_load((unsigned __int8 *)&byte_1009F44F8);
if ( (v9 & 1) == 0 && __cxa_guard_acquire((__guard *)&byte_1009F44F8) )
{
sub_1000262F4(&qword_1009F44F0, &dbl_1009F44C0);
__cxa_guard_release((__guard *)&byte_1009F44F8);
}
cocos2d::CCTouch::getLocation(&v10, v8);
result = sub_10002630C(&qword_1009F44F0, (double *)&v10);
}
}
if ( *(_BYTE *)(a1 + 105) == 1 )
return cocos2d::CCTouchDispatcher::touches(a1, a2, a3, 0);
return result;
}