//
// sub_C865F8 from 0xc865f8 to 0xc86634 (60 bytes)
//
// 1 xrefs:
// > sub_C89A88 @ 0xc89b1c
//
// 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
//
double __fastcall sub_C865F8(__int64 a1, int a2)
{
double result; // d0
int *v3; // x0
int v4; // w1
int v5; // w3
int v6; // t1
int v7; // w2
result = 0.0;
if ( a2 > 4 )
{
v3 = (int *)(a1 + 16);
v4 = a2 - 2;
v5 = 2;
do
{
v6 = *v3++;
v7 = v5++ >> 1;
result = result + (double)(unsigned int)(v7 * v6);
}
while ( v5 != v4 );
}
return result;
}