#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 acosd(int /*<<< orphan*/);
double asind(double);
double atan2d(double, double);
double cosd(double const);
double fabs(double);
double fmod(double const, double);
int /*<<< orphan*/ sincosd(double const, double *, double *);
int /*<<< orphan*/ sqrt(double);
int sphx2s(const double eul[5], int nphi, int ntheta, int spt, int sll,
           const double phi[], const double theta[], double lng[],
           double lat[]) {
  int jphi, mphi, mtheta, rowlen, rowoff;
  double cosphi, costhe, costhe3, costhe4, dlng, dphi, sinphi, sinthe, sinthe3,
      sinthe4, x, y, z;
  register int iphi, itheta;
  register const double *phip, *thetap;
  register double *latp, *lngp;
  if (ntheta > 0) {
    mphi = nphi;
    mtheta = ntheta;
  } else {
    mphi = 1;
    mtheta = 1;
    ntheta = nphi;
  }
  if (eul[4] == 0.0) {
    if (eul[1] == 0.0) {
      dlng = fmod(eul[0] + 180.0 - eul[2], 360.0);
      jphi = 0;
      thetap = theta;
      lngp = lng;
      latp = lat;
      for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) {
        phip = phi + (jphi % nphi) * spt;
        for (iphi = 0; iphi < mphi; iphi++, phip += spt, jphi++) {
          *lngp = *phip + dlng;
          *latp = *thetap;
          if (eul[0] >= 0.0) {
            if (*lngp < 0.0)
              *lngp += 360.0;
          } else {
            if (*lngp > 0.0)
              *lngp -= 360.0;
          }
          if (*lngp > 360.0) {
            *lngp -= 360.0;
          } else if (*lngp < -360.0) {
            *lngp += 360.0;
          }
          lngp += sll;
          latp += sll;
        }
      }
    } else {
      dlng = fmod(eul[0] + eul[2], 360.0);
      jphi = 0;
      thetap = theta;
      lngp = lng;
      latp = lat;
      for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) {
        phip = phi + (jphi % nphi) * spt;
        for (iphi = 0; iphi < mphi; iphi++, phip += spt, jphi++) {
          *lngp = dlng - *phip;
          *latp = -(*thetap);
          if (eul[0] >= 0.0) {
            if (*lngp < 0.0)
              *lngp += 360.0;
          } else {
            if (*lngp > 0.0)
              *lngp -= 360.0;
          }
          if (*lngp > 360.0) {
            *lngp -= 360.0;
          } else if (*lngp < -360.0) {
            *lngp += 360.0;
          }
          lngp += sll;
          latp += sll;
        }
      }
    }
    return 0;
  }
  phip = phi;
  rowoff = 0;
  rowlen = nphi * sll;
  for (iphi = 0; iphi < nphi; iphi++, rowoff += sll, phip += spt) {
    dphi = *phip - eul[2];
    lngp = lng + rowoff;
    for (itheta = 0; itheta < mtheta; itheta++) {
      *lngp = dphi;
      lngp += rowlen;
    }
  }
  thetap = theta;
  lngp = lng;
  latp = lat;
  for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) {
    sincosd(*thetap, &sinthe, &costhe);
    costhe3 = costhe * eul[3];
    costhe4 = costhe * eul[4];
    sinthe3 = sinthe * eul[3];
    sinthe4 = sinthe * eul[4];
    for (iphi = 0; iphi < mphi; iphi++, lngp += sll, latp += sll) {
      dphi = *lngp;
      sincosd(dphi, &sinphi, &cosphi);
      x = sinthe4 - costhe3 * cosphi;
      if (fabs(x) < 1.0e-5) {
        x = -cosd(*thetap + eul[1]) + costhe3 * (1.0 - cosphi);
      }
      y = -costhe * sinphi;
      if (x != 0.0 || y != 0.0) {
        dlng = atan2d(y, x);
      } else {
        if (eul[1] < 90.0) {
          dlng = dphi + 180.0;
        } else {
          dlng = -dphi;
        }
      }
      *lngp = eul[0] + dlng;
      if (eul[0] >= 0.0) {
        if (*lngp < 0.0)
          *lngp += 360.0;
      } else {
        if (*lngp > 0.0)
          *lngp -= 360.0;
      }
      if (*lngp > 360.0) {
        *lngp -= 360.0;
      } else if (*lngp < -360.0) {
        *lngp += 360.0;
      }
      if (fmod(dphi, 180.0) == 0.0) {
        *latp = *thetap + cosphi * eul[1];
        if (*latp > 90.0)
          *latp = 180.0 - *latp;
        if (*latp < -90.0)
          *latp = -180.0 - *latp;
      } else {
        z = sinthe3 + costhe4 * cosphi;
        if (fabs(z) > 0.99) {
          *latp = ((z) < 0.0 ? -fabs(acosd(sqrt(x * x + y * y)))
                             : fabs(acosd(sqrt(x * x + y * y))));
        } else {
          *latp = asind(z);
        }
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<sphx2s>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
cmpl   $0x0,-0x18(%rbp)
jle    11b7 <sphx2s+0x47>
mov    -0x14(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    11cb <sphx2s+0x5b>
movl   $0x1,-0x30(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1712 <sphx2s+0x5a2>
jp     1712 <sphx2s+0x5a2>
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    147d <sphx2s+0x30d>
jp     147d <sphx2s+0x30d>
mov    -0x10(%rbp),%rax
movsd  0xe09(%rip),%xmm0
addsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x10(%rax),%xmm0
movsd  0xdfc(%rip),%xmm1
call   1040 <fmod@plt>
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    0x10(%rbp),%rax
mov    %rax,-0xc0(%rbp)
mov    0x18(%rbp),%rax
mov    %rax,-0xd0(%rbp)
mov    0x20(%rbp),%rax
mov    %rax,-0xc8(%rbp)
movl   $0x0,-0xb0(%rbp)
mov    -0xb0(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1478 <sphx2s+0x308>
mov    -0x28(%rbp),%rax
mov    %rax,-0xd8(%rbp)
mov    -0x2c(%rbp),%eax
cltd
idivl  -0x14(%rbp)
mov    -0xd8(%rbp),%rax
imul   -0x1c(%rbp),%edx
movslq %edx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xb8(%rbp)
movl   $0x0,-0xac(%rbp)
mov    -0xac(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    1444 <sphx2s+0x2d4>
mov    -0xb8(%rbp),%rax
movsd  (%rax),%xmm0
addsd  -0x68(%rbp),%xmm0
mov    -0xd0(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0xc0(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0xc8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     132c <sphx2s+0x1bc>
mov    -0xd0(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jbe    1327 <sphx2s+0x1b7>
mov    -0xd0(%rbp),%rax
movsd  0xd01(%rip),%xmm0
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
jmp    1364 <sphx2s+0x1f4>
mov    -0xd0(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    135f <sphx2s+0x1ef>
mov    -0xd0(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xcc9(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
jmp    1364 <sphx2s+0x1f4>
mov    -0xd0(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xca9(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    13a1 <sphx2s+0x231>
mov    -0xd0(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xc8c(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
jmp    13d6 <sphx2s+0x266>
mov    -0xd0(%rbp),%rax
movsd  0xc78(%rip),%xmm0
ucomisd (%rax),%xmm0
jbe    13d1 <sphx2s+0x261>
mov    -0xd0(%rbp),%rax
movsd  0xc57(%rip),%xmm0
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
jmp    13d6 <sphx2s+0x266>
mov    -0x20(%rbp),%ecx
mov    -0xd0(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xd0(%rbp)
mov    -0x20(%rbp),%ecx
mov    -0xc8(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xc8(%rbp)
mov    -0xac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xac(%rbp)
mov    -0x1c(%rbp),%ecx
mov    -0xb8(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xb8(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    12a7 <sphx2s+0x137>
jmp    1449 <sphx2s+0x2d9>
mov    -0xb0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb0(%rbp)
mov    -0x1c(%rbp),%ecx
mov    -0xc0(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xc0(%rbp)
jmp    1260 <sphx2s+0xf0>
jmp    1706 <sphx2s+0x596>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
addsd  0x10(%rax),%xmm0
movsd  0xb8a(%rip),%xmm1
call   1040 <fmod@plt>
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    0x10(%rbp),%rax
mov    %rax,-0xc0(%rbp)
mov    0x18(%rbp),%rax
mov    %rax,-0xd0(%rbp)
mov    0x20(%rbp),%rax
mov    %rax,-0xc8(%rbp)
movl   $0x0,-0xb0(%rbp)
mov    -0xb0(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1701 <sphx2s+0x591>
mov    -0x28(%rbp),%rax
mov    %rax,-0xe0(%rbp)
mov    -0x2c(%rbp),%eax
cltd
idivl  -0x14(%rbp)
mov    -0xe0(%rbp),%rax
imul   -0x1c(%rbp),%edx
movslq %edx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xb8(%rbp)
movl   $0x0,-0xac(%rbp)
mov    -0xac(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    16cd <sphx2s+0x55d>
movsd  -0x68(%rbp),%xmm0
mov    -0xb8(%rbp),%rax
subsd  (%rax),%xmm0
mov    -0xd0(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0xc0(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0xc8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     15b5 <sphx2s+0x445>
mov    -0xd0(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jbe    15b0 <sphx2s+0x440>
mov    -0xd0(%rbp),%rax
movsd  0xa78(%rip),%xmm0
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
jmp    15ed <sphx2s+0x47d>
mov    -0xd0(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    15e8 <sphx2s+0x478>
mov    -0xd0(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xa40(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
jmp    15ed <sphx2s+0x47d>
mov    -0xd0(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xa20(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    162a <sphx2s+0x4ba>
mov    -0xd0(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xa03(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
jmp    165f <sphx2s+0x4ef>
mov    -0xd0(%rbp),%rax
movsd  0x9ef(%rip),%xmm0
ucomisd (%rax),%xmm0
jbe    165a <sphx2s+0x4ea>
mov    -0xd0(%rbp),%rax
movsd  0x9ce(%rip),%xmm0
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
jmp    165f <sphx2s+0x4ef>
mov    -0x20(%rbp),%ecx
mov    -0xd0(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xd0(%rbp)
mov    -0x20(%rbp),%ecx
mov    -0xc8(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xc8(%rbp)
mov    -0xac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xac(%rbp)
mov    -0x1c(%rbp),%ecx
mov    -0xb8(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xb8(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1519 <sphx2s+0x3a9>
jmp    16d2 <sphx2s+0x562>
mov    -0xb0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb0(%rbp)
mov    -0x1c(%rbp),%ecx
mov    -0xc0(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xc0(%rbp)
jmp    14d2 <sphx2s+0x362>
jmp    1706 <sphx2s+0x596>
movl   $0x0,-0x4(%rbp)
jmp    1e01 <sphx2s+0xc91>
mov    -0x28(%rbp),%rax
mov    %rax,-0xb8(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x20(%rbp),%eax
mov    %eax,-0x38(%rbp)
movl   $0x0,-0xac(%rbp)
mov    -0xac(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    180b <sphx2s+0x69b>
mov    -0xb8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xd0(%rbp)
movl   $0x0,-0xb0(%rbp)
mov    -0xb0(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    17ce <sphx2s+0x65e>
movsd  -0x70(%rbp),%xmm0
mov    -0xd0(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%ecx
mov    -0xd0(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xd0(%rbp)
mov    -0xb0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb0(%rbp)
jmp    1780 <sphx2s+0x610>
jmp    17d3 <sphx2s+0x663>
mov    -0xac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xac(%rbp)
mov    -0x20(%rbp),%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x1c(%rbp),%ecx
mov    -0xb8(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xb8(%rbp)
jmp    1738 <sphx2s+0x5c8>
mov    0x10(%rbp),%rax
mov    %rax,-0xc0(%rbp)
mov    0x18(%rbp),%rax
mov    %rax,-0xd0(%rbp)
mov    0x20(%rbp),%rax
mov    %rax,-0xc8(%rbp)
movl   $0x0,-0xb0(%rbp)
mov    -0xb0(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1dfa <sphx2s+0xc8a>
mov    -0xc0(%rbp),%rax
movsd  (%rax),%xmm0
lea    -0x80(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1070 <sincosd@plt>
movsd  -0x50(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x80(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movl   $0x0,-0xac(%rbp)
mov    -0xac(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    1dc6 <sphx2s+0xc56>
mov    -0xd0(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
lea    -0x78(%rbp),%rdi
lea    -0x48(%rbp),%rsi
call   1070 <sincosd@plt>
movsd  -0x90(%rbp),%xmm1
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm1
ff
movaps 0x71e(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0x6c2(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    199a <sphx2s+0x82a>
mov    -0xc0(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
addsd  0x8(%rax),%xmm0
call   1030 <cosd@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  -0x58(%rbp),%xmm0
movsd  0x683(%rip),%xmm2
subsd  -0x48(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    19fe <sphx2s+0x88e>
jp     19fe <sphx2s+0x88e>
movsd  -0xa0(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    19fe <sphx2s+0x88e>
jp     19fe <sphx2s+0x88e>
jmp    1a1d <sphx2s+0x8ad>
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm1
ff
call   1090 <atan2d@plt>
movsd  %xmm0,-0x68(%rbp)
jmp    1a71 <sphx2s+0x901>
mov    -0x10(%rbp),%rax
movsd  0x5e7(%rip),%xmm0
ucomisd 0x8(%rax),%xmm0
jbe    1a4b <sphx2s+0x8db>
movsd  0x5dc(%rip),%xmm0
addsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
jmp    1a6c <sphx2s+0x8fc>
movsd  -0x70(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x68(%rbp)
jmp    1a71 <sphx2s+0x901>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
addsd  -0x68(%rbp),%xmm0
mov    -0xd0(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1ace <sphx2s+0x95e>
mov    -0xd0(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jbe    1ac9 <sphx2s+0x959>
mov    -0xd0(%rbp),%rax
movsd  0x55f(%rip),%xmm0
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
jmp    1b06 <sphx2s+0x996>
mov    -0xd0(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1b01 <sphx2s+0x991>
mov    -0xd0(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0x527(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
jmp    1b06 <sphx2s+0x996>
mov    -0xd0(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0x507(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1b43 <sphx2s+0x9d3>
mov    -0xd0(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0x4ea(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
jmp    1b78 <sphx2s+0xa08>
mov    -0xd0(%rbp),%rax
movsd  0x4d6(%rip),%xmm0
ucomisd (%rax),%xmm0
jbe    1b73 <sphx2s+0xa03>
mov    -0xd0(%rbp),%rax
movsd  0x4b5(%rip),%xmm0
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
jmp    1b78 <sphx2s+0xa08>
movsd  -0x70(%rbp),%xmm0
movsd  0x493(%rip),%xmm1
call   1040 <fmod@plt>
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1c40 <sphx2s+0xad0>
jp     1c40 <sphx2s+0xad0>
mov    -0xc0(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x48(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0xc8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0xc8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0x434(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1c04 <sphx2s+0xa94>
mov    -0xc8(%rbp),%rax
movsd  0x423(%rip),%xmm0
subsd  (%rax),%xmm0
mov    -0xc8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0xc8(%rbp),%rax
movsd  0x425(%rip),%xmm0
ucomisd (%rax),%xmm0
jbe    1c3b <sphx2s+0xacb>
mov    -0xc8(%rbp),%rax
movsd  0x414(%rip),%xmm0
subsd  (%rax),%xmm0
mov    -0xc8(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1d77 <sphx2s+0xc07>
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x60(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
movaps 0x3df(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0x3b3(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1d5a <sphx2s+0xbea>
xorps  %xmm0,%xmm0
ucomisd -0xa8(%rbp),%xmm0
ff
jbe    1cfb <sphx2s+0xb8b>
movsd  -0x98(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1060 <sqrt@plt>
mov    %eax,%edi
call   1050 <acosd@plt>
movaps 0x37d(%rip),%xmm1
pand   %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
jmp    1d42 <sphx2s+0xbd2>
movsd  -0x98(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1060 <sqrt@plt>
mov    %eax,%edi
call   1050 <acosd@plt>
movaps 0x31a(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xe8(%rbp),%xmm0
ff
mov    -0xc8(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1d72 <sphx2s+0xc02>
movsd  -0xa8(%rbp),%xmm0
ff
call   1080 <asind@plt>
mov    -0xc8(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1d77 <sphx2s+0xc07>
jmp    1d7c <sphx2s+0xc0c>
mov    -0xac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xac(%rbp)
mov    -0x20(%rbp),%ecx
mov    -0xd0(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xd0(%rbp)
mov    -0x20(%rbp),%ecx
mov    -0xc8(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xc8(%rbp)
jmp    18b9 <sphx2s+0x749>
jmp    1dcb <sphx2s+0xc5b>
mov    -0xb0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb0(%rbp)
mov    -0x1c(%rbp),%ecx
mov    -0xc0(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xc0(%rbp)
jmp    1836 <sphx2s+0x6c6>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sphx2s>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %r9,%r13
mov    %r8d,%ebx
mov    0x110(%rsp),%rbp
mov    0x108(%rsp),%r15
mov    0x100(%rsp),%r14
test   %edx,%edx
mov    $0x1,%r12d
cmovg  %esi,%r12d
mov    %esi,%eax
cmovg  %edx,%eax
mov    %eax,0xc(%rsp)
movsd  0x20(%rdi),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %rdi,0x28(%rsp)
mov    %esi,0x60(%rsp)
jne    1319 <sphx2s+0x1a9>
jp     1319 <sphx2s+0x1a9>
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm2
ucomisd %xmm1,%xmm2
mov    %ecx,0x10(%rsp)
jne    1851 <sphx2s+0x6e1>
jp     1851 <sphx2s+0x6e1>
addsd  0xe3d(%rip),%xmm0
subsd  0x10(%rdi),%xmm0
movsd  0xe38(%rip),%xmm1
call   1040 <fmod@plt>
mov    0x10(%rsp),%r11d
mov    0x60(%rsp),%r10d
cmpl   $0x0,0xc(%rsp)
jle    1979 <sphx2s+0x809>
movslq %ebx,%rsi
movslq %r11d,%r8
shl    $0x3,%rsi
lea    0x0(,%r8,8),%rdi
xor    %ecx,%ecx
xorpd  %xmm1,%xmm1
movsd  0xe06(%rip),%xmm2
xor    %r9d,%r9d
mov    0x28(%rsp),%rbx
movsd  0xdee(%rip),%xmm5
jmp    1274 <sphx2s+0x104>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    %r12d,%r9d
add    $0x1,%ecx
lea    (%r14,%r8,8),%r14
cmp    0xc(%rsp),%ecx
je     1979 <sphx2s+0x809>
test   %r12d,%r12d
jle    1263 <sphx2s+0xf3>
mov    %r9d,%eax
cltd
idiv   %r10d
imul   %r11d,%edx
movslq %edx,%rax
lea    0x0(,%rax,8),%rax
add    %r13,%rax
mov    %r12d,%edx
jmp    12b7 <sphx2s+0x147>
nopw   0x0(%rax,%rax,1)
addsd  %xmm4,%xmm3
movsd  %xmm3,(%r15)
add    %rsi,%r15
add    %rsi,%rbp
add    %rdi,%rax
add    $0xffffffff,%edx
je     1260 <sphx2s+0xf0>
movsd  (%rax),%xmm3
addsd  %xmm0,%xmm3
movsd  %xmm3,(%r15)
movsd  (%r14),%xmm3
movsd  %xmm3,0x0(%rbp)
movsd  (%rbx),%xmm3
ucomisd %xmm1,%xmm3
movsd  (%r15),%xmm3
jae    12f0 <sphx2s+0x180>
ucomisd %xmm1,%xmm3
movapd %xmm2,%xmm4
ja     12fa <sphx2s+0x18a>
jmp    1303 <sphx2s+0x193>
nopl   0x0(%rax)
ucomisd %xmm3,%xmm1
movapd %xmm5,%xmm4
jbe    1303 <sphx2s+0x193>
addsd  %xmm4,%xmm3
movsd  %xmm3,(%r15)
ucomisd %xmm5,%xmm3
movapd %xmm2,%xmm4
ja     12a0 <sphx2s+0x130>
ucomisd %xmm3,%xmm2
movapd %xmm5,%xmm4
ja     12a0 <sphx2s+0x130>
jmp    12a9 <sphx2s+0x139>
movslq %ecx,%rax
mov    %rax,0x80(%rsp)
movslq %ebx,%rax
mov    %rax,0x30(%rsp)
test   %esi,%esi
jle    14d3 <sphx2s+0x363>
imul   0x60(%rsp),%ebx
cmp    $0x2,%edx
mov    $0x1,%eax
mov    $0x1,%ecx
cmovge %edx,%ecx
test   %edx,%edx
movslq %ebx,%r14
cmovle %eax,%ecx
lea    -0x1(%rcx),%eax
mov    %eax,0x48(%rsp)
mov    %ecx,%eax
and    $0x7,%eax
mov    %eax,0x90(%rsp)
and    $0x7ffffff8,%ecx
mov    %rcx,0xb0(%rsp)
mov    0x30(%rsp),%rax
lea    0x0(,%rax,8),%rax
mov    %rax,0x40(%rsp)
mov    %r14,%r10
shl    $0x6,%r10
imul   $0x38,%r14,%rdx
mov    %r14,%rax
shl    $0x4,%rax
lea    (%rax,%rax,2),%rsi
lea    0x0(,%r14,8),%r8
lea    (%r8,%r8,4),%r9
mov    %r14,%rbx
shl    $0x5,%rbx
lea    (%r8,%r8,2),%r11
xor    %ecx,%ecx
mov    %rcx,0x10(%rsp)
mov    %r15,0x70(%rsp)
movl   $0x0,0xa0(%rsp)
mov    %r12d,0x50(%rsp)
jmp    141b <sphx2s+0x2ab>
nop
mov    0xa0(%rsp),%edi
add    $0x1,%edi
mov    0x10(%rsp),%rcx
add    0x30(%rsp),%rcx
mov    %rcx,0x10(%rsp)
mov    0x58(%rsp),%r13
mov    0x80(%rsp),%rcx
lea    0x0(%r13,%rcx,8),%r13
mov    0x70(%rsp),%rcx
add    0x40(%rsp),%rcx
mov    %rcx,0x70(%rsp)
mov    %edi,0xa0(%rsp)
cmp    0x60(%rsp),%edi
je     14d3 <sphx2s+0x363>
movsd  0x0(%r13),%xmm0
mov    0x28(%rsp),%rcx
subsd  0x10(%rcx),%xmm0
cmpl   $0x7,0x48(%rsp)
mov    %r13,0x58(%rsp)
jae    1450 <sphx2s+0x2e0>
mov    0x10(%rsp),%rcx
lea    (%r15,%rcx,8),%r13
jmp    14a0 <sphx2s+0x330>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0xb0(%rsp),%rcx
mov    %ecx,%r12d
mov    0x70(%rsp),%r13
movsd  %xmm0,0x0(%r13)
movsd  %xmm0,0x0(%r13,%r14,8)
movsd  %xmm0,0x0(%r13,%rax,1)
movsd  %xmm0,0x0(%r13,%r11,1)
movsd  %xmm0,0x0(%r13,%rbx,1)
movsd  %xmm0,0x0(%r13,%r9,1)
movsd  %xmm0,0x0(%r13,%rsi,1)
movsd  %xmm0,0x0(%r13,%rdx,1)
add    %r10,%r13
add    $0xfffffff8,%r12d
jne    1460 <sphx2s+0x2f0>
cmpl   $0x0,0x90(%rsp)
mov    0x50(%rsp),%r12d
je     13d0 <sphx2s+0x260>
mov    0x90(%rsp),%ecx
nopw   0x0(%rax,%rax,1)
movsd  %xmm0,0x0(%r13)
add    %r8,%r13
add    $0xffffffff,%ecx
jne    14c0 <sphx2s+0x350>
jmp    13d0 <sphx2s+0x260>
cmpl   $0x0,0xc(%rsp)
mov    0x100(%rsp),%r14
jle    1979 <sphx2s+0x809>
shlq   $0x3,0x30(%rsp)
xor    %ebx,%ebx
jmp    150d <sphx2s+0x39d>
mov    0x40(%rsp),%ebx
add    $0x1,%ebx
mov    0x80(%rsp),%rax
lea    (%r14,%rax,8),%r14
cmp    0xc(%rsp),%ebx
je     1979 <sphx2s+0x809>
movsd  (%r14),%xmm0
lea    0xb8(%rsp),%rdi
lea    0x88(%rsp),%rsi
call   1070 <sincosd@plt>
test   %r12d,%r12d
mov    %ebx,0x40(%rsp)
jle    14f0 <sphx2s+0x380>
movsd  0x88(%rsp),%xmm0
mov    0x28(%rsp),%rbx
movsd  0x18(%rbx),%xmm1
movsd  0x20(%rbx),%xmm2
movapd %xmm0,%xmm3
mulsd  %xmm1,%xmm3
mulsd  %xmm2,%xmm0
movsd  %xmm0,0x50(%rsp)
movsd  0xb8(%rsp),%xmm0
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x48(%rsp)
mulsd  %xmm0,%xmm2
movsd  %xmm2,0x58(%rsp)
movapd %xmm3,0x60(%rsp)
xorpd  0xa7b(%rip),%xmm3
movapd %xmm3,0x90(%rsp)
mov    %r12d,%r13d
jmp    15b6 <sphx2s+0x446>
call   1080 <asind@plt>
movapd %xmm0,%xmm2
movsd  %xmm2,0x0(%rbp)
mov    0x30(%rsp),%rax
add    %rax,%r15
add    %rax,%rbp
add    $0xffffffff,%r13d
je     14f0 <sphx2s+0x380>
movsd  (%r15),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0xc0(%rsp),%rdi
lea    0x38(%rsp),%rsi
call   1070 <sincosd@plt>
movsd  0x38(%rsp),%xmm3
mulsd  0x90(%rsp),%xmm3
addsd  0x58(%rsp),%xmm3
movapd %xmm3,%xmm0
andpd  0xa1d(%rip),%xmm0
movsd  0xa25(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1628 <sphx2s+0x4b8>
movsd  (%r14),%xmm0
addsd  0x8(%rbx),%xmm0
call   1030 <cosd@plt>
movsd  0xa10(%rip),%xmm3
subsd  0x38(%rsp),%xmm3
mulsd  0x60(%rsp),%xmm3
subsd  %xmm0,%xmm3
movsd  0x88(%rsp),%xmm1
xorpd  0x9c7(%rip),%xmm1
mulsd  0xc0(%rsp),%xmm1
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm3
movapd %xmm3,0x70(%rsp)
movapd %xmm1,0xa0(%rsp)
jne    1690 <sphx2s+0x520>
jp     1690 <sphx2s+0x520>
ucomisd %xmm2,%xmm1
jne    1690 <sphx2s+0x520>
jp     1690 <sphx2s+0x520>
movsd  0x9c3(%rip),%xmm0
ucomisd 0x8(%rbx),%xmm0
jbe    16c0 <sphx2s+0x550>
movapd 0x10(%rsp),%xmm4
movapd %xmm4,%xmm0
movsd  0x9b2(%rip),%xmm3
addsd  %xmm3,%xmm0
jmp    16da <sphx2s+0x56a>
nopl   0x0(%rax)
movapd %xmm1,%xmm0
movapd %xmm3,%xmm1
call   1090 <atan2d@plt>
xorpd  %xmm2,%xmm2
movsd  0x98f(%rip),%xmm3
movapd 0x10(%rsp),%xmm4
jmp    16da <sphx2s+0x56a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movapd 0x10(%rsp),%xmm4
movapd %xmm4,%xmm0
xorpd  0x92e(%rip),%xmm0
movsd  0x95e(%rip),%xmm3
addsd  (%rbx),%xmm0
movsd  %xmm0,(%r15)
movsd  (%rbx),%xmm1
ucomisd %xmm2,%xmm1
jae    1700 <sphx2s+0x590>
ucomisd %xmm2,%xmm0
movsd  0x94f(%rip),%xmm1
ja     170e <sphx2s+0x59e>
jmp    1717 <sphx2s+0x5a7>
nopl   (%rax)
ucomisd %xmm0,%xmm2
movsd  0x934(%rip),%xmm1
jbe    1717 <sphx2s+0x5a7>
addsd  %xmm1,%xmm0
movsd  %xmm0,(%r15)
ucomisd 0x921(%rip),%xmm0
movsd  0x921(%rip),%xmm1
ja     173f <sphx2s+0x5cf>
movsd  0x917(%rip),%xmm1
ucomisd %xmm0,%xmm1
movsd  0x903(%rip),%xmm1
jbe    1748 <sphx2s+0x5d8>
addsd  %xmm1,%xmm0
movsd  %xmm0,(%r15)
movapd %xmm4,%xmm0
movapd %xmm3,%xmm1
call   1040 <fmod@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    17c0 <sphx2s+0x650>
jp     17c0 <sphx2s+0x650>
movsd  0x38(%rsp),%xmm1
mulsd  0x8(%rbx),%xmm1
addsd  (%r14),%xmm1
movsd  0x8bf(%rip),%xmm2
subsd  %xmm1,%xmm2
movsd  0x8ab(%rip),%xmm0
cmpltsd %xmm1,%xmm0
andpd  %xmm0,%xmm2
andnpd %xmm1,%xmm0
orpd   %xmm2,%xmm0
movlpd %xmm0,0x0(%rbp)
movsd  0x8b5(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    15a1 <sphx2s+0x431>
movsd  0x8ab(%rip),%xmm2
subsd  %xmm0,%xmm2
jmp    159c <sphx2s+0x42c>
xchg   %ax,%ax
movsd  0x38(%rsp),%xmm0
mulsd  0x50(%rsp),%xmm0
addsd  0x48(%rsp),%xmm0
movapd %xmm0,%xmm2
movapd 0x832(%rip),%xmm1
andpd  %xmm1,%xmm2
ucomisd 0x866(%rip),%xmm2
jbe    1593 <sphx2s+0x423>
movapd %xmm0,0x10(%rsp)
movapd 0xa0(%rsp),%xmm2
mulsd  %xmm2,%xmm2
movapd 0x70(%rsp),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm2,%xmm0
call   1060 <sqrt@plt>
mov    %eax,%edi
call   1050 <acosd@plt>
movapd 0x10(%rsp),%xmm2
movapd %xmm0,%xmm1
andpd  0x7e1(%rip),%xmm1
orpd   0x7c9(%rip),%xmm0
cmpltsd 0x828(%rip),%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm0,%xmm2
jmp    159c <sphx2s+0x42c>
addsd  0x10(%rdi),%xmm0
movsd  0x7e2(%rip),%xmm1
call   1040 <fmod@plt>
mov    0x10(%rsp),%r11d
mov    0x60(%rsp),%r10d
cmpl   $0x0,0xc(%rsp)
jle    1979 <sphx2s+0x809>
movslq %ebx,%rsi
movslq %r11d,%r8
shl    $0x3,%rsi
lea    0x0(,%r8,8),%rdi
xor    %ecx,%ecx
movapd 0x76c(%rip),%xmm1
xorpd  %xmm2,%xmm2
movsd  0x7a8(%rip),%xmm3
xor    %r9d,%r9d
mov    0x28(%rsp),%rbx
movsd  0x790(%rip),%xmm6
jmp    18d4 <sphx2s+0x764>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    %r12d,%r9d
add    $0x1,%ecx
lea    (%r14,%r8,8),%r14
cmp    0xc(%rsp),%ecx
je     1979 <sphx2s+0x809>
test   %r12d,%r12d
jle    18c3 <sphx2s+0x753>
mov    %r9d,%eax
cltd
idiv   %r10d
imul   %r11d,%edx
movslq %edx,%rax
lea    0x0(,%rax,8),%rax
add    %r13,%rax
mov    %r12d,%edx
jmp    1917 <sphx2s+0x7a7>
nopw   0x0(%rax,%rax,1)
addsd  %xmm5,%xmm4
movsd  %xmm4,(%r15)
add    %rsi,%r15
add    %rsi,%rbp
add    %rdi,%rax
add    $0xffffffff,%edx
je     18c0 <sphx2s+0x750>
movapd %xmm0,%xmm4
subsd  (%rax),%xmm4
movsd  %xmm4,(%r15)
movsd  (%r14),%xmm4
xorpd  %xmm1,%xmm4
movlpd %xmm4,0x0(%rbp)
movsd  (%rbx),%xmm4
ucomisd %xmm2,%xmm4
movsd  (%r15),%xmm4
jae    1950 <sphx2s+0x7e0>
ucomisd %xmm2,%xmm4
movapd %xmm3,%xmm5
ja     195a <sphx2s+0x7ea>
jmp    1963 <sphx2s+0x7f3>
nopl   (%rax)
ucomisd %xmm4,%xmm2
movapd %xmm6,%xmm5
jbe    1963 <sphx2s+0x7f3>
addsd  %xmm5,%xmm4
movsd  %xmm4,(%r15)
ucomisd %xmm6,%xmm4
movapd %xmm3,%xmm5
ja     1900 <sphx2s+0x790>
ucomisd %xmm4,%xmm3
movapd %xmm6,%xmm5
ja     1900 <sphx2s+0x790>
jmp    1909 <sphx2s+0x799>
xor    %eax,%eax
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @sphx2s(double* %0, i32 %1, i32 %2, i32 %3, i32 %4, double* %5, double* %6, double* %7, double* %8) {
%10 = alloca i32
%11 = alloca double*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca double*
%17 = alloca double*
%18 = alloca double*
%19 = alloca double*
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%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 i32
%39 = alloca i32
%40 = alloca double*
%41 = alloca double*
%42 = alloca double*
%43 = alloca double*
store double* %0, double** %11
store i32 %1, i32* %12
store i32 %2, i32* %13
store i32 %3, i32* %14
store i32 %4, i32* %15
store double* %5, double** %16
store double* %6, double** %17
store double* %7, double** %18
store double* %8, double** %19
%44 = load i32, i32* %13
%45 = icmp sgt i32 %44, 0
br i1 %45, label %46, label %49
46: ; preds = %9
%47 = load i32, i32* %12
store i32 %47, i32* %21
%48 = load i32, i32* %13
store i32 %48, i32* %22
br label %51
49: ; preds = %9
store i32 1, i32* %21
store i32 1, i32* %22
%50 = load i32, i32* %12
store i32 %50, i32* %13
br label %51
51: ; preds = %49, %46
%52 = load double*, double** %11
%53 = getelementptr inbounds double, double* %52, i64 4
%54 = load double, double* %53
%55 = fcmp oeq double %54, 0.000000e+00
br i1 %55, label %56, label %272
56: ; preds = %51
%57 = load double*, double** %11
%58 = getelementptr inbounds double, double* %57, i64 1
%59 = load double, double* %58
%60 = fcmp oeq double %59, 0.000000e+00
br i1 %60, label %61, label %166
61: ; preds = %56
%62 = load double*, double** %11
%63 = getelementptr inbounds double, double* %62, i64 0
%64 = load double, double* %63
%65 = fadd double %64, 1.800000e+02
%66 = load double*, double** %11
%67 = getelementptr inbounds double, double* %66, i64 2
%68 = load double, double* %67
%69 = fsub double %65, %68
%70 = call double @fmod(double %69, double 3.600000e+02)
store double %70, double* %29
store i32 0, i32* %20
%71 = load double*, double** %17
store double* %71, double** %41
%72 = load double*, double** %18
store double* %72, double** %43
%73 = load double*, double** %19
store double* %73, double** %42
store i32 0, i32* %39
br label %74
74: ; preds = %158, %61
%75 = load i32, i32* %39
%76 = load i32, i32* %13
%77 = icmp slt i32 %75, %76
br i1 %77, label %78, label %165
78: ; preds = %74
%79 = load double*, double** %16
%80 = load i32, i32* %20
%81 = load i32, i32* %12
%82 = srem i32 %80, %81
%83 = load i32, i32* %14
%84 = mul nsw i32 %82, %83
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds double, double* %79, i64 %85
store double* %86, double** %40
store i32 0, i32* %38
br label %87
87: ; preds = %148, %78
%88 = load i32, i32* %38
%89 = load i32, i32* %21
%90 = icmp slt i32 %88, %89
br i1 %90, label %91, label %157
91: ; preds = %87
%92 = load double*, double** %40
%93 = load double, double* %92
%94 = load double, double* %29
%95 = fadd double %93, %94
%96 = load double*, double** %43
store double %95, double* %96
%97 = load double*, double** %41
%98 = load double, double* %97
%99 = load double*, double** %42
store double %98, double* %99
%100 = load double*, double** %11
%101 = getelementptr inbounds double, double* %100, i64 0
%102 = load double, double* %101
%103 = fcmp oge double %102, 0.000000e+00
br i1 %103, label %104, label %113
104: ; preds = %91
%105 = load double*, double** %43
%106 = load double, double* %105
%107 = fcmp olt double %106, 0.000000e+00
br i1 %107, label %108, label %112
108: ; preds = %104
%109 = load double*, double** %43
%110 = load double, double* %109
%111 = fadd double %110, 3.600000e+02
store double %111, double* %109
br label %112
112: ; preds = %108, %104
br label %122
113: ; preds = %91
%114 = load double*, double** %43
%115 = load double, double* %114
%116 = fcmp ogt double %115, 0.000000e+00
br i1 %116, label %117, label %121
117: ; preds = %113
%118 = load double*, double** %43
%119 = load double, double* %118
%120 = fsub double %119, 3.600000e+02
store double %120, double* %118
br label %121
121: ; preds = %117, %113
br label %122
122: ; preds = %121, %112
%123 = load double*, double** %43
%124 = load double, double* %123
%125 = fcmp ogt double %124, 3.600000e+02
br i1 %125, label %126, label %130
126: ; preds = %122
%127 = load double*, double** %43
%128 = load double, double* %127
%129 = fsub double %128, 3.600000e+02
store double %129, double* %127
br label %139
130: ; preds = %122
%131 = load double*, double** %43
%132 = load double, double* %131
%133 = fcmp olt double %132, -3.600000e+02
br i1 %133, label %134, label %138
134: ; preds = %130
%135 = load double*, double** %43
%136 = load double, double* %135
%137 = fadd double %136, 3.600000e+02
store double %137, double* %135
br label %138
138: ; preds = %134, %130
br label %139
139: ; preds = %138, %126
%140 = load i32, i32* %15
%141 = load double*, double** %43
%142 = sext i32 %140 to i64
%143 = getelementptr inbounds double, double* %141, i64 %142
store double* %143, double** %43
%144 = load i32, i32* %15
%145 = load double*, double** %42
%146 = sext i32 %144 to i64
%147 = getelementptr inbounds double, double* %145, i64 %146
store double* %147, double** %42
br label %148
148: ; preds = %139
%149 = load i32, i32* %38
%150 = add nsw i32 %149, 1
store i32 %150, i32* %38
%151 = load i32, i32* %14
%152 = load double*, double** %40
%153 = sext i32 %151 to i64
%154 = getelementptr inbounds double, double* %152, i64 %153
store double* %154, double** %40
%155 = load i32, i32* %20
%156 = add nsw i32 %155, 1
store i32 %156, i32* %20
br label %87
157: ; preds = %87
br label %158
158: ; preds = %157
%159 = load i32, i32* %39
%160 = add nsw i32 %159, 1
store i32 %160, i32* %39
%161 = load i32, i32* %14
%162 = load double*, double** %41
%163 = sext i32 %161 to i64
%164 = getelementptr inbounds double, double* %162, i64 %163
store double* %164, double** %41
br label %74
165: ; preds = %74
br label %271
166: ; preds = %56
%167 = load double*, double** %11
%168 = getelementptr inbounds double, double* %167, i64 0
%169 = load double, double* %168
%170 = load double*, double** %11
%171 = getelementptr inbounds double, double* %170, i64 2
%172 = load double, double* %171
%173 = fadd double %169, %172
%174 = call double @fmod(double %173, double 3.600000e+02)
store double %174, double* %29
store i32 0, i32* %20
%175 = load double*, double** %17
store double* %175, double** %41
%176 = load double*, double** %18
store double* %176, double** %43
%177 = load double*, double** %19
store double* %177, double** %42
store i32 0, i32* %39
br label %178
178: ; preds = %263, %166
%179 = load i32, i32* %39
%180 = load i32, i32* %13
%181 = icmp slt i32 %179, %180
br i1 %181, label %182, label %270
182: ; preds = %178
%183 = load double*, double** %16
%184 = load i32, i32* %20
%185 = load i32, i32* %12
%186 = srem i32 %184, %185
%187 = load i32, i32* %14
%188 = mul nsw i32 %186, %187
%189 = sext i32 %188 to i64
%190 = getelementptr inbounds double, double* %183, i64 %189
store double* %190, double** %40
store i32 0, i32* %38
br label %191
191: ; preds = %253, %182
%192 = load i32, i32* %38
%193 = load i32, i32* %21
%194 = icmp slt i32 %192, %193
br i1 %194, label %195, label %262
195: ; preds = %191
%196 = load double, double* %29
%197 = load double*, double** %40
%198 = load double, double* %197
%199 = fsub double %196, %198
%200 = load double*, double** %43
store double %199, double* %200
%201 = load double*, double** %41
%202 = load double, double* %201
%203 = fneg double %202
%204 = load double*, double** %42
store double %203, double* %204
%205 = load double*, double** %11
%206 = getelementptr inbounds double, double* %205, i64 0
%207 = load double, double* %206
%208 = fcmp oge double %207, 0.000000e+00
br i1 %208, label %209, label %218
209: ; preds = %195
%210 = load double*, double** %43
%211 = load double, double* %210
%212 = fcmp olt double %211, 0.000000e+00
br i1 %212, label %213, label %217
213: ; preds = %209
%214 = load double*, double** %43
%215 = load double, double* %214
%216 = fadd double %215, 3.600000e+02
store double %216, double* %214
br label %217
217: ; preds = %213, %209
br label %227
218: ; preds = %195
%219 = load double*, double** %43
%220 = load double, double* %219
%221 = fcmp ogt double %220, 0.000000e+00
br i1 %221, label %222, label %226
222: ; preds = %218
%223 = load double*, double** %43
%224 = load double, double* %223
%225 = fsub double %224, 3.600000e+02
store double %225, double* %223
br label %226
226: ; preds = %222, %218
br label %227
227: ; preds = %226, %217
%228 = load double*, double** %43
%229 = load double, double* %228
%230 = fcmp ogt double %229, 3.600000e+02
br i1 %230, label %231, label %235
231: ; preds = %227
%232 = load double*, double** %43
%233 = load double, double* %232
%234 = fsub double %233, 3.600000e+02
store double %234, double* %232
br label %244
235: ; preds = %227
%236 = load double*, double** %43
%237 = load double, double* %236
%238 = fcmp olt double %237, -3.600000e+02
br i1 %238, label %239, label %243
239: ; preds = %235
%240 = load double*, double** %43
%241 = load double, double* %240
%242 = fadd double %241, 3.600000e+02
store double %242, double* %240
br label %243
243: ; preds = %239, %235
br label %244
244: ; preds = %243, %231
%245 = load i32, i32* %15
%246 = load double*, double** %43
%247 = sext i32 %245 to i64
%248 = getelementptr inbounds double, double* %246, i64 %247
store double* %248, double** %43
%249 = load i32, i32* %15
%250 = load double*, double** %42
%251 = sext i32 %249 to i64
%252 = getelementptr inbounds double, double* %250, i64 %251
store double* %252, double** %42
br label %253
253: ; preds = %244
%254 = load i32, i32* %38
%255 = add nsw i32 %254, 1
store i32 %255, i32* %38
%256 = load i32, i32* %14
%257 = load double*, double** %40
%258 = sext i32 %256 to i64
%259 = getelementptr inbounds double, double* %257, i64 %258
store double* %259, double** %40
%260 = load i32, i32* %20
%261 = add nsw i32 %260, 1
store i32 %261, i32* %20
br label %191
262: ; preds = %191
br label %263
263: ; preds = %262
%264 = load i32, i32* %39
%265 = add nsw i32 %264, 1
store i32 %265, i32* %39
%266 = load i32, i32* %14
%267 = load double*, double** %41
%268 = sext i32 %266 to i64
%269 = getelementptr inbounds double, double* %267, i64 %268
store double* %269, double** %41
br label %178
270: ; preds = %178
br label %271
271: ; preds = %270, %165
store i32 0, i32* %10
br label %543
272: ; preds = %51
%273 = load double*, double** %16
store double* %273, double** %40
store i32 0, i32* %24
%274 = load i32, i32* %12
%275 = load i32, i32* %15
%276 = mul nsw i32 %274, %275
store i32 %276, i32* %23
store i32 0, i32* %38
br label %277
277: ; preds = %307, %272
%278 = load i32, i32* %38
%279 = load i32, i32* %12
%280 = icmp slt i32 %278, %279
br i1 %280, label %281, label %317
281: ; preds = %277
%282 = load double*, double** %40
%283 = load double, double* %282
%284 = load double*, double** %11
%285 = getelementptr inbounds double, double* %284, i64 2
%286 = load double, double* %285
%287 = fsub double %283, %286
store double %287, double* %30
%288 = load double*, double** %18
%289 = load i32, i32* %24
%290 = sext i32 %289 to i64
%291 = getelementptr inbounds double, double* %288, i64 %290
store double* %291, double** %43
store i32 0, i32* %39
br label %292
292: ; preds = %303, %281
%293 = load i32, i32* %39
%294 = load i32, i32* %22
%295 = icmp slt i32 %293, %294
br i1 %295, label %296, label %306
296: ; preds = %292
%297 = load double, double* %30
%298 = load double*, double** %43
store double %297, double* %298
%299 = load i32, i32* %23
%300 = load double*, double** %43
%301 = sext i32 %299 to i64
%302 = getelementptr inbounds double, double* %300, i64 %301
store double* %302, double** %43
br label %303
303: ; preds = %296
%304 = load i32, i32* %39
%305 = add nsw i32 %304, 1
store i32 %305, i32* %39
br label %292
306: ; preds = %292
br label %307
307: ; preds = %306
%308 = load i32, i32* %38
%309 = add nsw i32 %308, 1
store i32 %309, i32* %38
%310 = load i32, i32* %15
%311 = load i32, i32* %24
%312 = add nsw i32 %311, %310
store i32 %312, i32* %24
%313 = load i32, i32* %14
%314 = load double*, double** %40
%315 = sext i32 %313 to i64
%316 = getelementptr inbounds double, double* %314, i64 %315
store double* %316, double** %40
br label %277
317: ; preds = %277
%318 = load double*, double** %17
store double* %318, double** %41
%319 = load double*, double** %18
store double* %319, double** %43
%320 = load double*, double** %19
store double* %320, double** %42
store i32 0, i32* %39
br label %321
321: ; preds = %535, %317
%322 = load i32, i32* %39
%323 = load i32, i32* %13
%324 = icmp slt i32 %322, %323
br i1 %324, label %325, label %542
325: ; preds = %321
%326 = load double*, double** %41
%327 = load double, double* %326
%328 = call i32 @sincosd(double %327, double* %32, double* %26)
%329 = load double, double* %26
%330 = load double*, double** %11
%331 = getelementptr inbounds double, double* %330, i64 3
%332 = load double, double* %331
%333 = fmul double %329, %332
store double %333, double* %27
%334 = load double, double* %26
%335 = load double*, double** %11
%336 = getelementptr inbounds double, double* %335, i64 4
%337 = load double, double* %336
%338 = fmul double %334, %337
store double %338, double* %28
%339 = load double, double* %32
%340 = load double*, double** %11
%341 = getelementptr inbounds double, double* %340, i64 3
%342 = load double, double* %341
%343 = fmul double %339, %342
store double %343, double* %33
%344 = load double, double* %32
%345 = load double*, double** %11
%346 = getelementptr inbounds double, double* %345, i64 4
%347 = load double, double* %346
%348 = fmul double %344, %347
store double %348, double* %34
store i32 0, i32* %38
br label %349
349: ; preds = %523, %325
%350 = load i32, i32* %38
%351 = load i32, i32* %21
%352 = icmp slt i32 %350, %351
br i1 %352, label %353, label %534
353: ; preds = %349
%354 = load double*, double** %43
%355 = load double, double* %354
store double %355, double* %30
%356 = load double, double* %30
%357 = call i32 @sincosd(double %356, double* %31, double* %25)
%358 = load double, double* %34
%359 = load double, double* %27
%360 = load double, double* %25
%361 = fneg double %359
%362 = call double @llvm.fmuladd.f64(double %361, double %360, double %358)
store double %362, double* %35
%363 = load double, double* %35
%364 = call double @llvm.fabs.f64(double %363)
%365 = fcmp olt double %364, 1.000000e-05
br i1 %365, label %366, label %379
366: ; preds = %353
%367 = load double*, double** %41
%368 = load double, double* %367
%369 = load double*, double** %11
%370 = getelementptr inbounds double, double* %369, i64 1
%371 = load double, double* %370
%372 = fadd double %368, %371
%373 = call double @cosd(double %372)
%374 = fneg double %373
%375 = load double, double* %27
%376 = load double, double* %25
%377 = fsub double 1.000000e+00, %376
%378 = call double @llvm.fmuladd.f64(double %375, double %377, double %374)
store double %378, double* %35
br label %379
379: ; preds = %366, %353
%380 = load double, double* %26
%381 = fneg double %380
%382 = load double, double* %31
%383 = fmul double %381, %382
store double %383, double* %36
%384 = load double, double* %35
%385 = fcmp une double %384, 0.000000e+00
br i1 %385, label %389, label %386
386: ; preds = %379
%387 = load double, double* %36
%388 = fcmp une double %387, 0.000000e+00
br i1 %388, label %389, label %393
389: ; preds = %386, %379
%390 = load double, double* %36
%391 = load double, double* %35
%392 = call double @atan2d(double %390, double %391)
store double %392, double* %29
br label %405
393: ; preds = %386
%394 = load double*, double** %11
%395 = getelementptr inbounds double, double* %394, i64 1
%396 = load double, double* %395
%397 = fcmp olt double %396, 9.000000e+01
br i1 %397, label %398, label %401
398: ; preds = %393
%399 = load double, double* %30
%400 = fadd double %399, 1.800000e+02
store double %400, double* %29
br label %404
401: ; preds = %393
%402 = load double, double* %30
%403 = fneg double %402
store double %403, double* %29
br label %404
404: ; preds = %401, %398
br label %405
405: ; preds = %404, %389
%406 = load double*, double** %11
%407 = getelementptr inbounds double, double* %406, i64 0
%408 = load double, double* %407
%409 = load double, double* %29
%410 = fadd double %408, %409
%411 = load double*, double** %43
store double %410, double* %411
%412 = load double*, double** %11
%413 = getelementptr inbounds double, double* %412, i64 0
%414 = load double, double* %413
%415 = fcmp oge double %414, 0.000000e+00
br i1 %415, label %416, label %425
416: ; preds = %405
%417 = load double*, double** %43
%418 = load double, double* %417
%419 = fcmp olt double %418, 0.000000e+00
br i1 %419, label %420, label %424
420: ; preds = %416
%421 = load double*, double** %43
%422 = load double, double* %421
%423 = fadd double %422, 3.600000e+02
store double %423, double* %421
br label %424
424: ; preds = %420, %416
br label %434
425: ; preds = %405
%426 = load double*, double** %43
%427 = load double, double* %426
%428 = fcmp ogt double %427, 0.000000e+00
br i1 %428, label %429, label %433
429: ; preds = %425
%430 = load double*, double** %43
%431 = load double, double* %430
%432 = fsub double %431, 3.600000e+02
store double %432, double* %430
br label %433
433: ; preds = %429, %425
br label %434
434: ; preds = %433, %424
%435 = load double*, double** %43
%436 = load double, double* %435
%437 = fcmp ogt double %436, 3.600000e+02
br i1 %437, label %438, label %442
438: ; preds = %434
%439 = load double*, double** %43
%440 = load double, double* %439
%441 = fsub double %440, 3.600000e+02
store double %441, double* %439
br label %451
442: ; preds = %434
%443 = load double*, double** %43
%444 = load double, double* %443
%445 = fcmp olt double %444, -3.600000e+02
br i1 %445, label %446, label %450
446: ; preds = %442
%447 = load double*, double** %43
%448 = load double, double* %447
%449 = fadd double %448, 3.600000e+02
store double %449, double* %447
br label %450
450: ; preds = %446, %442
br label %451
451: ; preds = %450, %438
%452 = load double, double* %30
%453 = call double @fmod(double %452, double 1.800000e+02)
%454 = fcmp oeq double %453, 0.000000e+00
br i1 %454, label %455, label %482
455: ; preds = %451
%456 = load double*, double** %41
%457 = load double, double* %456
%458 = load double, double* %25
%459 = load double*, double** %11
%460 = getelementptr inbounds double, double* %459, i64 1
%461 = load double, double* %460
%462 = call double @llvm.fmuladd.f64(double %458, double %461, double %457)
%463 = load double*, double** %42
store double %462, double* %463
%464 = load double*, double** %42
%465 = load double, double* %464
%466 = fcmp ogt double %465, 9.000000e+01
br i1 %466, label %467, label %472
467: ; preds = %455
%468 = load double*, double** %42
%469 = load double, double* %468
%470 = fsub double 1.800000e+02, %469
%471 = load double*, double** %42
store double %470, double* %471
br label %472
472: ; preds = %467, %455
%473 = load double*, double** %42
%474 = load double, double* %473
%475 = fcmp olt double %474, -9.000000e+01
br i1 %475, label %476, label %481
476: ; preds = %472
%477 = load double*, double** %42
%478 = load double, double* %477
%479 = fsub double -1.800000e+02, %478
%480 = load double*, double** %42
store double %479, double* %480
br label %481
481: ; preds = %476, %472
br label %522
482: ; preds = %451
%483 = load double, double* %33
%484 = load double, double* %28
%485 = load double, double* %25
%486 = call double @llvm.fmuladd.f64(double %484, double %485, double %483)
store double %486, double* %37
%487 = load double, double* %37
%488 = call double @llvm.fabs.f64(double %487)
%489 = fcmp ogt double %488, 0x3FEFAE147AE147AE
br i1 %489, label %490, label %517
490: ; preds = %482
%491 = load double, double* %37
%492 = fcmp olt double %491, 0.000000e+00
br i1 %492, label %493, label %504
493: ; preds = %490
%494 = load double, double* %35
%495 = load double, double* %35
%496 = load double, double* %36
%497 = load double, double* %36
%498 = fmul double %496, %497
%499 = call double @llvm.fmuladd.f64(double %494, double %495, double %498)
%500 = call i32 @sqrt(double %499)
%501 = call double @acosd(i32 %500)
%502 = call double @llvm.fabs.f64(double %501)
%503 = fneg double %502
br label %514
504: ; preds = %490
%505 = load double, double* %35
%506 = load double, double* %35
%507 = load double, double* %36
%508 = load double, double* %36
%509 = fmul double %507, %508
%510 = call double @llvm.fmuladd.f64(double %505, double %506, double %509)
%511 = call i32 @sqrt(double %510)
%512 = call double @acosd(i32 %511)
%513 = call double @llvm.fabs.f64(double %512)
br label %514
514: ; preds = %504, %493
%515 = phi double [ %503, %493 ], [ %513, %504 ]
%516 = load double*, double** %42
store double %515, double* %516
br label %521
517: ; preds = %482
%518 = load double, double* %37
%519 = call double @asind(double %518)
%520 = load double*, double** %42
store double %519, double* %520
br label %521
521: ; preds = %517, %514
br label %522
522: ; preds = %521, %481
br label %523
523: ; preds = %522
%524 = load i32, i32* %38
%525 = add nsw i32 %524, 1
store i32 %525, i32* %38
%526 = load i32, i32* %15
%527 = load double*, double** %43
%528 = sext i32 %526 to i64
%529 = getelementptr inbounds double, double* %527, i64 %528
store double* %529, double** %43
%530 = load i32, i32* %15
%531 = load double*, double** %42
%532 = sext i32 %530 to i64
%533 = getelementptr inbounds double, double* %531, i64 %532
store double* %533, double** %42
br label %349
534: ; preds = %349
br label %535
535: ; preds = %534
%536 = load i32, i32* %39
%537 = add nsw i32 %536, 1
store i32 %537, i32* %39
%538 = load i32, i32* %14
%539 = load double*, double** %41
%540 = sext i32 %538 to i64
%541 = getelementptr inbounds double, double* %539, i64 %540
store double* %541, double** %41
br label %321
542: ; preds = %321
store i32 0, i32* %10
br label %543
543: ; preds = %542, %271
%544 = load i32, i32* %10
ret i32 %544
}

LLVM IR (-O2):
define i32 @sphx2s(double* nocapture %0, i32 %1, i32 %2, i32 %3, i32 %4, double* nocapture %5, double* nocapture %6, double* nocapture %7, double* nocapture writeonly %8) {
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = bitcast double* %10 to i8*
%15 = bitcast double* %11 to i8*
%16 = bitcast double* %12 to i8*
%17 = bitcast double* %13 to i8*
%18 = icmp sgt i32 %2, 0
%19 = select i1 %18, i32 %1, i32 1
%20 = select i1 %18, i32 %2, i32 %1
%21 = getelementptr inbounds double, double* %0, i64 4
%22 = load double, double* %21
%23 = fcmp oeq double %22, 0.000000e+00
br i1 %23, label %24, label %155
24: ; preds = %9
%25 = getelementptr inbounds double, double* %0, i64 1
%26 = load double, double* %25
%27 = fcmp oeq double %26, 0.000000e+00
%28 = load double, double* %0
br i1 %27, label %29, label %92
29: ; preds = %24
%30 = fadd double %28, 1.800000e+02
%31 = getelementptr inbounds double, double* %0, i64 2
%32 = load double, double* %31
%33 = fsub double %30, %32
%34 = tail call double @fmod(double %33, double 3.600000e+02)
%35 = icmp sgt i32 %20, 0
br i1 %35, label %36, label %330
36: ; preds = %29
%37 = icmp sgt i32 %19, 0
%38 = sext i32 %4 to i64
%39 = sext i32 %3 to i64
br label %40
40: ; preds = %36, %85
%41 = phi double* [ %7, %36 ], [ %88, %85 ]
%42 = phi double* [ %8, %36 ], [ %87, %85 ]
%43 = phi double* [ %6, %36 ], [ %90, %85 ]
%44 = phi i32 [ 0, %36 ], [ %89, %85 ]
%45 = phi i32 [ 0, %36 ], [ %86, %85 ]
br i1 %37, label %46, label %85
46: ; preds = %40
%47 = srem i32 %45, %1
%48 = mul nsw i32 %47, %3
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds double, double* %5, i64 %49
br label %51
51: ; preds = %46, %77
%52 = phi double* [ %78, %77 ], [ %41, %46 ]
%53 = phi double* [ %79, %77 ], [ %42, %46 ]
%54 = phi double* [ %81, %77 ], [ %50, %46 ]
%55 = phi i32 [ %80, %77 ], [ 0, %46 ]
%56 = load double, double* %54
%57 = fadd double %34, %56
store double %57, double* %52
%58 = load double, double* %43
store double %58, double* %53
%59 = load double, double* %0
%60 = fcmp ult double %59, 0.000000e+00
%61 = load double, double* %52
br i1 %60, label %64, label %62
62: ; preds = %51
%63 = fcmp olt double %61, 0.000000e+00
br i1 %63, label %66, label %69
64: ; preds = %51
%65 = fcmp ogt double %61, 0.000000e+00
br i1 %65, label %66, label %69
66: ; preds = %64, %62
%67 = phi double [ 3.600000e+02, %62 ], [ -3.600000e+02, %64 ]
%68 = fadd double %61, %67
store double %68, double* %52
br label %69
69: ; preds = %66, %64, %62
%70 = phi double [ %61, %64 ], [ %61, %62 ], [ %68, %66 ]
%71 = fcmp ogt double %70, 3.600000e+02
br i1 %71, label %74, label %72
72: ; preds = %69
%73 = fcmp olt double %70, -3.600000e+02
br i1 %73, label %74, label %77
74: ; preds = %72, %69
%75 = phi double [ -3.600000e+02, %69 ], [ 3.600000e+02, %72 ]
%76 = fadd double %70, %75
store double %76, double* %52
br label %77
77: ; preds = %74, %72
%78 = getelementptr inbounds double, double* %52, i64 %38
%79 = getelementptr inbounds double, double* %53, i64 %38
%80 = add nuw nsw i32 %55, 1
%81 = getelementptr inbounds double, double* %54, i64 %39
%82 = icmp eq i32 %80, %19
br i1 %82, label %83, label %51
83: ; preds = %77
%84 = add i32 %19, %45
br label %85
85: ; preds = %83, %40
%86 = phi i32 [ %45, %40 ], [ %84, %83 ]
%87 = phi double* [ %42, %40 ], [ %79, %83 ]
%88 = phi double* [ %41, %40 ], [ %78, %83 ]
%89 = add nuw nsw i32 %44, 1
%90 = getelementptr inbounds double, double* %43, i64 %39
%91 = icmp eq i32 %89, %20
br i1 %91, label %330, label %40
92: ; preds = %24
%93 = getelementptr inbounds double, double* %0, i64 2
%94 = load double, double* %93
%95 = fadd double %28, %94
%96 = tail call double @fmod(double %95, double 3.600000e+02)
%97 = icmp sgt i32 %20, 0
br i1 %97, label %98, label %330
98: ; preds = %92
%99 = icmp sgt i32 %19, 0
%100 = sext i32 %4 to i64
%101 = sext i32 %3 to i64
br label %102
102: ; preds = %98, %148
%103 = phi double* [ %7, %98 ], [ %151, %148 ]
%104 = phi double* [ %8, %98 ], [ %150, %148 ]
%105 = phi double* [ %6, %98 ], [ %153, %148 ]
%106 = phi i32 [ 0, %98 ], [ %152, %148 ]
%107 = phi i32 [ 0, %98 ], [ %149, %148 ]
br i1 %99, label %108, label %148
108: ; preds = %102
%109 = srem i32 %107, %1
%110 = mul nsw i32 %109, %3
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds double, double* %5, i64 %111
br label %113
113: ; preds = %108, %140
%114 = phi double* [ %141, %140 ], [ %103, %108 ]
%115 = phi double* [ %142, %140 ], [ %104, %108 ]
%116 = phi double* [ %144, %140 ], [ %112, %108 ]
%117 = phi i32 [ %143, %140 ], [ 0, %108 ]
%118 = load double, double* %116
%119 = fsub double %96, %118
store double %119, double* %114
%120 = load double, double* %105
%121 = fneg double %120
store double %121, double* %115
%122 = load double, double* %0
%123 = fcmp ult double %122, 0.000000e+00
%124 = load double, double* %114
br i1 %123, label %127, label %125
125: ; preds = %113
%126 = fcmp olt double %124, 0.000000e+00
br i1 %126, label %129, label %132
127: ; preds = %113
%128 = fcmp ogt double %124, 0.000000e+00
br i1 %128, label %129, label %132
129: ; preds = %127, %125
%130 = phi double [ 3.600000e+02, %125 ], [ -3.600000e+02, %127 ]
%131 = fadd double %124, %130
store double %131, double* %114
br label %132
132: ; preds = %129, %127, %125
%133 = phi double [ %124, %127 ], [ %124, %125 ], [ %131, %129 ]
%134 = fcmp ogt double %133, 3.600000e+02
br i1 %134, label %137, label %135
135: ; preds = %132
%136 = fcmp olt double %133, -3.600000e+02
br i1 %136, label %137, label %140
137: ; preds = %135, %132
%138 = phi double [ -3.600000e+02, %132 ], [ 3.600000e+02, %135 ]
%139 = fadd double %133, %138
store double %139, double* %114
br label %140
140: ; preds = %137, %135
%141 = getelementptr inbounds double, double* %114, i64 %100
%142 = getelementptr inbounds double, double* %115, i64 %100
%143 = add nuw nsw i32 %117, 1
%144 = getelementptr inbounds double, double* %116, i64 %101
%145 = icmp eq i32 %143, %19
br i1 %145, label %146, label %113
146: ; preds = %140
%147 = add i32 %19, %107
br label %148
148: ; preds = %146, %102
%149 = phi i32 [ %107, %102 ], [ %147, %146 ]
%150 = phi double* [ %104, %102 ], [ %142, %146 ]
%151 = phi double* [ %103, %102 ], [ %141, %146 ]
%152 = add nuw nsw i32 %106, 1
%153 = getelementptr inbounds double, double* %105, i64 %101
%154 = icmp eq i32 %152, %20
br i1 %154, label %330, label %102
155: ; preds = %9
%156 = icmp sgt i32 %1, 0
br i1 %156, label %157, label %170
157: ; preds = %155
%158 = mul nsw i32 %4, %1
%159 = getelementptr inbounds double, double* %0, i64 2
%160 = sext i32 %158 to i64
%161 = sext i32 %3 to i64
%162 = call i32 @llvm.smax.i32(i32 %2, i32 1)
%163 = select i1 %18, i32 %162, i32 1
%164 = sext i32 %4 to i64
%165 = add nsw i32 %163, -1
%166 = and i32 %163, 7
%167 = icmp ult i32 %165, 7
%168 = and i32 %163, 2147483640
%169 = icmp eq i32 %166, 0
br label %178
170: ; preds = %207, %155
%171 = icmp sgt i32 %20, 0
br i1 %171, label %172, label %330
172: ; preds = %170
%173 = getelementptr inbounds double, double* %0, i64 3
%174 = icmp sgt i32 %19, 0
%175 = getelementptr inbounds double, double* %0, i64 1
%176 = sext i32 %4 to i64
%177 = sext i32 %3 to i64
br label %212
178: ; preds = %157, %207
%179 = phi i64 [ 0, %157 ], [ %209, %207 ]
%180 = phi double* [ %5, %157 ], [ %210, %207 ]
%181 = phi i32 [ 0, %157 ], [ %208, %207 ]
%182 = load double, double* %180
%183 = load double, double* %159
%184 = fsub double %182, %183
%185 = getelementptr inbounds double, double* %7, i64 %179
br i1 %167, label %199, label %186
186: ; preds = %178, %186
%187 = phi double* [ %196, %186 ], [ %185, %178 ]
%188 = phi i32 [ %197, %186 ], [ 0, %178 ]
store double %184, double* %187
%189 = getelementptr inbounds double, double* %187, i64 %160
store double %184, double* %189
%190 = getelementptr inbounds double, double* %189, i64 %160
store double %184, double* %190
%191 = getelementptr inbounds double, double* %190, i64 %160
store double %184, double* %191
%192 = getelementptr inbounds double, double* %191, i64 %160
store double %184, double* %192
%193 = getelementptr inbounds double, double* %192, i64 %160
store double %184, double* %193
%194 = getelementptr inbounds double, double* %193, i64 %160
store double %184, double* %194
%195 = getelementptr inbounds double, double* %194, i64 %160
store double %184, double* %195
%196 = getelementptr inbounds double, double* %195, i64 %160
%197 = add i32 %188, 8
%198 = icmp eq i32 %197, %168
br i1 %198, label %199, label %186
199: ; preds = %186, %178
%200 = phi double* [ %185, %178 ], [ %196, %186 ]
br i1 %169, label %207, label %201
201: ; preds = %199, %201
%202 = phi double* [ %204, %201 ], [ %200, %199 ]
%203 = phi i32 [ %205, %201 ], [ 0, %199 ]
store double %184, double* %202
%204 = getelementptr inbounds double, double* %202, i64 %160
%205 = add i32 %203, 1
%206 = icmp eq i32 %205, %166
br i1 %206, label %207, label %201
207: ; preds = %201, %199
%208 = add nuw nsw i32 %181, 1
%209 = add nsw i64 %179, %164
%210 = getelementptr inbounds double, double* %180, i64 %161
%211 = icmp eq i32 %208, %1
br i1 %211, label %170, label %178
212: ; preds = %172, %324
%213 = phi double* [ %7, %172 ], [ %326, %324 ]
%214 = phi double* [ %8, %172 ], [ %325, %324 ]
%215 = phi double* [ %6, %172 ], [ %328, %324 ]
%216 = phi i32 [ 0, %172 ], [ %327, %324 ]
%217 = load double, double* %215
%218 = call i32 @sincosd(double %217, double* %13, double* %11)
%219 = load double, double* %11
%220 = load double, double* %173
%221 = fmul double %219, %220
%222 = load double, double* %21
%223 = fmul double %219, %222
%224 = load double, double* %13
%225 = fmul double %220, %224
%226 = fmul double %222, %224
br i1 %174, label %227, label %324
227: ; preds = %212
%228 = fneg double %221
br label %229
229: ; preds = %227, %319
%230 = phi double* [ %213, %227 ], [ %321, %319 ]
%231 = phi double* [ %214, %227 ], [ %322, %319 ]
%232 = phi i32 [ 0, %227 ], [ %320, %319 ]
%233 = load double, double* %230
%234 = call i32 @sincosd(double %233, double* %12, double* %10)
%235 = load double, double* %10
%236 = call double @llvm.fmuladd.f64(double %228, double %235, double %226)
%237 = call double @llvm.fabs.f64(double %236)
%238 = fcmp olt double %237, 1.000000e-05
br i1 %238, label %239, label %248
239: ; preds = %229
%240 = load double, double* %215
%241 = load double, double* %175
%242 = fadd double %240, %241
%243 = call double @cosd(double %242)
%244 = fneg double %243
%245 = load double, double* %10
%246 = fsub double 1.000000e+00, %245
%247 = call double @llvm.fmuladd.f64(double %221, double %246, double %244)
br label %248
248: ; preds = %239, %229
%249 = phi double [ %247, %239 ], [ %236, %229 ]
%250 = load double, double* %11
%251 = fneg double %250
%252 = load double, double* %12
%253 = fmul double %252, %251
%254 = fcmp une double %249, 0.000000e+00
%255 = fcmp une double %253, 0.000000e+00
%256 = select i1 %254, i1 true, i1 %255
br i1 %256, label %257, label %259
257: ; preds = %248
%258 = call double @atan2d(double %253, double %249)
br label %266
259: ; preds = %248
%260 = load double, double* %175
%261 = fcmp olt double %260, 9.000000e+01
br i1 %261, label %262, label %264
262: ; preds = %259
%263 = fadd double %233, 1.800000e+02
br label %266
264: ; preds = %259
%265 = fneg double %233
br label %266
266: ; preds = %262, %264, %257
%267 = phi double [ %258, %257 ], [ %263, %262 ], [ %265, %264 ]
%268 = load double, double* %0
%269 = fadd double %267, %268
store double %269, double* %230
%270 = load double, double* %0
%271 = fcmp ult double %270, 0.000000e+00
br i1 %271, label %274, label %272
272: ; preds = %266
%273 = fcmp olt double %269, 0.000000e+00
br i1 %273, label %276, label %279
274: ; preds = %266
%275 = fcmp ogt double %269, 0.000000e+00
br i1 %275, label %276, label %279
276: ; preds = %274, %272
%277 = phi double [ 3.600000e+02, %272 ], [ -3.600000e+02, %274 ]
%278 = fadd double %269, %277
store double %278, double* %230
br label %279
279: ; preds = %276, %274, %272
%280 = phi double [ %269, %274 ], [ %269, %272 ], [ %278, %276 ]
%281 = fcmp ogt double %280, 3.600000e+02
br i1 %281, label %284, label %282
282: ; preds = %279
%283 = fcmp olt double %280, -3.600000e+02
br i1 %283, label %284, label %287
284: ; preds = %282, %279
%285 = phi double [ -3.600000e+02, %279 ], [ 3.600000e+02, %282 ]
%286 = fadd double %280, %285
store double %286, double* %230
br label %287
287: ; preds = %284, %282
%288 = call double @fmod(double %233, double 1.800000e+02)
%289 = fcmp oeq double %288, 0.000000e+00
br i1 %289, label %290, label %301
290: ; preds = %287
%291 = load double, double* %215
%292 = load double, double* %10
%293 = load double, double* %175
%294 = call double @llvm.fmuladd.f64(double %292, double %293, double %291)
%295 = fcmp ogt double %294, 9.000000e+01
%296 = fsub double 1.800000e+02, %294
%297 = select i1 %295, double %296, double %294
store double %297, double* %231
%298 = fcmp olt double %297, -9.000000e+01
br i1 %298, label %299, label %319
299: ; preds = %290
%300 = fsub double -1.800000e+02, %297
br label %317
301: ; preds = %287
%302 = load double, double* %10
%303 = call double @llvm.fmuladd.f64(double %223, double %302, double %225)
%304 = call double @llvm.fabs.f64(double %303)
%305 = fcmp ogt double %304, 0x3FEFAE147AE147AE
br i1 %305, label %306, label %315
306: ; preds = %301
%307 = fcmp olt double %303, 0.000000e+00
%308 = fmul double %253, %253
%309 = call double @llvm.fmuladd.f64(double %249, double %249, double %308)
%310 = call i32 @sqrt(double %309)
%311 = call double @acosd(i32 %310)
%312 = call double @llvm.fabs.f64(double %311)
%313 = fneg double %312
%314 = select i1 %307, double %313, double %312
br label %317
315: ; preds = %301
%316 = call double @asind(double %303)
br label %317
317: ; preds = %306, %315, %299
%318 = phi double [ %300, %299 ], [ %316, %315 ], [ %314, %306 ]
store double %318, double* %231
br label %319
319: ; preds = %317, %290
%320 = add nuw nsw i32 %232, 1
%321 = getelementptr inbounds double, double* %230, i64 %176
%322 = getelementptr inbounds double, double* %231, i64 %176
%323 = icmp eq i32 %320, %19
br i1 %323, label %324, label %229
324: ; preds = %319, %212
%325 = phi double* [ %214, %212 ], [ %322, %319 ]
%326 = phi double* [ %213, %212 ], [ %321, %319 ]
%327 = add nuw nsw i32 %216, 1
%328 = getelementptr inbounds double, double* %215, i64 %177
%329 = icmp eq i32 %327, %20
br i1 %329, label %330, label %212
330: ; preds = %324, %148, %85, %170, %92, %29
ret i32 0
}