//
// sub_C57048 from 0xc57048 to 0xc570b4 (108 bytes)
//
// 2 xrefs:
// > sub_C56154 @ 0xc5645c
// > sub_C56154 @ 0xc56464
//
// 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
//
__int64 __fastcall sub_C57048(__int64 result, char *a2, __int64 a3)
{
__int64 v5; // x23
__int64 v6; // x19
unsigned int v7; // w0
char *v8; // x1
float v9[4]; // [xsp+40h] [xbp+40h] BYREF
v5 = *(_QWORD *)(result + 16);
if ( a3 > 0 )
{
v6 = 0;
do
{
v7 = *(_DWORD *)(v5 + 4 * v6++);
LogLuv24toXYZ(v7, v9);
v8 = a2;
a2 += 3;
result = XYZtoRGB24(v9, v8);
}
while ( v6 != a3 );
}
return result;
}