#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 M_PI;
int asin(double);
int atan2(double, double);
double cos(double);
double fabs(double);
double sin(double);
double sqrt(int);
void elements(double *deltaT, double period, double a, double k, double h,
              int n, double *eta, double *xi) {
  double e = sqrt(k * k + h * h);
  double l = 1 - sqrt(1 - k * k - h * h);
  double Mdot = 2 * M_PI / period;
  double atan2hk = atan2(h, k);
  double Emid = M_PI - asin(k * e / sqrt(k * k + h * h * (1 - e * e))) -
                atan2(k, -h * sqrt(1 - k * k - h * h));
  double Mmid = Emid - e * sin(Emid);
  double tol = 10.0 * M_PI / (43200.0 * period);
  int i;
  double M, lam, E, Enew, p;
  for (i = 0; i < n; i++) {
    M = Mdot * *(deltaT + i) + Mmid;
    lam = M + atan2hk;
    E = M;
    Enew = E - (E - e * sin(E) - M) / (1.0 - e * cos(E));
    while (fabs(Enew - E) > tol) {
      E = Enew;
      Enew = E - (E - e * sin(E) - M) / (1.0 - e * cos(E));
    }
    E = Enew;
    p = e * sin(E);
    *(eta + i) = a * (sin(lam + p) - k * p / (2.0 - l) - h);
    *(xi + i) = a * (cos(lam + p) + h * p / (2.0 - l) - k);
  }
  return;
}


x86 assembly (clang, -O0):
<elements>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
mov    %esi,-0x2c(%rbp)
mov    %rdx,-0x38(%rbp)
mov    %rcx,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1070 <sqrt@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xe3b(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1070 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xdfa(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    0x2dc2(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1030 <atan2@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    0x2d90(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xd4(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm3
movsd  -0x48(%rbp),%xmm4
movq   %xmm3,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm3
mulsd  %xmm4,%xmm3
movsd  0xd5d(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1070 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xe0(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
call   1050 <asin@plt>
mov    %eax,%ecx
mov    -0xd4(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0xbc(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x20(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xcc2(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1070 <sqrt@plt>
movsd  -0xd0(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xc8(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
call   1030 <atan2@plt>
mov    %eax,%ecx
mov    -0xbc(%rbp),%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
call   1040 <sin@plt>
movsd  -0xb8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xb0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    0x2bd3(%rip),%rax
cvtsi2sdl (%rax),%xmm1
movsd  0xbe7(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xbd3(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movl   $0x0,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    17be <elements+0x66e>
movsd  -0x58(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x7c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
call   1040 <sin@plt>
movsd  -0x108(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x100(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
subsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
call   1060 <cos@plt>
movsd  -0xf8(%rbp),%xmm2
ff
movsd  -0xf0(%rbp),%xmm1
ff
movaps %xmm0,%xmm3
movsd  -0xe8(%rbp),%xmm0
ff
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm2
movsd  0xaa2(%rip),%xmm3
addsd  %xmm3,%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
subsd  -0x98(%rbp),%xmm0
ff
movaps 0xa87(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0x78(%rbp),%xmm0
jbe    16a5 <elements+0x555>
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
call   1040 <sin@plt>
movsd  -0x130(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x128(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
subsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
call   1060 <cos@plt>
movsd  -0x120(%rbp),%xmm2
ff
movsd  -0x118(%rbp),%xmm1
ff
movaps %xmm0,%xmm3
movsd  -0x110(%rbp),%xmm0
ff
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm2
movsd  0x984(%rip),%xmm3
addsd  %xmm3,%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
jmp    1582 <elements+0x432>
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x148(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x148(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
addsd  -0xa8(%rbp),%xmm0
ff
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x140(%rbp),%xmm0
ff
movsd  -0x20(%rbp),%xmm2
mulsd  -0xa8(%rbp),%xmm2
ff
movsd  0x8f0(%rip),%xmm3
subsd  -0x50(%rbp),%xmm3
divsd  %xmm3,%xmm2
subsd  %xmm2,%xmm1
subsd  -0x28(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movslq -0x7c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
addsd  -0xa8(%rbp),%xmm0
ff
call   1060 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x138(%rbp),%xmm0
ff
movsd  -0x28(%rbp),%xmm2
mulsd  -0xa8(%rbp),%xmm2
ff
movsd  0x88b(%rip),%xmm3
subsd  -0x50(%rbp),%xmm3
divsd  %xmm3,%xmm2
addsd  %xmm2,%xmm1
subsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x40(%rbp),%rax
movslq -0x7c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    1442 <elements+0x2f2>
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<elements>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb8,%rsp
mov    %rcx,%r14
mov    %rdx,%r15
mov    %esi,0x48(%rsp)
movapd %xmm3,0x70(%rsp)
movsd  %xmm2,0x8(%rsp)
movsd  %xmm1,0x68(%rsp)
movsd  %xmm0,0xb0(%rsp)
mov    %rdi,%r13
movapd %xmm3,%xmm1
mulsd  %xmm3,%xmm1
movapd %xmm1,0x90(%rsp)
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movsd  %xmm0,(%rsp)
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1070 <sqrt@plt>
movapd %xmm0,0xa0(%rsp)
movsd  0xe3b(%rip),%xmm0
subsd  (%rsp),%xmm0
movapd 0xe5e(%rip),%xmm1
movapd 0x70(%rsp),%xmm2
movapd %xmm1,0x50(%rsp)
xorpd  %xmm1,%xmm2
movapd %xmm2,0x10(%rsp)
subsd  0x90(%rsp),%xmm0
cvttsd2si %xmm0,%ebp
mov    %ebp,%edi
call   1070 <sqrt@plt>
movsd  %xmm0,0x28(%rsp)
mov    0x2ddf(%rip),%rbx
mov    (%rbx),%eax
mov    %eax,0x38(%rsp)
movaps 0x70(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1030 <atan2@plt>
mov    %eax,0x30(%rsp)
mov    (%rbx),%ebx
movapd 0xa0(%rsp),%xmm0
movapd %xmm0,%xmm1
mulsd  0x8(%rsp),%xmm1
movapd %xmm1,0x80(%rsp)
mulsd  %xmm0,%xmm0
movsd  0xdb3(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  0x90(%rsp),%xmm1
addsd  (%rsp),%xmm1
cvttsd2si %xmm1,%edi
call   1070 <sqrt@plt>
movapd 0x80(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1050 <asin@plt>
mov    %eax,%r12d
mov    %ebp,%edi
call   1070 <sqrt@plt>
movapd 0x10(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
call   1030 <atan2@plt>
add    %r12d,%eax
sub    %eax,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movsd  %xmm0,0x40(%rsp)
call   1040 <sin@plt>
mov    0x48(%rsp),%eax
test   %eax,%eax
jle    1541 <elements+0x3f1>
mov    0x38(%rsp),%ecx
add    %ecx,%ecx
xorps  %xmm1,%xmm1
cvtsi2sd %ecx,%xmm1
movsd  0xb0(%rsp),%xmm3
divsd  %xmm3,%xmm1
movsd  %xmm1,0x38(%rsp)
xorps  %xmm1,%xmm1
cvtsi2sdl 0x30(%rsp),%xmm1
movsd  %xmm1,0x30(%rsp)
movapd 0xa0(%rsp),%xmm1
movapd 0x50(%rsp),%xmm2
xorpd  %xmm1,%xmm2
movapd %xmm2,0x50(%rsp)
mulsd  %xmm1,%xmm0
movsd  0x40(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x40(%rsp)
mov    0x2cc5(%rip),%rcx
xorps  %xmm1,%xmm1
cvtsi2sdl (%rcx),%xmm1
mulsd  0xcd6(%rip),%xmm1
mulsd  0xcd6(%rip),%xmm3
movsd  0x28(%rsp),%xmm0
addsd  0xcd0(%rip),%xmm0
addsd  0xcd0(%rip),%xmm0
movsd  %xmm0,0x28(%rsp)
divsd  %xmm3,%xmm1
movsd  %xmm1,0x80(%rsp)
mov    %eax,%ebp
xor    %ebx,%ebx
jmp    141c <elements+0x2cc>
nopl   0x0(%rax)
movapd %xmm0,%xmm6
movsd  0x10(%rsp),%xmm0
addsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movapd %xmm6,%xmm0
call   1040 <sin@plt>
movapd %xmm0,%xmm1
mulsd  0xa0(%rsp),%xmm1
movsd  %xmm1,(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
call   1040 <sin@plt>
movsd  (%rsp),%xmm1
mulsd  0x8(%rsp),%xmm1
divsd  0x28(%rsp),%xmm1
subsd  %xmm1,%xmm0
subsd  0x70(%rsp),%xmm0
mulsd  0x68(%rsp),%xmm0
movsd  %xmm0,(%r15,%rbx,8)
movsd  0x10(%rsp),%xmm0
call   1060 <cos@plt>
movsd  (%rsp),%xmm1
mulsd  0x70(%rsp),%xmm1
divsd  0x28(%rsp),%xmm1
addsd  %xmm0,%xmm1
subsd  0x8(%rsp),%xmm1
mulsd  0x68(%rsp),%xmm1
movsd  %xmm1,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbp,%rbx
je     1541 <elements+0x3f1>
movsd  0x0(%r13,%rbx,8),%xmm0
mulsd  0x38(%rsp),%xmm0
addsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
call   1040 <sin@plt>
mulsd  0x50(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
addsd  %xmm1,%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rsp)
movapd %xmm1,%xmm0
call   1060 <cos@plt>
movsd  0x10(%rsp),%xmm2
movapd 0x50(%rsp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xb8c(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm2,%xmm0
subsd  %xmm1,%xmm0
movapd %xmm0,%xmm6
subsd  %xmm2,%xmm6
movapd 0xba7(%rip),%xmm1
andpd  %xmm1,%xmm6
movsd  0x80(%rsp),%xmm3
ucomisd %xmm3,%xmm6
jbe    1370 <elements+0x220>
movapd %xmm0,%xmm6
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  %xmm0,(%rsp)
movsd  %xmm6,0x90(%rsp)
call   1040 <sin@plt>
movapd %xmm0,%xmm1
mulsd  0x50(%rsp),%xmm1
movsd  (%rsp),%xmm0
addsd  %xmm0,%xmm1
subsd  0x10(%rsp),%xmm1
movsd  %xmm1,0x48(%rsp)
call   1060 <cos@plt>
movsd  0x90(%rsp),%xmm6
mulsd  0x50(%rsp),%xmm0
addsd  0xaf2(%rip),%xmm0
movsd  0x48(%rsp),%xmm1
divsd  %xmm0,%xmm1
subsd  %xmm1,%xmm6
movapd %xmm6,%xmm0
subsd  (%rsp),%xmm0
andpd  0xb13(%rip),%xmm0
ucomisd 0x80(%rsp),%xmm0
movapd %xmm6,%xmm0
ja     14c0 <elements+0x370>
jmp    1374 <elements+0x224>
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@M_PI = global i32 0
define void @elements(double* nocapture %0, double %1, double %2, double %3, double %4, i32 %5, double* nocapture writeonly %6, double* nocapture writeonly %7) {
%9 = fmul double %4, %4
%10 = tail call double @llvm.fmuladd.f64(double %3, double %3, double %9)
%11 = fptosi double %10 to i32
%12 = tail call double @sqrt(i32 %11)
%13 = fneg double %3
%14 = tail call double @llvm.fmuladd.f64(double %13, double %3, double 1.000000e+00)
%15 = fneg double %4
%16 = tail call double @llvm.fmuladd.f64(double %15, double %4, double %14)
%17 = fptosi double %16 to i32
%18 = tail call double @sqrt(i32 %17)
%19 = load i32, i32* @M_PI
%20 = shl nsw i32 %19, 1
%21 = sitofp i32 %20 to double
%22 = fdiv double %21, %1
%23 = tail call i32 @atan2(double %4, double %3)
%24 = sitofp i32 %23 to double
%25 = load i32, i32* @M_PI
%26 = fmul double %12, %3
%27 = fneg double %12
%28 = tail call double @llvm.fmuladd.f64(double %27, double %12, double 1.000000e+00)
%29 = fmul double %9, %28
%30 = tail call double @llvm.fmuladd.f64(double %3, double %3, double %29)
%31 = fptosi double %30 to i32
%32 = tail call double @sqrt(i32 %31)
%33 = fdiv double %26, %32
%34 = tail call i32 @asin(double %33)
%35 = tail call double @sqrt(i32 %17)
%36 = fmul double %35, %15
%37 = tail call i32 @atan2(double %3, double %36)
%38 = add i32 %34, %37
%39 = sub i32 %25, %38
%40 = sitofp i32 %39 to double
%41 = tail call double @sin(double %40)
%42 = tail call double @llvm.fmuladd.f64(double %27, double %41, double %40)
%43 = load i32, i32* @M_PI
%44 = sitofp i32 %43 to double
%45 = fmul double %44, 1.000000e+01
%46 = fmul double %1, 4.320000e+04
%47 = fdiv double %45, %46
%48 = icmp sgt i32 %5, 0
br i1 %48, label %49, label %102
49: ; preds = %8
%50 = fadd double %18, -1.000000e+00
%51 = fadd double %50, 2.000000e+00
%52 = zext i32 %5 to i64
br label %53
53: ; preds = %49, %81
%54 = phi i64 [ 0, %49 ], [ %100, %81 ]
%55 = getelementptr inbounds double, double* %0, i64 %54
%56 = load double, double* %55
%57 = tail call double @llvm.fmuladd.f64(double %22, double %56, double %42)
%58 = fadd double %57, %24
%59 = tail call double @sin(double %57)
%60 = tail call double @llvm.fmuladd.f64(double %27, double %59, double %57)
%61 = fsub double %60, %57
%62 = tail call double @cos(double %57)
%63 = tail call double @llvm.fmuladd.f64(double %27, double %62, double 1.000000e+00)
%64 = fdiv double %61, %63
%65 = fsub double %57, %64
%66 = fsub double %65, %57
%67 = tail call double @llvm.fabs.f64(double %66)
%68 = fcmp ogt double %67, %47
br i1 %68, label %69, label %81
69: ; preds = %53, %69
%70 = phi double [ %77, %69 ], [ %65, %53 ]
%71 = tail call double @sin(double %70)
%72 = tail call double @llvm.fmuladd.f64(double %27, double %71, double %70)
%73 = fsub double %72, %57
%74 = tail call double @cos(double %70)
%75 = tail call double @llvm.fmuladd.f64(double %27, double %74, double 1.000000e+00)
%76 = fdiv double %73, %75
%77 = fsub double %70, %76
%78 = fsub double %77, %70
%79 = tail call double @llvm.fabs.f64(double %78)
%80 = fcmp ogt double %79, %47
br i1 %80, label %69, label %81
81: ; preds = %69, %53
%82 = phi double [ %65, %53 ], [ %77, %69 ]
%83 = tail call double @sin(double %82)
%84 = fmul double %12, %83
%85 = fadd double %58, %84
%86 = tail call double @sin(double %85)
%87 = fmul double %84, %3
%88 = fdiv double %87, %51
%89 = fsub double %86, %88
%90 = fsub double %89, %4
%91 = fmul double %90, %2
%92 = getelementptr inbounds double, double* %6, i64 %54
store double %91, double* %92
%93 = tail call double @cos(double %85)
%94 = fmul double %84, %4
%95 = fdiv double %94, %51
%96 = fadd double %93, %95
%97 = fsub double %96, %3
%98 = fmul double %97, %2
%99 = getelementptr inbounds double, double* %7, i64 %54
store double %98, double* %99
%100 = add nuw nsw i64 %54, 1
%101 = icmp eq i64 %100, %52
br i1 %101, label %102, label %53
102: ; preds = %81, %8
ret void
}