void sunpos(jd, apparent, ra, dec, rv, slong) double jd;
int apparent;
double *ra, *dec, *rv, *slong;
{
  double t, t2, t3, l, m, e, ea, v, theta, omega, eps;
  t = (jd - 2415020.0) / 36525.0;
  t2 = t * t;
  t3 = t2 * t;
  l = ((279.69668 + 36000.76892 * t + 0.0003025 * t2) -
       360.0 * (floor((279.69668 + 36000.76892 * t + 0.0003025 * t2) / 360.0)));
  m = ((358.47583 + 35999.04975 * t - 0.000150 * t2 - 0.0000033 * t3) -
       360.0 * (floor((358.47583 + 35999.04975 * t - 0.000150 * t2 -
                       0.0000033 * t3) /
                      360.0)));
  e = 0.01675104 - 0.0000418 * t - 0.000000126 * t2;
  ea = kepler(m, e);
  v = ((2 * ((atan(sqrt((1 + e) / (1 - e)) * tan(ea / 2))) /
             (3.14159265358979323846 / 180.0))) -
       360.0 * (floor((2 * ((atan(sqrt((1 + e) / (1 - e)) * tan(ea / 2))) /
                            (3.14159265358979323846 / 180.0))) /
                      360.0)));
  theta = l + v - m;
  eps = 23.452294 - 0.0130125 * t - 0.00000164 * t2 + 0.000000503 * t3;
  if (apparent) {
    omega = ((259.18 - 1934.142 * t) -
             360.0 * (floor((259.18 - 1934.142 * t) / 360.0)));
    theta = theta - 0.00569 -
            0.00479 * sin(((omega) * (3.14159265358979323846 / 180.0)));
    eps += 0.00256 * cos(((omega) * (3.14159265358979323846 / 180.0)));
  }
  *slong = theta;
  *rv = (1.0000002 * (1 - e * e)) /
        (1 + e * cos(((v) * (3.14159265358979323846 / 180.0))));
  *ra = ((((atan2(cos(((eps) * (3.14159265358979323846 / 180.0))) *
                      sin(((theta) * (3.14159265358979323846 / 180.0))),
                  cos(((theta) * (3.14159265358979323846 / 180.0))))) /
           (3.14159265358979323846 / 180.0))) -
         360.0 *
             (floor(
                 (((atan2(cos(((eps) * (3.14159265358979323846 / 180.0))) *
                              sin(((theta) * (3.14159265358979323846 / 180.0))),
                          cos(((theta) * (3.14159265358979323846 / 180.0))))) /
                   (3.14159265358979323846 / 180.0))) /
                 360.0)));
  *dec = ((asin(sin(((eps) * (3.14159265358979323846 / 180.0))) *
                sin(((theta) * (3.14159265358979323846 / 180.0))))) /
          (3.14159265358979323846 / 180.0));
}


x86 assembly (clang, -O0):
<sunpos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xee0(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xecc(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x38(%rbp),%xmm1
movsd  0xe88(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xe84(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  0xe63(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x38(%rbp),%xmm1
movsd  0xe4e(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xe4a(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  0xe29(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xdb9(%rip),%xmm1
divsd  %xmm1,%xmm0
call   10b0 <floor@plt>
movsd  -0xb0(%rbp),%xmm1
ff
movsd  0xdd8(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  0xdd6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdd2(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  0xdb1(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
movsd  0xd94(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
movsd  0xd87(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd83(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  0xd62(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
movsd  0xd45(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xcf5(%rip),%xmm1
divsd  %xmm1,%xmm0
call   10b0 <floor@plt>
movsd  -0xa8(%rbp),%xmm1
ff
movsd  0xd14(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm1
movsd  0xcea(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xce6(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  0xcc5(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
mov    $0x2,%al
call   1050 <kepler@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xc8e(%rip),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  0xc81(%rip),%xmm1
subsd  -0x60(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   10a0 <sqrt@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  0xc4e(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1080 <tan@plt>
movaps %xmm0,%xmm1
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
call   1060 <atan@plt>
movsd  0xc31(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xc25(%rip),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  0xc18(%rip),%xmm1
subsd  -0x60(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   10a0 <sqrt@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  0xbe5(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1080 <tan@plt>
movaps %xmm0,%xmm1
movsd  -0x98(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
call   1060 <atan@plt>
movaps %xmm0,%xmm1
movsd  0xbc5(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xbb1(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xb9d(%rip),%xmm1
divsd  %xmm1,%xmm0
call   10b0 <floor@plt>
movaps %xmm0,%xmm2
movsd  -0x90(%rbp),%xmm0
ff
movsd  0xb81(%rip),%xmm1
mulsd  %xmm2,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x50(%rbp),%xmm0
addsd  -0x70(%rbp),%xmm0
subsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  0xb28(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xb24(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  0xb03(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
movsd  0xae6(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
cmpl   $0x0,-0xc(%rbp)
je     161e <sunpos+0x48e>
movsd  -0x38(%rbp),%xmm0
movsd  0xb7f(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xb7b(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
movsd  0xb5a(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xb56(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xaa2(%rip),%xmm1
divsd  %xmm1,%xmm0
call   10b0 <floor@plt>
movsd  -0xc0(%rbp),%xmm1
ff
movsd  0xac1(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  0xb07(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  0xa6b(%rip),%xmm0
mulsd  -0x80(%rbp),%xmm0
call   1040 <sin@plt>
movsd  -0xb8(%rbp),%xmm1
ff
movsd  0xad1(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xa3c(%rip),%xmm0
mulsd  -0x80(%rbp),%xmm0
call   1090 <cos@plt>
movsd  -0x88(%rbp),%xmm1
ff
movsd  0xa9a(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x60(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm0,%xmm1
movsd  0x9e0(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xa6c(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  0x9ab(%rip),%xmm0
mulsd  -0x70(%rbp),%xmm0
call   1090 <cos@plt>
movsd  -0x100(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xf8(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
movsd  0x98a(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0x96a(%rip),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
call   1090 <cos@plt>
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  0x94d(%rip),%xmm0
mulsd  -0x78(%rbp),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xf0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  0x924(%rip),%xmm0
mulsd  -0x78(%rbp),%xmm0
call   1090 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0xe8(%rbp),%xmm0
ff
call   1030 <atan2@plt>
movsd  0x902(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  0x8ee(%rip),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
call   1090 <cos@plt>
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  0x8d1(%rip),%xmm0
mulsd  -0x78(%rbp),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xe0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  0x8a8(%rip),%xmm0
mulsd  -0x78(%rbp),%xmm0
call   1090 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0xd8(%rbp),%xmm0
ff
call   1030 <atan2@plt>
movsd  0x886(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0x86a(%rip),%xmm1
divsd  %xmm1,%xmm0
call   10b0 <floor@plt>
movsd  -0xd0(%rbp),%xmm1
ff
movsd  0x889(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0x849(%rip),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
call   1040 <sin@plt>
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  0x82c(%rip),%xmm0
mulsd  -0x78(%rbp),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xc8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
call   1070 <asin@plt>
movsd  0x806(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sunpos>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xa0,%rsp
addsd  0xe59(%rip),%xmm0
divsd  0xe59(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %r8,%rbx
mov    %rcx,%r12
mov    %rdx,%r14
mov    %rsi,%r15
mov    %edi,%ebp
movapd %xmm0,%xmm3
mulsd  %xmm0,%xmm3
movsd  %xmm3,0x20(%rsp)
movapd %xmm0,%xmm1
mulsd  %xmm3,%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0xe29(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xe25(%rip),%xmm2
movsd  0xe25(%rip),%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movapd %xmm1,0x90(%rsp)
movapd %xmm1,%xmm0
divsd  0xe10(%rip),%xmm0
call   10b0 <floor@plt>
movsd  0xe0b(%rip),%xmm1
mulsd  0x8(%rsp),%xmm1
addsd  0xe05(%rip),%xmm1
movapd %xmm0,0x80(%rsp)
movsd  0xdfc(%rip),%xmm0
mulsd  0x20(%rsp),%xmm0
addsd  %xmm1,%xmm0
movsd  0xdf2(%rip),%xmm1
mulsd  0x10(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rsp)
movapd %xmm1,%xmm0
divsd  0xdb6(%rip),%xmm0
call   10b0 <floor@plt>
mulsd  0xdd1(%rip),%xmm0
movsd  0xdd1(%rip),%xmm2
mulsd  0x8(%rsp),%xmm2
addsd  0xdcb(%rip),%xmm2
addsd  0x18(%rsp),%xmm0
movsd  0xdc5(%rip),%xmm1
mulsd  0x20(%rsp),%xmm1
addsd  %xmm2,%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  %xmm0,0x78(%rsp)
mov    $0x2,%al
call   1050 <kepler@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0xda1(%rip),%xmm0
movsd  0x18(%rsp),%xmm3
movapd %xmm3,%xmm2
addsd  %xmm0,%xmm2
subsd  %xmm3,%xmm0
divsd  %xmm0,%xmm2
xorps  %xmm0,%xmm0
sqrtsd %xmm2,%xmm0
xorpd  %xmm3,%xmm3
movsd  %xmm2,0x40(%rsp)
ucomisd %xmm3,%xmm2
movsd  %xmm0,0x58(%rsp)
jae    1319 <sunpos+0x189>
movsd  0x40(%rsp),%xmm0
movsd  %xmm1,0x38(%rsp)
call   10a0 <sqrt@plt>
movsd  0x38(%rsp),%xmm1
movsd  %xmm0,0x60(%rsp)
mulsd  0xd51(%rip),%xmm1
movsd  %xmm1,0x38(%rsp)
movapd %xmm1,%xmm0
call   1080 <tan@plt>
mulsd  0x60(%rsp),%xmm0
call   1060 <atan@plt>
divsd  0xd37(%rip),%xmm0
movapd %xmm0,0x60(%rsp)
movsd  0x40(%rsp),%xmm0
ucomisd 0xd7b(%rip),%xmm0
jae    1370 <sunpos+0x1e0>
movsd  0x40(%rsp),%xmm0
call   10a0 <sqrt@plt>
movsd  %xmm0,0x58(%rsp)
movsd  0x38(%rsp),%xmm0
call   1080 <tan@plt>
mulsd  0x58(%rsp),%xmm0
call   1060 <atan@plt>
divsd  0xcf2(%rip),%xmm0
addsd  %xmm0,%xmm0
divsd  0xc8e(%rip),%xmm0
call   10b0 <floor@plt>
mulsd  0xca9(%rip),%xmm0
movapd 0x80(%rsp),%xmm2
unpcklpd 0x60(%rsp),%xmm2
mulpd  0xd22(%rip),%xmm2
movapd 0x90(%rsp),%xmm1
unpcklpd %xmm0,%xmm1
addpd  %xmm1,%xmm2
movapd %xmm2,%xmm4
unpckhpd %xmm2,%xmm4
movapd %xmm4,%xmm3
addsd  %xmm2,%xmm3
movsd  0xca1(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  %xmm1,%xmm0
addsd  0xc97(%rip),%xmm0
subsd  0x78(%rsp),%xmm3
movsd  0x20(%rsp),%xmm2
mulsd  0xc8b(%rip),%xmm2
addsd  %xmm0,%xmm2
movsd  0x10(%rsp),%xmm0
mulsd  0xc81(%rip),%xmm0
addsd  %xmm2,%xmm0
test   %ebp,%ebp
movsd  %xmm0,0x10(%rsp)
je     14e8 <sunpos+0x358>
mulsd  0xc6f(%rip),%xmm1
addsd  0xc6f(%rip),%xmm1
movsd  %xmm1,0x8(%rsp)
movapd %xmm1,%xmm0
divsd  0xbd5(%rip),%xmm0
movapd %xmm3,0x20(%rsp)
movapd %xmm4,0x40(%rsp)
call   10b0 <floor@plt>
movapd %xmm0,%xmm1
mulsd  0xbe0(%rip),%xmm1
addsd  0x8(%rsp),%xmm1
movapd 0x20(%rsp),%xmm0
addsd  0xc34(%rip),%xmm0
movapd %xmm0,0x20(%rsp)
mulsd  0xbee(%rip),%xmm1
movsd  %xmm1,0x8(%rsp)
movapd %xmm1,%xmm0
call   1040 <sin@plt>
mulsd  0xc17(%rip),%xmm0
movapd 0x20(%rsp),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
call   1090 <cos@plt>
movapd 0x40(%rsp),%xmm4
movapd 0x20(%rsp),%xmm3
mulsd  0xbf0(%rip),%xmm0
movsd  0x10(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movapd %xmm3,0x20(%rsp)
movsd  %xmm3,(%rbx)
movsd  0x18(%rsp),%xmm0
mulsd  %xmm0,%xmm0
movsd  0xb6c(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xbc0(%rip),%xmm1
movsd  %xmm1,0x8(%rsp)
mulsd  0xb62(%rip),%xmm4
movapd %xmm4,%xmm0
call   1090 <cos@plt>
mulsd  0x18(%rsp),%xmm0
addsd  0xb3b(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%r12)
movsd  0x10(%rsp),%xmm0
mulsd  0xb2d(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
call   1090 <cos@plt>
movsd  %xmm0,0x8(%rsp)
movapd 0x20(%rsp),%xmm0
mulsd  0xb0e(%rip),%xmm0
movapd %xmm0,0x20(%rsp)
call   1040 <sin@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movaps 0x20(%rsp),%xmm0
call   1090 <cos@plt>
movaps %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
call   1030 <atan2@plt>
divsd  0xad7(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1090 <cos@plt>
movsd  %xmm0,0x18(%rsp)
movapd 0x20(%rsp),%xmm0
call   1040 <sin@plt>
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movaps 0x20(%rsp),%xmm0
call   1090 <cos@plt>
movaps %xmm0,%xmm1
movsd  0x18(%rsp),%xmm0
call   1030 <atan2@plt>
divsd  0xa89(%rip),%xmm0
divsd  0xa29(%rip),%xmm0
call   10b0 <floor@plt>
mulsd  0xa44(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%r15)
movsd  0x10(%rsp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,0x10(%rsp)
movapd 0x20(%rsp),%xmm0
call   1040 <sin@plt>
mulsd  0x10(%rsp),%xmm0
call   1070 <asin@plt>
divsd  0xa3a(%rip),%xmm0
movsd  %xmm0,(%r14)
add    $0xa0,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @sunpos(double %0, i32 %1, double* %2, double* %3, double* %4, double* %5) {
%7 = alloca double
%8 = alloca i32
%9 = alloca double*
%10 = alloca double*
%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
store double %0, double* %7
store i32 %1, i32* %8
store double* %2, double** %9
store double* %3, double** %10
store double* %4, double** %11
store double* %5, double** %12
%24 = load double, double* %7
%25 = fsub double %24, 2.415020e+06
%26 = fdiv double %25, 3.652500e+04
store double %26, double* %13
%27 = load double, double* %13
%28 = load double, double* %13
%29 = fmul double %27, %28
store double %29, double* %14
%30 = load double, double* %14
%31 = load double, double* %13
%32 = fmul double %30, %31
store double %32, double* %15
%33 = load double, double* %13
%34 = call double @llvm.fmuladd.f64(double 0x40E194189AFE1DA8, double %33, double 0x40717B2599ED7C70)
%35 = load double, double* %14
%36 = call double @llvm.fmuladd.f64(double 3.025000e-04, double %35, double %34)
%37 = load double, double* %13
%38 = call double @llvm.fmuladd.f64(double 0x40E194189AFE1DA8, double %37, double 0x40717B2599ED7C70)
%39 = load double, double* %14
%40 = call double @llvm.fmuladd.f64(double 3.025000e-04, double %39, double %38)
%41 = fdiv double %40, 3.600000e+02
%42 = call double @llvm.floor.f64(double %41)
%43 = call double @llvm.fmuladd.f64(double -3.600000e+02, double %42, double %36)
store double %43, double* %16
%44 = load double, double* %13
%45 = call double @llvm.fmuladd.f64(double 0x40E193E1978D4FDF, double %44, double 0x4076679CFFEB074A)
%46 = load double, double* %14
%47 = call double @llvm.fmuladd.f64(double -1.500000e-04, double %46, double %45)
%48 = load double, double* %15
%49 = call double @llvm.fmuladd.f64(double -3.300000e-06, double %48, double %47)
%50 = load double, double* %13
%51 = call double @llvm.fmuladd.f64(double 0x40E193E1978D4FDF, double %50, double 0x4076679CFFEB074A)
%52 = load double, double* %14
%53 = call double @llvm.fmuladd.f64(double -1.500000e-04, double %52, double %51)
%54 = load double, double* %15
%55 = call double @llvm.fmuladd.f64(double -3.300000e-06, double %54, double %53)
%56 = fdiv double %55, 3.600000e+02
%57 = call double @llvm.floor.f64(double %56)
%58 = call double @llvm.fmuladd.f64(double -3.600000e+02, double %57, double %49)
store double %58, double* %17
%59 = load double, double* %13
%60 = call double @llvm.fmuladd.f64(double -4.180000e-05, double %59, double 0x3F91272F43E55D11)
%61 = load double, double* %14
%62 = call double @llvm.fmuladd.f64(double -1.260000e-07, double %61, double %60)
store double %62, double* %18
%63 = load double, double* %17
%64 = load double, double* %18
%65 = call i32 (double, double, ...) bitcast (i32 (...)* @kepler to i32 (double, double, ...)*)(double %63, double %64)
%66 = sitofp i32 %65 to double
store double %66, double* %19
%67 = load double, double* %18
%68 = fadd double 1.000000e+00, %67
%69 = load double, double* %18
%70 = fsub double 1.000000e+00, %69
%71 = fdiv double %68, %70
%72 = call double @sqrt(double %71)
%73 = load double, double* %19
%74 = fdiv double %73, 2.000000e+00
%75 = call double @tan(double %74)
%76 = fmul double %72, %75
%77 = call double @atan(double %76)
%78 = fdiv double %77, 0x3F91DF46A2529D39
%79 = load double, double* %18
%80 = fadd double 1.000000e+00, %79
%81 = load double, double* %18
%82 = fsub double 1.000000e+00, %81
%83 = fdiv double %80, %82
%84 = call double @sqrt(double %83)
%85 = load double, double* %19
%86 = fdiv double %85, 2.000000e+00
%87 = call double @tan(double %86)
%88 = fmul double %84, %87
%89 = call double @atan(double %88)
%90 = fdiv double %89, 0x3F91DF46A2529D39
%91 = fmul double 2.000000e+00, %90
%92 = fdiv double %91, 3.600000e+02
%93 = call double @llvm.floor.f64(double %92)
%94 = fmul double 3.600000e+02, %93
%95 = fneg double %94
%96 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %78, double %95)
store double %96, double* %20
%97 = load double, double* %16
%98 = load double, double* %20
%99 = fadd double %97, %98
%100 = load double, double* %17
%101 = fsub double %99, %100
store double %101, double* %21
%102 = load double, double* %13
%103 = call double @llvm.fmuladd.f64(double -1.301250e-02, double %102, double 0x403773C98A222D51)
%104 = load double, double* %14
%105 = call double @llvm.fmuladd.f64(double -1.640000e-06, double %104, double %103)
%106 = load double, double* %15
%107 = call double @llvm.fmuladd.f64(double 5.030000e-07, double %106, double %105)
store double %107, double* %23
%108 = load i32, i32* %8
%109 = icmp ne i32 %108, 0
br i1 %109, label %110, label %129
110: ; preds = %6
%111 = load double, double* %13
%112 = call double @llvm.fmuladd.f64(double 0xC09E38916872B021, double %111, double 2.591800e+02)
%113 = load double, double* %13
%114 = call double @llvm.fmuladd.f64(double 0xC09E38916872B021, double %113, double 2.591800e+02)
%115 = fdiv double %114, 3.600000e+02
%116 = call double @llvm.floor.f64(double %115)
%117 = call double @llvm.fmuladd.f64(double -3.600000e+02, double %116, double %112)
store double %117, double* %22
%118 = load double, double* %21
%119 = fsub double %118, 5.690000e-03
%120 = load double, double* %22
%121 = fmul double %120, 0x3F91DF46A2529D39
%122 = call double @sin(double %121)
%123 = call double @llvm.fmuladd.f64(double -4.790000e-03, double %122, double %119)
store double %123, double* %21
%124 = load double, double* %22
%125 = fmul double %124, 0x3F91DF46A2529D39
%126 = call double @cos(double %125)
%127 = load double, double* %23
%128 = call double @llvm.fmuladd.f64(double 2.560000e-03, double %126, double %127)
store double %128, double* %23
br label %129
129: ; preds = %110, %6
%130 = load double, double* %21
%131 = load double*, double** %12
store double %130, double* %131
%132 = load double, double* %18
%133 = load double, double* %18
%134 = fneg double %132
%135 = call double @llvm.fmuladd.f64(double %134, double %133, double 1.000000e+00)
%136 = fmul double 0x3FF0000035AFE535, %135
%137 = load double, double* %18
%138 = load double, double* %20
%139 = fmul double %138, 0x3F91DF46A2529D39
%140 = call double @cos(double %139)
%141 = call double @llvm.fmuladd.f64(double %137, double %140, double 1.000000e+00)
%142 = fdiv double %136, %141
%143 = load double*, double** %11
store double %142, double* %143
%144 = load double, double* %23
%145 = fmul double %144, 0x3F91DF46A2529D39
%146 = call double @cos(double %145)
%147 = load double, double* %21
%148 = fmul double %147, 0x3F91DF46A2529D39
%149 = call double @sin(double %148)
%150 = fmul double %146, %149
%151 = load double, double* %21
%152 = fmul double %151, 0x3F91DF46A2529D39
%153 = call double @cos(double %152)
%154 = call double @atan2(double %150, double %153)
%155 = fdiv double %154, 0x3F91DF46A2529D39
%156 = load double, double* %23
%157 = fmul double %156, 0x3F91DF46A2529D39
%158 = call double @cos(double %157)
%159 = load double, double* %21
%160 = fmul double %159, 0x3F91DF46A2529D39
%161 = call double @sin(double %160)
%162 = fmul double %158, %161
%163 = load double, double* %21
%164 = fmul double %163, 0x3F91DF46A2529D39
%165 = call double @cos(double %164)
%166 = call double @atan2(double %162, double %165)
%167 = fdiv double %166, 0x3F91DF46A2529D39
%168 = fdiv double %167, 3.600000e+02
%169 = call double @llvm.floor.f64(double %168)
%170 = call double @llvm.fmuladd.f64(double -3.600000e+02, double %169, double %155)
%171 = load double*, double** %9
store double %170, double* %171
%172 = load double, double* %23
%173 = fmul double %172, 0x3F91DF46A2529D39
%174 = call double @sin(double %173)
%175 = load double, double* %21
%176 = fmul double %175, 0x3F91DF46A2529D39
%177 = call double @sin(double %176)
%178 = fmul double %174, %177
%179 = call double @asin(double %178)
%180 = fdiv double %179, 0x3F91DF46A2529D39
%181 = load double*, double** %10
store double %180, double* %181
ret void
}

LLVM IR (-O2):
define void @sunpos(double %0, i32 %1, double* nocapture writeonly %2, double* nocapture writeonly %3, double* nocapture writeonly %4, double* nocapture writeonly %5) {
%7 = fadd double %0, -2.415020e+06
%8 = fdiv double %7, 3.652500e+04
%9 = fmul double %8, %8
%10 = fmul double %8, %9
%11 = tail call double @llvm.fmuladd.f64(double %8, double 0x40E194189AFE1DA8, double 0x40717B2599ED7C70)
%12 = tail call double @llvm.fmuladd.f64(double %9, double 3.025000e-04, double %11)
%13 = fdiv double %12, 3.600000e+02
%14 = tail call double @llvm.floor.f64(double %13)
%15 = tail call double @llvm.fmuladd.f64(double %8, double 0x40E193E1978D4FDF, double 0x4076679CFFEB074A)
%16 = tail call double @llvm.fmuladd.f64(double %9, double -1.500000e-04, double %15)
%17 = tail call double @llvm.fmuladd.f64(double %10, double -3.300000e-06, double %16)
%18 = fdiv double %17, 3.600000e+02
%19 = tail call double @llvm.floor.f64(double %18)
%20 = tail call double @llvm.fmuladd.f64(double %19, double -3.600000e+02, double %17)
%21 = tail call double @llvm.fmuladd.f64(double %8, double -4.180000e-05, double 0x3F91272F43E55D11)
%22 = tail call double @llvm.fmuladd.f64(double %9, double -1.260000e-07, double %21)
%23 = tail call i32 (double, double, ...) bitcast (i32 (...)* @kepler to i32 (double, double, ...)*)(double %20, double %22)
%24 = sitofp i32 %23 to double
%25 = fadd double %22, 1.000000e+00
%26 = fsub double 1.000000e+00, %22
%27 = fdiv double %25, %26
%28 = tail call double @sqrt(double %27)
%29 = fmul double %24, 5.000000e-01
%30 = tail call double @tan(double %29)
%31 = fmul double %28, %30
%32 = tail call double @atan(double %31)
%33 = fdiv double %32, 0x3F91DF46A2529D39
%34 = tail call double @sqrt(double %27)
%35 = tail call double @tan(double %29)
%36 = fmul double %34, %35
%37 = tail call double @atan(double %36)
%38 = fdiv double %37, 0x3F91DF46A2529D39
%39 = fmul double %38, 2.000000e+00
%40 = fdiv double %39, 3.600000e+02
%41 = tail call double @llvm.floor.f64(double %40)
%42 = fmul double %41, -3.600000e+02
%43 = insertelement <2 x double> poison, double %14, i64 0
%44 = insertelement <2 x double> %43, double %33, i64 1
%45 = insertelement <2 x double> poison, double %12, i64 0
%46 = insertelement <2 x double> %45, double %42, i64 1
%47 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %44, <2 x double> <double -3.600000e+02, double 2.000000e+00>, <2 x double> %46)
%48 = extractelement <2 x double> %47, i64 0
%49 = extractelement <2 x double> %47, i64 1
%50 = fadd double %48, %49
%51 = fsub double %50, %20
%52 = tail call double @llvm.fmuladd.f64(double %8, double -1.301250e-02, double 0x403773C98A222D51)
%53 = tail call double @llvm.fmuladd.f64(double %9, double -1.640000e-06, double %52)
%54 = tail call double @llvm.fmuladd.f64(double %10, double 5.030000e-07, double %53)
%55 = icmp eq i32 %1, 0
br i1 %55, label %67, label %56
56: ; preds = %6
%57 = tail call double @llvm.fmuladd.f64(double %8, double 0xC09E38916872B021, double 2.591800e+02)
%58 = fdiv double %57, 3.600000e+02
%59 = tail call double @llvm.floor.f64(double %58)
%60 = tail call double @llvm.fmuladd.f64(double %59, double -3.600000e+02, double %57)
%61 = fadd double %51, -5.690000e-03
%62 = fmul double %60, 0x3F91DF46A2529D39
%63 = tail call double @sin(double %62)
%64 = tail call double @llvm.fmuladd.f64(double %63, double -4.790000e-03, double %61)
%65 = tail call double @cos(double %62)
%66 = tail call double @llvm.fmuladd.f64(double %65, double 2.560000e-03, double %54)
br label %67
67: ; preds = %56, %6
%68 = phi double [ %64, %56 ], [ %51, %6 ]
%69 = phi double [ %66, %56 ], [ %54, %6 ]
store double %68, double* %5
%70 = fneg double %22
%71 = tail call double @llvm.fmuladd.f64(double %70, double %22, double 1.000000e+00)
%72 = fmul double %71, 0x3FF0000035AFE535
%73 = fmul double %49, 0x3F91DF46A2529D39
%74 = tail call double @cos(double %73)
%75 = tail call double @llvm.fmuladd.f64(double %22, double %74, double 1.000000e+00)
%76 = fdiv double %72, %75
store double %76, double* %4
%77 = fmul double %69, 0x3F91DF46A2529D39
%78 = tail call double @cos(double %77)
%79 = fmul double %68, 0x3F91DF46A2529D39
%80 = tail call double @sin(double %79)
%81 = fmul double %78, %80
%82 = tail call double @cos(double %79)
%83 = tail call double @atan2(double %81, double %82)
%84 = fdiv double %83, 0x3F91DF46A2529D39
%85 = tail call double @cos(double %77)
%86 = tail call double @sin(double %79)
%87 = fmul double %85, %86
%88 = tail call double @cos(double %79)
%89 = tail call double @atan2(double %87, double %88)
%90 = fdiv double %89, 0x3F91DF46A2529D39
%91 = fdiv double %90, 3.600000e+02
%92 = tail call double @llvm.floor.f64(double %91)
%93 = tail call double @llvm.fmuladd.f64(double %92, double -3.600000e+02, double %84)
store double %93, double* %2
%94 = tail call double @sin(double %77)
%95 = tail call double @sin(double %79)
%96 = fmul double %94, %95
%97 = tail call double @asin(double %96)
%98 = fdiv double %97, 0x3F91DF46A2529D39
store double %98, double* %3
ret void
}