//
// sub_1000516D4 from 0x1000516d4 to 0x100051760 (140 bytes)
//
// 1 xrefs:
// > UILayer::resetUINodeState @ 0x1000516b8
//
// 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 10:57:43 +0000
//
__int64 __fastcall sub_1000516D4(__int64 a1)
{
__int64 v2; // x0
__int64 v3; // x8
__int64 result; // x0
__int16 v5; // [xsp+8h] [xbp-18h] BYREF
char v6; // [xsp+Ah] [xbp-16h]
__int16 v7; // [xsp+Ch] [xbp-14h] BYREF
char v8; // [xsp+Eh] [xbp-12h]
*(_DWORD *)(a1 + 352) = -1;
*(_WORD *)(a1 + 383) = 0;
v2 = *(_QWORD *)(a1 + 320);
if ( v2 )
{
v6 = -1;
v5 = -1;
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v2 + 960LL))(v2, &v5);
}
v3 = 328;
if ( *(_BYTE *)(a1 + 381) )
v3 = 320;
result = *(_QWORD *)(a1 + v3);
if ( result )
{
v8 = -1;
v7 = -1;
return (*(__int64 (__fastcall **)(__int64, __int16 *))(*(_QWORD *)result + 960LL))(result, &v7);
}
return result;
}