void spectrum_to_xyz(float *spectrum, float *x, float *y, float *z) {
  int i;
  float lambda, X = 0, Y = 0, Z = 0;
  static float cie_colour_match[81][3] = {
      {0.0014, 0.0000, 0.0065}, {0.0022, 0.0001, 0.0105},
      {0.0042, 0.0001, 0.0201}, {0.0076, 0.0002, 0.0362},
      {0.0143, 0.0004, 0.0679}, {0.0232, 0.0006, 0.1102},
      {0.0435, 0.0012, 0.2074}, {0.0776, 0.0022, 0.3713},
      {0.1344, 0.0040, 0.6456}, {0.2148, 0.0073, 1.0391},
      {0.2839, 0.0116, 1.3856}, {0.3285, 0.0168, 1.6230},
      {0.3483, 0.0230, 1.7471}, {0.3481, 0.0298, 1.7826},
      {0.3362, 0.0380, 1.7721}, {0.3187, 0.0480, 1.7441},
      {0.2908, 0.0600, 1.6692}, {0.2511, 0.0739, 1.5281},
      {0.1954, 0.0910, 1.2876}, {0.1421, 0.1126, 1.0419},
      {0.0956, 0.1390, 0.8130}, {0.0580, 0.1693, 0.6162},
      {0.0320, 0.2080, 0.4652}, {0.0147, 0.2586, 0.3533},
      {0.0049, 0.3230, 0.2720}, {0.0024, 0.4073, 0.2123},
      {0.0093, 0.5030, 0.1582}, {0.0291, 0.6082, 0.1117},
      {0.0633, 0.7100, 0.0782}, {0.1096, 0.7932, 0.0573},
      {0.1655, 0.8620, 0.0422}, {0.2257, 0.9149, 0.0298},
      {0.2904, 0.9540, 0.0203}, {0.3597, 0.9803, 0.0134},
      {0.4334, 0.9950, 0.0087}, {0.5121, 1.0000, 0.0057},
      {0.5945, 0.9950, 0.0039}, {0.6784, 0.9786, 0.0027},
      {0.7621, 0.9520, 0.0021}, {0.8425, 0.9154, 0.0018},
      {0.9163, 0.8700, 0.0017}, {0.9786, 0.8163, 0.0014},
      {1.0263, 0.7570, 0.0011}, {1.0567, 0.6949, 0.0010},
      {1.0622, 0.6310, 0.0008}, {1.0456, 0.5668, 0.0006},
      {1.0026, 0.5030, 0.0003}, {0.9384, 0.4412, 0.0002},
      {0.8544, 0.3810, 0.0002}, {0.7514, 0.3210, 0.0001},
      {0.6424, 0.2650, 0.0000}, {0.5419, 0.2170, 0.0000},
      {0.4479, 0.1750, 0.0000}, {0.3608, 0.1382, 0.0000},
      {0.2835, 0.1070, 0.0000}, {0.2187, 0.0816, 0.0000},
      {0.1649, 0.0610, 0.0000}, {0.1212, 0.0446, 0.0000},
      {0.0874, 0.0320, 0.0000}, {0.0636, 0.0232, 0.0000},
      {0.0468, 0.0170, 0.0000}, {0.0329, 0.0119, 0.0000},
      {0.0227, 0.0082, 0.0000}, {0.0158, 0.0057, 0.0000},
      {0.0114, 0.0041, 0.0000}, {0.0081, 0.0029, 0.0000},
      {0.0058, 0.0021, 0.0000}, {0.0041, 0.0015, 0.0000},
      {0.0029, 0.0010, 0.0000}, {0.0020, 0.0007, 0.0000},
      {0.0014, 0.0005, 0.0000}, {0.0010, 0.0004, 0.0000},
      {0.0007, 0.0002, 0.0000}, {0.0005, 0.0002, 0.0000},
      {0.0003, 0.0001, 0.0000}, {0.0002, 0.0001, 0.0000},
      {0.0002, 0.0001, 0.0000}, {0.0001, 0.0000, 0.0000},
      {0.0001, 0.0000, 0.0000}, {0.0001, 0.0000, 0.0000},
      {0.0000, 0.0000, 0.0000}};
  for (i = 0, lambda = 380; lambda < 780.1; i++, lambda += 5) {
    X += spectrum[i / 2] * cie_colour_match[i][0];
    Y += spectrum[i / 2] * cie_colour_match[i][1];
    Z += spectrum[i / 2] * cie_colour_match[i][2];
  }
  *x = X;
  *y = Y;
  *z = Z;
}


x86 assembly (clang, -O0):
<spectrum_to_xyz>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x2c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x34(%rbp)
movl   $0x0,-0x24(%rbp)
movss  0xec5(%rip),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeb7(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1258 <spectrum_to_xyz+0x158>
mov    -0x8(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x24(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x50(%rbp),%rax
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
movslq -0x24(%rbp),%rcx
lea    0x2ea9(%rip),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movss  (%rax),%xmm2
movss  -0x2c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x2c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x24(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x48(%rbp),%rax
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
movslq -0x24(%rbp),%rcx
lea    0x2e60(%rip),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movss  0x4(%rax),%xmm2
movss  -0x30(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x24(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x40(%rbp),%rax
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
movslq -0x24(%rbp),%rcx
lea    0x2e16(%rip),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movss  0x8(%rax),%xmm2
movss  -0x34(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x34(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
movss  0xdbb(%rip),%xmm0
addss  -0x28(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
jmp    1140 <spectrum_to_xyz+0x40>
movss  -0x2c(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x30(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x34(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<spectrum_to_xyz>:
xorps  %xmm1,%xmm1
xorps  %xmm0,%xmm0
lea    0xf07(%rip),%rax
xor    %r8d,%r8d
movss  (%rdi,%r8,2),%xmm2
movsd  -0x14(%rax),%xmm4
movaps %xmm2,%xmm3
shufps $0x0,%xmm2,%xmm3
mulps  %xmm4,%xmm3
addps  %xmm1,%xmm3
mulss  -0xc(%rax),%xmm2
addss  %xmm0,%xmm2
cmp    $0x50,%r8
je     1161 <spectrum_to_xyz+0x61>
movss  (%rdi,%r8,2),%xmm0
movsd  -0x8(%rax),%xmm4
movaps %xmm0,%xmm1
shufps $0x0,%xmm0,%xmm1
mulps  %xmm4,%xmm1
mulss  (%rax),%xmm0
addps  %xmm3,%xmm1
addss  %xmm2,%xmm0
add    $0x2,%r8
add    $0x18,%rax
jmp    1110 <spectrum_to_xyz+0x10>
movss  %xmm3,(%rsi)
shufps $0x55,%xmm3,%xmm3
movss  %xmm3,(%rdx)
movss  %xmm2,(%rcx)
ret

LLVM IR (-O0):
@spectrum_to_xyz.cie_colour_match = internal global [81 x [3 x float]] [[3 x float] [float 0x3F56F00680000000, float 0.000000e+00, float 0x3F7A9FBE80000000], [3 x float] [float 0x3F6205BC00000000, float 0x3F1A36E2E0000000, float 0x3F85810620000000], [3 x float] [float 0x3F713404E0000000, float 0x3F1A36E2E0000000, float 0x3F94951820000000], [3 x float] [float 0x3F7F212D80000000, float 0x3F2A36E2E0000000, float 0x3FA288CE80000000], [3 x float] [float 0x3F8D495180000000, float 0x3F3A36E2E0000000, float 0x3FB161E500000000], [3 x float] [float 0x3F97C1BDA0000000, float 0x3F43A92A40000000, float 0x3FBC361140000000], [3 x float] [float 0x3FA645A1C0000000, float 0x3F53A92A40000000, float 0x3FCA8C1540000000], [3 x float] [float 0x3FB3DD9800000000, float 0x3F6205BC00000000, float 0x3FD7C36120000000], [3 x float] [float 0x3FC13404E0000000, float 0x3F70624DE0000000, float 0x3FE4A8C160000000], [3 x float] [float 0x3FCB7E9100000000, float 0x3F7DE69AE0000000, float 0x3FF0A02760000000], [3 x float] [float 0x3FD22B6AE0000000, float 0x3F87C1BDA0000000, float 0x3FF62B6AE0000000], [3 x float] [float 0x3FD50624E0000000, float 0x3F913404E0000000, float 0x3FF9F7CEE0000000], [3 x float] [float 0x3FD64A8C20000000, float 0x3F978D4FE0000000, float 0x3FFBF41F20000000], [3 x float] [float 0x3FD6474540000000, float 0x3F9E83E420000000, float 0x3FFC8587A0000000], [3 x float] [float 0x3FD5844D00000000, float 0x3FA374BC60000000, float 0x3FFC5A8580000000], [3 x float] [float 0x3FD46594A0000000, float 0x3FA89374C0000000, float 0x3FFBE7D560000000], [3 x float] [float 0x3FD29C77A0000000, float 0x3FAEB851E0000000, float 0x3FFAB50B00000000], [3 x float] [float 0x3FD01205C0000000, float 0x3FB2EB1C40000000, float 0x3FF8731900000000], [3 x float] [float 0x3FC902DE00000000, float 0x3FB74BC6A0000000, float 0x3FF49A0280000000], [3 x float] [float 0x3FC2305540000000, float 0x3FBCD35A80000000, float 0x3FF0AB9F60000000], [3 x float] [float 0x3FB8793DE0000000, float 0x3FC1CAC080000000, float 0x3FEA0418A0000000], [3 x float] [float 0x3FADB22D00000000, float 0x3FC5AB9F60000000, float 0x3FE3B7E900000000], [3 x float] [float 0x3FA0624DE0000000, float 0x3FCA9FBE80000000, float 0x3FDDC5D640000000], [3 x float] [float 0x3F8E1B08A0000000, float 0x3FD08CE700000000, float 0x3FD69C77A0000000], [3 x float] [float 0x3F741205C0000000, float 0x3FD4AC0840000000, float 0x3FD16872C0000000], [3 x float] [float 0x3F63A92A40000000, float 0x3FDA113400000000, float 0x3FCB2CA580000000], [3 x float] [float 0x3F830BE0E0000000, float 0x3FE0189380000000, float 0x3FC43FE5C0000000], [3 x float] [float 0x3F9DCC6400000000, float 0x3FE3765FE0000000, float 0x3FBC985F00000000], [3 x float] [float 0x3FB0346DC0000000, float 0x3FE6B851E0000000, float 0x3FB404EA40000000], [3 x float] [float 0x3FBC0EBEE0000000, float 0x3FE961E500000000, float 0x3FAD566D00000000], [3 x float] [float 0x3FC52F1AA0000000, float 0x3FEB958100000000, float 0x3FA59B3D00000000], [3 x float] [float 0x3FCCE3BCE0000000, float 0x3FED46DC60000000, float 0x3F9E83E420000000], [3 x float] [float 0x3FD295E9E0000000, float 0x3FEE872B00000000, float 0x3F94C98600000000], [3 x float] [float 0x3FD7055320000000, float 0x3FEF5E9E20000000, float 0x3F8B717580000000], [3 x float] [float 0x3FDBBCD360000000, float 0x3FEFD70A40000000, float 0x3F81D14E40000000], [3 x float] [float 0x3FE0631F80000000, float 1.000000e+00, float 0x3F7758E220000000], [3 x float] [float 0x3FE30624E0000000, float 0x3FEFD70A40000000, float 0x3F6FF2E480000000], [3 x float] [float 0x3FE5B573E0000000, float 0x3FEF50B100000000, float 0x3F661E4F80000000], [3 x float] [float 0x3FE8631F80000000, float 0x3FEE76C8C0000000, float 0x3F613404E0000000], [3 x float] [float 0x3FEAF5C280000000, float 0x3FED4AF500000000, float 0x3F5D7DBF40000000], [3 x float] [float 0x3FED525460000000, float 0x3FEBD70A40000000, float 0x3F5BDA5120000000], [3 x float] [float 0x3FEF50B100000000, float 0x3FEA1F2120000000, float 0x3F56F00680000000], [3 x float] [float 0x3FF06BB980000000, float 0x3FE8395820000000, float 0x3F5205BC00000000], [3 x float] [float 0x3FF0E83E40000000, float 0x3FE63C9EE0000000, float 0x3F50624DE0000000], [3 x float] [float 0x3FF0FEC560000000, float 0x3FE43126E0000000, float 0x3F4A36E2E0000000], [3 x float] [float 0x3FF0BAC720000000, float 0x3FE22339C0000000, float 0x3F43A92A40000000], [3 x float] [float 0x3FF00AA640000000, float 0x3FE0189380000000, float 0x3F33A92A40000000], [3 x float] [float 0x3FEE075F60000000, float 0x3FDC3C9EE0000000, float 0x3F2A36E2E0000000], [3 x float] [float 0x3FEB573EA0000000, float 0x3FD8624DE0000000, float 0x3F2A36E2E0000000], [3 x float] [float 0x3FE80B7800000000, float 0x3FD48B43A0000000, float 0x3F1A36E2E0000000], [3 x float] [float 0x3FE48E8A80000000, float 0x3FD0F5C280000000, float 0.000000e+00], [3 x float] [float 0x3FE1573EA0000000, float 0x3FCBC6A7E0000000, float 0.000000e+00], [3 x float] [float 0x3FDCAA64C0000000, float 0x3FC6666660000000, float 0.000000e+00], [3 x float] [float 0x3FD71758E0000000, float 0x3FC1B089A0000000, float 0.000000e+00], [3 x float] [float 0x3FD224DD20000000, float 0x3FBB645A20000000, float 0.000000e+00], [3 x float] [float 0x3FCBFE5CA0000000, float 0x3FB4E3BCE0000000, float 0.000000e+00], [3 x float] [float 0x3FC51B7180000000, float 0x3FAF3B6460000000, float 0.000000e+00], [3 x float] [float 0x3FBF06F6A0000000, float 0x3FA6D5CFA0000000, float 0.000000e+00], [3 x float] [float 0x3FB65FD8A0000000, float 0x3FA0624DE0000000, float 0.000000e+00], [3 x float] [float 0x3FB0481700000000, float 0x3F97C1BDA0000000, float 0.000000e+00], [3 x float] [float 0x3FA7F62B60000000, float 0x3F916872C0000000, float 0.000000e+00], [3 x float] [float 0x3FA0D844E0000000, float 0x3F885F0700000000, float 0.000000e+00], [3 x float] [float 0x3F973EAB40000000, float 0x3F80CB2960000000, float 0.000000e+00], [3 x float] [float 0x3F902DE000000000, float 0x3F7758E220000000, float 0.000000e+00], [3 x float] [float 0x3F8758E220000000, float 0x3F70CB2960000000, float 0.000000e+00], [3 x float] [float 0x3F8096BBA0000000, float 0x3F67C1BDA0000000, float 0.000000e+00], [3 x float] [float 0x3F77C1BDA0000000, float 0x3F613404E0000000, float 0.000000e+00], [3 x float] [float 0x3F70CB2960000000, float 0x3F589374C0000000, float 0.000000e+00], [3 x float] [float 0x3F67C1BDA0000000, float 0x3F50624DE0000000, float 0.000000e+00], [3 x float] [float 0x3F60624DE0000000, float 0x3F46F00680000000, float 0.000000e+00], [3 x float] [float 0x3F56F00680000000, float 0x3F40624DE0000000, float 0.000000e+00], [3 x float] [float 0x3F50624DE0000000, float 0x3F3A36E2E0000000, float 0.000000e+00], [3 x float] [float 0x3F46F00680000000, float 0x3F2A36E2E0000000, float 0.000000e+00], [3 x float] [float 0x3F40624DE0000000, float 0x3F2A36E2E0000000, float 0.000000e+00], [3 x float] [float 0x3F33A92A40000000, float 0x3F1A36E2E0000000, float 0.000000e+00], [3 x float] [float 0x3F2A36E2E0000000, float 0x3F1A36E2E0000000, float 0.000000e+00], [3 x float] [float 0x3F2A36E2E0000000, float 0x3F1A36E2E0000000, float 0.000000e+00], [3 x float] [float 0x3F1A36E2E0000000, float 0.000000e+00, float 0.000000e+00], [3 x float] [float 0x3F1A36E2E0000000, float 0.000000e+00, float 0.000000e+00], [3 x float] [float 0x3F1A36E2E0000000, float 0.000000e+00, float 0.000000e+00], [3 x float] zeroinitializer]
define void @spectrum_to_xyz(float* %0, float* %1, float* %2, float* %3) {
%5 = alloca float*
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
%9 = alloca i32
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
store float* %0, float** %5
store float* %1, float** %6
store float* %2, float** %7
store float* %3, float** %8
store float 0.000000e+00, float* %11
store float 0.000000e+00, float* %12
store float 0.000000e+00, float* %13
store i32 0, i32* %9
store float 3.800000e+02, float* %10
br label %14
14: ; preds = %58, %4
%15 = load float, float* %10
%16 = fpext float %15 to double
%17 = fcmp olt double %16, 7.801000e+02
br i1 %17, label %18, label %63
18: ; preds = %14
%19 = load float*, float** %5
%20 = load i32, i32* %9
%21 = sdiv i32 %20, 2
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds float, float* %19, i64 %22
%24 = load float, float* %23
%25 = load i32, i32* %9
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [81 x [3 x float]], [81 x [3 x float]]* @spectrum_to_xyz.cie_colour_match, i64 0, i64 %26
%28 = getelementptr inbounds [3 x float], [3 x float]* %27, i64 0, i64 0
%29 = load float, float* %28
%30 = load float, float* %11
%31 = call float @llvm.fmuladd.f32(float %24, float %29, float %30)
store float %31, float* %11
%32 = load float*, float** %5
%33 = load i32, i32* %9
%34 = sdiv i32 %33, 2
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds float, float* %32, i64 %35
%37 = load float, float* %36
%38 = load i32, i32* %9
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [81 x [3 x float]], [81 x [3 x float]]* @spectrum_to_xyz.cie_colour_match, i64 0, i64 %39
%41 = getelementptr inbounds [3 x float], [3 x float]* %40, i64 0, i64 1
%42 = load float, float* %41
%43 = load float, float* %12
%44 = call float @llvm.fmuladd.f32(float %37, float %42, float %43)
store float %44, float* %12
%45 = load float*, float** %5
%46 = load i32, i32* %9
%47 = sdiv i32 %46, 2
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds float, float* %45, i64 %48
%50 = load float, float* %49
%51 = load i32, i32* %9
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [81 x [3 x float]], [81 x [3 x float]]* @spectrum_to_xyz.cie_colour_match, i64 0, i64 %52
%54 = getelementptr inbounds [3 x float], [3 x float]* %53, i64 0, i64 2
%55 = load float, float* %54
%56 = load float, float* %13
%57 = call float @llvm.fmuladd.f32(float %50, float %55, float %56)
store float %57, float* %13
br label %58
58: ; preds = %18
%59 = load i32, i32* %9
%60 = add nsw i32 %59, 1
store i32 %60, i32* %9
%61 = load float, float* %10
%62 = fadd float %61, 5.000000e+00
store float %62, float* %10
br label %14
63: ; preds = %14
%64 = load float, float* %11
%65 = load float*, float** %6
store float %64, float* %65
%66 = load float, float* %12
%67 = load float*, float** %7
store float %66, float* %67
%68 = load float, float* %13
%69 = load float*, float** %8
store float %68, float* %69
ret void
}

LLVM IR (-O2):
@spectrum_to_xyz.cie_colour_match = internal unnamed_addr constant [81 x [3 x float]] [[3 x float] [float 0x3F56F00680000000, float 0.000000e+00, float 0x3F7A9FBE80000000], [3 x float] [float 0x3F6205BC00000000, float 0x3F1A36E2E0000000, float 0x3F85810620000000], [3 x float] [float 0x3F713404E0000000, float 0x3F1A36E2E0000000, float 0x3F94951820000000], [3 x float] [float 0x3F7F212D80000000, float 0x3F2A36E2E0000000, float 0x3FA288CE80000000], [3 x float] [float 0x3F8D495180000000, float 0x3F3A36E2E0000000, float 0x3FB161E500000000], [3 x float] [float 0x3F97C1BDA0000000, float 0x3F43A92A40000000, float 0x3FBC361140000000], [3 x float] [float 0x3FA645A1C0000000, float 0x3F53A92A40000000, float 0x3FCA8C1540000000], [3 x float] [float 0x3FB3DD9800000000, float 0x3F6205BC00000000, float 0x3FD7C36120000000], [3 x float] [float 0x3FC13404E0000000, float 0x3F70624DE0000000, float 0x3FE4A8C160000000], [3 x float] [float 0x3FCB7E9100000000, float 0x3F7DE69AE0000000, float 0x3FF0A02760000000], [3 x float] [float 0x3FD22B6AE0000000, float 0x3F87C1BDA0000000, float 0x3FF62B6AE0000000], [3 x float] [float 0x3FD50624E0000000, float 0x3F913404E0000000, float 0x3FF9F7CEE0000000], [3 x float] [float 0x3FD64A8C20000000, float 0x3F978D4FE0000000, float 0x3FFBF41F20000000], [3 x float] [float 0x3FD6474540000000, float 0x3F9E83E420000000, float 0x3FFC8587A0000000], [3 x float] [float 0x3FD5844D00000000, float 0x3FA374BC60000000, float 0x3FFC5A8580000000], [3 x float] [float 0x3FD46594A0000000, float 0x3FA89374C0000000, float 0x3FFBE7D560000000], [3 x float] [float 0x3FD29C77A0000000, float 0x3FAEB851E0000000, float 0x3FFAB50B00000000], [3 x float] [float 0x3FD01205C0000000, float 0x3FB2EB1C40000000, float 0x3FF8731900000000], [3 x float] [float 0x3FC902DE00000000, float 0x3FB74BC6A0000000, float 0x3FF49A0280000000], [3 x float] [float 0x3FC2305540000000, float 0x3FBCD35A80000000, float 0x3FF0AB9F60000000], [3 x float] [float 0x3FB8793DE0000000, float 0x3FC1CAC080000000, float 0x3FEA0418A0000000], [3 x float] [float 0x3FADB22D00000000, float 0x3FC5AB9F60000000, float 0x3FE3B7E900000000], [3 x float] [float 0x3FA0624DE0000000, float 0x3FCA9FBE80000000, float 0x3FDDC5D640000000], [3 x float] [float 0x3F8E1B08A0000000, float 0x3FD08CE700000000, float 0x3FD69C77A0000000], [3 x float] [float 0x3F741205C0000000, float 0x3FD4AC0840000000, float 0x3FD16872C0000000], [3 x float] [float 0x3F63A92A40000000, float 0x3FDA113400000000, float 0x3FCB2CA580000000], [3 x float] [float 0x3F830BE0E0000000, float 0x3FE0189380000000, float 0x3FC43FE5C0000000], [3 x float] [float 0x3F9DCC6400000000, float 0x3FE3765FE0000000, float 0x3FBC985F00000000], [3 x float] [float 0x3FB0346DC0000000, float 0x3FE6B851E0000000, float 0x3FB404EA40000000], [3 x float] [float 0x3FBC0EBEE0000000, float 0x3FE961E500000000, float 0x3FAD566D00000000], [3 x float] [float 0x3FC52F1AA0000000, float 0x3FEB958100000000, float 0x3FA59B3D00000000], [3 x float] [float 0x3FCCE3BCE0000000, float 0x3FED46DC60000000, float 0x3F9E83E420000000], [3 x float] [float 0x3FD295E9E0000000, float 0x3FEE872B00000000, float 0x3F94C98600000000], [3 x float] [float 0x3FD7055320000000, float 0x3FEF5E9E20000000, float 0x3F8B717580000000], [3 x float] [float 0x3FDBBCD360000000, float 0x3FEFD70A40000000, float 0x3F81D14E40000000], [3 x float] [float 0x3FE0631F80000000, float 1.000000e+00, float 0x3F7758E220000000], [3 x float] [float 0x3FE30624E0000000, float 0x3FEFD70A40000000, float 0x3F6FF2E480000000], [3 x float] [float 0x3FE5B573E0000000, float 0x3FEF50B100000000, float 0x3F661E4F80000000], [3 x float] [float 0x3FE8631F80000000, float 0x3FEE76C8C0000000, float 0x3F613404E0000000], [3 x float] [float 0x3FEAF5C280000000, float 0x3FED4AF500000000, float 0x3F5D7DBF40000000], [3 x float] [float 0x3FED525460000000, float 0x3FEBD70A40000000, float 0x3F5BDA5120000000], [3 x float] [float 0x3FEF50B100000000, float 0x3FEA1F2120000000, float 0x3F56F00680000000], [3 x float] [float 0x3FF06BB980000000, float 0x3FE8395820000000, float 0x3F5205BC00000000], [3 x float] [float 0x3FF0E83E40000000, float 0x3FE63C9EE0000000, float 0x3F50624DE0000000], [3 x float] [float 0x3FF0FEC560000000, float 0x3FE43126E0000000, float 0x3F4A36E2E0000000], [3 x float] [float 0x3FF0BAC720000000, float 0x3FE22339C0000000, float 0x3F43A92A40000000], [3 x float] [float 0x3FF00AA640000000, float 0x3FE0189380000000, float 0x3F33A92A40000000], [3 x float] [float 0x3FEE075F60000000, float 0x3FDC3C9EE0000000, float 0x3F2A36E2E0000000], [3 x float] [float 0x3FEB573EA0000000, float 0x3FD8624DE0000000, float 0x3F2A36E2E0000000], [3 x float] [float 0x3FE80B7800000000, float 0x3FD48B43A0000000, float 0x3F1A36E2E0000000], [3 x float] [float 0x3FE48E8A80000000, float 0x3FD0F5C280000000, float 0.000000e+00], [3 x float] [float 0x3FE1573EA0000000, float 0x3FCBC6A7E0000000, float 0.000000e+00], [3 x float] [float 0x3FDCAA64C0000000, float 0x3FC6666660000000, float 0.000000e+00], [3 x float] [float 0x3FD71758E0000000, float 0x3FC1B089A0000000, float 0.000000e+00], [3 x float] [float 0x3FD224DD20000000, float 0x3FBB645A20000000, float 0.000000e+00], [3 x float] [float 0x3FCBFE5CA0000000, float 0x3FB4E3BCE0000000, float 0.000000e+00], [3 x float] [float 0x3FC51B7180000000, float 0x3FAF3B6460000000, float 0.000000e+00], [3 x float] [float 0x3FBF06F6A0000000, float 0x3FA6D5CFA0000000, float 0.000000e+00], [3 x float] [float 0x3FB65FD8A0000000, float 0x3FA0624DE0000000, float 0.000000e+00], [3 x float] [float 0x3FB0481700000000, float 0x3F97C1BDA0000000, float 0.000000e+00], [3 x float] [float 0x3FA7F62B60000000, float 0x3F916872C0000000, float 0.000000e+00], [3 x float] [float 0x3FA0D844E0000000, float 0x3F885F0700000000, float 0.000000e+00], [3 x float] [float 0x3F973EAB40000000, float 0x3F80CB2960000000, float 0.000000e+00], [3 x float] [float 0x3F902DE000000000, float 0x3F7758E220000000, float 0.000000e+00], [3 x float] [float 0x3F8758E220000000, float 0x3F70CB2960000000, float 0.000000e+00], [3 x float] [float 0x3F8096BBA0000000, float 0x3F67C1BDA0000000, float 0.000000e+00], [3 x float] [float 0x3F77C1BDA0000000, float 0x3F613404E0000000, float 0.000000e+00], [3 x float] [float 0x3F70CB2960000000, float 0x3F589374C0000000, float 0.000000e+00], [3 x float] [float 0x3F67C1BDA0000000, float 0x3F50624DE0000000, float 0.000000e+00], [3 x float] [float 0x3F60624DE0000000, float 0x3F46F00680000000, float 0.000000e+00], [3 x float] [float 0x3F56F00680000000, float 0x3F40624DE0000000, float 0.000000e+00], [3 x float] [float 0x3F50624DE0000000, float 0x3F3A36E2E0000000, float 0.000000e+00], [3 x float] [float 0x3F46F00680000000, float 0x3F2A36E2E0000000, float 0.000000e+00], [3 x float] [float 0x3F40624DE0000000, float 0x3F2A36E2E0000000, float 0.000000e+00], [3 x float] [float 0x3F33A92A40000000, float 0x3F1A36E2E0000000, float 0.000000e+00], [3 x float] [float 0x3F2A36E2E0000000, float 0x3F1A36E2E0000000, float 0.000000e+00], [3 x float] [float 0x3F2A36E2E0000000, float 0x3F1A36E2E0000000, float 0.000000e+00], [3 x float] [float 0x3F1A36E2E0000000, float 0.000000e+00, float 0.000000e+00], [3 x float] [float 0x3F1A36E2E0000000, float 0.000000e+00, float 0.000000e+00], [3 x float] [float 0x3F1A36E2E0000000, float 0.000000e+00, float 0.000000e+00], [3 x float] zeroinitializer]
define void @spectrum_to_xyz(float* nocapture %0, float* nocapture writeonly %1, float* nocapture writeonly %2, float* nocapture writeonly %3) {
br label %5
5: ; preds = %23, %4
%6 = phi i64 [ 0, %4 ], [ %36, %23 ]
%7 = phi float [ 0.000000e+00, %4 ], [ %35, %23 ]
%8 = phi <2 x float> [ zeroinitializer, %4 ], [ %32, %23 ]
%9 = lshr exact i64 %6, 1
%10 = getelementptr inbounds float, float* %0, i64 %9
%11 = load float, float* %10
%12 = getelementptr inbounds [81 x [3 x float]], [81 x [3 x float]]* @spectrum_to_xyz.cie_colour_match, i64 0, i64 %6, i64 0
%13 = bitcast float* %12 to <2 x float>*
%14 = load <2 x float>, <2 x float>* %13
%15 = insertelement <2 x float> poison, float %11, i64 0
%16 = shufflevector <2 x float> %15, <2 x float> poison, <2 x i32> zeroinitializer
%17 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %16, <2 x float> %14, <2 x float> %8)
%18 = getelementptr inbounds [81 x [3 x float]], [81 x [3 x float]]* @spectrum_to_xyz.cie_colour_match, i64 0, i64 %6, i64 2
%19 = load float, float* %18
%20 = tail call float @llvm.fmuladd.f32(float %11, float %19, float %7)
%21 = or i64 %6, 1
%22 = icmp eq i64 %21, 81
br i1 %22, label %37, label %23
23: ; preds = %5
%24 = lshr exact i64 %6, 1
%25 = getelementptr inbounds float, float* %0, i64 %24
%26 = load float, float* %25
%27 = getelementptr inbounds [81 x [3 x float]], [81 x [3 x float]]* @spectrum_to_xyz.cie_colour_match, i64 0, i64 %21, i64 0
%28 = bitcast float* %27 to <2 x float>*
%29 = load <2 x float>, <2 x float>* %28
%30 = insertelement <2 x float> poison, float %26, i64 0
%31 = shufflevector <2 x float> %30, <2 x float> poison, <2 x i32> zeroinitializer
%32 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %31, <2 x float> %29, <2 x float> %17)
%33 = getelementptr inbounds [81 x [3 x float]], [81 x [3 x float]]* @spectrum_to_xyz.cie_colour_match, i64 0, i64 %21, i64 2
%34 = load float, float* %33
%35 = tail call float @llvm.fmuladd.f32(float %26, float %34, float %20)
%36 = add nuw nsw i64 %6, 2
br label %5
37: ; preds = %5
%38 = extractelement <2 x float> %17, i64 0
store float %38, float* %1
%39 = extractelement <2 x float> %17, i64 1
store float %39, float* %2
store float %20, float* %3
ret void
}