//
// cocos2d::CCSizeFromString from 0xad1e48 to 0xad202c (484 bytes)
//
// 4 xrefs:
// > cocos2d::CCSpriteFrameCache::addSpriteFramesWithDictionary @ 0xb19e4c
// > cocos2d::CCSpriteFrameCache::addSpriteFramesWithDictionary @ 0xb19f34
// > cocos2d::CCSpriteFrameCache::addSpriteFramesWithDictionary @ 0xb19fcc
// > ??> @ 0xaf500
//
// 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::CCSize cocos2d::CCSizeFromString(const char *a1)
{
cocos2d::CCSize *v1; // x8
cocos2d::CCSize *v3; // x22
double v6; // d8
float v7; // s1
float v8; // s0
const char **v9; // x19
__int64 *v10; // x23
const char *v11; // x1
char *v12; // x0
unsigned int *v13; // x1
int v14; // w2
const char **v15; // x19
const char *v16; // x1
char *v17; // x0
unsigned int *v18; // x1
int v19; // w2
cocos2d::CCSize v20; // [xsp+58h] [xbp+58h] BYREF
const char **v21; // [xsp+60h] [xbp+60h] BYREF
void *p; // [xsp+68h] [xbp+68h]
__int64 v23; // [xsp+70h] [xbp+70h]
cocos2d::CCSize result; // 0:s0.4,4:s1.4
v3 = v1;
cocos2d::CCSize::CCSize(v1, &stru_1245068);
v21 = nullptr;
p = nullptr;
v23 = 0;
if ( (unsigned __int8)sub_AD18EC((char *)a1, (__int64 **)&v21) )
{
v6 = atof(*v21);
v7 = atof(v21[1]);
v8 = v6;
cocos2d::CCSize::CCSize(&v20, v8, v7);
cocos2d::CCSize::operator=(v3, (float *)&v20);
v9 = v21;
v10 = (__int64 *)p;
if ( v21 == p )
goto LABEL_12;
do
{
v11 = *v9;
v12 = (char *)(*v9 - 24);
if ( v12 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v13 = (unsigned int *)(v11 - 8);
do
v14 = __ldaxr(v13);
while ( __stlxr(v14 - 1, v13) );
}
else
{
v14 = *((_DWORD *)v11 - 2);
*((_DWORD *)v11 - 2) = v14 - 1;
}
if ( v14 <= 0 )
operator delete(v12);
}
++v9;
}
while ( v10 != (__int64 *)v9 );
goto LABEL_11;
}
v15 = v21;
v10 = (__int64 *)p;
if ( v21 != p )
{
do
{
v16 = *v15;
v17 = (char *)(*v15 - 24);
if ( v17 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v18 = (unsigned int *)(v16 - 8);
do
v19 = __ldaxr(v18);
while ( __stlxr(v19 - 1, v18) );
}
else
{
v19 = *((_DWORD *)v16 - 2);
*((_DWORD *)v16 - 2) = v19 - 1;
}
if ( v19 <= 0 )
operator delete(v17);
}
++v15;
}
while ( v10 != (__int64 *)v15 );
LABEL_11:
v10 = (__int64 *)v21;
}
LABEL_12:
if ( v10 )
operator delete(v10);
return result;
}