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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ ArcCosEvalPts(int, double *);
int /*<<< orphan*/ EvalPts(int, double *);
int /*<<< orphan*/ L2_an(int, int);
int /*<<< orphan*/ L2_cn(int, int);
int /*<<< orphan*/ Pmm_L2(int, double *, int, double *);
int /*<<< orphan*/ kFCT(double *, double *, double *, int, int, int);
int /*<<< orphan*/ memcpy(double *, double *, int);
double sin(double);
int /*<<< orphan*/ vec_add(double *, double *, double *, int);
int /*<<< orphan*/ vec_mul(int /*<<< orphan*/, double *, double *, int);
int /*<<< orphan*/ vec_pt_mul(double *, double *, double *, int);
void CosPmlTableGen(int bw, int m, double *tablespace, double *workspace) {
  double *prev, *prevprev, *temp1, *temp2, *temp3, *temp4, *x_i, *eval_args;
  double *tableptr, *cosres, *cosworkspace;
  int i, j, k;
  prevprev = workspace;
  prev = prevprev + bw;
  temp1 = prev + bw;
  temp2 = temp1 + bw;
  temp3 = temp2 + bw;
  temp4 = temp3 + bw;
  x_i = temp4 + bw;
  eval_args = x_i + bw;
  cosres = eval_args + bw;
  cosworkspace = cosres + bw;
  tableptr = tablespace;
  EvalPts(bw, x_i);
  ArcCosEvalPts(bw, eval_args);
  for (i = 0; i < bw; i++)
    prevprev[i] = 0.0;
  if (m == 0) {
    for (i = 0; i < bw; i++) {
      prev[i] = 0.707106781186547;
    }
  } else
    Pmm_L2(m, eval_args, bw, prev);
  if ((m % 2) == 1) {
    for (i = 0; i < bw; i++)
      prev[i] /= sin(eval_args[i]);
  }
  if ((m % 2) == 0)
    k = m;
  else
    k = m - 1;
  kFCT(prev, cosres, cosworkspace, bw, bw, 1);
  for (i = 0; i <= k; i += 2)
    tableptr[i / 2] = cosres[i];
  tableptr += k / 2 + 1;
  for (i = 0; i < bw - m - 1; i++) {
    vec_mul(L2_cn(m, m + i), prevprev, temp1, bw);
    vec_pt_mul(prev, x_i, temp2, bw);
    vec_mul(L2_an(m, m + i), temp2, temp3, bw);
    vec_add(temp3, temp1, temp4, bw);
    kFCT(temp4, cosres, cosworkspace, bw, bw, 1);
    k++;
    if ((i % 2) == 1) {
      for (j = 0; j <= k; j += 2)
        tableptr[j / 2] = cosres[j];
    } else {
      for (j = 1; j <= k; j += 2)
        tableptr[j / 2] = cosres[j];
    }
    tableptr += k / 2 + 1;
    memcpy(prevprev, prev, sizeof(double) * bw);
    memcpy(prev, temp4, sizeof(double) * bw);
  }
}


x86 assembly (clang, -O0):
<CosPmlTableGen>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x4(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x4(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x4(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
movslq -0x4(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
movslq -0x4(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
movslq -0x4(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
movslq -0x4(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
movslq -0x4(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
movslq -0x4(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x70(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x50(%rbp),%rsi
call   10c0 <EvalPts@plt>
mov    -0x4(%rbp),%edi
mov    -0x58(%rbp),%rsi
call   1060 <ArcCosEvalPts@plt>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    12cd <CosPmlTableGen+0x11d>
mov    -0x28(%rbp),%rax
movslq -0x74(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    12a3 <CosPmlTableGen+0xf3>
cmpl   $0x0,-0x8(%rbp)
jne    1312 <CosPmlTableGen+0x162>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    130d <CosPmlTableGen+0x15d>
mov    -0x20(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  0xd06(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    12de <CosPmlTableGen+0x12e>
jmp    1325 <CosPmlTableGen+0x175>
mov    -0x8(%rbp),%edi
mov    -0x58(%rbp),%rsi
mov    -0x4(%rbp),%edx
mov    -0x20(%rbp),%rcx
call   1030 <Pmm_L2@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    138a <CosPmlTableGen+0x1da>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1385 <CosPmlTableGen+0x1d5>
mov    -0x58(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1090 <sin@plt>
movaps %xmm0,%xmm1
mov    -0x20(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1340 <CosPmlTableGen+0x190>
jmp    138a <CosPmlTableGen+0x1da>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    13a9 <CosPmlTableGen+0x1f9>
mov    -0x8(%rbp),%eax
mov    %eax,-0x7c(%rbp)
jmp    13b2 <CosPmlTableGen+0x202>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x68(%rbp),%rsi
mov    -0x70(%rbp),%rdx
mov    -0x4(%rbp),%ecx
mov    -0x4(%rbp),%r8d
mov    $0x1,%r9d
call   1050 <kFCT@plt>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x7c(%rbp),%eax
jg     1425 <CosPmlTableGen+0x275>
mov    -0x68(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x60(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x74(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x88(%rbp),%rax
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x74(%rbp)
jmp    13d7 <CosPmlTableGen+0x227>
mov    -0x7c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
add    $0x1,%ecx
mov    -0x60(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1617 <CosPmlTableGen+0x467>
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
add    -0x74(%rbp),%esi
call   1080 <L2_cn@plt>
mov    %eax,%edi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x4(%rbp),%ecx
call   10b0 <vec_mul@plt>
mov    -0x20(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    -0x4(%rbp),%ecx
call   10d0 <vec_pt_mul@plt>
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
add    -0x74(%rbp),%esi
call   1040 <L2_an@plt>
mov    %eax,%edi
mov    -0x38(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x4(%rbp),%ecx
call   10b0 <vec_mul@plt>
mov    -0x40(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x4(%rbp),%ecx
call   1070 <vec_add@plt>
mov    -0x48(%rbp),%rdi
mov    -0x68(%rbp),%rsi
mov    -0x70(%rbp),%rdx
mov    -0x4(%rbp),%ecx
mov    -0x4(%rbp),%r8d
mov    $0x1,%r9d
call   1050 <kFCT@plt>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x74(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    155f <CosPmlTableGen+0x3af>
movl   $0x0,-0x78(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x7c(%rbp),%eax
jg     155a <CosPmlTableGen+0x3aa>
mov    -0x68(%rbp),%rax
movslq -0x78(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x60(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0x78(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x90(%rbp),%rax
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x78(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x78(%rbp)
jmp    150c <CosPmlTableGen+0x35c>
jmp    15b9 <CosPmlTableGen+0x409>
movl   $0x1,-0x78(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x7c(%rbp),%eax
jg     15b4 <CosPmlTableGen+0x404>
mov    -0x68(%rbp),%rax
movslq -0x78(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x60(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x78(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x98(%rbp),%rax
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x78(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x78(%rbp)
jmp    1566 <CosPmlTableGen+0x3b6>
jmp    15b9 <CosPmlTableGen+0x409>
mov    -0x7c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
add    $0x1,%ecx
mov    -0x60(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   10a0 <memcpy@plt>
mov    -0x20(%rbp),%rdi
mov    -0x48(%rbp),%rsi
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   10a0 <memcpy@plt>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    144e <CosPmlTableGen+0x29e>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CosPmlTableGen>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %rcx,%r13
mov    %rdx,0x18(%rsp)
mov    %esi,%r12d
mov    %edi,%r14d
movslq %edi,%rbx
lea    (%rcx,%rbx,8),%r15
lea    (%r15,%rbx,8),%rax
mov    %rax,0x60(%rsp)
lea    (%rax,%rbx,8),%rax
mov    %rax,0x98(%rsp)
lea    (%rax,%rbx,8),%rax
mov    %rax,0x90(%rsp)
lea    (%rax,%rbx,8),%rax
mov    %rax,0x88(%rsp)
lea    (%rax,%rbx,8),%rsi
lea    (%rsi,%rbx,8),%rbp
lea    0x0(%rbp,%rbx,8),%rax
mov    %rax,0x8(%rsp)
lea    (%rax,%rbx,8),%rax
mov    %rax,0x38(%rsp)
mov    %ebx,%edi
mov    %rsi,0x80(%rsp)
call   10d0 <EvalPts@plt>
mov    %ebx,%edi
mov    %rbp,%rsi
call   1060 <ArcCosEvalPts@plt>
mov    %rbx,(%rsp)
test   %ebx,%ebx
mov    %r13,0x58(%rsp)
mov    %r12,0x50(%rsp)
mov    %r14,%rax
mov    %r14,0x10(%rsp)
mov    %r15,0x20(%rsp)
jle    1292 <CosPmlTableGen+0xd2>
mov    %r14d,%ebx
lea    0x0(,%rbx,8),%rdx
mov    %r13,%rdi
xor    %esi,%esi
call   1070 <memset@plt>
test   %r12d,%r12d
jne    1297 <CosPmlTableGen+0xd7>
cmp    $0x4,%r14d
mov    %rbp,0x28(%rsp)
jae    12dd <CosPmlTableGen+0x11d>
xor    %eax,%eax
jmp    13e9 <CosPmlTableGen+0x229>
test   %r12d,%r12d
je     12b2 <CosPmlTableGen+0xf2>
mov    %r12d,%edi
mov    %rbp,0x28(%rsp)
mov    %rbp,%rsi
mov    %r14d,%edx
mov    %r15,%rcx
call   1030 <Pmm_L2@plt>
jmp    140d <CosPmlTableGen+0x24d>
mov    %r15,%rdi
mov    0x8(%rsp),%rsi
mov    0x38(%rsp),%rdx
mov    %r14d,%ecx
mov    %r14d,%r8d
mov    $0x1,%r9d
call   1050 <kFCT@plt>
xor    %r15d,%r15d
mov    0x18(%rsp),%r8
jmp    1519 <CosPmlTableGen+0x359>
mov    %ebx,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rsi
mov    %rsi,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edx,%ecx
and    $0x7,%ecx
cmp    $0x1c,%rsi
jae    1303 <CosPmlTableGen+0x143>
xor    %esi,%esi
jmp    13ae <CosPmlTableGen+0x1ee>
movabs $0x7ffffffffffffffc,%rsi
ff ff 7f
add    $0xfffffffffffffffc,%rsi
and    %rsi,%rdx
mov    (%rsp),%rsi
lea    0xf0(,%rsi,8),%rdi
add    %r13,%rdi
xor    %esi,%esi
movapd 0xcd3(%rip),%xmm0
nopl   (%rax)
movupd %xmm0,-0xf0(%rdi,%rsi,8)
ff ff
movupd %xmm0,-0xe0(%rdi,%rsi,8)
ff ff
movupd %xmm0,-0xd0(%rdi,%rsi,8)
ff ff
movupd %xmm0,-0xc0(%rdi,%rsi,8)
ff ff
movupd %xmm0,-0xb0(%rdi,%rsi,8)
ff ff
movupd %xmm0,-0xa0(%rdi,%rsi,8)
ff ff
movupd %xmm0,-0x90(%rdi,%rsi,8)
ff ff
movupd %xmm0,-0x80(%rdi,%rsi,8)
movupd %xmm0,-0x70(%rdi,%rsi,8)
movupd %xmm0,-0x60(%rdi,%rsi,8)
movupd %xmm0,-0x50(%rdi,%rsi,8)
movupd %xmm0,-0x40(%rdi,%rsi,8)
movupd %xmm0,-0x30(%rdi,%rsi,8)
movupd %xmm0,-0x20(%rdi,%rsi,8)
movupd %xmm0,-0x10(%rdi,%rsi,8)
movupd %xmm0,(%rdi,%rsi,8)
add    $0x20,%rsi
add    $0xfffffffffffffff8,%rdx
jne    1330 <CosPmlTableGen+0x170>
test   %rcx,%rcx
je     13e4 <CosPmlTableGen+0x224>
add    (%rsp),%rsi
lea    0x10(,%rsi,8),%rdx
add    %r13,%rdx
shl    $0x5,%rcx
xor    %esi,%esi
movapd 0xc30(%rip),%xmm0
movupd %xmm0,-0x10(%rdx,%rsi,1)
movupd %xmm0,(%rdx,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%rcx
jne    13d0 <CosPmlTableGen+0x210>
cmp    %rbx,%rax
je     140d <CosPmlTableGen+0x24d>
movabs $0x3fe6a09e667f3bc8,%rcx
a0 e6 3f
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rcx,(%r15,%rax,8)
add    $0x1,%rax
cmp    %rax,%rbx
jne    1400 <CosPmlTableGen+0x240>
mov    %r12d,%ecx
shr    $0x1f,%ecx
add    %r12d,%ecx
and    $0xfffffffe,%ecx
mov    %r12d,%eax
mov    %r12d,%r15d
sub    %ecx,%eax
je     14eb <CosPmlTableGen+0x32b>
cmp    $0x1,%eax
jne    14e1 <CosPmlTableGen+0x321>
cmpl   $0x0,0x10(%rsp)
jle    14e1 <CosPmlTableGen+0x321>
mov    0x10(%rsp),%rax
mov    %eax,%r15d
cmp    $0x1,%eax
jne    144c <CosPmlTableGen+0x28c>
xor    %ebp,%ebp
jmp    14af <CosPmlTableGen+0x2ef>
mov    %r15d,%r12d
and    $0xfffffffe,%r12d
mov    (%rsp),%rdx
imul   $0x38,%rdx,%rax
mov    %r13,%rcx
add    %rax,%r13
add    $0x8,%r13
lea    (%rcx,%rdx,8),%rbx
add    $0x8,%rbx
xor    %ebp,%ebp
nop
movsd  -0x8(%r13,%rbp,8),%xmm0
call   10a0 <sin@plt>
movsd  -0x8(%rbx,%rbp,8),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,-0x8(%rbx,%rbp,8)
movsd  0x0(%r13,%rbp,8),%xmm0
call   10a0 <sin@plt>
movsd  (%rbx,%rbp,8),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx,%rbp,8)
add    $0x2,%rbp
cmp    %rbp,%r12
jne    1470 <CosPmlTableGen+0x2b0>
test   $0x1,%r15b
mov    0x58(%rsp),%r13
mov    0x50(%rsp),%r12
je     14e1 <CosPmlTableGen+0x321>
mov    0x28(%rsp),%rax
movsd  (%rax,%rbp,8),%xmm0
call   10a0 <sin@plt>
mov    0x20(%rsp),%rax
movsd  (%rax,%rbp,8),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rax,%rbp,8)
lea    -0x1(%r12),%r15d
mov    0x10(%rsp),%r14
mov    0x20(%rsp),%rdi
mov    0x8(%rsp),%rsi
mov    0x38(%rsp),%rdx
mov    %r14d,%ecx
mov    %r14d,%r8d
mov    $0x1,%r9d
call   1050 <kFCT@plt>
test   %r15d,%r15d
mov    0x18(%rsp),%r8
js     1606 <CosPmlTableGen+0x446>
mov    %r15d,%eax
cmp    $0x8,%r15d
jae    1529 <CosPmlTableGen+0x369>
xor    %ecx,%ecx
jmp    15d8 <CosPmlTableGen+0x418>
mov    %eax,%ecx
and    $0xfffffffe,%ecx
mov    (%rsp),%rdx
lea    (%rcx,%rdx,8),%rdx
lea    0x8(,%rdx,8),%rdx
add    %r13,%rdx
cmp    %r8,%rdx
mov    0x8(%rsp),%rsi
jbe    155f <CosPmlTableGen+0x39f>
lea    (%r8,%rcx,4),%rcx
add    $0x8,%rcx
cmp    %rcx,%rsi
jae    155f <CosPmlTableGen+0x39f>
xor    %ecx,%ecx
jmp    15dd <CosPmlTableGen+0x41d>
mov    %rax,%rdx
shr    %rdx
add    $0x1,%rdx
movabs $0x7ffffffffffffffc,%rsi
ff ff 7f
mov    %edx,%ecx
and    $0x3,%ecx
test   %rcx,%rcx
mov    $0x4,%edi
cmovne %rcx,%rdi
sub    %rdi,%rdx
lea    (%rdx,%rdx,1),%rcx
mov    (%rsp),%rdi
shl    $0x6,%rdi
add    %r13,%rdi
add    $0x30,%rdi
xor    %ebx,%ebx
nopl   0x0(%rax)
movsd  -0x30(%rdi),%xmm0
movsd  -0x10(%rdi),%xmm1
movhpd -0x20(%rdi),%xmm0
movhpd (%rdi),%xmm1
mov    %rbx,%rbp
and    %rsi,%rbp
movupd %xmm0,(%r8,%rbp,8)
movupd %xmm1,0x10(%r8,%rbp,8)
add    $0x4,%rbx
add    $0x40,%rdi
cmp    %rbx,%rdx
jne    15a0 <CosPmlTableGen+0x3e0>
mov    0x10(%rsp),%r14
mov    0x8(%rsp),%rsi
mov    %rcx,%rdx
and    $0xfffffffffffffffe,%rdx
lea    (%r8,%rdx,4),%rdx
nopl   0x0(%rax,%rax,1)
movsd  (%rsi,%rcx,8),%xmm0
movsd  %xmm0,(%rdx)
add    $0x2,%rcx
add    $0x8,%rdx
cmp    %rax,%rcx
jbe    15f0 <CosPmlTableGen+0x430>
mov    %r12d,%eax
not    %eax
add    %r14d,%eax
mov    %eax,0x48(%rsp)
test   %eax,%eax
mov    0x20(%rsp),%rdi
jle    1a4b <CosPmlTableGen+0x88b>
mov    %r15d,%eax
shr    $0x1f,%eax
add    %r15d,%eax
sar    %eax
cltq
lea    (%r8,%rax,8),%rax
add    $0x8,%rax
mov    %rax,0x18(%rsp)
mov    0x10(%rsp),%rax
lea    0x0(,%rax,8),%eax
mov    %eax,0x44(%rsp)
movslq %r15d,%rbp
lea    0x2(%rbp),%rcx
mov    (%rsp),%rax
shl    $0x6,%rax
lea    (%rax,%r13,1),%rdx
add    $0x8,%rdx
mov    %rdx,0x30(%rsp)
lea    0x30(%rax,%r13,1),%rdx
mov    %rdx,0x68(%rsp)
add    %r13,%rax
add    $0x38,%rax
mov    %rax,0x70(%rsp)
xor    %edx,%edx
mov    %rcx,0x78(%rsp)
jmp    16e9 <CosPmlTableGen+0x529>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ebp,%eax
shr    $0x1f,%eax
add    %ebp,%eax
sar    %eax
cltq
lea    (%r8,%rax,8),%r8
add    $0x8,%r8
mov    %r8,0x18(%rsp)
mov    0x58(%rsp),%r13
mov    %r13,%rdi
mov    %r15,%rsi
mov    0x44(%rsp),%ebx
mov    %ebx,%edx
call   10b0 <memcpy@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %ebx,%edx
call   10b0 <memcpy@plt>
mov    (%rsp),%rdx
add    $0x1,%rdx
mov    0x28(%rsp),%rcx
add    $0x1,%rcx
cmp    0x48(%rsp),%edx
mov    %r15,%rdi
je     1a4b <CosPmlTableGen+0x88b>
cmp    $0x4,%rcx
mov    $0x3,%eax
cmovge %rcx,%rax
mov    %rax,0xa8(%rsp)
cmp    $0x3,%rcx
mov    $0x2,%eax
mov    %rcx,0x28(%rsp)
cmovge %rcx,%rax
mov    %rax,0xa0(%rsp)
mov    0x78(%rsp),%rax
lea    (%rax,%rdx,1),%r14
cmp    $0x3,%r14
mov    %rdx,(%rsp)
mov    $0x2,%ebx
cmovge %r14,%rbx
mov    $0x2,%eax
cmovge %r14,%rax
mov    %rax,0xb0(%rsp)
mov    $0x3,%eax
cmovg  %r14,%rax
mov    %rax,0xb8(%rsp)
mov    %rbp,0xc0(%rsp)
mov    $0x3,%eax
cmovle %rax,%r14
mov    0x50(%rsp),%r15
lea    (%rdx,%r15,1),%esi
mov    %esi,0x4c(%rsp)
mov    %rdi,%r12
mov    %r15d,%edi
call   1090 <L2_cn@plt>
mov    %eax,%edi
mov    %r13,%rsi
mov    0x60(%rsp),%rdx
mov    0x10(%rsp),%r13
mov    %r13d,%ecx
call   10c0 <vec_mul@plt>
mov    %r12,%rdi
mov    0x80(%rsp),%rsi
mov    0x98(%rsp),%r12
mov    %r12,%rdx
mov    %r13d,%ecx
call   10e0 <vec_pt_mul@plt>
mov    %r15d,%edi
mov    0x4c(%rsp),%esi
call   1040 <L2_an@plt>
mov    %eax,%edi
mov    %r12,%rsi
mov    0x90(%rsp),%r15
mov    %r15,%rdx
mov    %r13d,%ecx
call   10c0 <vec_mul@plt>
mov    %r15,%rdi
mov    0x60(%rsp),%rsi
mov    0x88(%rsp),%r12
mov    %r12,%rdx
mov    %r13d,%ecx
call   1080 <vec_add@plt>
mov    %r12,%rdi
mov    0x8(%rsp),%rsi
mov    0x38(%rsp),%rdx
mov    %r13d,%ecx
mov    %r13d,%r8d
mov    $0x1,%r9d
call   1050 <kFCT@plt>
mov    0xc0(%rsp),%rcx
lea    0x1(%rcx),%rbp
testb  $0x1,(%rsp)
jne    1940 <CosPmlTableGen+0x780>
test   %rcx,%rcx
mov    0x20(%rsp),%r15
mov    0x8(%rsp),%rdi
mov    0x18(%rsp),%r8
js     1690 <CosPmlTableGen+0x4d0>
mov    0xb8(%rsp),%rsi
add    $0xfffffffffffffffe,%rsi
mov    $0x1,%eax
cmp    $0x7,%rsi
jbe    1913 <CosPmlTableGen+0x753>
add    $0xfffffffffffffffe,%r14
mov    %r14,%rcx
movabs $0x1ffffffffffffffe,%rdx
ff ff 1f
and    %rdx,%rcx
mov    0x30(%rsp),%rdx
lea    (%rdx,%rcx,8),%rcx
add    $0x8,%rcx
cmp    %rcx,%r8
jae    1894 <CosPmlTableGen+0x6d4>
shr    %r14
lea    (%r8,%r14,8),%rcx
add    $0x8,%rcx
cmp    %rcx,0x30(%rsp)
jb     1913 <CosPmlTableGen+0x753>
mov    0xa8(%rsp),%r9
add    $0xfffffffffffffffe,%r9
shr    %r9
shr    %rsi
add    $0x1,%rsi
mov    %esi,%ecx
and    $0x3,%ecx
test   %rcx,%rcx
mov    $0x4,%eax
cmove  %rax,%rcx
sub    %rcx,%rsi
lea    (%rsi,%rsi,1),%rax
add    $0x1,%rax
sub    %rcx,%r9
add    $0x1,%r9
mov    0x70(%rsp),%rcx
xor    %edx,%edx
movabs $0x7ffffffffffffffc,%rbx
ff ff 7f
xchg   %ax,%ax
movsd  -0x30(%rcx),%xmm0
movsd  -0x10(%rcx),%xmm1
movhpd -0x20(%rcx),%xmm0
movhpd (%rcx),%xmm1
mov    %rdx,%rsi
and    %rbx,%rsi
movupd %xmm0,(%r8,%rsi,8)
movupd %xmm1,0x10(%r8,%rsi,8)
add    $0x4,%rdx
add    $0x40,%rcx
cmp    %rdx,%r9
jne    18e0 <CosPmlTableGen+0x720>
mov    %rax,%rcx
and    $0xfffffffffffffffe,%rcx
lea    (%r8,%rcx,4),%rcx
xchg   %ax,%ax
movsd  (%rdi,%rax,8),%xmm0
movsd  %xmm0,(%rcx)
add    $0x2,%rax
add    $0x8,%rcx
cmp    %rbp,%rax
jle    1920 <CosPmlTableGen+0x760>
jmp    1690 <CosPmlTableGen+0x4d0>
nopl   0x0(%rax,%rax,1)
cmp    $0xffffffffffffffff,%rcx
mov    0x20(%rsp),%r15
mov    0x8(%rsp),%rsi
mov    0x18(%rsp),%r8
jl     1690 <CosPmlTableGen+0x4d0>
add    $0xffffffffffffffff,%rbx
cmp    $0x7,%rbx
jbe    199d <CosPmlTableGen+0x7dd>
mov    0xb0(%rsp),%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,%rax
movabs $0x1ffffffffffffffe,%rcx
ff ff 1f
and    %rcx,%rax
mov    0x30(%rsp),%rcx
lea    (%rcx,%rax,8),%rax
cmp    %rax,%r8
jae    19a4 <CosPmlTableGen+0x7e4>
shr    %rdx
lea    (%r8,%rdx,8),%rax
add    $0x8,%rax
cmp    %rax,%rsi
jae    19a4 <CosPmlTableGen+0x7e4>
xor    %ebx,%ebx
jmp    1a23 <CosPmlTableGen+0x863>
mov    0xa0(%rsp),%r9
add    $0xffffffffffffffff,%r9
shr    %r9
shr    %rbx
add    $0x1,%rbx
mov    %ebx,%eax
and    $0x3,%eax
test   %rax,%rax
mov    $0x4,%ecx
cmove  %rcx,%rax
sub    %rax,%rbx
add    %rbx,%rbx
sub    %rax,%r9
add    $0x1,%r9
mov    0x68(%rsp),%rax
xor    %ecx,%ecx
movabs $0x7ffffffffffffffc,%rdi
ff ff 7f
nopl   0x0(%rax)
movsd  -0x30(%rax),%xmm0
movsd  -0x10(%rax),%xmm1
movhpd -0x20(%rax),%xmm0
movhpd (%rax),%xmm1
mov    %rcx,%rdx
and    %rdi,%rdx
movupd %xmm0,(%r8,%rdx,8)
movupd %xmm1,0x10(%r8,%rdx,8)
add    $0x4,%rcx
add    $0x40,%rax
cmp    %rcx,%r9
jne    19f0 <CosPmlTableGen+0x830>
mov    %rbx,%rax
and    $0xfffffffffffffffe,%rax
lea    (%r8,%rax,4),%rax
xchg   %ax,%ax
movsd  (%rsi,%rbx,8),%xmm0
movsd  %xmm0,(%rax)
add    $0x2,%rbx
add    $0x8,%rax
cmp    %rbp,%rbx
jle    1a30 <CosPmlTableGen+0x870>
jmp    1690 <CosPmlTableGen+0x4d0>
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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