void ecl2fk5(double *dtheta, double *dphi, double epoch) {
  double rtheta, rphi, v1[3], v2[3];
  double t, eps0;
  double rmat[3][3];
  double das2r = 4.8481368110953599358991410235794797595635330237270e-6;
  void fk5prec();
  rtheta = ((*dtheta) * 3.141592653589793238462643 / 180.);
  rphi = ((*dphi) * 3.141592653589793238462643 / 180.);
  slaDcs2c(rtheta, rphi, v1);
  t = (epoch - 2000.0) * 0.01;
  eps0 = das2r * (84381.448 + (-46.8150 + (-0.00059 + 0.001813 * t) * t) * t);
  slaDeuler("X", eps0, 0.0, 0.0, rmat);
  slaDimxv(rmat, v1, v2);
  slaDcc2s(v2, &rtheta, &rphi);
  if (rtheta < 0.0)
    rtheta = rtheta + (2.0 * 3.141592653589793238462643);
  if (rtheta > 2.0 * 3.141592653589793238462643)
    rtheta = rtheta - (2.0 * 3.141592653589793238462643);
  if (epoch != 2000.0)
    fk5prec(epoch, 2000.0, &rtheta, &rphi);
  *dtheta = ((rtheta)*180. / 3.141592653589793238462643);
  *dphi = ((rphi)*180. / 3.141592653589793238462643);
}


x86 assembly (clang, -O0):
<ecl2fk5>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  0xed0(%rip),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0xeb4(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  0xea0(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsd  0xe93(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  0xe7f(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
lea    -0x40(%rbp),%rdi
mov    $0x2,%al
call   1040 <slaDcs2c@plt>
movsd  -0x18(%rbp),%xmm0
movsd  0xe4c(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe38(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0xc8(%rbp),%xmm0
ff
movsd  -0x68(%rbp),%xmm1
movsd  0xe0a(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe06(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xde1(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xdc4(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
lea    -0xc0(%rbp),%rsi
lea    0xdf4(%rip),%rdi
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
mov    $0x3,%al
call   1070 <slaDeuler@plt>
lea    -0xc0(%rbp),%rdi
lea    -0x40(%rbp),%rsi
lea    -0x60(%rbp),%rdx
mov    $0x0,%al
call   1050 <slaDimxv@plt>
lea    -0x60(%rbp),%rdi
lea    -0x20(%rbp),%rsi
lea    -0x28(%rbp),%rdx
mov    $0x0,%al
call   1030 <slaDcc2s@plt>
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    12b2 <ecl2fk5+0x162>
movsd  0xda0(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xd89(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12df <ecl2fk5+0x18f>
movsd  -0x20(%rbp),%xmm0
movsd  0xd72(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xd3c(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1301 <ecl2fk5+0x1b1>
jp     1301 <ecl2fk5+0x1b1>
jmp    131d <ecl2fk5+0x1cd>
movsd  -0x18(%rbp),%xmm0
movsd  0xd1a(%rip),%xmm1
lea    -0x20(%rbp),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x2,%al
call   1060 <fk5prec@plt>
movsd  0xd0b(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  0xd06(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xcea(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  0xce5(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ecl2fk5>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb0,%rsp
movsd  %xmm0,0x18(%rsp)
mov    %rsi,%r14
mov    %rdi,%r15
movsd  0xe8c(%rip),%xmm2
movsd  (%rdi),%xmm0
mulsd  %xmm2,%xmm0
movsd  0xe84(%rip),%xmm3
divsd  %xmm3,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%rsi),%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm3,%xmm1
movsd  %xmm1,0x10(%rsp)
lea    0x40(%rsp),%r12
mov    %r12,%rdi
mov    $0x2,%al
call   1040 <slaDcs2c@plt>
movsd  0xe59(%rip),%xmm1
addsd  0x18(%rsp),%xmm1
mulsd  0xe53(%rip),%xmm1
movsd  0xe53(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe4f(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe4b(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe47(%rip),%xmm0
mulsd  0xe47(%rip),%xmm0
lea    0xe60(%rip),%rdi
lea    0x60(%rsp),%r13
xorpd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
mov    %r13,%rsi
mov    $0x3,%al
call   1070 <slaDeuler@plt>
lea    0x20(%rsp),%rbx
mov    %r13,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <slaDimxv@plt>
lea    0x8(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <slaDcc2s@plt>
movsd  0x8(%rsp),%xmm3
xorpd  %xmm0,%xmm0
ucomisd %xmm3,%xmm0
movsd  0xdf2(%rip),%xmm2
addsd  %xmm3,%xmm2
movapd %xmm3,%xmm1
cmpltsd %xmm0,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm3,%xmm1
orpd   %xmm2,%xmm1
ja     127b <ecl2fk5+0x12b>
ucomisd 0xdcf(%rip),%xmm1
jbe    12a6 <ecl2fk5+0x156>
movsd  0xdcd(%rip),%xmm2
addsd  %xmm1,%xmm2
movsd  0xdb9(%rip),%xmm3
cmpltsd %xmm1,%xmm3
andpd  %xmm3,%xmm2
andnpd %xmm1,%xmm3
orpd   %xmm2,%xmm3
movlpd %xmm3,0x8(%rsp)
movsd  0x18(%rsp),%xmm0
ucomisd 0xda4(%rip),%xmm0
jne    12b8 <ecl2fk5+0x168>
jnp    12d7 <ecl2fk5+0x187>
movsd  0xd98(%rip),%xmm1
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
mov    $0x2,%al
call   1060 <fk5prec@plt>
movsd  0x8(%rsp),%xmm3
movsd  0xd29(%rip),%xmm2
mulsd  %xmm2,%xmm3
movsd  0xd15(%rip),%xmm1
divsd  %xmm1,%xmm3
movsd  %xmm3,(%r15)
mulsd  0x10(%rsp),%xmm2
divsd  %xmm1,%xmm2
movsd  %xmm2,(%r14)
add    $0xb0,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c"X\00"
define void @ecl2fk5(double* %0, double* %1, double %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca [3 x double]
%10 = alloca [3 x double]
%11 = alloca double
%12 = alloca double
%13 = alloca [3 x [3 x double]]
%14 = alloca double
store double* %0, double** %4
store double* %1, double** %5
store double %2, double* %6
store double 0x3ED455A5B2FF8F9D, double* %14
%15 = load double*, double** %4
%16 = load double, double* %15
%17 = fmul double %16, 0x400921FB54442D18
%18 = fdiv double %17, 1.800000e+02
store double %18, double* %7
%19 = load double*, double** %5
%20 = load double, double* %19
%21 = fmul double %20, 0x400921FB54442D18
%22 = fdiv double %21, 1.800000e+02
store double %22, double* %8
%23 = load double, double* %7
%24 = load double, double* %8
%25 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 0
%26 = call i32 (double, double, double*, ...) bitcast (i32 (...)* @slaDcs2c to i32 (double, double, double*, ...)*)(double %23, double %24, double* %25)
%27 = load double, double* %6
%28 = fsub double %27, 2.000000e+03
%29 = fmul double %28, 1.000000e-02
store double %29, double* %11
%30 = load double, double* %14
%31 = load double, double* %11
%32 = call double @llvm.fmuladd.f64(double 1.813000e-03, double %31, double -5.900000e-04)
%33 = load double, double* %11
%34 = call double @llvm.fmuladd.f64(double %32, double %33, double -4.681500e+01)
%35 = load double, double* %11
%36 = call double @llvm.fmuladd.f64(double %34, double %35, double 0x40F499D72B020C4A)
%37 = fmul double %30, %36
store double %37, double* %12
%38 = load double, double* %12
%39 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %13, i64 0, i64 0
%40 = call i32 (i8*, double, double, double, [3 x double]*, ...) bitcast (i32 (...)* @slaDeuler to i32 (i8*, double, double, double, [3 x double]*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), double %38, double 0.000000e+00, double 0.000000e+00, [3 x double]* %39)
%41 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %13, i64 0, i64 0
%42 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 0
%43 = getelementptr inbounds [3 x double], [3 x double]* %10, i64 0, i64 0
%44 = call i32 ([3 x double]*, double*, double*, ...) bitcast (i32 (...)* @slaDimxv to i32 ([3 x double]*, double*, double*, ...)*)([3 x double]* %41, double* %42, double* %43)
%45 = getelementptr inbounds [3 x double], [3 x double]* %10, i64 0, i64 0
%46 = call i32 (double*, double*, double*, ...) bitcast (i32 (...)* @slaDcc2s to i32 (double*, double*, double*, ...)*)(double* %45, double* %7, double* %8)
%47 = load double, double* %7
%48 = fcmp olt double %47, 0.000000e+00
br i1 %48, label %49, label %52
49: ; preds = %3
%50 = load double, double* %7
%51 = fadd double %50, 0x401921FB54442D18
store double %51, double* %7
br label %52
52: ; preds = %49, %3
%53 = load double, double* %7
%54 = fcmp ogt double %53, 0x401921FB54442D18
br i1 %54, label %55, label %58
55: ; preds = %52
%56 = load double, double* %7
%57 = fsub double %56, 0x401921FB54442D18
store double %57, double* %7
br label %58
58: ; preds = %55, %52
%59 = load double, double* %6
%60 = fcmp une double %59, 2.000000e+03
br i1 %60, label %61, label %63
61: ; preds = %58
%62 = load double, double* %6
br label %63
63: ; preds = %61, %58
%64 = load double, double* %7
%65 = fmul double %64, 1.800000e+02
%66 = fdiv double %65, 0x400921FB54442D18
%67 = load double*, double** %4
store double %66, double* %67
%68 = load double, double* %8
%69 = fmul double %68, 1.800000e+02
%70 = fdiv double %69, 0x400921FB54442D18
%71 = load double*, double** %5
store double %70, double* %71
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"X\00"
define void @ecl2fk5(double* nocapture %0, double* nocapture %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca [3 x double]
%7 = alloca [3 x double]
%8 = alloca [3 x [3 x double]]
%9 = bitcast double* %4 to i8*
%10 = bitcast double* %5 to i8*
%11 = bitcast [3 x double]* %6 to i8*
%12 = bitcast [3 x double]* %7 to i8*
%13 = bitcast [3 x [3 x double]]* %8 to i8*
%14 = load double, double* %0
%15 = fmul double %14, 0x400921FB54442D18
%16 = fdiv double %15, 1.800000e+02
store double %16, double* %4
%17 = load double, double* %1
%18 = fmul double %17, 0x400921FB54442D18
%19 = fdiv double %18, 1.800000e+02
store double %19, double* %5
%20 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 0
%21 = call i32 (double, double, double*, ...) bitcast (i32 (...)* @slaDcs2c to i32 (double, double, double*, ...)*)(double %16, double %19, double* %20)
%22 = fadd double %2, -2.000000e+03
%23 = fmul double %22, 1.000000e-02
%24 = call double @llvm.fmuladd.f64(double %23, double 1.813000e-03, double -5.900000e-04)
%25 = call double @llvm.fmuladd.f64(double %24, double %23, double -4.681500e+01)
%26 = call double @llvm.fmuladd.f64(double %25, double %23, double 0x40F499D72B020C4A)
%27 = fmul double %26, 0x3ED455A5B2FF8F9D
%28 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %8, i64 0, i64 0
%29 = call i32 (i8*, double, double, double, [3 x double]*, ...) bitcast (i32 (...)* @slaDeuler to i32 (i8*, double, double, double, [3 x double]*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), double %27, double 0.000000e+00, double 0.000000e+00, [3 x double]* %28)
%30 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%31 = call i32 ([3 x double]*, double*, double*, ...) bitcast (i32 (...)* @slaDimxv to i32 ([3 x double]*, double*, double*, ...)*)([3 x double]* %28, double* %20, double* %30)
%32 = call i32 (double*, double*, double*, ...) bitcast (i32 (...)* @slaDcc2s to i32 (double*, double*, double*, ...)*)(double* %30, double* %4, double* %5)
%33 = load double, double* %4
%34 = fcmp olt double %33, 0.000000e+00
%35 = fadd double %33, 0x401921FB54442D18
%36 = select i1 %34, double %35, double %33
%37 = fcmp ogt double %36, 0x401921FB54442D18
%38 = or i1 %34, %37
br i1 %38, label %39, label %42
39: ; preds = %3
%40 = fadd double %36, 0xC01921FB54442D18
%41 = select i1 %37, double %40, double %36
store double %41, double* %4
br label %42
42: ; preds = %3, %39
%43 = phi double [ %33, %3 ], [ %41, %39 ]
%44 = fcmp une double %2, 2.000000e+03
br i1 %44, label %45, label %47
45: ; preds = %42
%46 = load double, double* %4
br label %47
47: ; preds = %45, %42
%48 = phi double [ %46, %45 ], [ %43, %42 ]
%49 = fmul double %48, 1.800000e+02
%50 = fdiv double %49, 0x400921FB54442D18
store double %50, double* %0
%51 = load double, double* %5
%52 = fmul double %51, 1.800000e+02
%53 = fdiv double %52, 0x400921FB54442D18
store double %53, double* %1
ret void
}