#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double pow(double, double);
double calculate_fl_from_la_ciecam02(double la) {
  double la5 = la * 5.0;
  double k = 1.0 / (la5 + 1.0);
  k = k * k;
  k = k * k;
  return (0.2 * k * la5) + (0.1 * (1.0 - k) * (1.0 - k) * pow(la5, 1.0 / 3.0));
}


x86 assembly (clang, -O0):
<calculate_fl_from_la_ciecam02>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xefb(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xed1(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
movsd  0xec4(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xea5(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe79(%rip),%xmm1
subsd  -0x18(%rbp),%xmm1
movsd  0xe74(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe60(%rip),%xmm1
subsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe3d(%rip),%xmm1
call   1030 <pow@plt>
movsd  -0x30(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
movaps %xmm0,%xmm3
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_fl_from_la_ciecam02>:
sub    $0x18,%rsp
mulsd  0xee4(%rip),%xmm0
movsd  0xee4(%rip),%xmm2
movapd %xmm0,%xmm1
movsd  %xmm0,(%rsp)
addsd  %xmm2,%xmm1
movapd %xmm2,%xmm3
divsd  %xmm1,%xmm3
mulsd  %xmm3,%xmm3
mulsd  %xmm3,%xmm3
subsd  %xmm3,%xmm2
mulsd  0xec3(%rip),%xmm3
movsd  %xmm3,0x10(%rsp)
movsd  0xebd(%rip),%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0xeaf(%rip),%xmm1
call   1030 <pow@plt>
mulsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  (%rsp),%xmm1
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @calculate_fl_from_la_ciecam02(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = fmul double %5, 5.000000e+00
store double %6, double* %3
%7 = load double, double* %3
%8 = fadd double %7, 1.000000e+00
%9 = fdiv double 1.000000e+00, %8
store double %9, double* %4
%10 = load double, double* %4
%11 = load double, double* %4
%12 = fmul double %10, %11
store double %12, double* %4
%13 = load double, double* %4
%14 = load double, double* %4
%15 = fmul double %13, %14
store double %15, double* %4
%16 = load double, double* %4
%17 = fmul double 2.000000e-01, %16
%18 = load double, double* %3
%19 = load double, double* %4
%20 = fsub double 1.000000e+00, %19
%21 = fmul double 1.000000e-01, %20
%22 = load double, double* %4
%23 = fsub double 1.000000e+00, %22
%24 = fmul double %21, %23
%25 = load double, double* %3
%26 = call double @pow(double %25, double 0x3FD5555555555555)
%27 = fmul double %24, %26
%28 = call double @llvm.fmuladd.f64(double %17, double %18, double %27)
ret double %28
}

LLVM IR (-O2):
define double @calculate_fl_from_la_ciecam02(double %0) {
%2 = fmul double %0, 5.000000e+00
%3 = fadd double %2, 1.000000e+00
%4 = fdiv double 1.000000e+00, %3
%5 = fmul double %4, %4
%6 = fmul double %5, %5
%7 = fmul double %6, 2.000000e-01
%8 = fsub double 1.000000e+00, %6
%9 = fmul double %8, 1.000000e-01
%10 = fmul double %8, %9
%11 = tail call double @pow(double %2, double 0x3FD5555555555555)
%12 = fmul double %10, %11
%13 = tail call double @llvm.fmuladd.f64(double %7, double %2, double %12)
ret double %13
}