//
// cocos2d::CCTouchDispatcher::addPrioTargetedDelegate from 0x1001cd878 to 0x1001cd8ec (116 bytes)
//
// 9 xrefs:
// > DialogLayer::registerWithTouchDispatcher @ 0x100090908
// > NumberInputLayer::registerWithTouchDispatcher @ 0x10011e230
// > BoomScrollLayer::registerWithTouchDispatcher @ 0x100155e90
// > CCTextInputNode::registerWithTouchDispatcher @ 0x1001ffc9c
// > cocos2d::extension::CCControlHuePicker::registerWithTouchDispatcher @ 0x100244b7c
// > cocos2d::extension::CCControlSaturationBrightnessPicker::registerWithTouchDispatcher @ 0x100253e10
// > FLAlertLayer::registerWithTouchDispatcher @ 0x10034bda8
// > SliderTouchLogic::registerWithTouchDispatcher @ 0x10038a660
// > TableView::registerWithTouchDispatcher @ 0x10039be9c
//
// 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
//
__int64 __fastcall cocos2d::CCTouchDispatcher::addPrioTargetedDelegate(__int64 a1, void *a2, __int64 a3, __int64 a4)
{
int v8; // w8
int v10; // [xsp+Ch] [xbp-24h] BYREF
v10 = 0;
if ( (unsigned int)sub_1001CD804((_QWORD *)a1, a2, &v10) )
{
v8 = v10;
LABEL_5:
a3 = (unsigned int)(v8 - 1);
return cocos2d::CCTouchDispatcher::addTargetedDelegate(a1, a2, a3, a4);
}
if ( *(int *)(a1 + 160) >= 1 )
{
v8 = *(_DWORD *)(a1 + 128);
goto LABEL_5;
}
return cocos2d::CCTouchDispatcher::addTargetedDelegate(a1, a2, a3, a4);
}