//
// EditLevelLayer::textChanged from 0x100111b30 to 0x100111c58 (296 bytes)
//
// 2 xrefs:
// > sub_100111CA4 @ 0x100111ca8
// > ??> @ 0x1008d0158
//
// This function is hookable on this platform (idp: arm, 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 10:59:08 +0000
//
void __fastcall EditLevelLayer::textChanged(__int64 a1, __int64 a2)
{
int v4; // w0
_QWORD *String; // x0
__int64 v6; // x0
int v7; // w8
std::string *v8; // x0
__int64 v9; // x20
std::string *v10; // x1
void *v11; // x0
std::string __str; // [xsp+8h] [xbp-68h] BYREF
void *__p[2]; // [xsp+20h] [xbp-50h] BYREF
__int64 v14; // [xsp+30h] [xbp-40h]
std::string v15; // [xsp+38h] [xbp-38h] BYREF
v4 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
if ( v4 == 1 )
{
v9 = *(_QWORD *)(a1 + 472);
CCTextInputNode::getString(&v15);
if ( (v15.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v10 = &v15;
else
v10 = (std::string *)v15.__r_.__value_.__r.__words[0];
sub_100009900(&__str, (char *)v10);
std::string::operator=((std::string *)(v9 + 344), &__str);
if ( (SHIBYTE(__str.__r_.__value_.__r.__words[2]) & 0x80000000) == 0 )
goto LABEL_16;
v11 = (void *)__str.__r_.__value_.__r.__words[0];
}
else
{
if ( v4 != 2 )
return;
String = CCTextInputNode::getString(&v15);
v6 = EmoteSprite::maxEmotesComment(String);
v7 = EmoteSprite::effectiveLength(&v15, v6);
v8 = (std::string *)(a1 + 560);
if ( v7 < 181 )
{
std::string::operator=(v8, &v15);
goto LABEL_16;
}
if ( *(char *)(a1 + 583) < 0 )
{
sub_1000097D0(__p, *(void **)(a1 + 560), *(_QWORD *)(a1 + 568));
}
else
{
*(_OWORD *)__p = *(_OWORD *)&v8->__r_.__value_.__l.__data_;
v14 = *(_QWORD *)(a1 + 576);
}
CCTextInputNode::setString(a2, __p);
if ( (SHIBYTE(v14) & 0x80000000) == 0 )
goto LABEL_16;
v11 = __p[0];
}
operator delete(v11);
LABEL_16:
if ( SHIBYTE(v15.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v15.__r_.__value_.__l.__data_);
}