//
// CustomizeObjectLayer::textInputOpened from 0x984ac8 to 0x984cc0 (504 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'CustomizeObjectLayer::textInputOpened @ 0x984cc4
// > ??> @ 0x670a8
// > ??> @ 0x14719e0
//
// 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 12:57:52 +0000
//
__int64 __fastcall CustomizeObjectLayer::textInputOpened(CustomizeObjectLayer *this, CCTextInputNode *a2)
{
int v5; // w27
unsigned __int64 v6; // x23
int v7; // w26
size_t v8; // x21
char *v9; // x0
char *v10; // x1
size_t v11; // x2
int v12; // w24
__int64 v13[2]; // [xsp+68h] [xbp+68h] BYREF
void *v14; // [xsp+78h] [xbp+78h]
__int64 v15; // [xsp+80h] [xbp+80h] BYREF
size_t v16; // [xsp+88h] [xbp+88h]
void *v17; // [xsp+90h] [xbp+90h]
if ( (*(unsigned int (__fastcall **)(CCTextInputNode *))(*(_QWORD *)a2 + 64LL))(a2) != 1 )
return _stack_chk_guard;
CCTextInputNode::getString(a2, v13);
v15 = 0;
v16 = 0;
v17 = nullptr;
std::string::__init(&v15, "A", 1u);
v5 = v13[0] & 1;
if ( v5 )
{
v6 = v13[1];
v7 = v15 & 1;
if ( (v15 & 1) != 0 )
{
v8 = v16;
v9 = (char *)v14;
goto LABEL_8;
}
v8 = (unsigned __int8)v15 >> 1;
v9 = (char *)v14;
v10 = (char *)&v15 + 1;
}
else
{
v6 = LOBYTE(v13[0]) >> 1;
v7 = v15 & 1;
if ( (v15 & 1) != 0 )
{
v8 = v16;
v9 = (char *)v13 + 1;
LABEL_8:
v10 = (char *)v17;
v7 = 1;
goto LABEL_9;
}
v8 = (unsigned __int8)v15 >> 1;
v9 = (char *)v13 + 1;
v10 = (char *)&v15 + 1;
}
LABEL_9:
if ( v8 > v6 )
v11 = v6;
else
v11 = v8;
if ( v11 )
{
v12 = memcmp(v9, v10, v11);
if ( v12 )
{
if ( !v7 )
goto LABEL_15;
LABEL_20:
operator delete(v17);
if ( (v13[0] & 1) == 0 )
goto LABEL_16;
goto LABEL_19;
}
}
v12 = v6 > v8;
if ( v6 < v8 )
v12 = -1;
if ( v7 )
goto LABEL_20;
LABEL_15:
if ( v5 )
LABEL_19:
operator delete(v14);
LABEL_16:
if ( !v12 )
{
CustomizeObjectLayer::onClear(this, nullptr);
v15 = 0;
v16 = 0;
v17 = nullptr;
std::string::__init(&v15, &byte_11E1A70, 1u);
CCTextInputNode::updateLabel((__int64)a2, (__int64)&v15);
if ( (v15 & 1) != 0 )
operator delete(v17);
}
return _stack_chk_guard;
}