#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 */
double acos(double);
double atan(double);
double atan2(double, double);
double cos(double);
double log10(double);
double sin(double);
void starspot_(int N, double *t, double *dmag, double a, double b, double alpha,
               double i, double chi, double psi0, double P) {
  int j;
  double psi, T, delta, zeta, beta, cbeta, sbeta, calpha, salpha, s2alpha, ci,
      si, cchi, schi, cpsi, sdelta, cdelta, szeta, czeta, A, B, c3alpha;
  alpha = alpha * 3.14159265358979323846264338328 / 180.;
  i = i * 3.14159265358979323846264338328 / 180.;
  chi = chi * 3.14159265358979323846264338328 / 180.;
  psi0 = psi0 * 3.14159265358979323846264338328 / 180.;
  ci = cos(i);
  schi = sin(chi);
  si = sin(i);
  cchi = cos(chi);
  salpha = sin(alpha);
  s2alpha = salpha * salpha;
  calpha = cos(alpha);
  c3alpha = calpha * calpha * calpha;
  for (j = 0; j < N; j++) {
    psi = 6.28318530717958647692528676656 * ((t[j] - t[0]) / P) + psi0;
    cpsi = cos(psi);
    cbeta = (ci * schi + si * cchi * cpsi);
    beta = acos(cbeta);
    if (beta - alpha >= 1.570796327) {
      A = 0.;
      B = 0.;
    } else if (beta + alpha <= 1.570796327) {
      A = 3.14159265358979323846264338328 * cbeta * s2alpha;
      sbeta = sin(beta);
      B = 1.047197551 *
              (-2.0 * c3alpha - 3.0 * sbeta * sbeta * calpha * s2alpha) +
          2.094395102;
    } else {
      sbeta = sin(beta);
      cdelta = (calpha * cbeta) / (salpha * sbeta);
      delta = acos(cdelta);
      sdelta = sin(delta);
      szeta = sdelta * salpha;
      czeta = calpha / sbeta;
      if (beta <= 1.570796327)
        T = atan(szeta * sbeta / cbeta);
      else
        T = 3.14159265358979323846264338328 - atan(-szeta * sbeta / cbeta);
      zeta = atan2(szeta, czeta);
      A = zeta + (3.14159265358979323846264338328 - delta) * cbeta * s2alpha -
          szeta * sbeta * calpha;
      B = (1.047197551 - (delta / 3.0)) *
              (-2.0 * c3alpha - 3.0 * sbeta * sbeta * calpha * s2alpha) +
          (2.094395102 - (2.0 * T / 3.0)) +
          szeta * 2.0 * sbeta * cbeta * (2.0 - 3.0 * calpha * calpha) / 6.0;
    }
    dmag[j] = -2.5 * log10(1.0 - a * A - b * B);
  }
}


x86 assembly (clang, -O0):
<starspot_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
movsd  %xmm2,-0x30(%rbp)
movsd  %xmm3,-0x38(%rbp)
movsd  %xmm4,-0x40(%rbp)
movsd  %xmm5,-0x48(%rbp)
movsd  %xmm6,-0x50(%rbp)
movsd  0xe67(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  0xe52(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe49(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  0xe34(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe2b(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  0xe16(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe0d(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  0xdf8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x38(%rbp),%xmm0
call   1070 <cos@plt>
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
call   1070 <cos@plt>
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1070 <cos@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
mulsd  -0x98(%rbp),%xmm0
ff
mulsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x108(%rbp)
ff
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1790 <starspot_+0x630>
mov    -0x10(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
divsd  -0x50(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  0xd29(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
call   1070 <cos@plt>
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xc8(%rbp),%xmm2
ff
movsd  -0xb8(%rbp),%xmm1
ff
mulsd  -0xc0(%rbp),%xmm1
ff
mulsd  -0xd0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
call   1040 <acos@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  0xca6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     138f <starspot_+0x22f>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
jmp    1701 <starspot_+0x5a1>
movsd  -0x80(%rbp),%xmm1
addsd  -0x30(%rbp),%xmm1
movsd  0xc6f(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1451 <starspot_+0x2f1>
movsd  0xc55(%rip),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
mulsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x108(%rbp),%xmm1
ff
movsd  0xc43(%rip),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
mulsd  -0x90(%rbp),%xmm0
ff
mulsd  -0x98(%rbp),%xmm0
ff
mulsd  -0xa8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
movsd  0xc0c(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xbf8(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
jmp    16fc <starspot_+0x59c>
movsd  -0x80(%rbp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
mulsd  -0x88(%rbp),%xmm0
ff
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  -0x90(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
call   1040 <acos@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
divsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  0xb25(%rip),%xmm0
ucomisd -0x80(%rbp),%xmm0
jb     151d <starspot_+0x3bd>
movsd  -0xe8(%rbp),%xmm0
ff
mulsd  -0x90(%rbp),%xmm0
ff
divsd  -0x88(%rbp),%xmm0
ff
call   1060 <atan@plt>
movsd  %xmm0,-0x68(%rbp)
jmp    1565 <starspot_+0x405>
movsd  -0xe8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
divsd  -0x88(%rbp),%xmm0
ff
call   1060 <atan@plt>
movaps %xmm0,%xmm1
movsd  0xaac(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0xe8(%rbp),%xmm0
ff
movsd  -0xf0(%rbp),%xmm1
ff
call   1030 <atan2@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  0xa7c(%rip),%xmm1
subsd  -0x70(%rbp),%xmm1
mulsd  -0x88(%rbp),%xmm1
ff
movsd  -0xa8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0xe8(%rbp),%xmm0
ff
mulsd  -0x90(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x70(%rbp),%xmm1
movsd  0xa3b(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xa3f(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  -0x108(%rbp),%xmm1
ff
movsd  0xa1b(%rip),%xmm2
mulsd  -0x90(%rbp),%xmm2
ff
mulsd  -0x90(%rbp),%xmm2
ff
mulsd  -0x98(%rbp),%xmm2
ff
mulsd  -0xa8(%rbp),%xmm2
ff
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm2
movsd  0x9cc(%rip),%xmm3
mulsd  -0x68(%rbp),%xmm3
movsd  0x9c7(%rip),%xmm1
divsd  %xmm1,%xmm3
movsd  0x9c3(%rip),%xmm1
subsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x99f(%rip),%xmm1
mulsd  -0xe8(%rbp),%xmm1
ff
mulsd  -0x90(%rbp),%xmm1
ff
mulsd  -0x88(%rbp),%xmm1
ff
movsd  0x987(%rip),%xmm2
mulsd  -0x98(%rbp),%xmm2
ff
movsd  -0x98(%rbp),%xmm3
ff
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm2
movsd  0x94c(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0x934(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
jmp    1701 <starspot_+0x5a1>
movsd  -0x20(%rbp),%xmm1
movsd  -0xf8(%rbp),%xmm0
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm0,%xmm1
movsd  0x91f(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
movsd  -0x100(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1080 <log10@plt>
movaps %xmm0,%xmm1
movsd  0x8d7(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    12bc <starspot_+0x15c>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<starspot_>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0xd8,%rsp
movsd  %xmm6,0xb8(%rsp)
movsd  %xmm5,0x48(%rsp)
movaps %xmm1,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
movsd  0xe64(%rip),%xmm5
mulsd  %xmm5,%xmm2
movsd  0xe60(%rip),%xmm1
divsd  %xmm1,%xmm2
movsd  %xmm2,0x28(%rsp)
movapd %xmm3,%xmm0
mulsd  %xmm5,%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x20(%rsp)
mulsd  %xmm5,%xmm4
divsd  %xmm1,%xmm4
movsd  %xmm4,0x8(%rsp)
call   1070 <cos@plt>
movsd  %xmm0,0x40(%rsp)
movsd  0x8(%rsp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x20(%rsp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
call   1070 <cos@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x28(%rsp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,0x30(%rsp)
movsd  0x28(%rsp),%xmm0
call   1070 <cos@plt>
movsd  %xmm0,0x18(%rsp)
test   %ebp,%ebp
jle    15fa <starspot_+0x49a>
movsd  0x48(%rsp),%xmm0
mulsd  0xdb8(%rip),%xmm0
divsd  0xdb8(%rip),%xmm0
movsd  %xmm0,0x48(%rsp)
movsd  0x30(%rsp),%xmm0
mulsd  %xmm0,%xmm0
movsd  %xmm0,0x38(%rsp)
movsd  0x18(%rsp),%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x78(%rsp)
movsd  0xd8a(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
addsd  0xd82(%rip),%xmm1
movsd  %xmm1,0xa8(%rsp)
movsd  0x20(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
movapd 0xda7(%rip),%xmm0
movapd 0x80(%rsp),%xmm1
xorpd  %xmm0,%xmm1
movapd %xmm1,0x80(%rsp)
movapd 0x90(%rsp),%xmm1
xorpd  %xmm0,%xmm1
movapd %xmm1,0x90(%rsp)
mov    %ebp,%r15d
xor    %ebp,%ebp
movsd  0x40(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x40(%rsp)
jmp    13b1 <starspot_+0x251>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  0x8(%rsp),%xmm1
mulsd  0xce2(%rip),%xmm1
mulsd  0x38(%rsp),%xmm1
movsd  %xmm1,0x8(%rsp)
call   1050 <sin@plt>
movapd %xmm0,%xmm2
mulsd  0xcd5(%rip),%xmm2
mulsd  %xmm0,%xmm2
mulsd  0x18(%rsp),%xmm2
mulsd  0x38(%rsp),%xmm2
movsd  0x78(%rsp),%xmm0
addsd  %xmm0,%xmm0
subsd  %xmm0,%xmm2
mulsd  0xccf(%rip),%xmm2
addsd  0xccf(%rip),%xmm2
movsd  0x8(%rsp),%xmm7
mulsd  0x80(%rsp),%xmm7
addsd  0xcc8(%rip),%xmm7
mulsd  0x90(%rsp),%xmm2
addsd  %xmm7,%xmm2
movapd %xmm2,%xmm0
call   1080 <log10@plt>
mulsd  0xcb2(%rip),%xmm0
movsd  %xmm0,(%r14,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%r15
je     15fa <starspot_+0x49a>
movsd  (%rbx,%rbp,8),%xmm0
subsd  (%rbx),%xmm0
divsd  0xb8(%rsp),%xmm0
mulsd  0xc55(%rip),%xmm0
addsd  0x48(%rsp),%xmm0
call   1070 <cos@plt>
mulsd  0x20(%rsp),%xmm0
addsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
call   1040 <acos@plt>
movapd %xmm0,%xmm2
subsd  0x28(%rsp),%xmm2
xorpd  %xmm7,%xmm7
movsd  0xc25(%rip),%xmm1
ucomisd %xmm1,%xmm2
xorpd  %xmm2,%xmm2
jae    136f <starspot_+0x20f>
movsd  0x28(%rsp),%xmm2
addsd  %xmm0,%xmm2
ucomisd %xmm2,%xmm1
jae    1310 <starspot_+0x1b0>
movsd  %xmm0,0x50(%rsp)
call   1050 <sin@plt>
movapd %xmm0,%xmm2
movsd  %xmm0,0x10(%rsp)
movsd  0x18(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
call   1040 <acos@plt>
movsd  %xmm0,0xb0(%rsp)
call   1050 <sin@plt>
movapd %xmm0,%xmm1
mulsd  0x30(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
divsd  0x10(%rsp),%xmm2
movsd  0xba3(%rip),%xmm0
ucomisd 0x50(%rsp),%xmm0
movapd %xmm1,0x50(%rsp)
movsd  %xmm2,0x68(%rsp)
jae    14df <starspot_+0x37f>
xorpd  0xbbf(%rip),%xmm1
mulsd  0x10(%rsp),%xmm1
movapd %xmm1,0xc0(%rsp)
divsd  0x8(%rsp),%xmm1
movapd %xmm1,%xmm0
call   1060 <atan@plt>
movsd  0x68(%rsp),%xmm3
movapd 0x50(%rsp),%xmm2
movsd  0xb2d(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x70(%rsp)
jmp    1521 <starspot_+0x3c1>
movsd  0x10(%rsp),%xmm0
mulsd  %xmm1,%xmm0
divsd  0x8(%rsp),%xmm0
call   1060 <atan@plt>
movsd  0x68(%rsp),%xmm3
movapd 0x50(%rsp),%xmm2
movsd  %xmm0,0x70(%rsp)
movapd %xmm2,%xmm0
xorpd  0xb4e(%rip),%xmm0
mulsd  0x10(%rsp),%xmm0
movapd %xmm0,0xc0(%rsp)
movapd %xmm2,%xmm0
movaps %xmm3,%xmm1
call   1030 <atan2@plt>
movsd  0xacb(%rip),%xmm1
movsd  0xb0(%rsp),%xmm5
subsd  %xmm5,%xmm1
movsd  0x8(%rsp),%xmm8
mulsd  %xmm8,%xmm1
movsd  0x38(%rsp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm0,%xmm1
movsd  0x18(%rsp),%xmm2
movapd 0xc0(%rsp),%xmm7
mulsd  %xmm2,%xmm7
addsd  %xmm1,%xmm7
movsd  0x10(%rsp),%xmm6
movapd %xmm6,%xmm0
movsd  0xa8b(%rip),%xmm4
mulsd  %xmm4,%xmm0
mulsd  %xmm6,%xmm0
mulsd  %xmm2,%xmm0
movapd 0x50(%rsp),%xmm2
mulsd  %xmm3,%xmm0
movsd  0x78(%rsp),%xmm1
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
divsd  %xmm4,%xmm5
addsd  0xa7b(%rip),%xmm5
mulsd  %xmm5,%xmm0
movsd  0x70(%rsp),%xmm1
addsd  %xmm1,%xmm1
divsd  %xmm4,%xmm1
addsd  0xa69(%rip),%xmm1
addsd  %xmm0,%xmm1
addsd  %xmm2,%xmm2
mulsd  %xmm6,%xmm2
mulsd  %xmm8,%xmm2
mulsd  0xa8(%rsp),%xmm2
divsd  0xa4f(%rip),%xmm2
addsd  %xmm1,%xmm2
jmp    136f <starspot_+0x20f>
add    $0xd8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @starspot_(i32 %0, double* %1, double* %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9) {
%11 = alloca i32
%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 i32
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca double
%34 = alloca double
%35 = alloca double
%36 = alloca double
%37 = alloca double
%38 = alloca double
%39 = alloca double
%40 = alloca double
%41 = alloca double
%42 = alloca double
%43 = alloca double
store i32 %0, i32* %11
store double* %1, double** %12
store double* %2, double** %13
store double %3, double* %14
store double %4, double* %15
store double %5, double* %16
store double %6, double* %17
store double %7, double* %18
store double %8, double* %19
store double %9, double* %20
%44 = load double, double* %16
%45 = fmul double %44, 0x400921FB54442D18
%46 = fdiv double %45, 1.800000e+02
store double %46, double* %16
%47 = load double, double* %17
%48 = fmul double %47, 0x400921FB54442D18
%49 = fdiv double %48, 1.800000e+02
store double %49, double* %17
%50 = load double, double* %18
%51 = fmul double %50, 0x400921FB54442D18
%52 = fdiv double %51, 1.800000e+02
store double %52, double* %18
%53 = load double, double* %19
%54 = fmul double %53, 0x400921FB54442D18
%55 = fdiv double %54, 1.800000e+02
store double %55, double* %19
%56 = load double, double* %17
%57 = call double @cos(double %56)
store double %57, double* %32
%58 = load double, double* %18
%59 = call double @sin(double %58)
store double %59, double* %35
%60 = load double, double* %17
%61 = call double @sin(double %60)
store double %61, double* %33
%62 = load double, double* %18
%63 = call double @cos(double %62)
store double %63, double* %34
%64 = load double, double* %16
%65 = call double @sin(double %64)
store double %65, double* %30
%66 = load double, double* %30
%67 = load double, double* %30
%68 = fmul double %66, %67
store double %68, double* %31
%69 = load double, double* %16
%70 = call double @cos(double %69)
store double %70, double* %29
%71 = load double, double* %29
%72 = load double, double* %29
%73 = fmul double %71, %72
%74 = load double, double* %29
%75 = fmul double %73, %74
store double %75, double* %43
store i32 0, i32* %21
br label %76
76: ; preds = %239, %10
%77 = load i32, i32* %21
%78 = load i32, i32* %11
%79 = icmp slt i32 %77, %78
br i1 %79, label %80, label %242
80: ; preds = %76
%81 = load double*, double** %12
%82 = load i32, i32* %21
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds double, double* %81, i64 %83
%85 = load double, double* %84
%86 = load double*, double** %12
%87 = getelementptr inbounds double, double* %86, i64 0
%88 = load double, double* %87
%89 = fsub double %85, %88
%90 = load double, double* %20
%91 = fdiv double %89, %90
%92 = load double, double* %19
%93 = call double @llvm.fmuladd.f64(double 0x401921FB54442D18, double %91, double %92)
store double %93, double* %22
%94 = load double, double* %22
%95 = call double @cos(double %94)
store double %95, double* %36
%96 = load double, double* %32
%97 = load double, double* %35
%98 = load double, double* %33
%99 = load double, double* %34
%100 = fmul double %98, %99
%101 = load double, double* %36
%102 = fmul double %100, %101
%103 = call double @llvm.fmuladd.f64(double %96, double %97, double %102)
store double %103, double* %27
%104 = load double, double* %27
%105 = call double @acos(double %104)
store double %105, double* %26
%106 = load double, double* %26
%107 = load double, double* %16
%108 = fsub double %106, %107
%109 = fcmp oge double %108, 0x3FF921FB54524550
br i1 %109, label %110, label %111
110: ; preds = %80
store double 0.000000e+00, double* %41
store double 0.000000e+00, double* %42
br label %224
111: ; preds = %80
%112 = load double, double* %26
%113 = load double, double* %16
%114 = fadd double %112, %113
%115 = fcmp ole double %114, 0x3FF921FB54524550
br i1 %115, label %116, label %135
116: ; preds = %111
%117 = load double, double* %27
%118 = fmul double 0x400921FB54442D18, %117
%119 = load double, double* %31
%120 = fmul double %118, %119
store double %120, double* %41
%121 = load double, double* %26
%122 = call double @sin(double %121)
store double %122, double* %28
%123 = load double, double* %43
%124 = load double, double* %28
%125 = fmul double 3.000000e+00, %124
%126 = load double, double* %28
%127 = fmul double %125, %126
%128 = load double, double* %29
%129 = fmul double %127, %128
%130 = load double, double* %31
%131 = fmul double %129, %130
%132 = fneg double %131
%133 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %123, double %132)
%134 = call double @llvm.fmuladd.f64(double 0x3FF0C152381FF0D0, double %133, double 0x4000C152381FF0D0)
store double %134, double* %42
br label %223
135: ; preds = %111
%136 = load double, double* %26
%137 = call double @sin(double %136)
store double %137, double* %28
%138 = load double, double* %29
%139 = load double, double* %27
%140 = fmul double %138, %139
%141 = load double, double* %30
%142 = load double, double* %28
%143 = fmul double %141, %142
%144 = fdiv double %140, %143
store double %144, double* %38
%145 = load double, double* %38
%146 = call double @acos(double %145)
store double %146, double* %24
%147 = load double, double* %24
%148 = call double @sin(double %147)
store double %148, double* %37
%149 = load double, double* %37
%150 = load double, double* %30
%151 = fmul double %149, %150
store double %151, double* %39
%152 = load double, double* %29
%153 = load double, double* %28
%154 = fdiv double %152, %153
store double %154, double* %40
%155 = load double, double* %26
%156 = fcmp ole double %155, 0x3FF921FB54524550
br i1 %156, label %157, label %164
157: ; preds = %135
%158 = load double, double* %39
%159 = load double, double* %28
%160 = fmul double %158, %159
%161 = load double, double* %27
%162 = fdiv double %160, %161
%163 = call double @atan(double %162)
store double %163, double* %23
br label %173
164: ; preds = %135
%165 = load double, double* %39
%166 = fneg double %165
%167 = load double, double* %28
%168 = fmul double %166, %167
%169 = load double, double* %27
%170 = fdiv double %168, %169
%171 = call double @atan(double %170)
%172 = fsub double 0x400921FB54442D18, %171
store double %172, double* %23
br label %173
173: ; preds = %164, %157
%174 = load double, double* %39
%175 = load double, double* %40
%176 = call double @atan2(double %174, double %175)
store double %176, double* %25
%177 = load double, double* %25
%178 = load double, double* %24
%179 = fsub double 0x400921FB54442D18, %178
%180 = load double, double* %27
%181 = fmul double %179, %180
%182 = load double, double* %31
%183 = call double @llvm.fmuladd.f64(double %181, double %182, double %177)
%184 = load double, double* %39
%185 = load double, double* %28
%186 = fmul double %184, %185
%187 = load double, double* %29
%188 = fneg double %186
%189 = call double @llvm.fmuladd.f64(double %188, double %187, double %183)
store double %189, double* %41
%190 = load double, double* %24
%191 = fdiv double %190, 3.000000e+00
%192 = fsub double 0x3FF0C152381FF0D0, %191
%193 = load double, double* %43
%194 = load double, double* %28
%195 = fmul double 3.000000e+00, %194
%196 = load double, double* %28
%197 = fmul double %195, %196
%198 = load double, double* %29
%199 = fmul double %197, %198
%200 = load double, double* %31
%201 = fmul double %199, %200
%202 = fneg double %201
%203 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %193, double %202)
%204 = load double, double* %23
%205 = fmul double 2.000000e+00, %204
%206 = fdiv double %205, 3.000000e+00
%207 = fsub double 0x4000C152381FF0D0, %206
%208 = call double @llvm.fmuladd.f64(double %192, double %203, double %207)
%209 = load double, double* %39
%210 = fmul double %209, 2.000000e+00
%211 = load double, double* %28
%212 = fmul double %210, %211
%213 = load double, double* %27
%214 = fmul double %212, %213
%215 = load double, double* %29
%216 = fmul double 3.000000e+00, %215
%217 = load double, double* %29
%218 = fneg double %216
%219 = call double @llvm.fmuladd.f64(double %218, double %217, double 2.000000e+00)
%220 = fmul double %214, %219
%221 = fdiv double %220, 6.000000e+00
%222 = fadd double %208, %221
store double %222, double* %42
br label %223
223: ; preds = %173, %116
br label %224
224: ; preds = %223, %110
%225 = load double, double* %14
%226 = load double, double* %41
%227 = fneg double %225
%228 = call double @llvm.fmuladd.f64(double %227, double %226, double 1.000000e+00)
%229 = load double, double* %15
%230 = load double, double* %42
%231 = fneg double %229
%232 = call double @llvm.fmuladd.f64(double %231, double %230, double %228)
%233 = call double @log10(double %232)
%234 = fmul double -2.500000e+00, %233
%235 = load double*, double** %13
%236 = load i32, i32* %21
%237 = sext i32 %236 to i64
%238 = getelementptr inbounds double, double* %235, i64 %237
store double %234, double* %238
br label %239
239: ; preds = %224
%240 = load i32, i32* %21
%241 = add nsw i32 %240, 1
store i32 %241, i32* %21
br label %76
242: ; preds = %76
ret void
}

LLVM IR (-O2):
define void @starspot_(i32 %0, double* nocapture %1, double* nocapture writeonly %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9) {
%11 = fmul double %5, 0x400921FB54442D18
%12 = fdiv double %11, 1.800000e+02
%13 = fmul double %6, 0x400921FB54442D18
%14 = fdiv double %13, 1.800000e+02
%15 = fmul double %7, 0x400921FB54442D18
%16 = fdiv double %15, 1.800000e+02
%17 = fmul double %8, 0x400921FB54442D18
%18 = fdiv double %17, 1.800000e+02
%19 = tail call double @cos(double %14)
%20 = tail call double @sin(double %16)
%21 = tail call double @sin(double %14)
%22 = tail call double @cos(double %16)
%23 = tail call double @sin(double %12)
%24 = fmul double %23, %23
%25 = tail call double @cos(double %12)
%26 = fmul double %25, %25
%27 = fmul double %25, %26
%28 = icmp sgt i32 %0, 0
br i1 %28, label %29, label %120
29: ; preds = %10
%30 = fmul double %21, %22
%31 = fmul double %25, -3.000000e+00
%32 = tail call double @llvm.fmuladd.f64(double %31, double %25, double 2.000000e+00)
%33 = fneg double %3
%34 = fneg double %4
%35 = zext i32 %0 to i64
br label %36
36: ; preds = %29, %110
%37 = phi i64 [ 0, %29 ], [ %118, %110 ]
%38 = getelementptr inbounds double, double* %1, i64 %37
%39 = load double, double* %38
%40 = load double, double* %1
%41 = fsub double %39, %40
%42 = fdiv double %41, %9
%43 = tail call double @llvm.fmuladd.f64(double %42, double 0x401921FB54442D18, double %18)
%44 = tail call double @cos(double %43)
%45 = fmul double %30, %44
%46 = tail call double @llvm.fmuladd.f64(double %19, double %20, double %45)
%47 = tail call double @acos(double %46)
%48 = fsub double %47, %12
%49 = fcmp ult double %48, 0x3FF921FB54524550
br i1 %49, label %50, label %110
50: ; preds = %36
%51 = fadd double %12, %47
%52 = fcmp ugt double %51, 0x3FF921FB54524550
br i1 %52, label %63, label %53
53: ; preds = %50
%54 = fmul double %46, 0x400921FB54442D18
%55 = fmul double %24, %54
%56 = tail call double @sin(double %47)
%57 = fmul double %56, -3.000000e+00
%58 = fmul double %56, %57
%59 = fmul double %25, %58
%60 = fmul double %24, %59
%61 = tail call double @llvm.fmuladd.f64(double %27, double -2.000000e+00, double %60)
%62 = tail call double @llvm.fmuladd.f64(double %61, double 0x3FF0C152381FF0D0, double 0x4000C152381FF0D0)
br label %110
63: ; preds = %50
%64 = tail call double @sin(double %47)
%65 = fmul double %25, %46
%66 = fmul double %23, %64
%67 = fdiv double %65, %66
%68 = tail call double @acos(double %67)
%69 = tail call double @sin(double %68)
%70 = fmul double %23, %69
%71 = fdiv double %25, %64
%72 = fcmp ugt double %47, 0x3FF921FB54524550
br i1 %72, label %79, label %73
73: ; preds = %63
%74 = fmul double %64, %70
%75 = fdiv double %74, %46
%76 = tail call double @atan(double %75)
%77 = fneg double %70
%78 = fmul double %64, %77
br label %85
79: ; preds = %63
%80 = fneg double %70
%81 = fmul double %64, %80
%82 = fdiv double %81, %46
%83 = tail call double @atan(double %82)
%84 = fsub double 0x400921FB54442D18, %83
br label %85
85: ; preds = %79, %73
%86 = phi double [ %81, %79 ], [ %78, %73 ]
%87 = phi double [ %84, %79 ], [ %76, %73 ]
%88 = tail call double @atan2(double %70, double %71)
%89 = fsub double 0x400921FB54442D18, %68
%90 = fmul double %46, %89
%91 = tail call double @llvm.fmuladd.f64(double %90, double %24, double %88)
%92 = tail call double @llvm.fmuladd.f64(double %86, double %25, double %91)
%93 = fdiv double %68, 3.000000e+00
%94 = fsub double 0x3FF0C152381FF0D0, %93
%95 = fmul double %64, -3.000000e+00
%96 = fmul double %64, %95
%97 = fmul double %25, %96
%98 = fmul double %24, %97
%99 = tail call double @llvm.fmuladd.f64(double %27, double -2.000000e+00, double %98)
%100 = fmul double %87, 2.000000e+00
%101 = fdiv double %100, 3.000000e+00
%102 = fsub double 0x4000C152381FF0D0, %101
%103 = tail call double @llvm.fmuladd.f64(double %94, double %99, double %102)
%104 = fmul double %70, 2.000000e+00
%105 = fmul double %64, %104
%106 = fmul double %46, %105
%107 = fmul double %32, %106
%108 = fdiv double %107, 6.000000e+00
%109 = fadd double %108, %103
br label %110
110: ; preds = %36, %53, %85
%111 = phi double [ %55, %53 ], [ %92, %85 ], [ 0.000000e+00, %36 ]
%112 = phi double [ %62, %53 ], [ %109, %85 ], [ 0.000000e+00, %36 ]
%113 = tail call double @llvm.fmuladd.f64(double %33, double %111, double 1.000000e+00)
%114 = tail call double @llvm.fmuladd.f64(double %34, double %112, double %113)
%115 = tail call double @log10(double %114)
%116 = fmul double %115, -2.500000e+00
%117 = getelementptr inbounds double, double* %2, i64 %37
store double %116, double* %117
%118 = add nuw nsw i64 %37, 1
%119 = icmp eq i64 %118, %35
br i1 %119, label %120, label %36
120: ; preds = %110, %10
ret void
}