//
// cocos2d::CCTouchDispatcher::addPrioTargetedDelegate from 0x1004c76a0 to 0x1004c7736 (150 bytes)
//
// 9 xrefs:
// > CCTextInputNode::registerWithTouchDispatcher @ 0x10006d694
// > SliderTouchLogic::registerWithTouchDispatcher @ 0x1002ef3e7
// > cocos2d::extension::CCControlHuePicker::registerWithTouchDispatcher @ 0x100342667
// > cocos2d::extension::CCControlSaturationBrightnessPicker::registerWithTouchDispatcher @ 0x100352067
// > BoomScrollLayer::registerWithTouchDispatcher @ 0x100390334
// > DialogLayer::registerWithTouchDispatcher @ 0x1003b17f7
// > NumberInputLayer::registerWithTouchDispatcher @ 0x10048a297
// > FLAlertLayer::registerWithTouchDispatcher @ 0x100495307
// > TableView::registerWithTouchDispatcher @ 0x1006ff2f4
//
// This function is hookable on this platform (idp: pc, 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:31:08 +0000
//
__int64 __fastcall cocos2d::CCTouchDispatcher::addPrioTargetedDelegate(
__int64 a1,
const void *a2,
unsigned int a3,
unsigned __int8 a4)
{
unsigned int *v6; // rax
int v7; // r15d
_DWORD v9[9]; // [rsp+Ch] [rbp-24h] BYREF
v9[0] = 0;
if ( a2 )
{
v6 = (unsigned int *)__dynamic_cast(
a2,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCTouchDelegate,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode,
-2);
if ( v6 )
{
if ( sub_1004C74E0((__int64 *)a1, v6, v9) )
{
v7 = v9[0];
LABEL_7:
a3 = v7 - 1;
return cocos2d::CCTouchDispatcher::addTargetedDelegate(a1, a2, a3, a4);
}
}
}
if ( *(int *)(a1 + 160) > 0 )
{
v7 = *(_DWORD *)(a1 + 128);
goto LABEL_7;
}
return cocos2d::CCTouchDispatcher::addTargetedDelegate(a1, a2, a3, a4);
}