//
// CustomizeObjectLayer::textInputOpened from 0x57f3b0 to 0x57f4a6 (246 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'CustomizeObjectLayer::textInputOpened @ 0x57f4b8
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:52:51 +0000
//
int __fastcall CustomizeObjectLayer::textInputOpened(CustomizeObjectLayer *this, CCTextInputNode *a2)
{
int result; // r0
int v5; // r3
size_t v6; // r6
unsigned int v7; // r5
_BYTE *v8; // r0
char *v9; // r1
size_t v10; // r2
int v11; // r4
int v12; // r2
int v13; // r3
unsigned __int8 v14; // [sp+4h] [bp-20h] BYREF
_BYTE v15[3]; // [sp+5h] [bp-1Fh] BYREF
size_t v16; // [sp+8h] [bp-1Ch]
_BYTE *v17; // [sp+Ch] [bp-18h]
int v18; // [sp+10h] [bp-14h] BYREF
unsigned int v19; // [sp+14h] [bp-10h]
char *v20; // [sp+18h] [bp-Ch]
result = (*(int (__fastcall **)(CCTextInputNode *))(*(_DWORD *)a2 + 32))(a2);
if ( result != 1 )
return result;
CCTextInputNode::getString((CCTextInputNode *)&v14, (int)a2);
v18 = 0;
v19 = 0;
v20 = nullptr;
std::string::__init(&v18, "A", 1u);
v5 = v14 & 1;
if ( v5 )
v6 = v16;
else
v6 = (int)v14 >> 1;
if ( (v18 & 1) == 0 )
{
v7 = (int)(unsigned __int8)v18 >> 1;
if ( !v5 )
{
v8 = v15;
goto LABEL_12;
}
LABEL_9:
v8 = v17;
if ( (v18 & 1) != 0 )
goto LABEL_10;
LABEL_12:
v9 = (char *)&v18 + 1;
goto LABEL_13;
}
v7 = v19;
if ( v5 )
goto LABEL_9;
v8 = v15;
LABEL_10:
v9 = v20;
LABEL_13:
v10 = v7;
if ( v7 >= v6 )
v10 = v6;
if ( !v10 || (v11 = memcmp(v8, v9, v10)) == 0 )
{
if ( v6 < v7 )
v11 = -1;
else
v11 = v6 > v7;
}
std::string::~string((int)&v18);
result = std::string::~string((int)&v14);
if ( !v11 )
{
CustomizeObjectLayer::onClear((int)this, nullptr, v12, v13);
v18 = 0;
v19 = 0;
v20 = nullptr;
std::string::__init(&v18, " ", 1u);
CCTextInputNode::updateLabel((float *)a2, (int)&v18);
return std::string::~string((int)&v18);
}
return result;
}