//
// SetupSmartTemplateLayer::textInputOpened from 0x1000799bc to 0x100079abc (256 bytes)
//
// 2 xrefs:
// > j_SetupSmartTemplateLayer::textInputOpened @ 0x100079af4
// > ??> @ 0x1008c5140
//
// 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:58:14 +0000
//
void __fastcall SetupSmartTemplateLayer::textInputOpened(__int64 a1, __int64 a2)
{
int v3; // w20
__int64 v4; // x22
size_t v5; // x8
void *v6; // x20
size_t v7; // x9
void **v8; // x0
_QWORD *v9; // x1
size_t v10; // x2
_BOOL4 v11; // w21
void *__p[2]; // [xsp+8h] [xbp-68h] BYREF
char v13; // [xsp+1Fh] [xbp-51h]
_QWORD v14[2]; // [xsp+20h] [xbp-50h] BYREF
char v15; // [xsp+37h] [xbp-39h]
void *v16[2]; // [xsp+38h] [xbp-38h] BYREF
unsigned __int8 v17; // [xsp+4Fh] [xbp-21h]
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
CCTextInputNode::getString(v16);
if ( v3 )
goto LABEL_19;
sub_100009900(v14, "");
v4 = v15;
v6 = (void *)v14[0];
v5 = v14[1];
v7 = v17;
if ( (v17 & 0x80u) == 0 )
{
v8 = v16;
}
else
{
v7 = (size_t)v16[1];
v8 = (void **)v16[0];
}
if ( v15 < 0 )
{
v9 = (_QWORD *)v14[0];
}
else
{
v5 = v15;
v9 = v14;
}
if ( v5 >= v7 )
v10 = v7;
else
v10 = v5;
v11 = v5 == v7;
if ( memcmp(v8, v9, v10) )
v11 = 0;
if ( v4 < 0 )
{
operator delete(v6);
if ( !v11 )
goto LABEL_19;
}
else if ( !v11 )
{
goto LABEL_19;
}
sub_100009900(__p, " ");
CCTextInputNode::updateLabel(a2, __p);
if ( v13 < 0 )
operator delete(__p[0]);
LABEL_19:
if ( (char)v17 < 0 )
operator delete(v16[0]);
}