//
// LogLuv24fromXYZ from 0x8ea08c to 0x8ea1f8 (364 bytes)
//
// 2 xrefs:
// > sub_8EA4A0 @ 0x8ea4e0
// > ??> @ 0x6b58c
//
// 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 LogLuv24fromXYZ(float *a1, int a2)
{
int v2; // r0
int v6; // [sp+10h] [bp-24h]
int v7; // [sp+14h] [bp-20h]
double v8; // [sp+28h] [bp-Ch]
v6 = LogL10fromY(a1[1], a2);
v8 = *a1 + a1[1] * 15.0 + a1[2] * 3.0;
if ( v6 && v8 > 0.0 )
v2 = uv_encode(*a1 * 4.0 / v8, a1[1] * 9.0 / v8, a2);
else
v2 = uv_encode(0.210526316, 0.473684211, a2);
v7 = v2;
if ( v2 < 0 )
v7 = uv_encode(0.210526316, 0.473684211, 0);
return (v6 << 14) | v7;
}