//
// sub_1002E914C from 0x1002e914c to 0x1002e91d0 (132 bytes)
//
// 1 xrefs:
// > SetupTouchTogglePopup::textChanged @ 0x1002e9130
//
// 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 11:02:52 +0000
//
__int64 __fastcall sub_1002E914C(__int64 a1)
{
int v2; // w8
__int64 v3; // x1
__int64 v4; // x0
__int64 result; // x0
unsigned int v6; // w20
__int64 v7; // x0
v2 = *(_DWORD *)(a1 + 1024) & ~(*(int *)(a1 + 1024) >> 31);
if ( v2 >= 9999 )
v3 = 9999;
else
v3 = (unsigned int)v2;
*(_DWORD *)(a1 + 1024) = v3;
v4 = *(_QWORD *)(a1 + 680);
if ( v4 )
return sub_10042235C(v4, v3);
result = *(_QWORD *)(a1 + 688);
if ( result )
{
result = sub_1002E757C(result);
if ( (_DWORD)result )
{
v6 = 0;
do
{
v7 = sub_1002E75A0(*(_QWORD *)(a1 + 688), v6);
sub_10042235C(v7, *(unsigned int *)(a1 + 1024));
++v6;
result = sub_1002E757C(*(_QWORD *)(a1 + 688));
}
while ( v6 < (unsigned int)result );
}
}
return result;
}