//
// -[CCEventDispatcher removeDelegate:fromList:] from 0x10027f940 to 0x10027f9bb (123 bytes)
//
// 1 xrefs:
// > ??> @ 0x100bdbdb8
//
// 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:27:43 +0000
//
void __cdecl -[CCEventDispatcher removeDelegate:fromList:](CCEventDispatcher *self, SEL a2, id a3, _listEntry **a4)
{
_listEntry *v4; // rax
_listEntry *v5; // rbx
_listEntry *var0; // rdi
_listEntry *var1; // rax
v4 = *a4;
while ( v4 )
{
v5 = v4;
v4 = v4->var1;
if ( v5->var2 == a3 )
{
var0 = v5->var0;
if ( !v5->var0 )
sub_1009A6630(0);
if ( var0 == v5 )
{
*a4 = nullptr;
}
else if ( v5 == *a4 )
{
v4->var0 = var0;
*a4 = v4;
}
else
{
var0->var1 = v4;
var1 = v5->var1;
if ( !var1 )
var1 = *a4;
var1->var0 = var0;
}
objc_release(a3);
free(v5);
return;
}
}
}