#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 sqrt(double);
double windchillTemperature(double t, double ff, double missval) {
  static const double tmax = 33.0;
  static const double vmin = 1.39;
  return ff < vmin || t > tmax
             ? missval
             : tmax + (t - tmax) * (0.478 + 0.237 * (sqrt(ff * 3.6) -
                                                     0.0124 * ff * 3.6));
}


x86 assembly (clang, -O0):
<windchillTemperature>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  0xed1(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
ja     1151 <windchillTemperature+0x41>
movsd  -0x8(%rbp),%xmm0
movsd  0xec1(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1160 <windchillTemperature+0x50>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    11f1 <windchillTemperature+0xe1>
movsd  -0x8(%rbp),%xmm0
movsd  0xe9b(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xea2(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm2
movsd  -0x28(%rbp),%xmm0
movsd  0xe90(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xe64(%rip),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  0xe44(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe40(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe20(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<windchillTemperature>:
sub    $0x18,%rsp
ucomisd 0xee4(%rip),%xmm0
ja     1154 <windchillTemperature+0x44>
movapd %xmm0,%xmm3
movsd  0xede(%rip),%xmm0
ucomisd %xmm1,%xmm0
ja     1154 <windchillTemperature+0x44>
addsd  0xed8(%rip),%xmm3
movsd  0xed8(%rip),%xmm0
mulsd  %xmm1,%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jb     115c <windchillTemperature+0x4c>
sqrtsd %xmm0,%xmm0
jmp    1179 <windchillTemperature+0x69>
movaps %xmm2,%xmm0
add    $0x18,%rsp
ret
movsd  %xmm3,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
call   1030 <sqrt@plt>
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm3
mulsd  0xe9f(%rip),%xmm1
mulsd  0xe8f(%rip),%xmm1
addsd  %xmm0,%xmm1
mulsd  0xe93(%rip),%xmm1
addsd  0xe93(%rip),%xmm1
mulsd  %xmm1,%xmm3
addsd  0xe57(%rip),%xmm3
movapd %xmm3,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@windchillTemperature.tmax = internal constant double 3.300000e+01
@windchillTemperature.vmin = internal constant double 1.390000e+00
define double @windchillTemperature(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %5
%8 = fcmp olt double %7, 1.390000e+00
br i1 %8, label %12, label %9
9: ; preds = %3
%10 = load double, double* %4
%11 = fcmp ogt double %10, 3.300000e+01
br i1 %11, label %12, label %14
12: ; preds = %9, %3
%13 = load double, double* %6
br label %26
14: ; preds = %9
%15 = load double, double* %4
%16 = fsub double %15, 3.300000e+01
%17 = load double, double* %5
%18 = fmul double %17, 3.600000e+00
%19 = call double @sqrt(double %18)
%20 = load double, double* %5
%21 = fmul double 1.240000e-02, %20
%22 = fneg double %21
%23 = call double @llvm.fmuladd.f64(double %22, double 3.600000e+00, double %19)
%24 = call double @llvm.fmuladd.f64(double 2.370000e-01, double %23, double 4.780000e-01)
%25 = call double @llvm.fmuladd.f64(double %16, double %24, double 3.300000e+01)
br label %26
26: ; preds = %14, %12
%27 = phi double [ %13, %12 ], [ %25, %14 ]
ret double %27
}

LLVM IR (-O2):
define double @windchillTemperature(double %0, double %1, double %2) {
%4 = fcmp olt double %1, 1.390000e+00
%5 = fcmp ogt double %0, 3.300000e+01
%6 = or i1 %5, %4
br i1 %6, label %15, label %7
7: ; preds = %3
%8 = fadd double %0, -3.300000e+01
%9 = fmul double %1, 3.600000e+00
%10 = tail call double @sqrt(double %9)
%11 = fmul double %1, -1.240000e-02
%12 = tail call double @llvm.fmuladd.f64(double %11, double 3.600000e+00, double %10)
%13 = tail call double @llvm.fmuladd.f64(double %12, double 2.370000e-01, double 4.780000e-01)
%14 = tail call double @llvm.fmuladd.f64(double %8, double %13, double 3.300000e+01)
br label %15
15: ; preds = %3, %7
%16 = phi double [ %14, %7 ], [ %2, %3 ]
ret double %16
}