//
// UIOptionsLayer::ccTouchBegan from 0x1002e44d0 to 0x1002e45e8 (280 bytes)
//
// 2 xrefs:
// > sub_1002E45E8 @ 0x1002e45f4
// > ??> @ 0x1007e3158
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
bool __fastcall UIOptionsLayer::ccTouchBegan(UIOptionsLayer *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)
{
bool m_dual; // w22
__int64 v6; // x23
__int64 v7; // x21
int v8; // w0
double v9; // d0
float32x2_t *v10; // x0
__n128 v12; // q0
__n128 v13; // q1
float32x2_t v14; // [xsp+8h] [xbp-48h] BYREF
float32x2_t v15; // [xsp+10h] [xbp-40h] BYREF
cocos2d::CCPoint v16; // [xsp+18h] [xbp-38h] BYREF
cocos2d::CCPoint v17; // 0:kr08_8.8
cocos2d::CCPoint v18; // 0:s0.4,4:s1.4
cocos2d::CCTouch::getLocation(a2);
v17 = cocos2d::CCNode::convertToNodeSpace(a1, &v16);
v12.n128_u32[0] = LODWORD(v17.x);
v13.n128_u32[0] = LODWORD(v17.y);
m_dual = a1->m_dual;
v6 = 118;
while ( 1 )
{
v7 = *((_QWORD *)&a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable
+ v6);
if ( (*(unsigned int (__fastcall **)(__int64, __n128, __n128))(*(_QWORD *)v7 + 336LL))(v7, v12, v13) )
{
v18 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v7, &v16);
if ( GJUINode::touchTest((GJUINode *)v7, v18) )
break;
}
if ( (unsigned int)(v6 - 118) <= 2 )
{
++v6;
if ( m_dual )
continue;
}
return 1;
}
if ( a1->m_dual )
{
v8 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 64LL))(v7);
UIOptionsLayer::toggleUIGroup(a1, v8);
}
*(_DWORD *)(v7 + 352) = a2->m_nId;
v9 = sub_1000229D0((_QWORD *)(v7 + 364), (double *)&v15);
v10 = (float32x2_t *)(*(__int64 (__fastcall **)(__int64, double))(*(_QWORD *)v7 + 192LL))(v7, v9);
sub_1000229F0(&v15, v10, &v14);
sub_1000229D0((_QWORD *)(v7 + 356), (double *)&v14);
return 1;
}