//
// cocos2d::extension::CCControl::addTargetWithActionForControlEvents from 0xa999a0 to 0xa99b14 (372 bytes)
//
// 11 xrefs:
// > ??> @ 0x6e598
// > ??> @ 0x11f4a90
// > ??> @ 0x11f51f0
// > ??> @ 0x11f59a0
// > ??> @ 0x11f6090
// > ??> @ 0x11f6790
// > ??> @ 0x11f6e90
// > ??> @ 0x11f7bc0
// > ??> @ 0x11f8870
// > ??> @ 0x11f8f50
// > ??> @ 0x11fa800
//
// 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
//
cocos2d::extension::CCControl *__fastcall cocos2d::extension::CCControl::addTargetWithActionForControlEvents(
cocos2d::extension::CCControl *result,
__int64 a2,
__int64 a3,
__int64 a4,
__int16 a5)
{
cocos2d::extension::CCControl *v6; // x23
v6 = result;
if ( (a5 & 1) != 0 )
{
result = (cocos2d::extension::CCControl *)cocos2d::extension::CCControl::addTargetWithActionForControlEvent(
result,
a2,
a3,
a4,
1u);
if ( (a5 & 2) == 0 )
{
LABEL_3:
if ( (a5 & 4) == 0 )
goto LABEL_4;
goto LABEL_21;
}
}
else if ( (a5 & 2) == 0 )
{
goto LABEL_3;
}
result = (cocos2d::extension::CCControl *)cocos2d::extension::CCControl::addTargetWithActionForControlEvent(
v6,
a2,
a3,
a4,
2u);
if ( (a5 & 4) == 0 )
{
LABEL_4:
if ( (a5 & 8) == 0 )
goto LABEL_5;
goto LABEL_19;
}
LABEL_21:
result = (cocos2d::extension::CCControl *)cocos2d::extension::CCControl::addTargetWithActionForControlEvent(
v6,
a2,
a3,
a4,
4u);
if ( (a5 & 8) == 0 )
{
LABEL_5:
if ( (a5 & 0x10) == 0 )
goto LABEL_6;
goto LABEL_17;
}
LABEL_19:
result = (cocos2d::extension::CCControl *)cocos2d::extension::CCControl::addTargetWithActionForControlEvent(
v6,
a2,
a3,
a4,
8u);
if ( (a5 & 0x10) == 0 )
{
LABEL_6:
if ( (a5 & 0x20) == 0 )
goto LABEL_7;
goto LABEL_15;
}
LABEL_17:
result = (cocos2d::extension::CCControl *)cocos2d::extension::CCControl::addTargetWithActionForControlEvent(
v6,
a2,
a3,
a4,
0x10u);
if ( (a5 & 0x20) == 0 )
{
LABEL_7:
if ( (a5 & 0x40) == 0 )
goto LABEL_8;
goto LABEL_13;
}
LABEL_15:
result = (cocos2d::extension::CCControl *)cocos2d::extension::CCControl::addTargetWithActionForControlEvent(
v6,
a2,
a3,
a4,
0x20u);
if ( (a5 & 0x40) == 0 )
{
LABEL_8:
if ( (a5 & 0x80) == 0 )
goto LABEL_9;
goto LABEL_11;
}
LABEL_13:
result = (cocos2d::extension::CCControl *)cocos2d::extension::CCControl::addTargetWithActionForControlEvent(
v6,
a2,
a3,
a4,
0x40u);
if ( (a5 & 0x80) == 0 )
{
LABEL_9:
if ( (a5 & 0x100) == 0 )
return result;
return (cocos2d::extension::CCControl *)cocos2d::extension::CCControl::addTargetWithActionForControlEvent(
v6,
a2,
a3,
a4,
0x100u);
}
LABEL_11:
result = (cocos2d::extension::CCControl *)cocos2d::extension::CCControl::addTargetWithActionForControlEvent(
v6,
a2,
a3,
a4,
0x80u);
if ( (a5 & 0x100) != 0 )
return (cocos2d::extension::CCControl *)cocos2d::extension::CCControl::addTargetWithActionForControlEvent(
v6,
a2,
a3,
a4,
0x100u);
return result;
}