//
// SetupCollisionTriggerPopup::updateItemIDInputLabel from 0x1003962d0 to 0x100396402 (306 bytes)
//
// 5 xrefs:
// > SetupCollisionTriggerPopup::init @ 0x100395c70
// > SetupCollisionTriggerPopup::onItemIDArrow @ 0x1003960ea
// > SetupCollisionTriggerPopup::onTargetP1 @ 0x10039679e
// > SetupCollisionTriggerPopup::onTargetP2 @ 0x10039685e
// > SetupCollisionTriggerPopup::onTargetPP @ 0x10039691e
//
// 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 __fastcall SetupCollisionTriggerPopup::updateItemIDInputLabel(SetupCollisionTriggerPopup *a1)
{
__m128 v1; // xmm0
cocos2d::CCString *v2; // rax
const char *CString; // rax
const char *v4; // r14
const char *v5; // rcx
CCTextInputNode *m_blockAInput; // r15
size_t v7; // rax
size_t v8; // r12
char *v9; // r13
size_t v10; // r15
char v11; // [rsp+0h] [rbp-50h]
CCTextInputNode *v12; // [rsp+8h] [rbp-48h]
_QWORD __dst[2]; // [rsp+10h] [rbp-40h] BYREF
void *__p; // [rsp+20h] [rbp-30h]
a1->m_disableTextDelegate = 1;
v2 = (cocos2d::CCString *)sub_1007AB580("%i", v11);
CString = cocos2d::CCString::getCString(v2);
if ( a1->m_targetPP )
{
v4 = "P1";
}
else
{
v4 = CString;
if ( a1->m_targetP1 )
{
v5 = "P";
v4 = "P1";
}
else
{
v5 = "P2";
}
if ( a1->m_targetP2 )
v4 = v5;
}
m_blockAInput = a1->m_blockAInput;
v7 = strlen(v4);
if ( v7 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(*(double *)v1.i64);
v8 = v7;
if ( v7 >= 0x17 )
{
v12 = a1->m_blockAInput;
v10 = 26;
if ( (v7 | 7) != 0x17 )
v10 = (v7 | 7) + 1;
v9 = (char *)operator new(v10);
__p = v9;
__dst[0] = v10 + 1;
m_blockAInput = v12;
__dst[1] = v8;
goto LABEL_15;
}
LOBYTE(__dst[0]) = 2 * v7;
v9 = (char *)__dst + 1;
if ( v7 )
LABEL_15:
memmove(v9, v4, v8);
v9[v8] = 0;
CCTextInputNode::setString(m_blockAInput, (__int64)__dst, v1);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
a1->m_disableTextDelegate = 0;
}