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


x86 assembly (clang, -O0):
<makeP_Flex_Ancestral>:
push   %rbp
mov    %rsp,%rbp
sub    $0x450,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x2c(%rbp),%eax
imul   -0x2c(%rbp),%eax
mov    %eax,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
cmpl   $0x40,-0x2c(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    11ae <makeP_Flex_Ancestral+0x8e>
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x48(%rbp),%xmm0
movslq -0x30(%rbp),%rax
movsd  %xmm0,-0x250(%rbp,%rax,8)
ff ff
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1175 <makeP_Flex_Ancestral+0x55>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    12d7 <makeP_Flex_Ancestral+0x1b7>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    120e <makeP_Flex_Ancestral+0xee>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x34(%rbp),%rax
mulsd  -0x250(%rbp,%rax,8),%xmm0
ff ff
call   1040 <exp@plt>
movslq -0x34(%rbp),%rax
movsd  %xmm0,-0x450(%rbp,%rax,8)
ff ff
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11c8 <makeP_Flex_Ancestral+0xa8>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    12c4 <makeP_Flex_Ancestral+0x1a4>
mov    -0x28(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x30(%rbp),%ecx
mov    -0x2c(%rbp),%edx
imul   -0x34(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  0xdc0(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    12b1 <makeP_Flex_Ancestral+0x191>
mov    -0x38(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0x450(%rbp,%rax,8),%xmm0
ff ff
mov    -0x10(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x34(%rbp),%ecx
mov    -0x38(%rbp),%edx
sub    $0x1,%edx
add    %edx,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x30(%rbp),%ecx
mov    -0x2c(%rbp),%edx
imul   -0x34(%rbp),%edx
add    %edx,%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    124c <makeP_Flex_Ancestral+0x12c>
jmp    12b6 <makeP_Flex_Ancestral+0x196>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1215 <makeP_Flex_Ancestral+0xf5>
jmp    12c9 <makeP_Flex_Ancestral+0x1a9>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11b5 <makeP_Flex_Ancestral+0x95>
add    $0x450,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeP_Flex_Ancestral>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x4c8,%rsp
mov    %r9d,%r15d
mov    %r8,0x10(%rsp)
mov    %ecx,%r12d
mov    %rdx,%rbx
mov    %rsi,(%rsp)
mov    %rdi,%r14
lea    -0x1(%r15),%r13d
xor    %edi,%edi
cmp    $0x41,%r9d
setl   %dil
call   1030 <assert@plt>
mov    %r13d,%ebp
cmp    $0x2,%r15d
jl     124b <makeP_Flex_Ancestral+0x12b>
cmp    $0x4,%r13d
jae    1173 <makeP_Flex_Ancestral+0x53>
xor    %eax,%eax
jmp    1228 <makeP_Flex_Ancestral+0x108>
mov    %ebp,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rcx
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
test   %rcx,%rcx
je     1658 <makeP_Flex_Ancestral+0x538>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %ecx,%ecx
xorpd  %xmm0,%xmm0
nopl   (%rax)
movupd (%rbx,%rcx,8),%xmm1
movupd 0x10(%rbx,%rcx,8),%xmm2
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movapd %xmm1,0x2c0(%rsp,%rcx,8)
movapd %xmm2,0x2d0(%rsp,%rcx,8)
movupd 0x20(%rbx,%rcx,8),%xmm1
movupd 0x30(%rbx,%rcx,8),%xmm2
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movapd %xmm1,0x2e0(%rsp,%rcx,8)
movapd %xmm2,0x2f0(%rsp,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rsi
jne    11a0 <makeP_Flex_Ancestral+0x80>
test   $0x1,%dl
je     1223 <makeP_Flex_Ancestral+0x103>
movupd (%rbx,%rcx,8),%xmm0
movupd 0x10(%rbx,%rcx,8),%xmm1
xorpd  %xmm2,%xmm2
mulpd  %xmm2,%xmm0
mulpd  %xmm2,%xmm1
movapd %xmm0,0x2c0(%rsp,%rcx,8)
movapd %xmm1,0x2d0(%rsp,%rcx,8)
cmp    %rbp,%rax
je     124b <makeP_Flex_Ancestral+0x12b>
xorpd  %xmm0,%xmm0
nopl   0x0(%rax)
movsd  (%rbx,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x2c0(%rsp,%rax,8)
add    $0x1,%rax
cmp    %rax,%rbp
jne    1230 <makeP_Flex_Ancestral+0x110>
test   %r12d,%r12d
jle    1646 <makeP_Flex_Ancestral+0x526>
movslq %r13d,%rcx
mov    %r12d,%eax
mov    %rax,0x50(%rsp)
mov    %r15d,%r12d
mov    0x10(%rsp),%rsi
lea    0x8(%rsi),%rax
mov    %rax,0x38(%rsp)
mov    %r15d,%eax
imul   %eax,%eax
mov    %rax,0x20(%rsp)
lea    (%rsi,%r12,8),%rax
mov    %rax,0x98(%rsp)
lea    -0x1(%r12),%rax
lea    -0x5(%r12),%rdx
mov    %rdx,0x90(%rsp)
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %rax,0x8(%rsp)
and    $0xfffffffffffffffc,%rax
mov    %rax,0x80(%rsp)
add    $0x1,%rax
mov    %rax,0x78(%rsp)
mov    %rdx,%rax
mov    %rdx,0x88(%rsp)
and    $0xfffffffffffffffe,%rdx
mov    %rdx,0x70(%rsp)
mov    %r12,%rax
neg    %rax
mov    %rax,0xa8(%rsp)
lea    0x38(%rsi),%rax
mov    %rax,0x68(%rsp)
mov    (%rsp),%rax
add    $0x30,%rax
mov    %rax,0x48(%rsp)
mov    %rcx,0xb0(%rsp)
lea    0x0(,%rcx,8),%rax
mov    %rax,0xb8(%rsp)
xor    %eax,%eax
mov    %rax,0x18(%rsp)
xor    %r13d,%r13d
mov    %r15,0x30(%rsp)
mov    %r14,0x60(%rsp)
mov    %rbp,0x58(%rsp)
jmp    135c <makeP_Flex_Ancestral+0x23c>
cs nopw 0x0(%rax,%rax,1)
mov    0x28(%rsp),%r13
add    $0x1,%r13
mov    0x18(%rsp),%rax
add    0x20(%rsp),%eax
mov    %rax,0x18(%rsp)
cmp    0x50(%rsp),%r13
mov    0x60(%rsp),%r14
mov    0x58(%rsp),%rbp
je     1646 <makeP_Flex_Ancestral+0x526>
cmp    $0x2,%r15d
jl     1396 <makeP_Flex_Ancestral+0x276>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%r14,%r13,8),%xmm0
mulsd  0x2c0(%rsp,%rbx,8),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0xc0(%rsp,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1370 <makeP_Flex_Ancestral+0x250>
mov    %r13,0x28(%rsp)
mov    0x30(%rsp),%r15
test   %r15d,%r15d
mov    0x8(%rsp),%r10
jle    1330 <makeP_Flex_Ancestral+0x210>
mov    0x28(%rsp),%rax
mov    %rax,%rcx
imul   0x20(%rsp),%rcx
mov    %rcx,0xa0(%rsp)
mov    %eax,%r13d
imul   %r15d,%r13d
mov    (%rsp),%rdx
mov    0x48(%rsp),%rsi
mov    0x18(%rsp),%rax
mov    %eax,%edi
xor    %eax,%eax
jmp    13fe <makeP_Flex_Ancestral+0x2de>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rax
add    %r15d,%edi
mov    0xb8(%rsp),%rcx
add    %rcx,%rsi
add    %rcx,%rdx
cmp    %r12,%rax
je     1330 <makeP_Flex_Ancestral+0x210>
lea    (%rax,%r13,1),%ecx
imul   %r15d,%ecx
movslq %ecx,%r14
movabs $0x3ff0000000000000,%rcx
mov    0x10(%rsp),%rbx
mov    %rcx,(%rbx,%r14,8)
cmp    $0x2,%r15d
jl     13e0 <makeP_Flex_Ancestral+0x2c0>
mov    %rax,%r11
imul   0xb0(%rsp),%r11
movslq %edi,%rcx
mov    %rcx,0x40(%rsp)
mov    $0x1,%ecx
cmp    $0x4,%r10
jb     15b0 <makeP_Flex_Ancestral+0x490>
mov    %eax,%ebx
imul   %r12d,%ebx
add    0xa0(%rsp),%ebx
lea    (%r10,%r11,1),%r8
movslq %ebx,%r9
mov    0x38(%rsp),%rbx
mov    %r13,%rbp
lea    (%rbx,%r9,8),%r13
mov    (%rsp),%rbx
lea    (%rbx,%r8,8),%rbx
cmp    %rbx,%r13
mov    %rbp,%r13
mov    0x30(%rsp),%r15
jae    14aa <makeP_Flex_Ancestral+0x38a>
mov    0x98(%rsp),%rbp
lea    0x0(,%r9,8),%r8
add    %rbp,%r8
mov    (%rsp),%rbp
lea    0x0(,%r11,8),%rbx
add    %rbp,%rbx
mov    0x8(%rsp),%r10
cmp    %r8,%rbx
jb     15b0 <makeP_Flex_Ancestral+0x490>
cmpq   $0x4,0x90(%rsp)
jae    14bc <makeP_Flex_Ancestral+0x39c>
xor    %ebx,%ebx
jmp    1540 <makeP_Flex_Ancestral+0x420>
mov    0x68(%rsp),%rcx
mov    0x40(%rsp),%rbp
lea    (%rcx,%rbp,8),%r8
mov    0x70(%rsp),%rcx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movupd -0x30(%rsi,%rbx,8),%xmm0
movupd -0x20(%rsi,%rbx,8),%xmm1
mulpd  0xc0(%rsp,%rbx,8),%xmm0
mulpd  0xd0(%rsp,%rbx,8),%xmm1
movupd %xmm0,-0x30(%r8,%rbx,8)
movupd %xmm1,-0x20(%r8,%rbx,8)
movupd -0x10(%rsi,%rbx,8),%xmm0
movupd (%rsi,%rbx,8),%xmm1
mulpd  0xe0(%rsp,%rbx,8),%xmm0
mulpd  0xf0(%rsp,%rbx,8),%xmm1
movupd %xmm0,-0x10(%r8,%rbx,8)
movupd %xmm1,(%r8,%rbx,8)
add    $0x8,%rbx
add    $0xfffffffffffffffe,%rcx
jne    14e0 <makeP_Flex_Ancestral+0x3c0>
testb  $0x1,0x88(%rsp)
01
je     1591 <makeP_Flex_Ancestral+0x471>
mov    %rbx,%rcx
lea    (%rbx,%r11,1),%r8
mov    (%rsp),%rbp
movupd 0x0(%rbp,%r8,8),%xmm0
movupd 0x10(%rbp,%r8,8),%xmm1
mov    0x8(%rsp),%r10
mulpd  0xc0(%rsp,%rbx,8),%xmm0
mulpd  0xd0(%rsp,%rbx,8),%xmm1
or     $0x1,%rcx
add    %r14,%rcx
mov    0x10(%rsp),%rbx
movupd %xmm0,(%rbx,%rcx,8)
movupd %xmm1,0x10(%rbx,%rcx,8)
mov    0x78(%rsp),%rcx
cmp    0x80(%rsp),%r10
je     13e0 <makeP_Flex_Ancestral+0x2c0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rcx,%rbx
test   $0x1,%r12b
jne    15eb <makeP_Flex_Ancestral+0x4cb>
movsd  0xb8(%rsp,%rcx,8),%xmm0
lea    (%rcx,%r11,1),%rbx
add    $0xffffffffffffffff,%rbx
mov    (%rsp),%rbp
mulsd  0x0(%rbp,%rbx,8),%xmm0
mov    0x8(%rsp),%r10
add    %rcx,%r14
mov    0x10(%rsp),%rbx
movsd  %xmm0,(%rbx,%r14,8)
lea    0x1(%rcx),%rbx
not    %rcx
cmp    0xa8(%rsp),%rcx
je     13e0 <makeP_Flex_Ancestral+0x2c0>
mov    0x38(%rsp),%rcx
mov    0x40(%rsp),%rbp
lea    (%rcx,%rbp,8),%rcx
nopw   0x0(%rax,%rax,1)
movsd  0xb8(%rsp,%rbx,8),%xmm0
mulsd  -0x8(%rdx,%rbx,8),%xmm0
movsd  %xmm0,-0x8(%rcx,%rbx,8)
movsd  0xc0(%rsp,%rbx,8),%xmm0
mulsd  (%rdx,%rbx,8),%xmm0
movsd  %xmm0,(%rcx,%rbx,8)
add    $0x2,%rbx
cmp    %rbx,%r12
jne    1610 <makeP_Flex_Ancestral+0x4f0>
jmp    13e0 <makeP_Flex_Ancestral+0x2c0>
add    $0x4c8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %ecx,%ecx
test   $0x1,%dl
jne    11fa <makeP_Flex_Ancestral+0xda>
jmp    1223 <makeP_Flex_Ancestral+0x103>

LLVM IR (-O0):
define void @makeP_Flex_Ancestral(double* %0, double* %1, double* %2, i32 %3, double* %4, i32 %5) {
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca i32
%11 = alloca double*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca double
%19 = alloca [64 x double]
%20 = alloca [64 x double]
store double* %0, double** %7
store double* %1, double** %8
store double* %2, double** %9
store i32 %3, i32* %10
store double* %4, double** %11
store i32 %5, i32* %12
%21 = load i32, i32* %12
%22 = sub nsw i32 %21, 1
store i32 %22, i32* %16
%23 = load i32, i32* %12
%24 = load i32, i32* %12
%25 = mul nsw i32 %23, %24
store i32 %25, i32* %17
store double 0.000000e+00, double* %18
%26 = load i32, i32* %12
%27 = icmp sle i32 %26, 64
%28 = zext i1 %27 to i32
%29 = call i32 @assert(i32 %28)
store i32 0, i32* %13
br label %30
30: ; preds = %45, %6
%31 = load i32, i32* %13
%32 = load i32, i32* %16
%33 = icmp slt i32 %31, %32
br i1 %33, label %34, label %48
34: ; preds = %30
%35 = load double*, double** %9
%36 = load i32, i32* %13
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds double, double* %35, i64 %37
%39 = load double, double* %38
%40 = load double, double* %18
%41 = fmul double %39, %40
%42 = load i32, i32* %13
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [64 x double], [64 x double]* %19, i64 0, i64 %43
store double %41, double* %44
br label %45
45: ; preds = %34
%46 = load i32, i32* %13
%47 = add nsw i32 %46, 1
store i32 %47, i32* %13
br label %30
48: ; preds = %30
store i32 0, i32* %13
br label %49
49: ; preds = %133, %48
%50 = load i32, i32* %13
%51 = load i32, i32* %10
%52 = icmp slt i32 %50, %51
br i1 %52, label %53, label %136
53: ; preds = %49
store i32 0, i32* %14
br label %54
54: ; preds = %73, %53
%55 = load i32, i32* %14
%56 = load i32, i32* %16
%57 = icmp slt i32 %55, %56
br i1 %57, label %58, label %76
58: ; preds = %54
%59 = load double*, double** %7
%60 = load i32, i32* %13
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds double, double* %59, i64 %61
%63 = load double, double* %62
%64 = load i32, i32* %14
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [64 x double], [64 x double]* %19, i64 0, i64 %65
%67 = load double, double* %66
%68 = fmul double %63, %67
%69 = call double @exp(double %68)
%70 = load i32, i32* %14
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [64 x double], [64 x double]* %20, i64 0, i64 %71
store double %69, double* %72
br label %73
73: ; preds = %58
%74 = load i32, i32* %14
%75 = add nsw i32 %74, 1
store i32 %75, i32* %14
br label %54
76: ; preds = %54
store i32 0, i32* %14
br label %77
77: ; preds = %129, %76
%78 = load i32, i32* %14
%79 = load i32, i32* %12
%80 = icmp slt i32 %78, %79
br i1 %80, label %81, label %132
81: ; preds = %77
%82 = load double*, double** %11
%83 = load i32, i32* %17
%84 = load i32, i32* %13
%85 = mul nsw i32 %83, %84
%86 = load i32, i32* %12
%87 = load i32, i32* %14
%88 = mul nsw i32 %86, %87
%89 = add nsw i32 %85, %88
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds double, double* %82, i64 %90
store double 1.000000e+00, double* %91
store i32 1, i32* %15
br label %92
92: ; preds = %125, %81
%93 = load i32, i32* %15
%94 = load i32, i32* %12
%95 = icmp slt i32 %93, %94
br i1 %95, label %96, label %128
96: ; preds = %92
%97 = load i32, i32* %15
%98 = sub nsw i32 %97, 1
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds [64 x double], [64 x double]* %20, i64 0, i64 %99
%101 = load double, double* %100
%102 = load double*, double** %8
%103 = load i32, i32* %16
%104 = load i32, i32* %14
%105 = mul nsw i32 %103, %104
%106 = load i32, i32* %15
%107 = sub nsw i32 %106, 1
%108 = add nsw i32 %105, %107
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds double, double* %102, i64 %109
%111 = load double, double* %110
%112 = fmul double %101, %111
%113 = load double*, double** %11
%114 = load i32, i32* %17
%115 = load i32, i32* %13
%116 = mul nsw i32 %114, %115
%117 = load i32, i32* %12
%118 = load i32, i32* %14
%119 = mul nsw i32 %117, %118
%120 = add nsw i32 %116, %119
%121 = load i32, i32* %15
%122 = add nsw i32 %120, %121
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds double, double* %113, i64 %123
store double %112, double* %124
br label %125
125: ; preds = %96
%126 = load i32, i32* %15
%127 = add nsw i32 %126, 1
store i32 %127, i32* %15
br label %92
128: ; preds = %92
br label %129
129: ; preds = %128
%130 = load i32, i32* %14
%131 = add nsw i32 %130, 1
store i32 %131, i32* %14
br label %77
132: ; preds = %77
br label %133
133: ; preds = %132
%134 = load i32, i32* %13
%135 = add nsw i32 %134, 1
store i32 %135, i32* %13
br label %49
136: ; preds = %49
ret void
}

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