//
// sub_100519E14 from 0x100519e14 to 0x100519f44 (304 bytes)
//
// 1 xrefs:
// > ??> @ 0x100858ae8
//
// 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
//
float *__fastcall sub_100519E14(float *result, int a2, __int64 a3, _DWORD *a4, _QWORD *a5)
{
unsigned __int64 v5; // x9
unsigned __int64 v6; // x10
float v7; // s1
if ( a2 )
{
LODWORD(v5) = *a4;
LODWORD(v6) = a4[1];
do
{
v7 = (float)(unsigned int)v5 * 2.3283e-10;
*result = (float)(v7 * *(float *)(a3 + 4LL * (unsigned int)(6 * v6 + 6)))
+ (float)(*(float *)(a3 + 4LL * (unsigned int)(6 * v6)) * (float)(1.0 - v7));
result[1] = (float)(v7 * *(float *)(a3 + 4LL * (unsigned int)(6 * a4[1] + 7)))
+ (float)(*(float *)(a3 + 4LL * ((6 * a4[1]) | 1u)) * (float)(1.0 - v7));
result[2] = (float)(v7 * *(float *)(a3 + 4LL * (unsigned int)(6 * a4[1] + 8)))
+ (float)(*(float *)(a3 + 4LL * (unsigned int)(6 * a4[1] + 2)) * (float)(1.0 - v7));
result[3] = (float)(v7 * *(float *)(a3 + 4LL * (unsigned int)(6 * a4[1] + 9)))
+ (float)(*(float *)(a3 + 4LL * (unsigned int)(6 * a4[1] + 3)) * (float)(1.0 - v7));
result[4] = (float)(v7 * *(float *)(a3 + 4LL * (unsigned int)(6 * a4[1] + 10)))
+ (float)(*(float *)(a3 + 4LL * (unsigned int)(6 * a4[1] + 4)) * (float)(1.0 - v7));
result[5] = (float)(v7 * *(float *)(a3 + 4LL * (unsigned int)(6 * a4[1] + 11)))
+ (float)(*(float *)(a3 + 4LL * (unsigned int)(6 * a4[1] + 5)) * (float)(1.0 - v7));
v5 = *(_QWORD *)a4 + *a5;
*(_QWORD *)a4 = v5;
v6 = HIDWORD(v5);
result += 6;
--a2;
}
while ( a2 );
}
return result;
}