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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double exp(double);
void coreGAMMA_FLEX(int upper, double *sumtable, volatile double *ext_dlnLdlz,
                    volatile double *ext_d2lnLdlz2, double *EIGN,
                    double *gammaRates, double lz, int *wrptr,
                    const int states) {
  double *sum, diagptable[1024], dlnLdlz = 0.0, d2lnLdlz2 = 0.0, ki, kisqr, tmp,
                                 inv_Li, dlnLidlz, d2lnLidlz2;
  int i, j, l;
  const int gammaStates = 4 * states;
  for (i = 0; i < 4; i++) {
    ki = gammaRates[i];
    kisqr = ki * ki;
    for (l = 1; l < states; l++) {
      diagptable[i * gammaStates + l * 4] = exp(EIGN[l] * ki * lz);
      diagptable[i * gammaStates + l * 4 + 1] = EIGN[l] * ki;
      diagptable[i * gammaStates + l * 4 + 2] = EIGN[l] * EIGN[l] * kisqr;
    }
  }
  for (i = 0; i < upper; i++) {
    sum = &sumtable[i * gammaStates];
    inv_Li = 0.0;
    dlnLidlz = 0.0;
    d2lnLidlz2 = 0.0;
    for (j = 0; j < 4; j++) {
      inv_Li += sum[j * states];
      for (l = 1; l < states; l++) {
        inv_Li +=
            (tmp = diagptable[j * gammaStates + l * 4] * sum[j * states + l]);
        dlnLidlz += tmp * diagptable[j * gammaStates + l * 4 + 1];
        d2lnLidlz2 += tmp * diagptable[j * gammaStates + l * 4 + 2];
      }
    }
    inv_Li = 1.0 / inv_Li;
    dlnLidlz *= inv_Li;
    d2lnLidlz2 *= inv_Li;
    dlnLdlz += wrptr[i] * dlnLidlz;
    d2lnLdlz2 += wrptr[i] * (d2lnLidlz2 - dlnLidlz * dlnLidlz);
  }
  *ext_dlnLdlz = dlnLdlz;
  *ext_d2lnLdlz2 = d2lnLdlz2;
}


x86 assembly (clang, -O0):
<coreGAMMA_FLEX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2090,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x2048(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x2050(%rbp)
ff
mov    0x18(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x2090(%rbp)
movl   $0x0,-0x2084(%rbp)
cmpl   $0x4,-0x2084(%rbp)
jge    12be <coreGAMMA_FLEX+0x1ae>
mov    -0x30(%rbp),%rax
movslq -0x2084(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x2058(%rbp)
ff
movsd  -0x2058(%rbp),%xmm0
ff
mulsd  -0x2058(%rbp),%xmm0
ff
movsd  %xmm0,-0x2060(%rbp)
ff
movl   $0x1,-0x208c(%rbp)
mov    -0x208c(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    12a5 <coreGAMMA_FLEX+0x195>
mov    -0x28(%rbp),%rax
movslq -0x208c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x2058(%rbp),%xmm0
ff
mulsd  -0x38(%rbp),%xmm0
call   1030 <exp@plt>
mov    -0x2084(%rbp),%eax
imul   -0x2090(%rbp),%eax
mov    -0x208c(%rbp),%ecx
shl    $0x2,%ecx
add    %ecx,%eax
cltq
movsd  %xmm0,-0x2040(%rbp,%rax,8)
ff ff
mov    -0x28(%rbp),%rax
movslq -0x208c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x2058(%rbp),%xmm0
ff
mov    -0x2084(%rbp),%eax
imul   -0x2090(%rbp),%eax
mov    -0x208c(%rbp),%ecx
shl    $0x2,%ecx
add    %ecx,%eax
add    $0x1,%eax
cltq
movsd  %xmm0,-0x2040(%rbp,%rax,8)
ff ff
mov    -0x28(%rbp),%rax
movslq -0x208c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x208c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mulsd  -0x2060(%rbp),%xmm0
ff
mov    -0x2084(%rbp),%eax
imul   -0x2090(%rbp),%eax
mov    -0x208c(%rbp),%ecx
shl    $0x2,%ecx
add    %ecx,%eax
add    $0x2,%eax
cltq
movsd  %xmm0,-0x2040(%rbp,%rax,8)
ff ff
mov    -0x208c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x208c(%rbp)
jmp    11b1 <coreGAMMA_FLEX+0xa1>
jmp    12aa <coreGAMMA_FLEX+0x19a>
mov    -0x2084(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2084(%rbp)
jmp    116a <coreGAMMA_FLEX+0x5a>
movl   $0x0,-0x2084(%rbp)
mov    -0x2084(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1568 <coreGAMMA_FLEX+0x458>
mov    -0x10(%rbp),%rax
mov    -0x2084(%rbp),%ecx
imul   -0x2090(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x2070(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x2078(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x2080(%rbp)
ff
movl   $0x0,-0x2088(%rbp)
cmpl   $0x4,-0x2088(%rbp)
jge    147d <coreGAMMA_FLEX+0x36d>
mov    -0x40(%rbp),%rax
mov    -0x2088(%rbp),%ecx
imul   0x18(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x2070(%rbp),%xmm0
ff
movsd  %xmm0,-0x2070(%rbp)
ff
movl   $0x1,-0x208c(%rbp)
mov    -0x208c(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    1464 <coreGAMMA_FLEX+0x354>
mov    -0x2088(%rbp),%eax
imul   -0x2090(%rbp),%eax
mov    -0x208c(%rbp),%ecx
shl    $0x2,%ecx
add    %ecx,%eax
cltq
movsd  -0x2040(%rbp,%rax,8),%xmm0
ff ff
mov    -0x40(%rbp),%rax
mov    -0x2088(%rbp),%ecx
imul   0x18(%rbp),%ecx
add    -0x208c(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x2068(%rbp)
ff
addsd  -0x2070(%rbp),%xmm0
ff
movsd  %xmm0,-0x2070(%rbp)
ff
movsd  -0x2068(%rbp),%xmm0
ff
mov    -0x2088(%rbp),%eax
imul   -0x2090(%rbp),%eax
mov    -0x208c(%rbp),%ecx
shl    $0x2,%ecx
add    %ecx,%eax
add    $0x1,%eax
cltq
movsd  -0x2040(%rbp,%rax,8),%xmm2
ff ff
movsd  -0x2078(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x2078(%rbp)
ff
movsd  -0x2068(%rbp),%xmm0
ff
mov    -0x2088(%rbp),%eax
imul   -0x2090(%rbp),%eax
mov    -0x208c(%rbp),%ecx
shl    $0x2,%ecx
add    %ecx,%eax
add    $0x2,%eax
cltq
movsd  -0x2040(%rbp,%rax,8),%xmm2
ff ff
movsd  -0x2080(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x2080(%rbp)
ff
mov    -0x208c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x208c(%rbp)
jmp    135e <coreGAMMA_FLEX+0x24e>
jmp    1469 <coreGAMMA_FLEX+0x359>
mov    -0x2088(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2088(%rbp)
jmp    1321 <coreGAMMA_FLEX+0x211>
movsd  0xb7b(%rip),%xmm0
divsd  -0x2070(%rbp),%xmm0
ff
movsd  %xmm0,-0x2070(%rbp)
ff
movsd  -0x2070(%rbp),%xmm0
ff
mulsd  -0x2078(%rbp),%xmm0
ff
movsd  %xmm0,-0x2078(%rbp)
ff
movsd  -0x2070(%rbp),%xmm0
ff
mulsd  -0x2080(%rbp),%xmm0
ff
movsd  %xmm0,-0x2080(%rbp)
ff
mov    0x10(%rbp),%rax
movslq -0x2084(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  -0x2078(%rbp),%xmm2
ff
movsd  -0x2048(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x2048(%rbp)
ff
mov    0x10(%rbp),%rax
movslq -0x2084(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  -0x2080(%rbp),%xmm1
ff
movsd  -0x2078(%rbp),%xmm2
ff
movsd  -0x2078(%rbp),%xmm3
ff
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x2050(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x2050(%rbp)
ff
mov    -0x2084(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2084(%rbp)
jmp    12c8 <coreGAMMA_FLEX+0x1b8>
movsd  -0x2048(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x2050(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x2090,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coreGAMMA_FLEX>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2078,%rsp
mov    %rcx,0x60(%rsp)
mov    %rdx,0x58(%rsp)
mov    %rsi,0x40(%rsp)
mov    %edi,0x38(%rsp)
mov    0x20b8(%rsp),%ecx
lea    0x0(,%rcx,4),%eax
cltq
mov    %rax,0x18(%rsp)
mov    %ecx,%r13d
cmp    $0x1,%ecx
jle    13e9 <coreGAMMA_FLEX+0x2d9>
movapd %xmm0,%xmm1
mov    %r9,%r15
mov    %r8,%r14
movsd  (%r9),%xmm2
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movapd %xmm2,(%rsp)
unpcklpd %xmm0,%xmm2
movapd %xmm2,0x20(%rsp)
lea    0x0(,%r13,4),%rbx
mov    $0x4,%ebp
movsd  %xmm1,0x10(%rsp)
xchg   %ax,%ax
movsd  (%r14,%rbp,2),%xmm0
mulsd  (%rsp),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x70(%rsp,%rbp,8)
movsd  (%r14,%rbp,2),%xmm0
lea    0x1(%rbp),%eax
cltq
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
unpcklpd %xmm1,%xmm0
movsd  0x10(%rsp),%xmm1
mulpd  0x20(%rsp),%xmm0
movupd %xmm0,0x70(%rsp,%rax,8)
add    $0x4,%rbp
cmp    %rbp,%rbx
jne    1190 <coreGAMMA_FLEX+0x80>
mov    0x20b8(%rsp),%eax
cmp    $0x2,%eax
jl     13e9 <coreGAMMA_FLEX+0x2d9>
mov    %r15,0x30(%rsp)
movsd  0x8(%r15),%xmm0
movsd  %xmm0,(%rsp)
mulsd  %xmm0,%xmm0
movsd  %xmm0,0x20(%rsp)
lea    0x0(,%r13,8),%rcx
mov    0x18(%rsp),%rax
lea    (%rsp,%rax,8),%rbp
add    $0x70,%rbp
lea    0x5(%rax),%ebx
mov    $0x8,%r12d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%r14,%r12,1),%xmm0
mulsd  (%rsp),%xmm0
mulsd  %xmm1,%xmm0
mov    %rcx,%r15
call   1030 <exp@plt>
mov    %r15,%rcx
movsd  %xmm0,0x0(%rbp,%r12,4)
movsd  (%r14,%r12,1),%xmm0
movsd  (%rsp),%xmm1
mulsd  %xmm0,%xmm1
movslq %ebx,%rbx
movsd  %xmm1,0x70(%rsp,%rbx,8)
movsd  0x10(%rsp),%xmm1
mulsd  %xmm0,%xmm0
mulsd  0x20(%rsp),%xmm0
lea    0x1(%rbx),%eax
cltq
movsd  %xmm0,0x70(%rsp,%rax,8)
add    $0x8,%r12
add    $0x4,%ebx
cmp    %r12,%r15
jne    1230 <coreGAMMA_FLEX+0x120>
mov    0x20b8(%rsp),%eax
cmp    $0x2,%eax
mov    0x30(%rsp),%rax
jl     13e9 <coreGAMMA_FLEX+0x2d9>
movsd  0x10(%rax),%xmm0
movsd  %xmm0,(%rsp)
mulsd  %xmm0,%xmm0
movsd  %xmm0,0x20(%rsp)
mov    0x18(%rsp),%rax
lea    (%rax,%rax,1),%rbx
shl    $0x4,%rax
lea    (%rsp,%rax,1),%r12
add    $0x70,%r12
add    $0x6,%ebx
mov    $0x8,%ebp
cs nopw 0x0(%rax,%rax,1)
movsd  (%r14,%rbp,1),%xmm0
mulsd  (%rsp),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
mov    %r15,%rcx
movsd  %xmm0,(%r12,%rbp,4)
movsd  (%r14,%rbp,1),%xmm0
movsd  (%rsp),%xmm1
mulsd  %xmm0,%xmm1
lea    -0x1(%rbx),%eax
cltq
movsd  %xmm1,0x70(%rsp,%rax,8)
movsd  0x10(%rsp),%xmm1
mulsd  %xmm0,%xmm0
mulsd  0x20(%rsp),%xmm0
movslq %ebx,%rbx
movsd  %xmm0,0x70(%rsp,%rbx,8)
add    $0x8,%rbp
add    $0x4,%ebx
cmp    %rbp,%r15
jne    12e0 <coreGAMMA_FLEX+0x1d0>
mov    0x20b8(%rsp),%eax
cmp    $0x2,%eax
mov    0x30(%rsp),%rax
jl     13e9 <coreGAMMA_FLEX+0x2d9>
movsd  0x18(%rax),%xmm0
movsd  %xmm0,(%rsp)
mulsd  %xmm0,%xmm0
movsd  %xmm0,0x20(%rsp)
mov    0x18(%rsp),%rax
lea    (%rax,%rax,2),%rax
lea    0x0(,%r13,8),%r12
lea    (%rsp,%rax,8),%r15
add    $0x70,%r15
lea    0x6(%rax),%ebx
mov    $0x8,%ebp
cs nopw 0x0(%rax,%rax,1)
movsd  (%r14,%rbp,1),%xmm0
mulsd  (%rsp),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  %xmm0,(%r15,%rbp,4)
movsd  (%r14,%rbp,1),%xmm0
movsd  (%rsp),%xmm1
mulsd  %xmm0,%xmm1
lea    -0x1(%rbx),%eax
cltq
movsd  %xmm1,0x70(%rsp,%rax,8)
movsd  0x10(%rsp),%xmm1
mulsd  %xmm0,%xmm0
mulsd  0x20(%rsp),%xmm0
movslq %ebx,%rbx
movsd  %xmm0,0x70(%rsp,%rbx,8)
add    $0x8,%rbp
add    $0x4,%ebx
cmp    %rbp,%r12
jne    1390 <coreGAMMA_FLEX+0x280>
mov    0x38(%rsp),%eax
test   %eax,%eax
jle    1719 <coreGAMMA_FLEX+0x609>
mov    0x20b8(%rsp),%r11d
movslq %r11d,%r8
mov    %eax,%eax
mov    %rax,0x10(%rsp)
lea    (%r8,%r8,1),%rax
mov    %rax,0x20(%rsp)
lea    (%r8,%r8,2),%r10
mov    0x18(%rsp),%rbp
lea    0x0(%rbp,%rbp,1),%rbx
lea    0x0(,%rbp,2),%r14
add    %rbp,%r14
lea    0x0(,%rbp,8),%r15
lea    0x0(,%r13,4),%rax
shl    $0x3,%r13
mov    0x40(%rsp),%rsi
lea    (%rsi,%r8,8),%rdx
lea    (%rsp,%rbp,8),%r9
add    $0x70,%r9
lea    0x5(%rbp),%edi
mov    %edi,0x30(%rsp)
mov    %r8,(%rsp)
shl    $0x4,%r8
add    %rsi,%r8
shl    $0x4,%rbp
lea    (%rsp,%rbp,1),%r12
add    $0x70,%r12
add    $0x6,%ebx
mov    %rbx,0x68(%rsp)
lea    (%rsp,%r14,8),%rcx
add    $0x70,%rcx
mov    %rcx,0x50(%rsp)
mov    %r15,%rcx
lea    0x6(%r14),%edi
mov    %edi,0x4c(%rsp)
xorpd  %xmm3,%xmm3
xorpd  %xmm0,%xmm0
movsd  0xb64(%rip),%xmm1
mov    %r10,0x38(%rsp)
lea    (%rsi,%r10,8),%r14
xor    %r15d,%r15d
mov    %rsi,%rbx
jmp    1540 <coreGAMMA_FLEX+0x430>
mov    (%rsp),%rdi
addsd  (%r10,%rdi,8),%xmm3
xorpd  %xmm4,%xmm4
mov    0x20(%rsp),%rdi
addsd  (%r10,%rdi,8),%xmm3
movapd %xmm4,%xmm5
mov    0x38(%rsp),%rdi
addsd  (%r10,%rdi,8),%xmm3
movapd %xmm5,%xmm4
movapd %xmm1,%xmm5
divsd  %xmm3,%xmm5
movapd %xmm4,%xmm3
mulsd  %xmm5,%xmm3
unpckhpd %xmm4,%xmm4
mulsd  %xmm5,%xmm4
mov    0x20b0(%rsp),%rdi
xorps  %xmm5,%xmm5
cvtsi2sdl (%rdi,%r15,4),%xmm5
movapd %xmm3,%xmm6
mulsd  %xmm3,%xmm6
subsd  %xmm6,%xmm4
unpcklpd %xmm5,%xmm5
unpcklpd %xmm3,%xmm4
mulpd  %xmm5,%xmm4
movapd %xmm4,%xmm3
addpd  %xmm2,%xmm3
add    $0x1,%r15
add    %rcx,%rbx
add    %rcx,%rdx
add    %rcx,%r8
add    %rcx,%r14
cmp    0x10(%rsp),%r15
je     1713 <coreGAMMA_FLEX+0x603>
movapd %xmm3,%xmm2
mov    %r15,%rdi
imul   0x18(%rsp),%rdi
lea    (%rsi,%rdi,8),%r10
movsd  (%rsi,%rdi,8),%xmm3
addsd  %xmm0,%xmm3
cmp    $0x2,%r11d
jl     14b0 <coreGAMMA_FLEX+0x3a0>
xorpd  %xmm6,%xmm6
mov    $0x4,%edi
nopl   (%rax)
movapd %xmm6,%xmm5
movsd  0x70(%rsp,%rdi,8),%xmm4
mulsd  (%rbx,%rdi,2),%xmm4
addsd  %xmm4,%xmm3
lea    0x1(%rdi),%ebp
movslq %ebp,%rbp
movupd 0x70(%rsp,%rbp,8),%xmm6
unpcklpd %xmm4,%xmm4
mulpd  %xmm6,%xmm4
movapd %xmm4,%xmm6
addpd  %xmm5,%xmm6
add    $0x4,%rdi
cmp    %rdi,%rax
jne    1570 <coreGAMMA_FLEX+0x460>
addpd  %xmm5,%xmm4
mov    (%rsp),%rdi
addsd  (%r10,%rdi,8),%xmm3
cmp    $0x2,%r11d
jl     14be <coreGAMMA_FLEX+0x3ae>
mov    $0x8,%r11d
mov    0x30(%rsp),%edi
nopw   0x0(%rax,%rax,1)
movapd %xmm4,%xmm6
movsd  (%r9,%r11,4),%xmm4
mulsd  (%rdx,%r11,1),%xmm4
addsd  %xmm4,%xmm3
movslq %edi,%rdi
lea    0x1(%rdi),%ebp
movslq %ebp,%rbp
unpcklpd %xmm4,%xmm4
movsd  0x70(%rsp,%rdi,8),%xmm5
movhpd 0x70(%rsp,%rbp,8),%xmm5
mulpd  %xmm4,%xmm5
movapd %xmm5,%xmm4
addpd  %xmm6,%xmm4
add    $0x8,%r11
add    $0x4,%edi
cmp    %r11,%r13
jne    15d0 <coreGAMMA_FLEX+0x4c0>
addpd  %xmm6,%xmm5
mov    0x20(%rsp),%rdi
addsd  (%r10,%rdi,8),%xmm3
mov    0x20b8(%rsp),%r11d
cmp    $0x2,%r11d
jl     14cd <coreGAMMA_FLEX+0x3bd>
mov    $0x8,%edi
mov    0x68(%rsp),%rbp
movapd %xmm5,%xmm6
movsd  (%r12,%rdi,4),%xmm5
mulsd  (%r8,%rdi,1),%xmm5
addsd  %xmm5,%xmm3
lea    -0x1(%rbp),%esi
movslq %esi,%rsi
movslq %ebp,%rbp
unpcklpd %xmm5,%xmm5
movsd  0x70(%rsp,%rsi,8),%xmm4
movhpd 0x70(%rsp,%rbp,8),%xmm4
mulpd  %xmm5,%xmm4
movapd %xmm4,%xmm5
addpd  %xmm6,%xmm5
add    $0x8,%rdi
add    $0x4,%ebp
cmp    %rdi,%r13
jne    1640 <coreGAMMA_FLEX+0x530>
addpd  %xmm6,%xmm4
mov    0x38(%rsp),%rsi
addsd  (%r10,%rsi,8),%xmm3
cmp    $0x2,%r11d
jl     1709 <coreGAMMA_FLEX+0x5f9>
mov    %rcx,%r10
mov    $0x8,%edi
mov    0x4c(%rsp),%ecx
mov    %ecx,%ebp
mov    0x50(%rsp),%rcx
nopl   (%rax)
movapd %xmm4,%xmm5
movsd  (%rcx,%rdi,4),%xmm4
mulsd  (%r14,%rdi,1),%xmm4
addsd  %xmm4,%xmm3
lea    -0x1(%rbp),%esi
movslq %esi,%rsi
movslq %ebp,%rbp
unpcklpd %xmm4,%xmm4
movsd  0x70(%rsp,%rsi,8),%xmm6
movhpd 0x70(%rsp,%rbp,8),%xmm6
mulpd  %xmm4,%xmm6
movapd %xmm6,%xmm4
addpd  %xmm5,%xmm4
add    $0x8,%rdi
add    $0x4,%ebp
cmp    %rdi,%r13
jne    16b0 <coreGAMMA_FLEX+0x5a0>
addpd  %xmm5,%xmm6
movapd %xmm6,%xmm4
mov    0x40(%rsp),%rsi
mov    %r10,%rcx
jmp    14dc <coreGAMMA_FLEX+0x3cc>
mov    0x40(%rsp),%rsi
jmp    14dc <coreGAMMA_FLEX+0x3cc>
addpd  %xmm2,%xmm4
jmp    171d <coreGAMMA_FLEX+0x60d>
xorpd  %xmm4,%xmm4
mov    0x58(%rsp),%rax
movhpd %xmm4,(%rax)
mov    0x60(%rsp),%rax
movlpd %xmm4,(%rax)
add    $0x2078,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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