#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 FABS(double);
double exp(double);
void coreGammaFlex(double *gammaRates, double *EIGN, double *sumtable,
                   int upper, int *wrptr, volatile double *ext_dlnLdlz,
                   volatile double *ext_d2lnLdlz2, double lz,
                   const int numStates) {
  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 * numStates;
  for (i = 0; i < 4; i++) {
    ki = gammaRates[i];
    kisqr = ki * ki;
    for (l = 1; l < numStates; l++) {
      diagptable[i * gammaStates + l * 4] = exp(EIGN[l - 1] * ki * lz);
      diagptable[i * gammaStates + l * 4 + 1] = EIGN[l - 1] * ki;
      diagptable[i * gammaStates + l * 4 + 2] =
          EIGN[l - 1] * EIGN[l - 1] * 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 * numStates];
      for (l = 1; l < numStates; l++) {
        inv_Li += (tmp = diagptable[j * gammaStates + l * 4] *
                         sum[j * numStates + l]);
        dlnLidlz += tmp * diagptable[j * gammaStates + l * 4 + 1];
        d2lnLidlz2 += tmp * diagptable[j * gammaStates + l * 4 + 2];
      }
    }
    inv_Li = 1.0 / FABS(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):
<coreGammaFlex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2090,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%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    12e2 <coreGammaFlex+0x1c2>
mov    -0x8(%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    12c9 <coreGammaFlex+0x1a9>
mov    -0x10(%rbp),%rax
mov    -0x208c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x2058(%rbp),%xmm0
ff
mulsd  -0x38(%rbp),%xmm0
call   1040 <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    -0x10(%rbp),%rax
mov    -0x208c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%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    -0x10(%rbp),%rax
mov    -0x208c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x208c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%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    11c1 <coreGammaFlex+0xa1>
jmp    12ce <coreGammaFlex+0x1ae>
mov    -0x2084(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2084(%rbp)
jmp    117a <coreGammaFlex+0x5a>
movl   $0x0,-0x2084(%rbp)
mov    -0x2084(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1598 <coreGammaFlex+0x478>
mov    -0x18(%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)
ff
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    14a1 <coreGammaFlex+0x381>
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    1488 <coreGammaFlex+0x368>
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    1382 <coreGammaFlex+0x262>
jmp    148d <coreGammaFlex+0x36d>
mov    -0x2088(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2088(%rbp)
jmp    1345 <coreGammaFlex+0x225>
movsd  -0x2070(%rbp),%xmm0
ff
call   1030 <FABS@plt>
movaps %xmm0,%xmm1
movsd  0xb47(%rip),%xmm0
divsd  %xmm1,%xmm0
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    -0x28(%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    -0x28(%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    12ec <coreGammaFlex+0x1cc>
movsd  -0x2048(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x2050(%rbp),%xmm0
ff
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x2090,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coreGammaFlex>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x20b8,%rsp
mov    %r9,0x88(%rsp)
mov    %r8,0xa8(%rsp)
mov    %ecx,0x40(%rsp)
mov    %rdx,0x78(%rsp)
mov    0x20f8(%rsp),%ecx
lea    0x0(,%rcx,4),%eax
cltq
mov    %rax,0x18(%rsp)
mov    %ecx,%r12d
cmp    $0x1,%ecx
jle    1401 <coreGammaFlex+0x2e1>
movapd %xmm0,%xmm1
mov    %rsi,%r13
mov    %rdi,%r14
movsd  (%rdi),%xmm2
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movapd %xmm2,(%rsp)
unpcklpd %xmm0,%xmm2
movapd %xmm2,0x20(%rsp)
lea    -0x4(,%r12,4),%rbx
ff
xor    %ebp,%ebp
movsd  %xmm1,0x50(%rsp)
movsd  0x0(%r13,%rbp,2),%xmm0
mulsd  (%rsp),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0xd0(%rsp,%rbp,8)
movsd  0x0(%r13,%rbp,2),%xmm0
lea    0x5(%rbp),%eax
cltq
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
unpcklpd %xmm1,%xmm0
movsd  0x50(%rsp),%xmm1
mulpd  0x20(%rsp),%xmm0
movupd %xmm0,0xb0(%rsp,%rax,8)
add    $0x4,%rbp
cmp    %rbp,%rbx
jne    11a0 <coreGammaFlex+0x80>
mov    0x20f8(%rsp),%eax
cmp    $0x2,%eax
jl     1401 <coreGammaFlex+0x2e1>
mov    %r14,0x38(%rsp)
movsd  0x8(%r14),%xmm0
movsd  %xmm0,(%rsp)
mulsd  %xmm0,%xmm0
movsd  %xmm0,0x20(%rsp)
lea    -0x8(,%r12,8),%r14
ff
mov    0x18(%rsp),%rax
lea    (%rsp,%rax,8),%r15
add    $0xd0,%r15
lea    0x5(%rax),%ebx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
movsd  0x0(%r13,%rbp,1),%xmm0
mulsd  (%rsp),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <exp@plt>
movsd  %xmm0,(%r15,%rbp,4)
movsd  0x0(%r13,%rbp,1),%xmm0
movsd  (%rsp),%xmm1
mulsd  %xmm0,%xmm1
movslq %ebx,%rbx
movsd  %xmm1,0xb0(%rsp,%rbx,8)
movsd  0x50(%rsp),%xmm1
mulsd  %xmm0,%xmm0
mulsd  0x20(%rsp),%xmm0
lea    0x1(%rbx),%eax
cltq
movsd  %xmm0,0xb0(%rsp,%rax,8)
add    $0x8,%rbp
add    $0x4,%ebx
cmp    %rbp,%r14
jne    1240 <coreGammaFlex+0x120>
mov    0x20f8(%rsp),%eax
cmp    $0x2,%eax
mov    0x38(%rsp),%rax
jl     1401 <coreGammaFlex+0x2e1>
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    0xb0(%rsp),%rcx
lea    (%rax,%rcx,1),%r15
add    $0x20,%r15
add    $0x6,%ebx
xor    %ebp,%ebp
nopl   0x0(%rax)
movsd  0x0(%r13,%rbp,1),%xmm0
mulsd  (%rsp),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <exp@plt>
movsd  %xmm0,(%r15,%rbp,4)
movsd  0x0(%r13,%rbp,1),%xmm0
movsd  (%rsp),%xmm1
mulsd  %xmm0,%xmm1
lea    -0x1(%rbx),%eax
cltq
movsd  %xmm1,0xb0(%rsp,%rax,8)
movsd  0x50(%rsp),%xmm1
mulsd  %xmm0,%xmm0
mulsd  0x20(%rsp),%xmm0
movslq %ebx,%rbx
movsd  %xmm0,0xb0(%rsp,%rbx,8)
add    $0x8,%rbp
add    $0x4,%ebx
cmp    %rbp,%r14
jne    12f0 <coreGammaFlex+0x1d0>
mov    0x20f8(%rsp),%eax
cmp    $0x2,%eax
mov    0x38(%rsp),%rax
jl     1401 <coreGammaFlex+0x2e1>
movsd  0x18(%rax),%xmm0
movsd  %xmm0,(%rsp)
mulsd  %xmm0,%xmm0
movsd  %xmm0,0x20(%rsp)
mov    0x18(%rsp),%rax
lea    (%rax,%rax,2),%rax
lea    -0x8(,%r12,8),%r14
ff
lea    (%rsp,%rax,8),%r15
add    $0xd0,%r15
lea    0x6(%rax),%ebx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
movsd  0x0(%r13,%rbp,1),%xmm0
mulsd  (%rsp),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <exp@plt>
movsd  %xmm0,(%r15,%rbp,4)
movsd  0x0(%r13,%rbp,1),%xmm0
movsd  (%rsp),%xmm1
mulsd  %xmm0,%xmm1
lea    -0x1(%rbx),%eax
cltq
movsd  %xmm1,0xb0(%rsp,%rax,8)
movsd  0x50(%rsp),%xmm1
mulsd  %xmm0,%xmm0
mulsd  0x20(%rsp),%xmm0
movslq %ebx,%rbx
movsd  %xmm0,0xb0(%rsp,%rbx,8)
add    $0x8,%rbp
add    $0x4,%ebx
cmp    %rbp,%r14
jne    13a0 <coreGammaFlex+0x280>
mov    0x20f0(%rsp),%rcx
mov    0x40(%rsp),%edx
test   %edx,%edx
jle    17c3 <coreGammaFlex+0x6a3>
mov    0x20f8(%rsp),%eax
movslq %eax,%rbx
mov    %edx,%eax
mov    %rax,0x20(%rsp)
lea    (%rbx,%rbx,1),%rax
mov    %rax,0x68(%rsp)
lea    (%rbx,%rbx,2),%rdx
mov    0x18(%rsp),%rcx
lea    (%rcx,%rcx,1),%rsi
lea    (%rcx,%rcx,2),%rax
lea    0x0(,%rcx,8),%rdi
mov    %rdi,0x40(%rsp)
mov    %r12,%r8
lea    0x0(,%r12,4),%r14
shl    $0x3,%r8
mov    0x78(%rsp),%r15
lea    (%r15,%rbx,8),%r13
lea    (%rsp,%rcx,8),%rdi
add    $0xb0,%rdi
lea    0x5(%rcx),%ebp
mov    %ebp,0x4c(%rsp)
mov    %rbx,0x70(%rsp)
shl    $0x4,%rbx
add    %r15,%rbx
shl    $0x4,%rcx
add    %rsp,%rcx
add    $0xb0,%rcx
mov    %rcx,0x90(%rsp)
add    $0x6,%esi
mov    %rsi,0x98(%rsp)
mov    %rdx,0x60(%rsp)
lea    (%r15,%rdx,8),%rbp
lea    (%rsp,%rax,8),%rcx
add    $0xb0,%rcx
mov    %rcx,0x80(%rsp)
add    $0x6,%eax
mov    %eax,0x48(%rsp)
xorpd  %xmm0,%xmm0
xor    %r12d,%r12d
mov    %rdi,0x38(%rsp)
mov    %r8,0xa0(%rsp)
nopl   0x0(%rax,%rax,1)
movapd %xmm0,%xmm4
mov    %r12,%rcx
imul   0x18(%rsp),%rcx
mov    0x78(%rsp),%rdx
lea    (%rdx,%rcx,8),%rax
movsd  (%rdx,%rcx,8),%xmm0
addsd  0xb05(%rip),%xmm0
mov    0x20f8(%rsp),%ecx
cmp    $0x2,%ecx
movapd %xmm4,0x50(%rsp)
jl     16f0 <coreGammaFlex+0x5d0>
xorpd  %xmm3,%xmm3
mov    $0x4,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movapd %xmm3,%xmm2
movsd  0xb0(%rsp,%rcx,8),%xmm1
mulsd  (%r15,%rcx,2),%xmm1
addsd  %xmm1,%xmm0
lea    0x1(%rcx),%edx
movslq %edx,%rdx
movupd 0xb0(%rsp,%rdx,8),%xmm3
unpcklpd %xmm1,%xmm1
mulpd  %xmm3,%xmm1
movapd %xmm1,%xmm3
addpd  %xmm2,%xmm3
add    $0x4,%rcx
cmp    %rcx,%r14
jne    1530 <coreGammaFlex+0x410>
addpd  %xmm2,%xmm1
mov    0x70(%rsp),%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    0x20f8(%rsp),%ecx
cmp    $0x2,%ecx
jl     16fe <coreGammaFlex+0x5de>
mov    $0x8,%ecx
mov    0x4c(%rsp),%edx
cs nopw 0x0(%rax,%rax,1)
movapd %xmm1,%xmm3
movsd  (%rdi,%rcx,4),%xmm1
mulsd  0x0(%r13,%rcx,1),%xmm1
addsd  %xmm1,%xmm0
movslq %edx,%rdx
lea    0x1(%rdx),%esi
movslq %esi,%rsi
unpcklpd %xmm1,%xmm1
movsd  0xb0(%rsp,%rdx,8),%xmm2
movhpd 0xb0(%rsp,%rsi,8),%xmm2
mulpd  %xmm1,%xmm2
movapd %xmm2,%xmm1
addpd  %xmm3,%xmm1
add    $0x8,%rcx
add    $0x4,%edx
cmp    %rcx,%r8
jne    15a0 <coreGammaFlex+0x480>
addpd  %xmm3,%xmm2
mov    0x68(%rsp),%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    0x20f8(%rsp),%ecx
cmp    $0x2,%ecx
jl     170c <coreGammaFlex+0x5ec>
mov    $0x8,%ecx
mov    0x98(%rsp),%rdx
mov    0x90(%rsp),%rdi
xchg   %ax,%ax
movapd %xmm2,%xmm1
movsd  (%rdi,%rcx,4),%xmm2
mulsd  (%rbx,%rcx,1),%xmm2
addsd  %xmm2,%xmm0
lea    -0x1(%rdx),%esi
movslq %esi,%rsi
movslq %edx,%rdx
unpcklpd %xmm2,%xmm2
movsd  0xb0(%rsp,%rsi,8),%xmm3
movhpd 0xb0(%rsp,%rdx,8),%xmm3
mulpd  %xmm2,%xmm3
movapd %xmm3,%xmm2
addpd  %xmm1,%xmm2
add    $0x8,%rcx
add    $0x4,%edx
cmp    %rcx,%r8
jne    1620 <coreGammaFlex+0x500>
addpd  %xmm1,%xmm3
mov    0x60(%rsp),%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    0x20f8(%rsp),%eax
cmp    $0x2,%eax
jl     17a7 <coreGammaFlex+0x687>
mov    $0x8,%eax
mov    0x48(%rsp),%ecx
mov    0x80(%rsp),%rsi
nopl   0x0(%rax,%rax,1)
movapd %xmm3,%xmm1
movsd  (%rsi,%rax,4),%xmm3
mulsd  0x0(%rbp,%rax,1),%xmm3
addsd  %xmm3,%xmm0
lea    -0x1(%rcx),%edx
movslq %edx,%rdx
movslq %ecx,%rcx
unpcklpd %xmm3,%xmm3
movsd  0xb0(%rsp,%rdx,8),%xmm2
movhpd 0xb0(%rsp,%rcx,8),%xmm2
mulpd  %xmm3,%xmm2
movapd %xmm2,%xmm3
addpd  %xmm1,%xmm3
add    $0x8,%rax
add    $0x4,%ecx
cmp    %rax,%r8
jne    16a0 <coreGammaFlex+0x580>
addpd  %xmm1,%xmm2
jmp    1716 <coreGammaFlex+0x5f6>
mov    0x70(%rsp),%rcx
addsd  (%rax,%rcx,8),%xmm0
xorpd  %xmm1,%xmm1
mov    0x68(%rsp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movapd %xmm1,%xmm2
mov    0x60(%rsp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movapd %xmm2,(%rsp)
call   1030 <FABS@plt>
movsd  0x8d8(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd (%rsp),%xmm3
movapd %xmm3,%xmm0
mulsd  %xmm1,%xmm0
unpckhpd %xmm3,%xmm3
mulsd  %xmm1,%xmm3
mov    0xa8(%rsp),%rax
xorps  %xmm1,%xmm1
cvtsi2sdl (%rax,%r12,4),%xmm1
movapd %xmm0,%xmm2
mulsd  %xmm0,%xmm2
subsd  %xmm2,%xmm3
unpcklpd %xmm1,%xmm1
unpcklpd %xmm0,%xmm3
mulpd  %xmm1,%xmm3
movapd %xmm3,%xmm0
movapd 0x50(%rsp),%xmm1
addpd  %xmm1,%xmm0
add    $0x1,%r12
mov    0x40(%rsp),%rax
add    %rax,%r15
add    %rax,%r13
add    %rax,%rbx
add    %rax,%rbp
cmp    0x20(%rsp),%r12
mov    0x38(%rsp),%rdi
mov    0xa0(%rsp),%r8
jne    14e0 <coreGammaFlex+0x3c0>
jmp    17b1 <coreGammaFlex+0x691>
movapd %xmm3,(%rsp)
jmp    171b <coreGammaFlex+0x5fb>
movapd %xmm3,%xmm2
addpd  %xmm1,%xmm2
mov    0x20f0(%rsp),%rcx
jmp    17c7 <coreGammaFlex+0x6a7>
xorpd  %xmm2,%xmm2
mov    0x88(%rsp),%rax
movhpd %xmm2,(%rax)
movlpd %xmm2,(%rcx)
add    $0x20b8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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