#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 */
int exp(double);
double pow(double, int);
double Schoenfeldt_thermal(double I_th, double T, double I_SD, double alpha,
                           double lambda_cf, double lambda) {
  double k_Th = 949;
  return I_th * exp(-k_Th / (T * lambda * lambda)) * (2 * k_Th * k_Th) /
             (T * T * pow(lambda, 5)) +
         I_SD * (1 / lambda) * 1 / (1 + exp(alpha * (lambda - lambda_cf)));
}


x86 assembly (clang, -O0):
<Schoenfeldt_thermal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  0xec2(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  -0x60(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe62(%rip),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x30(%rbp),%xmm0
mov    $0x5,%edi
call   1040 <pow@plt>
movsd  -0x58(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x50(%rbp),%xmm0
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe02(%rip),%xmm1
divsd  -0x30(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdf1(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
subsd  -0x28(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  -0x48(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm0
add    $0x1,%eax
cvtsi2sd %eax,%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Schoenfeldt_thermal>:
sub    $0x38,%rsp
movsd  %xmm4,0x28(%rsp)
movsd  %xmm3,0x30(%rsp)
movsd  %xmm2,0x20(%rsp)
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
movapd %xmm1,%xmm2
movsd  %xmm5,0x18(%rsp)
mulsd  %xmm5,%xmm2
mulsd  %xmm5,%xmm2
movsd  0xea4(%rip),%xmm0
divsd  %xmm2,%xmm0
call   1030 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
mulsd  0xe8e(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
mulsd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x18(%rsp),%xmm0
mov    $0x5,%edi
call   1040 <pow@plt>
mulsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0xe52(%rip),%xmm1
movsd  0x18(%rsp),%xmm0
divsd  %xmm0,%xmm1
mulsd  0x20(%rsp),%xmm1
movsd  %xmm1,0x8(%rsp)
subsd  0x28(%rsp),%xmm0
mulsd  0x30(%rsp),%xmm0
call   1030 <exp@plt>
add    $0x1,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x8(%rsp),%xmm0
divsd  %xmm1,%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define double @Schoenfeldt_thermal(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
store double 9.490000e+02, double* %13
%14 = load double, double* %7
%15 = load double, double* %13
%16 = fneg double %15
%17 = load double, double* %8
%18 = load double, double* %12
%19 = fmul double %17, %18
%20 = load double, double* %12
%21 = fmul double %19, %20
%22 = fdiv double %16, %21
%23 = call i32 @exp(double %22)
%24 = sitofp i32 %23 to double
%25 = fmul double %14, %24
%26 = load double, double* %13
%27 = fmul double 2.000000e+00, %26
%28 = load double, double* %13
%29 = fmul double %27, %28
%30 = fmul double %25, %29
%31 = load double, double* %8
%32 = load double, double* %8
%33 = fmul double %31, %32
%34 = load double, double* %12
%35 = call double @pow(double %34, i32 5)
%36 = fmul double %33, %35
%37 = fdiv double %30, %36
%38 = load double, double* %9
%39 = load double, double* %12
%40 = fdiv double 1.000000e+00, %39
%41 = fmul double %38, %40
%42 = fmul double %41, 1.000000e+00
%43 = load double, double* %10
%44 = load double, double* %12
%45 = load double, double* %11
%46 = fsub double %44, %45
%47 = fmul double %43, %46
%48 = call i32 @exp(double %47)
%49 = add nsw i32 1, %48
%50 = sitofp i32 %49 to double
%51 = fdiv double %42, %50
%52 = fadd double %37, %51
ret double %52
}

LLVM IR (-O2):
define double @Schoenfeldt_thermal(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = fmul double %1, %5
%8 = fmul double %7, %5
%9 = fdiv double -9.490000e+02, %8
%10 = tail call i32 @exp(double %9)
%11 = sitofp i32 %10 to double
%12 = fmul double %11, %0
%13 = fmul double %12, 0x413B7BF200000000
%14 = fmul double %1, %1
%15 = tail call double @pow(double %5, i32 5)
%16 = fmul double %14, %15
%17 = fdiv double %13, %16
%18 = fdiv double 1.000000e+00, %5
%19 = fmul double %18, %2
%20 = fsub double %5, %4
%21 = fmul double %20, %3
%22 = tail call i32 @exp(double %21)
%23 = add nsw i32 %22, 1
%24 = sitofp i32 %23 to double
%25 = fdiv double %19, %24
%26 = fadd double %17, %25
ret double %26
}