//
// sub_8EA294 from 0x8ea294 to 0x8ea3e4 (336 bytes)
//
// 3 xrefs:
// > sub_8EB950 @ 0x8eba20
// > sub_8EB950 @ 0x8eba24
// > ??> @ 0x8ebba0
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:04:11 +0000
//
int __fastcall sub_8EA294(int result, _WORD *a2, int a3)
{
double v5; // [sp+10h] [bp-1Ch] BYREF
double v6; // [sp+18h] [bp-14h] BYREF
_DWORD *v7; // [sp+20h] [bp-Ch]
_WORD *v8; // [sp+24h] [bp-8h]
v7 = *(_DWORD **)(result + 12);
v8 = a2;
while ( a3-- > 0 )
{
*v8++ = ((*v7 >> 12) & 0xFFD) + 13314;
result = uv_decode(&v6, &v5, *v7 & 0x3FFF);
if ( result < 0 )
{
v6 = 0.210526316;
v5 = 0.473684211;
}
*v8++ = (int)(v6 * 32768.0);
*v8++ = (int)(v5 * 32768.0);
++v7;
}
return result;
}