//
// sub_1004FFAF4 from 0x1004ffaf4 to 0x1004ffb30 (60 bytes)
//
// 6 xrefs:
// > sub_1004FF270 @ 0x1004ff314
// > sub_1004FF270 @ 0x1004ff6a8
// > sub_1004FF270 @ 0x1004ff7a8
// > sub_1004FF270 @ 0x1004ff868
// > sub_1004FF270 @ 0x1004ff8e8
// > sub_1004FF270 @ 0x1004ff99c
//
// 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:06:53 +0000
//
__int64 __fastcall sub_1004FFAF4(__int64 a1)
{
unsigned __int64 v2; // x20
__int64 result; // x0
v2 = *(_QWORD *)(a1 + 8);
if ( v2 >= *(_QWORD *)(a1 + 16) )
{
result = sub_1005165CC();
}
else
{
sub_100516548();
result = v2 + 56;
}
*(_QWORD *)(a1 + 8) = result;
return result;
}