#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*/ memcpy(double *, double *, size_t);
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 PmlTableGen(int bw, int m, double *storeplm, double *workspace) {
  double *prev, *prevprev, *temp1, *temp2, *temp3, *temp4, *x_i, *eval_args;
  int i;
  prevprev = workspace;
  prev = prevprev + (2 * bw);
  temp1 = prev + (2 * bw);
  temp2 = temp1 + (2 * bw);
  temp3 = temp2 + (2 * bw);
  temp4 = temp3 + (2 * bw);
  x_i = temp4 + (2 * bw);
  eval_args = x_i + (2 * bw);
  EvalPts(2 * bw, x_i);
  ArcCosEvalPts(2 * bw, eval_args);
  for (i = 0; i < 2 * bw; i++)
    prevprev[i] = 0.0;
  if (m == 0)
    for (i = 0; i < 2 * bw; i++) {
      prev[i] = 0.707106781186547;
    }
  else
    Pmm_L2(m, eval_args, 2 * bw, prev);
  memcpy(storeplm, prev, (size_t)sizeof(double) * 2 * bw);
  for (i = 0; i < bw - m - 1; i++) {
    vec_mul(L2_cn(m, m + i), prevprev, temp1, 2 * bw);
    vec_pt_mul(prev, x_i, temp2, 2 * bw);
    vec_mul(L2_an(m, m + i), temp2, temp3, 2 * bw);
    vec_add(temp3, temp1, temp4, 2 * bw);
    storeplm += (2 * bw);
    memcpy(storeplm, temp4, (size_t)sizeof(double) * 2 * bw);
    memcpy(prevprev, prev, (size_t)sizeof(double) * 2 * bw);
    memcpy(prev, temp4, (size_t)sizeof(double) * 2 * bw);
  }
}


x86 assembly (clang, -O0):
<PmlTableGen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%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
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x4(%rbp),%edi
shl    $0x1,%edi
mov    -0x50(%rbp),%rsi
call   10a0 <EvalPts@plt>
mov    -0x4(%rbp),%edi
shl    $0x1,%edi
mov    -0x58(%rbp),%rsi
call   1050 <ArcCosEvalPts@plt>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jge    12aa <PmlTableGen+0x11a>
mov    -0x28(%rbp),%rax
movslq -0x5c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    127b <PmlTableGen+0xeb>
cmpl   $0x0,-0x8(%rbp)
jne    12f4 <PmlTableGen+0x164>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jge    12ef <PmlTableGen+0x15f>
mov    -0x20(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  0xd24(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    12bb <PmlTableGen+0x12b>
jmp    130a <PmlTableGen+0x17a>
mov    -0x8(%rbp),%edi
mov    -0x58(%rbp),%rsi
mov    -0x4(%rbp),%edx
shl    $0x1,%edx
mov    -0x20(%rbp),%rcx
call   1030 <Pmm_L2@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
movslq -0x4(%rbp),%rdx
shl    $0x4,%rdx
call   1080 <memcpy@plt>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1413 <PmlTableGen+0x283>
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
add    -0x5c(%rbp),%esi
call   1070 <L2_cn@plt>
mov    %eax,%edi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
call   1090 <vec_mul@plt>
mov    -0x20(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
call   10b0 <vec_pt_mul@plt>
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
add    -0x5c(%rbp),%esi
call   1040 <L2_an@plt>
mov    %eax,%edi
mov    -0x38(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
call   1090 <vec_mul@plt>
mov    -0x40(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
call   1060 <vec_add@plt>
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x48(%rbp),%rsi
movslq -0x4(%rbp),%rdx
shl    $0x4,%rdx
call   1080 <memcpy@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
movslq -0x4(%rbp),%rdx
shl    $0x4,%rdx
call   1080 <memcpy@plt>
mov    -0x20(%rbp),%rdi
mov    -0x48(%rbp),%rsi
movslq -0x4(%rbp),%rdx
shl    $0x4,%rdx
call   1080 <memcpy@plt>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1326 <PmlTableGen+0x196>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PmlTableGen>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %rcx,%r14
mov    %rdx,0x28(%rsp)
mov    %esi,%r13d
mov    %edi,%r12d
lea    (%r12,%r12,1),%ebx
movslq %ebx,%rbp
lea    (%rcx,%rbp,8),%rax
mov    %rax,0x18(%rsp)
lea    (%rax,%rbp,8),%rax
mov    %rax,0x38(%rsp)
lea    (%rax,%rbp,8),%rax
mov    %rax,0x60(%rsp)
lea    (%rax,%rbp,8),%rax
mov    %rax,0x58(%rsp)
lea    (%rax,%rbp,8),%rax
mov    %rax,0x50(%rsp)
lea    (%rax,%rbp,8),%rsi
lea    (%rsi,%rbp,8),%r15
mov    %ebp,%edi
mov    %rsi,0x40(%rsp)
call   10b0 <EvalPts@plt>
mov    %rbp,0x8(%rsp)
mov    %ebp,%edi
mov    %r15,%rsi
call   1050 <ArcCosEvalPts@plt>
mov    %r12,0x20(%rsp)
test   %r12d,%r12d
mov    %r14,0x30(%rsp)
jle    1262 <PmlTableGen+0xc2>
cmp    $0x2,%ebx
mov    $0x1,%r12d
mov    $0x1,%edx
cmovge %ebx,%edx
shl    $0x3,%rdx
mov    %r14,%rdi
xor    %esi,%esi
call   1060 <memset@plt>
test   %r13d,%r13d
mov    0x18(%rsp),%rbp
mov    %r13d,%r14d
jne    1273 <PmlTableGen+0xd3>
cmp    $0x2,%ebx
cmovge %ebx,%r12d
cmp    $0x4,%r12d
jae    1288 <PmlTableGen+0xe8>
xor    %eax,%eax
jmp    138c <PmlTableGen+0x1ec>
test   %r13d,%r13d
mov    0x18(%rsp),%rbp
mov    %r13d,%r14d
je     13ae <PmlTableGen+0x20e>
mov    %r14d,%edi
mov    %r15,%rsi
mov    %ebx,%edx
mov    %rbp,%rcx
call   1030 <Pmm_L2@plt>
jmp    13ae <PmlTableGen+0x20e>
mov    %r12d,%eax
and    $0x7ffffffc,%eax
lea    -0x4(%rax),%rsi
mov    %rsi,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edx,%ecx
and    $0x7,%ecx
cmp    $0x1c,%rsi
jae    12bb <PmlTableGen+0x11b>
xor    %esi,%esi
mov    0x8(%rsp),%rbp
mov    0x30(%rsp),%r8
jmp    134e <PmlTableGen+0x1ae>
and    $0xfffffffffffffff8,%rdx
mov    0x8(%rsp),%rbp
mov    0x30(%rsp),%r8
lea    (%r8,%rbp,8),%rdi
add    $0xf0,%rdi
xor    %esi,%esi
movaps 0xd23(%rip),%xmm0
nopl   (%rax)
movups %xmm0,-0xf0(%rdi,%rsi,8)
ff
movups %xmm0,-0xe0(%rdi,%rsi,8)
ff
movups %xmm0,-0xd0(%rdi,%rsi,8)
ff
movups %xmm0,-0xc0(%rdi,%rsi,8)
ff
movups %xmm0,-0xb0(%rdi,%rsi,8)
ff
movups %xmm0,-0xa0(%rdi,%rsi,8)
ff
movups %xmm0,-0x90(%rdi,%rsi,8)
ff
movups %xmm0,-0x80(%rdi,%rsi,8)
movups %xmm0,-0x70(%rdi,%rsi,8)
movups %xmm0,-0x60(%rdi,%rsi,8)
movups %xmm0,-0x50(%rdi,%rsi,8)
movups %xmm0,-0x40(%rdi,%rsi,8)
movups %xmm0,-0x30(%rdi,%rsi,8)
movups %xmm0,-0x20(%rdi,%rsi,8)
movups %xmm0,-0x10(%rdi,%rsi,8)
movups %xmm0,(%rdi,%rsi,8)
add    $0x20,%rsi
add    $0xfffffffffffffff8,%rdx
jne    12e0 <PmlTableGen+0x140>
test   %rcx,%rcx
je     1382 <PmlTableGen+0x1e2>
add    %rbp,%rsi
lea    (%r8,%rsi,8),%rdx
add    $0x10,%rdx
shl    $0x5,%rcx
xor    %esi,%esi
movaps 0xc95(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
movups %xmm0,-0x10(%rdx,%rsi,1)
movups %xmm0,(%rdx,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%rcx
jne    1370 <PmlTableGen+0x1d0>
cmp    %r12,%rax
mov    0x18(%rsp),%rbp
je     13ae <PmlTableGen+0x20e>
movabs $0x3fe6a09e667f3bc8,%rcx
a0 e6 3f
cs nopw 0x0(%rax,%rax,1)
mov    %rcx,0x0(%rbp,%rax,8)
add    $0x1,%rax
cmp    %rax,%r12
jne    13a0 <PmlTableGen+0x200>
mov    %r14d,0x14(%rsp)
mov    %ebx,%r15d
mov    0x20(%rsp),%rbx
movslq %ebx,%rdx
shl    $0x4,%rdx
mov    0x28(%rsp),%r13
mov    %r13,%rdi
mov    %rbp,%rsi
mov    %rdx,0x48(%rsp)
call   1090 <memcpy@plt>
not    %r14d
add    %ebx,%r14d
test   %r14d,%r14d
mov    %r15d,%ebx
mov    0x8(%rsp),%rcx
mov    0x38(%rsp),%r12
mov    0x40(%rsp),%r15
jle    1504 <PmlTableGen+0x364>
mov    0x20(%rsp),%rax
add    $0xffffffff,%eax
mov    %rax,0x20(%rsp)
lea    0x0(,%rcx,8),%rax
add    %r13,%rax
mov    %rax,0x28(%rsp)
shl    $0x3,%rcx
mov    0x14(%rsp),%r13d
mov    %rcx,0x8(%rsp)
mov    %ebx,0x4(%rsp)
nopw   0x0(%rax,%rax,1)
mov    0x14(%rsp),%ebp
mov    %ebp,%edi
mov    %r13d,%esi
call   1080 <L2_cn@plt>
mov    %eax,%edi
mov    0x30(%rsp),%rsi
mov    %r12,%rdx
mov    %ebx,%ecx
call   10a0 <vec_mul@plt>
mov    0x18(%rsp),%rbx
mov    %rbx,%rdi
mov    %r15,%rsi
mov    0x60(%rsp),%r14
mov    %r14,%rdx
mov    0x4(%rsp),%ecx
call   10c0 <vec_pt_mul@plt>
mov    %ebp,%edi
mov    %r13d,%esi
call   1040 <L2_an@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    0x58(%rsp),%rbp
mov    %rbp,%rdx
mov    0x4(%rsp),%ecx
call   10a0 <vec_mul@plt>
mov    %rbp,%rdi
mov    0x38(%rsp),%rsi
mov    0x50(%rsp),%r15
mov    %r15,%rdx
mov    0x4(%rsp),%ecx
call   1070 <vec_add@plt>
mov    0x28(%rsp),%rbp
mov    %rbp,%rdi
mov    %r15,%rsi
mov    0x48(%rsp),%r14
mov    %r14,%rdx
call   1090 <memcpy@plt>
mov    0x30(%rsp),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1090 <memcpy@plt>
mov    %rbx,%rdi
mov    0x38(%rsp),%r12
mov    0x4(%rsp),%ebx
mov    %r15,%rsi
mov    %r14,%rdx
mov    0x40(%rsp),%r15
call   1090 <memcpy@plt>
mov    0x8(%rsp),%rcx
add    $0x1,%r13d
add    %rcx,%rbp
mov    %rbp,0x28(%rsp)
cmp    %r13d,0x20(%rsp)
jne    1430 <PmlTableGen+0x290>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @PmlTableGen(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 i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store double* %2, double** %7
store double* %3, double** %8
%18 = load double*, double** %8
store double* %18, double** %10
%19 = load double*, double** %10
%20 = load i32, i32* %5
%21 = mul nsw i32 2, %20
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds double, double* %19, i64 %22
store double* %23, double** %9
%24 = load double*, double** %9
%25 = load i32, i32* %5
%26 = mul nsw i32 2, %25
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds double, double* %24, i64 %27
store double* %28, double** %11
%29 = load double*, double** %11
%30 = load i32, i32* %5
%31 = mul nsw i32 2, %30
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds double, double* %29, i64 %32
store double* %33, double** %12
%34 = load double*, double** %12
%35 = load i32, i32* %5
%36 = mul nsw i32 2, %35
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds double, double* %34, i64 %37
store double* %38, double** %13
%39 = load double*, double** %13
%40 = load i32, i32* %5
%41 = mul nsw i32 2, %40
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds double, double* %39, i64 %42
store double* %43, double** %14
%44 = load double*, double** %14
%45 = load i32, i32* %5
%46 = mul nsw i32 2, %45
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds double, double* %44, i64 %47
store double* %48, double** %15
%49 = load double*, double** %15
%50 = load i32, i32* %5
%51 = mul nsw i32 2, %50
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds double, double* %49, i64 %52
store double* %53, double** %16
%54 = load i32, i32* %5
%55 = mul nsw i32 2, %54
%56 = load double*, double** %15
%57 = call i32 @EvalPts(i32 %55, double* %56)
%58 = load i32, i32* %5
%59 = mul nsw i32 2, %58
%60 = load double*, double** %16
%61 = call i32 @ArcCosEvalPts(i32 %59, double* %60)
store i32 0, i32* %17
br label %62
62: ; preds = %72, %4
%63 = load i32, i32* %17
%64 = load i32, i32* %5
%65 = mul nsw i32 2, %64
%66 = icmp slt i32 %63, %65
br i1 %66, label %67, label %75
67: ; preds = %62
%68 = load double*, double** %10
%69 = load i32, i32* %17
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds double, double* %68, i64 %70
store double 0.000000e+00, double* %71
br label %72
72: ; preds = %67
%73 = load i32, i32* %17
%74 = add nsw i32 %73, 1
store i32 %74, i32* %17
br label %62
75: ; preds = %62
%76 = load i32, i32* %6
%77 = icmp eq i32 %76, 0
br i1 %77, label %78, label %93
78: ; preds = %75
store i32 0, i32* %17
br label %79
79: ; preds = %89, %78
%80 = load i32, i32* %17
%81 = load i32, i32* %5
%82 = mul nsw i32 2, %81
%83 = icmp slt i32 %80, %82
br i1 %83, label %84, label %92
84: ; preds = %79
%85 = load double*, double** %9
%86 = load i32, i32* %17
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds double, double* %85, i64 %87
store double 0x3FE6A09E667F3BC8, double* %88
br label %89
89: ; preds = %84
%90 = load i32, i32* %17
%91 = add nsw i32 %90, 1
store i32 %91, i32* %17
br label %79
92: ; preds = %79
br label %100
93: ; preds = %75
%94 = load i32, i32* %6
%95 = load double*, double** %16
%96 = load i32, i32* %5
%97 = mul nsw i32 2, %96
%98 = load double*, double** %9
%99 = call i32 @Pmm_L2(i32 %94, double* %95, i32 %97, double* %98)
br label %100
100: ; preds = %93, %92
%101 = load double*, double** %7
%102 = load double*, double** %9
%103 = load i32, i32* %5
%104 = sext i32 %103 to i64
%105 = mul i64 16, %104
%106 = call i32 @memcpy(double* %101, double* %102, i64 %105)
store i32 0, i32* %17
br label %107
107: ; preds = %170, %100
%108 = load i32, i32* %17
%109 = load i32, i32* %5
%110 = load i32, i32* %6
%111 = sub nsw i32 %109, %110
%112 = sub nsw i32 %111, 1
%113 = icmp slt i32 %108, %112
br i1 %113, label %114, label %173
114: ; preds = %107
%115 = load i32, i32* %6
%116 = load i32, i32* %6
%117 = load i32, i32* %17
%118 = add nsw i32 %116, %117
%119 = call i32 @L2_cn(i32 %115, i32 %118)
%120 = load double*, double** %10
%121 = load double*, double** %11
%122 = load i32, i32* %5
%123 = mul nsw i32 2, %122
%124 = call i32 @vec_mul(i32 %119, double* %120, double* %121, i32 %123)
%125 = load double*, double** %9
%126 = load double*, double** %15
%127 = load double*, double** %12
%128 = load i32, i32* %5
%129 = mul nsw i32 2, %128
%130 = call i32 @vec_pt_mul(double* %125, double* %126, double* %127, i32 %129)
%131 = load i32, i32* %6
%132 = load i32, i32* %6
%133 = load i32, i32* %17
%134 = add nsw i32 %132, %133
%135 = call i32 @L2_an(i32 %131, i32 %134)
%136 = load double*, double** %12
%137 = load double*, double** %13
%138 = load i32, i32* %5
%139 = mul nsw i32 2, %138
%140 = call i32 @vec_mul(i32 %135, double* %136, double* %137, i32 %139)
%141 = load double*, double** %13
%142 = load double*, double** %11
%143 = load double*, double** %14
%144 = load i32, i32* %5
%145 = mul nsw i32 2, %144
%146 = call i32 @vec_add(double* %141, double* %142, double* %143, i32 %145)
%147 = load i32, i32* %5
%148 = mul nsw i32 2, %147
%149 = load double*, double** %7
%150 = sext i32 %148 to i64
%151 = getelementptr inbounds double, double* %149, i64 %150
store double* %151, double** %7
%152 = load double*, double** %7
%153 = load double*, double** %14
%154 = load i32, i32* %5
%155 = sext i32 %154 to i64
%156 = mul i64 16, %155
%157 = call i32 @memcpy(double* %152, double* %153, i64 %156)
%158 = load double*, double** %10
%159 = load double*, double** %9
%160 = load i32, i32* %5
%161 = sext i32 %160 to i64
%162 = mul i64 16, %161
%163 = call i32 @memcpy(double* %158, double* %159, i64 %162)
%164 = load double*, double** %9
%165 = load double*, double** %14
%166 = load i32, i32* %5
%167 = sext i32 %166 to i64
%168 = mul i64 16, %167
%169 = call i32 @memcpy(double* %164, double* %165, i64 %168)
br label %170
170: ; preds = %114
%171 = load i32, i32* %17
%172 = add nsw i32 %171, 1
store i32 %172, i32* %17
br label %107
173: ; preds = %107
ret void
}

LLVM IR (-O2):
define void @PmlTableGen(i32 %0, i32 %1, double* %2, double* %3) {
%5 = shl nsw i32 %0, 1
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds double, double* %3, i64 %6
%8 = getelementptr inbounds double, double* %7, i64 %6
%9 = getelementptr inbounds double, double* %8, i64 %6
%10 = getelementptr inbounds double, double* %9, i64 %6
%11 = getelementptr inbounds double, double* %10, i64 %6
%12 = getelementptr inbounds double, double* %11, i64 %6
%13 = getelementptr inbounds double, double* %12, i64 %6
%14 = tail call i32 @EvalPts(i32 %5, double* %12)
%15 = tail call i32 @ArcCosEvalPts(i32 %5, double* %13)
%16 = icmp sgt i32 %0, 0
br i1 %16, label %17, label %23
17: ; preds = %4
%18 = bitcast double* %3 to i8*
%19 = call i32 @llvm.smax.i32(i32 %5, i32 1)
%20 = zext i32 %19 to i64
%21 = shl nuw nsw i64 %20, 3
%22 = icmp eq i32 %1, 0
br i1 %22, label %25, label %105
23: ; preds = %4
%24 = icmp eq i32 %1, 0
br i1 %24, label %107, label %105
25: ; preds = %17
%26 = call i32 @llvm.smax.i32(i32 %5, i32 1)
%27 = zext i32 %26 to i64
%28 = icmp ult i32 %26, 4
br i1 %28, label %98, label %29
29: ; preds = %25
%30 = and i64 %27, 2147483644
%31 = add nsw i64 %30, -4
%32 = lshr exact i64 %31, 2
%33 = add nuw nsw i64 %32, 1
%34 = and i64 %33, 7
%35 = icmp ult i64 %31, 28
br i1 %35, label %83, label %36
36: ; preds = %29
%37 = and i64 %33, 9223372036854775800
br label %38
38: ; preds = %38, %36
%39 = phi i64 [ 0, %36 ], [ %80, %38 ]
%40 = phi i64 [ 0, %36 ], [ %81, %38 ]
%41 = getelementptr inbounds double, double* %7, i64 %39
%42 = bitcast double* %41 to <2 x double>*
store <2 x double> <double 0x3FE6A09E667F3BC8, double 0x3FE6A09E667F3BC8>, <2 x double>* %42
%43 = getelementptr inbounds double, double* %41, i64 2
%44 = bitcast double* %43 to <2 x double>*
store <2 x double> <double 0x3FE6A09E667F3BC8, double 0x3FE6A09E667F3BC8>, <2 x double>* %44
%45 = or i64 %39, 4
%46 = getelementptr inbounds double, double* %7, i64 %45
%47 = bitcast double* %46 to <2 x double>*
store <2 x double> <double 0x3FE6A09E667F3BC8, double 0x3FE6A09E667F3BC8>, <2 x double>* %47
%48 = getelementptr inbounds double, double* %46, i64 2
%49 = bitcast double* %48 to <2 x double>*
store <2 x double> <double 0x3FE6A09E667F3BC8, double 0x3FE6A09E667F3BC8>, <2 x double>* %49
%50 = or i64 %39, 8
%51 = getelementptr inbounds double, double* %7, i64 %50
%52 = bitcast double* %51 to <2 x double>*
store <2 x double> <double 0x3FE6A09E667F3BC8, double 0x3FE6A09E667F3BC8>, <2 x double>* %52
%53 = getelementptr inbounds double, double* %51, i64 2
%54 = bitcast double* %53 to <2 x double>*
store <2 x double> <double 0x3FE6A09E667F3BC8, double 0x3FE6A09E667F3BC8>, <2 x double>* %54
%55 = or i64 %39, 12
%56 = getelementptr inbounds double, double* %7, i64 %55
%57 = bitcast double* %56 to <2 x double>*
store <2 x double> <double 0x3FE6A09E667F3BC8, double 0x3FE6A09E667F3BC8>, <2 x double>* %57
%58 = getelementptr inbounds double, double* %56, i64 2
%59 = bitcast double* %58 to <2 x double>*
store <2 x double> <double 0x3FE6A09E667F3BC8, double 0x3FE6A09E667F3BC8>, <2 x double>* %59
%60 = or i64 %39, 16
%61 = getelementptr inbounds double, double* %7, i64 %60
%62 = bitcast double* %61 to <2 x double>*
store <2 x double> <double 0x3FE6A09E667F3BC8, double 0x3FE6A09E667F3BC8>, <2 x double>* %62
%63 = getelementptr inbounds double, double* %61, i64 2
%64 = bitcast double* %63 to <2 x double>*
store <2 x double> <double 0x3FE6A09E667F3BC8, double 0x3FE6A09E667F3BC8>, <2 x double>* %64
%65 = or i64 %39, 20
%66 = getelementptr inbounds double, double* %7, i64 %65
%67 = bitcast double* %66 to <2 x double>*
store <2 x double> <double 0x3FE6A09E667F3BC8, double 0x3FE6A09E667F3BC8>, <2 x double>* %67
%68 = getelementptr inbounds double, double* %66, i64 2
%69 = bitcast double* %68 to <2 x double>*
store <2 x double> <double 0x3FE6A09E667F3BC8, double 0x3FE6A09E667F3BC8>, <2 x double>* %69
%70 = or i64 %39, 24
%71 = getelementptr inbounds double, double* %7, i64 %70
%72 = bitcast double* %71 to <2 x double>*
store <2 x double> <double 0x3FE6A09E667F3BC8, double 0x3FE6A09E667F3BC8>, <2 x double>* %72
%73 = getelementptr inbounds double, double* %71, i64 2
%74 = bitcast double* %73 to <2 x double>*
store <2 x double> <double 0x3FE6A09E667F3BC8, double 0x3FE6A09E667F3BC8>, <2 x double>* %74
%75 = or i64 %39, 28
%76 = getelementptr inbounds double, double* %7, i64 %75
%77 = bitcast double* %76 to <2 x double>*
store <2 x double> <double 0x3FE6A09E667F3BC8, double 0x3FE6A09E667F3BC8>, <2 x double>* %77
%78 = getelementptr inbounds double, double* %76, i64 2
%79 = bitcast double* %78 to <2 x double>*
store <2 x double> <double 0x3FE6A09E667F3BC8, double 0x3FE6A09E667F3BC8>, <2 x double>* %79
%80 = add nuw i64 %39, 32
%81 = add i64 %40, 8
%82 = icmp eq i64 %81, %37
br i1 %82, label %83, label %38
83: ; preds = %38, %29
%84 = phi i64 [ 0, %29 ], [ %80, %38 ]
%85 = icmp eq i64 %34, 0
br i1 %85, label %96, label %86
86: ; preds = %83, %86
%87 = phi i64 [ %93, %86 ], [ %84, %83 ]
%88 = phi i64 [ %94, %86 ], [ 0, %83 ]
%89 = getelementptr inbounds double, double* %7, i64 %87
%90 = bitcast double* %89 to <2 x double>*
store <2 x double> <double 0x3FE6A09E667F3BC8, double 0x3FE6A09E667F3BC8>, <2 x double>* %90
%91 = getelementptr inbounds double, double* %89, i64 2
%92 = bitcast double* %91 to <2 x double>*
store <2 x double> <double 0x3FE6A09E667F3BC8, double 0x3FE6A09E667F3BC8>, <2 x double>* %92
%93 = add nuw i64 %87, 4
%94 = add i64 %88, 1
%95 = icmp eq i64 %94, %34
br i1 %95, label %96, label %86
96: ; preds = %86, %83
%97 = icmp eq i64 %30, %27
br i1 %97, label %107, label %98
98: ; preds = %25, %96
%99 = phi i64 [ 0, %25 ], [ %30, %96 ]
br label %100
100: ; preds = %98, %100
%101 = phi i64 [ %103, %100 ], [ %99, %98 ]
%102 = getelementptr inbounds double, double* %7, i64 %101
store double 0x3FE6A09E667F3BC8, double* %102
%103 = add nuw nsw i64 %101, 1
%104 = icmp eq i64 %103, %27
br i1 %104, label %107, label %100
105: ; preds = %23, %17
%106 = tail call i32 @Pmm_L2(i32 %1, double* %13, i32 %5, double* %7)
br label %107
107: ; preds = %100, %96, %23, %105
%108 = sext i32 %0 to i64
%109 = shl nsw i64 %108, 4
%110 = tail call i32 @memcpy(double* %2, double* %7, i64 %109)
%111 = xor i32 %1, -1
%112 = add i32 %111, %0
%113 = icmp sgt i32 %112, 0
br i1 %113, label %114, label %130
114: ; preds = %107, %114
%115 = phi i32 [ %128, %114 ], [ 0, %107 ]
%116 = phi double* [ %124, %114 ], [ %2, %107 ]
%117 = add nsw i32 %115, %1
%118 = tail call i32 @L2_cn(i32 %1, i32 %117)
%119 = tail call i32 @vec_mul(i32 %118, double* %3, double* %8, i32 %5)
%120 = tail call i32 @vec_pt_mul(double* %7, double* %12, double* %9, i32 %5)
%121 = tail call i32 @L2_an(i32 %1, i32 %117)
%122 = tail call i32 @vec_mul(i32 %121, double* %9, double* %10, i32 %5)
%123 = tail call i32 @vec_add(double* %10, double* %8, double* %11, i32 %5)
%124 = getelementptr inbounds double, double* %116, i64 %6
%125 = tail call i32 @memcpy(double* %124, double* %11, i64 %109)
%126 = tail call i32 @memcpy(double* %3, double* %7, i64 %109)
%127 = tail call i32 @memcpy(double* %7, double* %11, i64 %109)
%128 = add nuw nsw i32 %115, 1
%129 = icmp eq i32 %128, %112
br i1 %129, label %130, label %114
130: ; preds = %114, %107
ret void
}