//
// cocos2d::CCSpriteFrameCache::removeUnusedSpriteFrames from 0x180092700 to 0x1800927a7 (167 bytes)
//
// 4 xrefs:
// > ??> @ 0x18013dd1c
// > ??> @ 0x18013dd2c
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b63a8
//
// 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::CCSpriteFrameCache::removeUnusedSpriteFrames(cocos2d::CCSpriteFrameCache *this)
{
__int64 v1; // rdi
char v2; // bp
struct cocos2d::CCDictElement *v4; // rdi
struct cocos2d::CCDictElement *i; // rbx
_QWORD *v6; // rdi
_QWORD *v7; // rbx
v1 = *((_QWORD *)this + 7);
v2 = 0;
if ( v1 )
{
v4 = *(struct cocos2d::CCDictElement **)(v1 + 56);
if ( v4 )
{
for ( i = (struct cocos2d::CCDictElement *)v4->hh.next; ; i = (struct cocos2d::CCDictElement *)i->hh.next )
{
if ( (unsigned int)cocos2d::CCObject::retainCount(v4->m_pObject) == 1 )
{
cocos2d::CCDictionary::removeObjectForElememt(*((cocos2d::CCDictionary **)this + 7), v4);
v2 = 1;
}
v4 = i;
if ( !i )
break;
}
if ( v2 )
{
v6 = *((_QWORD **)this + 9);
v7 = (_QWORD *)*v6;
sub_1800903C0((__int64)v6, (__int64)v6, *(__int64 **)(*v6 + 8LL));
v7[1] = v7;
*v7 = v7;
v7[2] = v7;
v6[1] = 0;
}
}
}
}