//
// cocos2d::CCAnimationCache::animationByName from 0xb13ab0 to 0xb13b7c (204 bytes)
//
// 3 xrefs:
// > SpriteAnimationManager::loadAnimations @ 0x590f80
// > cocos2d::CCSprite::setDisplayFrameWithAnimationName @ 0xb15324
// > ??> @ 0x99930
//
// 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
//
cocos2d::CCAnimation *cocos2d::CCAnimationCache::animationByName(cocos2d::CCAnimationCache *a1, const char *a2)
{
cocos2d::CCAnimationCache_vtbl *v2; // x21
cocos2d::CCAnimation *v3; // x20
char *v4; // x0
unsigned int *v6; // x2
int v7; // w1
const char *v8; // [xsp+40h] [xbp+40h] BYREF
v2 = a1[1].__vftable;
sub_D153B8((int)&v8, (char *)a2);
v3 = (cocos2d::CCAnimation *)cocos2d::CCDictionary::objectForKey((__int64)v2, &v8);
v4 = (char *)(v8 - 24);
if ( v8 - 24 != (const char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v6 = (unsigned int *)(v8 - 8);
do
v7 = __ldaxr(v6);
while ( __stlxr(v7 - 1, v6) );
}
else
{
v7 = *((_DWORD *)v8 - 2);
*((_DWORD *)v8 - 2) = v7 - 1;
}
if ( v7 <= 0 )
operator delete(v4);
}
return v3;
}