//
// SetIDPopup::updateTextInputLabel from 0xa20048 to 0xa201ac (356 bytes)
//
// 6 xrefs:
// > SetIDPopup::onItemIDArrow @ 0xa20204
// > SetIDPopup::onResetValue @ 0xa20218
// > SetIDPopup::init @ 0xa2a240
// > SetLevelOrderPopup::onOrderButton @ 0xba8cf8
// > SetLevelOrderPopup::onOrderButton @ 0xba8d10
// > ??> @ 0xb6ce0
//
// 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:59:39 +0000
//
__int64 __fastcall SetIDPopup::updateTextInputLabel(SetIDPopup *this)
{
unsigned __int64 v2; // x1
int v3; // w2
__int64 v4; // x2
cocos2d::CCString *v5; // x0
const char *CString; // x25
size_t v7; // x0
size_t v8; // x20
_QWORD *v9; // x24
unsigned __int64 v10; // x0
char *v11; // x3
__int64 v13; // [xsp+50h] [xbp+50h] BYREF
size_t v14; // [xsp+58h] [xbp+58h]
void *v15; // [xsp+60h] [xbp+60h]
__int64 v16; // [xsp+68h] [xbp+68h]
LODWORD(v2) = *((_DWORD *)this + 168);
v3 = *((_DWORD *)this + 170);
if ( (int)v2 > *((_DWORD *)this + 171) )
LODWORD(v2) = *((_DWORD *)this + 171);
*((_BYTE *)this + 676) = 1;
if ( (int)v2 < v3 )
v2 = (unsigned int)v3;
else
v2 = (unsigned int)v2;
v4 = _stack_chk_guard;
*((_DWORD *)this + 168) = v2;
v16 = v4;
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)v2);
v13 = 0;
CString = (const char *)cocos2d::CCString::getCString(v5);
v14 = 0;
v15 = nullptr;
v7 = strlen(CString);
v8 = v7;
v9 = *((_QWORD **)this + 83);
if ( v7 > 0xFFFFFFFFFFFFFFEFLL )
sub_62D99C();
if ( v7 > 0x16 )
{
v10 = (v7 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v13 = v10 | 1;
v11 = (char *)operator new(v10);
v15 = v11;
v14 = v8;
LABEL_9:
v11 = (char *)memcpy(v11, CString, v8);
goto LABEL_10;
}
LOBYTE(v13) = 2 * v7;
v11 = (char *)&v13 + 1;
if ( v7 )
goto LABEL_9;
LABEL_10:
v11[v8] = 0;
CCTextInputNode::setString(v9, (char *)&v13);
if ( (v13 & 1) != 0 )
operator delete(v15);
(*(void (__fastcall **)(SetIDPopup *))(*(_QWORD *)this + 1360LL))(this);
*((_BYTE *)this + 676) = 0;
return _stack_chk_guard;
}