//
// sub_F2E94 from 0xf2e94 to 0xf2ee8 (84 bytes)
//
// 1 xrefs:
// > sub_F4A38 @ 0xf4b50
//
// 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 12:15:06 +0000
//
__int64 __fastcall sub_F2E94(__int64 result, int a2)
{
int v2; // w10
int v3; // w8
int v4; // w8
__int64 v5; // x11
v2 = *(_DWORD *)(result + 24);
v3 = *(_DWORD *)(result + 4) + a2;
if ( *(_DWORD *)result <= v2 - ((v3 + 7) >> 3) )
{
v5 = *(_QWORD *)(result + 16);
*(_DWORD *)result += v3 / 8;
*(_QWORD *)(result + 16) = v5 + v3 / 8;
v4 = v3 & 7;
}
else
{
v4 = 1;
*(_QWORD *)(result + 16) = 0;
*(_DWORD *)result = v2;
}
*(_DWORD *)(result + 4) = v4;
return result;
}