float correct(float Td, float Z) {
  float a00, a01, a10, a11, correction, d_fraction, z_fraction;
  int d_index, z_index;
  static const float alt_incr = 500.0;
  static const float alts[6] = {0.0, 500.0, 1000.0, 1500.0, 2000.0, 2500.0};
  static const float dew_incr = 2.0;
  static const float dews[30] = {
      -28.0, -26.0, -24.0, -22.0, -20.0, -18.0, -16.0, -14.0, -12.0, -10.0,
      -8.0,  -6.0,  -4.0,  -2.0,  0.0,   2.0,   4.0,   6.0,   8.0,   10.0,
      12.0,  14.0,  16.0,  18.0,  20.0,  22.0,  24.0,  26.0,  28.0,  30.0};
  static const float corrections[6][30] = {
      0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.2, 0.2, 0.2, 0.3, 0.3, 0.4, 0.5, 0.6,
      0.7, 0.8, 0.9, 1.0, 1.2, 1.3, 1.5, 1.7, 1.9, 2.2, 2.5, 2.8, 3.2, 3.6,
      4.1, 4.6, 0.1, 0.1, 0.1, 0.1, 0.1, 0.2, 0.2, 0.2, 0.3, 0.3, 0.4, 0.4,
      0.5, 0.6, 0.7, 0.8, 1.0, 1.1, 1.3, 1.5, 1.7, 1.9, 2.2, 2.5, 2.8, 3.2,
      3.6, 4.0, 4.6, 5.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.2, 0.2, 0.2, 0.3, 0.4,
      0.4, 0.5, 0.6, 0.7, 0.8, 1.0, 1.1, 1.3, 1.5, 1.7, 1.9, 2.2, 2.5, 2.8,
      3.2, 3.6, 4.0, 4.6, 5.1, 5.8, 0.1, 0.1, 0.1, 0.1, 0.2, 0.2, 0.2, 0.3,
      0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.1, 1.2, 1.4, 1.6, 1.9, 2.1, 2.4,
      2.8, 3.1, 3.6, 4.0, 4.6, 5.1, 5.8, 6.5, 0.1, 0.1, 0.1, 0.1, 0.2, 0.2,
      0.3, 0.3, 0.4, 0.5, 0.5, 0.6, 0.8, 0.9, 1.1, 1.2, 1.4, 1.6, 1.8, 2.1,
      2.4, 2.7, 3.1, 3.5, 4.0, 4.5, 5.1, 5.8, 6.5, 7.3, 0.1, 0.1, 0.1, 0.2,
      0.2, 0.2, 0.3, 0.4, 0.4, 0.5, 0.6, 0.7, 0.9, 1.0, 1.2, 1.4, 1.6, 1.8,
      2.1, 2.4, 2.7, 3.1, 3.5, 4.0, 4.5, 5.1, 5.8, 6.5, 7.3, 8.2};
  if (dews[0] <= Td && Td < dews[30 - 1]) {
    d_index = (int)((Td - dews[0]) / dew_incr);
    d_fraction = (Td - dews[d_index]) / dew_incr;
  } else if (dews[0] > Td) {
    d_index = 0;
    d_fraction = (Td - dews[0]) / dew_incr;
  } else if (Td == dews[30 - 1]) {
    d_index = 30 - 2;
    d_fraction = 1.0;
  } else {
    d_index = 30 - 2;
    d_fraction = (Td - dews[30 - 1]) / dew_incr;
  }
  if (alts[0] <= Z && Z < alts[6 - 1]) {
    z_index = (int)((Z - alts[0]) / alt_incr);
    z_fraction = (Z - alts[z_index]) / alt_incr;
  } else if (alts[0] > Z) {
    z_index = 0;
    z_fraction = (Z - alts[0]) / alt_incr;
  } else if (Z == alts[6 - 1]) {
    z_index = 6 - 2;
    z_fraction = 1.0;
  } else {
    z_index = 6 - 2;
    z_fraction = (Z - alts[6 - 1]) / alt_incr;
  }
  a00 = corrections[z_index + 0][d_index + 0];
  a10 = corrections[z_index + 1][d_index + 0] - a00;
  a01 = corrections[z_index + 0][d_index + 1] - a00;
  a11 = -a10 - corrections[z_index + 0][d_index + 1] +
        corrections[z_index + 1][d_index + 1];
  correction =
      a00 + z_fraction * a10 + d_fraction * a01 + a11 * z_fraction * d_fraction;
  return ((correction >= 0.0) ? correction : 0.0);
}


x86 assembly (clang, -O0):
<correct>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  0xf2a(%rip),%xmm1
movss  -0x4(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     1185 <correct+0x85>
movss  -0x4(%rbp),%xmm1
movss  0xf83(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    1185 <correct+0x85>
movss  -0x4(%rbp),%xmm0
subss  0xef9(%rip),%xmm0
movss  0xeb1(%rip),%xmm1
divss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x28(%rbp)
movss  -0x4(%rbp),%xmm0
movslq -0x28(%rbp),%rcx
lea    0xed6(%rip),%rax
subss  (%rax,%rcx,4),%xmm0
movss  0xe89(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
jmp    1221 <correct+0x121>
movss  0xeb3(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    11c1 <correct+0xc1>
movl   $0x0,-0x28(%rbp)
movss  -0x4(%rbp),%xmm0
subss  0xe95(%rip),%xmm0
movss  0xe4d(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
jmp    121c <correct+0x11c>
movss  -0x4(%rbp),%xmm0
ucomiss 0xee7(%rip),%xmm0
jne    11f2 <correct+0xf2>
jp     11f2 <correct+0xf2>
movl   $0x1c,-0x28(%rbp)
movss  0xe1c(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
jmp    1217 <correct+0x117>
movl   $0x1c,-0x28(%rbp)
movss  -0x4(%rbp),%xmm0
subss  0xeae(%rip),%xmm0
movss  0xdf2(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
jmp    121c <correct+0x11c>
jmp    1221 <correct+0x121>
movss  0xdf7(%rip),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     1298 <correct+0x198>
movss  -0x8(%rbp),%xmm1
movss  0xdf0(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    1298 <correct+0x198>
movss  -0x8(%rbp),%xmm0
subss  0xdc6(%rip),%xmm0
movss  0xda6(%rip),%xmm1
divss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x2c(%rbp)
movss  -0x8(%rbp),%xmm0
movslq -0x2c(%rbp),%rcx
lea    0xda3(%rip),%rax
subss  (%rax,%rcx,4),%xmm0
movss  0xd7e(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
jmp    1334 <correct+0x234>
movss  0xd80(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    12d4 <correct+0x1d4>
movl   $0x0,-0x2c(%rbp)
movss  -0x8(%rbp),%xmm0
subss  0xd62(%rip),%xmm0
movss  0xd42(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
jmp    132f <correct+0x22f>
movss  -0x8(%rbp),%xmm0
ucomiss 0xd54(%rip),%xmm0
jne    1305 <correct+0x205>
jp     1305 <correct+0x205>
movl   $0x4,-0x2c(%rbp)
movss  0xd09(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
jmp    132a <correct+0x22a>
movl   $0x4,-0x2c(%rbp)
movss  -0x8(%rbp),%xmm0
subss  0xd1b(%rip),%xmm0
movss  0xce7(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
jmp    132f <correct+0x22f>
jmp    1334 <correct+0x234>
mov    -0x2c(%rbp),%eax
add    $0x0,%eax
movslq %eax,%rcx
lea    0xd7c(%rip),%rax
imul   $0x78,%rcx,%rcx
add    %rcx,%rax
mov    -0x28(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rcx
lea    0xd52(%rip),%rax
imul   $0x78,%rcx,%rcx
add    %rcx,%rax
mov    -0x28(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
subss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x0,%eax
movslq %eax,%rcx
lea    0xd23(%rip),%rax
imul   $0x78,%rcx,%rcx
add    %rcx,%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
subss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x14(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x2c(%rbp),%eax
add    $0x0,%eax
movslq %eax,%rcx
lea    0xce2(%rip),%rax
imul   $0x78,%rcx,%rcx
add    %rcx,%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
subss  (%rax,%rcx,4),%xmm0
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rcx
lea    0xcbd(%rip),%rax
imul   $0x78,%rcx,%rcx
add    %rcx,%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0xc(%rbp),%xmm1
movss  -0x24(%rbp),%xmm0
movss  -0x14(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  -0x20(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x18(%rbp),%xmm0
mulss  -0x24(%rbp),%xmm0
movss  -0x20(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     148b <correct+0x38b>
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1498 <correct+0x398>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1498 <correct+0x398>
movsd  -0x38(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<correct>:
ucomiss 0xef9(%rip),%xmm0
jb     1147 <correct+0x47>
movss  0xef3(%rip),%xmm2
ucomiss %xmm0,%xmm2
jbe    1147 <correct+0x47>
movss  0xef6(%rip),%xmm2
addss  %xmm0,%xmm2
movss  0xee6(%rip),%xmm3
mulss  %xmm3,%xmm2
cvttss2si %xmm2,%eax
movslq %eax,%rcx
lea    0xf24(%rip),%rdx
subss  (%rdx,%rcx,4),%xmm0
mulss  %xmm3,%xmm0
jmp    1192 <correct+0x92>
movss  0xeb1(%rip),%xmm2
ucomiss %xmm0,%xmm2
jbe    1168 <correct+0x68>
addss  0xeb8(%rip),%xmm0
mulss  0xeac(%rip),%xmm0
xor    %eax,%eax
jmp    1192 <correct+0x92>
mov    $0x1c,%eax
ucomiss 0xe90(%rip),%xmm0
jne    1182 <correct+0x82>
jp     1182 <correct+0x82>
movss  0xe88(%rip),%xmm0
jmp    1192 <correct+0x92>
addss  0xe82(%rip),%xmm0
mulss  0xe7e(%rip),%xmm0
xorps  %xmm2,%xmm2
ucomiss %xmm2,%xmm1
jb     11cf <correct+0xcf>
movss  0xe76(%rip),%xmm3
ucomiss %xmm1,%xmm3
jbe    11cf <correct+0xcf>
movss  0xe71(%rip),%xmm2
movaps %xmm1,%xmm3
divss  %xmm2,%xmm3
cvttss2si %xmm3,%ecx
movslq %ecx,%rdx
lea    0xe7c(%rip),%rsi
subss  (%rsi,%rdx,4),%xmm1
divss  %xmm2,%xmm1
jmp    120a <correct+0x10a>
ucomiss %xmm1,%xmm2
jbe    11e0 <correct+0xe0>
divss  0xe44(%rip),%xmm1
xor    %ecx,%ecx
jmp    120a <correct+0x10a>
mov    $0x4,%ecx
ucomiss 0xe2c(%rip),%xmm1
jne    11fa <correct+0xfa>
jp     11fa <correct+0xfa>
movss  0xe10(%rip),%xmm1
jmp    120a <correct+0x10a>
addss  0xe1a(%rip),%xmm1
divss  0xe16(%rip),%xmm1
movslq %ecx,%rcx
cltq
imul   $0x78,%rcx,%rdx
lea    0xec6(%rip),%rsi
add    %rsi,%rdx
add    $0x1,%ecx
movslq %ecx,%rcx
imul   $0x78,%rcx,%rcx
add    %rsi,%rcx
movss  (%rcx,%rax,4),%xmm2
movss  (%rdx,%rax,4),%xmm3
movss  0x4(%rdx,%rax,4),%xmm4
subss  %xmm3,%xmm2
movaps %xmm1,%xmm5
mulss  %xmm2,%xmm5
xorps  0xde4(%rip),%xmm2
subss  %xmm4,%xmm2
subss  %xmm3,%xmm4
addss  0x4(%rcx,%rax,4),%xmm2
addss  %xmm3,%xmm5
mulss  %xmm0,%xmm4
addss  %xmm5,%xmm4
mulss  %xmm1,%xmm2
mulss  %xmm0,%xmm2
addss  %xmm4,%xmm2
xorps  %xmm0,%xmm0
cmpless %xmm2,%xmm0
andps  %xmm2,%xmm0
ret

LLVM IR (-O0):
@correct.alt_incr = internal constant float 5.000000e+02
@correct.alts = internal constant [6 x float] [float 0.000000e+00, float 5.000000e+02, float 1.000000e+03, float 1.500000e+03, float 2.000000e+03, float 2.500000e+03]
@correct.dew_incr = internal constant float 2.000000e+00
@correct.dews = internal constant [30 x float] [float -2.800000e+01, float -2.600000e+01, float -2.400000e+01, float -2.200000e+01, float -2.000000e+01, float -1.800000e+01, float -1.600000e+01, float -1.400000e+01, float -1.200000e+01, float -1.000000e+01, float -8.000000e+00, float -6.000000e+00, float -4.000000e+00, float -2.000000e+00, float 0.000000e+00, float 2.000000e+00, float 4.000000e+00, float 6.000000e+00, float 8.000000e+00, float 1.000000e+01, float 1.200000e+01, float 1.400000e+01, float 1.600000e+01, float 1.800000e+01, float 2.000000e+01, float 2.200000e+01, float 2.400000e+01, float 2.600000e+01, float 2.800000e+01, float 3.000000e+01]
@correct.corrections = internal constant [6 x [30 x float]] [[30 x float] [float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FD3333340000000, float 0x3FD3333340000000, float 0x3FD99999A0000000, float 5.000000e-01, float 0x3FE3333340000000, float 0x3FE6666660000000, float 0x3FE99999A0000000, float 0x3FECCCCCC0000000, float 1.000000e+00, float 0x3FF3333340000000, float 0x3FF4CCCCC0000000, float 1.500000e+00, float 0x3FFB333340000000, float 0x3FFE666660000000, float 0x40019999A0000000, float 2.500000e+00, float 0x4006666660000000, float 0x40099999A0000000, float 0x400CCCCCC0000000, float 0x4010666660000000, float 0x4012666660000000], [30 x float] [float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FD3333340000000, float 0x3FD3333340000000, float 0x3FD99999A0000000, float 0x3FD99999A0000000, float 5.000000e-01, float 0x3FE3333340000000, float 0x3FE6666660000000, float 0x3FE99999A0000000, float 1.000000e+00, float 0x3FF19999A0000000, float 0x3FF4CCCCC0000000, float 1.500000e+00, float 0x3FFB333340000000, float 0x3FFE666660000000, float 0x40019999A0000000, float 2.500000e+00, float 0x4006666660000000, float 0x40099999A0000000, float 0x400CCCCCC0000000, float 4.000000e+00, float 0x4012666660000000, float 0x4014666660000000], [30 x float] [float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FD3333340000000, float 0x3FD99999A0000000, float 0x3FD99999A0000000, float 5.000000e-01, float 0x3FE3333340000000, float 0x3FE6666660000000, float 0x3FE99999A0000000, float 1.000000e+00, float 0x3FF19999A0000000, float 0x3FF4CCCCC0000000, float 1.500000e+00, float 0x3FFB333340000000, float 0x3FFE666660000000, float 0x40019999A0000000, float 2.500000e+00, float 0x4006666660000000, float 0x40099999A0000000, float 0x400CCCCCC0000000, float 4.000000e+00, float 0x4012666660000000, float 0x4014666660000000, float 0x4017333340000000], [30 x float] [float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FD3333340000000, float 0x3FD3333340000000, float 0x3FD99999A0000000, float 5.000000e-01, float 0x3FE3333340000000, float 0x3FE6666660000000, float 0x3FE99999A0000000, float 0x3FECCCCCC0000000, float 0x3FF19999A0000000, float 0x3FF3333340000000, float 0x3FF6666660000000, float 0x3FF99999A0000000, float 0x3FFE666660000000, float 0x4000CCCCC0000000, float 0x4003333340000000, float 0x4006666660000000, float 0x4008CCCCC0000000, float 0x400CCCCCC0000000, float 4.000000e+00, float 0x4012666660000000, float 0x4014666660000000, float 0x4017333340000000, float 6.500000e+00], [30 x float] [float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FD3333340000000, float 0x3FD3333340000000, float 0x3FD99999A0000000, float 5.000000e-01, float 5.000000e-01, float 0x3FE3333340000000, float 0x3FE99999A0000000, float 0x3FECCCCCC0000000, float 0x3FF19999A0000000, float 0x3FF3333340000000, float 0x3FF6666660000000, float 0x3FF99999A0000000, float 0x3FFCCCCCC0000000, float 0x4000CCCCC0000000, float 0x4003333340000000, float 0x40059999A0000000, float 0x4008CCCCC0000000, float 3.500000e+00, float 4.000000e+00, float 4.500000e+00, float 0x4014666660000000, float 0x4017333340000000, float 6.500000e+00, float 0x401D333340000000], [30 x float] [float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FD3333340000000, float 0x3FD99999A0000000, float 0x3FD99999A0000000, float 5.000000e-01, float 0x3FE3333340000000, float 0x3FE6666660000000, float 0x3FECCCCCC0000000, float 1.000000e+00, float 0x3FF3333340000000, float 0x3FF6666660000000, float 0x3FF99999A0000000, float 0x3FFCCCCCC0000000, float 0x4000CCCCC0000000, float 0x4003333340000000, float 0x40059999A0000000, float 0x4008CCCCC0000000, float 3.500000e+00, float 4.000000e+00, float 4.500000e+00, float 0x4014666660000000, float 0x4017333340000000, float 6.500000e+00, float 0x401D333340000000, float 0x4020666660000000]]
define float @correct(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca i32
%13 = alloca i32
store float %0, float* %3
store float %1, float* %4
%14 = load float, float* getelementptr inbounds ([30 x float], [30 x float]* @correct.dews, i64 0, i64 0)
%15 = load float, float* %3
%16 = fcmp ole float %14, %15
br i1 %16, label %17, label %34
17: ; preds = %2
%18 = load float, float* %3
%19 = load float, float* getelementptr inbounds ([30 x float], [30 x float]* @correct.dews, i64 0, i64 29)
%20 = fcmp olt float %18, %19
br i1 %20, label %21, label %34
21: ; preds = %17
%22 = load float, float* %3
%23 = load float, float* getelementptr inbounds ([30 x float], [30 x float]* @correct.dews, i64 0, i64 0)
%24 = fsub float %22, %23
%25 = fdiv float %24, 2.000000e+00
%26 = fptosi float %25 to i32
store i32 %26, i32* %12
%27 = load float, float* %3
%28 = load i32, i32* %12
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [30 x float], [30 x float]* @correct.dews, i64 0, i64 %29
%31 = load float, float* %30
%32 = fsub float %27, %31
%33 = fdiv float %32, 2.000000e+00
store float %33, float* %10
br label %55
34: ; preds = %17, %2
%35 = load float, float* getelementptr inbounds ([30 x float], [30 x float]* @correct.dews, i64 0, i64 0)
%36 = load float, float* %3
%37 = fcmp ogt float %35, %36
br i1 %37, label %38, label %43
38: ; preds = %34
store i32 0, i32* %12
%39 = load float, float* %3
%40 = load float, float* getelementptr inbounds ([30 x float], [30 x float]* @correct.dews, i64 0, i64 0)
%41 = fsub float %39, %40
%42 = fdiv float %41, 2.000000e+00
store float %42, float* %10
br label %54
43: ; preds = %34
%44 = load float, float* %3
%45 = load float, float* getelementptr inbounds ([30 x float], [30 x float]* @correct.dews, i64 0, i64 29)
%46 = fcmp oeq float %44, %45
br i1 %46, label %47, label %48
47: ; preds = %43
store i32 28, i32* %12
store float 1.000000e+00, float* %10
br label %53
48: ; preds = %43
store i32 28, i32* %12
%49 = load float, float* %3
%50 = load float, float* getelementptr inbounds ([30 x float], [30 x float]* @correct.dews, i64 0, i64 29)
%51 = fsub float %49, %50
%52 = fdiv float %51, 2.000000e+00
store float %52, float* %10
br label %53
53: ; preds = %48, %47
br label %54
54: ; preds = %53, %38
br label %55
55: ; preds = %54, %21
%56 = load float, float* getelementptr inbounds ([6 x float], [6 x float]* @correct.alts, i64 0, i64 0)
%57 = load float, float* %4
%58 = fcmp ole float %56, %57
br i1 %58, label %59, label %76
59: ; preds = %55
%60 = load float, float* %4
%61 = load float, float* getelementptr inbounds ([6 x float], [6 x float]* @correct.alts, i64 0, i64 5)
%62 = fcmp olt float %60, %61
br i1 %62, label %63, label %76
63: ; preds = %59
%64 = load float, float* %4
%65 = load float, float* getelementptr inbounds ([6 x float], [6 x float]* @correct.alts, i64 0, i64 0)
%66 = fsub float %64, %65
%67 = fdiv float %66, 5.000000e+02
%68 = fptosi float %67 to i32
store i32 %68, i32* %13
%69 = load float, float* %4
%70 = load i32, i32* %13
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [6 x float], [6 x float]* @correct.alts, i64 0, i64 %71
%73 = load float, float* %72
%74 = fsub float %69, %73
%75 = fdiv float %74, 5.000000e+02
store float %75, float* %11
br label %97
76: ; preds = %59, %55
%77 = load float, float* getelementptr inbounds ([6 x float], [6 x float]* @correct.alts, i64 0, i64 0)
%78 = load float, float* %4
%79 = fcmp ogt float %77, %78
br i1 %79, label %80, label %85
80: ; preds = %76
store i32 0, i32* %13
%81 = load float, float* %4
%82 = load float, float* getelementptr inbounds ([6 x float], [6 x float]* @correct.alts, i64 0, i64 0)
%83 = fsub float %81, %82
%84 = fdiv float %83, 5.000000e+02
store float %84, float* %11
br label %96
85: ; preds = %76
%86 = load float, float* %4
%87 = load float, float* getelementptr inbounds ([6 x float], [6 x float]* @correct.alts, i64 0, i64 5)
%88 = fcmp oeq float %86, %87
br i1 %88, label %89, label %90
89: ; preds = %85
store i32 4, i32* %13
store float 1.000000e+00, float* %11
br label %95
90: ; preds = %85
store i32 4, i32* %13
%91 = load float, float* %4
%92 = load float, float* getelementptr inbounds ([6 x float], [6 x float]* @correct.alts, i64 0, i64 5)
%93 = fsub float %91, %92
%94 = fdiv float %93, 5.000000e+02
store float %94, float* %11
br label %95
95: ; preds = %90, %89
br label %96
96: ; preds = %95, %80
br label %97
97: ; preds = %96, %63
%98 = load i32, i32* %13
%99 = add nsw i32 %98, 0
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds [6 x [30 x float]], [6 x [30 x float]]* @correct.corrections, i64 0, i64 %100
%102 = load i32, i32* %12
%103 = add nsw i32 %102, 0
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds [30 x float], [30 x float]* %101, i64 0, i64 %104
%106 = load float, float* %105
store float %106, float* %5
%107 = load i32, i32* %13
%108 = add nsw i32 %107, 1
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds [6 x [30 x float]], [6 x [30 x float]]* @correct.corrections, i64 0, i64 %109
%111 = load i32, i32* %12
%112 = add nsw i32 %111, 0
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds [30 x float], [30 x float]* %110, i64 0, i64 %113
%115 = load float, float* %114
%116 = load float, float* %5
%117 = fsub float %115, %116
store float %117, float* %7
%118 = load i32, i32* %13
%119 = add nsw i32 %118, 0
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds [6 x [30 x float]], [6 x [30 x float]]* @correct.corrections, i64 0, i64 %120
%122 = load i32, i32* %12
%123 = add nsw i32 %122, 1
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds [30 x float], [30 x float]* %121, i64 0, i64 %124
%126 = load float, float* %125
%127 = load float, float* %5
%128 = fsub float %126, %127
store float %128, float* %6
%129 = load float, float* %7
%130 = fneg float %129
%131 = load i32, i32* %13
%132 = add nsw i32 %131, 0
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds [6 x [30 x float]], [6 x [30 x float]]* @correct.corrections, i64 0, i64 %133
%135 = load i32, i32* %12
%136 = add nsw i32 %135, 1
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds [30 x float], [30 x float]* %134, i64 0, i64 %137
%139 = load float, float* %138
%140 = fsub float %130, %139
%141 = load i32, i32* %13
%142 = add nsw i32 %141, 1
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds [6 x [30 x float]], [6 x [30 x float]]* @correct.corrections, i64 0, i64 %143
%145 = load i32, i32* %12
%146 = add nsw i32 %145, 1
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds [30 x float], [30 x float]* %144, i64 0, i64 %147
%149 = load float, float* %148
%150 = fadd float %140, %149
store float %150, float* %8
%151 = load float, float* %5
%152 = load float, float* %11
%153 = load float, float* %7
%154 = call float @llvm.fmuladd.f32(float %152, float %153, float %151)
%155 = load float, float* %10
%156 = load float, float* %6
%157 = call float @llvm.fmuladd.f32(float %155, float %156, float %154)
%158 = load float, float* %8
%159 = load float, float* %11
%160 = fmul float %158, %159
%161 = load float, float* %10
%162 = call float @llvm.fmuladd.f32(float %160, float %161, float %157)
store float %162, float* %9
%163 = load float, float* %9
%164 = fpext float %163 to double
%165 = fcmp oge double %164, 0.000000e+00
br i1 %165, label %166, label %169
166: ; preds = %97
%167 = load float, float* %9
%168 = fpext float %167 to double
br label %170
169: ; preds = %97
br label %170
170: ; preds = %169, %166
%171 = phi double [ %168, %166 ], [ 0.000000e+00, %169 ]
%172 = fptrunc double %171 to float
ret float %172
}

LLVM IR (-O2):
@correct.alts = internal unnamed_addr constant [6 x float] [float 0.000000e+00, float 5.000000e+02, float 1.000000e+03, float 1.500000e+03, float 2.000000e+03, float 2.500000e+03]
@correct.dews = internal unnamed_addr constant [30 x float] [float -2.800000e+01, float -2.600000e+01, float -2.400000e+01, float -2.200000e+01, float -2.000000e+01, float -1.800000e+01, float -1.600000e+01, float -1.400000e+01, float -1.200000e+01, float -1.000000e+01, float -8.000000e+00, float -6.000000e+00, float -4.000000e+00, float -2.000000e+00, float 0.000000e+00, float 2.000000e+00, float 4.000000e+00, float 6.000000e+00, float 8.000000e+00, float 1.000000e+01, float 1.200000e+01, float 1.400000e+01, float 1.600000e+01, float 1.800000e+01, float 2.000000e+01, float 2.200000e+01, float 2.400000e+01, float 2.600000e+01, float 2.800000e+01, float 3.000000e+01]
@correct.corrections = internal unnamed_addr constant [6 x [30 x float]] [[30 x float] [float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FD3333340000000, float 0x3FD3333340000000, float 0x3FD99999A0000000, float 5.000000e-01, float 0x3FE3333340000000, float 0x3FE6666660000000, float 0x3FE99999A0000000, float 0x3FECCCCCC0000000, float 1.000000e+00, float 0x3FF3333340000000, float 0x3FF4CCCCC0000000, float 1.500000e+00, float 0x3FFB333340000000, float 0x3FFE666660000000, float 0x40019999A0000000, float 2.500000e+00, float 0x4006666660000000, float 0x40099999A0000000, float 0x400CCCCCC0000000, float 0x4010666660000000, float 0x4012666660000000], [30 x float] [float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FD3333340000000, float 0x3FD3333340000000, float 0x3FD99999A0000000, float 0x3FD99999A0000000, float 5.000000e-01, float 0x3FE3333340000000, float 0x3FE6666660000000, float 0x3FE99999A0000000, float 1.000000e+00, float 0x3FF19999A0000000, float 0x3FF4CCCCC0000000, float 1.500000e+00, float 0x3FFB333340000000, float 0x3FFE666660000000, float 0x40019999A0000000, float 2.500000e+00, float 0x4006666660000000, float 0x40099999A0000000, float 0x400CCCCCC0000000, float 4.000000e+00, float 0x4012666660000000, float 0x4014666660000000], [30 x float] [float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FD3333340000000, float 0x3FD99999A0000000, float 0x3FD99999A0000000, float 5.000000e-01, float 0x3FE3333340000000, float 0x3FE6666660000000, float 0x3FE99999A0000000, float 1.000000e+00, float 0x3FF19999A0000000, float 0x3FF4CCCCC0000000, float 1.500000e+00, float 0x3FFB333340000000, float 0x3FFE666660000000, float 0x40019999A0000000, float 2.500000e+00, float 0x4006666660000000, float 0x40099999A0000000, float 0x400CCCCCC0000000, float 4.000000e+00, float 0x4012666660000000, float 0x4014666660000000, float 0x4017333340000000], [30 x float] [float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FD3333340000000, float 0x3FD3333340000000, float 0x3FD99999A0000000, float 5.000000e-01, float 0x3FE3333340000000, float 0x3FE6666660000000, float 0x3FE99999A0000000, float 0x3FECCCCCC0000000, float 0x3FF19999A0000000, float 0x3FF3333340000000, float 0x3FF6666660000000, float 0x3FF99999A0000000, float 0x3FFE666660000000, float 0x4000CCCCC0000000, float 0x4003333340000000, float 0x4006666660000000, float 0x4008CCCCC0000000, float 0x400CCCCCC0000000, float 4.000000e+00, float 0x4012666660000000, float 0x4014666660000000, float 0x4017333340000000, float 6.500000e+00], [30 x float] [float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FD3333340000000, float 0x3FD3333340000000, float 0x3FD99999A0000000, float 5.000000e-01, float 5.000000e-01, float 0x3FE3333340000000, float 0x3FE99999A0000000, float 0x3FECCCCCC0000000, float 0x3FF19999A0000000, float 0x3FF3333340000000, float 0x3FF6666660000000, float 0x3FF99999A0000000, float 0x3FFCCCCCC0000000, float 0x4000CCCCC0000000, float 0x4003333340000000, float 0x40059999A0000000, float 0x4008CCCCC0000000, float 3.500000e+00, float 4.000000e+00, float 4.500000e+00, float 0x4014666660000000, float 0x4017333340000000, float 6.500000e+00, float 0x401D333340000000], [30 x float] [float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FD3333340000000, float 0x3FD99999A0000000, float 0x3FD99999A0000000, float 5.000000e-01, float 0x3FE3333340000000, float 0x3FE6666660000000, float 0x3FECCCCCC0000000, float 1.000000e+00, float 0x3FF3333340000000, float 0x3FF6666660000000, float 0x3FF99999A0000000, float 0x3FFCCCCCC0000000, float 0x4000CCCCC0000000, float 0x4003333340000000, float 0x40059999A0000000, float 0x4008CCCCC0000000, float 3.500000e+00, float 4.000000e+00, float 4.500000e+00, float 0x4014666660000000, float 0x4017333340000000, float 6.500000e+00, float 0x401D333340000000, float 0x4020666660000000]]
define float @correct(float %0, float %1) {
%3 = fcmp oge float %0, -2.800000e+01
%4 = fcmp olt float %0, 3.000000e+01
%5 = and i1 %3, %4
br i1 %5, label %6, label %15
6: ; preds = %2
%7 = fadd float %0, 2.800000e+01
%8 = fmul float %7, 5.000000e-01
%9 = fptosi float %8 to i32
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [30 x float], [30 x float]* @correct.dews, i64 0, i64 %10
%12 = load float, float* %11
%13 = fsub float %0, %12
%14 = fmul float %13, 5.000000e-01
br label %25
15: ; preds = %2
%16 = fcmp olt float %0, -2.800000e+01
br i1 %16, label %17, label %20
17: ; preds = %15
%18 = fadd float %0, 2.800000e+01
%19 = fmul float %18, 5.000000e-01
br label %25
20: ; preds = %15
%21 = fcmp oeq float %0, 3.000000e+01
br i1 %21, label %25, label %22
22: ; preds = %20
%23 = fadd float %0, -3.000000e+01
%24 = fmul float %23, 5.000000e-01
br label %25
25: ; preds = %20, %17, %22, %6
%26 = phi float [ %14, %6 ], [ %19, %17 ], [ %24, %22 ], [ 1.000000e+00, %20 ]
%27 = phi i32 [ %9, %6 ], [ 0, %17 ], [ 28, %22 ], [ 28, %20 ]
%28 = fcmp oge float %1, 0.000000e+00
%29 = fcmp olt float %1, 2.500000e+03
%30 = and i1 %28, %29
br i1 %30, label %31, label %39
31: ; preds = %25
%32 = fdiv float %1, 5.000000e+02
%33 = fptosi float %32 to i32
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [6 x float], [6 x float]* @correct.alts, i64 0, i64 %34
%36 = load float, float* %35
%37 = fsub float %1, %36
%38 = fdiv float %37, 5.000000e+02
br label %48
39: ; preds = %25
%40 = fcmp olt float %1, 0.000000e+00
br i1 %40, label %41, label %43
41: ; preds = %39
%42 = fdiv float %1, 5.000000e+02
br label %48
43: ; preds = %39
%44 = fcmp oeq float %1, 2.500000e+03
br i1 %44, label %48, label %45
45: ; preds = %43
%46 = fadd float %1, -2.500000e+03
%47 = fdiv float %46, 5.000000e+02
br label %48
48: ; preds = %43, %41, %45, %31
%49 = phi float [ %38, %31 ], [ %42, %41 ], [ %47, %45 ], [ 1.000000e+00, %43 ]
%50 = phi i32 [ %33, %31 ], [ 0, %41 ], [ 4, %45 ], [ 4, %43 ]
%51 = sext i32 %50 to i64
%52 = sext i32 %27 to i64
%53 = getelementptr inbounds [6 x [30 x float]], [6 x [30 x float]]* @correct.corrections, i64 0, i64 %51, i64 %52
%54 = load float, float* %53
%55 = add nsw i32 %50, 1
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [6 x [30 x float]], [6 x [30 x float]]* @correct.corrections, i64 0, i64 %56, i64 %52
%58 = load float, float* %57
%59 = fsub float %58, %54
%60 = add nsw i32 %27, 1
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [6 x [30 x float]], [6 x [30 x float]]* @correct.corrections, i64 0, i64 %51, i64 %61
%63 = load float, float* %62
%64 = fsub float %63, %54
%65 = fneg float %59
%66 = fsub float %65, %63
%67 = getelementptr inbounds [6 x [30 x float]], [6 x [30 x float]]* @correct.corrections, i64 0, i64 %56, i64 %61
%68 = load float, float* %67
%69 = fadd float %66, %68
%70 = tail call float @llvm.fmuladd.f32(float %49, float %59, float %54)
%71 = tail call float @llvm.fmuladd.f32(float %26, float %64, float %70)
%72 = fmul float %49, %69
%73 = tail call float @llvm.fmuladd.f32(float %72, float %26, float %71)
%74 = fcmp oge float %73, 0.000000e+00
%75 = select i1 %74, float %73, float 0.000000e+00
ret float %75
}