//
// cocos2d::CCSpriteFrameCache::addSpriteFrame from 0x18008b640 to 0x18008b6ed (173 bytes)
//
// 4 xrefs:
// > cocos2d::CCAnimationCache::parseVersion1 @ 0x18008dab3
// > cocos2d::CCAnimationCache::parseVersion2 @ 0x18008e138
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bfbc8
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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 11:22:06 +0000
//
// Alternative name is '?addAnimation@CCAnimationCache@cocos2d@@QEAAXPEAVCCAnimation@2@PEBD@Z'
// Alternative name is '?addProgram@CCShaderCache@cocos2d@@QEAAXPEAVCCGLProgram@2@PEBD@Z'
// Hidden C++ exception states: #wind=1
void __fastcall cocos2d::CCSpriteFrameCache::addSpriteFrame(
cocos2d::CCSpriteFrameCache *this,
struct cocos2d::CCSpriteFrame *a2,
char *a3)
{
void *v5; // rcx
void *Block[3]; // [rsp+30h] [rbp-38h] BYREF
unsigned __int64 v7; // [rsp+48h] [rbp-20h]
sub_180005A10(Block, a3);
cocos2d::CCDictionary::setObject(*((_QWORD *)this + 7), a2, (__int64)Block);
if ( v7 > 0xF )
{
v5 = Block[0];
if ( v7 + 1 >= 0x1000 )
{
v5 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v5 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free_0(v5);
}
}