//
// SetIDPopup::textChanged from 0x8c4aa0 to 0x8c4ba8 (264 bytes)
//
// 7 xrefs:
// > `non-virtual thunk to'SetIDPopup::textChanged @ 0x8c4bac
// > ??> @ 0x67d58
// > ??> @ 0x119aa18
// > ??> @ 0x119b128
// > ??> @ 0x119b858
// > ??> @ 0x119bf68
// > ??> @ 0x11ef428
//
// 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 SetIDPopup::textChanged(SetIDPopup *a1, CCTextInputNode *a2)
{
char *v3; // x21
int v4; // w0
int m_value; // w1
char *v6; // x0
void (__fastcall *valueChanged)(SetIDPopup *__hidden); // x3
unsigned int *v8; // x21
int v9; // w1
char *v10; // [xsp+40h] [xbp+40h] BYREF
if ( !a1->m_disableDelegate )
{
CCTextInputNode::getString(a2, (__int64)&v10);
v3 = v10;
v4 = atoi(v10);
a1->m_value = v4;
m_value = v4;
v6 = v3 - 24;
if ( v3 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v8 = (unsigned int *)(v3 - 8);
do
v9 = __ldaxr(v8);
while ( __stlxr(v9 - 1, v8) );
}
else
{
v9 = *((_DWORD *)v3 - 2);
*((_DWORD *)v3 - 2) = v9 - 1;
}
if ( v9 <= 0 )
operator delete(v6);
m_value = a1->m_value;
}
if ( m_value > a1->m_maximum )
m_value = a1->m_maximum;
valueChanged = a1->valueChanged;
if ( m_value < a1->m_minimum )
m_value = a1->m_minimum;
a1->m_value = m_value;
valueChanged(a1);
}
}