//
// sub_100221674 from 0x100221674 to 0x1002216cc (88 bytes)
//
// 1 xrefs:
// > sub_100220E68 @ 0x100221298
//
// 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:01:08 +0000
//
__int64 __fastcall sub_100221674(__int64 a1, __int64 a2)
{
int v3; // w0
int v4; // w8
int v5; // w8
int v6; // w8
int v7; // w1
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
v4 = *(_DWORD *)(a1 + 720);
if ( v3 )
v5 = v4 - 1;
else
v5 = v4 + 1;
v6 = v5 & ~(v5 >> 31);
if ( *(_DWORD *)(a1 + 728) - 1 >= v6 )
v7 = v6;
else
v7 = *(_DWORD *)(a1 + 728) - 1;
*(_DWORD *)(a1 + 720) = v7;
return sub_10022172C(a1);
}