//
// SetupSmartTemplateLayer::textInputClosed from 0xb17c74 to 0xb17df0 (380 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'SetupSmartTemplateLayer::textInputClosed @ 0xb17df4
// > ??> @ 0x84718
// > ??> @ 0x14b2990
//
// 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::textInputClosed(SetupSmartTemplateLayer *this, CCTextInputNode *a2)
{
int v4; // w21
__int64 v6; // x20
char *v7; // x1
size_t v8; // x2
__int64 v9[3]; // [xsp+40h] [xbp+40h] BYREF
__int64 v10; // [xsp+58h] [xbp+58h] BYREF
size_t v11; // [xsp+60h] [xbp+60h]
void *v12; // [xsp+68h] [xbp+68h]
__int64 v13; // [xsp+70h] [xbp+70h] BYREF
size_t v14; // [xsp+78h] [xbp+78h]
void *v15; // [xsp+80h] [xbp+80h]
v4 = (*(__int64 (__fastcall **)(CCTextInputNode *))(*(_QWORD *)a2 + 64LL))(a2);
CCTextInputNode::getString(a2, v9);
if ( !v4 )
{
CCTextInputNode::getString(a2, &v10);
v6 = *((_QWORD *)this + 84);
if ( v6 )
{
v13 = 0;
v14 = 0;
v15 = nullptr;
if ( (v10 & 1) != 0 )
{
std::string::__init(&v13, v12, v11);
}
else
{
v15 = v12;
v13 = v10;
v14 = v11;
}
if ( (__int64 *)(v6 + 144) != &v13 )
{
if ( (v13 & 1) != 0 )
{
v7 = (char *)v15;
v8 = v14;
}
else
{
v8 = (unsigned __int8)v13 >> 1;
v7 = (char *)&v13 + 1;
}
std::string::assign((__int64 *)(v6 + 144), v7, v8);
}
if ( (v13 & 1) != 0 )
operator delete(v15);
}
if ( (v10 & 1) != 0 )
operator delete(v12);
}
if ( (v9[0] & 1) != 0 )
operator delete((void *)v9[2]);
return _stack_chk_guard;
}