//
// SetupSmartTemplateLayer::textInputClosed from 0x1004e3310 to 0x1004e33cc (188 bytes)
//
// 2 xrefs:
// > sub_1004E3430 @ 0x1004e343c
// > ??> @ 0x100b61f88
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:31:18 +0000
//
void __fastcall SetupSmartTemplateLayer::textInputClosed(__int64 a1, __int64 a2)
{
int v2; // r15d
std::string *v3; // rbx
void *v4[3]; // [rsp+8h] [rbp-68h] BYREF
std::string __str; // [rsp+20h] [rbp-50h] BYREF
__int128 v6; // [rsp+40h] [rbp-30h] BYREF
void *__p; // [rsp+50h] [rbp-20h]
v2 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
CCTextInputNode::getString(v4, a2);
if ( !v2 )
{
CCTextInputNode::getString(&v6, a2);
v3 = *(std::string **)(a1 + 672);
if ( v3 )
{
if ( (v6 & 1) != 0 )
{
sub_10001AD30(&__str, __p, *((unsigned __int64 *)&v6 + 1));
}
else
{
__str.__r_.__value_.__r.__words[2] = (std::string::size_type)__p;
*(_OWORD *)&__str.__r_.__value_.__l.0 = v6;
}
std::string::operator=(v3 + 6, &__str);
if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__str.__r_.__value_.__l.__data_);
}
if ( (v6 & 1) != 0 )
operator delete(__p);
}
if ( ((__int64)v4[0] & 1) != 0 )
operator delete(v4[2]);
}