//
// SetupSmartTemplateLayer::textInputOpened from 0xb17418 to 0xb175f0 (472 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'SetupSmartTemplateLayer::textInputOpened @ 0xb175f4
// > ??> @ 0xdbf40
// > ??> @ 0x14b2988
//
// 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 13:01:32 +0000
//
__int64 __fastcall SetupSmartTemplateLayer::textInputOpened(SetupSmartTemplateLayer *this, CCTextInputNode *a2)
{
int v3; // w22
unsigned __int64 v5; // x23
int v6; // w25
size_t v7; // x22
char *v8; // x0
char *v9; // x1
size_t v10; // x2
__int64 v11[2]; // [xsp+50h] [xbp+50h] BYREF
void *v12; // [xsp+60h] [xbp+60h]
__int64 v13; // [xsp+68h] [xbp+68h] BYREF
size_t v14; // [xsp+70h] [xbp+70h]
void *v15; // [xsp+78h] [xbp+78h]
__int64 v16[2]; // [xsp+80h] [xbp+80h] BYREF
void *v17; // [xsp+90h] [xbp+90h]
v3 = (*(__int64 (__fastcall **)(CCTextInputNode *))(*(_QWORD *)a2 + 64LL))(a2);
CCTextInputNode::getString(a2, v11);
if ( v3 )
goto LABEL_2;
v13 = 0;
v14 = 0;
v15 = nullptr;
std::string::__init(&v13, &byte_11B8890, 0);
if ( (v11[0] & 1) != 0 )
{
v5 = v11[1];
v6 = v13 & 1;
if ( (v13 & 1) != 0 )
{
v7 = v14;
v8 = (char *)v12;
LABEL_18:
v9 = (char *)v15;
if ( v7 > v5 )
v10 = v5;
else
v10 = v7;
v6 = 1;
if ( !v10 )
goto LABEL_22;
LABEL_14:
if ( memcmp(v8, v9, v10) )
goto LABEL_15;
goto LABEL_22;
}
v8 = (char *)v12;
v7 = (unsigned __int8)v13 >> 1;
v9 = (char *)&v13 + 1;
}
else
{
v5 = LOBYTE(v11[0]) >> 1;
v6 = v13 & 1;
if ( (v13 & 1) != 0 )
{
v7 = v14;
v8 = (char *)v11 + 1;
goto LABEL_18;
}
v7 = (unsigned __int8)v13 >> 1;
v8 = (char *)v11 + 1;
v9 = (char *)&v13 + 1;
}
if ( v7 > v5 )
v10 = v5;
else
v10 = v7;
if ( v10 )
goto LABEL_14;
LABEL_22:
if ( v5 >= v7 && v5 <= v7 )
{
if ( v6 )
operator delete(v15);
v16[0] = 0;
v16[1] = 0;
v17 = nullptr;
std::string::__init(v16, &byte_11E1A70, 1u);
CCTextInputNode::updateLabel((__int64)a2, (__int64)v16);
if ( (v16[0] & 1) != 0 )
operator delete(v17);
goto LABEL_2;
}
LABEL_15:
if ( v6 )
operator delete(v15);
LABEL_2:
if ( (v11[0] & 1) != 0 )
operator delete(v12);
return _stack_chk_guard;
}