//
// GJPathSprite::init from 0xa6da4c to 0xa6db70 (292 bytes)
//
// 2 xrefs:
// > GJPathSprite::create @ 0xa6dbc8
// > ??> @ 0xc3db0
//
// 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
//
// local variable allocation has failed, the output may be wrong!
bool GJPathSprite::init(GJPathSprite *a1, int a2)
{
cocos2d::CCString *v4; // x0
char *CString; // x0
bool v6; // w20
char *v7; // x0
unsigned int *v9; // x2
int v10; // w1
char *v11; // [xsp+50h] [xbp+50h] BYREF
v4 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"pathIcon_%02d_001.png",
*(const char **)&a2);
CString = (char *)cocos2d::CCString::getCString(v4);
sub_D153B8((int)&v11, CString);
v6 = cocos2d::CCSprite::initWithSpriteFrameName(a1, v11);
if ( v6 )
a1->m_pathNumber = a2;
v7 = v11 - 24;
if ( v11 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v9 = (unsigned int *)(v11 - 8);
do
v10 = __ldaxr(v9);
while ( __stlxr(v10 - 1, v9) );
}
else
{
v10 = *((_DWORD *)v11 - 2);
*((_DWORD *)v11 - 2) = v10 - 1;
}
if ( v10 <= 0 )
operator delete(v7);
}
return v6;
}