#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 sqrt(double);
void calculateSubgridError_ADR_tau_1_sd(
    int nElements_global, int nQuadraturePoints_element, int nSpace,
    int *rowptr, int *colind, double *elementDiameter, double *dmt, double *df,
    double *a, double *da, double *grad_phi, double *dphi, double *dr,
    double *pe, double *cfl, double *tau) {
  int eN, k, I, m, nnz = rowptr[nSpace];
  double h, Vlin, Alin, A_II, num, den, cfl1, cfl2, vlin[3], tauMax;
  for (eN = 0; eN < nElements_global; eN++) {
    h = elementDiameter[eN];
    tauMax = 0.0;
    for (k = 0; k < nQuadraturePoints_element; k++) {
      Vlin = 0.0;
      Alin = 0.0;
      for (I = 0; I < nSpace; I++) {
        vlin[I] = df[eN * nQuadraturePoints_element * nSpace + k * nSpace + I];
        for (m = rowptr[I]; m < rowptr[I + 1]; m++)
          vlin[I] += da[eN * nQuadraturePoints_element * nnz + k * nnz + m] *
                     grad_phi[eN * nQuadraturePoints_element * nSpace +
                              k * nSpace + colind[m]];
      }
      for (I = 0; I < nSpace; I++)
        Vlin += vlin[I] * vlin[I];
      Vlin = sqrt(Vlin);
      for (I = 0; I < nSpace; I++) {
        for (m = rowptr[I]; m < rowptr[I + 1]; m++) {
          if (I == colind[m]) {
            A_II = a[eN * nQuadraturePoints_element * nnz + k * nnz + m];
            Alin = (A_II > Alin) ? A_II : Alin;
          }
        }
      }
      Alin *= dphi[eN * nQuadraturePoints_element + k];
      cfl1 = Vlin / h;
      cfl2 = Alin / (h * h);
      if (cfl1 > cfl2)
        cfl[eN * nQuadraturePoints_element + k] = cfl1;
      else
        cfl[eN * nQuadraturePoints_element + k] = cfl2;
      num = 0.5 * Vlin * h + 1.0e-8;
      den = Alin + num * 1.0e-8;
      pe[eN * nQuadraturePoints_element + k] = num / den;
      tau[eN * nQuadraturePoints_element + k] =
          1.0 / ((2.0 * Vlin / h) + (4.0 * Alin / (h * h)) +
                 fabs(dr[eN * nQuadraturePoints_element + k]) +
                 fabs(dmt[eN * nQuadraturePoints_element + k]) + 1.0e-8);
    }
  }
}


x86 assembly (clang, -O0):
<calculateSubgridError_ADR_tau_1_sd>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    0x58(%rbp),%rax
mov    0x50(%rbp),%rax
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x3c(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    15a6 <calculateSubgridError_ADR_tau_1_sd+0x496>
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1593 <calculateSubgridError_ADR_tau_1_sd+0x483>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12b0 <calculateSubgridError_ADR_tau_1_sd+0x1a0>
mov    0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
mov    -0x30(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x34(%rbp),%rax
movsd  %xmm0,-0xa0(%rbp,%rax,8)
ff ff
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    -0x18(%rbp),%rcx
mov    -0x34(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
cmp    (%rcx,%rdx,4),%eax
jge    129d <calculateSubgridError_ADR_tau_1_sd+0x18d>
mov    0x28(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0x3c(%rbp),%ecx
mov    -0x30(%rbp),%edx
imul   -0x3c(%rbp),%edx
add    %edx,%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x30(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
mov    -0x30(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
mov    -0x20(%rbp),%rdx
movslq -0x38(%rbp),%rsi
add    (%rdx,%rsi,4),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movslq -0x34(%rbp),%rax
movsd  -0xa0(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp,%rax,8)
ff ff
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    120a <calculateSubgridError_ADR_tau_1_sd+0xfa>
jmp    12a2 <calculateSubgridError_ADR_tau_1_sd+0x192>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11c0 <calculateSubgridError_ADR_tau_1_sd+0xb0>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12fd <calculateSubgridError_ADR_tau_1_sd+0x1ed>
movslq -0x34(%rbp),%rax
movsd  -0xa0(%rbp,%rax,8),%xmm0
ff ff
movslq -0x34(%rbp),%rax
movsd  -0xa0(%rbp,%rax,8),%xmm2
ff ff
movsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12b7 <calculateSubgridError_ADR_tau_1_sd+0x1a7>
movsd  -0x50(%rbp),%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    13e4 <calculateSubgridError_ADR_tau_1_sd+0x2d4>
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    -0x18(%rbp),%rcx
mov    -0x34(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
cmp    (%rcx,%rdx,4),%eax
jge    13d1 <calculateSubgridError_ADR_tau_1_sd+0x2c1>
mov    -0x34(%rbp),%eax
mov    -0x20(%rbp),%rcx
movslq -0x38(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jne    13be <calculateSubgridError_ADR_tau_1_sd+0x2ae>
mov    0x20(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0x3c(%rbp),%ecx
mov    -0x30(%rbp),%edx
imul   -0x3c(%rbp),%edx
add    %edx,%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
ucomisd -0x58(%rbp),%xmm0
jbe    13a4 <calculateSubgridError_ADR_tau_1_sd+0x294>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    13b1 <calculateSubgridError_ADR_tau_1_sd+0x2a1>
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0x58(%rbp)
jmp    13c3 <calculateSubgridError_ADR_tau_1_sd+0x2b3>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    132d <calculateSubgridError_ADR_tau_1_sd+0x21d>
jmp    13d6 <calculateSubgridError_ADR_tau_1_sd+0x2c6>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1313 <calculateSubgridError_ADR_tau_1_sd+0x203>
mov    0x38(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm0
divsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x78(%rbp),%xmm0
ucomisd -0x80(%rbp),%xmm0
jbe    145b <calculateSubgridError_ADR_tau_1_sd+0x34b>
movsd  -0x78(%rbp),%xmm0
mov    0x50(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1476 <calculateSubgridError_ADR_tau_1_sd+0x366>
movsd  -0x80(%rbp),%xmm0
mov    0x50(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xba2(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xb74(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm0
movsd  0xb59(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x68(%rbp),%xmm0
divsd  -0x70(%rbp),%xmm0
mov    0x48(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xb34(%rip),%xmm1
mulsd  -0x50(%rbp),%xmm1
divsd  -0x48(%rbp),%xmm1
movsd  0xb1a(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
mulsd  -0x48(%rbp),%xmm2
divsd  %xmm2,%xmm0
addsd  %xmm0,%xmm1
mov    0x40(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xb06(%rip),%xmm2
pand   %xmm2,%xmm0
addsd  %xmm0,%xmm1
mov    0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xae1(%rip),%xmm2
pand   %xmm2,%xmm0
addsd  %xmm0,%xmm1
movsd  0xaa9(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xa95(%rip),%xmm0
divsd  %xmm1,%xmm0
mov    0x58(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    119d <calculateSubgridError_ADR_tau_1_sd+0x8d>
jmp    1598 <calculateSubgridError_ADR_tau_1_sd+0x488>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    116d <calculateSubgridError_ADR_tau_1_sd+0x5d>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculateSubgridError_ADR_tau_1_sd>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %r9,0x50(%rsp)
mov    %esi,(%rsp)
test   %edi,%edi
jle    168a <calculateSubgridError_ADR_tau_1_sd+0x57a>
mov    %r8,%r15
mov    0x120(%rsp),%r12
mov    0x118(%rsp),%rsi
mov    0x110(%rsp),%rbp
movslq %edx,%rax
mov    (%rcx,%rax,4),%r10d
mov    %edi,%edi
mov    %rdi,0x58(%rsp)
mov    %eax,%r13d
mov    %r13d,%r11d
and    $0x3,%r11d
mov    %r13d,%eax
and    $0xfffffffc,%eax
mov    %rax,0x60(%rsp)
mov    %r10d,%edi
mov    (%rsp),%eax
imul   %eax,%edi
mov    %edi,0x28(%rsp)
xorpd  %xmm8,%xmm8
movsd  0xe77(%rip),%xmm5
movsd  0xe77(%rip),%xmm6
movsd  0xe77(%rip),%xmm7
movapd 0xe7f(%rip),%xmm4
movsd  0xe6e(%rip),%xmm9
cltq
mov    %rax,0x48(%rsp)
mov    %eax,%eax
mov    %rax,0x88(%rsp)
lea    -0x1(%r13),%rax
mov    %rax,0x68(%rsp)
lea    0x8(%rsi),%rax
mov    %rax,0x78(%rsp)
lea    0x8(%rbp),%rax
mov    %rax,0x70(%rsp)
xor    %eax,%eax
mov    %rax,0x10(%rsp)
xor    %eax,%eax
mov    %rax,0x8(%rsp)
mov    %r10d,0x4(%rsp)
mov    %r11,0x80(%rsp)
jmp    122a <calculateSubgridError_ADR_tau_1_sd+0x11a>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x8(%rsp),%rsi
add    $0x1,%rsi
mov    0x10(%rsp),%rax
add    0x28(%rsp),%eax
mov    %rax,0x10(%rsp)
mov    %rsi,%rax
mov    %rsi,0x8(%rsp)
cmp    0x58(%rsp),%rsi
je     168a <calculateSubgridError_ADR_tau_1_sd+0x57a>
cmpl   $0x0,(%rsp)
jle    1200 <calculateSubgridError_ADR_tau_1_sd+0xf0>
mov    0x50(%rsp),%rax
mov    0x8(%rsp),%rsi
movsd  (%rax,%rsi,8),%xmm10
imul   0x48(%rsp),%rsi
mov    %rsi,0x20(%rsp)
movapd %xmm10,%xmm11
mulsd  %xmm10,%xmm11
movapd %xmm10,%xmm12
unpcklpd %xmm11,%xmm12
mov    0x10(%rsp),%rax
xor    %edi,%edi
movapd %xmm10,0xb0(%rsp)
movapd %xmm11,0xa0(%rsp)
movapd %xmm12,0x90(%rsp)
jmp    1370 <calculateSubgridError_ADR_tau_1_sd+0x260>
nopl   0x0(%rax)
xorpd  %xmm1,%xmm1
mov    0x20(%rsp),%rax
add    %rdi,%rax
mov    0x128(%rsp),%rsi
mulsd  (%rsi,%rax,8),%xmm1
movapd %xmm0,%xmm2
unpcklpd %xmm1,%xmm2
divpd  %xmm12,%xmm2
movapd %xmm2,%xmm3
unpckhpd %xmm2,%xmm3
maxsd  %xmm3,%xmm2
mov    0x140(%rsp),%rsi
movsd  %xmm2,(%rsi,%rax,8)
movapd %xmm0,%xmm2
mulsd  %xmm5,%xmm2
mulsd  %xmm10,%xmm2
addsd  %xmm6,%xmm2
movapd %xmm2,%xmm3
mulsd  %xmm6,%xmm3
addsd  %xmm1,%xmm3
divsd  %xmm3,%xmm2
mov    0x138(%rsp),%rsi
movsd  %xmm2,(%rsi,%rax,8)
addsd  %xmm0,%xmm0
divsd  %xmm10,%xmm0
mulsd  %xmm7,%xmm1
divsd  %xmm11,%xmm1
addsd  %xmm0,%xmm1
mov    0x130(%rsp),%rsi
movsd  (%rsi,%rax,8),%xmm0
andpd  %xmm4,%xmm0
addsd  %xmm1,%xmm0
mov    0x100(%rsp),%rsi
movsd  (%rsi,%rax,8),%xmm1
andpd  %xmm4,%xmm1
addsd  %xmm0,%xmm1
addsd  %xmm6,%xmm1
movapd %xmm9,%xmm0
divsd  %xmm1,%xmm0
mov    0x148(%rsp),%rsi
movsd  %xmm0,(%rsi,%rax,8)
add    $0x1,%rdi
mov    0x2c(%rsp),%eax
add    %r10d,%eax
cmp    0x88(%rsp),%rdi
je     1200 <calculateSubgridError_ADR_tau_1_sd+0xf0>
xorpd  %xmm0,%xmm0
test   %edx,%edx
mov    %eax,0x2c(%rsp)
jle    1290 <calculateSubgridError_ADR_tau_1_sd+0x180>
cltq
mov    0x70(%rsp),%rsi
lea    (%rsi,%rax,8),%r14
mov    0x78(%rsp),%rsi
lea    (%rsi,%rax,8),%rax
mov    0x20(%rsp),%rsi
mov    %rdi,0x18(%rsp)
add    %esi,%edi
mov    %edi,%esi
imul   %edx,%esi
imul   %r10d,%edi
movslq %edi,%r8
movslq %esi,%rbx
mov    (%rcx),%r10d
xor    %r9d,%r9d
jmp    13d0 <calculateSubgridError_ADR_tau_1_sd+0x2c0>
nopw   0x0(%rax,%rax,1)
movsd  %xmm2,0x30(%rsp,%r11,8)
cmp    %r13,%r9
je     1490 <calculateSubgridError_ADR_tau_1_sd+0x380>
mov    %r9,%r11
mov    %r10d,%edi
lea    (%r9,%rbx,1),%rsi
mov    0x108(%rsp),%rbp
movsd  0x0(%rbp,%rsi,8),%xmm1
movsd  %xmm1,0x30(%rsp,%r9,8)
add    $0x1,%r9
mov    0x4(%rcx,%r11,4),%r10d
cmp    %r10d,%edi
jge    13c7 <calculateSubgridError_ADR_tau_1_sd+0x2b7>
movslq %edi,%rsi
mov    %r10d,%ebp
sub    %edi,%ebp
test   $0x1,%bpl
jne    1410 <calculateSubgridError_ADR_tau_1_sd+0x300>
mov    %rsi,%rdi
jmp    143b <calculateSubgridError_ADR_tau_1_sd+0x32b>
lea    (%rsi,%r8,1),%rdi
mov    0x118(%rsp),%rbp
movsd  0x0(%rbp,%rdi,8),%xmm2
movslq (%r15,%rsi,4),%rdi
add    %rbx,%rdi
mulsd  (%r12,%rdi,8),%xmm2
addsd  %xmm1,%xmm2
lea    0x1(%rsi),%rdi
movapd %xmm2,%xmm1
movslq %r10d,%rbp
not    %rsi
add    %rbp,%rsi
je     13c0 <calculateSubgridError_ADR_tau_1_sd+0x2b0>
nopw   0x0(%rax,%rax,1)
movslq (%r15,%rdi,4),%rsi
add    %rbx,%rsi
movsd  -0x8(%rax,%rdi,8),%xmm3
movsd  (%rax,%rdi,8),%xmm2
mulsd  (%r12,%rsi,8),%xmm3
movslq 0x4(%r15,%rdi,4),%rsi
add    %rbx,%rsi
mulsd  (%r12,%rsi,8),%xmm2
addsd  %xmm1,%xmm3
addsd  %xmm3,%xmm2
add    $0x2,%rdi
movapd %xmm2,%xmm1
cmp    %rdi,%rbp
jne    1450 <calculateSubgridError_ADR_tau_1_sd+0x340>
jmp    13c0 <calculateSubgridError_ADR_tau_1_sd+0x2b0>
xorpd  %xmm1,%xmm1
test   %edx,%edx
mov    0x4(%rsp),%r10d
mov    0x80(%rsp),%r11
mov    0x18(%rsp),%rdi
jle    1294 <calculateSubgridError_ADR_tau_1_sd+0x184>
cmpq   $0x3,0x68(%rsp)
jae    14be <calculateSubgridError_ADR_tau_1_sd+0x3ae>
xorpd  %xmm0,%xmm0
xor    %eax,%eax
jmp    1511 <calculateSubgridError_ADR_tau_1_sd+0x401>
xorpd  %xmm0,%xmm0
xor    %eax,%eax
mov    0x60(%rsp),%rsi
nopl   0x0(%rax)
movsd  0x30(%rsp,%rax,8),%xmm1
movsd  0x38(%rsp,%rax,8),%xmm2
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm2
addsd  %xmm1,%xmm2
movsd  0x40(%rsp,%rax,8),%xmm1
mulsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
movsd  0x48(%rsp,%rax,8),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
add    $0x4,%rax
cmp    %rax,%rsi
jne    14d0 <calculateSubgridError_ADR_tau_1_sd+0x3c0>
test   %r11,%r11
je     1536 <calculateSubgridError_ADR_tau_1_sd+0x426>
lea    (%rsp,%rax,8),%rax
add    $0x30,%rax
xor    %esi,%esi
movsd  (%rax,%rsi,8),%xmm1
mulsd  %xmm1,%xmm1
addsd  %xmm1,%xmm0
add    $0x1,%rsi
cmp    %rsi,%r11
jne    1520 <calculateSubgridError_ADR_tau_1_sd+0x410>
ucomisd %xmm8,%xmm0
jb     154a <calculateSubgridError_ADR_tau_1_sd+0x43a>
sqrtsd %xmm0,%xmm0
test   %edx,%edx
jg     15b7 <calculateSubgridError_ADR_tau_1_sd+0x4a7>
jmp    1290 <calculateSubgridError_ADR_tau_1_sd+0x180>
mov    %edx,%ebx
mov    %rcx,%rbp
call   1030 <sqrt@plt>
mov    0x18(%rsp),%rdi
movapd 0x90(%rsp),%xmm12
movapd 0xa0(%rsp),%xmm11
movapd 0xb0(%rsp),%xmm10
movsd  0xa98(%rip),%xmm9
movapd 0xa98(%rip),%xmm4
movsd  0xa80(%rip),%xmm7
movsd  0xa70(%rip),%xmm6
movsd  0xa60(%rip),%xmm5
xorpd  %xmm8,%xmm8
mov    0x4(%rsp),%r10d
mov    %rbp,%rcx
mov    %ebx,%edx
test   %edx,%edx
jle    1290 <calculateSubgridError_ADR_tau_1_sd+0x180>
mov    0x20(%rsp),%rax
add    %edi,%eax
imul   %r10d,%eax
movslq %eax,%r8
mov    (%rcx),%ebx
xorpd  %xmm1,%xmm1
xor    %r9d,%r9d
jmp    15d9 <calculateSubgridError_ADR_tau_1_sd+0x4c9>
cmp    %r13,%r9
je     1680 <calculateSubgridError_ADR_tau_1_sd+0x570>
mov    %r9,%rsi
mov    %ebx,%edi
add    $0x1,%r9
mov    0x4(%rcx,%rsi,4),%ebx
cmp    %ebx,%edi
jge    15d0 <calculateSubgridError_ADR_tau_1_sd+0x4c0>
movslq %edi,%rax
mov    %ebx,%ebp
sub    %edi,%ebp
test   $0x1,%bpl
jne    1600 <calculateSubgridError_ADR_tau_1_sd+0x4f0>
mov    %rax,%rdi
jmp    1627 <calculateSubgridError_ADR_tau_1_sd+0x517>
nopl   0x0(%rax)
mov    (%r15,%rax,4),%edi
cmp    %rdi,%rsi
jne    1623 <calculateSubgridError_ADR_tau_1_sd+0x513>
lea    (%rax,%r8,1),%rdi
mov    0x110(%rsp),%rbp
movsd  0x0(%rbp,%rdi,8),%xmm2
maxsd  %xmm1,%xmm2
movapd %xmm2,%xmm1
lea    0x1(%rax),%rdi
movslq %ebx,%rbp
not    %rax
add    %rbp,%rax
jne    1649 <calculateSubgridError_ADR_tau_1_sd+0x539>
jmp    15d0 <calculateSubgridError_ADR_tau_1_sd+0x4c0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x2,%rdi
cmp    %rdi,%rbp
je     15d0 <calculateSubgridError_ADR_tau_1_sd+0x4c0>
mov    (%r15,%rdi,4),%eax
cmp    %rax,%rsi
jne    1661 <calculateSubgridError_ADR_tau_1_sd+0x551>
movsd  -0x8(%r14,%rdi,8),%xmm2
maxsd  %xmm1,%xmm2
movapd %xmm2,%xmm1
mov    0x4(%r15,%rdi,4),%eax
cmp    %rax,%rsi
jne    1640 <calculateSubgridError_ADR_tau_1_sd+0x530>
movsd  (%r14,%rdi,8),%xmm2
maxsd  %xmm1,%xmm2
movapd %xmm2,%xmm1
jmp    1640 <calculateSubgridError_ADR_tau_1_sd+0x530>
nopl   0x0(%rax,%rax,1)
mov    0x18(%rsp),%rdi
jmp    1294 <calculateSubgridError_ADR_tau_1_sd+0x184>
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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