//
// SetupCollisionTriggerPopup::updateItemIDInputLabel from 0x94f96c to 0x94fac4 (344 bytes)
//
// 7 xrefs:
// > SetupCollisionTriggerPopup::onTargetP1 @ 0x94faf0
// > SetupCollisionTriggerPopup::onTargetP2 @ 0x94fb90
// > SetupCollisionTriggerPopup::onTargetPP @ 0x94fd58
// > SetupCollisionTriggerPopup::init @ 0x950684
// > SetupCollisionTriggerPopup::onItemIDArrow @ 0x95101c
// > SetupCollisionTriggerPopup::onItemIDArrow @ 0x95103c
// > ??> @ 0x418e0
//
// 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 SetupCollisionTriggerPopup::updateItemIDInputLabel(SetupCollisionTriggerPopup *a1)
{
const char *m_blockAID; // x1
cocos2d::CCString *v3; // x0
char *CString; // x1
CCTextInputNode *m_blockAInput; // x22
unsigned __int8 *v6; // x0
unsigned int *v7; // x2
int v8; // w1
const unsigned __int8 *v9; // [xsp+40h] [xbp+40h] BYREF
m_blockAID = (const char *)(unsigned int)a1->m_blockAID;
a1->m_disableTextDelegate = 1;
v3 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", m_blockAID);
CString = (char *)cocos2d::CCString::getCString(v3);
if ( a1->m_targetPP )
goto LABEL_6;
if ( a1->m_targetP1 )
{
if ( a1->m_targetP2 )
{
CString = "P";
goto LABEL_7;
}
LABEL_6:
CString = "P1";
goto LABEL_7;
}
if ( a1->m_targetP2 )
CString = "P2";
LABEL_7:
m_blockAInput = a1->m_blockAInput;
sub_D153B8((int)&v9, CString);
CCTextInputNode::setString(m_blockAInput, &v9);
v6 = (unsigned __int8 *)(v9 - 24);
if ( v9 - 24 != (const unsigned __int8 *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v7 = (unsigned int *)(v9 - 8);
do
v8 = __ldaxr(v7);
while ( __stlxr(v8 - 1, v7) );
}
else
{
v8 = *((_DWORD *)v9 - 2);
*((_DWORD *)v9 - 2) = v8 - 1;
}
if ( v8 <= 0 )
operator delete(v6);
}
a1->m_disableTextDelegate = 0;
}