//
// sub_F2E94 from 0xf2e94 to 0xf2ee8 (84 bytes)
//
// 1 xrefs:
// > sub_F4A38 @ 0xf4b50
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__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;
}