//
// LevelSettingsObject::touchIDUsage from 0x7a2f6c to 0x7a30b0 (324 bytes)
//
// 5 xrefs:
// > IDNameBrowserPopup::onSelectRow @ 0xcdd718
// > IDNameBrowserPopup::onFormAdd @ 0xce3e10
// > IDNameInput::onAutocompleteRow @ 0xce4a90
// > IDNameInput::commitTypedName @ 0xcef864
// > ??> @ 0xd5550
//
// 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:53:40 +0000
//
void __fastcall LevelSettingsObject::touchIDUsage(LevelSettingsObject *this, int a2, int a3)
{
__int64 v3; // x0
char *v4; // x1
char *v5; // x3
char **v6; // x19
char *v7; // x0
int v8; // t1
char *v9; // x5
char *v10; // x2
char *v11; // x0
unsigned __int64 v12; // x1
__int64 v13; // x20
char *v14; // x5
int v15; // [xsp+28h] [xbp+28h] BYREF
int v16; // [xsp+2Ch] [xbp+2Ch] BYREF
v16 = a2;
v15 = a3;
if ( a2 > 0 )
{
v3 = std::unordered_map>::operator[]((__int64)this + 544, &v15);
v4 = *(char **)v3;
v5 = *(char **)(v3 + 8);
v6 = (char **)v3;
if ( *(char **)v3 != v5 )
{
if ( *(_DWORD *)v4 == v16 )
{
v9 = *(char **)v3;
LABEL_14:
v13 = v5 - (v9 + 4);
if ( v13 >> 2 )
{
v9 = (char *)memmove(v9, v9 + 4, v5 - (v9 + 4));
v5 = v6[1];
v4 = *v6;
}
v14 = &v9[v13];
if ( v14 != v5 )
v6[1] = &v5[4 * ~((unsigned __int64)(v5 - 4 - v14) >> 2)];
}
else
{
v7 = v4 + 4;
while ( 1 )
{
v9 = v7;
if ( v7 == v5 )
break;
v8 = *(_DWORD *)v7;
v7 += 4;
if ( v8 == v16 )
goto LABEL_14;
}
}
}
std::vector::insert(v6, v4, (char *)&v16);
v10 = *v6;
v11 = v6[1];
v12 = (v11 - *v6) >> 2;
if ( (int)v12 > 500 )
{
if ( v12 <= 0x1F3 )
{
std::vector::__append((__int64)v6, 500 - v12);
}
else if ( v12 != 500 && v11 != v10 + 2000 )
{
v6[1] = &v11[4 * ~((unsigned __int64)(v11 - 2004 - v10) >> 2)];
}
}
}
}