//
// SetupSmartTemplateLayer::textInputOpened from 0x1004e89d0 to 0x1004e8a52 (130 bytes)
//
// 2 xrefs:
// > sub_1004E8A80 @ 0x1004e8a85
// > ??> @ 0x100956e38
//
// 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 SetupSmartTemplateLayer::textInputOpened(SetupSmartTemplateLayer *a1, CCTextInputNode *a2)
{
double v2; // xmm0_8
int v3; // eax
int v4; // r14d
void *v5[3]; // [rsp+0h] [rbp-40h] BYREF
std::string v6; // [rsp+18h] [rbp-28h] BYREF
v2 = ((double (__fastcall *)(CCTextInputNode *))a2->getTag)(a2);
v4 = v3;
CCTextInputNode::getString(v5, (__int64)a2, v2);
if ( v4 )
goto LABEL_8;
if ( ((__int64)v5[0] & 1) != 0 )
{
if ( v5[1] )
goto LABEL_8;
}
else if ( LOBYTE(v5[0]) >> 1 )
{
goto LABEL_8;
}
*(_WORD *)&v6.__r_.__value_.__l.0 = 8194;
v6.__r_.__value_.__s.__data_[1] = 0;
CCTextInputNode::updateLabel(a2, &v6, v2);
if ( (*(_BYTE *)&v6.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v6.__r_.__value_.__l.__data_);
LABEL_8:
if ( ((__int64)v5[0] & 1) != 0 )
operator delete(v5[2]);
}