#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);
float heat_index(float temperature, float relative_humidity) {
  float heat_index =
      -42.379 + (2.04901523 * temperature) + (10.14333127 * relative_humidity) +
      (-0.22475541 * temperature * relative_humidity) +
      (-6.83783E-3 * temperature * temperature) +
      (-5.481717E-2 * relative_humidity * relative_humidity) +
      (1.22874E-3 * temperature * temperature * relative_humidity) +
      (8.5282E-4 * temperature * relative_humidity * relative_humidity) +
      (-1.99E-6 * temperature * temperature * relative_humidity *
       relative_humidity);
  if (relative_humidity < 13.0 && (temperature > 80.0 && temperature < 112.0))
    heat_index -= ((13.0 - relative_humidity) / 4.0) *
                  sqrt((17.0 - (temperature - 95.0)) / 17.0);
  else if (relative_humidity > 85.0 &&
           (temperature > 80.0 && temperature < 87.0))
    heat_index +=
        ((relative_humidity - 85.0) / 10.0) * ((87.0 - temperature) / 5.0);
  else
    return temperature;
  return heat_index;
}


x86 assembly (clang, -O0):
<heat_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xf0d(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xf09(%rip),%xmm0
addsd  %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee4(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xec3(%rip),%xmm1
mulsd  %xmm2,%xmm1
movss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xe95(%rip),%xmm0
mulsd  %xmm2,%xmm0
movss  -0x8(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xe67(%rip),%xmm1
mulsd  %xmm2,%xmm1
movss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xe39(%rip),%xmm0
mulsd  %xmm2,%xmm0
movss  -0x8(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm0
movss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xdfe(%rip),%xmm1
mulsd  %xmm2,%xmm1
movss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm1
movss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xdc3(%rip),%xmm0
mulsd  %xmm2,%xmm0
movss  -0x8(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm0
movss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm0
movss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd72(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1364 <heat_index+0x254>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xda7(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1364 <heat_index+0x254>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd94(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1364 <heat_index+0x254>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd21(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  0xda5(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd83(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xd6f(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  0xd63(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm2
movsd  -0x18(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    142a <heat_index+0x31a>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xceb(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1416 <heat_index+0x306>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xcc0(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1416 <heat_index+0x306>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xcbd(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1416 <heat_index+0x306>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xc9a(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xca6(%rip),%xmm1
divsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xc81(%rip),%xmm2
subsd  %xmm1,%xmm2
movsd  0xc7d(%rip),%xmm1
divsd  %xmm1,%xmm2
movss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    1425 <heat_index+0x315>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1434 <heat_index+0x324>
jmp    142a <heat_index+0x31a>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<heat_index>:
sub    $0x18,%rsp
cvtss2sd %xmm0,%xmm2
movsd  0xee0(%rip),%xmm4
mulsd  %xmm2,%xmm4
addsd  0xedc(%rip),%xmm4
cvtss2sd %xmm1,%xmm3
movsd  0xed8(%rip),%xmm5
mulsd  %xmm3,%xmm5
addsd  %xmm4,%xmm5
movsd  0xed0(%rip),%xmm4
mulsd  %xmm2,%xmm4
mulsd  %xmm3,%xmm4
addsd  %xmm5,%xmm4
movsd  0xec4(%rip),%xmm5
mulsd  %xmm2,%xmm5
mulsd  %xmm2,%xmm5
addsd  %xmm4,%xmm5
movsd  0xeb8(%rip),%xmm4
mulsd  %xmm3,%xmm4
mulsd  %xmm3,%xmm4
addsd  %xmm5,%xmm4
movsd  0xeac(%rip),%xmm5
mulsd  %xmm2,%xmm5
mulsd  %xmm2,%xmm5
mulsd  %xmm3,%xmm5
addsd  %xmm4,%xmm5
movsd  0xe9c(%rip),%xmm4
mulsd  %xmm2,%xmm4
mulsd  %xmm3,%xmm4
mulsd  %xmm3,%xmm4
addsd  %xmm5,%xmm4
movsd  0xe8c(%rip),%xmm5
mulsd  %xmm2,%xmm5
mulsd  %xmm2,%xmm5
mulsd  %xmm3,%xmm5
mulsd  %xmm3,%xmm5
addsd  %xmm4,%xmm5
cvtsd2ss %xmm5,%xmm5
movss  0xeb4(%rip),%xmm4
ucomiss %xmm0,%xmm4
jbe    1227 <heat_index+0x117>
ucomiss 0xeac(%rip),%xmm0
jbe    1227 <heat_index+0x117>
movss  0xea6(%rip),%xmm4
ucomiss %xmm1,%xmm4
jbe    1227 <heat_index+0x117>
movsd  0xe71(%rip),%xmm4
subsd  %xmm3,%xmm4
addsd  0xe6d(%rip),%xmm2
movsd  0xe6d(%rip),%xmm1
movapd %xmm1,%xmm0
subsd  %xmm2,%xmm0
divsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     127f <heat_index+0x16f>
sqrtsd %xmm0,%xmm0
jmp    129c <heat_index+0x18c>
movss  0xe65(%rip),%xmm4
ucomiss %xmm0,%xmm4
jbe    12ba <heat_index+0x1aa>
ucomiss 0xe4d(%rip),%xmm0
jbe    12ba <heat_index+0x1aa>
ucomiss 0xe50(%rip),%xmm1
jbe    12ba <heat_index+0x1aa>
addsd  0xdf6(%rip),%xmm3
divsd  0xdf6(%rip),%xmm3
movsd  0xdf6(%rip),%xmm0
subsd  %xmm2,%xmm0
divsd  0xdf2(%rip),%xmm0
mulsd  %xmm3,%xmm0
xorps  %xmm4,%xmm4
cvtss2sd %xmm5,%xmm4
addsd  %xmm0,%xmm4
jmp    12b3 <heat_index+0x1a3>
movss  %xmm5,0xc(%rsp)
movsd  %xmm4,0x10(%rsp)
call   1030 <sqrt@plt>
movsd  0x10(%rsp),%xmm4
movss  0xc(%rsp),%xmm5
xorps  %xmm1,%xmm1
cvtss2sd %xmm5,%xmm1
mulsd  0xdd5(%rip),%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm1,%xmm4
xorps  %xmm0,%xmm0
cvtsd2ss %xmm4,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @heat_index(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = call double @llvm.fmuladd.f64(double 0x4000646218CED8EC, double %8, double -4.237900e+01)
%10 = load float, float* %5
%11 = fpext float %10 to double
%12 = call double @llvm.fmuladd.f64(double 0x40244962B75A49CD, double %11, double %9)
%13 = load float, float* %4
%14 = fpext float %13 to double
%15 = fmul double 0xBFCCC4C907C647F8, %14
%16 = load float, float* %5
%17 = fpext float %16 to double
%18 = call double @llvm.fmuladd.f64(double %15, double %17, double %12)
%19 = load float, float* %4
%20 = fpext float %19 to double
%21 = fmul double -6.837830e-03, %20
%22 = load float, float* %4
%23 = fpext float %22 to double
%24 = call double @llvm.fmuladd.f64(double %21, double %23, double %18)
%25 = load float, float* %5
%26 = fpext float %25 to double
%27 = fmul double 0xBFAC10FF00D18C24, %26
%28 = load float, float* %5
%29 = fpext float %28 to double
%30 = call double @llvm.fmuladd.f64(double %27, double %29, double %24)
%31 = load float, float* %4
%32 = fpext float %31 to double
%33 = fmul double 1.228740e-03, %32
%34 = load float, float* %4
%35 = fpext float %34 to double
%36 = fmul double %33, %35
%37 = load float, float* %5
%38 = fpext float %37 to double
%39 = call double @llvm.fmuladd.f64(double %36, double %38, double %30)
%40 = load float, float* %4
%41 = fpext float %40 to double
%42 = fmul double 8.528200e-04, %41
%43 = load float, float* %5
%44 = fpext float %43 to double
%45 = fmul double %42, %44
%46 = load float, float* %5
%47 = fpext float %46 to double
%48 = call double @llvm.fmuladd.f64(double %45, double %47, double %39)
%49 = load float, float* %4
%50 = fpext float %49 to double
%51 = fmul double -1.990000e-06, %50
%52 = load float, float* %4
%53 = fpext float %52 to double
%54 = fmul double %51, %53
%55 = load float, float* %5
%56 = fpext float %55 to double
%57 = fmul double %54, %56
%58 = load float, float* %5
%59 = fpext float %58 to double
%60 = call double @llvm.fmuladd.f64(double %57, double %59, double %48)
%61 = fptrunc double %60 to float
store float %61, float* %6
%62 = load float, float* %5
%63 = fpext float %62 to double
%64 = fcmp olt double %63, 1.300000e+01
br i1 %64, label %65, label %89
65: ; preds = %2
%66 = load float, float* %4
%67 = fpext float %66 to double
%68 = fcmp ogt double %67, 8.000000e+01
br i1 %68, label %69, label %89
69: ; preds = %65
%70 = load float, float* %4
%71 = fpext float %70 to double
%72 = fcmp olt double %71, 1.120000e+02
br i1 %72, label %73, label %89
73: ; preds = %69
%74 = load float, float* %5
%75 = fpext float %74 to double
%76 = fsub double 1.300000e+01, %75
%77 = fdiv double %76, 4.000000e+00
%78 = load float, float* %4
%79 = fpext float %78 to double
%80 = fsub double %79, 9.500000e+01
%81 = fsub double 1.700000e+01, %80
%82 = fdiv double %81, 1.700000e+01
%83 = call double @sqrt(double %82)
%84 = load float, float* %6
%85 = fpext float %84 to double
%86 = fneg double %77
%87 = call double @llvm.fmuladd.f64(double %86, double %83, double %85)
%88 = fptrunc double %87 to float
store float %88, float* %6
br label %117
89: ; preds = %69, %65, %2
%90 = load float, float* %5
%91 = fpext float %90 to double
%92 = fcmp ogt double %91, 8.500000e+01
br i1 %92, label %93, label %114
93: ; preds = %89
%94 = load float, float* %4
%95 = fpext float %94 to double
%96 = fcmp ogt double %95, 8.000000e+01
br i1 %96, label %97, label %114
97: ; preds = %93
%98 = load float, float* %4
%99 = fpext float %98 to double
%100 = fcmp olt double %99, 8.700000e+01
br i1 %100, label %101, label %114
101: ; preds = %97
%102 = load float, float* %5
%103 = fpext float %102 to double
%104 = fsub double %103, 8.500000e+01
%105 = fdiv double %104, 1.000000e+01
%106 = load float, float* %4
%107 = fpext float %106 to double
%108 = fsub double 8.700000e+01, %107
%109 = fdiv double %108, 5.000000e+00
%110 = load float, float* %6
%111 = fpext float %110 to double
%112 = call double @llvm.fmuladd.f64(double %105, double %109, double %111)
%113 = fptrunc double %112 to float
store float %113, float* %6
br label %116
114: ; preds = %97, %93, %89
%115 = load float, float* %4
store float %115, float* %3
br label %119
116: ; preds = %101
br label %117
117: ; preds = %116, %73
%118 = load float, float* %6
store float %118, float* %3
br label %119
119: ; preds = %117, %114
%120 = load float, float* %3
ret float %120
}

LLVM IR (-O2):
define float @heat_index(float %0, float %1) {
%3 = fpext float %0 to double
%4 = tail call double @llvm.fmuladd.f64(double %3, double 0x4000646218CED8EC, double -4.237900e+01)
%5 = fpext float %1 to double
%6 = tail call double @llvm.fmuladd.f64(double %5, double 0x40244962B75A49CD, double %4)
%7 = fmul double %3, 0xBFCCC4C907C647F8
%8 = tail call double @llvm.fmuladd.f64(double %7, double %5, double %6)
%9 = fmul double %3, -6.837830e-03
%10 = tail call double @llvm.fmuladd.f64(double %9, double %3, double %8)
%11 = fmul double %5, 0xBFAC10FF00D18C24
%12 = tail call double @llvm.fmuladd.f64(double %11, double %5, double %10)
%13 = fmul double %3, 1.228740e-03
%14 = fmul double %13, %3
%15 = tail call double @llvm.fmuladd.f64(double %14, double %5, double %12)
%16 = fmul double %3, 8.528200e-04
%17 = fmul double %16, %5
%18 = tail call double @llvm.fmuladd.f64(double %17, double %5, double %15)
%19 = fmul double %3, -1.990000e-06
%20 = fmul double %19, %3
%21 = fmul double %20, %5
%22 = tail call double @llvm.fmuladd.f64(double %21, double %5, double %18)
%23 = fptrunc double %22 to float
%24 = fcmp olt float %1, 1.300000e+01
%25 = fcmp ogt float %0, 8.000000e+01
%26 = and i1 %25, %24
%27 = fcmp olt float %0, 1.120000e+02
%28 = and i1 %27, %26
br i1 %28, label %29, label %38
29: ; preds = %2
%30 = fsub double 1.300000e+01, %5
%31 = fadd double %3, -9.500000e+01
%32 = fsub double 1.700000e+01, %31
%33 = fdiv double %32, 1.700000e+01
%34 = tail call double @sqrt(double %33)
%35 = fpext float %23 to double
%36 = fmul double %30, -2.500000e-01
%37 = tail call double @llvm.fmuladd.f64(double %36, double %34, double %35)
br label %50
38: ; preds = %2
%39 = fcmp ogt float %1, 8.500000e+01
%40 = and i1 %25, %39
%41 = fcmp olt float %0, 8.700000e+01
%42 = and i1 %41, %40
br i1 %42, label %43, label %53
43: ; preds = %38
%44 = fadd double %5, -8.500000e+01
%45 = fdiv double %44, 1.000000e+01
%46 = fsub double 8.700000e+01, %3
%47 = fdiv double %46, 5.000000e+00
%48 = fpext float %23 to double
%49 = tail call double @llvm.fmuladd.f64(double %45, double %47, double %48)
br label %50
50: ; preds = %43, %29
%51 = phi double [ %37, %29 ], [ %49, %43 ]
%52 = fptrunc double %51 to float
br label %53
53: ; preds = %38, %50
%54 = phi float [ %52, %50 ], [ %0, %38 ]
ret float %54
}