double thetadot(double j1, double j2, int pflag) {
  double T;
  double f = (36524.21987817305);
  double t;
  double thetadot;
  switch (pflag) {
  case (0):
    T = (j1 - ((2433282.42345905) +
               ((1850) - 1950.0) * ((36524.21987817305) / 100.0))) /
        (36524.21987817305);
    t = (j2 - j1) / (36524.21987817305);
    thetadot = 3 * (-0.042);
    thetadot *= t;
    thetadot += 2 * (-0.426);
    thetadot *= t;
    thetadot += (2004.682 + ((T - 0.5) * (-0.853)));
    break;
  case (1):
    T = (j1 - ((2433282.42345905) +
               ((1850) - 1950.0) * ((36524.21987817305) / 100.0))) /
        (36524.21987817305);
    t = (j2 - j1) / (36524.21987817305);
    thetadot = 3 * (-0.04180);
    thetadot *= t;
    thetadot += 2 * (-0.4265 + (T * (-0.00037)));
    thetadot *= t;
    thetadot += (2005.112 + (T * (-0.8529 + (T * (-0.00037)))));
    break;
  case (2):
    T = (j1 - ((2433282.42345905) +
               ((1850) - 1950.0) * ((36524.21987817305) / 100.0))) /
        (36524.21987817305);
    t = (j2 - j1) / (36524.21987817305);
    thetadot = 3 * (-0.041802);
    thetadot *= t;
    thetadot += 2 * (-0.42647 + (T * (-0.000365)));
    thetadot *= t;
    thetadot += (2005.1125 + (T * (-0.85294 + (T * (-0.000365)))));
    break;
  case (3):
    T = (j1 - ((2433282.42345905) +
               ((1850) - 1950.0) * ((36524.21987817305) / 100.0))) /
        (36524.21987817305);
    t = (j2 - j1) / (36524.21987817305);
    thetadot = 3 * (-0.0418);
    thetadot *= t;
    thetadot += 2 * (-0.4266 + ((T - 0.5) * (-0.00032)));
    thetadot *= t;
    thetadot +=
        (2004.684 + ((T - 0.5) * (-0.8532 + ((T - 0.5) * (-0.000317)))));
    break;
  case (4):
  default:
    T = (j1 - (2451545.0)) / (36525.0);
    t = (j2 - j1) / (36525.0);
    f = (36525.0);
    thetadot = 3 * (-0.041833);
    thetadot *= t;
    thetadot += 2 * (-0.42665 + (T * (-0.000217)));
    thetadot *= t;
    thetadot += (2004.3109 + (T * (-0.85330 + (T * (-0.000217)))));
    break;
  }
  thetadot =
      (((((thetadot) / 3600.0)) * ((3.14159265358979323846) / 180.0))) / f;
  return (thetadot);
}


x86 assembly (clang, -O0):
<thetadot>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
movabs $0x40e1d587093df34b,%rax
d5 e1 40
mov    %rax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
mov    %rax,-0x40(%rbp)
sub    $0x4,%rax
ja     14a7 <thetadot+0x3a7>
mov    -0x40(%rbp),%rax
lea    0xfbd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movsd  -0x8(%rbp),%xmm0
movsd  0xeef(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xedb(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  0xec0(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xf1f(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xefb(%rip),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xe4d(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xeb9(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb5(%rip),%xmm1
addsd  %xmm1,%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1587 <thetadot+0x487>
movsd  -0x8(%rbp),%xmm0
movsd  0xe3d(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe29(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  0xe0e(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xdf5(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xe1c(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe20(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x38(%rbp),%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xdd9(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xdd5(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdb5(%rip),%xmm1
addsd  %xmm1,%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1587 <thetadot+0x487>
movsd  -0x8(%rbp),%xmm0
movsd  0xd65(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xd51(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  0xd36(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xd55(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xd1c(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd20(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x38(%rbp),%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xcd9(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xcd5(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcb5(%rip),%xmm1
addsd  %xmm1,%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1587 <thetadot+0x487>
movsd  -0x8(%rbp),%xmm0
movsd  0xc8d(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xc79(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  0xc5e(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xc45(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xc0c(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xc08(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc04(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x38(%rbp),%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xbc2(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xbb1(%rip),%xmm2
subsd  %xmm2,%xmm1
movsd  0xb95(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xb91(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xb71(%rip),%xmm1
addsd  %xmm1,%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1587 <thetadot+0x487>
jmp    14a7 <thetadot+0x3a7>
movsd  -0x8(%rbp),%xmm0
movsd  0xc2c(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xc18(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  0xbfd(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xbec(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xbd7(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xb9e(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xba2(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x38(%rbp),%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xb5b(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xb57(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xb37(%rip),%xmm1
addsd  %xmm1,%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  0xb5c(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xb48(%rip),%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<thetadot>:
cmp    $0x3,%edi
ja     116c <thetadot+0x6c>
mov    %edi,%eax
lea    0xfea(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
subsd  %xmm0,%xmm1
addsd  0xedd(%rip),%xmm0
movsd  0xedd(%rip),%xmm2
divsd  %xmm2,%xmm0
divsd  %xmm2,%xmm1
movsd  0xf55(%rip),%xmm3
mulsd  %xmm1,%xmm3
addsd  0xf51(%rip),%xmm3
addsd  0xec9(%rip),%xmm0
mulsd  0xf49(%rip),%xmm0
mulsd  %xmm1,%xmm3
addsd  0xf45(%rip),%xmm0
addsd  %xmm3,%xmm0
jmp    1315 <thetadot+0x215>
subsd  %xmm0,%xmm1
addsd  0xf38(%rip),%xmm0
movsd  0xf38(%rip),%xmm2
divsd  %xmm2,%xmm0
divsd  %xmm2,%xmm1
movsd  0xf30(%rip),%xmm3
mulsd  %xmm1,%xmm3
movsd  0xf2c(%rip),%xmm4
mulsd  %xmm0,%xmm4
movsd  0xf28(%rip),%xmm5
addsd  %xmm4,%xmm5
addsd  %xmm5,%xmm5
addsd  %xmm3,%xmm5
mulsd  %xmm1,%xmm5
addsd  0xf18(%rip),%xmm4
mulsd  %xmm0,%xmm4
addsd  0xf14(%rip),%xmm4
jmp    1293 <thetadot+0x193>
subsd  %xmm0,%xmm1
addsd  0xe23(%rip),%xmm0
movsd  0xe23(%rip),%xmm2
divsd  %xmm2,%xmm0
divsd  %xmm2,%xmm1
movsd  0xe1b(%rip),%xmm3
mulsd  %xmm1,%xmm3
movsd  0xe6f(%rip),%xmm4
mulsd  %xmm0,%xmm4
movsd  0xe6b(%rip),%xmm5
addsd  %xmm4,%xmm5
addsd  %xmm5,%xmm5
addsd  %xmm3,%xmm5
mulsd  %xmm1,%xmm5
addsd  0xe5b(%rip),%xmm4
mulsd  %xmm0,%xmm4
addsd  0xe57(%rip),%xmm4
jmp    1293 <thetadot+0x193>
subsd  %xmm0,%xmm1
addsd  0xdc1(%rip),%xmm0
movsd  0xdc1(%rip),%xmm2
divsd  %xmm2,%xmm0
divsd  %xmm2,%xmm1
movsd  0xdf1(%rip),%xmm3
mulsd  %xmm1,%xmm3
movsd  0xded(%rip),%xmm4
mulsd  %xmm0,%xmm4
movsd  0xde9(%rip),%xmm5
addsd  %xmm4,%xmm5
addsd  %xmm5,%xmm5
addsd  %xmm3,%xmm5
mulsd  %xmm1,%xmm5
addsd  0xdd9(%rip),%xmm4
mulsd  %xmm0,%xmm4
addsd  0xdd5(%rip),%xmm4
addsd  %xmm5,%xmm4
movapd %xmm4,%xmm0
jmp    1315 <thetadot+0x215>
subsd  %xmm0,%xmm1
addsd  0xd57(%rip),%xmm0
movsd  0xd57(%rip),%xmm2
divsd  %xmm2,%xmm0
divsd  %xmm2,%xmm1
movsd  0xd4f(%rip),%xmm3
addsd  0xd4f(%rip),%xmm0
movsd  0xd4f(%rip),%xmm4
mulsd  %xmm0,%xmm4
addsd  0xd4b(%rip),%xmm4
mulsd  %xmm1,%xmm3
addsd  %xmm4,%xmm4
addsd  %xmm3,%xmm4
mulsd  %xmm1,%xmm4
movsd  0xd3b(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xd37(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xd33(%rip),%xmm1
addsd  %xmm4,%xmm1
movapd %xmm1,%xmm0
divsd  0xdcb(%rip),%xmm0
mulsd  0xdcb(%rip),%xmm0
divsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @thetadot(double %0, double %1, i32 %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca i32
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %4
store double %1, double* %5
store i32 %2, i32* %6
store double 0x40E1D587093DF34B, double* %8
%11 = load i32, i32* %6
switch i32 %11, label %109 [
i32 0, label %12
i32 1, label %33
i32 2, label %57
i32 3, label %81
i32 4, label %108
]
12: ; preds = %3
%13 = load double, double* %4
%14 = fsub double %13, 0x4142492B1A0EF02C
%15 = fdiv double %14, 0x40E1D587093DF34B
store double %15, double* %7
%16 = load double, double* %5
%17 = load double, double* %4
%18 = fsub double %16, %17
%19 = fdiv double %18, 0x40E1D587093DF34B
store double %19, double* %9
store double -1.260000e-01, double* %10
%20 = load double, double* %9
%21 = load double, double* %10
%22 = fmul double %21, %20
store double %22, double* %10
%23 = load double, double* %10
%24 = fadd double %23, -8.520000e-01
store double %24, double* %10
%25 = load double, double* %9
%26 = load double, double* %10
%27 = fmul double %26, %25
store double %27, double* %10
%28 = load double, double* %7
%29 = fsub double %28, 5.000000e-01
%30 = call double @llvm.fmuladd.f64(double %29, double 0xBFEB4BC6A7EF9DB2, double 0x409F52BA5E353F7D)
%31 = load double, double* %10
%32 = fadd double %31, %30
store double %32, double* %10
br label %133
33: ; preds = %3
%34 = load double, double* %4
%35 = fsub double %34, 0x4142492B1A0EF02C
%36 = fdiv double %35, 0x40E1D587093DF34B
store double %36, double* %7
%37 = load double, double* %5
%38 = load double, double* %4
%39 = fsub double %37, %38
%40 = fdiv double %39, 0x40E1D587093DF34B
store double %40, double* %9
store double 0xBFC00D1B71758E21, double* %10
%41 = load double, double* %9
%42 = load double, double* %10
%43 = fmul double %42, %41
store double %43, double* %10
%44 = load double, double* %7
%45 = call double @llvm.fmuladd.f64(double %44, double -3.700000e-04, double -4.265000e-01)
%46 = load double, double* %10
%47 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %45, double %46)
store double %47, double* %10
%48 = load double, double* %9
%49 = load double, double* %10
%50 = fmul double %49, %48
store double %50, double* %10
%51 = load double, double* %7
%52 = load double, double* %7
%53 = call double @llvm.fmuladd.f64(double %52, double -3.700000e-04, double 0xBFEB4AF4F0D844D0)
%54 = call double @llvm.fmuladd.f64(double %51, double %53, double 0x409F5472B020C49C)
%55 = load double, double* %10
%56 = fadd double %55, %54
store double %56, double* %10
br label %133
57: ; preds = %3
%58 = load double, double* %4
%59 = fsub double %58, 0x4142492B1A0EF02C
%60 = fdiv double %59, 0x40E1D587093DF34B
store double %60, double* %7
%61 = load double, double* %5
%62 = load double, double* %4
%63 = fsub double %61, %62
%64 = fdiv double %63, 0x40E1D587093DF34B
store double %64, double* %9
store double -1.254060e-01, double* %10
%65 = load double, double* %9
%66 = load double, double* %10
%67 = fmul double %66, %65
store double %67, double* %10
%68 = load double, double* %7
%69 = call double @llvm.fmuladd.f64(double %68, double -3.650000e-04, double -4.264700e-01)
%70 = load double, double* %10
%71 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %69, double %70)
store double %71, double* %10
%72 = load double, double* %9
%73 = load double, double* %10
%74 = fmul double %73, %72
store double %74, double* %10
%75 = load double, double* %7
%76 = load double, double* %7
%77 = call double @llvm.fmuladd.f64(double %76, double -3.650000e-04, double -8.529400e-01)
%78 = call double @llvm.fmuladd.f64(double %75, double %77, double 0x409F547333333333)
%79 = load double, double* %10
%80 = fadd double %79, %78
store double %80, double* %10
br label %133
81: ; preds = %3
%82 = load double, double* %4
%83 = fsub double %82, 0x4142492B1A0EF02C
%84 = fdiv double %83, 0x40E1D587093DF34B
store double %84, double* %7
%85 = load double, double* %5
%86 = load double, double* %4
%87 = fsub double %85, %86
%88 = fdiv double %87, 0x40E1D587093DF34B
store double %88, double* %9
store double 0xBFC00D1B71758E21, double* %10
%89 = load double, double* %9
%90 = load double, double* %10
%91 = fmul double %90, %89
store double %91, double* %10
%92 = load double, double* %7
%93 = fsub double %92, 5.000000e-01
%94 = call double @llvm.fmuladd.f64(double %93, double -3.200000e-04, double -4.266000e-01)
%95 = load double, double* %10
%96 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %94, double %95)
store double %96, double* %10
%97 = load double, double* %9
%98 = load double, double* %10
%99 = fmul double %98, %97
store double %99, double* %10
%100 = load double, double* %7
%101 = fsub double %100, 5.000000e-01
%102 = load double, double* %7
%103 = fsub double %102, 5.000000e-01
%104 = call double @llvm.fmuladd.f64(double %103, double -3.170000e-04, double 0xBFEB4D6A161E4F76)
%105 = call double @llvm.fmuladd.f64(double %101, double %104, double 0x409F52BC6A7EF9DB)
%106 = load double, double* %10
%107 = fadd double %106, %105
store double %107, double* %10
br label %133
108: ; preds = %3
br label %109
109: ; preds = %3, %108
%110 = load double, double* %4
%111 = fsub double %110, 0x4142B42C80000000
%112 = fdiv double %111, 3.652500e+04
store double %112, double* %7
%113 = load double, double* %5
%114 = load double, double* %4
%115 = fsub double %113, %114
%116 = fdiv double %115, 3.652500e+04
store double %116, double* %9
store double 3.652500e+04, double* %8
store double -1.254990e-01, double* %10
%117 = load double, double* %9
%118 = load double, double* %10
%119 = fmul double %118, %117
store double %119, double* %10
%120 = load double, double* %7
%121 = call double @llvm.fmuladd.f64(double %120, double -2.170000e-04, double -4.266500e-01)
%122 = load double, double* %10
%123 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %121, double %122)
store double %123, double* %10
%124 = load double, double* %9
%125 = load double, double* %10
%126 = fmul double %125, %124
store double %126, double* %10
%127 = load double, double* %7
%128 = load double, double* %7
%129 = call double @llvm.fmuladd.f64(double %128, double -2.170000e-04, double -8.533000e-01)
%130 = call double @llvm.fmuladd.f64(double %127, double %129, double 0x409F513E5C91D14E)
%131 = load double, double* %10
%132 = fadd double %131, %130
store double %132, double* %10
br label %133
133: ; preds = %109, %81, %57, %33, %12
%134 = load double, double* %10
%135 = fdiv double %134, 3.600000e+03
%136 = fmul double %135, 0x3F91DF46A2529D39
%137 = load double, double* %8
%138 = fdiv double %136, %137
store double %138, double* %10
%139 = load double, double* %10
ret double %139
}

LLVM IR (-O2):
define double @thetadot(double %0, double %1, i32 %2) {
switch i32 %2, label %52 [
i32 0, label %4
i32 1, label %15
i32 2, label %27
i32 3, label %39
]
4: ; preds = %3
%5 = fadd double %0, 0xC142492B1A0EF02C
%6 = fdiv double %5, 0x40E1D587093DF34B
%7 = fsub double %1, %0
%8 = fdiv double %7, 0x40E1D587093DF34B
%9 = fmul double %8, 1.260000e-01
%10 = fsub double -8.520000e-01, %9
%11 = fmul double %8, %10
%12 = fadd double %6, -5.000000e-01
%13 = tail call double @llvm.fmuladd.f64(double %12, double 0xBFEB4BC6A7EF9DB2, double 0x409F52BA5E353F7D)
%14 = fadd double %13, %11
br label %64
15: ; preds = %3
%16 = fadd double %0, 0xC142492B1A0EF02C
%17 = fdiv double %16, 0x40E1D587093DF34B
%18 = fsub double %1, %0
%19 = fdiv double %18, 0x40E1D587093DF34B
%20 = fmul double %19, 0xBFC00D1B71758E21
%21 = tail call double @llvm.fmuladd.f64(double %17, double -3.700000e-04, double -4.265000e-01)
%22 = tail call double @llvm.fmuladd.f64(double %21, double 2.000000e+00, double %20)
%23 = fmul double %19, %22
%24 = tail call double @llvm.fmuladd.f64(double %17, double -3.700000e-04, double 0xBFEB4AF4F0D844D0)
%25 = tail call double @llvm.fmuladd.f64(double %17, double %24, double 0x409F5472B020C49C)
%26 = fadd double %25, %23
br label %64
27: ; preds = %3
%28 = fadd double %0, 0xC142492B1A0EF02C
%29 = fdiv double %28, 0x40E1D587093DF34B
%30 = fsub double %1, %0
%31 = fdiv double %30, 0x40E1D587093DF34B
%32 = fmul double %31, -1.254060e-01
%33 = tail call double @llvm.fmuladd.f64(double %29, double -3.650000e-04, double -4.264700e-01)
%34 = tail call double @llvm.fmuladd.f64(double %33, double 2.000000e+00, double %32)
%35 = fmul double %31, %34
%36 = tail call double @llvm.fmuladd.f64(double %29, double -3.650000e-04, double -8.529400e-01)
%37 = tail call double @llvm.fmuladd.f64(double %29, double %36, double 0x409F547333333333)
%38 = fadd double %37, %35
br label %64
39: ; preds = %3
%40 = fadd double %0, 0xC142492B1A0EF02C
%41 = fdiv double %40, 0x40E1D587093DF34B
%42 = fsub double %1, %0
%43 = fdiv double %42, 0x40E1D587093DF34B
%44 = fmul double %43, 0xBFC00D1B71758E21
%45 = fadd double %41, -5.000000e-01
%46 = tail call double @llvm.fmuladd.f64(double %45, double -3.200000e-04, double -4.266000e-01)
%47 = tail call double @llvm.fmuladd.f64(double %46, double 2.000000e+00, double %44)
%48 = fmul double %43, %47
%49 = tail call double @llvm.fmuladd.f64(double %45, double -3.170000e-04, double 0xBFEB4D6A161E4F76)
%50 = tail call double @llvm.fmuladd.f64(double %45, double %49, double 0x409F52BC6A7EF9DB)
%51 = fadd double %50, %48
br label %64
52: ; preds = %3
%53 = fadd double %0, 0xC142B42C80000000
%54 = fdiv double %53, 3.652500e+04
%55 = fsub double %1, %0
%56 = fdiv double %55, 3.652500e+04
%57 = fmul double %56, -1.254990e-01
%58 = tail call double @llvm.fmuladd.f64(double %54, double -2.170000e-04, double -4.266500e-01)
%59 = tail call double @llvm.fmuladd.f64(double %58, double 2.000000e+00, double %57)
%60 = fmul double %56, %59
%61 = tail call double @llvm.fmuladd.f64(double %54, double -2.170000e-04, double -8.533000e-01)
%62 = tail call double @llvm.fmuladd.f64(double %54, double %61, double 0x409F513E5C91D14E)
%63 = fadd double %62, %60
br label %64
64: ; preds = %52, %39, %27, %15, %4
%65 = phi double [ 3.652500e+04, %52 ], [ 0x40E1D587093DF34B, %39 ], [ 0x40E1D587093DF34B, %27 ], [ 0x40E1D587093DF34B, %15 ], [ 0x40E1D587093DF34B, %4 ]
%66 = phi double [ %63, %52 ], [ %51, %39 ], [ %38, %27 ], [ %26, %15 ], [ %14, %4 ]
%67 = fdiv double %66, 3.600000e+03
%68 = fmul double %67, 0x3F91DF46A2529D39
%69 = fdiv double %68, %65
ret double %69
}