//
// sub_6DA6D4 from 0x6da6d4 to 0x6da824 (336 bytes)
//
// 3 xrefs:
// > sub_6DBD90 @ 0x6dbe60
// > sub_6DBD90 @ 0x6dbe64
// > ??> @ 0x6dbfe0
//
// 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
//
int __fastcall sub_6DA6D4(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;
}