//
// sub_1001585B4 from 0x1001585b4 to 0x100158620 (108 bytes)
//
// 2 xrefs:
// > GJScaleControl::ccTouchEnded @ 0x1001593a8
// > EditorUI::deactivateScaleControl @ 0x1001600f8
//
// 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:59:42 +0000
//
__int64 __fastcall sub_1001585B4(__int64 a1)
{
__int64 result; // x0
result = *(_QWORD *)(a1 + 568);
if ( result )
result = (*(__int64 (__fastcall **)(__int64, _QWORD, _QWORD))(*(_QWORD *)result + 920LL))(result, 0, 0);
*(_QWORD *)(a1 + 568) = 0;
if ( *(_DWORD *)(a1 + 432) != -1 )
{
*(_DWORD *)(a1 + 432) = -1;
result = *(_QWORD *)(a1 + 576);
if ( result )
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)result + 32LL))(result);
}
return result;
}