#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 exp(double);
double sqrt(double);
double e_st(double st) {
  if (st > 500)
    return 32;
  else {
    double a = -0.00107 * st;
    double b = 0.03009 * sqrt(st);
    double c = 80.26 * exp(a + b);
    double d = -0.1185 * st;
    return c + d;
  }
}


x86 assembly (clang, -O0):
<e_st>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xec6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1156 <e_st+0x36>
movsd  0xedc(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11ca <e_st+0xaa>
movsd  0xec2(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xe9b(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xe70(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe57(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<e_st>:
sub    $0x18,%rsp
ucomisd 0xedc(%rip),%xmm0
jbe    1138 <e_st+0x18>
movsd  0xeca(%rip),%xmm1
jmp    1196 <e_st+0x76>
movsd  0xed0(%rip),%xmm2
mulsd  %xmm0,%xmm2
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
jb     115a <e_st+0x3a>
sqrtsd %xmm0,%xmm0
jmp    116b <e_st+0x4b>
movsd  %xmm2,0x8(%rsp)
call   1040 <sqrt@plt>
movsd  0x8(%rsp),%xmm2
mulsd  0xea5(%rip),%xmm0
subsd  %xmm2,%xmm0
call   1030 <exp@plt>
mulsd  0xe9c(%rip),%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  0xe96(%rip),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @e_st(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %3
%8 = load double, double* %3
%9 = fcmp ogt double %8, 5.000000e+02
br i1 %9, label %10, label %11
10: ; preds = %1
store double 3.200000e+01, double* %2
br label %27
11: ; preds = %1
%12 = load double, double* %3
%13 = fmul double -1.070000e-03, %12
store double %13, double* %4
%14 = load double, double* %3
%15 = call double @sqrt(double %14)
%16 = fmul double 3.009000e-02, %15
store double %16, double* %5
%17 = load double, double* %4
%18 = load double, double* %5
%19 = fadd double %17, %18
%20 = call double @exp(double %19)
%21 = fmul double 8.026000e+01, %20
store double %21, double* %6
%22 = load double, double* %3
%23 = fmul double -1.185000e-01, %22
store double %23, double* %7
%24 = load double, double* %6
%25 = load double, double* %7
%26 = fadd double %24, %25
store double %26, double* %2
br label %27
27: ; preds = %11, %10
%28 = load double, double* %2
ret double %28
}

LLVM IR (-O2):
define double @e_st(double %0) {
%2 = fcmp ogt double %0, 5.000000e+02
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = fmul double %0, 1.070000e-03
%5 = tail call double @sqrt(double %0)
%6 = fmul double %5, 3.009000e-02
%7 = fsub double %6, %4
%8 = tail call double @exp(double %7)
%9 = fmul double %8, 8.026000e+01
%10 = fmul double %0, 1.185000e-01
%11 = fsub double %9, %10
br label %12
12: ; preds = %1, %3
%13 = phi double [ %11, %3 ], [ 3.200000e+01, %1 ]
ret double %13
}