//
// cocos2d::CCSpriteFrameCache::removeSpriteFramesFromTexture from 0x5e96c8 to 0x5e978c (196 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 cocos2d::CCSpriteFrameCache::removeSpriteFramesFromTexture(
cocos2d::CCSpriteFrameCache *a1,
cocos2d::CCTexture2D *a2)
{
cocos2d::CCArray *v4; // r0
cocos2d::CCSpriteFrameCache_vtbl *v5; // r3
cocos2d::CCArray *v6; // r8
bool (__fastcall *isEqual)(cocos2d::CCObject *__hidden, const cocos2d::CCObject *); // r6
int v8; // r5
int v9; // r3
cocos2d::CCObject *v10; // r0
cocos2d::CCObject *v11; // r2
cocos2d::CCSpriteFrame *v12; // [sp+4h] [bp-18h]
cocos2d::CCSpriteFrame *v13; // [sp+4h] [bp-18h]
char *v14; // [sp+Ch] [bp-10h] BYREF
const char *v15; // [sp+10h] [bp-Ch] BYREF
v4 = cocos2d::CCArray::create((cocos2d::CCArray *)a1);
v5 = a1[1].__vftable;
v6 = v4;
if ( v5 )
{
isEqual = v5[1].isEqual;
if ( isEqual )
v8 = *((_DWORD *)isEqual + 68);
else
v8 = 0;
while ( isEqual )
{
sub_776584((int)&v14, (char *)isEqual);
v12 = (cocos2d::CCSpriteFrame *)a1[1].__vftable;
sub_776584((int)&v15, v14);
v13 = (cocos2d::CCSpriteFrame *)cocos2d::CCDictionary::objectForKey((int)v12, &v15);
sub_774008(&v15);
if ( v13 && a2 == cocos2d::CCSpriteFrame::getTexture(v13) )
{
sub_776584((int)&v15, (char *)isEqual);
v10 = cocos2d::CCString::create();
cocos2d::CCArray::addObject(v6, (cocos2d::_ccArray *)v10, v11);
sub_774008(&v15);
}
sub_774008(&v14);
if ( v8 )
v9 = *(_DWORD *)(v8 + 272);
else
v9 = 0;
isEqual = (bool (__fastcall *)(cocos2d::CCObject *__hidden, const cocos2d::CCObject *))v8;
v8 = v9;
}
}
cocos2d::CCDictionary::removeObjectsForKeys((cocos2d::CCDictionary *)a1[1].__vftable, v6);
}