//
// cocos2d::CCTouchDispatcher::forceRemoveDelegate from 0x1800b6890 to 0x1800b6971 (225 bytes)
//
// 5 xrefs:
// > cocos2d::CCTouchDispatcher::removeDelegate @ 0x1800b6d89
// > cocos2d::CCTouchDispatcher::touches @ 0x1800b727f
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c2928
// > ??> @ 0x1801c2934
//
// 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 11:22:21 +0000
//
void __fastcall cocos2d::CCTouchDispatcher::forceRemoveDelegate(
cocos2d::CCTouchDispatcher *this,
struct cocos2d::CCTouchDelegate *a2)
{
__int64 v2; // rax
unsigned int *v5; // rbx
__int64 v6; // rax
cocos2d::CCNotificationObserver **v7; // rbx
cocos2d::CCNotificationObserver **i; // rsi
struct cocos2d::CCObject *v9; // rdi
__int64 v10; // rax
unsigned int *v11; // rbx
__int64 v12; // rax
cocos2d::CCNotificationObserver **v13; // rbx
cocos2d::CCNotificationObserver **j; // rsi
struct cocos2d::CCObject *v15; // rdi
v2 = *((_QWORD *)this + 9);
if ( v2 )
{
v5 = *(unsigned int **)(v2 + 56);
v6 = *v5;
if ( (_DWORD)v6 )
{
v7 = *((cocos2d::CCNotificationObserver ***)v5 + 2);
for ( i = &v7[v6 - 1]; v7 <= i; ++v7 )
{
v9 = *v7;
if ( !*v7 )
break;
if ( cocos2d::CCNotificationObserver::getTarget(*v7) == a2 )
{
cocos2d::CCArray::removeObject(*((cocos2d::CCArray **)this + 9), v9);
break;
}
}
}
}
v10 = *((_QWORD *)this + 8);
if ( v10 )
{
v11 = *(unsigned int **)(v10 + 56);
v12 = *v11;
if ( (_DWORD)v12 )
{
v13 = *((cocos2d::CCNotificationObserver ***)v11 + 2);
for ( j = &v13[v12 - 1]; v13 <= j; ++v13 )
{
v15 = *v13;
if ( !*v13 )
break;
if ( cocos2d::CCNotificationObserver::getTarget(*v13) == a2 )
{
cocos2d::CCArray::removeObject(*((cocos2d::CCArray **)this + 8), v15);
return;
}
}
}
}
}