//
// DS_Dictionary::rectFromString from 0x5fe528 to 0x5fe6cc (420 bytes)
//
// 2 xrefs:
// > DS_Dictionary::getRectForKey @ 0x5fe78e
// > DS_Dictionary::getRectArrayForKey @ 0x5fe8ce
//
// 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
//
bool __fastcall DS_Dictionary::rectFromString(DS_Dictionary *a1, int a2, cocos2d::CCRect *a3)
{
int v4; // r8
int v5; // r7
int v6; // r2
_BOOL4 v7; // r5
int v8; // r0
int v9; // r2
int v10; // r0
int v11; // r5
double v12; // d10
double v13; // d9
double v14; // d8
float v15; // s15
float v16; // s15
float v17; // r1
float v18; // s15
float v19; // r2
float v20; // s15
float v22; // [sp+0h] [bp-4Ch]
int v24; // [sp+10h] [bp-3Ch] BYREF
std::string v25; // [sp+14h] [bp-38h] BYREF
std::string v26; // [sp+18h] [bp-34h] BYREF
std::vector v27; // [sp+1Ch] [bp-30h] BYREF
std::vector v28; // [sp+28h] [bp-24h] BYREF
cocos2d::CCRect v29; // [sp+34h] [bp-18h] BYREF
v4 = 2;
DS_Dictionary::cleanStringWhiteSpace((int)&v24);
v5 = sub_774910(&v24, 123, 0);
v6 = sub_774910(&v24, 125, 0);
while ( 1 )
{
if ( v6 == -1 )
goto LABEL_3;
v8 = sub_774910(&v24, 125, v6 + 1);
v6 = v8;
if ( v4 == 1 )
break;
v4 = 1;
}
if ( v5 == -1
|| v8 == -1
|| (sub_776158(&v29, &v24, v5 + 1, v8 - v5 - 1),
sub_774794(&v24, &v29),
sub_774008(&v29),
v9 = sub_774910(&v24, 125, 0),
v9 == -1)
|| (v10 = sub_774910(&v24, 44, v9), v11 = v10, v10 == -1) )
{
LABEL_3:
v7 = 0;
goto LABEL_15;
}
sub_776158(&v25, &v24, 0, v10);
sub_776158(&v26, &v24, v11 + 1, *(_DWORD *)(v24 - 12) - v11);
memset(&v27, 0, sizeof(v27));
v7 = DS_Dictionary::splitWithForm(a1, &v25, &v27);
if ( v7 )
{
memset(&v28, 0, sizeof(v28));
v7 = DS_Dictionary::splitWithForm(a1, &v26, &v28);
if ( v7 )
{
v12 = atof((const char *)v27.m_start->m_data.m_data);
v13 = atof(*(const char **)((char *)&v27.m_start->m_data.m_data + (unsigned int)byte_4));
v14 = atof((const char *)v28.m_start->m_data.m_data);
v15 = atof((const char *)v28.m_start[1].m_data.m_data);
v22 = v15;
v16 = v12;
v17 = v16;
v18 = v13;
v19 = v18;
v20 = v14;
cocos2d::CCRect::CCRect(&v29, v17, v19, v20, v22);
cocos2d::CCRect::operator=(a3, &v29.origin.x);
}
std::vector::~vector((void **)&v28.m_start);
}
std::vector::~vector((void **)&v27.m_start);
sub_774008(&v26);
sub_774008(&v25);
LABEL_15:
sub_774008(&v24);
return v7;
}