//
// DS_Dictionary::vec2FromString from 0xb490b8 to 0xb49280 (456 bytes)
//
// 3 xrefs:
// > DS_Dictionary::getVec2ArrayForKey @ 0xb49310
// > DS_Dictionary::getVec2ArrayForKey @ 0xb49404
// > ??> @ 0x34110
//
// 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::vec2FromString(DS_Dictionary *a1, __int64 a2, cocos2d::CCPoint *a3)
{
_BOOL4 v5; // w19
_BOOL4 v6; // w24
void *v7; // x0
std::string *m_start; // x19
std::string *m_finish; // x20
stl::StringData::Internal *m_data; // x1
__int64 *v11; // x0
unsigned int *v12; // x1
int v13; // w2
double v15; // d8
float v16; // s1
float v17; // s0
float v18; // s0
float v19; // s1
unsigned int *v20; // x1
int v21; // w2
cocos2d::CCPoint v22; // [xsp+58h] [xbp+58h] BYREF
std::vector v23; // [xsp+60h] [xbp+60h] BYREF
memset(&v23, 0, sizeof(v23));
DS_Dictionary::cleanStringWhiteSpace((unsigned __int8 **)&v22);
v5 = DS_Dictionary::splitWithForm(a1, (std::string *const)&v22, &v23);
v6 = v5;
v7 = (void *)(*(_QWORD *)&v22 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v22 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v20 = (unsigned int *)(*(_QWORD *)&v22 - 8LL);
do
v21 = __ldaxr(v20);
while ( __stlxr(v21 - 1, v20) );
}
else
{
v21 = *(_DWORD *)(*(_QWORD *)&v22 - 8LL);
*(_DWORD *)(*(_QWORD *)&v22 - 8LL) = v21 - 1;
}
if ( v21 <= 0 )
operator delete(v7);
}
if ( v5 )
{
v15 = atof((const char *)v23.m_start->m_data.m_data);
v16 = atof((const char *)v23.m_start[1].m_data.m_data);
v17 = v15;
cocos2d::CCPoint::CCPoint(&v22, v17, v16);
cocos2d::CCPoint::operator=(a3, v18, v19, (float *)&v22);
}
m_start = v23.m_start;
m_finish = v23.m_finish;
if ( v23.m_start != v23.m_finish )
{
do
{
while ( 1 )
{
m_data = m_start->m_data.m_data;
v11 = (__int64 *)((char *)m_start->m_data.m_data - 24);
if ( v11 != &qword_124B6B0 )
{
if ( &pthread_create )
{
v12 = (unsigned int *)((char *)m_data - 8);
do
v13 = __ldaxr(v12);
while ( __stlxr(v13 - 1, v12) );
}
else
{
v13 = *((_DWORD *)m_data - 2);
*((_DWORD *)m_data - 2) = v13 - 1;
}
if ( v13 <= 0 )
break;
}
if ( m_finish == ++m_start )
goto LABEL_13;
}
++m_start;
operator delete(v11);
}
while ( m_finish != m_start );
LABEL_13:
m_finish = v23.m_start;
}
if ( m_finish )
operator delete(m_finish);
return v6;
}