//
// cocos2d::CCDictionary::removeAllObjects from 0x18000aae0 to 0x18000ac83 (419 bytes)
//
// 10 xrefs:
// > cocos2d::CCTextureCache::removeAllTextures @ 0x1800060a4
// > cocos2d::CCDictionary::~CCDictionary @ 0x180009793
// > sub_1800097C0 @ 0x18000982c
// > cocos2d::CCLabelBMFont::purgeCachedData @ 0x180048e60
// > cocos2d::CCSpriteFrameCache::removeSpriteFrames @ 0x1800951c1
// > cocos2d::CCSpriteFrameCache::removeSpriteFrames @ 0x1800951ca
// > ??> @ 0x18013abe8
// > ??> @ 0x18013abf8
// > ??> @ 0x18014cf68
// > ??> @ 0x1801b7d44
//
// 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:21:19 +0000
//
void __fastcall cocos2d::CCDictionary::removeAllObjects(cocos2d::CCDictionary *this)
{
__int64 v1; // rdi
__int64 i; // rsi
__int64 v4; // r8
__int64 v5; // r10
__int64 v6; // r9
__int64 v7; // r11
__int64 v8; // r9
__int64 v9; // r8
__int64 v10; // r9
__int64 v11; // rdx
__int64 v12; // r9
_QWORD *v13; // rdx
__int64 v14; // rdx
__int64 v15; // rcx
v1 = *((_QWORD *)this + 7);
if ( v1 )
{
for ( i = *(_QWORD *)(v1 + 288); ; i = *(_QWORD *)(i + 288) )
{
v4 = *(_QWORD *)(v1 + 280);
if ( v4 || *(_QWORD *)(v1 + 288) )
{
v5 = *((_QWORD *)this + 7);
v6 = *(_QWORD *)(v5 + 272);
v7 = *(_QWORD *)(v6 + 32);
if ( v1 == *(_QWORD *)(v6 + 24) - v7 )
{
*(_QWORD *)(v6 + 24) = v4 + v7;
v5 = *((_QWORD *)this + 7);
}
v8 = *(_QWORD *)(v1 + 280);
v9 = *(_QWORD *)(v1 + 288);
if ( v8 )
{
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(v5 + 272) + 32LL) + v8 + 16) = v9;
v9 = *((_QWORD *)this + 7);
}
else
{
*((_QWORD *)this + 7) = v9;
}
v10 = *(_QWORD *)(v1 + 288);
if ( v10 )
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(v9 + 272) + 32LL) + v10 + 8) = *(_QWORD *)(v1 + 280);
v11 = *(_QWORD *)(*((_QWORD *)this + 7) + 272LL);
v12 = *(_DWORD *)(v1 + 324) & (unsigned int)(*(_DWORD *)(v11 + 8) - 1);
--*(_DWORD *)(16 * v12 + *(_QWORD *)v11 + 8);
v13 = *(_QWORD **)(*((_QWORD *)this + 7) + 272LL);
if ( *(_QWORD *)(16 * v12 + *v13) == v1 + 272 )
*(_QWORD *)(*v13 + 16 * v12) = *(_QWORD *)(v1 + 304);
v14 = *(_QWORD *)(v1 + 296);
if ( v14 )
*(_QWORD *)(v14 + 32) = *(_QWORD *)(v1 + 304);
v15 = *(_QWORD *)(v1 + 304);
if ( v15 )
*(_QWORD *)(v15 + 24) = *(_QWORD *)(v1 + 296);
--*(_DWORD *)(*(_QWORD *)(*((_QWORD *)this + 7) + 272LL) + 16LL);
}
else
{
free(**(void ***)(*((_QWORD *)this + 7) + 272LL));
free(*(void **)(*((_QWORD *)this + 7) + 272LL));
*((_QWORD *)this + 7) = 0;
}
cocos2d::CCObject::release(*(cocos2d::CCObject **)(v1 + 264));
j_j_free_0((void *)v1);
v1 = i;
if ( !i )
break;
}
}
}