//
// SetupRandTriggerPopup::textChanged from 0x96dc6c to 0x96ded0 (612 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'SetupRandTriggerPopup::textChanged @ 0x96ded4
// > ??> @ 0xbacd8
// > ??> @ 0x11bff78
//
// 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 SetupRandTriggerPopup::textChanged(SetupRandTriggerPopup *a1, CCTextInputNode *a2)
{
float v3; // s0
char *v4; // x0
const char *v5; // x1
cocos2d::CCString *v6; // x0
char *v7; // x21
char *v8; // x0
char *v9; // x21
char *v10; // x0
unsigned int *v11; // x21
int v12; // w1
unsigned int *v13; // x21
int v14; // w1
unsigned int *v15; // x2
float v17; // [xsp+30h] [xbp+30h]
char *v18; // [xsp+50h] [xbp+50h] BYREF
if ( !a1->m_disableTextDelegate )
{
if ( a2->getTag(a2) == 3 )
{
CCTextInputNode::getString(a2, (__int64)&v18);
v7 = v18;
a1->m_groupID1 = atoi(v18);
v8 = v7 - 24;
if ( v7 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v11 = (unsigned int *)(v7 - 8);
do
v12 = __ldaxr(v11);
while ( __stlxr(v12 - 1, v11) );
}
else
{
v12 = *((_DWORD *)v7 - 2);
*((_DWORD *)v7 - 2) = v12 - 1;
}
if ( v12 <= 0 )
operator delete(v8);
}
SetupRandTriggerPopup::updateTargetID(a1);
SetupTriggerPopup::updateEditorLabel(a1);
}
else if ( a2->getTag(a2) == 5 )
{
CCTextInputNode::getString(a2, (__int64)&v18);
v9 = v18;
a1->m_groupID2 = atoi(v18);
v10 = v9 - 24;
if ( v9 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v13 = (unsigned int *)(v9 - 8);
do
v14 = __ldaxr(v13);
while ( __stlxr(v14 - 1, v13) );
}
else
{
v14 = *((_DWORD *)v9 - 2);
*((_DWORD *)v9 - 2) = v14 - 1;
}
if ( v14 <= 0 )
operator delete(v10);
}
SetupRandTriggerPopup::updateTargetID2(a1);
SetupTriggerPopup::updateEditorLabel(a1);
}
else if ( a2->getTag(a2) == 4 )
{
CCTextInputNode::getString(a2, (__int64)&v18);
v3 = atof(v18);
v4 = v18 - 24;
v5 = (const char *)&qword_124B6B0;
if ( v18 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v15 = (unsigned int *)(v18 - 8);
do
v5 = (const char *)__ldaxr(v15);
while ( __stlxr((_DWORD)v5 - 1, v15) );
}
else
{
v5 = (const char *)*((unsigned int *)v18 - 2);
*((_DWORD *)v18 - 2) = (_DWORD)v5 - 1;
}
if ( (int)v5 <= 0 )
{
v17 = v3;
operator delete(v4);
v3 = v17;
}
}
v6 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%.04f", v5, v3);
a1->m_chancePercent = cocos2d::CCString::floatValue(v6);
SetupRandTriggerPopup::updateChance(a1);
}
}
}