//
// cocos2d::CCTouchDispatcher::findHandler from 0x1001cdcfc to 0x1001cdd68 (108 bytes)
//
// 1 xrefs:
// > cocos2d::CCTouchDispatcher::removeDelegate @ 0x1001cdca8
//
// 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::findHandler(__int64 a1, __int64 a2, __int64 a3)
{
unsigned int *v3; // x9
__int64 v4; // x8
__int64 *v6; // x21
unsigned __int64 v7; // x22
__int64 v8; // x20
if ( !a2 )
return 0;
v3 = *(unsigned int **)(a2 + 56);
v4 = *v3;
if ( !(_DWORD)v4 )
return 0;
v6 = *((__int64 **)v3 + 2);
v7 = (unsigned __int64)&v6[v4 - 1];
while ( 1 )
{
v8 = *v6;
if ( !*v6 || cocos2d::CCTouchHandler::getDelegate(*v6) == a3 )
break;
if ( (unsigned __int64)++v6 > v7 )
return 0;
}
return v8;
}