#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 sqrt(double);
void l2norm(int nx0, int ny0, int nz0, int ist, int iend, int jst, int jend,
            double v[64][64 / 2 * 2 + 1][64 / 2 * 2 + 1][5], double sum[5]) {
  int i, j, k, m;
  double sum0 = 0.0, sum1 = 0.0, sum2 = 0.0, sum3 = 0.0, sum4 = 0.0;
#pragma omp single
  for (m = 0; m < 5; m++) {
    sum[m] = 0.0;
  }
#pragma omp for nowait
  for (i = ist; i <= iend; i++) {
    for (j = jst; j <= jend; j++) {
      for (k = 1; k <= nz0 - 2; k++) {
        sum0 = sum0 + v[i][j][k][0] * v[i][j][k][0];
        sum1 = sum1 + v[i][j][k][1] * v[i][j][k][1];
        sum2 = sum2 + v[i][j][k][2] * v[i][j][k][2];
        sum3 = sum3 + v[i][j][k][3] * v[i][j][k][3];
        sum4 = sum4 + v[i][j][k][4] * v[i][j][k][4];
      }
    }
  }
#pragma omp critical
  {
    sum[0] += sum0;
    sum[1] += sum1;
    sum[2] += sum2;
    sum[3] += sum3;
    sum[4] += sum4;
  }
#pragma omp barrier
#pragma omp single
  for (m = 0; m < 5; m++) {
    sum[m] = sqrt(sum[m] / ((nx0 - 2) * (ny0 - 2) * (nz0 - 2)));
  }
}


x86 assembly (clang, -O0):
<l2norm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x28(%rbp)
cmpl   $0x5,-0x28(%rbp)
jge    118e <l2norm+0x7e>
mov    0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1166 <l2norm+0x56>
mov    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1436 <l2norm+0x326>
mov    -0x18(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    0x10(%rbp),%eax
jg     1423 <l2norm+0x313>
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jg     1410 <l2norm+0x300>
movsd  -0x30(%rbp),%xmm1
mov    0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
imul   $0x29428,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
imul   $0xa28,%rcx,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
mov    0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
imul   $0x29428,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
imul   $0xa28,%rcx,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x38(%rbp),%xmm1
mov    0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
imul   $0x29428,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
imul   $0xa28,%rcx,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm0
mov    0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
imul   $0x29428,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
imul   $0xa28,%rcx,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x40(%rbp),%xmm1
mov    0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
imul   $0x29428,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
imul   $0xa28,%rcx,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movsd  0x10(%rax),%xmm0
mov    0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
imul   $0x29428,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
imul   $0xa28,%rcx,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x48(%rbp),%xmm1
mov    0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
imul   $0x29428,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
imul   $0xa28,%rcx,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movsd  0x18(%rax),%xmm0
mov    0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
imul   $0x29428,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
imul   $0xa28,%rcx,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movsd  0x18(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x50(%rbp),%xmm1
mov    0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
imul   $0x29428,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
imul   $0xa28,%rcx,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movsd  0x20(%rax),%xmm0
mov    0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
imul   $0x29428,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
imul   $0xa28,%rcx,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movsd  0x20(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11b9 <l2norm+0xa9>
jmp    1415 <l2norm+0x305>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11a6 <l2norm+0x96>
jmp    1428 <l2norm+0x318>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1194 <l2norm+0x84>
movsd  -0x30(%rbp),%xmm0
mov    0x20(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x38(%rbp),%xmm0
mov    0x20(%rbp),%rax
addsd  0x8(%rax),%xmm0
movsd  %xmm0,0x8(%rax)
movsd  -0x40(%rbp),%xmm0
mov    0x20(%rbp),%rax
addsd  0x10(%rax),%xmm0
movsd  %xmm0,0x10(%rax)
movsd  -0x48(%rbp),%xmm0
mov    0x20(%rbp),%rax
addsd  0x18(%rax),%xmm0
movsd  %xmm0,0x18(%rax)
movsd  -0x50(%rbp),%xmm0
mov    0x20(%rbp),%rax
addsd  0x20(%rax),%xmm0
movsd  %xmm0,0x20(%rax)
movl   $0x0,-0x28(%rbp)
cmpl   $0x5,-0x28(%rbp)
jge    14f1 <l2norm+0x3e1>
mov    0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x4(%rbp),%eax
sub    $0x2,%eax
mov    -0x8(%rbp),%ecx
sub    $0x2,%ecx
imul   %ecx,%eax
mov    -0xc(%rbp),%ecx
sub    $0x2,%ecx
imul   %ecx,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
mov    0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    149a <l2norm+0x38a>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<l2norm>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    0x50(%rsp),%r14
xorpd  %xmm2,%xmm2
movupd %xmm2,0x10(%r14)
movupd %xmm2,(%r14)
movq   $0x0,0x20(%r14)
xorpd  %xmm8,%xmm8
xorpd  %xmm0,%xmm0
xorpd  %xmm4,%xmm4
xorpd  %xmm1,%xmm1
cmp    %r8d,%ecx
jle    1199 <l2norm+0x89>
addsd  %xmm8,%xmm0
addpd  %xmm2,%xmm4
movupd %xmm4,0x8(%r14)
addpd  %xmm2,%xmm1
add    $0xfffffffe,%edi
add    $0xfffffffe,%esi
imul   %edi,%esi
add    $0xfffffffe,%edx
imul   %esi,%edx
xorps  %xmm2,%xmm2
cvtsi2sd %edx,%xmm2
movupd %xmm1,0x18(%r14)
divsd  %xmm2,%xmm0
ucomisd %xmm8,%xmm0
movsd  %xmm2,(%rsp)
jb     1284 <l2norm+0x174>
sqrtsd %xmm0,%xmm0
jmp    128e <l2norm+0x17e>
mov    0x40(%rsp),%r10d
lea    -0x1(%rdx),%eax
movslq %r9d,%r11
lea    0x1(%r10),%r13d
movslq %ecx,%r12
imul   $0x29428,%r12,%rcx
add    0x48(%rsp),%rcx
add    $0x1,%r8d
imul   $0xa28,%r11,%r15
add    %rcx,%r15
shl    $0x3,%rax
lea    (%rax,%rax,4),%rbx
xorpd  %xmm4,%xmm4
xorpd  %xmm0,%xmm0
xorpd  %xmm1,%xmm1
jmp    11f4 <l2norm+0xe4>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r12
add    $0x29428,%r15
cmp    %r12d,%r8d
je     114d <l2norm+0x3d>
cmp    %r10d,%r9d
jg     11e0 <l2norm+0xd0>
mov    %r15,%rcx
mov    %r11,%rax
jmp    1220 <l2norm+0x110>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rax
add    $0xa28,%rcx
cmp    %eax,%r13d
je     11e0 <l2norm+0xd0>
cmp    $0x3,%edx
jl     1210 <l2norm+0x100>
mov    $0x28,%ebp
nopw   0x0(%rax,%rax,1)
movapd %xmm1,%xmm6
movapd %xmm4,%xmm5
movsd  (%rcx,%rbp,1),%xmm1
mulsd  %xmm1,%xmm1
addsd  %xmm1,%xmm0
movupd 0x8(%rcx,%rbp,1),%xmm7
mulpd  %xmm7,%xmm7
movapd %xmm7,%xmm4
addpd  %xmm5,%xmm4
movupd 0x18(%rcx,%rbp,1),%xmm3
mulpd  %xmm3,%xmm3
movapd %xmm3,%xmm1
addpd  %xmm6,%xmm1
add    $0x28,%rbp
cmp    %rbp,%rbx
jne    1230 <l2norm+0x120>
addpd  %xmm6,%xmm3
addpd  %xmm5,%xmm7
movapd %xmm7,%xmm4
movapd %xmm3,%xmm1
jmp    1210 <l2norm+0x100>
call   1030 <sqrt@plt>
movsd  (%rsp),%xmm2
movsd  %xmm0,(%r14)
movsd  0x8(%r14),%xmm0
divsd  %xmm2,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     12ad <l2norm+0x19d>
sqrtsd %xmm0,%xmm0
jmp    12bb <l2norm+0x1ab>
call   1030 <sqrt@plt>
xorpd  %xmm1,%xmm1
movsd  (%rsp),%xmm2
movsd  %xmm0,0x8(%r14)
movsd  0x10(%r14),%xmm0
divsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jb     12d7 <l2norm+0x1c7>
sqrtsd %xmm0,%xmm0
jmp    12e1 <l2norm+0x1d1>
call   1030 <sqrt@plt>
movsd  (%rsp),%xmm2
movsd  %xmm0,0x10(%r14)
movsd  0x18(%r14),%xmm0
divsd  %xmm2,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1301 <l2norm+0x1f1>
sqrtsd %xmm0,%xmm0
jmp    130f <l2norm+0x1ff>
call   1030 <sqrt@plt>
xorpd  %xmm1,%xmm1
movsd  (%rsp),%xmm2
movsd  %xmm0,0x18(%r14)
movsd  0x20(%r14),%xmm0
divsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jb     132b <l2norm+0x21b>
sqrtsd %xmm0,%xmm0
jmp    1330 <l2norm+0x220>
call   1030 <sqrt@plt>
movsd  %xmm0,0x20(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @l2norm(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, [65 x [65 x [5 x double]]]* nocapture %7, double* nocapture %8) {
%10 = bitcast double* %8 to i8*
%11 = icmp sgt i32 %3, %4
br i1 %11, label %66, label %12
12: ; preds = %9
%13 = icmp sgt i32 %5, %6
%14 = icmp slt i32 %2, 3
%15 = add i32 %2, -1
%16 = sext i32 %5 to i64
%17 = add i32 %6, 1
%18 = sext i32 %3 to i64
%19 = add i32 %4, 1
%20 = zext i32 %15 to i64
br label %21
21: ; preds = %12, %59
%22 = phi i64 [ %18, %12 ], [ %63, %59 ]
%23 = phi double [ 0.000000e+00, %12 ], [ %60, %59 ]
%24 = phi <2 x double> [ zeroinitializer, %12 ], [ %61, %59 ]
%25 = phi <2 x double> [ zeroinitializer, %12 ], [ %62, %59 ]
br i1 %13, label %59, label %26
26: ; preds = %21, %52
%27 = phi i64 [ %56, %52 ], [ %16, %21 ]
%28 = phi double [ %53, %52 ], [ %23, %21 ]
%29 = phi <2 x double> [ %54, %52 ], [ %24, %21 ]
%30 = phi <2 x double> [ %55, %52 ], [ %25, %21 ]
br i1 %14, label %52, label %31
31: ; preds = %26, %31
%32 = phi i64 [ %47, %31 ], [ 1, %26 ]
%33 = phi double [ %38, %31 ], [ %28, %26 ]
%34 = phi <2 x double> [ %42, %31 ], [ %29, %26 ]
%35 = phi <2 x double> [ %46, %31 ], [ %30, %26 ]
%36 = getelementptr inbounds [65 x [65 x [5 x double]]], [65 x [65 x [5 x double]]]* %7, i64 %22, i64 %27, i64 %32, i64 0
%37 = load double, double* %36
%38 = tail call double @llvm.fmuladd.f64(double %37, double %37, double %33)
%39 = getelementptr inbounds [65 x [65 x [5 x double]]], [65 x [65 x [5 x double]]]* %7, i64 %22, i64 %27, i64 %32, i64 1
%40 = bitcast double* %39 to <2 x double>*
%41 = load <2 x double>, <2 x double>* %40
%42 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %41, <2 x double> %41, <2 x double> %34)
%43 = getelementptr inbounds [65 x [65 x [5 x double]]], [65 x [65 x [5 x double]]]* %7, i64 %22, i64 %27, i64 %32, i64 3
%44 = bitcast double* %43 to <2 x double>*
%45 = load <2 x double>, <2 x double>* %44
%46 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %45, <2 x double> %45, <2 x double> %35)
%47 = add nuw nsw i64 %32, 1
%48 = icmp eq i64 %47, %20
br i1 %48, label %49, label %31
49: ; preds = %31
%50 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %45, <2 x double> %45, <2 x double> %35)
%51 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %41, <2 x double> %41, <2 x double> %34)
br label %52
52: ; preds = %49, %26
%53 = phi double [ %28, %26 ], [ %38, %49 ]
%54 = phi <2 x double> [ %29, %26 ], [ %51, %49 ]
%55 = phi <2 x double> [ %30, %26 ], [ %50, %49 ]
%56 = add nsw i64 %27, 1
%57 = trunc i64 %56 to i32
%58 = icmp eq i32 %17, %57
br i1 %58, label %59, label %26
59: ; preds = %52, %21
%60 = phi double [ %23, %21 ], [ %53, %52 ]
%61 = phi <2 x double> [ %24, %21 ], [ %54, %52 ]
%62 = phi <2 x double> [ %25, %21 ], [ %55, %52 ]
%63 = add nsw i64 %22, 1
%64 = trunc i64 %63 to i32
%65 = icmp eq i32 %19, %64
br i1 %65, label %66, label %21
66: ; preds = %59, %9
%67 = phi double [ 0.000000e+00, %9 ], [ %60, %59 ]
%68 = phi <2 x double> [ zeroinitializer, %9 ], [ %61, %59 ]
%69 = phi <2 x double> [ zeroinitializer, %9 ], [ %62, %59 ]
%70 = fadd double %67, 0.000000e+00
%71 = getelementptr inbounds double, double* %8, i64 1
%72 = getelementptr inbounds double, double* %8, i64 2
%73 = fadd <2 x double> %68, zeroinitializer
%74 = bitcast double* %71 to <2 x double>*
store <2 x double> %73, <2 x double>* %74
%75 = getelementptr inbounds double, double* %8, i64 3
%76 = getelementptr inbounds double, double* %8, i64 4
%77 = fadd <2 x double> %69, zeroinitializer
%78 = bitcast double* %75 to <2 x double>*
store <2 x double> %77, <2 x double>* %78
%79 = add nsw i32 %0, -2
%80 = add nsw i32 %1, -2
%81 = mul nsw i32 %80, %79
%82 = add nsw i32 %2, -2
%83 = mul nsw i32 %81, %82
%84 = sitofp i32 %83 to double
%85 = fdiv double %70, %84
%86 = tail call double @sqrt(double %85)
store double %86, double* %8
%87 = load double, double* %71
%88 = fdiv double %87, %84
%89 = tail call double @sqrt(double %88)
store double %89, double* %71
%90 = load double, double* %72
%91 = fdiv double %90, %84
%92 = tail call double @sqrt(double %91)
store double %92, double* %72
%93 = load double, double* %75
%94 = fdiv double %93, %84
%95 = tail call double @sqrt(double %94)
store double %95, double* %75
%96 = load double, double* %76
%97 = fdiv double %96, %84
%98 = tail call double @sqrt(double %97)
store double %98, double* %76
ret void
}