//
// SetupPulsePopup::updateTextInputLabel from 0x8ee2dc to 0x8ee4d0 (500 bytes)
//
// 4 xrefs:
// > SetupPulsePopup::onSelectTargetMode @ 0x8ee65c
// > SetupPulsePopup::onUpdateCustomColor @ 0x8ee7b0
// > SetupPulsePopup::init @ 0x8f1450
// > ??> @ 0xaa370
//
// 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 SetupPulsePopup::updateTextInputLabel(SetupPulsePopup *a1)
{
const char *m_targetGroupID; // x1
cocos2d::CCString *v3; // x0
char *CString; // x1
CCTextInputNode *m_idInput; // x22
char *v6; // x0
int v7; // w0
CCTextInputNode *v8; // x24
char *v9; // x0
char *v10; // x0
unsigned int *v11; // x1
int v12; // w2
unsigned int *v13; // x21
int v14; // w1
_DWORD *v15; // [xsp+50h] [xbp+50h] BYREF
m_targetGroupID = (const char *)(unsigned int)a1->m_targetGroupID;
a1->m_disableTextDelegate = 1;
v3 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", m_targetGroupID);
CString = (char *)cocos2d::CCString::getCString(v3);
if ( a1->m_targetGroupID > 999 && a1->m_pulseTargetType != 1 )
CString = "0";
m_idInput = a1->m_idInput;
sub_D153B8((int)&v15, CString);
CCTextInputNode::setString(m_idInput, (const unsigned __int8 **)&v15);
v6 = (char *)(v15 - 6);
if ( v15 - 6 != (_DWORD *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v11 = v15 - 2;
do
v12 = __ldaxr(v11);
while ( __stlxr(v12 - 1, v11) );
}
else
{
v12 = *(v15 - 2);
*(v15 - 2) = v12 - 1;
}
if ( v12 <= 0 )
operator delete(v6);
}
v7 = a1->m_targetGroupID;
if ( v7 > 999 && a1->m_pulseTargetType != 1 )
{
v8 = a1->m_idInput;
v9 = (char *)GJSpecialColorSelect::textForColorIdx(v7);
sub_D153B8((int)&v15, v9);
CCTextInputNode::updateLabel(v8, (const void **)&v15);
v10 = (char *)(v15 - 6);
if ( v15 - 6 != (_DWORD *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v13 = v15 - 2;
do
v14 = __ldaxr(v13);
while ( __stlxr(v14 - 1, v13) );
}
else
{
v14 = *(v15 - 2);
*(v15 - 2) = v14 - 1;
}
if ( v14 <= 0 )
operator delete(v10);
}
}
a1->m_disableTextDelegate = 0;
}