//
// sub_A3EF4 from 0xa3ef4 to 0xa3f58 (100 bytes)
//
// 3 xrefs:
// > sub_A40E0 @ 0xa42f0
// > sub_A495C @ 0xa4f40
// > sub_A495C @ 0xa4f50
//
// 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_A3EF4(__int64 a1, int a2, int a3, unsigned int *a4)
{
unsigned int v4; // w8
unsigned int v5; // w8
v4 = dword_114128[a2];
*a4 = v4;
if ( a2 && a3 < 0 )
v5 = v4 - (signed int)-((v4 - dword_114128[a2 - 1]) * a3) / 128;
else
v5 = (int)((dword_114128[a2 + 1] - v4) * a3) / 128 + v4;
*a4 = v5;
return 0;
}