//
// LogL16toY from 0x8e8af0 to 0x8e8b8c (156 bytes)
//
// 4 xrefs:
// > sub_8E8DE8 @ 0x8e8e34
// > sub_8E8E84 @ 0x8e8ed0
// > LogLuv32toXYZ @ 0x8ea7b8
// > ??> @ 0x6b4dc
//
// 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
//
__int64 __fastcall LogL16toY(__int16 a1)
{
double v1; // d7
double v4; // [sp+10h] [bp-Ch]
if ( (a1 & 0x7FFF) != 0 )
{
v4 = exp(((double)(a1 & 0x7FFF) + 0.5) * 0.00270760617 - 44.3614196);
if ( a1 < 0 )
v1 = -v4;
else
v1 = v4;
}
else
{
v1 = 0.0;
}
return *(_QWORD *)&v1;
}