#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 ST(double ST) {
  double q8;
  if (ST > 500) {
    return 32;
  }
  q8 = 80.26 * exp(-0.00107 * ST + 0.03009 * sqrt(ST)) + -0.1185 * ST;
  return q8;
}


x86 assembly (clang, -O0):
<ST>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xec6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1156 <ST+0x36>
movsd  0xedc(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11bf <ST+0x9f>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm2
movsd  -0x20(%rbp),%xmm0
movsd  0xea6(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xe92(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  0xe75(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xe60(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ST>:
push   %rax
ucomisd 0xed7(%rip),%xmm0
jbe    1135 <ST+0x15>
movsd  0xef5(%rip),%xmm0
pop    %rax
ret
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
movsd  %xmm0,(%rsp)
jb     114a <ST+0x2a>
sqrtsd %xmm0,%xmm0
jmp    114f <ST+0x2f>
call   1040 <sqrt@plt>
mulsd  0xeb1(%rip),%xmm0
movsd  0xeb1(%rip),%xmm1
mulsd  (%rsp),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1030 <exp@plt>
movsd  (%rsp),%xmm1
mulsd  0xe9a(%rip),%xmm1
mulsd  0xe9a(%rip),%xmm0
addsd  %xmm1,%xmm0
pop    %rax
ret

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

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