double dt_air_0(double t0_dem, double tempk_water, double tempk_desert) {
  double a, b, result;
  double dtair_desert_0;
  if (tempk_desert > (273.15 + 48.0)) {
    dtair_desert_0 = 13.0;
  } else if (tempk_desert >= (273.15 + 40.0) &&
             tempk_desert < (273.15 + 48.0)) {
    dtair_desert_0 = 10.0;
  } else if (tempk_desert >= (273.15 + 32.0) &&
             tempk_desert < (273.15 + 40.0)) {
    dtair_desert_0 = 7.0;
  } else if (tempk_desert >= (273.15 + 25.0) &&
             tempk_desert < (273.15 + 32.0)) {
    dtair_desert_0 = 5.0;
  } else if (tempk_desert >= (273.15 + 18.0) &&
             tempk_desert < (273.15 + 25.0)) {
    dtair_desert_0 = 3.0;
  } else if (tempk_desert >= (273.15 + 11.0) &&
             tempk_desert < (273.15 + 18.0)) {
    dtair_desert_0 = 1.0;
  } else {
    dtair_desert_0 = 0.0;
  }
  a = (dtair_desert_0 - 0.0) / (tempk_desert - tempk_water);
  b = 0.0 - a * tempk_water;
  result = t0_dem * a + b;
  return result;
}


x86 assembly (clang, -O0):
<dt_air_0>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xee0(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    113c <dt_air_0+0x3c>
movsd  0xf26(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1289 <dt_air_0+0x189>
movsd  -0x18(%rbp),%xmm0
movsd  0xebf(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1178 <dt_air_0+0x78>
movsd  0xea5(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1178 <dt_air_0+0x78>
movsd  0xee2(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1284 <dt_air_0+0x184>
movsd  -0x18(%rbp),%xmm0
movsd  0xe8b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     11b4 <dt_air_0+0xb4>
movsd  0xe71(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    11b4 <dt_air_0+0xb4>
movsd  0xe9e(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    127f <dt_air_0+0x17f>
movsd  -0x18(%rbp),%xmm0
movsd  0xe57(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     11f0 <dt_air_0+0xf0>
movsd  0xe3d(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    11f0 <dt_air_0+0xf0>
movsd  0xe5a(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    127a <dt_air_0+0x17a>
movsd  -0x18(%rbp),%xmm0
movsd  0xe23(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     122c <dt_air_0+0x12c>
movsd  0xe09(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    122c <dt_air_0+0x12c>
movsd  0xe16(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1275 <dt_air_0+0x175>
movsd  -0x18(%rbp),%xmm0
movsd  0xdef(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1268 <dt_air_0+0x168>
movsd  0xdd5(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1268 <dt_air_0+0x168>
movsd  0xdd2(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1270 <dt_air_0+0x170>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1275 <dt_air_0+0x175>
jmp    127a <dt_air_0+0x17a>
jmp    127f <dt_air_0+0x17f>
jmp    1284 <dt_air_0+0x184>
jmp    1289 <dt_air_0+0x189>
movsd  -0x38(%rbp),%xmm0
xorps  %xmm1,%xmm1
subsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dt_air_0>:
ucomisd 0xf00(%rip),%xmm2
jbe    1117 <dt_air_0+0x17>
movsd  0xeee(%rip),%xmm3
jmp    11cc <dt_air_0+0xcc>
ucomisd 0xef1(%rip),%xmm2
jb     113c <dt_air_0+0x3c>
movsd  0xedf(%rip),%xmm3
ucomisd %xmm2,%xmm3
jbe    113c <dt_air_0+0x3c>
movsd  0xee1(%rip),%xmm3
jmp    11cc <dt_air_0+0xcc>
ucomisd 0xedc(%rip),%xmm2
jb     115e <dt_air_0+0x5e>
movsd  0xec2(%rip),%xmm3
ucomisd %xmm2,%xmm3
jbe    115e <dt_air_0+0x5e>
movsd  0xecc(%rip),%xmm3
jmp    11cc <dt_air_0+0xcc>
ucomisd 0xeca(%rip),%xmm2
jb     1180 <dt_air_0+0x80>
movsd  0xeb0(%rip),%xmm3
ucomisd %xmm2,%xmm3
jbe    1180 <dt_air_0+0x80>
movsd  0xeba(%rip),%xmm3
jmp    11cc <dt_air_0+0xcc>
ucomisd 0xeb8(%rip),%xmm2
jb     11a2 <dt_air_0+0xa2>
movsd  0xe9e(%rip),%xmm3
ucomisd %xmm2,%xmm3
jbe    11a2 <dt_air_0+0xa2>
movsd  0xea8(%rip),%xmm3
jmp    11cc <dt_air_0+0xcc>
movsd  0xea6(%rip),%xmm4
movapd %xmm2,%xmm5
cmpltsd 0xe89(%rip),%xmm5
cmplesd %xmm2,%xmm4
movsd  0xe94(%rip),%xmm3
andpd  %xmm5,%xmm3
andpd  %xmm4,%xmm3
subsd  %xmm1,%xmm2
divsd  %xmm2,%xmm3
mulsd  %xmm3,%xmm1
xorpd  %xmm2,%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @dt_air_0(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%11 = load double, double* %6
%12 = fcmp ogt double %11, 3.211500e+02
br i1 %12, label %13, label %14
13: ; preds = %3
store double 1.300000e+01, double* %10
br label %55
14: ; preds = %3
%15 = load double, double* %6
%16 = fcmp oge double %15, 3.131500e+02
br i1 %16, label %17, label %21
17: ; preds = %14
%18 = load double, double* %6
%19 = fcmp olt double %18, 3.211500e+02
br i1 %19, label %20, label %21
20: ; preds = %17
store double 1.000000e+01, double* %10
br label %54
21: ; preds = %17, %14
%22 = load double, double* %6
%23 = fcmp oge double %22, 3.051500e+02
br i1 %23, label %24, label %28
24: ; preds = %21
%25 = load double, double* %6
%26 = fcmp olt double %25, 3.131500e+02
br i1 %26, label %27, label %28
27: ; preds = %24
store double 7.000000e+00, double* %10
br label %53
28: ; preds = %24, %21
%29 = load double, double* %6
%30 = fcmp oge double %29, 2.981500e+02
br i1 %30, label %31, label %35
31: ; preds = %28
%32 = load double, double* %6
%33 = fcmp olt double %32, 3.051500e+02
br i1 %33, label %34, label %35
34: ; preds = %31
store double 5.000000e+00, double* %10
br label %52
35: ; preds = %31, %28
%36 = load double, double* %6
%37 = fcmp oge double %36, 2.911500e+02
br i1 %37, label %38, label %42
38: ; preds = %35
%39 = load double, double* %6
%40 = fcmp olt double %39, 2.981500e+02
br i1 %40, label %41, label %42
41: ; preds = %38
store double 3.000000e+00, double* %10
br label %51
42: ; preds = %38, %35
%43 = load double, double* %6
%44 = fcmp oge double %43, 2.841500e+02
br i1 %44, label %45, label %49
45: ; preds = %42
%46 = load double, double* %6
%47 = fcmp olt double %46, 2.911500e+02
br i1 %47, label %48, label %49
48: ; preds = %45
store double 1.000000e+00, double* %10
br label %50
49: ; preds = %45, %42
store double 0.000000e+00, double* %10
br label %50
50: ; preds = %49, %48
br label %51
51: ; preds = %50, %41
br label %52
52: ; preds = %51, %34
br label %53
53: ; preds = %52, %27
br label %54
54: ; preds = %53, %20
br label %55
55: ; preds = %54, %13
%56 = load double, double* %10
%57 = fsub double %56, 0.000000e+00
%58 = load double, double* %6
%59 = load double, double* %5
%60 = fsub double %58, %59
%61 = fdiv double %57, %60
store double %61, double* %7
%62 = load double, double* %7
%63 = load double, double* %5
%64 = fneg double %62
%65 = call double @llvm.fmuladd.f64(double %64, double %63, double 0.000000e+00)
store double %65, double* %8
%66 = load double, double* %4
%67 = load double, double* %7
%68 = load double, double* %8
%69 = call double @llvm.fmuladd.f64(double %66, double %67, double %68)
store double %69, double* %9
%70 = load double, double* %9
ret double %70
}

LLVM IR (-O2):
define double @dt_air_0(double %0, double %1, double %2) {
%4 = fcmp ogt double %2, 3.211500e+02
br i1 %4, label %26, label %5
5: ; preds = %3
%6 = fcmp oge double %2, 3.131500e+02
%7 = fcmp olt double %2, 3.211500e+02
%8 = and i1 %6, %7
br i1 %8, label %26, label %9
9: ; preds = %5
%10 = fcmp oge double %2, 3.051500e+02
%11 = fcmp olt double %2, 3.131500e+02
%12 = and i1 %10, %11
br i1 %12, label %26, label %13
13: ; preds = %9
%14 = fcmp oge double %2, 2.981500e+02
%15 = fcmp olt double %2, 3.051500e+02
%16 = and i1 %14, %15
br i1 %16, label %26, label %17
17: ; preds = %13
%18 = fcmp oge double %2, 2.911500e+02
%19 = fcmp olt double %2, 2.981500e+02
%20 = and i1 %18, %19
br i1 %20, label %26, label %21
21: ; preds = %17
%22 = fcmp oge double %2, 2.841500e+02
%23 = fcmp olt double %2, 2.911500e+02
%24 = and i1 %22, %23
%25 = select i1 %24, double 1.000000e+00, double 0.000000e+00
br label %26
26: ; preds = %21, %17, %13, %9, %5, %3
%27 = phi double [ 1.300000e+01, %3 ], [ 1.000000e+01, %5 ], [ 7.000000e+00, %9 ], [ 5.000000e+00, %13 ], [ 3.000000e+00, %17 ], [ %25, %21 ]
%28 = fsub double %2, %1
%29 = fdiv double %27, %28
%30 = fneg double %29
%31 = tail call double @llvm.fmuladd.f64(double %30, double %1, double 0.000000e+00)
%32 = tail call double @llvm.fmuladd.f64(double %0, double %29, double %31)
ret double %32
}