#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double cos(double);
scalar_t__ floor(int);
void gauss_legendre_rule(int N, double *X, double *W) {
  int i, k;
  int M, E1;
  double T, X0, PKM1, T1, PKP1, PK;
  double DEN, D1, DPN, D2PN, D3PN, D4PN, U, V, H, P, DP, FX;
  M = (int)floor((N + 1) / 2);
  E1 = N * (N + 1);
  for (i = 1; i <= M; i++) {
    T = (4 * i - 1) * 3.1415926535897932385 / (4 * N + 2);
    X0 = (1.0 - (1.0 - 1.0 / N) / (8.0 * N * N)) * cos(T);
    PKM1 = 1.0;
    PK = X0;
    for (k = 2; k <= N; k++) {
      T1 = X0 * PK;
      PKP1 = T1 - PKM1 - (T1 - PKM1) / k + T1;
      PKM1 = PK;
      PK = PKP1;
    }
    DEN = 1.0 - X0 * X0;
    D1 = N * (PKM1 - X0 * PK);
    DPN = D1 / DEN;
    D2PN = (2.0 * X0 * DPN - E1 * PK) / DEN;
    D3PN = (4.0 * X0 * D2PN + (2.0 - E1) * DPN) / DEN;
    D4PN = (6.0 * X0 * D3PN + (6.0 - E1) * D2PN) / DEN;
    U = PK / DPN;
    V = D2PN / DPN;
    H = -U * (1.0 + 0.50 * U * (V + U * (V * V - D3PN / (3.0 * DPN))));
    P = PK +
        H * (DPN + 0.50 * H * (D2PN + H / 3.0 * (D3PN + 0.250 * H * D4PN)));
    DP = DPN + H * (D2PN + 0.50 * H * (D3PN + H * D4PN / 3.0));
    H = H - P / DP;
    X[i - 1] = X0 + H;
    FX = D1 - H * E1 *
                  (PK + 0.50 * H *
                            (DPN + H / 3.0 *
                                       (D2PN +
                                        0.250 * H * (D3PN + 0.20 * H * D4PN))));
    W[i - 1] = 2.0 * (1.0 - X[i - 1] * X[i - 1]) / (FX * FX);
  }
  if ((M + M) == N) {
    for (i = 1; i <= M; i++) {
      X[N - i] = X[i - 1];
      X[i - 1] = -X[i - 1];
      W[N - i] = W[i - 1];
    }
  } else {
    X[M - 1] = 0.0;
    for (i = 1; i <= M - 1; i++) {
      X[N - i] = X[i - 1];
      X[i - 1] = -X[i - 1];
      W[N - i] = W[i - 1];
    }
  }
}


x86 assembly (clang, -O0):
<gauss_legendre_rule>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <floor@plt>
mov    %eax,-0x24(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    %eax,-0x28(%rbp)
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     170e <gauss_legendre_rule+0x5ee>
mov    -0x1c(%rbp),%eax
shl    $0x2,%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  0xe8b(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
add    $0x2,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xe54(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  0xe48(%rip),%xmm1
subsd  %xmm0,%xmm1
cvtsi2sdl -0x4(%rbp),%xmm2
movsd  0xe3f(%rip),%xmm0
mulsd  %xmm2,%xmm0
cvtsi2sdl -0x4(%rbp),%xmm2
mulsd  %xmm2,%xmm0
divsd  %xmm0,%xmm1
movsd  0xe1e(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1030 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0xc0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xdec(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x2,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1292 <gauss_legendre_rule+0x172>
movsd  -0x38(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
subsd  -0x40(%rbp),%xmm1
cvtsi2sdl -0x20(%rbp),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    122a <gauss_legendre_rule+0x10a>
movsd  -0x38(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xd41(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm3
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
divsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xcfd(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
cvtsi2sdl -0x28(%rbp),%xmm1
mulsd  -0x58(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xce8(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
cvtsi2sdl -0x28(%rbp),%xmm3
movsd  0xca1(%rip),%xmm1
subsd  %xmm3,%xmm1
mulsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xca6(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm2
cvtsi2sdl -0x28(%rbp),%xmm3
movsd  0xc8f(%rip),%xmm1
subsd  %xmm3,%xmm1
mulsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
divsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
divsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xc1e(%rip),%xmm1
mulsd  -0x90(%rbp),%xmm1
ff
movsd  -0x98(%rbp),%xmm3
ff
movsd  -0x90(%rbp),%xmm2
ff
movsd  -0x98(%rbp),%xmm4
ff
movsd  -0x98(%rbp),%xmm6
ff
movsd  -0x80(%rbp),%xmm5
movsd  0xbe1(%rip),%xmm7
mulsd  -0x70(%rbp),%xmm7
divsd  %xmm7,%xmm5
movq   %xmm5,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm5
mulsd  %xmm6,%xmm4
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xb75(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x58(%rbp),%xmm1
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x70(%rbp),%xmm3
movsd  0xb83(%rip),%xmm2
mulsd  -0xa0(%rbp),%xmm2
ff
movsd  -0x78(%rbp),%xmm5
movsd  -0xa0(%rbp),%xmm4
ff
movsd  0xb5e(%rip),%xmm6
divsd  %xmm6,%xmm4
movsd  -0x80(%rbp),%xmm7
movsd  0xb45(%rip),%xmm6
mulsd  -0xa0(%rbp),%xmm6
ff
movsd  -0x88(%rbp),%xmm8
ff ff
mulsd  %xmm8,%xmm6
addsd  %xmm7,%xmm6
mulsd  %xmm6,%xmm4
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x70(%rbp),%xmm1
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x78(%rbp),%xmm3
movsd  0xb01(%rip),%xmm2
mulsd  -0xa0(%rbp),%xmm2
ff
movsd  -0x80(%rbp),%xmm4
movsd  -0xa0(%rbp),%xmm5
ff
mulsd  -0x88(%rbp),%xmm5
ff
movsd  0xad4(%rip),%xmm6
divsd  %xmm6,%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0xa8(%rbp),%xmm1
ff
divsd  -0xb0(%rbp),%xmm1
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
addsd  -0xa0(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x68(%rbp),%xmm1
movsd  -0xa0(%rbp),%xmm0
ff
cvtsi2sdl -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm0
movsd  -0x58(%rbp),%xmm3
movsd  0xa56(%rip),%xmm2
mulsd  -0xa0(%rbp),%xmm2
ff
movsd  -0x70(%rbp),%xmm5
movsd  -0xa0(%rbp),%xmm4
ff
movsd  0xa31(%rip),%xmm6
divsd  %xmm6,%xmm4
movsd  -0x78(%rbp),%xmm7
movsd  0xa18(%rip),%xmm6
mulsd  -0xa0(%rbp),%xmm6
ff
movsd  -0x80(%rbp),%xmm9
movsd  0x9f9(%rip),%xmm8
mulsd  -0xa0(%rbp),%xmm8
ff ff
movsd  -0x88(%rbp),%xmm10
ff ff
mulsd  %xmm10,%xmm8
addsd  %xmm9,%xmm8
mulsd  %xmm8,%xmm6
addsd  %xmm7,%xmm6
mulsd  %xmm6,%xmm4
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm0,%xmm1
movsd  0x936(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0x942(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  -0xb8(%rbp),%xmm1
ff
mulsd  -0xb8(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1164 <gauss_legendre_rule+0x44>
mov    -0x24(%rbp),%eax
add    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jne    17c6 <gauss_legendre_rule+0x6a6>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     17c1 <gauss_legendre_rule+0x6a1>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1724 <gauss_legendre_rule+0x604>
jmp    1889 <gauss_legendre_rule+0x769>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1884 <gauss_legendre_rule+0x764>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    17e2 <gauss_legendre_rule+0x6c2>
jmp    1889 <gauss_legendre_rule+0x769>
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gauss_legendre_rule>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%r15d
lea    0x1(%r15),%ebp
mov    %ebp,%eax
shr    $0x1f,%eax
lea    (%r15,%rax,1),%edi
add    $0x1,%edi
sar    %edi
call   1040 <floor@plt>
test   %eax,%eax
jle    15e9 <gauss_legendre_rule+0x4c9>
lea    0x2(,%r15,4),%ecx
cvtsi2sd %ecx,%xmm0
movsd  %xmm0,0x40(%rsp)
imul   %r15d,%ebp
cvtsi2sd %r15d,%xmm1
movsd  0xe87(%rip),%xmm7
movapd %xmm7,%xmm0
divsd  %xmm1,%xmm0
movapd %xmm7,%xmm2
subsd  %xmm0,%xmm2
movsd  0xe77(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm1,0x38(%rsp)
mulsd  %xmm1,%xmm0
divsd  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
addsd  %xmm7,%xmm2
movsd  %xmm2,0x30(%rsp)
movsd  0xe54(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  0xe4a(%rip),%xmm1
movsd  %xmm0,0x28(%rsp)
subsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rsp)
mov    %rax,0x10(%rsp)
lea    0x1(%rax),%r13d
lea    -0x1(%r15),%ebp
mov    %ebp,0xc(%rsp)
and    $0xfffffffe,%ebp
mov    $0x1,%r12d
jmp    140f <gauss_legendre_rule+0x2ef>
nopl   (%rax)
movapd %xmm0,%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm12,%xmm7
subsd  %xmm2,%xmm7
movapd %xmm0,%xmm2
mulsd  %xmm8,%xmm2
subsd  %xmm2,%xmm1
mulsd  0x38(%rsp),%xmm1
movapd %xmm1,%xmm9
divsd  %xmm7,%xmm9
movapd %xmm0,%xmm3
addsd  %xmm0,%xmm3
movsd  0x28(%rsp),%xmm13
movapd %xmm13,%xmm2
mulsd  %xmm8,%xmm2
mulsd  %xmm9,%xmm3
subsd  %xmm2,%xmm3
divsd  %xmm7,%xmm3
movapd %xmm0,%xmm6
mulsd  0xdc8(%rip),%xmm6
movsd  0x20(%rsp),%xmm2
mulsd  %xmm9,%xmm2
mulsd  %xmm3,%xmm6
addsd  %xmm2,%xmm6
divsd  %xmm7,%xmm6
movapd %xmm0,%xmm11
mulsd  0xd93(%rip),%xmm11
movsd  0x18(%rsp),%xmm2
mulsd  %xmm3,%xmm2
mulsd  %xmm6,%xmm11
addsd  %xmm2,%xmm11
divsd  %xmm7,%xmm11
movapd %xmm8,%xmm2
divsd  %xmm9,%xmm2
movapd %xmm3,%xmm4
divsd  %xmm9,%xmm4
movapd %xmm2,%xmm10
movapd %xmm9,%xmm7
movsd  0xd74(%rip),%xmm15
mulsd  %xmm15,%xmm7
movapd %xmm6,%xmm5
divsd  %xmm7,%xmm5
movapd %xmm4,%xmm7
mulsd  %xmm4,%xmm7
subsd  %xmm5,%xmm7
mulsd  %xmm2,%xmm7
xorpd  0xd67(%rip),%xmm2
movsd  0xd3e(%rip),%xmm14
mulsd  %xmm14,%xmm10
addsd  %xmm4,%xmm7
mulsd  %xmm10,%xmm7
addsd  %xmm12,%xmm7
mulsd  %xmm2,%xmm7
movapd %xmm7,%xmm4
mulsd  %xmm14,%xmm4
movapd %xmm7,%xmm5
divsd  %xmm15,%xmm5
movapd %xmm7,%xmm2
movsd  0xd18(%rip),%xmm12
mulsd  %xmm12,%xmm2
mulsd  %xmm11,%xmm2
addsd  %xmm6,%xmm2
mulsd  %xmm5,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm4,%xmm2
addsd  %xmm9,%xmm2
mulsd  %xmm7,%xmm2
addsd  %xmm8,%xmm2
movapd %xmm11,%xmm5
mulsd  %xmm7,%xmm5
divsd  %xmm15,%xmm5
addsd  %xmm6,%xmm5
mulsd  %xmm4,%xmm5
addsd  %xmm3,%xmm5
mulsd  %xmm7,%xmm5
addsd  %xmm9,%xmm5
divsd  %xmm5,%xmm2
subsd  %xmm2,%xmm7
addsd  %xmm7,%xmm0
movapd %xmm7,%xmm10
movapd %xmm7,%xmm4
movapd %xmm7,%xmm5
movapd %xmm13,%xmm2
mulsd  %xmm7,%xmm2
mulsd  0xcab(%rip),%xmm7
mulsd  %xmm11,%xmm7
addsd  %xmm6,%xmm7
mulsd  %xmm12,%xmm5
mulsd  %xmm5,%xmm7
addsd  %xmm3,%xmm7
divsd  %xmm15,%xmm4
mulsd  %xmm4,%xmm7
addsd  %xmm9,%xmm7
mulsd  %xmm14,%xmm10
mulsd  %xmm10,%xmm7
addsd  %xmm8,%xmm7
mulsd  %xmm2,%xmm7
movsd  %xmm0,-0x8(%rbx,%r12,8)
subsd  %xmm7,%xmm1
mulsd  %xmm0,%xmm0
movsd  0xc15(%rip),%xmm2
subsd  %xmm0,%xmm2
addsd  %xmm2,%xmm2
mulsd  %xmm1,%xmm1
divsd  %xmm1,%xmm2
movsd  %xmm2,-0x8(%r14,%r12,8)
add    $0x1,%r12
cmp    %r13,%r12
je     1527 <gauss_legendre_rule+0x407>
lea    -0x1(,%r12,4),%eax
ff
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xbfa(%rip),%xmm0
divsd  0x40(%rsp),%xmm0
call   1030 <cos@plt>
movsd  0xbc6(%rip),%xmm12
mulsd  0x30(%rsp),%xmm0
movapd %xmm0,%xmm8
movapd %xmm12,%xmm1
cmp    $0x2,%r15d
jl     1200 <gauss_legendre_rule+0xe0>
mov    $0x2,%eax
movapd %xmm12,%xmm1
movapd %xmm0,%xmm3
je     14e2 <gauss_legendre_rule+0x3c2>
mov    $0x2,%eax
movapd %xmm12,%xmm1
movapd %xmm0,%xmm3
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,%ecx
movapd %xmm0,%xmm2
mulsd  %xmm3,%xmm2
movapd %xmm2,%xmm4
subsd  %xmm1,%xmm4
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movapd %xmm4,%xmm5
divsd  %xmm1,%xmm5
subsd  %xmm5,%xmm4
movapd %xmm4,%xmm1
addsd  %xmm2,%xmm1
movapd %xmm0,%xmm2
mulsd  %xmm1,%xmm2
movapd %xmm2,%xmm4
subsd  %xmm3,%xmm4
lea    0x1(%rcx),%eax
xorps  %xmm3,%xmm3
cvtsi2sd %eax,%xmm3
movapd %xmm4,%xmm5
divsd  %xmm3,%xmm5
subsd  %xmm5,%xmm4
movapd %xmm4,%xmm3
addsd  %xmm2,%xmm3
lea    0x2(%rcx),%eax
cmp    %ebp,%ecx
jne    1480 <gauss_legendre_rule+0x360>
movapd %xmm3,%xmm8
testb  $0x1,0xc(%rsp)
je     1200 <gauss_legendre_rule+0xe0>
movapd %xmm0,%xmm2
mulsd  %xmm3,%xmm2
movapd %xmm2,%xmm8
xorps  %xmm4,%xmm4
cvtsi2sd %eax,%xmm4
subsd  %xmm1,%xmm8
movapd %xmm8,%xmm1
divsd  %xmm4,%xmm1
subsd  %xmm1,%xmm8
addsd  %xmm2,%xmm8
movapd %xmm3,%xmm1
jmp    1200 <gauss_legendre_rule+0xe0>
mov    0x10(%rsp),%rdx
lea    (%rdx,%rdx,1),%eax
cmp    %r15d,%eax
jne    1617 <gauss_legendre_rule+0x4f7>
test   %edx,%edx
jle    1716 <gauss_legendre_rule+0x5f6>
movslq %r15d,%rax
lea    0x1(%rdx),%esi
lea    -0x1(%rsi),%rdx
mov    $0x1,%ecx
cmp    $0x2,%esi
je     16e4 <gauss_legendre_rule+0x5c4>
lea    -0x1(%rax),%rsi
mov    %rdx,%rdi
and    $0xfffffffffffffffe,%rdi
neg    %rdi
mov    $0x1,%ecx
movapd 0xadd(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  -0x8(%rbx,%rcx,8),%xmm1
movsd  %xmm1,(%rbx,%rsi,8)
movsd  -0x8(%rbx,%rcx,8),%xmm1
xorpd  %xmm0,%xmm1
movlpd %xmm1,-0x8(%rbx,%rcx,8)
movsd  -0x8(%r14,%rcx,8),%xmm1
movsd  %xmm1,(%r14,%rsi,8)
movsd  (%rbx,%rcx,8),%xmm1
movsd  %xmm1,-0x8(%rbx,%rsi,8)
movsd  (%rbx,%rcx,8),%xmm1
xorpd  %xmm0,%xmm1
movlpd %xmm1,(%rbx,%rcx,8)
movsd  (%r14,%rcx,8),%xmm1
movsd  %xmm1,-0x8(%r14,%rsi,8)
add    $0xfffffffffffffffe,%rsi
lea    (%rdi,%rcx,1),%rbp
add    $0x2,%rbp
add    $0x2,%rcx
cmp    $0x1,%rbp
jne    1580 <gauss_legendre_rule+0x460>
jmp    16e4 <gauss_legendre_rule+0x5c4>
lea    (%rax,%rax,1),%ecx
cmp    %r15d,%ecx
je     1716 <gauss_legendre_rule+0x5f6>
shl    $0x20,%rax
movabs $0xffffffff00000000,%rcx
add    %rax,%rcx
sar    $0x1d,%rcx
movq   $0x0,(%rbx,%rcx,1)
jmp    1716 <gauss_legendre_rule+0x5f6>
mov    %rdx,%rax
shl    $0x20,%rax
movabs $0xffffffff00000000,%rcx
ff ff ff
add    %rax,%rcx
sar    $0x1d,%rcx
movq   $0x0,(%rbx,%rcx,1)
cmp    $0x2,%edx
jl     1716 <gauss_legendre_rule+0x5f6>
movslq %r15d,%rax
mov    %edx,%esi
lea    -0x1(%rsi),%rdx
mov    $0x1,%ecx
cmp    $0x2,%rsi
je     16e4 <gauss_legendre_rule+0x5c4>
lea    -0x1(%rax),%rsi
mov    %rdx,%rdi
and    $0xfffffffffffffffe,%rdi
neg    %rdi
mov    $0x1,%ecx
movapd 0x9dd(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  -0x8(%rbx,%rcx,8),%xmm1
movsd  %xmm1,(%rbx,%rsi,8)
movsd  -0x8(%rbx,%rcx,8),%xmm1
xorpd  %xmm0,%xmm1
movlpd %xmm1,-0x8(%rbx,%rcx,8)
movsd  -0x8(%r14,%rcx,8),%xmm1
movsd  %xmm1,(%r14,%rsi,8)
movsd  (%rbx,%rcx,8),%xmm1
movsd  %xmm1,-0x8(%rbx,%rsi,8)
movsd  (%rbx,%rcx,8),%xmm1
xorpd  %xmm0,%xmm1
movlpd %xmm1,(%rbx,%rcx,8)
movsd  (%r14,%rcx,8),%xmm1
movsd  %xmm1,-0x8(%r14,%rsi,8)
add    $0xfffffffffffffffe,%rsi
lea    (%rdi,%rcx,1),%rbp
add    $0x2,%rbp
add    $0x2,%rcx
cmp    $0x1,%rbp
jne    1680 <gauss_legendre_rule+0x560>
test   $0x1,%dl
je     1716 <gauss_legendre_rule+0x5f6>
movsd  -0x8(%rbx,%rcx,8),%xmm0
sub    %rcx,%rax
movsd  %xmm0,(%rbx,%rax,8)
movsd  -0x8(%rbx,%rcx,8),%xmm0
xorps  0x94c(%rip),%xmm0
movlps %xmm0,-0x8(%rbx,%rcx,8)
movsd  -0x8(%r14,%rcx,8),%xmm0
movsd  %xmm0,(%r14,%rax,8)
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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