//
// cocos2d::extension::CCControl::removeTargetWithActionForControlEvent from 0x7a68b4 to 0x7a6954 (160 bytes)
//
// 1 xrefs:
// > cocos2d::extension::CCControl::removeTargetWithActionForControlEvents @ 0x7a697e
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:59:58 +0000
//
cocos2d::CCObject *__fastcall cocos2d::extension::CCControl::removeTargetWithActionForControlEvent(
cocos2d::CCDictionary **a1,
int a2,
int a3,
int a4,
unsigned int a5)
{
cocos2d::CCObject *result; // r0
cocos2d::CCArray *v9; // r9
_DWORD *v10; // r2
cocos2d::CCObject **v11; // r4
cocos2d::CCObject **v12; // r5
cocos2d::CCObject *v13; // r1
cocos2d::CCObject *v14; // t1
_BOOL4 v15; // r3
int v16; // r3
result = cocos2d::extension::CCControl::dispatchListforControlEvent(a1, a5);
v9 = result;
if ( !a2 && !a3 && (a4 & 1) == 0 )
return (cocos2d::CCObject *)cocos2d::CCArray::removeAllObjects(result);
if ( result )
{
v10 = *((_DWORD **)result + 13);
if ( *v10 )
{
v11 = (cocos2d::CCObject **)v10[3];
v12 = &v11[*v10] + 0x3FFFFFFF;
while ( 1 )
{
if ( v11 > v12 )
return result;
v14 = *v11++;
v13 = v14;
if ( !v14 )
return result;
if ( a2 )
{
v15 = a2 == *((_DWORD *)v13 + 15);
if ( !a3 )
goto LABEL_12;
LABEL_13:
if ( v15 )
goto LABEL_14;
}
else if ( a3 )
{
LABEL_14:
v16 = *((_DWORD *)v13 + 14);
if ( a3 == *((_DWORD *)v13 + 13) && (a4 == v16 || !a3 && ((v16 | a4) & 1) == 0) )
LABEL_20:
result = (cocos2d::CCObject *)cocos2d::CCArray::removeObject(v9, v13, 1);
}
else
{
v15 = 1;
LABEL_12:
if ( (a4 & 1) != 0 )
goto LABEL_13;
if ( v15 )
goto LABEL_20;
}
}
}
}
return result;
}