//
// sub_ECC690 from 0xecc690 to 0xecc744 (180 bytes)
//
// 2 xrefs:
// > sub_ECC314 @ 0xecc52c
// > sub_ECC314 @ 0xecc534
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:11:38 +0000
//
__int64 __fastcall sub_ECC690(__int64 result, __int64 a2, __int64 a3)
{
__int64 v3; // x19
__int64 v4; // x22
double v7; // d0
v3 = 0;
v4 = *(_QWORD *)(result + 16);
if ( a3 > 0 )
{
do
{
while ( 1 )
{
v7 = LogL16toY(*(_WORD *)(v4 + 2 * v3));
result = 255;
if ( v7 > 0.0 )
break;
result = 0;
*(_BYTE *)(a2 + v3++) = 0;
if ( v3 == a3 )
return result;
}
if ( v7 < 1.0 )
result = (unsigned __int8)(int)(sqrt(v7) * 256.0);
*(_BYTE *)(a2 + v3++) = result;
}
while ( v3 != a3 );
}
return result;
}