#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 cos(double);
double fabs(double);
double pow(double, double);
double sin(double);
double sqrt(double);
int elem2pv(double mu, const double elem[6], double xv[2][3]) {
  double k, h, q, p, a, al, an, ee, ce, se, de, dle, rsam1, asr, phi, psi, x1,
      y1, vx1, vy1, f2, p2, q2, pq;
  k = elem[2];
  h = elem[3];
  q = elem[4];
  p = elem[5];
  a = elem[0];
  al = elem[1];
  an = sqrt(mu / pow(a, 3.0));
  ee = al + k * sin(al) - h * cos(al);
  do {
    ce = cos(ee);
    se = sin(ee);
    de = (al - ee + k * se - h * ce) / (1.0 - k * ce - h * se);
    ee = ee + de;
  } while (fabs(de) > 1.0E-12);
  ce = cos(ee);
  se = sin(ee);
  dle = h * ce - k * se;
  rsam1 = -k * ce - h * se;
  asr = 1.0 / (1.0 + rsam1);
  phi = sqrt(1.0 - k * k - h * h);
  psi = 1.0 / (1.0 + phi);
  x1 = a * (ce - k - psi * h * dle);
  y1 = a * (se - h + psi * k * dle);
  vx1 = an * asr * a * (-se - psi * h * rsam1);
  vy1 = an * asr * a * (ce + psi * k * rsam1);
  f2 = 2.0 * sqrt(1.0 - q * q - p * p);
  p2 = 1.0 - 2.0 * p * p;
  q2 = 1.0 - 2.0 * q * q;
  pq = 2.0 * p * q;
  xv[0][0] = x1 * p2 + y1 * pq;
  xv[0][1] = x1 * pq + y1 * q2;
  xv[0][2] = (q * y1 - x1 * p) * f2;
  xv[1][0] = vx1 * p2 + vy1 * pq;
  xv[1][1] = vx1 * pq + vy1 * q2;
  xv[1][2] = (q * vy1 - vx1 * p) * f2;
  return 0;
}


x86 assembly (clang, -O0):
<elem2pv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  0xe3b(%rip),%xmm1
call   1050 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x100(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
call   1060 <sqrt@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
call   1030 <sin@plt>
movsd  -0xf8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xf0(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
call   1040 <cos@plt>
movsd  -0xe8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xe0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  -0x48(%rbp),%xmm0
subsd  -0x58(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm1,%xmm2
movsd  0xd00(%rip),%xmm1
addsd  %xmm1,%xmm2
movsd  -0x28(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm3
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x58(%rbp),%xmm0
addsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x70(%rbp),%xmm0
movaps 0xcc7(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xcab(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     1278 <elem2pv+0x138>
movsd  -0x58(%rbp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm1
mulsd  -0x68(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  -0x68(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xbec(%rip),%xmm1
addsd  -0x80(%rbp),%xmm1
movsd  0xbdf(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%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  0xba6(%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
call   1060 <sqrt@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xb64(%rip),%xmm1
addsd  -0x90(%rbp),%xmm1
ff
movsd  0xb54(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
subsd  -0x20(%rbp),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  -0x28(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm3
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
subsd  -0x28(%rbp),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  -0x20(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x40(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  -0x28(%rbp),%xmm1
movsd  -0x80(%rbp),%xmm3
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  -0x20(%rbp),%xmm1
movsd  -0x80(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x30(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm0,%xmm1
movsd  0x9f2(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0x9c5(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  0x9b1(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0x974(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  0x970(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0x933(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  0x92f(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0xc8(%rbp),%xmm2
ff
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  -0xd8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0xd8(%rbp),%xmm2
ff
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  -0xd0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x30(%rbp),%xmm0
movsd  -0xa8(%rbp),%xmm2
ff
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  -0x38(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0xc0(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xc8(%rbp),%xmm2
ff
movsd  -0xb8(%rbp),%xmm1
ff
mulsd  -0xd8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xd8(%rbp),%xmm2
ff
movsd  -0xb8(%rbp),%xmm1
ff
mulsd  -0xd0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x30(%rbp),%xmm0
movsd  -0xb8(%rbp),%xmm2
ff
movsd  -0xb0(%rbp),%xmm1
ff
mulsd  -0x38(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0xc0(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x28(%rax)
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<elem2pv>:
push   %rbx
sub    $0xc0,%rsp
mov    %rsi,%rbx
movsd  %xmm0,(%rsp)
movsd  0x10(%rdi),%xmm0
movaps %xmm0,0x20(%rsp)
movsd  0x18(%rdi),%xmm0
movaps %xmm0,0x60(%rsp)
movsd  0x20(%rdi),%xmm0
movsd  %xmm0,0x58(%rsp)
movsd  0x28(%rdi),%xmm0
movsd  %xmm0,0x50(%rsp)
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0xe6f(%rip),%xmm1
movsd  %xmm0,0x98(%rsp)
call   1050 <pow@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
movapd %xmm1,%xmm0
jb     11bc <elem2pv+0x7c>
sqrtsd %xmm0,%xmm0
jmp    11c1 <elem2pv+0x81>
call   1060 <sqrt@plt>
movsd  %xmm0,0x48(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
mulsd  0x20(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rsp)
movapd %xmm1,%xmm0
call   1040 <cos@plt>
movapd 0xe28(%rip),%xmm3
movapd 0x60(%rsp),%xmm1
movapd %xmm1,%xmm2
xorpd  %xmm3,%xmm2
mulsd  %xmm1,%xmm0
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
movapd 0x20(%rsp),%xmm4
xorpd  %xmm4,%xmm3
movapd %xmm2,0xb0(%rsp)
pshufd $0x44,%xmm2,%xmm1
movdqa %xmm1,0x80(%rsp)
movapd %xmm4,%xmm1
movapd %xmm3,0xa0(%rsp)
unpcklpd %xmm3,%xmm1
movapd %xmm1,0x70(%rsp)
nop
movsd  %xmm0,(%rsp)
call   1040 <cos@plt>
movapd %xmm0,0x30(%rsp)
movsd  (%rsp),%xmm0
call   1030 <sin@plt>
movsd  0x10(%rsp),%xmm1
movsd  (%rsp),%xmm3
subsd  %xmm3,%xmm1
shufpd $0x2,0xdae(%rip),%xmm1
movapd %xmm0,%xmm2
movapd 0x30(%rsp),%xmm4
unpcklpd %xmm4,%xmm2
mulpd  0x70(%rsp),%xmm2
addpd  %xmm1,%xmm2
movapd %xmm4,%xmm1
unpcklpd %xmm0,%xmm1
mulpd  0x80(%rsp),%xmm1
addpd  %xmm2,%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
divsd  %xmm0,%xmm1
movapd %xmm3,%xmm0
addsd  %xmm1,%xmm0
andpd  0xd75(%rip),%xmm1
ucomisd 0xd35(%rip),%xmm1
ja     1250 <elem2pv+0x110>
movsd  %xmm0,(%rsp)
call   1040 <cos@plt>
movsd  %xmm0,0x30(%rsp)
movsd  (%rsp),%xmm0
call   1030 <sin@plt>
movapd %xmm0,%xmm10
movapd 0xa0(%rsp),%xmm3
mulsd  %xmm3,%xmm0
movapd 0x60(%rsp),%xmm1
movapd %xmm1,%xmm9
movsd  0x30(%rsp),%xmm5
mulsd  %xmm5,%xmm9
addsd  %xmm0,%xmm9
movapd %xmm10,%xmm2
movapd 0xb0(%rsp),%xmm0
mulsd  %xmm0,%xmm2
movapd %xmm3,%xmm4
mulsd  %xmm5,%xmm4
addsd  %xmm2,%xmm4
movsd  0xcca(%rip),%xmm6
movapd %xmm4,%xmm2
addsd  %xmm6,%xmm2
movapd %xmm6,%xmm12
divsd  %xmm2,%xmm12
mulsd  0x20(%rsp),%xmm3
addsd  %xmm6,%xmm3
mulsd  %xmm1,%xmm0
addsd  %xmm3,%xmm0
xorpd  %xmm11,%xmm11
ucomisd %xmm11,%xmm0
jb     137c <elem2pv+0x23c>
sqrtsd %xmm0,%xmm0
jmp    13c8 <elem2pv+0x288>
movapd %xmm9,(%rsp)
movsd  %xmm10,0x10(%rsp)
movsd  %xmm4,0x80(%rsp)
movsd  %xmm12,0x70(%rsp)
call   1060 <sqrt@plt>
movsd  0x70(%rsp),%xmm12
xorpd  %xmm11,%xmm11
movsd  0x80(%rsp),%xmm4
movsd  0x10(%rsp),%xmm10
movapd (%rsp),%xmm9
movsd  0xc48(%rip),%xmm6
addsd  %xmm6,%xmm0
movapd %xmm6,%xmm5
divsd  %xmm0,%xmm5
movsd  0x30(%rsp),%xmm8
movapd %xmm8,%xmm0
movapd 0x20(%rsp),%xmm1
subsd  %xmm1,%xmm0
mulsd  %xmm5,%xmm1
xorpd  0xc2a(%rip),%xmm5
movapd 0x60(%rsp),%xmm3
mulsd  %xmm3,%xmm5
movapd %xmm5,%xmm7
mulsd  %xmm9,%xmm7
addsd  %xmm0,%xmm7
movsd  0x98(%rsp),%xmm2
mulsd  %xmm2,%xmm7
movapd %xmm10,%xmm0
subsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm9
addsd  %xmm0,%xmm9
mulsd  %xmm2,%xmm9
movsd  0x48(%rsp),%xmm0
mulsd  %xmm12,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm4,%xmm5
subsd  %xmm10,%xmm5
mulsd  %xmm0,%xmm5
mulsd  %xmm4,%xmm1
addsd  %xmm8,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,0x20(%rsp)
movsd  0x58(%rsp),%xmm1
mulsd  %xmm1,%xmm1
movapd %xmm6,%xmm0
subsd  %xmm1,%xmm0
movsd  0x50(%rsp),%xmm1
mulsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
ucomisd %xmm11,%xmm0
jb     148e <elem2pv+0x34e>
sqrtsd %xmm0,%xmm0
jmp    14bf <elem2pv+0x37f>
movapd %xmm9,(%rsp)
movapd %xmm5,0x30(%rsp)
movapd %xmm7,0x10(%rsp)
call   1060 <sqrt@plt>
movapd 0x10(%rsp),%xmm7
movapd 0x30(%rsp),%xmm5
movapd (%rsp),%xmm9
movsd  0xb51(%rip),%xmm6
addsd  %xmm0,%xmm0
movsd  0x50(%rsp),%xmm8
movapd %xmm8,%xmm2
addsd  %xmm8,%xmm2
movsd  0x58(%rsp),%xmm4
movapd %xmm4,%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm8,%xmm2
movsd  0xb29(%rip),%xmm3
mulsd  %xmm4,%xmm3
mulsd  %xmm4,%xmm3
addsd  %xmm6,%xmm3
subsd  %xmm2,%xmm6
unpcklpd %xmm1,%xmm6
unpcklpd %xmm3,%xmm1
movapd %xmm4,%xmm2
mulsd  %xmm9,%xmm2
unpcklpd %xmm9,%xmm9
mulpd  %xmm1,%xmm9
movapd %xmm8,%xmm3
mulsd  %xmm7,%xmm3
unpcklpd %xmm7,%xmm7
mulpd  %xmm6,%xmm7
addpd  %xmm9,%xmm7
movupd %xmm7,(%rbx)
subsd  %xmm3,%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,0x10(%rbx)
movapd 0x20(%rsp),%xmm2
mulsd  %xmm2,%xmm4
unpcklpd %xmm2,%xmm2
mulpd  %xmm1,%xmm2
mulsd  %xmm5,%xmm8
unpcklpd %xmm5,%xmm5
mulpd  %xmm6,%xmm5
addpd  %xmm2,%xmm5
movupd %xmm5,0x18(%rbx)
subsd  %xmm8,%xmm4
mulsd  %xmm0,%xmm4
movsd  %xmm4,0x28(%rbx)
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @elem2pv(double %0, double* nocapture %1, [3 x double]* nocapture writeonly %2) {
%4 = getelementptr inbounds double, double* %1, i64 2
%5 = load double, double* %4
%6 = getelementptr inbounds double, double* %1, i64 3
%7 = load double, double* %6
%8 = getelementptr inbounds double, double* %1, i64 4
%9 = load double, double* %8
%10 = getelementptr inbounds double, double* %1, i64 5
%11 = load double, double* %10
%12 = load double, double* %1
%13 = getelementptr inbounds double, double* %1, i64 1
%14 = load double, double* %13
%15 = tail call double @pow(double %12, double 3.000000e+00)
%16 = fdiv double %0, %15
%17 = tail call double @sqrt(double %16)
%18 = tail call double @sin(double %14)
%19 = tail call double @llvm.fmuladd.f64(double %5, double %18, double %14)
%20 = tail call double @cos(double %14)
%21 = fneg double %7
%22 = tail call double @llvm.fmuladd.f64(double %21, double %20, double %19)
%23 = fneg double %5
%24 = insertelement <2 x double> poison, double %21, i64 0
%25 = shufflevector <2 x double> %24, <2 x double> poison, <2 x i32> zeroinitializer
%26 = insertelement <2 x double> poison, double %5, i64 0
%27 = insertelement <2 x double> %26, double %23, i64 1
br label %28
28: ; preds = %28, %3
%29 = phi double [ %22, %3 ], [ %43, %28 ]
%30 = tail call double @cos(double %29)
%31 = tail call double @sin(double %29)
%32 = fsub double %14, %29
%33 = insertelement <2 x double> poison, double %31, i64 0
%34 = insertelement <2 x double> %33, double %30, i64 1
%35 = insertelement <2 x double> <double poison, double 1.000000e+00>, double %32, i64 0
%36 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %27, <2 x double> %34, <2 x double> %35)
%37 = insertelement <2 x double> poison, double %30, i64 0
%38 = insertelement <2 x double> %37, double %31, i64 1
%39 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %25, <2 x double> %38, <2 x double> %36)
%40 = extractelement <2 x double> %39, i64 0
%41 = extractelement <2 x double> %39, i64 1
%42 = fdiv double %40, %41
%43 = fadd double %29, %42
%44 = tail call double @llvm.fabs.f64(double %42)
%45 = fcmp ogt double %44, 0x3D719799812DEA11
br i1 %45, label %28, label %46
46: ; preds = %28
%47 = tail call double @cos(double %43)
%48 = tail call double @sin(double %43)
%49 = fmul double %48, %23
%50 = tail call double @llvm.fmuladd.f64(double %7, double %47, double %49)
%51 = fmul double %48, %21
%52 = tail call double @llvm.fmuladd.f64(double %23, double %47, double %51)
%53 = fadd double %52, 1.000000e+00
%54 = fdiv double 1.000000e+00, %53
%55 = tail call double @llvm.fmuladd.f64(double %23, double %5, double 1.000000e+00)
%56 = tail call double @llvm.fmuladd.f64(double %21, double %7, double %55)
%57 = tail call double @sqrt(double %56)
%58 = fadd double %57, 1.000000e+00
%59 = fdiv double 1.000000e+00, %58
%60 = fsub double %47, %5
%61 = fneg double %59
%62 = fmul double %7, %61
%63 = tail call double @llvm.fmuladd.f64(double %62, double %50, double %60)
%64 = fmul double %12, %63
%65 = fsub double %48, %7
%66 = fmul double %5, %59
%67 = tail call double @llvm.fmuladd.f64(double %66, double %50, double %65)
%68 = fmul double %12, %67
%69 = fmul double %17, %54
%70 = fmul double %12, %69
%71 = fneg double %48
%72 = tail call double @llvm.fmuladd.f64(double %62, double %52, double %71)
%73 = fmul double %72, %70
%74 = tail call double @llvm.fmuladd.f64(double %66, double %52, double %47)
%75 = fmul double %74, %70
%76 = fneg double %9
%77 = tail call double @llvm.fmuladd.f64(double %76, double %9, double 1.000000e+00)
%78 = fneg double %11
%79 = tail call double @llvm.fmuladd.f64(double %78, double %11, double %77)
%80 = tail call double @sqrt(double %79)
%81 = fmul double %80, 2.000000e+00
%82 = fmul double %11, 2.000000e+00
%83 = fneg double %82
%84 = tail call double @llvm.fmuladd.f64(double %83, double %11, double 1.000000e+00)
%85 = fmul double %9, -2.000000e+00
%86 = tail call double @llvm.fmuladd.f64(double %85, double %9, double 1.000000e+00)
%87 = fmul double %9, %82
%88 = insertelement <2 x double> poison, double %87, i64 0
%89 = insertelement <2 x double> %88, double %86, i64 1
%90 = insertelement <2 x double> poison, double %68, i64 0
%91 = shufflevector <2 x double> %90, <2 x double> poison, <2 x i32> zeroinitializer
%92 = fmul <2 x double> %89, %91
%93 = insertelement <2 x double> poison, double %64, i64 0
%94 = shufflevector <2 x double> %93, <2 x double> poison, <2 x i32> zeroinitializer
%95 = insertelement <2 x double> poison, double %84, i64 0
%96 = insertelement <2 x double> %95, double %87, i64 1
%97 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %94, <2 x double> %96, <2 x double> %92)
%98 = bitcast [3 x double]* %2 to <2 x double>*
store <2 x double> %97, <2 x double>* %98
%99 = fneg double %64
%100 = fmul double %11, %99
%101 = tail call double @llvm.fmuladd.f64(double %9, double %68, double %100)
%102 = fmul double %81, %101
%103 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 2
store double %102, double* %103
%104 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 1, i64 0
%105 = insertelement <2 x double> poison, double %75, i64 0
%106 = shufflevector <2 x double> %105, <2 x double> poison, <2 x i32> zeroinitializer
%107 = fmul <2 x double> %89, %106
%108 = insertelement <2 x double> poison, double %73, i64 0
%109 = shufflevector <2 x double> %108, <2 x double> poison, <2 x i32> zeroinitializer
%110 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %109, <2 x double> %96, <2 x double> %107)
%111 = bitcast double* %104 to <2 x double>*
store <2 x double> %110, <2 x double>* %111
%112 = fneg double %73
%113 = fmul double %11, %112
%114 = tail call double @llvm.fmuladd.f64(double %9, double %75, double %113)
%115 = fmul double %81, %114
%116 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 1, i64 2
store double %115, double* %116
ret i32 0
}