//
// sub_10046D7B0 from 0x10046d7b0 to 0x10046d830 (128 bytes)
//
// 2 xrefs:
// > sub_10046D570 @ 0x10046d5a8
// > SetupAnimationPopup::textChanged @ 0x10046d8c4
//
// 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:05:36 +0000
//
__int64 __fastcall sub_10046D7B0(__int64 result)
{
int v1; // w8
__int64 v2; // x9
__int64 v3; // x19
unsigned int v4; // w20
v1 = *(_DWORD *)(result + 1036) & ~(*(int *)(result + 1036) >> 31);
if ( v1 >= 999 )
v1 = 999;
*(_DWORD *)(result + 1036) = v1;
v2 = *(_QWORD *)(result + 680);
if ( v2 )
{
*(_DWORD *)(v2 + 1652) = v1;
}
else
{
v3 = result;
result = *(_QWORD *)(result + 688);
if ( result )
{
result = sub_1002E757C(result);
if ( (_DWORD)result )
{
v4 = 0;
do
{
*(_DWORD *)(sub_1002E75A0(*(_QWORD *)(v3 + 688), v4++) + 1652) = *(_DWORD *)(v3 + 1036);
result = sub_1002E757C(*(_QWORD *)(v3 + 688));
}
while ( v4 < (unsigned int)result );
}
}
}
return result;
}