//
// cocos2d::CCTextureCache::removeUnusedTextures from 0x1005eeca0 to 0x1005eedab (267 bytes)
//
// 0 xrefs:
//
// 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::CCTextureCache::removeUnusedTextures(cocos2d::CCTextureCache *a1)
{
cocos2d::CCDictionary *m_pTextures; // rax
cocos2d::CCDictElement *m_pElements; // r15
_QWORD *v3; // rdi
_QWORD *v4; // rax
__int64 v5; // rcx
_QWORD *v6; // rbx
_QWORD *v7; // rcx
cocos2d::CCDictElement *next; // r12
_QWORD *v9; // rax
_QWORD *v10; // r15
_QWORD *v11; // [rsp+8h] [rbp-38h] BYREF
void *__p; // [rsp+10h] [rbp-30h]
__int64 v13; // [rsp+18h] [rbp-28h]
if ( cocos2d::CCDictionary::count(a1->m_pTextures) )
{
v11 = &v11;
__p = &v11;
v13 = 0;
m_pTextures = a1->m_pTextures;
if ( m_pTextures )
{
m_pElements = m_pTextures->m_pElements;
if ( m_pElements )
{
do
{
next = (cocos2d::CCDictElement *)m_pElements->hh.next;
if ( (unsigned int)sub_10048AB20((__int64)m_pElements->m_pObject) == 1 )
{
v9 = operator new(0x18u);
v9[2] = m_pElements;
v9[1] = &v11;
v7 = v11;
*v9 = v11;
v7[1] = v9;
v11 = v9;
++v13;
}
m_pElements = next;
}
while ( next );
v10 = __p;
if ( __p != &v11 )
{
do
{
cocos2d::CCDictionary::removeObjectForElememt(a1->m_pTextures, (cocos2d::CCDictElement *)v10[2]);
v10 = (_QWORD *)v10[1];
}
while ( v10 != &v11 );
}
}
if ( v13 )
{
v3 = __p;
v4 = (_QWORD *)v11[1];
v5 = *(_QWORD *)__p;
*(_QWORD *)(v5 + 8) = v4;
*v4 = v5;
v13 = 0;
if ( v3 != &v11 )
{
do
{
v6 = (_QWORD *)v3[1];
operator delete(v3);
v3 = v6;
}
while ( v6 != &v11 );
}
}
}
}
}