#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*/ assert(int);
double exp(double);
void makeP_Flex(double z1, double z2, double *rptr, double *EI, double *EIGN,
                int numberOfCategories, double *left, double *right,
                const int numStates) {
  int i, j, k;
  const int rates = numStates - 1, statesSquare = numStates * numStates;
  double lz1[64], lz2[64], d1[64], d2[64];
  assert(numStates <= 64);
  for (i = 0; i < rates; i++) {
    lz1[i] = EIGN[i] * z1;
    lz2[i] = EIGN[i] * z2;
  }
  for (i = 0; i < numberOfCategories; i++) {
    for (j = 0; j < rates; j++) {
      d1[j] = exp(rptr[i] * lz1[j]);
      d2[j] = exp(rptr[i] * lz2[j]);
    }
    for (j = 0; j < numStates; j++) {
      left[statesSquare * i + numStates * j] = 1.0;
      right[statesSquare * i + numStates * j] = 1.0;
      for (k = 1; k < numStates; k++) {
        left[statesSquare * i + numStates * j + k] =
            d1[k - 1] * EI[rates * j + (k - 1)];
        right[statesSquare * i + numStates * j + k] =
            d2[k - 1] * EI[rates * j + (k - 1)];
      }
    }
  }
}


x86 assembly (clang, -O0):
<makeP_Flex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x860,%rsp
mov    0x10(%rbp),%eax
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %ecx,-0x2c(%rbp)
mov    %r8,-0x38(%rbp)
mov    %r9,-0x40(%rbp)
mov    0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x50(%rbp)
mov    0x10(%rbp),%eax
imul   0x10(%rbp),%eax
mov    %eax,-0x54(%rbp)
cmpl   $0x40,0x10(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x50(%rbp),%eax
jge    11d2 <makeP_Flex+0xb2>
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x8(%rbp),%xmm0
movslq -0x44(%rbp),%rax
movsd  %xmm0,-0x260(%rbp,%rax,8)
ff ff
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x10(%rbp),%xmm0
movslq -0x44(%rbp),%rax
movsd  %xmm0,-0x460(%rbp,%rax,8)
ff ff
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    117a <makeP_Flex+0x5a>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1396 <makeP_Flex+0x276>
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x50(%rbp),%eax
jge    125e <makeP_Flex+0x13e>
mov    -0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x48(%rbp),%rax
mulsd  -0x260(%rbp,%rax,8),%xmm0
ff ff
call   1040 <exp@plt>
movslq -0x48(%rbp),%rax
movsd  %xmm0,-0x660(%rbp,%rax,8)
ff ff
mov    -0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x48(%rbp),%rax
mulsd  -0x460(%rbp,%rax,8),%xmm0
ff ff
call   1040 <exp@plt>
movslq -0x48(%rbp),%rax
movsd  %xmm0,-0x860(%rbp,%rax,8)
ff ff
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    11ec <makeP_Flex+0xcc>
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    1383 <makeP_Flex+0x263>
mov    -0x38(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0x44(%rbp),%ecx
mov    0x10(%rbp),%edx
imul   -0x48(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  0xd70(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0x44(%rbp),%ecx
mov    0x10(%rbp),%edx
imul   -0x48(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  0xd4c(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    1370 <makeP_Flex+0x250>
mov    -0x4c(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0x660(%rbp,%rax,8),%xmm0
ff ff
mov    -0x20(%rbp),%rax
mov    -0x50(%rbp),%ecx
imul   -0x48(%rbp),%ecx
mov    -0x4c(%rbp),%edx
sub    $0x1,%edx
add    %edx,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0x44(%rbp),%ecx
mov    0x10(%rbp),%edx
imul   -0x48(%rbp),%edx
add    %edx,%ecx
add    -0x4c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0x860(%rbp,%rax,8),%xmm0
ff ff
mov    -0x20(%rbp),%rax
mov    -0x50(%rbp),%ecx
imul   -0x48(%rbp),%ecx
mov    -0x4c(%rbp),%edx
sub    $0x1,%edx
add    %edx,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0x44(%rbp),%ecx
mov    0x10(%rbp),%edx
imul   -0x48(%rbp),%edx
add    %edx,%ecx
add    -0x4c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    12c0 <makeP_Flex+0x1a0>
jmp    1375 <makeP_Flex+0x255>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1265 <makeP_Flex+0x145>
jmp    1388 <makeP_Flex+0x268>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    11d9 <makeP_Flex+0xb9>
add    $0x860,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeP_Flex>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x918,%rsp
mov    %r9,0x10(%rsp)
mov    %r8,0x18(%rsp)
mov    %ecx,%r13d
mov    %rdx,%rbp
mov    %rsi,0x28(%rsp)
mov    %rdi,%r15
movapd %xmm1,0x30(%rsp)
movapd %xmm0,0x60(%rsp)
mov    0x950(%rsp),%r14d
lea    -0x1(%r14),%ebx
xor    %edi,%edi
cmp    $0x41,%r14d
setl   %dil
call   1030 <assert@plt>
movapd 0x60(%rsp),%xmm7
movapd 0x30(%rsp),%xmm6
mov    %ebx,%r12d
cmp    $0x2,%r14d
jl     12ed <makeP_Flex+0x1cd>
cmp    $0x4,%ebx
jae    1195 <makeP_Flex+0x75>
xor    %eax,%eax
jmp    12c0 <makeP_Flex+0x1a0>
mov    %r12d,%eax
and    $0xfffffffc,%eax
movapd %xmm7,%xmm1
unpcklpd %xmm7,%xmm1
movapd %xmm6,%xmm0
unpcklpd %xmm6,%xmm0
lea    -0x4(%rax),%rcx
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
test   %rcx,%rcx
je     1780 <makeP_Flex+0x660>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %ecx,%ecx
nopl   0x0(%rax)
movupd 0x0(%rbp,%rcx,8),%xmm2
movupd 0x10(%rbp,%rcx,8),%xmm3
movapd %xmm2,%xmm4
mulpd  %xmm1,%xmm4
movapd %xmm3,%xmm5
mulpd  %xmm1,%xmm5
movapd %xmm4,0x310(%rsp,%rcx,8)
movapd %xmm5,0x320(%rsp,%rcx,8)
mulpd  %xmm0,%xmm2
mulpd  %xmm0,%xmm3
movapd %xmm2,0x110(%rsp,%rcx,8)
movapd %xmm3,0x120(%rsp,%rcx,8)
movupd 0x20(%rbp,%rcx,8),%xmm2
movupd 0x30(%rbp,%rcx,8),%xmm3
movapd %xmm2,%xmm4
mulpd  %xmm1,%xmm4
movapd %xmm3,%xmm5
mulpd  %xmm1,%xmm5
movapd %xmm4,0x330(%rsp,%rcx,8)
movapd %xmm5,0x340(%rsp,%rcx,8)
mulpd  %xmm0,%xmm2
mulpd  %xmm0,%xmm3
movapd %xmm2,0x130(%rsp,%rcx,8)
movapd %xmm3,0x140(%rsp,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rsi
jne    11d0 <makeP_Flex+0xb0>
test   $0x1,%dl
je     12b7 <makeP_Flex+0x197>
movupd 0x0(%rbp,%rcx,8),%xmm2
movupd 0x10(%rbp,%rcx,8),%xmm3
movapd %xmm2,%xmm4
mulpd  %xmm1,%xmm4
mulpd  %xmm3,%xmm1
movapd %xmm4,0x310(%rsp,%rcx,8)
movapd %xmm1,0x320(%rsp,%rcx,8)
mulpd  %xmm0,%xmm2
mulpd  %xmm0,%xmm3
movapd %xmm2,0x110(%rsp,%rcx,8)
movapd %xmm3,0x120(%rsp,%rcx,8)
cmp    %r12,%rax
je     12ed <makeP_Flex+0x1cd>
nopl   0x0(%rax)
movsd  0x0(%rbp,%rax,8),%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm7,%xmm1
movsd  %xmm1,0x310(%rsp,%rax,8)
mulsd  %xmm6,%xmm0
movsd  %xmm0,0x110(%rsp,%rax,8)
add    $0x1,%rax
cmp    %rax,%r12
jne    12c0 <makeP_Flex+0x1a0>
test   %r13d,%r13d
jle    176e <makeP_Flex+0x64e>
movslq %ebx,%r8
mov    %r13d,%eax
mov    %rax,0x88(%rsp)
mov    %r14d,%eax
mov    0x18(%rsp),%r9
lea    0x8(%r9),%r10
mov    %r14d,%edi
imul   %edi,%edi
mov    %rdi,0x48(%rsp)
lea    (%r9,%rax,8),%rdi
mov    0x10(%rsp),%rbp
lea    0x8(%rbp),%rbx
lea    0x0(%rbp,%rax,8),%rdx
lea    -0x1(%rax),%rcx
mov    %rax,0x30(%rsp)
add    $0xfffffffffffffffd,%rax
mov    %rax,0xd0(%rsp)
mov    %rax,%rsi
shr    %rsi
add    $0x1,%rsi
mov    %r10,0xf0(%rsp)
mov    %rdx,0xd8(%rsp)
cmp    %rdx,%r10
setb   %al
mov    %rdi,0xe8(%rsp)
mov    %rbx,0xe0(%rsp)
cmp    %rdi,%rbx
setb   %dl
and    %al,%dl
mov    %dl,0xf(%rsp)
mov    %rcx,%rax
and    $0xfffffffffffffffe,%rax
mov    %rax,0xc0(%rsp)
mov    %rcx,0x58(%rsp)
or     $0x1,%rcx
mov    %rcx,0xb8(%rsp)
mov    %rsi,%rax
mov    %rsi,0xc8(%rsp)
and    $0xfffffffffffffffe,%rsi
mov    %rsi,0xb0(%rsp)
lea    0x18(%rbp),%rax
mov    %rax,0xa8(%rsp)
lea    0x18(%r9),%rax
mov    %rax,0xa0(%rsp)
mov    0x28(%rsp),%rax
lea    0x10(%rax),%rcx
mov    %rcx,0x80(%rsp)
mov    %r8,0xf8(%rsp)
lea    0x0(,%r8,8),%rcx
mov    %rcx,0x108(%rsp)
add    $0xfffffffffffffff8,%rax
mov    %rax,0x78(%rsp)
xor    %eax,%eax
mov    %rax,0x20(%rsp)
xor    %ebp,%ebp
mov    %r15,0x98(%rsp)
mov    %r12,0x90(%rsp)
jmp    1455 <makeP_Flex+0x335>
nopw   0x0(%rax,%rax,1)
mov    0x50(%rsp),%rbp
add    $0x1,%rbp
mov    0x20(%rsp),%rax
add    0x48(%rsp),%eax
mov    %rax,0x20(%rsp)
cmp    0x88(%rsp),%rbp
mov    0x98(%rsp),%r15
mov    0x90(%rsp),%r12
je     176e <makeP_Flex+0x64e>
cmp    $0x2,%r14d
jl     14a3 <makeP_Flex+0x383>
xor    %ebx,%ebx
nopl   (%rax)
movsd  (%r15,%rbp,8),%xmm0
mulsd  0x310(%rsp,%rbx,8),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x710(%rsp,%rbx,8)
movsd  (%r15,%rbp,8),%xmm0
mulsd  0x110(%rsp,%rbx,8),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x510(%rsp,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1460 <makeP_Flex+0x340>
mov    %rbp,0x50(%rsp)
test   %r14d,%r14d
jle    1420 <makeP_Flex+0x300>
mov    0x50(%rsp),%rax
mov    %rax,%rcx
imul   0x48(%rsp),%rcx
mov    %rcx,0x100(%rsp)
imul   %r14d,%eax
mov    %rax,0x60(%rsp)
mov    0x78(%rsp),%r9
mov    0x80(%rsp),%r13
mov    0x20(%rsp),%rax
mov    %eax,%r15d
xor    %r10d,%r10d
jmp    1518 <makeP_Flex+0x3f8>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r10
mov    0x950(%rsp),%r14d
add    %r14d,%r15d
mov    0x108(%rsp),%rax
add    %rax,%r13
add    %rax,%r9
cmp    0x30(%rsp),%r10
je     1420 <makeP_Flex+0x300>
mov    0x60(%rsp),%rax
add    %r10d,%eax
imul   %r14d,%eax
movslq %eax,%rcx
mov    0x18(%rsp),%rax
movabs $0x3ff0000000000000,%rdx
mov    %rdx,(%rax,%rcx,8)
mov    0x10(%rsp),%rax
mov    %rdx,(%rax,%rcx,8)
cmp    $0x2,%r14d
jl     14f0 <makeP_Flex+0x3d0>
movslq %r15d,%r11
mov    $0x1,%r8d
mov    0x58(%rsp),%rax
cmp    $0x2,%rax
jb     1700 <makeP_Flex+0x5e0>
mov    %r10d,%edx
imul   0x30(%rsp),%edx
add    0x100(%rsp),%edx
mov    %r10,%r12
imul   0xf8(%rsp),%r12
lea    (%rax,%r12,1),%rsi
movslq %edx,%rdx
mov    0xf0(%rsp),%rax
lea    (%rax,%rdx,8),%rdi
mov    0xe8(%rsp),%rax
lea    (%rax,%rdx,8),%rbx
mov    0x28(%rsp),%rax
lea    (%rax,%rsi,8),%rsi
cmp    %rsi,%rdi
lea    (%rax,%r12,8),%rdi
setb   %al
cmp    %rbx,%rdi
setb   %bl
and    %al,%bl
mov    0xe0(%rsp),%rax
lea    (%rax,%rdx,8),%rax
or     0xf(%rsp),%bl
cmp    %rsi,%rax
mov    0xd8(%rsp),%rax
lea    (%rax,%rdx,8),%rax
setb   %dl
cmp    %rax,%rdi
setb   %al
test   %bl,%bl
jne    1700 <makeP_Flex+0x5e0>
and    %al,%dl
jne    1700 <makeP_Flex+0x5e0>
cmpq   $0x2,0xd0(%rsp)
jae    1600 <makeP_Flex+0x4e0>
xor    %ebp,%ebp
jmp    1692 <makeP_Flex+0x572>
mov    0xa8(%rsp),%rdx
lea    (%rdx,%r11,8),%rbx
mov    0xa0(%rsp),%rdx
lea    (%rdx,%r11,8),%r8
mov    0xb0(%rsp),%r14
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movupd -0x10(%r13,%rbp,8),%xmm0
mulpd  0x710(%rsp,%rbp,8),%xmm0
movupd %xmm0,-0x10(%r8,%rbp,8)
movupd -0x10(%r13,%rbp,8),%xmm0
mulpd  0x510(%rsp,%rbp,8),%xmm0
movupd %xmm0,-0x10(%rbx,%rbp,8)
movupd 0x0(%r13,%rbp,8),%xmm0
mulpd  0x720(%rsp,%rbp,8),%xmm0
movupd %xmm0,(%r8,%rbp,8)
movupd 0x0(%r13,%rbp,8),%xmm0
mulpd  0x520(%rsp,%rbp,8),%xmm0
movupd %xmm0,(%rbx,%rbp,8)
add    $0x4,%rbp
add    $0xfffffffffffffffe,%r14
jne    1630 <makeP_Flex+0x510>
testb  $0x1,0xc8(%rsp)
01
je     16e0 <makeP_Flex+0x5c0>
mov    %rbp,%rax
or     $0x1,%rax
add    %rbp,%r12
mov    0x28(%rsp),%rdx
movupd (%rdx,%r12,8),%xmm0
mulpd  0x710(%rsp,%rbp,8),%xmm0
add    %rcx,%rax
mov    0x18(%rsp),%rcx
movupd %xmm0,(%rcx,%rax,8)
movupd (%rdx,%r12,8),%xmm0
mulpd  0x510(%rsp,%rbp,8),%xmm0
mov    0x10(%rsp),%rcx
movupd %xmm0,(%rcx,%rax,8)
mov    0xb8(%rsp),%r8
mov    0xc0(%rsp),%rax
cmp    %rax,0x58(%rsp)
je     14f0 <makeP_Flex+0x3d0>
nopl   0x0(%rax,%rax,1)
add    %r8,%r11
mov    0x18(%rsp),%rax
lea    (%rax,%r11,8),%rcx
mov    0x10(%rsp),%rax
lea    (%rax,%r11,8),%rbx
lea    0x708(%rsp),%rax
lea    (%rax,%r8,8),%rdx
lea    0x508(%rsp),%rax
lea    (%rax,%r8,8),%rdi
lea    (%r9,%r8,8),%rbp
mov    0x30(%rsp),%rax
sub    %r8,%rax
xor    %esi,%esi
nopl   0x0(%rax,%rax,1)
movsd  (%rdx,%rsi,8),%xmm0
mulsd  0x0(%rbp,%rsi,8),%xmm0
movsd  %xmm0,(%rcx,%rsi,8)
movsd  (%rdi,%rsi,8),%xmm0
mulsd  0x0(%rbp,%rsi,8),%xmm0
movsd  %xmm0,(%rbx,%rsi,8)
add    $0x1,%rsi
cmp    %rsi,%rax
jne    1740 <makeP_Flex+0x620>
jmp    14f0 <makeP_Flex+0x3d0>
add    $0x918,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %ecx,%ecx
test   $0x1,%dl
jne    1273 <makeP_Flex+0x153>
jmp    12b7 <makeP_Flex+0x197>

LLVM IR (-O0):
define void @makeP_Flex(double %0, double %1, double* %2, double* %3, double* %4, i32 %5, double* %6, double* %7, i32 %8) {
%10 = alloca double
%11 = alloca double
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca i32
%16 = alloca double*
%17 = alloca double*
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca [64 x double]
%25 = alloca [64 x double]
%26 = alloca [64 x double]
%27 = alloca [64 x double]
store double %0, double* %10
store double %1, double* %11
store double* %2, double** %12
store double* %3, double** %13
store double* %4, double** %14
store i32 %5, i32* %15
store double* %6, double** %16
store double* %7, double** %17
store i32 %8, i32* %18
%28 = load i32, i32* %18
%29 = sub nsw i32 %28, 1
store i32 %29, i32* %22
%30 = load i32, i32* %18
%31 = load i32, i32* %18
%32 = mul nsw i32 %30, %31
store i32 %32, i32* %23
%33 = load i32, i32* %18
%34 = icmp sle i32 %33, 64
%35 = zext i1 %34 to i32
%36 = call i32 @assert(i32 %35)
store i32 0, i32* %19
br label %37
37: ; preds = %62, %9
%38 = load i32, i32* %19
%39 = load i32, i32* %22
%40 = icmp slt i32 %38, %39
br i1 %40, label %41, label %65
41: ; preds = %37
%42 = load double*, double** %14
%43 = load i32, i32* %19
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds double, double* %42, i64 %44
%46 = load double, double* %45
%47 = load double, double* %10
%48 = fmul double %46, %47
%49 = load i32, i32* %19
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [64 x double], [64 x double]* %24, i64 0, i64 %50
store double %48, double* %51
%52 = load double*, double** %14
%53 = load i32, i32* %19
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds double, double* %52, i64 %54
%56 = load double, double* %55
%57 = load double, double* %11
%58 = fmul double %56, %57
%59 = load i32, i32* %19
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [64 x double], [64 x double]* %25, i64 0, i64 %60
store double %58, double* %61
br label %62
62: ; preds = %41
%63 = load i32, i32* %19
%64 = add nsw i32 %63, 1
store i32 %64, i32* %19
br label %37
65: ; preds = %37
store i32 0, i32* %19
br label %66
66: ; preds = %202, %65
%67 = load i32, i32* %19
%68 = load i32, i32* %15
%69 = icmp slt i32 %67, %68
br i1 %69, label %70, label %205
70: ; preds = %66
store i32 0, i32* %20
br label %71
71: ; preds = %104, %70
%72 = load i32, i32* %20
%73 = load i32, i32* %22
%74 = icmp slt i32 %72, %73
br i1 %74, label %75, label %107
75: ; preds = %71
%76 = load double*, double** %12
%77 = load i32, i32* %19
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds double, double* %76, i64 %78
%80 = load double, double* %79
%81 = load i32, i32* %20
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [64 x double], [64 x double]* %24, i64 0, i64 %82
%84 = load double, double* %83
%85 = fmul double %80, %84
%86 = call double @exp(double %85)
%87 = load i32, i32* %20
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [64 x double], [64 x double]* %26, i64 0, i64 %88
store double %86, double* %89
%90 = load double*, double** %12
%91 = load i32, i32* %19
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds double, double* %90, i64 %92
%94 = load double, double* %93
%95 = load i32, i32* %20
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds [64 x double], [64 x double]* %25, i64 0, i64 %96
%98 = load double, double* %97
%99 = fmul double %94, %98
%100 = call double @exp(double %99)
%101 = load i32, i32* %20
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds [64 x double], [64 x double]* %27, i64 0, i64 %102
store double %100, double* %103
br label %104
104: ; preds = %75
%105 = load i32, i32* %20
%106 = add nsw i32 %105, 1
store i32 %106, i32* %20
br label %71
107: ; preds = %71
store i32 0, i32* %20
br label %108
108: ; preds = %198, %107
%109 = load i32, i32* %20
%110 = load i32, i32* %18
%111 = icmp slt i32 %109, %110
br i1 %111, label %112, label %201
112: ; preds = %108
%113 = load double*, double** %16
%114 = load i32, i32* %23
%115 = load i32, i32* %19
%116 = mul nsw i32 %114, %115
%117 = load i32, i32* %18
%118 = load i32, i32* %20
%119 = mul nsw i32 %117, %118
%120 = add nsw i32 %116, %119
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds double, double* %113, i64 %121
store double 1.000000e+00, double* %122
%123 = load double*, double** %17
%124 = load i32, i32* %23
%125 = load i32, i32* %19
%126 = mul nsw i32 %124, %125
%127 = load i32, i32* %18
%128 = load i32, i32* %20
%129 = mul nsw i32 %127, %128
%130 = add nsw i32 %126, %129
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds double, double* %123, i64 %131
store double 1.000000e+00, double* %132
store i32 1, i32* %21
br label %133
133: ; preds = %194, %112
%134 = load i32, i32* %21
%135 = load i32, i32* %18
%136 = icmp slt i32 %134, %135
br i1 %136, label %137, label %197
137: ; preds = %133
%138 = load i32, i32* %21
%139 = sub nsw i32 %138, 1
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds [64 x double], [64 x double]* %26, i64 0, i64 %140
%142 = load double, double* %141
%143 = load double*, double** %13
%144 = load i32, i32* %22
%145 = load i32, i32* %20
%146 = mul nsw i32 %144, %145
%147 = load i32, i32* %21
%148 = sub nsw i32 %147, 1
%149 = add nsw i32 %146, %148
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds double, double* %143, i64 %150
%152 = load double, double* %151
%153 = fmul double %142, %152
%154 = load double*, double** %16
%155 = load i32, i32* %23
%156 = load i32, i32* %19
%157 = mul nsw i32 %155, %156
%158 = load i32, i32* %18
%159 = load i32, i32* %20
%160 = mul nsw i32 %158, %159
%161 = add nsw i32 %157, %160
%162 = load i32, i32* %21
%163 = add nsw i32 %161, %162
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds double, double* %154, i64 %164
store double %153, double* %165
%166 = load i32, i32* %21
%167 = sub nsw i32 %166, 1
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds [64 x double], [64 x double]* %27, i64 0, i64 %168
%170 = load double, double* %169
%171 = load double*, double** %13
%172 = load i32, i32* %22
%173 = load i32, i32* %20
%174 = mul nsw i32 %172, %173
%175 = load i32, i32* %21
%176 = sub nsw i32 %175, 1
%177 = add nsw i32 %174, %176
%178 = sext i32 %177 to i64
%179 = getelementptr inbounds double, double* %171, i64 %178
%180 = load double, double* %179
%181 = fmul double %170, %180
%182 = load double*, double** %17
%183 = load i32, i32* %23
%184 = load i32, i32* %19
%185 = mul nsw i32 %183, %184
%186 = load i32, i32* %18
%187 = load i32, i32* %20
%188 = mul nsw i32 %186, %187
%189 = add nsw i32 %185, %188
%190 = load i32, i32* %21
%191 = add nsw i32 %189, %190
%192 = sext i32 %191 to i64
%193 = getelementptr inbounds double, double* %182, i64 %192
store double %181, double* %193
br label %194
194: ; preds = %137
%195 = load i32, i32* %21
%196 = add nsw i32 %195, 1
store i32 %196, i32* %21
br label %133
197: ; preds = %133
br label %198
198: ; preds = %197
%199 = load i32, i32* %20
%200 = add nsw i32 %199, 1
store i32 %200, i32* %20
br label %108
201: ; preds = %108
br label %202
202: ; preds = %201
%203 = load i32, i32* %19
%204 = add nsw i32 %203, 1
store i32 %204, i32* %19
br label %66
205: ; preds = %66
ret void
}

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