//
// TextArea::init from 0x59229c to 0x592410 (372 bytes)
//
// 2 xrefs:
// > TextArea::create @ 0x59252c
// > ??> @ 0x4b828
//
// 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 TextArea::init(
__int64 a1,
__int64 a2,
const char *a3,
float a4,
float a5,
float a6,
__int64 a7,
char a8)
{
bool v14; // w0
float v15; // s0
_BOOL4 v16; // w21
size_t v18; // x0
char *v19; // x0
unsigned int *v20; // x2
int v21; // w1
_DWORD *v23; // [xsp+90h] [xbp+90h] BYREF
v14 = cocos2d::CCSprite::init((cocos2d::CCSprite *)a1);
v16 = v14;
if ( v14 )
{
*(float *)(a1 + 608) = a5;
cocos2d::CCPoint::operator=(a1 + 632, v15, a5);
v18 = strlen(a3);
sub_D1798C(a1 + 616, a3, v18);
*(_BYTE *)(a1 + 596) = a8;
*(float *)(a1 + 644) = a4;
*(float *)(a1 + 624) = a6;
sub_D18D28(&v23, a2);
TextArea::setString(a1, (const void **)&v23);
v19 = (char *)(v23 - 6);
if ( v23 - 6 != (_DWORD *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v20 = v23 - 2;
do
v21 = __ldaxr(v20);
while ( __stlxr(v21 - 1, v20) );
}
else
{
v21 = *(v23 - 2);
*(v23 - 2) = v21 - 1;
}
if ( v21 <= 0 )
operator delete(v19);
}
}
return v16;
}