//
// cocos2d::CCDictionary::removeObjectForKey from 0x18000b120 to 0x18000b2a8 (392 bytes)
//
// 7 xrefs:
// > cocos2d::CCEGLViewProtocol::getSetOfTouchesEndOrCancel @ 0x18006b811
// > cocos2d::CCTouchDispatcher::unregisterForcePrio @ 0x1800b379f
// > ??> @ 0x180131ccc
// > ??> @ 0x180131ce0
// > ??> @ 0x180131cf0
// > ??> @ 0x1801438a8
// > ??> @ 0x1801adda4
//
// 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
//
void __fastcall cocos2d::CCDictionary::removeObjectForKey(cocos2d::CCDictionary *this, __int64 a2)
{
__int64 v4; // rdx
cocos2d::CCDictElement *m_pElements; // rbx
UT_hash_table *tbl; // rbx
int v7; // edx
unsigned int v8; // r9d
unsigned int v9; // ecx
int v10; // edx
unsigned int v11; // r9d
unsigned int v12; // ecx
int v13; // edx
UT_hash_handle *hh_head; // rdx
std::ptrdiff_t hho; // rcx
__int64 v16; // rdx
if ( this->m_eDictType )
{
v4 = 0;
m_pElements = this->m_pElements;
if ( m_pElements )
{
tbl = m_pElements->hh.tbl;
v7 = (((BYTE1(a2) + ((BYTE2(a2) + (BYTE3(a2) << 8)) << 8)) << 8)
+ (unsigned __int8)a2
- (((BYTE5(a2) + ((BYTE6(a2) + (HIBYTE(a2) << 8)) << 8)) << 8)
+ BYTE4(a2))
+ 17973513)
^ 0x7F76D;
v8 = (v7 << 8)
^ (((BYTE5(a2) + ((BYTE6(a2) + (HIBYTE(a2) << 8)) << 8)) << 8) + BYTE4(a2) - 1640531527 - v7 + 17973513);
v9 = (v8 >> 13) ^ (-17973513 - v8 - v7);
v10 = (v9 >> 12) ^ (v7 - v8 - v9);
v11 = (v10 << 16) ^ (v8 - v10 - v9);
v12 = (v11 >> 5) ^ (v9 - v11 - v10);
v13 = (v12 >> 3) ^ (v10 - v11 - v12);
hh_head = tbl->buckets[(tbl->num_buckets - 1)
& (((unsigned __int64)((v13 << 10) ^ (v11 - v13 - v12)) >> 15)
^ (v12 - ((v13 << 10) ^ (v11 - v13 - v12)) - v13))].hh_head;
if ( hh_head )
{
hho = tbl->hho;
v4 = (__int64)hh_head - hho;
if ( v4 )
{
while ( *(_DWORD *)(v4 + 320) != 8 || **(_QWORD **)(v4 + 312) != a2 )
{
v16 = *(_QWORD *)(v4 + 304);
if ( !v16 )
goto LABEL_10;
v4 = v16 - hho;
if ( !v4 )
{
cocos2d::CCDictionary::removeObjectForElememt(this, nullptr);
return;
}
}
}
}
else
{
LABEL_10:
v4 = 0;
}
}
cocos2d::CCDictionary::removeObjectForElememt(this, (struct cocos2d::CCDictElement *)v4);
}
}