//
// cocos2d::CCBMFontConfiguration::parseInfoArguments from 0xae3338 to 0xae3480 (328 bytes)
//
// 2 xrefs:
// > cocos2d::CCBMFontConfiguration::parseConfigFile @ 0xae4fe4
// > ??> @ 0x90528
//
// 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
//
__int64 __fastcall cocos2d::CCBMFontConfiguration::parseInfoArguments(__int64 a1, _QWORD *a2)
{
int v4; // w19
long double v5; // q0
__int64 v6; // x3
char *v7; // x0
unsigned int *v9; // x2
int v10; // w1
char *s; // [xsp+50h] [xbp+50h] BYREF
v4 = sub_D1641C((int)a2, "padding=");
v6 = (int)(sub_D16674(a2, 32, v4, v5) - v4);
if ( (unsigned __int64)v4 > *(_QWORD *)(*a2 - 24LL) )
sub_D13C5C(
"%s: __pos (which is %zu) > this->size() (which is %zu)",
"basic_string::substr",
v4,
*(_QWORD *)(*a2 - 24LL));
sub_D14F84(&s, a2, v4, v6);
sscanf(s, "padding=%d,%d,%d,%d", a1 + 72, a1 + 76, a1 + 80, a1 + 68);
v7 = s - 24;
if ( s - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v9 = (unsigned int *)(s - 8);
do
v10 = __ldaxr(v9);
while ( __stlxr(v10 - 1, v9) );
}
else
{
v10 = *((_DWORD *)s - 2);
*((_DWORD *)s - 2) = v10 - 1;
}
if ( v10 <= 0 )
operator delete(v7);
}
return _stack_chk_guard;
}