//
// LevelSettingsLayer::textChanged from 0xa3501c to 0xa351b0 (404 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'LevelSettingsLayer::textChanged @ 0xa351b4
// > ??> @ 0x4ed80
// > ??> @ 0x11db6c8
//
// 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
//
void LevelSettingsLayer::textChanged(LevelSettingsLayer *a1, CCTextInputNode *a2)
{
char *v3; // x21
int v4; // w22
char *v5; // x0
char *v6; // x21
int v7; // w22
char *v8; // x0
unsigned int *v9; // x21
int v10; // w1
unsigned int *v11; // x21
int v12; // w1
char *v14; // [xsp+50h] [xbp+50h] BYREF
if ( !a1->m_disableInput )
{
if ( a2->getTag(a2) == 1 )
{
CCTextInputNode::getString(a2, (__int64)&v14);
v6 = v14;
v7 = atoi(v14);
v8 = v6 - 24;
if ( v6 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v9 = (unsigned int *)(v6 - 8);
do
v10 = __ldaxr(v9);
while ( __stlxr(v10 - 1, v9) );
}
else
{
v10 = *((_DWORD *)v6 - 2);
*((_DWORD *)v6 - 2) = v10 - 1;
}
if ( v10 <= 0 )
operator delete(v8);
}
a1->m_settingsObject->m_targetOrder = v7;
}
else if ( a2->getTag(a2) == 2 )
{
CCTextInputNode::getString(a2, (__int64)&v14);
v3 = v14;
v4 = atoi(v14);
v5 = v3 - 24;
if ( v3 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v11 = (unsigned int *)(v3 - 8);
do
v12 = __ldaxr(v11);
while ( __stlxr(v12 - 1, v11) );
}
else
{
v12 = *((_DWORD *)v3 - 2);
*((_DWORD *)v3 - 2) = v12 - 1;
}
if ( v12 <= 0 )
operator delete(v5);
}
a1->m_settingsObject->m_targetChannel = v4;
}
}
}