#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 */
int /*<<< orphan*/ abort();
double cos(double);
int /*<<< orphan*/ obliquity(double, double *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ radecrange(double *, double *);
double sin(double);
void ab_aux(double mj, double *x, double *y, double lsn, int mode) {
  static double lastmj = -10000;
  static double eexc;
  static double leperi;
  static char dirty = 1;
  if (mj != lastmj) {
    double T;
    T = (mj - (2451545.0 - 2415020.0)) / 36525.;
    eexc = 0.016708617 - (42.037e-6 + 0.1236e-6 * T) * T;
    leperi =
        ((102.93735 + (0.71953 + 0.00046 * T) * T) * 3.141592653589793 / 180.);
    lastmj = mj;
    dirty = 1;
  }
  switch (mode) {
  case 0: {
    double *lam = x, *bet = y;
    double dlsun, dlperi;
    dlsun = lsn - *lam;
    dlperi = leperi - *lam;
    *lam -= (20.49552 / 3600. / 180. * 3.141592653589793) / cos(*bet) *
            (cos(dlsun) - eexc * cos(dlperi));
    *bet -= (20.49552 / 3600. / 180. * 3.141592653589793) * sin(*bet) *
            (sin(dlsun) - eexc * sin(dlperi));
  } break;
  case 1: {
    double *ra = x, *dec = y;
    double sr, cr, sd, cd, sls, cls;
    static double cp, sp, ce, se;
    double dra, ddec;
    if (dirty) {
      double eps;
      cp = cos(leperi);
      sp = sin(leperi);
      obliquity(mj, &eps);
      se = sin(eps);
      ce = cos(eps);
      dirty = 0;
    }
    sr = sin(*ra);
    cr = cos(*ra);
    sd = sin(*dec);
    cd = cos(*dec);
    sls = sin(lsn);
    cls = cos(lsn);
    dra = (20.49552 / 3600. / 180. * 3.141592653589793) / cd *
          (-(cr * cls * ce + sr * sls) + eexc * (cr * cp * ce + sr * sp));
    ddec = se / ce * cd - sr * sd;
    ddec = (20.49552 / 3600. / 180. * 3.141592653589793) *
           (-(cls * ce * ddec + cr * sd * sls) +
            eexc * (cp * ce * ddec + cr * sd * sp));
    *ra += dra;
    *dec += ddec;
    radecrange(ra, dec);
  } break;
  default:
    printf("ab_aux: bad mode: %d\n", mode);
    abort();
    break;
  }
}


x86 assembly (clang, -O0):
<ab_aux>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %edx,-0x24(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd 0x2ec3(%rip),%xmm0
jne    119e <ab_aux+0x3e>
jp     119e <ab_aux+0x3e>
jmp    1277 <ab_aux+0x117>
movsd  -0x8(%rbp),%xmm0
movsd  0xe95(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe89(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0xe63(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe5f(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x30(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe23(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x2e57(%rip)
movsd  -0x30(%rbp),%xmm0
movsd  0xdfa(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdf6(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x30(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdd1(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xdbd(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xda9(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,0x2e0d(%rip)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,0x2de0(%rip)
movb   $0x1,0x2de1(%rip)
mov    -0x24(%rbp),%eax
mov    %eax,-0xac(%rbp)
test   %eax,%eax
je     12a1 <ab_aux+0x141>
jmp    128d <ab_aux+0x12d>
mov    -0xac(%rbp),%eax
sub    $0x1,%eax
je     1447 <ab_aux+0x2e7>
jmp    16ef <ab_aux+0x58f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    -0x38(%rbp),%rax
subsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0x2da5(%rip),%xmm0
mov    -0x38(%rbp),%rax
subsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm0
call   1080 <cos@plt>
movaps %xmm0,%xmm1
movsd  0xd58(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  0x2d52(%rip),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
call   1080 <cos@plt>
movsd  -0xe0(%rbp),%xmm2
ff
movsd  -0xd8(%rbp),%xmm1
ff
movaps %xmm0,%xmm3
movsd  -0xd0(%rbp),%xmm0
ff
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm1
movq   %xmm0,%rcx
movabs $0x8000000000000000,%rdx
xor    %rdx,%rcx
movq   %rcx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  0xca3(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  0x2c9d(%rip),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
call   1050 <sin@plt>
movsd  -0xc8(%rbp),%xmm2
ff
movsd  -0xc0(%rbp),%xmm1
ff
movaps %xmm0,%xmm3
movsd  -0xb8(%rbp),%xmm0
ff
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm1
movq   %xmm0,%rcx
movabs $0x8000000000000000,%rdx
xor    %rdx,%rcx
movq   %rcx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
jmp    1705 <ab_aux+0x5a5>
mov    -0x10(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x60(%rbp)
cmpb   $0x0,0x2bfa(%rip)
je     14d0 <ab_aux+0x370>
movsd  0x2c04(%rip),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,0x2bff(%rip)
movsd  0x2bef(%rip),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,0x2bf2(%rip)
movsd  -0x8(%rbp),%xmm0
lea    -0xa8(%rbp),%rdi
call   1060 <obliquity@plt>
movsd  -0xa8(%rbp),%xmm0
ff
call   1050 <sin@plt>
movsd  %xmm0,0x2bdc(%rip)
movsd  -0xa8(%rbp),%xmm0
ff
call   1080 <cos@plt>
movsd  %xmm0,0x2bbf(%rip)
movb   $0x0,0x2b88(%rip)
mov    -0x58(%rbp),%rax
movsd  (%rax),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,-0x68(%rbp)
mov    -0x58(%rbp),%rax
movsd  (%rax),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,-0x70(%rbp)
mov    -0x60(%rbp),%rax
movsd  (%rax),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,-0x78(%rbp)
mov    -0x60(%rbp),%rax
movsd  (%rax),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xb04(%rip),%xmm0
divsd  -0x80(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
mulsd  -0x90(%rbp),%xmm1
ff
movsd  0x2b2a(%rip),%xmm3
movsd  -0x68(%rbp),%xmm2
mulsd  -0x88(%rbp),%xmm2
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
movsd  0x2ad6(%rip),%xmm1
movsd  -0x70(%rbp),%xmm3
mulsd  0x2ad9(%rip),%xmm3
movsd  0x2ae1(%rip),%xmm5
movsd  -0x68(%rbp),%xmm4
mulsd  0x2acc(%rip),%xmm4
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0x2ab8(%rip),%xmm0
divsd  0x2aa8(%rip),%xmm0
movsd  -0x80(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
mulsd  0x2a62(%rip),%xmm0
movsd  -0xa0(%rbp),%xmm2
ff
movsd  -0x70(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
mulsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0x2a01(%rip),%xmm1
movsd  0x2a09(%rip),%xmm2
mulsd  0x2a11(%rip),%xmm2
movsd  -0xa0(%rbp),%xmm4
ff
movsd  -0x70(%rbp),%xmm3
mulsd  -0x78(%rbp),%xmm3
mulsd  0x29ef(%rip),%xmm3
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0x99f(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
mov    -0x58(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0xa0(%rbp),%xmm0
ff
mov    -0x60(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x58(%rbp),%rdi
mov    -0x60(%rbp),%rsi
call   1070 <radecrange@plt>
jmp    1705 <ab_aux+0x5a5>
mov    -0x24(%rbp),%esi
lea    0x957(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ab_aux>:
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movapd %xmm0,%xmm5
movsd  0x2ed7(%rip),%xmm0
ucomisd %xmm5,%xmm0
jne    1185 <ab_aux+0x25>
jnp    120c <ab_aux+0xac>
movsd  0xe73(%rip),%xmm0
addsd  %xmm5,%xmm0
divsd  0xe6f(%rip),%xmm0
movsd  0xe6f(%rip),%xmm4
mulsd  %xmm0,%xmm4
addsd  0xe6b(%rip),%xmm4
mulsd  %xmm0,%xmm4
movsd  0xe67(%rip),%xmm2
movsd  0xe67(%rip),%xmm3
mulsd  %xmm0,%xmm3
addsd  0xe63(%rip),%xmm3
subsd  %xmm4,%xmm2
mulsd  %xmm0,%xmm3
addsd  0xe5b(%rip),%xmm3
mulsd  0xe5b(%rip),%xmm3
divsd  0xe5b(%rip),%xmm3
movsd  %xmm2,0x2e6b(%rip)
movsd  %xmm3,0x2e6b(%rip)
movsd  %xmm5,0x2e4b(%rip)
movb   $0x0,0x2e64(%rip)
cmp    $0x1,%edx
je     1307 <ab_aux+0x1a7>
test   %edx,%edx
jne    14ed <ab_aux+0x38d>
movsd  (%rbx),%xmm0
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  0x2e36(%rip),%xmm2
subsd  %xmm0,%xmm2
movsd  %xmm2,0x8(%rsp)
movsd  (%r14),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,0x18(%rsp)
movsd  (%rsp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x2dfc(%rip),%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
call   1080 <cos@plt>
mulsd  0x20(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  0xdcb(%rip),%xmm0
divsd  0x18(%rsp),%xmm0
mulsd  %xmm1,%xmm0
addsd  (%rbx),%xmm0
movsd  %xmm0,(%rbx)
movsd  (%r14),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,0x18(%rsp)
movsd  (%rsp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,(%rsp)
movsd  0x2d9a(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x10(%rsp),%xmm0
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  0x18(%rsp),%xmm0
mulsd  0xd64(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  (%r14),%xmm0
movsd  %xmm0,(%r14)
jmp    14e5 <ab_aux+0x385>
movsd  %xmm1,(%rsp)
cmpb   $0x0,0x2d5d(%rip)
jne    1382 <ab_aux+0x222>
movsd  0x2d4b(%rip),%xmm0
movsd  %xmm5,0x8(%rsp)
call   1080 <cos@plt>
movsd  %xmm0,0x2d48(%rip)
movsd  0x2d30(%rip),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,0x2d3b(%rip)
lea    0x28(%rsp),%rdi
movsd  0x8(%rsp),%xmm0
call   1060 <obliquity@plt>
movsd  0x28(%rsp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,0x2d28(%rip)
movsd  0x28(%rsp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,0x2d0d(%rip)
movb   $0x1,0x2cee(%rip)
movsd  (%rbx),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,0x18(%rsp)
movsd  (%rbx),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,0x20(%rsp)
movsd  (%r14),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,0x10(%rsp)
movsd  (%r14),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,0x30(%rsp)
movsd  (%rsp),%xmm0
call   1080 <cos@plt>
movsd  0xc6d(%rip),%xmm8
movsd  0x20(%rsp),%xmm2
movapd %xmm2,%xmm3
mulsd  %xmm0,%xmm3
movsd  0x2c8f(%rip),%xmm1
movsd  0x18(%rsp),%xmm10
movapd %xmm10,%xmm12
movsd  0x30(%rsp),%xmm14
mulsd  %xmm14,%xmm12
mulsd  %xmm1,%xmm3
movsd  0x2c42(%rip),%xmm9
movsd  0x2c51(%rip),%xmm11
movapd %xmm2,%xmm5
movapd %xmm2,%xmm7
mulsd  %xmm11,%xmm5
movsd  0x10(%rsp),%xmm4
movapd %xmm4,%xmm2
mulsd  %xmm10,%xmm2
movsd  0x2c45(%rip),%xmm6
divsd  %xmm1,%xmm6
movsd  0x8(%rsp),%xmm13
mulsd  %xmm13,%xmm6
subsd  %xmm2,%xmm6
movsd  0x2c19(%rip),%xmm2
mulsd  %xmm1,%xmm5
mulsd  %xmm1,%xmm0
mulsd  %xmm4,%xmm7
movapd %xmm14,%xmm4
mulsd  %xmm7,%xmm4
mulsd  %xmm6,%xmm0
addsd  %xmm4,%xmm0
mulsd  %xmm11,%xmm1
mulsd  %xmm2,%xmm7
mulsd  %xmm6,%xmm1
addsd  %xmm7,%xmm1
mulsd  %xmm9,%xmm1
subsd  %xmm0,%xmm1
mulsd  %xmm8,%xmm1
divsd  %xmm13,%xmm8
addsd  %xmm12,%xmm3
movapd %xmm10,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm0,%xmm5
mulsd  %xmm9,%xmm5
subsd  %xmm3,%xmm5
mulsd  %xmm8,%xmm5
addsd  (%rbx),%xmm5
movsd  %xmm5,(%rbx)
addsd  (%r14),%xmm1
movsd  %xmm1,(%r14)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1070 <radecrange@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret
lea    0xb6c(%rip),%rdi
mov    %edx,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@ab_aux.lastmj = internal global double -1.000000e+04
@ab_aux.eexc = internal global double 0.000000e+00
@ab_aux.leperi = internal global double 0.000000e+00
@ab_aux.dirty = internal global i8 1
@ab_aux.cp = internal global double 0.000000e+00
@ab_aux.sp = internal global double 0.000000e+00
@ab_aux.ce = internal global double 0.000000e+00
@ab_aux.se = internal global double 0.000000e+00
@.str = [22 x i8] c"ab_aux: bad mode: %d\0A\00"
define void @ab_aux(double %0, double* %1, double* %2, double %3, i32 %4) {
%6 = alloca double
%7 = alloca double*
%8 = alloca double*
%9 = alloca double
%10 = alloca i32
%11 = alloca double
%12 = alloca double*
%13 = alloca double*
%14 = alloca double
%15 = alloca double
%16 = alloca double*
%17 = alloca double*
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
store double %0, double* %6
store double* %1, double** %7
store double* %2, double** %8
store double %3, double* %9
store i32 %4, i32* %10
%27 = load double, double* %6
%28 = load double, double* @ab_aux.lastmj
%29 = fcmp une double %27, %28
br i1 %29, label %30, label %46
30: ; preds = %5
%31 = load double, double* %6
%32 = fsub double %31, 3.652500e+04
%33 = fdiv double %32, 3.652500e+04
store double %33, double* %11
%34 = load double, double* %11
%35 = call double @llvm.fmuladd.f64(double 1.236000e-07, double %34, double 4.203700e-05)
%36 = load double, double* %11
%37 = fneg double %35
%38 = call double @llvm.fmuladd.f64(double %37, double %36, double 0x3F911C104E4E3915)
store double %38, double* @ab_aux.eexc
%39 = load double, double* %11
%40 = call double @llvm.fmuladd.f64(double 4.600000e-04, double %39, double 7.195300e-01)
%41 = load double, double* %11
%42 = call double @llvm.fmuladd.f64(double %40, double %41, double 0x4059BBFD8ADAB9F5)
%43 = fmul double %42, 0x400921FB54442D18
%44 = fdiv double %43, 1.800000e+02
store double %44, double* @ab_aux.leperi
%45 = load double, double* %6
store double %45, double* @ab_aux.lastmj
store i8 1, i8* @ab_aux.dirty
br label %46
46: ; preds = %30, %5
%47 = load i32, i32* %10
switch i32 %47, label %188 [
i32 0, label %48
i32 1, label %89
]
48: ; preds = %46
%49 = load double*, double** %7
store double* %49, double** %12
%50 = load double*, double** %8
store double* %50, double** %13
%51 = load double, double* %9
%52 = load double*, double** %12
%53 = load double, double* %52
%54 = fsub double %51, %53
store double %54, double* %14
%55 = load double, double* @ab_aux.leperi
%56 = load double*, double** %12
%57 = load double, double* %56
%58 = fsub double %55, %57
store double %58, double* %15
%59 = load double*, double** %13
%60 = load double, double* %59
%61 = call double @cos(double %60)
%62 = fdiv double 0x3F1A0C47294C3ECD, %61
%63 = load double, double* %14
%64 = call double @cos(double %63)
%65 = load double, double* @ab_aux.eexc
%66 = load double, double* %15
%67 = call double @cos(double %66)
%68 = fneg double %65
%69 = call double @llvm.fmuladd.f64(double %68, double %67, double %64)
%70 = load double*, double** %12
%71 = load double, double* %70
%72 = fneg double %62
%73 = call double @llvm.fmuladd.f64(double %72, double %69, double %71)
store double %73, double* %70
%74 = load double*, double** %13
%75 = load double, double* %74
%76 = call double @sin(double %75)
%77 = fmul double 0x3F1A0C47294C3ECD, %76
%78 = load double, double* %14
%79 = call double @sin(double %78)
%80 = load double, double* @ab_aux.eexc
%81 = load double, double* %15
%82 = call double @sin(double %81)
%83 = fneg double %80
%84 = call double @llvm.fmuladd.f64(double %83, double %82, double %79)
%85 = load double*, double** %13
%86 = load double, double* %85
%87 = fneg double %77
%88 = call double @llvm.fmuladd.f64(double %87, double %84, double %86)
store double %88, double* %85
br label %192
89: ; preds = %46
%90 = load double*, double** %7
store double* %90, double** %16
%91 = load double*, double** %8
store double* %91, double** %17
%92 = load i8, i8* @ab_aux.dirty
%93 = icmp ne i8 %92, 0
br i1 %93, label %94, label %105
94: ; preds = %89
%95 = load double, double* @ab_aux.leperi
%96 = call double @cos(double %95)
store double %96, double* @ab_aux.cp
%97 = load double, double* @ab_aux.leperi
%98 = call double @sin(double %97)
store double %98, double* @ab_aux.sp
%99 = load double, double* %6
%100 = call i32 @obliquity(double %99, double* %26)
%101 = load double, double* %26
%102 = call double @sin(double %101)
store double %102, double* @ab_aux.se
%103 = load double, double* %26
%104 = call double @cos(double %103)
store double %104, double* @ab_aux.ce
store i8 0, i8* @ab_aux.dirty
br label %105
105: ; preds = %94, %89
%106 = load double*, double** %16
%107 = load double, double* %106
%108 = call double @sin(double %107)
store double %108, double* %18
%109 = load double*, double** %16
%110 = load double, double* %109
%111 = call double @cos(double %110)
store double %111, double* %19
%112 = load double*, double** %17
%113 = load double, double* %112
%114 = call double @sin(double %113)
store double %114, double* %20
%115 = load double*, double** %17
%116 = load double, double* %115
%117 = call double @cos(double %116)
store double %117, double* %21
%118 = load double, double* %9
%119 = call double @sin(double %118)
store double %119, double* %22
%120 = load double, double* %9
%121 = call double @cos(double %120)
store double %121, double* %23
%122 = load double, double* %21
%123 = fdiv double 0x3F1A0C47294C3ECD, %122
%124 = load double, double* %19
%125 = load double, double* %23
%126 = fmul double %124, %125
%127 = load double, double* @ab_aux.ce
%128 = load double, double* %18
%129 = load double, double* %22
%130 = fmul double %128, %129
%131 = call double @llvm.fmuladd.f64(double %126, double %127, double %130)
%132 = fneg double %131
%133 = load double, double* @ab_aux.eexc
%134 = load double, double* %19
%135 = load double, double* @ab_aux.cp
%136 = fmul double %134, %135
%137 = load double, double* @ab_aux.ce
%138 = load double, double* %18
%139 = load double, double* @ab_aux.sp
%140 = fmul double %138, %139
%141 = call double @llvm.fmuladd.f64(double %136, double %137, double %140)
%142 = call double @llvm.fmuladd.f64(double %133, double %141, double %132)
%143 = fmul double %123, %142
store double %143, double* %24
%144 = load double, double* @ab_aux.se
%145 = load double, double* @ab_aux.ce
%146 = fdiv double %144, %145
%147 = load double, double* %21
%148 = load double, double* %18
%149 = load double, double* %20
%150 = fmul double %148, %149
%151 = fneg double %150
%152 = call double @llvm.fmuladd.f64(double %146, double %147, double %151)
store double %152, double* %25
%153 = load double, double* %23
%154 = load double, double* @ab_aux.ce
%155 = fmul double %153, %154
%156 = load double, double* %25
%157 = load double, double* %19
%158 = load double, double* %20
%159 = fmul double %157, %158
%160 = load double, double* %22
%161 = fmul double %159, %160
%162 = call double @llvm.fmuladd.f64(double %155, double %156, double %161)
%163 = fneg double %162
%164 = load double, double* @ab_aux.eexc
%165 = load double, double* @ab_aux.cp
%166 = load double, double* @ab_aux.ce
%167 = fmul double %165, %166
%168 = load double, double* %25
%169 = load double, double* %19
%170 = load double, double* %20
%171 = fmul double %169, %170
%172 = load double, double* @ab_aux.sp
%173 = fmul double %171, %172
%174 = call double @llvm.fmuladd.f64(double %167, double %168, double %173)
%175 = call double @llvm.fmuladd.f64(double %164, double %174, double %163)
%176 = fmul double 0x3F1A0C47294C3ECD, %175
store double %176, double* %25
%177 = load double, double* %24
%178 = load double*, double** %16
%179 = load double, double* %178
%180 = fadd double %179, %177
store double %180, double* %178
%181 = load double, double* %25
%182 = load double*, double** %17
%183 = load double, double* %182
%184 = fadd double %183, %181
store double %184, double* %182
%185 = load double*, double** %16
%186 = load double*, double** %17
%187 = call i32 @radecrange(double* %185, double* %186)
br label %192
188: ; preds = %46
%189 = load i32, i32* %10
%190 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %189)
%191 = call i32 (...) @abort()
unreachable
192: ; preds = %105, %48
ret void
}

LLVM IR (-O2):
@ab_aux.lastmj = internal unnamed_addr global double -1.000000e+04
@ab_aux.eexc = internal unnamed_addr global double 0.000000e+00
@ab_aux.leperi = internal unnamed_addr global double 0.000000e+00
@ab_aux.dirty = internal unnamed_addr global i1 false
@ab_aux.cp = internal unnamed_addr global double 0.000000e+00
@ab_aux.sp = internal unnamed_addr global double 0.000000e+00
@ab_aux.ce = internal unnamed_addr global double 0.000000e+00
@ab_aux.se = internal unnamed_addr global double 0.000000e+00
@.str = [22 x i8] c"ab_aux: bad mode: %d\0A\00"
define void @ab_aux(double %0, double* %1, double* %2, double %3, i32 %4) {
%6 = alloca double
%7 = load double, double* @ab_aux.lastmj
%8 = fcmp une double %7, %0
br i1 %8, label %9, label %19
9: ; preds = %5
%10 = fadd double %0, -3.652500e+04
%11 = fdiv double %10, 3.652500e+04
%12 = tail call double @llvm.fmuladd.f64(double %11, double 1.236000e-07, double 4.203700e-05)
%13 = fneg double %12
%14 = tail call double @llvm.fmuladd.f64(double %13, double %11, double 0x3F911C104E4E3915)
store double %14, double* @ab_aux.eexc
%15 = tail call double @llvm.fmuladd.f64(double %11, double 4.600000e-04, double 7.195300e-01)
%16 = tail call double @llvm.fmuladd.f64(double %15, double %11, double 0x4059BBFD8ADAB9F5)
%17 = fmul double %16, 0x400921FB54442D18
%18 = fdiv double %17, 1.800000e+02
store double %18, double* @ab_aux.leperi
store double %0, double* @ab_aux.lastmj
store i1 false, i1* @ab_aux.dirty
br label %19
19: ; preds = %9, %5
switch i32 %4, label %103 [
i32 0, label %20
i32 1, label %45
]
20: ; preds = %19
%21 = load double, double* %1
%22 = fsub double %3, %21
%23 = load double, double* @ab_aux.leperi
%24 = fsub double %23, %21
%25 = load double, double* %2
%26 = tail call double @cos(double %25)
%27 = tail call double @cos(double %22)
%28 = load double, double* @ab_aux.eexc
%29 = tail call double @cos(double %24)
%30 = fneg double %28
%31 = tail call double @llvm.fmuladd.f64(double %30, double %29, double %27)
%32 = load double, double* %1
%33 = fdiv double 0xBF1A0C47294C3ECD, %26
%34 = tail call double @llvm.fmuladd.f64(double %33, double %31, double %32)
store double %34, double* %1
%35 = load double, double* %2
%36 = tail call double @sin(double %35)
%37 = tail call double @sin(double %22)
%38 = load double, double* @ab_aux.eexc
%39 = tail call double @sin(double %24)
%40 = fneg double %38
%41 = tail call double @llvm.fmuladd.f64(double %40, double %39, double %37)
%42 = load double, double* %2
%43 = fmul double %36, 0xBF1A0C47294C3ECD
%44 = tail call double @llvm.fmuladd.f64(double %43, double %41, double %42)
store double %44, double* %2
br label %106
45: ; preds = %19
%46 = load i1, i1* @ab_aux.dirty
br i1 %46, label %58, label %47
47: ; preds = %45
%48 = bitcast double* %6 to i8*
%49 = load double, double* @ab_aux.leperi
%50 = tail call double @cos(double %49)
store double %50, double* @ab_aux.cp
%51 = load double, double* @ab_aux.leperi
%52 = tail call double @sin(double %51)
store double %52, double* @ab_aux.sp
%53 = call i32 @obliquity(double %0, double* %6)
%54 = load double, double* %6
%55 = call double @sin(double %54)
store double %55, double* @ab_aux.se
%56 = load double, double* %6
%57 = call double @cos(double %56)
store double %57, double* @ab_aux.ce
store i1 true, i1* @ab_aux.dirty
br label %58
58: ; preds = %47, %45
%59 = load double, double* %1
%60 = call double @sin(double %59)
%61 = load double, double* %1
%62 = call double @cos(double %61)
%63 = load double, double* %2
%64 = call double @sin(double %63)
%65 = load double, double* %2
%66 = call double @cos(double %65)
%67 = call double @sin(double %3)
%68 = call double @cos(double %3)
%69 = fdiv double 0x3F1A0C47294C3ECD, %66
%70 = fmul double %62, %68
%71 = load double, double* @ab_aux.ce
%72 = fmul double %60, %67
%73 = call double @llvm.fmuladd.f64(double %70, double %71, double %72)
%74 = fneg double %73
%75 = load double, double* @ab_aux.eexc
%76 = load double, double* @ab_aux.cp
%77 = fmul double %62, %76
%78 = load double, double* @ab_aux.sp
%79 = fmul double %60, %78
%80 = call double @llvm.fmuladd.f64(double %77, double %71, double %79)
%81 = call double @llvm.fmuladd.f64(double %75, double %80, double %74)
%82 = fmul double %69, %81
%83 = load double, double* @ab_aux.se
%84 = fdiv double %83, %71
%85 = fneg double %60
%86 = fmul double %64, %85
%87 = call double @llvm.fmuladd.f64(double %84, double %66, double %86)
%88 = fmul double %68, %71
%89 = fmul double %62, %64
%90 = fmul double %89, %67
%91 = call double @llvm.fmuladd.f64(double %88, double %87, double %90)
%92 = fneg double %91
%93 = fmul double %71, %76
%94 = fmul double %89, %78
%95 = call double @llvm.fmuladd.f64(double %93, double %87, double %94)
%96 = call double @llvm.fmuladd.f64(double %75, double %95, double %92)
%97 = fmul double %96, 0x3F1A0C47294C3ECD
%98 = load double, double* %1
%99 = fadd double %98, %82
store double %99, double* %1
%100 = load double, double* %2
%101 = fadd double %100, %97
store double %101, double* %2
%102 = call i32 @radecrange(double* %1, double* %2)
br label %106
103: ; preds = %19
%104 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %4)
%105 = tail call i32 (...) @abort()
unreachable
106: ; preds = %58, %20
ret void
}