//
// SetupInstantCountPopup::textChanged from 0x957354 to 0x957564 (528 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'SetupInstantCountPopup::textChanged @ 0x957568
// > ??> @ 0x36870
// > ??> @ 0x11b9218
//
// 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 SetupInstantCountPopup::textChanged(SetupInstantCountPopup *a1, CCTextInputNode *a2)
{
char *v3; // x21
char *v4; // x0
char *v5; // x21
char *v6; // x0
char *v7; // x21
char *v8; // x0
unsigned int *v9; // x21
int v10; // w1
unsigned int *v11; // x21
int v12; // w1
unsigned int *v13; // x21
int v14; // w1
char *v16; // [xsp+50h] [xbp+50h] BYREF
if ( !a1->m_disableTextDelegate )
{
if ( a2->getTag(a2) )
{
if ( a2->getTag(a2) == 1 )
{
CCTextInputNode::getString(a2, (__int64)&v16);
v7 = v16;
a1->m_targetCount = atoi(v16);
v8 = v7 - 24;
if ( v7 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v9 = (unsigned int *)(v7 - 8);
do
v10 = __ldaxr(v9);
while ( __stlxr(v10 - 1, v9) );
}
else
{
v10 = *((_DWORD *)v7 - 2);
*((_DWORD *)v7 - 2) = v10 - 1;
}
if ( v10 <= 0 )
operator delete(v8);
}
SetupInstantCountPopup::updateTargetCount(a1);
}
else
{
CCTextInputNode::getString(a2, (__int64)&v16);
v3 = v16;
a1->m_targetID = atoi(v16);
v4 = v3 - 24;
if ( v3 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v13 = (unsigned int *)(v3 - 8);
do
v14 = __ldaxr(v13);
while ( __stlxr(v14 - 1, v13) );
}
else
{
v14 = *((_DWORD *)v3 - 2);
*((_DWORD *)v3 - 2) = v14 - 1;
}
if ( v14 <= 0 )
operator delete(v4);
}
SetupInstantCountPopup::updateTargetID(a1);
}
}
else
{
CCTextInputNode::getString(a2, (__int64)&v16);
v5 = v16;
a1->m_itemID = atoi(v16);
v6 = v5 - 24;
if ( v5 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v11 = (unsigned int *)(v5 - 8);
do
v12 = __ldaxr(v11);
while ( __stlxr(v12 - 1, v11) );
}
else
{
v12 = *((_DWORD *)v5 - 2);
*((_DWORD *)v5 - 2) = v12 - 1;
}
if ( v12 <= 0 )
operator delete(v6);
}
SetupInstantCountPopup::updateItemID(a1);
SetupTriggerPopup::updateEditorLabel(a1);
}
}
}