//
// cocos2d::CCTextureCache::removeUnusedTextures from 0x8007f4 to 0x8008b6 (194 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:01:19 +0000
//
void __fastcall cocos2d::CCTextureCache::removeUnusedTextures(cocos2d::CCDictionary **this, void *a2, int a3, int a4)
{
int v5; // r3
cocos2d::CCTextureCache **i; // r4
int v7; // r4
int v8; // r5
cocos2d::CCTextureCache *v9; // r0
cocos2d::CCTextureCache *v10; // r3
int v11; // r3
cocos2d::CCTextureCache **v12; // r0
cocos2d::CCTextureCache *v13; // r3
cocos2d::CCTextureCache **v14; // r4
cocos2d::CCTextureCache *v15; // [sp+0h] [bp-10h] BYREF
void *v16; // [sp+4h] [bp-Ch]
int v17; // [sp+8h] [bp-8h]
int v18; // [sp+Ch] [bp-4h]
v15 = (cocos2d::CCTextureCache *)this;
v16 = a2;
v17 = a3;
v18 = a4;
if ( cocos2d::CCDictionary::count(*(this + 13)) )
{
v17 = 0;
v5 = (int)*(this + 13);
v15 = (cocos2d::CCTextureCache *)&v15;
v16 = &v15;
if ( v5 )
{
v7 = *(_DWORD *)(v5 + 52);
if ( v7 )
v8 = *(_DWORD *)(v7 + 272);
else
v8 = 0;
while ( v7 )
{
if ( cocos2d::CCObject::retainCount(*(cocos2d::CCObject **)(v7 + 260)) == 1 )
{
v9 = (cocos2d::CCTextureCache *)operator new(0xCu);
v10 = v15;
*((_DWORD *)v9 + 2) = v7;
*(_DWORD *)v9 = v10;
*((_DWORD *)v9 + 1) = &v15;
*((_DWORD *)v10 + 1) = v9;
v15 = v9;
++v17;
}
if ( v8 )
v11 = *(_DWORD *)(v8 + 272);
else
v11 = 0;
v7 = v8;
v8 = v11;
}
}
for ( i = (cocos2d::CCTextureCache **)v16; i != &v15; i = (cocos2d::CCTextureCache **)i[1] )
cocos2d::CCDictionary::removeObjectForElememt(*(this + 13), i[2]);
if ( v17 )
{
v12 = (cocos2d::CCTextureCache **)v16;
v13 = v15;
*(_DWORD *)(*(_DWORD *)v16 + 4) = *((_DWORD *)v15 + 1);
**((_DWORD **)v13 + 1) = *v12;
v17 = 0;
while ( v12 != &v15 )
{
v14 = (cocos2d::CCTextureCache **)v12[1];
operator delete(v12);
v12 = v14;
}
}
}
}