#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 AssociatedLegendreP(int, int, double);
double C(int, double *, double *);
double I;
double SphericalHarmonics(int, int, double, double);
int a(int, int, double *, double *);
int acos(double);
int cexp(int);
int /*<<< orphan*/ check(double, double);
double cimag(int);
double conj(double);
int cos(double);
double creal(int);
double factorial(int);
int pow(int, int);
int /*<<< orphan*/ printf(char *, ...);
double shortfactorial(int, int);
int sin(double);
int sqrt(int);
int main() {
  int l, m;
  double var_x, var_y, sum;
  double theta[] = {1, 0.1};
  double phi[] = {1, 0};
  printf("(1) Test factorial\n");
  check(factorial(0), 1);
  check(factorial(1), 1);
  check(factorial(10), 3628800);
  check(factorial(15), 1307674368000);
  check(factorial(18), 6402373705728000ULL);
  l = 10, m = 5;
  check(shortfactorial(l - m, l + m), factorial(l - m) / factorial(l + m));
  printf("(2) Test AssociatedLegenderP\n");
  for (var_x = -1.0; var_x <= 1.0; var_x += 0.1) {
    check(AssociatedLegendreP(0, 0, var_x), 1.0);
    check(AssociatedLegendreP(1, 0, var_x), var_x);
    check(AssociatedLegendreP(1, 1, var_x), -1 * pow((1 - pow(var_x, 2)), 0.5));
    check(AssociatedLegendreP(4, 4, var_x), 105 * pow(1 - var_x * var_x, 2));
    check(AssociatedLegendreP(4, 1, var_x),
          (-5.) / 2 * (7 * pow(var_x, 3) - 3 * var_x) *
              sqrt(1 - var_x * var_x));
    check(AssociatedLegendreP(4, -1, var_x),
          -1. / 20 * AssociatedLegendreP(4, 1, var_x));
    check(AssociatedLegendreP(4, -1, var_x),
          -1. / 20 * (-5) / 2 * (7 * pow(var_x, 3) - 3 * var_x) *
              pow(1 - var_x * var_x, 0.5));
  }
  printf("(3) Test SphericalHarmonics\n");
  for (var_x = 0; var_x <= acos(-1.0); var_x += 0.5)
    for (var_y = 0; var_y <= 2 * acos(-1.0); var_y += 0.5) {
      check(creal(SphericalHarmonics(0, 0, var_x, var_y)),
            1 / 2. * sqrt(1 / acos(-1.0)));
      check(creal(SphericalHarmonics(1, -1, var_x, var_y)),
            creal(1 / 2. * sqrt(3. / (2 * acos(-1.0))) * sin(var_x) *
                  cexp(-I * var_y)));
      check(creal(SphericalHarmonics(2, 0, var_x, var_y)),
            1 / 4. * sqrt(5 / acos(-1.0)) * (3 * cos(var_x) * cos(var_x) - 1));
      check(cimag(SphericalHarmonics(5, -4, var_x, var_y)),
            cimag(3 / 16. * sqrt(385 / (2 * acos(-1.0))) * pow(sin(var_x), 4) *
                  cos(var_x) * cexp(-4 * I * var_y)));
      check(cimag(SphericalHarmonics(7, 7, var_x, var_y)),
            cimag(-3 / 64. * sqrt(715 / (2 * acos(-1.0))) * pow(sin(var_x), 7) *
                  cexp(7 * I * var_y)));
      check(creal(SphericalHarmonics(10, 9, var_x, var_y)),
            creal(-1 / 512. * sqrt(4849845 / (acos(-1.0))) *
                  pow(sin(var_x), 9) * cos(var_x) * cexp(9 * I * var_y)));
    }
  for (l = 0; l < 11; ++l) {
    for (var_x = 0; var_x <= acos(-1.0); var_x += 0.1)
      for (var_y = 0; var_y <= 2 * acos(-1.0); var_y += 0.1) {
        sum = 0;
        for (m = -l; m <= l; ++m) {
          sum += conj(SphericalHarmonics(l, m, var_x, var_y)) *
                 SphericalHarmonics(l, m, var_x, var_y);
        }
        if (!check(sum, (2 * l + 1) / (4 * acos(-1.0)))) {
          printf("%d", l);
        };
      }
  }
  printf("(4) Test Coefficients of Harmonics expansion\n");
  check(creal(a(10, 5, theta, phi)), -0.00033704);
  printf("(5) Test power spectrum expansion\n");
  check(C(5, theta, phi), 0.0795775);
  check(C(9, theta, phi), 0.0795775);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xe87(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xe84(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xe81(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xe7e(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    0xe7b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   1030 <factorial@plt>
movsd  0xdb5(%rip),%xmm1
call   1110 <check@plt>
mov    $0x1,%edi
call   1030 <factorial@plt>
movsd  0xd9e(%rip),%xmm1
call   1110 <check@plt>
mov    $0xa,%edi
call   1030 <factorial@plt>
movsd  0xd7f(%rip),%xmm1
call   1110 <check@plt>
mov    $0xf,%edi
call   1030 <factorial@plt>
movsd  0xd60(%rip),%xmm1
call   1110 <check@plt>
mov    $0x12,%edi
call   1030 <factorial@plt>
movsd  0xd41(%rip),%xmm1
call   1110 <check@plt>
movl   $0xa,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
call   1130 <shortfactorial@plt>
movsd  %xmm0,-0x58(%rbp)
mov    -0x8(%rbp),%edi
sub    -0xc(%rbp),%edi
call   1030 <factorial@plt>
movsd  %xmm0,-0x60(%rbp)
mov    -0x8(%rbp),%edi
add    -0xc(%rbp),%edi
call   1030 <factorial@plt>
movsd  -0x60(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x58(%rbp),%xmm0
divsd  %xmm2,%xmm1
call   1110 <check@plt>
lea    0xdbc(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movsd  0xcc9(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xcdc(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     15ef <main+0x3df>
movsd  -0x18(%rbp),%xmm0
xor    %esi,%esi
mov    %esi,%edi
call   1080 <AssociatedLegendreP@plt>
movsd  0xcbb(%rip),%xmm1
call   1110 <check@plt>
movsd  -0x18(%rbp),%xmm0
mov    $0x1,%edi
xor    %esi,%esi
call   1080 <AssociatedLegendreP@plt>
movsd  -0x18(%rbp),%xmm1
call   1110 <check@plt>
movsd  -0x18(%rbp),%xmm0
mov    $0x1,%esi
mov    %esi,%edi
call   1080 <AssociatedLegendreP@plt>
movsd  %xmm0,-0x98(%rbp)
ff
cvttsd2si -0x18(%rbp),%edi
mov    $0x2,%esi
call   1100 <pow@plt>
mov    $0x1,%edi
sub    %eax,%edi
xor    %esi,%esi
call   1100 <pow@plt>
movsd  -0x98(%rbp),%xmm0
ff
imul   $0xffffffff,%eax,%eax
cvtsi2sd %eax,%xmm1
call   1110 <check@plt>
movsd  -0x18(%rbp),%xmm0
mov    $0x4,%esi
mov    %esi,%edi
call   1080 <AssociatedLegendreP@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xc08(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
mov    $0x2,%esi
call   1100 <pow@plt>
movsd  -0x90(%rbp),%xmm0
ff
imul   $0x69,%eax,%eax
cvtsi2sd %eax,%xmm1
call   1110 <check@plt>
movsd  -0x18(%rbp),%xmm0
mov    $0x4,%edi
mov    $0x1,%esi
call   1080 <AssociatedLegendreP@plt>
movsd  %xmm0,-0x80(%rbp)
cvttsd2si -0x18(%rbp),%edi
mov    $0x3,%esi
call   1100 <pow@plt>
imul   $0x7,%eax,%eax
cvtsi2sd %eax,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xc16(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xc16(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xb5d(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1120 <sqrt@plt>
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x80(%rbp),%xmm0
cvtsi2sd %eax,%xmm2
mulsd  %xmm2,%xmm1
call   1110 <check@plt>
movsd  -0x18(%rbp),%xmm0
mov    $0x4,%edi
mov    $0xffffffff,%esi
call   1080 <AssociatedLegendreP@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x4,%edi
mov    $0x1,%esi
call   1080 <AssociatedLegendreP@plt>
movaps %xmm0,%xmm2
movsd  -0x78(%rbp),%xmm0
movsd  0xb71(%rip),%xmm1
mulsd  %xmm2,%xmm1
call   1110 <check@plt>
movsd  -0x18(%rbp),%xmm0
mov    $0x4,%edi
mov    $0xffffffff,%esi
call   1080 <AssociatedLegendreP@plt>
movsd  %xmm0,-0x68(%rbp)
cvttsd2si -0x18(%rbp),%edi
mov    $0x3,%esi
call   1100 <pow@plt>
imul   $0x7,%eax,%eax
cvtsi2sd %eax,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xb24(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xb0c(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xa6e(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
xor    %esi,%esi
call   1100 <pow@plt>
movsd  -0x70(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm0
cvtsi2sd %eax,%xmm2
mulsd  %xmm2,%xmm1
call   1110 <check@plt>
movsd  0xa58(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    133c <main+0x12c>
lea    0xb0c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0x9e6(%rip),%xmm0
call   1060 <acos@plt>
movsd  -0xa0(%rbp),%xmm1
ff
cvtsi2sd %eax,%xmm0
ucomisd %xmm1,%xmm0
jb     1b5c <main+0x94c>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  0x9ae(%rip),%xmm0
call   1060 <acos@plt>
movsd  -0xa8(%rbp),%xmm1
ff
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
ucomisd %xmm1,%xmm0
jb     1b40 <main+0x930>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
xor    %esi,%esi
mov    %esi,%edi
call   10a0 <SphericalHarmonics@plt>
cvttsd2si %xmm0,%edi
call   1070 <creal@plt>
movsd  %xmm0,-0x138(%rbp)
ff
movsd  0x964(%rip),%xmm0
call   1060 <acos@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
mov    %eax,%edi
call   1120 <sqrt@plt>
movsd  -0x138(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm2
movsd  0x97a(%rip),%xmm1
mulsd  %xmm2,%xmm1
call   1110 <check@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mov    $0x1,%edi
mov    $0xffffffff,%esi
call   10a0 <SphericalHarmonics@plt>
cvttsd2si %xmm0,%edi
call   1070 <creal@plt>
movsd  %xmm0,-0x120(%rbp)
ff
movsd  0x8ff(%rip),%xmm0
call   1060 <acos@plt>
shl    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0x96b(%rip),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1120 <sqrt@plt>
cvtsi2sd %eax,%xmm1
movsd  0x912(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1090 <sin@plt>
movsd  -0x130(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
mov    0x2885(%rip),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x20(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   10c0 <cexp@plt>
movsd  -0x128(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1070 <creal@plt>
movaps %xmm0,%xmm1
movsd  -0x120(%rbp),%xmm0
ff
call   1110 <check@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mov    $0x2,%edi
xor    %esi,%esi
call   10a0 <SphericalHarmonics@plt>
cvttsd2si %xmm0,%edi
call   1070 <creal@plt>
movsd  %xmm0,-0x110(%rbp)
ff
movsd  0x81c(%rip),%xmm0
call   1060 <acos@plt>
mov    %eax,%ecx
mov    $0x5,%eax
cltd
idiv   %ecx
mov    %eax,%edi
call   1120 <sqrt@plt>
cvtsi2sd %eax,%xmm1
movsd  0x872(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   10f0 <cos@plt>
imul   $0x3,%eax,%eax
mov    %eax,-0x104(%rbp)
movsd  -0x18(%rbp),%xmm0
call   10f0 <cos@plt>
movsd  -0x118(%rbp),%xmm1
ff
movsd  -0x110(%rbp),%xmm0
ff
mov    %eax,%ecx
mov    -0x104(%rbp),%eax
imul   %ecx,%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm2
mulsd  %xmm2,%xmm1
call   1110 <check@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mov    $0x5,%edi
mov    $0xfffffffc,%esi
call   10a0 <SphericalHarmonics@plt>
cvttsd2si %xmm0,%edi
call   10b0 <cimag@plt>
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  0x774(%rip),%xmm0
call   1060 <acos@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0x181,%eax
cltd
idiv   %ecx
mov    %eax,%edi
call   1120 <sqrt@plt>
cvtsi2sd %eax,%xmm1
movsd  0x7bf(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1090 <sin@plt>
mov    %eax,%edi
mov    $0x4,%esi
call   1100 <pow@plt>
movsd  -0x100(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   10f0 <cos@plt>
movsd  -0xf8(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  0x753(%rip),%xmm0
mov    0x26cc(%rip),%rax
mulsd  (%rax),%xmm0
mulsd  -0x20(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   10c0 <cexp@plt>
movsd  -0xf0(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   10b0 <cimag@plt>
movaps %xmm0,%xmm1
movsd  -0xe8(%rbp),%xmm0
ff
call   1110 <check@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mov    $0x7,%esi
mov    %esi,%edi
call   10a0 <SphericalHarmonics@plt>
cvttsd2si %xmm0,%edi
call   10b0 <cimag@plt>
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  0x67a(%rip),%xmm0
call   1060 <acos@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0x2cb,%eax
cltd
idiv   %ecx
mov    %eax,%edi
call   1120 <sqrt@plt>
cvtsi2sd %eax,%xmm1
movsd  0x6b5(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1090 <sin@plt>
mov    %eax,%edi
mov    $0x7,%esi
call   1100 <pow@plt>
movsd  -0xe0(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  0x66b(%rip),%xmm0
mov    0x25f4(%rip),%rax
mulsd  (%rax),%xmm0
mulsd  -0x20(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   10c0 <cexp@plt>
movsd  -0xd8(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   10b0 <cimag@plt>
movaps %xmm0,%xmm1
movsd  -0xd0(%rbp),%xmm0
ff
call   1110 <check@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mov    $0xa,%edi
mov    $0x9,%esi
call   10a0 <SphericalHarmonics@plt>
cvttsd2si %xmm0,%edi
call   1070 <creal@plt>
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0x59f(%rip),%xmm0
call   1060 <acos@plt>
mov    %eax,%ecx
mov    $0x4a00b5,%eax
cltd
idiv   %ecx
mov    %eax,%edi
call   1120 <sqrt@plt>
cvtsi2sd %eax,%xmm1
movsd  0x5cd(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1090 <sin@plt>
mov    %eax,%edi
mov    $0x9,%esi
call   1100 <pow@plt>
movsd  -0xc8(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   10f0 <cos@plt>
movsd  -0xc0(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  0x561(%rip),%xmm0
mov    0x24fa(%rip),%rax
mulsd  (%rax),%xmm0
mulsd  -0x20(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   10c0 <cexp@plt>
movsd  -0xb8(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1070 <creal@plt>
movaps %xmm0,%xmm1
movsd  -0xb0(%rbp),%xmm0
ff
call   1110 <check@plt>
movsd  0x50f(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    163d <main+0x42d>
jmp    1b45 <main+0x935>
movsd  0x4f3(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1605 <main+0x3f5>
movl   $0x0,-0x8(%rbp)
cmpl   $0xb,-0x8(%rbp)
jge    1d0b <main+0xafb>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
movsd  0x476(%rip),%xmm0
call   1060 <acos@plt>
movsd  -0x140(%rbp),%xmm1
ff
cvtsi2sd %eax,%xmm0
ucomisd %xmm1,%xmm0
jb     1cf8 <main+0xae8>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x148(%rbp)
ff
movsd  0x43e(%rip),%xmm0
call   1060 <acos@plt>
movsd  -0x148(%rbp),%xmm1
ff
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
ucomisd %xmm1,%xmm0
jb     1cdc <main+0xacc>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1c5e <main+0xa4e>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   10a0 <SphericalHarmonics@plt>
call   1040 <conj@plt>
movsd  %xmm0,-0x150(%rbp)
ff
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   10a0 <SphericalHarmonics@plt>
movaps %xmm0,%xmm2
movsd  -0x150(%rbp),%xmm0
ff
movsd  -0x28(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1bf0 <main+0x9e0>
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x160(%rbp)
ff
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
mov    %eax,-0x154(%rbp)
movsd  0x37e(%rip),%xmm0
call   1060 <acos@plt>
movsd  -0x160(%rbp),%xmm0
ff
mov    %eax,%ecx
mov    -0x154(%rbp),%eax
shl    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm1
call   1110 <check@plt>
cmp    $0x0,%eax
jne    1cc0 <main+0xab0>
mov    -0x8(%rbp),%esi
lea    0x466(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1cc5 <main+0xab5>
movsd  0x36b(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1bad <main+0x99d>
jmp    1ce1 <main+0xad1>
movsd  0x34f(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1b75 <main+0x965>
jmp    1cfd <main+0xaed>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1b63 <main+0x953>
lea    0x410(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x40(%rbp),%rdx
lea    -0x50(%rbp),%rcx
mov    $0xa,%edi
mov    $0x5,%esi
call   10e0 <a@plt>
mov    %eax,%edi
call   1070 <creal@plt>
movsd  0x2f1(%rip),%xmm1
call   1110 <check@plt>
lea    0x405(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x40(%rbp),%rsi
lea    -0x50(%rbp),%rdx
mov    $0x5,%edi
call   10d0 <C@plt>
movsd  0x2bc(%rip),%xmm1
call   1110 <check@plt>
lea    -0x40(%rbp),%rsi
lea    -0x50(%rbp),%rdx
mov    $0x9,%edi
call   10d0 <C@plt>
movsd  0x29d(%rip),%xmm1
call   1110 <check@plt>
xor    %eax,%eax
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
movaps 0xe8b(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movapd 0xe8e(%rip),%xmm0
movapd %xmm0,0x20(%rsp)
lea    0xe94(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <factorial@plt>
movsd  0xd9d(%rip),%xmm1
call   1120 <check@plt>
mov    $0x1,%edi
call   1040 <factorial@plt>
movsd  0xd86(%rip),%xmm1
call   1120 <check@plt>
mov    $0xa,%edi
call   1040 <factorial@plt>
movsd  0xd77(%rip),%xmm1
call   1120 <check@plt>
mov    $0xf,%edi
call   1040 <factorial@plt>
movsd  0xd68(%rip),%xmm1
call   1120 <check@plt>
mov    $0x12,%edi
call   1040 <factorial@plt>
movsd  0xd59(%rip),%xmm1
call   1120 <check@plt>
mov    $0x5,%edi
mov    $0xf,%esi
call   1140 <shortfactorial@plt>
movsd  %xmm0,(%rsp)
mov    $0x5,%edi
call   1040 <factorial@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0xf,%edi
call   1040 <factorial@plt>
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  (%rsp),%xmm0
call   1120 <check@plt>
lea    0xde9(%rip),%rdi
call   1030 <puts@plt>
movsd  0xd06(%rip),%xmm0
nopw   0x0(%rax,%rax,1)
movsd  %xmm0,(%rsp)
xor    %edi,%edi
xor    %esi,%esi
movsd  (%rsp),%xmm0
call   1090 <AssociatedLegendreP@plt>
movsd  0xcc5(%rip),%xmm1
call   1120 <check@plt>
mov    $0x1,%edi
xor    %esi,%esi
movsd  (%rsp),%xmm0
call   1090 <AssociatedLegendreP@plt>
movsd  (%rsp),%xmm1
call   1120 <check@plt>
mov    $0x1,%edi
mov    $0x1,%esi
movsd  (%rsp),%xmm0
call   1090 <AssociatedLegendreP@plt>
movsd  %xmm0,0x8(%rsp)
cvttsd2si (%rsp),%ebx
mov    %ebx,%edi
mov    $0x2,%esi
call   1110 <pow@plt>
mov    $0x1,%edi
sub    %eax,%edi
xor    %esi,%esi
call   1110 <pow@plt>
neg    %eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x8(%rsp),%xmm0
call   1120 <check@plt>
mov    $0x4,%edi
mov    $0x4,%esi
movsd  (%rsp),%xmm0
call   1090 <AssociatedLegendreP@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
mulsd  %xmm0,%xmm0
movsd  0xc2d(%rip),%xmm1
subsd  %xmm0,%xmm1
cvttsd2si %xmm1,%ebp
mov    %ebp,%edi
mov    $0x2,%esi
call   1110 <pow@plt>
imul   $0x69,%eax,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x8(%rsp),%xmm0
call   1120 <check@plt>
mov    $0x4,%edi
mov    $0x1,%esi
movsd  (%rsp),%xmm0
call   1090 <AssociatedLegendreP@plt>
movsd  %xmm0,0x18(%rsp)
mov    %ebx,%edi
mov    $0x3,%esi
call   1110 <pow@plt>
lea    0x0(,%rax,8),%ecx
sub    %eax,%ecx
xorps  %xmm1,%xmm1
cvtsi2sd %ecx,%xmm1
movsd  (%rsp),%xmm0
mulsd  0xbe9(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
addsd  %xmm0,%xmm1
mulsd  0xbdf(%rip),%xmm1
movsd  %xmm1,0x10(%rsp)
mov    %ebp,%edi
call   1130 <sqrt@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm0
call   1120 <check@plt>
mov    $0x4,%edi
mov    $0xffffffff,%esi
movsd  (%rsp),%xmm0
call   1090 <AssociatedLegendreP@plt>
movsd  %xmm0,0x18(%rsp)
mov    $0x4,%edi
mov    $0x1,%esi
movsd  (%rsp),%xmm0
call   1090 <AssociatedLegendreP@plt>
movapd %xmm0,%xmm1
mulsd  0xb88(%rip),%xmm1
movsd  0x18(%rsp),%xmm0
call   1120 <check@plt>
mov    $0x4,%edi
mov    $0xffffffff,%esi
movsd  (%rsp),%xmm0
call   1090 <AssociatedLegendreP@plt>
movsd  %xmm0,0x18(%rsp)
mov    %ebx,%edi
mov    $0x3,%esi
call   1110 <pow@plt>
lea    0x0(,%rax,8),%ecx
sub    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
addsd  0x8(%rsp),%xmm0
mulsd  0xb41(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %ebp,%edi
xor    %esi,%esi
call   1110 <pow@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  0x8(%rsp),%xmm1
movsd  0x18(%rsp),%xmm0
call   1120 <check@plt>
movsd  (%rsp),%xmm0
addsd  0xb15(%rip),%xmm0
movsd  0xac5(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1320 <main+0x100>
lea    0xbc7(%rip),%rdi
call   1030 <puts@plt>
movsd  0xac7(%rip),%xmm0
call   1070 <acos@plt>
test   %eax,%eax
js     1a5f <main+0x83f>
xorpd  %xmm1,%xmm1
movsd  0xaae(%rip),%xmm0
xor    %r14d,%r14d
mov    0x2a6c(%rip),%rbp
jmp    15bd <main+0x39d>
xchg   %ax,%ax
movsd  (%rsp),%xmm0
addsd  0xac3(%rip),%xmm0
movsd  %xmm0,(%rsp)
movsd  0xa86(%rip),%xmm0
call   1070 <acos@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  (%rsp),%xmm1
ucomisd %xmm1,%xmm0
movsd  0xa69(%rip),%xmm0
jb     1a5f <main+0x83f>
movsd  %xmm1,(%rsp)
call   1070 <acos@plt>
test   %eax,%eax
js     1580 <main+0x360>
xorpd  %xmm1,%xmm1
nop
movsd  %xmm1,0x8(%rsp)
xor    %edi,%edi
xor    %esi,%esi
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   10b0 <SphericalHarmonics@plt>
cvttsd2si %xmm0,%edi
call   1080 <creal@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0xa1f(%rip),%xmm0
call   1070 <acos@plt>
lea    0x1(%rax),%ecx
cmp    $0x3,%ecx
cmovae %r14d,%eax
mov    %eax,%edi
call   1130 <sqrt@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0xa2a(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0x18(%rsp),%xmm0
call   1120 <check@plt>
mov    $0x1,%edi
mov    $0xffffffff,%esi
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   10b0 <SphericalHarmonics@plt>
cvttsd2si %xmm0,%edi
call   1080 <creal@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x9ba(%rip),%xmm0
call   1070 <acos@plt>
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x9dc(%rip),%xmm1
divsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
call   1130 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x9b8(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
call   10a0 <sin@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x0(%rbp),%xmm0
xorpd  0x9e8(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   10d0 <cexp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1080 <creal@plt>
movapd %xmm0,%xmm1
movsd  0x18(%rsp),%xmm0
call   1120 <check@plt>
mov    $0x2,%edi
xor    %esi,%esi
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   10b0 <SphericalHarmonics@plt>
cvttsd2si %xmm0,%edi
call   1080 <creal@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x8f6(%rip),%xmm0
call   1070 <acos@plt>
mov    %eax,%ecx
mov    $0x5,%eax
xor    %edx,%edx
idiv   %ecx
mov    %eax,%edi
call   1130 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x910(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
call   1100 <cos@plt>
mov    %eax,%ebx
movsd  (%rsp),%xmm0
call   1100 <cos@plt>
imul   %ebx,%eax
lea    (%rax,%rax,2),%eax
add    $0xffffffff,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm0
call   1120 <check@plt>
mov    $0x5,%edi
mov    $0xfffffffc,%esi
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   10b0 <SphericalHarmonics@plt>
cvttsd2si %xmm0,%edi
call   10c0 <cimag@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x862(%rip),%xmm0
call   1070 <acos@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0x181,%eax
xor    %edx,%edx
idiv   %ecx
mov    %eax,%edi
call   1130 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x882(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
call   10a0 <sin@plt>
mov    %eax,%edi
mov    $0x4,%esi
call   1110 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
call   1100 <cos@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x0(%rbp),%xmm0
mulsd  0x831(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   10d0 <cexp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   10c0 <cimag@plt>
movapd %xmm0,%xmm1
movsd  0x18(%rsp),%xmm0
call   1120 <check@plt>
mov    $0x7,%edi
mov    $0x7,%esi
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   10b0 <SphericalHarmonics@plt>
cvttsd2si %xmm0,%edi
call   10c0 <cimag@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x77c(%rip),%xmm0
call   1070 <acos@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0x2cb,%eax
xor    %edx,%edx
idiv   %ecx
mov    %eax,%edi
call   1130 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x7ac(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
call   10a0 <sin@plt>
mov    %eax,%edi
mov    $0x7,%esi
call   1110 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x0(%rbp),%xmm0
mulsd  0x778(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   10d0 <cexp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   10c0 <cimag@plt>
movapd %xmm0,%xmm1
movsd  0x18(%rsp),%xmm0
call   1120 <check@plt>
mov    $0xa,%edi
mov    $0x9,%esi
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   10b0 <SphericalHarmonics@plt>
cvttsd2si %xmm0,%edi
call   1080 <creal@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x6b3(%rip),%xmm0
call   1070 <acos@plt>
mov    %eax,%ecx
mov    $0x4a00b5,%eax
xor    %edx,%edx
idiv   %ecx
mov    %eax,%edi
call   1130 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x6f5(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
call   10a0 <sin@plt>
mov    %eax,%edi
mov    $0x9,%esi
call   1110 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
call   1100 <cos@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x0(%rbp),%xmm0
mulsd  0x6a4(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   10d0 <cexp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1080 <creal@plt>
movapd %xmm0,%xmm1
movsd  0x18(%rsp),%xmm0
call   1120 <check@plt>
movsd  0x8(%rsp),%xmm0
addsd  0x622(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x5e4(%rip),%xmm0
call   1070 <acos@plt>
movsd  0x8(%rsp),%xmm1
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
ucomisd %xmm1,%xmm0
jae    15d0 <main+0x3b0>
jmp    1580 <main+0x360>
mov    $0x1,%r14d
movsd  0x5b3(%rip),%xmm0
xor    %ebx,%ebx
jmp    1a98 <main+0x878>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebx
add    $0x2,%r14d
cmp    $0xb,%ebx
movsd  0x58e(%rip),%xmm0
je     1c09 <main+0x9e9>
call   1070 <acos@plt>
test   %eax,%eax
js     1a80 <main+0x860>
mov    %ebx,%r13d
neg    %r13d
lea    (%rbx,%rbx,1),%r15d
add    $0x1,%r15d
xorpd  %xmm0,%xmm0
jmp    1af8 <main+0x8d8>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  0x18(%rsp),%xmm0
addsd  0x57a(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x544(%rip),%xmm0
call   1070 <acos@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x18(%rsp),%xmm1
ucomisd %xmm1,%xmm0
movapd %xmm1,%xmm0
jb     1a80 <main+0x860>
movsd  %xmm0,0x18(%rsp)
movsd  0x51a(%rip),%xmm0
call   1070 <acos@plt>
test   %eax,%eax
js     1ac0 <main+0x8a0>
xorpd  %xmm0,%xmm0
jmp    1b5b <main+0x93b>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rsp),%xmm0
addsd  0x51b(%rip),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x4e6(%rip),%xmm0
call   1070 <acos@plt>
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  (%rsp),%xmm1
ucomisd %xmm1,%xmm0
movapd %xmm1,%xmm0
jb     1ac0 <main+0x8a0>
movsd  %xmm0,(%rsp)
mov    %r14d,%r12d
xorpd  %xmm1,%xmm1
movsd  %xmm1,0x8(%rsp)
mov    %r13d,%ebp
mov    %ebx,%edi
mov    %ebp,%esi
movsd  0x18(%rsp),%xmm0
movsd  (%rsp),%xmm1
call   10b0 <SphericalHarmonics@plt>
call   1050 <conj@plt>
movsd  %xmm0,0x10(%rsp)
mov    %ebx,%edi
mov    %ebp,%esi
movsd  0x18(%rsp),%xmm0
movsd  (%rsp),%xmm1
call   10b0 <SphericalHarmonics@plt>
mulsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
add    $0x1,%ebp
add    $0xffffffff,%r12d
jne    1b70 <main+0x950>
movsd  0x456(%rip),%xmm0
call   1070 <acos@plt>
mov    %eax,%ecx
shl    $0x2,%ecx
mov    %r15d,%eax
cltd
idiv   %ecx
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x8(%rsp),%xmm0
call   1120 <check@plt>
test   %eax,%eax
jne    1b20 <main+0x900>
lea    0x4e5(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    1b20 <main+0x900>
lea    0x51f(%rip),%rdi
call   1030 <puts@plt>
lea    0x30(%rsp),%rbx
lea    0x20(%rsp),%rbp
mov    $0xa,%edi
mov    $0x5,%esi
mov    %rbx,%rdx
mov    %rbp,%rcx
call   10f0 <a@plt>
mov    %eax,%edi
call   1080 <creal@plt>
movsd  0x455(%rip),%xmm1
call   1120 <check@plt>
lea    0x50d(%rip),%rdi
call   1030 <puts@plt>
mov    $0x5,%edi
mov    %rbx,%rsi
mov    %rbp,%rdx
call   10e0 <C@plt>
movsd  0x434(%rip),%xmm1
call   1120 <check@plt>
mov    $0x9,%edi
mov    %rbx,%rsi
mov    %rbp,%rdx
call   10e0 <C@plt>
movsd  0x417(%rip),%xmm1
call   1120 <check@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.theta = [2 x double] [double 1.000000e+00, double 1.000000e-01]
@__const.main.phi = [2 x double] [double 1.000000e+00, double 0.000000e+00]
@.str = [20 x i8] c"(1) Test factorial\0A\00"
@.str.1 = [30 x i8] c"(2) Test AssociatedLegenderP\0A\00"
@.str.2 = [29 x i8] c"(3) Test SphericalHarmonics\0A\00"
@I = global double 0.000000e+00
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [46 x i8] c"(4) Test Coefficients of Harmonics expansion\0A\00"
@.str.5 = [35 x i8] c"(5) Test power spectrum expansion\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca [2 x double]
%8 = alloca [2 x double]
store i32 0, i32* %1
%9 = bitcast [2 x double]* %7 to i8*
%10 = bitcast [2 x double]* %8 to i8*
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%12 = call double @factorial(i32 0)
%13 = call i32 @check(double %12, double 1.000000e+00)
%14 = call double @factorial(i32 1)
%15 = call i32 @check(double %14, double 1.000000e+00)
%16 = call double @factorial(i32 10)
%17 = call i32 @check(double %16, double 3.628800e+06)
%18 = call double @factorial(i32 15)
%19 = call i32 @check(double %18, double 0x4273077775800000)
%20 = call double @factorial(i32 18)
%21 = call i32 @check(double %20, double 0x4336BEECCA730000)
store i32 10, i32* %2
store i32 5, i32* %3
%22 = load i32, i32* %2
%23 = load i32, i32* %3
%24 = sub nsw i32 %22, %23
%25 = load i32, i32* %2
%26 = load i32, i32* %3
%27 = add nsw i32 %25, %26
%28 = call double @shortfactorial(i32 %24, i32 %27)
%29 = load i32, i32* %2
%30 = load i32, i32* %3
%31 = sub nsw i32 %29, %30
%32 = call double @factorial(i32 %31)
%33 = load i32, i32* %2
%34 = load i32, i32* %3
%35 = add nsw i32 %33, %34
%36 = call double @factorial(i32 %35)
%37 = fdiv double %32, %36
%38 = call i32 @check(double %28, double %37)
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
store double -1.000000e+00, double* %4
br label %40
40: ; preds = %116, %0
%41 = load double, double* %4
%42 = fcmp ole double %41, 1.000000e+00
br i1 %42, label %43, label %119
43: ; preds = %40
%44 = load double, double* %4
%45 = call double @AssociatedLegendreP(i32 0, i32 0, double %44)
%46 = call i32 @check(double %45, double 1.000000e+00)
%47 = load double, double* %4
%48 = call double @AssociatedLegendreP(i32 1, i32 0, double %47)
%49 = load double, double* %4
%50 = call i32 @check(double %48, double %49)
%51 = load double, double* %4
%52 = call double @AssociatedLegendreP(i32 1, i32 1, double %51)
%53 = load double, double* %4
%54 = fptosi double %53 to i32
%55 = call i32 @pow(i32 %54, i32 2)
%56 = sub nsw i32 1, %55
%57 = call i32 @pow(i32 %56, i32 0)
%58 = mul nsw i32 -1, %57
%59 = sitofp i32 %58 to double
%60 = call i32 @check(double %52, double %59)
%61 = load double, double* %4
%62 = call double @AssociatedLegendreP(i32 4, i32 4, double %61)
%63 = load double, double* %4
%64 = load double, double* %4
%65 = fneg double %63
%66 = call double @llvm.fmuladd.f64(double %65, double %64, double 1.000000e+00)
%67 = fptosi double %66 to i32
%68 = call i32 @pow(i32 %67, i32 2)
%69 = mul nsw i32 105, %68
%70 = sitofp i32 %69 to double
%71 = call i32 @check(double %62, double %70)
%72 = load double, double* %4
%73 = call double @AssociatedLegendreP(i32 4, i32 1, double %72)
%74 = load double, double* %4
%75 = fptosi double %74 to i32
%76 = call i32 @pow(i32 %75, i32 3)
%77 = mul nsw i32 7, %76
%78 = sitofp i32 %77 to double
%79 = load double, double* %4
%80 = call double @llvm.fmuladd.f64(double -3.000000e+00, double %79, double %78)
%81 = fmul double -2.500000e+00, %80
%82 = load double, double* %4
%83 = load double, double* %4
%84 = fneg double %82
%85 = call double @llvm.fmuladd.f64(double %84, double %83, double 1.000000e+00)
%86 = fptosi double %85 to i32
%87 = call i32 @sqrt(i32 %86)
%88 = sitofp i32 %87 to double
%89 = fmul double %81, %88
%90 = call i32 @check(double %73, double %89)
%91 = load double, double* %4
%92 = call double @AssociatedLegendreP(i32 4, i32 -1, double %91)
%93 = load double, double* %4
%94 = call double @AssociatedLegendreP(i32 4, i32 1, double %93)
%95 = fmul double -5.000000e-02, %94
%96 = call i32 @check(double %92, double %95)
%97 = load double, double* %4
%98 = call double @AssociatedLegendreP(i32 4, i32 -1, double %97)
%99 = load double, double* %4
%100 = fptosi double %99 to i32
%101 = call i32 @pow(i32 %100, i32 3)
%102 = mul nsw i32 7, %101
%103 = sitofp i32 %102 to double
%104 = load double, double* %4
%105 = call double @llvm.fmuladd.f64(double -3.000000e+00, double %104, double %103)
%106 = fmul double 1.250000e-01, %105
%107 = load double, double* %4
%108 = load double, double* %4
%109 = fneg double %107
%110 = call double @llvm.fmuladd.f64(double %109, double %108, double 1.000000e+00)
%111 = fptosi double %110 to i32
%112 = call i32 @pow(i32 %111, i32 0)
%113 = sitofp i32 %112 to double
%114 = fmul double %106, %113
%115 = call i32 @check(double %98, double %114)
br label %116
116: ; preds = %43
%117 = load double, double* %4
%118 = fadd double %117, 1.000000e-01
store double %118, double* %4
br label %40
119: ; preds = %40
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
store double 0.000000e+00, double* %4
br label %121
121: ; preds = %285, %119
%122 = load double, double* %4
%123 = call i32 @acos(double -1.000000e+00)
%124 = sitofp i32 %123 to double
%125 = fcmp ole double %122, %124
br i1 %125, label %126, label %288
126: ; preds = %121
store double 0.000000e+00, double* %5
br label %127
127: ; preds = %281, %126
%128 = load double, double* %5
%129 = call i32 @acos(double -1.000000e+00)
%130 = mul nsw i32 2, %129
%131 = sitofp i32 %130 to double
%132 = fcmp ole double %128, %131
br i1 %132, label %133, label %284
133: ; preds = %127
%134 = load double, double* %4
%135 = load double, double* %5
%136 = call double @SphericalHarmonics(i32 0, i32 0, double %134, double %135)
%137 = fptosi double %136 to i32
%138 = call double @creal(i32 %137)
%139 = call i32 @acos(double -1.000000e+00)
%140 = sdiv i32 1, %139
%141 = call i32 @sqrt(i32 %140)
%142 = sitofp i32 %141 to double
%143 = fmul double 5.000000e-01, %142
%144 = call i32 @check(double %138, double %143)
%145 = load double, double* %4
%146 = load double, double* %5
%147 = call double @SphericalHarmonics(i32 1, i32 -1, double %145, double %146)
%148 = fptosi double %147 to i32
%149 = call double @creal(i32 %148)
%150 = call i32 @acos(double -1.000000e+00)
%151 = mul nsw i32 2, %150
%152 = sitofp i32 %151 to double
%153 = fdiv double 3.000000e+00, %152
%154 = fptosi double %153 to i32
%155 = call i32 @sqrt(i32 %154)
%156 = sitofp i32 %155 to double
%157 = fmul double 5.000000e-01, %156
%158 = load double, double* %4
%159 = call i32 @sin(double %158)
%160 = sitofp i32 %159 to double
%161 = fmul double %157, %160
%162 = load double, double* @I
%163 = fneg double %162
%164 = load double, double* %5
%165 = fmul double %163, %164
%166 = fptosi double %165 to i32
%167 = call i32 @cexp(i32 %166)
%168 = sitofp i32 %167 to double
%169 = fmul double %161, %168
%170 = fptosi double %169 to i32
%171 = call double @creal(i32 %170)
%172 = call i32 @check(double %149, double %171)
%173 = load double, double* %4
%174 = load double, double* %5
%175 = call double @SphericalHarmonics(i32 2, i32 0, double %173, double %174)
%176 = fptosi double %175 to i32
%177 = call double @creal(i32 %176)
%178 = call i32 @acos(double -1.000000e+00)
%179 = sdiv i32 5, %178
%180 = call i32 @sqrt(i32 %179)
%181 = sitofp i32 %180 to double
%182 = fmul double 2.500000e-01, %181
%183 = load double, double* %4
%184 = call i32 @cos(double %183)
%185 = mul nsw i32 3, %184
%186 = load double, double* %4
%187 = call i32 @cos(double %186)
%188 = mul nsw i32 %185, %187
%189 = sub nsw i32 %188, 1
%190 = sitofp i32 %189 to double
%191 = fmul double %182, %190
%192 = call i32 @check(double %177, double %191)
%193 = load double, double* %4
%194 = load double, double* %5
%195 = call double @SphericalHarmonics(i32 5, i32 -4, double %193, double %194)
%196 = fptosi double %195 to i32
%197 = call double @cimag(i32 %196)
%198 = call i32 @acos(double -1.000000e+00)
%199 = mul nsw i32 2, %198
%200 = sdiv i32 385, %199
%201 = call i32 @sqrt(i32 %200)
%202 = sitofp i32 %201 to double
%203 = fmul double 1.875000e-01, %202
%204 = load double, double* %4
%205 = call i32 @sin(double %204)
%206 = call i32 @pow(i32 %205, i32 4)
%207 = sitofp i32 %206 to double
%208 = fmul double %203, %207
%209 = load double, double* %4
%210 = call i32 @cos(double %209)
%211 = sitofp i32 %210 to double
%212 = fmul double %208, %211
%213 = load double, double* @I
%214 = fmul double -4.000000e+00, %213
%215 = load double, double* %5
%216 = fmul double %214, %215
%217 = fptosi double %216 to i32
%218 = call i32 @cexp(i32 %217)
%219 = sitofp i32 %218 to double
%220 = fmul double %212, %219
%221 = fptosi double %220 to i32
%222 = call double @cimag(i32 %221)
%223 = call i32 @check(double %197, double %222)
%224 = load double, double* %4
%225 = load double, double* %5
%226 = call double @SphericalHarmonics(i32 7, i32 7, double %224, double %225)
%227 = fptosi double %226 to i32
%228 = call double @cimag(i32 %227)
%229 = call i32 @acos(double -1.000000e+00)
%230 = mul nsw i32 2, %229
%231 = sdiv i32 715, %230
%232 = call i32 @sqrt(i32 %231)
%233 = sitofp i32 %232 to double
%234 = fmul double -4.687500e-02, %233
%235 = load double, double* %4
%236 = call i32 @sin(double %235)
%237 = call i32 @pow(i32 %236, i32 7)
%238 = sitofp i32 %237 to double
%239 = fmul double %234, %238
%240 = load double, double* @I
%241 = fmul double 7.000000e+00, %240
%242 = load double, double* %5
%243 = fmul double %241, %242
%244 = fptosi double %243 to i32
%245 = call i32 @cexp(i32 %244)
%246 = sitofp i32 %245 to double
%247 = fmul double %239, %246
%248 = fptosi double %247 to i32
%249 = call double @cimag(i32 %248)
%250 = call i32 @check(double %228, double %249)
%251 = load double, double* %4
%252 = load double, double* %5
%253 = call double @SphericalHarmonics(i32 10, i32 9, double %251, double %252)
%254 = fptosi double %253 to i32
%255 = call double @creal(i32 %254)
%256 = call i32 @acos(double -1.000000e+00)
%257 = sdiv i32 4849845, %256
%258 = call i32 @sqrt(i32 %257)
%259 = sitofp i32 %258 to double
%260 = fmul double 0xBF60000000000000, %259
%261 = load double, double* %4
%262 = call i32 @sin(double %261)
%263 = call i32 @pow(i32 %262, i32 9)
%264 = sitofp i32 %263 to double
%265 = fmul double %260, %264
%266 = load double, double* %4
%267 = call i32 @cos(double %266)
%268 = sitofp i32 %267 to double
%269 = fmul double %265, %268
%270 = load double, double* @I
%271 = fmul double 9.000000e+00, %270
%272 = load double, double* %5
%273 = fmul double %271, %272
%274 = fptosi double %273 to i32
%275 = call i32 @cexp(i32 %274)
%276 = sitofp i32 %275 to double
%277 = fmul double %269, %276
%278 = fptosi double %277 to i32
%279 = call double @creal(i32 %278)
%280 = call i32 @check(double %255, double %279)
br label %281
281: ; preds = %133
%282 = load double, double* %5
%283 = fadd double %282, 5.000000e-01
store double %283, double* %5
br label %127
284: ; preds = %127
br label %285
285: ; preds = %284
%286 = load double, double* %4
%287 = fadd double %286, 5.000000e-01
store double %287, double* %4
br label %121
288: ; preds = %121
store i32 0, i32* %2
br label %289
289: ; preds = %352, %288
%290 = load i32, i32* %2
%291 = icmp slt i32 %290, 11
br i1 %291, label %292, label %355
292: ; preds = %289
store double 0.000000e+00, double* %4
br label %293
293: ; preds = %348, %292
%294 = load double, double* %4
%295 = call i32 @acos(double -1.000000e+00)
%296 = sitofp i32 %295 to double
%297 = fcmp ole double %294, %296
br i1 %297, label %298, label %351
298: ; preds = %293
store double 0.000000e+00, double* %5
br label %299
299: ; preds = %344, %298
%300 = load double, double* %5
%301 = call i32 @acos(double -1.000000e+00)
%302 = mul nsw i32 2, %301
%303 = sitofp i32 %302 to double
%304 = fcmp ole double %300, %303
br i1 %304, label %305, label %347
305: ; preds = %299
store double 0.000000e+00, double* %6
%306 = load i32, i32* %2
%307 = sub nsw i32 0, %306
store i32 %307, i32* %3
br label %308
308: ; preds = %326, %305
%309 = load i32, i32* %3
%310 = load i32, i32* %2
%311 = icmp sle i32 %309, %310
br i1 %311, label %312, label %329
312: ; preds = %308
%313 = load i32, i32* %2
%314 = load i32, i32* %3
%315 = load double, double* %4
%316 = load double, double* %5
%317 = call double @SphericalHarmonics(i32 %313, i32 %314, double %315, double %316)
%318 = call double @conj(double %317)
%319 = load i32, i32* %2
%320 = load i32, i32* %3
%321 = load double, double* %4
%322 = load double, double* %5
%323 = call double @SphericalHarmonics(i32 %319, i32 %320, double %321, double %322)
%324 = load double, double* %6
%325 = call double @llvm.fmuladd.f64(double %318, double %323, double %324)
store double %325, double* %6
br label %326
326: ; preds = %312
%327 = load i32, i32* %3
%328 = add nsw i32 %327, 1
store i32 %328, i32* %3
br label %308
329: ; preds = %308
%330 = load double, double* %6
%331 = load i32, i32* %2
%332 = mul nsw i32 2, %331
%333 = add nsw i32 %332, 1
%334 = call i32 @acos(double -1.000000e+00)
%335 = mul nsw i32 4, %334
%336 = sdiv i32 %333, %335
%337 = sitofp i32 %336 to double
%338 = call i32 @check(double %330, double %337)
%339 = icmp ne i32 %338, 0
br i1 %339, label %343, label %340
340: ; preds = %329
%341 = load i32, i32* %2
%342 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %341)
br label %343
343: ; preds = %340, %329
br label %344
344: ; preds = %343
%345 = load double, double* %5
%346 = fadd double %345, 1.000000e-01
store double %346, double* %5
br label %299
347: ; preds = %299
br label %348
348: ; preds = %347
%349 = load double, double* %4
%350 = fadd double %349, 1.000000e-01
store double %350, double* %4
br label %293
351: ; preds = %293
br label %352
352: ; preds = %351
%353 = load i32, i32* %2
%354 = add nsw i32 %353, 1
store i32 %354, i32* %2
br label %289
355: ; preds = %289
%356 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.4, i64 0, i64 0))
%357 = getelementptr inbounds [2 x double], [2 x double]* %7, i64 0, i64 0
%358 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 0
%359 = call i32 @a(i32 10, i32 5, double* %357, double* %358)
%360 = call double @creal(i32 %359)
%361 = call i32 @check(double %360, double -3.370400e-04)
%362 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0))
%363 = getelementptr inbounds [2 x double], [2 x double]* %7, i64 0, i64 0
%364 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 0
%365 = call double @C(i32 5, double* %363, double* %364)
%366 = call i32 @check(double %365, double 0x3FB45F30E7FF583A)
%367 = getelementptr inbounds [2 x double], [2 x double]* %7, i64 0, i64 0
%368 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 0
%369 = call double @C(i32 9, double* %367, double* %368)
%370 = call i32 @check(double %369, double 0x3FB45F30E7FF583A)
ret i32 0
}

LLVM IR (-O2):
@__const.main.theta = [2 x double] [double 1.000000e+00, double 1.000000e-01]
@__const.main.phi = [2 x double] [double 1.000000e+00, double 0.000000e+00]
@I = global double 0.000000e+00
@.str.3 = [3 x i8] c"%d\00"
@str = [19 x i8] c"(1) Test factorial\00"
@str.6 = [29 x i8] c"(2) Test AssociatedLegenderP\00"
@str.7 = [28 x i8] c"(3) Test SphericalHarmonics\00"
@str.8 = [45 x i8] c"(4) Test Coefficients of Harmonics expansion\00"
@str.9 = [34 x i8] c"(5) Test power spectrum expansion\00"
define i32 @main() {
%1 = alloca [2 x double]
%2 = alloca [2 x double]
%3 = bitcast [2 x double]* %1 to i8*
%4 = bitcast [2 x double]* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%6 = tail call double @factorial(i32 0)
%7 = tail call i32 @check(double %6, double 1.000000e+00)
%8 = tail call double @factorial(i32 1)
%9 = tail call i32 @check(double %8, double 1.000000e+00)
%10 = tail call double @factorial(i32 10)
%11 = tail call i32 @check(double %10, double 3.628800e+06)
%12 = tail call double @factorial(i32 15)
%13 = tail call i32 @check(double %12, double 0x4273077775800000)
%14 = tail call double @factorial(i32 18)
%15 = tail call i32 @check(double %14, double 0x4336BEECCA730000)
%16 = tail call double @shortfactorial(i32 5, i32 15)
%17 = tail call double @factorial(i32 5)
%18 = tail call double @factorial(i32 15)
%19 = fdiv double %17, %18
%20 = tail call i32 @check(double %16, double %19)
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.6, i64 0, i64 0))
br label %22
22: ; preds = %0, %22
%23 = phi double [ -1.000000e+00, %0 ], [ %68, %22 ]
%24 = tail call double @AssociatedLegendreP(i32 0, i32 0, double %23)
%25 = tail call i32 @check(double %24, double 1.000000e+00)
%26 = tail call double @AssociatedLegendreP(i32 1, i32 0, double %23)
%27 = tail call i32 @check(double %26, double %23)
%28 = tail call double @AssociatedLegendreP(i32 1, i32 1, double %23)
%29 = fptosi double %23 to i32
%30 = tail call i32 @pow(i32 %29, i32 2)
%31 = sub nsw i32 1, %30
%32 = tail call i32 @pow(i32 %31, i32 0)
%33 = sub nsw i32 0, %32
%34 = sitofp i32 %33 to double
%35 = tail call i32 @check(double %28, double %34)
%36 = tail call double @AssociatedLegendreP(i32 4, i32 4, double %23)
%37 = fneg double %23
%38 = tail call double @llvm.fmuladd.f64(double %37, double %23, double 1.000000e+00)
%39 = fptosi double %38 to i32
%40 = tail call i32 @pow(i32 %39, i32 2)
%41 = mul nsw i32 %40, 105
%42 = sitofp i32 %41 to double
%43 = tail call i32 @check(double %36, double %42)
%44 = tail call double @AssociatedLegendreP(i32 4, i32 1, double %23)
%45 = tail call i32 @pow(i32 %29, i32 3)
%46 = mul nsw i32 %45, 7
%47 = sitofp i32 %46 to double
%48 = tail call double @llvm.fmuladd.f64(double %23, double -3.000000e+00, double %47)
%49 = fmul double %48, -2.500000e+00
%50 = tail call i32 @sqrt(i32 %39)
%51 = sitofp i32 %50 to double
%52 = fmul double %49, %51
%53 = tail call i32 @check(double %44, double %52)
%54 = tail call double @AssociatedLegendreP(i32 4, i32 -1, double %23)
%55 = tail call double @AssociatedLegendreP(i32 4, i32 1, double %23)
%56 = fmul double %55, -5.000000e-02
%57 = tail call i32 @check(double %54, double %56)
%58 = tail call double @AssociatedLegendreP(i32 4, i32 -1, double %23)
%59 = tail call i32 @pow(i32 %29, i32 3)
%60 = mul nsw i32 %59, 7
%61 = sitofp i32 %60 to double
%62 = tail call double @llvm.fmuladd.f64(double %23, double -3.000000e+00, double %61)
%63 = fmul double %62, 1.250000e-01
%64 = tail call i32 @pow(i32 %39, i32 0)
%65 = sitofp i32 %64 to double
%66 = fmul double %63, %65
%67 = tail call i32 @check(double %58, double %66)
%68 = fadd double %23, 1.000000e-01
%69 = fcmp ugt double %68, 1.000000e+00
br i1 %69, label %70, label %22
70: ; preds = %22
%71 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.7, i64 0, i64 0))
%72 = tail call i32 @acos(double -1.000000e+00)
%73 = icmp slt i32 %72, 0
br i1 %73, label %215, label %74
74: ; preds = %70, %210
%75 = phi double [ %211, %210 ], [ 0.000000e+00, %70 ]
%76 = tail call i32 @acos(double -1.000000e+00)
%77 = icmp slt i32 %76, 0
br i1 %77, label %210, label %78
78: ; preds = %74, %78
%79 = phi double [ %205, %78 ], [ 0.000000e+00, %74 ]
%80 = tail call double @SphericalHarmonics(i32 0, i32 0, double %75, double %79)
%81 = fptosi double %80 to i32
%82 = tail call double @creal(i32 %81)
%83 = tail call i32 @acos(double -1.000000e+00)
%84 = add i32 %83, 1
%85 = icmp ult i32 %84, 3
%86 = select i1 %85, i32 %83, i32 0
%87 = tail call i32 @sqrt(i32 %86)
%88 = sitofp i32 %87 to double
%89 = fmul double %88, 5.000000e-01
%90 = tail call i32 @check(double %82, double %89)
%91 = tail call double @SphericalHarmonics(i32 1, i32 -1, double %75, double %79)
%92 = fptosi double %91 to i32
%93 = tail call double @creal(i32 %92)
%94 = tail call i32 @acos(double -1.000000e+00)
%95 = shl nsw i32 %94, 1
%96 = sitofp i32 %95 to double
%97 = fdiv double 3.000000e+00, %96
%98 = fptosi double %97 to i32
%99 = tail call i32 @sqrt(i32 %98)
%100 = sitofp i32 %99 to double
%101 = fmul double %100, 5.000000e-01
%102 = tail call i32 @sin(double %75)
%103 = sitofp i32 %102 to double
%104 = fmul double %101, %103
%105 = load double, double* @I
%106 = fneg double %105
%107 = fmul double %79, %106
%108 = fptosi double %107 to i32
%109 = tail call i32 @cexp(i32 %108)
%110 = sitofp i32 %109 to double
%111 = fmul double %104, %110
%112 = fptosi double %111 to i32
%113 = tail call double @creal(i32 %112)
%114 = tail call i32 @check(double %93, double %113)
%115 = tail call double @SphericalHarmonics(i32 2, i32 0, double %75, double %79)
%116 = fptosi double %115 to i32
%117 = tail call double @creal(i32 %116)
%118 = tail call i32 @acos(double -1.000000e+00)
%119 = sdiv i32 5, %118
%120 = tail call i32 @sqrt(i32 %119)
%121 = sitofp i32 %120 to double
%122 = fmul double %121, 2.500000e-01
%123 = tail call i32 @cos(double %75)
%124 = mul nsw i32 %123, 3
%125 = tail call i32 @cos(double %75)
%126 = mul nsw i32 %124, %125
%127 = add nsw i32 %126, -1
%128 = sitofp i32 %127 to double
%129 = fmul double %122, %128
%130 = tail call i32 @check(double %117, double %129)
%131 = tail call double @SphericalHarmonics(i32 5, i32 -4, double %75, double %79)
%132 = fptosi double %131 to i32
%133 = tail call double @cimag(i32 %132)
%134 = tail call i32 @acos(double -1.000000e+00)
%135 = shl nsw i32 %134, 1
%136 = sdiv i32 385, %135
%137 = tail call i32 @sqrt(i32 %136)
%138 = sitofp i32 %137 to double
%139 = fmul double %138, 1.875000e-01
%140 = tail call i32 @sin(double %75)
%141 = tail call i32 @pow(i32 %140, i32 4)
%142 = sitofp i32 %141 to double
%143 = fmul double %139, %142
%144 = tail call i32 @cos(double %75)
%145 = sitofp i32 %144 to double
%146 = fmul double %143, %145
%147 = load double, double* @I
%148 = fmul double %147, -4.000000e+00
%149 = fmul double %79, %148
%150 = fptosi double %149 to i32
%151 = tail call i32 @cexp(i32 %150)
%152 = sitofp i32 %151 to double
%153 = fmul double %146, %152
%154 = fptosi double %153 to i32
%155 = tail call double @cimag(i32 %154)
%156 = tail call i32 @check(double %133, double %155)
%157 = tail call double @SphericalHarmonics(i32 7, i32 7, double %75, double %79)
%158 = fptosi double %157 to i32
%159 = tail call double @cimag(i32 %158)
%160 = tail call i32 @acos(double -1.000000e+00)
%161 = shl nsw i32 %160, 1
%162 = sdiv i32 715, %161
%163 = tail call i32 @sqrt(i32 %162)
%164 = sitofp i32 %163 to double
%165 = fmul double %164, -4.687500e-02
%166 = tail call i32 @sin(double %75)
%167 = tail call i32 @pow(i32 %166, i32 7)
%168 = sitofp i32 %167 to double
%169 = fmul double %165, %168
%170 = load double, double* @I
%171 = fmul double %170, 7.000000e+00
%172 = fmul double %79, %171
%173 = fptosi double %172 to i32
%174 = tail call i32 @cexp(i32 %173)
%175 = sitofp i32 %174 to double
%176 = fmul double %169, %175
%177 = fptosi double %176 to i32
%178 = tail call double @cimag(i32 %177)
%179 = tail call i32 @check(double %159, double %178)
%180 = tail call double @SphericalHarmonics(i32 10, i32 9, double %75, double %79)
%181 = fptosi double %180 to i32
%182 = tail call double @creal(i32 %181)
%183 = tail call i32 @acos(double -1.000000e+00)
%184 = sdiv i32 4849845, %183
%185 = tail call i32 @sqrt(i32 %184)
%186 = sitofp i32 %185 to double
%187 = fmul double %186, 0xBF60000000000000
%188 = tail call i32 @sin(double %75)
%189 = tail call i32 @pow(i32 %188, i32 9)
%190 = sitofp i32 %189 to double
%191 = fmul double %187, %190
%192 = tail call i32 @cos(double %75)
%193 = sitofp i32 %192 to double
%194 = fmul double %191, %193
%195 = load double, double* @I
%196 = fmul double %195, 9.000000e+00
%197 = fmul double %79, %196
%198 = fptosi double %197 to i32
%199 = tail call i32 @cexp(i32 %198)
%200 = sitofp i32 %199 to double
%201 = fmul double %194, %200
%202 = fptosi double %201 to i32
%203 = tail call double @creal(i32 %202)
%204 = tail call i32 @check(double %182, double %203)
%205 = fadd double %79, 5.000000e-01
%206 = tail call i32 @acos(double -1.000000e+00)
%207 = shl nsw i32 %206, 1
%208 = sitofp i32 %207 to double
%209 = fcmp ugt double %205, %208
br i1 %209, label %210, label %78
210: ; preds = %78, %74
%211 = fadd double %75, 5.000000e-01
%212 = tail call i32 @acos(double -1.000000e+00)
%213 = sitofp i32 %212 to double
%214 = fcmp ugt double %211, %213
br i1 %214, label %215, label %74
215: ; preds = %210, %70
br label %216
216: ; preds = %215, %260
%217 = phi i32 [ %262, %260 ], [ 1, %215 ]
%218 = phi i32 [ %261, %260 ], [ 0, %215 ]
%219 = tail call i32 @acos(double -1.000000e+00)
%220 = icmp slt i32 %219, 0
br i1 %220, label %260, label %221
221: ; preds = %216
%222 = sub nsw i32 0, %218
%223 = shl nuw nsw i32 %218, 1
%224 = or i32 %223, 1
br label %225
225: ; preds = %221, %255
%226 = phi double [ 0.000000e+00, %221 ], [ %256, %255 ]
%227 = tail call i32 @acos(double -1.000000e+00)
%228 = icmp slt i32 %227, 0
br i1 %228, label %255, label %229
229: ; preds = %225, %249
%230 = phi double [ %250, %249 ], [ 0.000000e+00, %225 ]
br label %231
231: ; preds = %229, %231
%232 = phi double [ %237, %231 ], [ 0.000000e+00, %229 ]
%233 = phi i32 [ %238, %231 ], [ %222, %229 ]
%234 = tail call double @SphericalHarmonics(i32 %218, i32 %233, double %226, double %230)
%235 = tail call double @conj(double %234)
%236 = tail call double @SphericalHarmonics(i32 %218, i32 %233, double %226, double %230)
%237 = tail call double @llvm.fmuladd.f64(double %235, double %236, double %232)
%238 = add nsw i32 %233, 1
%239 = icmp eq i32 %238, %217
br i1 %239, label %240, label %231
240: ; preds = %231
%241 = tail call i32 @acos(double -1.000000e+00)
%242 = shl nsw i32 %241, 2
%243 = sdiv i32 %224, %242
%244 = sitofp i32 %243 to double
%245 = tail call i32 @check(double %237, double %244)
%246 = icmp eq i32 %245, 0
br i1 %246, label %247, label %249
247: ; preds = %240
%248 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %218)
br label %249
249: ; preds = %240, %247
%250 = fadd double %230, 1.000000e-01
%251 = tail call i32 @acos(double -1.000000e+00)
%252 = shl nsw i32 %251, 1
%253 = sitofp i32 %252 to double
%254 = fcmp ugt double %250, %253
br i1 %254, label %255, label %229
255: ; preds = %249, %225
%256 = fadd double %226, 1.000000e-01
%257 = tail call i32 @acos(double -1.000000e+00)
%258 = sitofp i32 %257 to double
%259 = fcmp ugt double %256, %258
br i1 %259, label %260, label %225
260: ; preds = %255, %216
%261 = add nuw nsw i32 %218, 1
%262 = add nuw nsw i32 %217, 1
%263 = icmp eq i32 %261, 11
br i1 %263, label %264, label %216
264: ; preds = %260
%265 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.8, i64 0, i64 0))
%266 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 0
%267 = getelementptr inbounds [2 x double], [2 x double]* %2, i64 0, i64 0
%268 = call i32 @a(i32 10, i32 5, double* %266, double* %267)
%269 = call double @creal(i32 %268)
%270 = call i32 @check(double %269, double -3.370400e-04)
%271 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.9, i64 0, i64 0))
%272 = call double @C(i32 5, double* %266, double* %267)
%273 = call i32 @check(double %272, double 0x3FB45F30E7FF583A)
%274 = call double @C(i32 9, double* %266, double* %267)
%275 = call i32 @check(double %274, double 0x3FB45F30E7FF583A)
ret i32 0
}