void boundaryCopy(int nx, int ny, double *u1, double *u2) {
  int ix, iy;
  for (ix = 0; ix < nx; ix++) {
    *(u2 + 0 * ny + ix) = *(u1 + 0 * ny + ix);
    *(u2 + (ny - 1) * ny + ix) = *(u1 + (ny - 1) * ny + ix);
  }
  for (iy = 1; iy < ny - 1; iy++) {
    *(u2 + iy * ny + 0) = *(u1 + iy * ny + 0);
    *(u2 + iy * ny + (nx - 1)) = *(u1 + iy * ny + (nx - 1));
  }
}


x86 assembly (clang, -O0):
<boundaryCopy>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11ab <boundaryCopy+0xab>
mov    -0x10(%rbp),%rax
imul   $0x0,-0x8(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
imul   $0x0,-0x8(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
imul   -0x8(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
imul   -0x8(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1119 <boundaryCopy+0x19>
movl   $0x1,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    123d <boundaryCopy+0x13d>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
imul   -0x8(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
imul   -0x8(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
imul   -0x8(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
imul   -0x8(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11b2 <boundaryCopy+0xb2>
pop    %rbp
ret

x86 assembly (clang, -O2):
<boundaryCopy>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
lea    -0x1(%rsi),%r8d
test   %edi,%edi
jle    1356 <boundaryCopy+0x256>
mov    %r8d,%eax
imul   %esi,%eax
movslq %eax,%r15
lea    (%rdx,%r15,8),%r10
lea    (%rcx,%r15,8),%r11
mov    %edi,%r9d
cmp    $0x4,%edi
jae    1136 <boundaryCopy+0x36>
xor    %ebx,%ebx
jmp    12d6 <boundaryCopy+0x1d6>
mov    %r8d,-0x14(%rsp)
lea    (%rcx,%r9,8),%rbx
lea    (%r15,%r9,1),%r14
lea    (%rcx,%r14,8),%rax
mov    %r10,%rbp
lea    (%rdx,%r9,8),%r13
cmp    %rcx,%rax
seta   -0x15(%rsp)
cmp    %rbx,%r11
setb   -0x16(%rsp)
cmp    %rcx,%r13
seta   %r8b
lea    (%rdx,%r14,8),%r12
cmp    %rdx,%rbx
seta   -0x17(%rsp)
cmp    %rcx,%r12
seta   %r10b
cmp    %rbx,%rbp
setb   -0x18(%rsp)
cmp    %r13,%r11
setb   %r14b
cmp    %rdx,%rax
seta   %r13b
mov    %r11,-0x10(%rsp)
cmp    %r12,%r11
setb   %r12b
mov    %rbp,-0x8(%rsp)
cmp    %rax,%rbp
setb   %r11b
xor    %ebx,%ebx
mov    -0x16(%rsp),%al
test   %al,-0x15(%rsp)
jne    12c7 <boundaryCopy+0x1c7>
and    -0x17(%rsp),%r8b
jne    12c7 <boundaryCopy+0x1c7>
and    -0x18(%rsp),%r10b
mov    -0x14(%rsp),%r8d
jne    12cc <boundaryCopy+0x1cc>
and    %r13b,%r14b
jne    12cc <boundaryCopy+0x1cc>
and    %r11b,%r12b
mov    -0x8(%rsp),%r10
mov    -0x10(%rsp),%r11
jne    12d6 <boundaryCopy+0x1d6>
mov    %r9d,%ebx
and    $0xfffffffc,%ebx
lea    -0x4(%rbx),%rax
mov    %rax,%r14
shr    $0x2,%r14
add    $0x1,%r14
test   %rax,%rax
je     12bc <boundaryCopy+0x1bc>
mov    %r14,%r13
and    $0xfffffffffffffffe,%r13
lea    0x30(%rdx),%rax
lea    0x30(%rcx),%rbp
xor    %r12d,%r12d
nopl   (%rax)
movups -0x30(%rax),%xmm0
movups -0x20(%rax),%xmm1
movups %xmm0,-0x30(%rbp)
movups %xmm1,-0x20(%rbp)
movups -0x30(%rax,%r15,8),%xmm0
movups -0x20(%rax,%r15,8),%xmm1
movups %xmm0,-0x30(%rbp,%r15,8)
movups %xmm1,-0x20(%rbp,%r15,8)
movups -0x10(%rax),%xmm0
movups (%rax),%xmm1
movups %xmm0,-0x10(%rbp)
movups %xmm1,0x0(%rbp)
movups -0x10(%rax,%r15,8),%xmm0
movups (%rax,%r15,8),%xmm1
movups %xmm0,-0x10(%rbp,%r15,8)
movups %xmm1,0x0(%rbp,%r15,8)
add    $0x8,%r12
add    $0x40,%rax
add    $0x40,%rbp
add    $0xfffffffffffffffe,%r13
jne    1220 <boundaryCopy+0x120>
test   $0x1,%r14b
je     12b2 <boundaryCopy+0x1b2>
movups (%rdx,%r12,8),%xmm0
movups 0x10(%rdx,%r12,8),%xmm1
movups %xmm0,(%rcx,%r12,8)
movups %xmm1,0x10(%rcx,%r12,8)
movups (%r10,%r12,8),%xmm0
movups 0x10(%r10,%r12,8),%xmm1
movups %xmm0,(%r11,%r12,8)
movups %xmm1,0x10(%r11,%r12,8)
cmp    %r9,%rbx
jne    12d6 <boundaryCopy+0x1d6>
jmp    1356 <boundaryCopy+0x256>
xor    %r12d,%r12d
test   $0x1,%r14b
jne    1286 <boundaryCopy+0x186>
jmp    12b2 <boundaryCopy+0x1b2>
mov    -0x14(%rsp),%r8d
mov    -0x8(%rsp),%r10
mov    -0x10(%rsp),%r11
mov    %rbx,%rax
not    %rax
test   $0x1,%r9b
je     12fc <boundaryCopy+0x1fc>
movsd  (%rdx,%rbx,8),%xmm0
movsd  %xmm0,(%rcx,%rbx,8)
movsd  (%r10,%rbx,8),%xmm0
movsd  %xmm0,(%r11,%rbx,8)
or     $0x1,%rbx
add    %r9,%rax
je     1356 <boundaryCopy+0x256>
lea    (%rcx,%r15,8),%rax
add    $0x8,%rax
lea    (%rdx,%r15,8),%rbp
add    $0x8,%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%rdx,%rbx,8),%xmm0
movsd  %xmm0,(%rcx,%rbx,8)
movsd  -0x8(%rbp,%rbx,8),%xmm0
movsd  %xmm0,-0x8(%rax,%rbx,8)
movsd  0x8(%rdx,%rbx,8),%xmm0
movsd  %xmm0,0x8(%rcx,%rbx,8)
movsd  0x0(%rbp,%rbx,8),%xmm0
movsd  %xmm0,(%rax,%rbx,8)
add    $0x2,%rbx
cmp    %rbx,%r9
jne    1320 <boundaryCopy+0x220>
cmp    $0x3,%esi
jl     1425 <boundaryCopy+0x325>
add    $0xffffffff,%edi
movslq %edi,%r9
mov    %esi,%r10d
mov    $0x1,%r11d
test   $0x1,%r8b
jne    139a <boundaryCopy+0x29a>
lea    (%rdx,%r10,8),%rax
movsd  (%rdx,%r10,8),%xmm0
lea    (%rcx,%r10,8),%rsi
movsd  %xmm0,(%rcx,%r10,8)
movsd  (%rax,%r9,8),%xmm0
movsd  %xmm0,(%rsi,%r9,8)
mov    $0x2,%r11d
cmp    $0x2,%r8d
je     1425 <boundaryCopy+0x325>
mov    %r8d,%esi
sub    %r11,%rsi
mov    %r11,%rax
imul   %r10,%rax
lea    (%rax,%r9,1),%rdi
lea    (%rdx,%rdi,8),%r8
lea    (%rdx,%rax,8),%r14
lea    (%rcx,%rdi,8),%r15
lea    (%rcx,%rax,8),%rax
add    $0x1,%r11
imul   %r10,%r11
shl    $0x4,%r10
add    %r11,%r9
lea    (%rcx,%r9,8),%rbp
lea    (%rcx,%r11,8),%rcx
lea    (%rdx,%r9,8),%rbx
lea    (%rdx,%r11,8),%rdx
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
movsd  (%r14,%rdi,1),%xmm0
movsd  %xmm0,(%rax,%rdi,1)
movsd  (%r8,%rdi,1),%xmm0
movsd  %xmm0,(%r15,%rdi,1)
movsd  (%rdx,%rdi,1),%xmm0
movsd  %xmm0,(%rcx,%rdi,1)
movsd  (%rbx,%rdi,1),%xmm0
movsd  %xmm0,0x0(%rbp,%rdi,1)
add    %r10,%rdi
add    $0xfffffffffffffffe,%rsi
jne    13f0 <boundaryCopy+0x2f0>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @boundaryCopy(i32 %0, i32 %1, double* %2, double* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store double* %2, double** %7
store double* %3, double** %8
store i32 0, i32* %9
br label %11
11: ; preds = %54, %4
%12 = load i32, i32* %9
%13 = load i32, i32* %5
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %57
15: ; preds = %11
%16 = load double*, double** %7
%17 = load i32, i32* %6
%18 = mul nsw i32 0, %17
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds double, double* %16, i64 %19
%21 = load i32, i32* %9
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds double, double* %20, i64 %22
%24 = load double, double* %23
%25 = load double*, double** %8
%26 = load i32, i32* %6
%27 = mul nsw i32 0, %26
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds double, double* %25, i64 %28
%30 = load i32, i32* %9
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds double, double* %29, i64 %31
store double %24, double* %32
%33 = load double*, double** %7
%34 = load i32, i32* %6
%35 = sub nsw i32 %34, 1
%36 = load i32, i32* %6
%37 = mul nsw i32 %35, %36
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds double, double* %33, i64 %38
%40 = load i32, i32* %9
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds double, double* %39, i64 %41
%43 = load double, double* %42
%44 = load double*, double** %8
%45 = load i32, i32* %6
%46 = sub nsw i32 %45, 1
%47 = load i32, i32* %6
%48 = mul nsw i32 %46, %47
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds double, double* %44, i64 %49
%51 = load i32, i32* %9
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds double, double* %50, i64 %52
store double %43, double* %53
br label %54
54: ; preds = %15
%55 = load i32, i32* %9
%56 = add nsw i32 %55, 1
store i32 %56, i32* %9
br label %11
57: ; preds = %11
store i32 1, i32* %10
br label %58
58: ; preds = %100, %57
%59 = load i32, i32* %10
%60 = load i32, i32* %6
%61 = sub nsw i32 %60, 1
%62 = icmp slt i32 %59, %61
br i1 %62, label %63, label %103
63: ; preds = %58
%64 = load double*, double** %7
%65 = load i32, i32* %10
%66 = load i32, i32* %6
%67 = mul nsw i32 %65, %66
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds double, double* %64, i64 %68
%70 = getelementptr inbounds double, double* %69, i64 0
%71 = load double, double* %70
%72 = load double*, double** %8
%73 = load i32, i32* %10
%74 = load i32, i32* %6
%75 = mul nsw i32 %73, %74
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds double, double* %72, i64 %76
%78 = getelementptr inbounds double, double* %77, i64 0
store double %71, double* %78
%79 = load double*, double** %7
%80 = load i32, i32* %10
%81 = load i32, i32* %6
%82 = mul nsw i32 %80, %81
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds double, double* %79, i64 %83
%85 = load i32, i32* %5
%86 = sub nsw i32 %85, 1
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds double, double* %84, i64 %87
%89 = load double, double* %88
%90 = load double*, double** %8
%91 = load i32, i32* %10
%92 = load i32, i32* %6
%93 = mul nsw i32 %91, %92
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds double, double* %90, i64 %94
%96 = load i32, i32* %5
%97 = sub nsw i32 %96, 1
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds double, double* %95, i64 %98
store double %89, double* %99
br label %100
100: ; preds = %63
%101 = load i32, i32* %10
%102 = add nsw i32 %101, 1
store i32 %102, i32* %10
br label %58
103: ; preds = %58
ret void
}

LLVM IR (-O2):
define void @boundaryCopy(i32 %0, i32 %1, double* nocapture %2, double* nocapture writeonly %3) {
%5 = icmp sgt i32 %0, 0
%6 = add i32 %1, -1
br i1 %5, label %7, label %138
7: ; preds = %4
%8 = mul nsw i32 %6, %1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds double, double* %2, i64 %9
%11 = getelementptr inbounds double, double* %3, i64 %9
%12 = zext i32 %0 to i64
%13 = icmp ult i32 %0, 4
br i1 %13, label %121, label %14
14: ; preds = %7
%15 = getelementptr double, double* %3, i64 %12
%16 = add nsw i64 %9, %12
%17 = getelementptr double, double* %3, i64 %16
%18 = getelementptr double, double* %2, i64 %12
%19 = getelementptr double, double* %2, i64 %16
%20 = icmp ugt double* %17, %3
%21 = icmp ult double* %11, %15
%22 = and i1 %20, %21
%23 = icmp ugt double* %18, %3
%24 = icmp ugt double* %15, %2
%25 = and i1 %23, %24
%26 = or i1 %22, %25
%27 = icmp ugt double* %19, %3
%28 = icmp ult double* %10, %15
%29 = and i1 %27, %28
%30 = or i1 %26, %29
%31 = icmp ult double* %11, %18
%32 = icmp ugt double* %17, %2
%33 = and i1 %31, %32
%34 = or i1 %30, %33
%35 = icmp ult double* %11, %19
%36 = icmp ult double* %10, %17
%37 = and i1 %35, %36
%38 = or i1 %34, %37
br i1 %38, label %121, label %39
39: ; preds = %14
%40 = and i64 %12, 4294967292
%41 = add nsw i64 %40, -4
%42 = lshr exact i64 %41, 2
%43 = add nuw nsw i64 %42, 1
%44 = and i64 %43, 1
%45 = icmp eq i64 %41, 0
br i1 %45, label %95, label %46
46: ; preds = %39
%47 = and i64 %43, 9223372036854775806
br label %48
48: ; preds = %48, %46
%49 = phi i64 [ 0, %46 ], [ %92, %48 ]
%50 = phi i64 [ 0, %46 ], [ %93, %48 ]
%51 = getelementptr inbounds double, double* %2, i64 %49
%52 = bitcast double* %51 to <2 x double>*
%53 = load <2 x double>, <2 x double>* %52
%54 = getelementptr inbounds double, double* %51, i64 2
%55 = bitcast double* %54 to <2 x double>*
%56 = load <2 x double>, <2 x double>* %55
%57 = getelementptr inbounds double, double* %3, i64 %49
%58 = bitcast double* %57 to <2 x double>*
store <2 x double> %53, <2 x double>* %58
%59 = getelementptr inbounds double, double* %57, i64 2
%60 = bitcast double* %59 to <2 x double>*
store <2 x double> %56, <2 x double>* %60
%61 = getelementptr inbounds double, double* %10, i64 %49
%62 = bitcast double* %61 to <2 x double>*
%63 = load <2 x double>, <2 x double>* %62
%64 = getelementptr inbounds double, double* %61, i64 2
%65 = bitcast double* %64 to <2 x double>*
%66 = load <2 x double>, <2 x double>* %65
%67 = getelementptr inbounds double, double* %11, i64 %49
%68 = bitcast double* %67 to <2 x double>*
store <2 x double> %63, <2 x double>* %68
%69 = getelementptr inbounds double, double* %67, i64 2
%70 = bitcast double* %69 to <2 x double>*
store <2 x double> %66, <2 x double>* %70
%71 = or i64 %49, 4
%72 = getelementptr inbounds double, double* %2, i64 %71
%73 = bitcast double* %72 to <2 x double>*
%74 = load <2 x double>, <2 x double>* %73
%75 = getelementptr inbounds double, double* %72, i64 2
%76 = bitcast double* %75 to <2 x double>*
%77 = load <2 x double>, <2 x double>* %76
%78 = getelementptr inbounds double, double* %3, i64 %71
%79 = bitcast double* %78 to <2 x double>*
store <2 x double> %74, <2 x double>* %79
%80 = getelementptr inbounds double, double* %78, i64 2
%81 = bitcast double* %80 to <2 x double>*
store <2 x double> %77, <2 x double>* %81
%82 = getelementptr inbounds double, double* %10, i64 %71
%83 = bitcast double* %82 to <2 x double>*
%84 = load <2 x double>, <2 x double>* %83
%85 = getelementptr inbounds double, double* %82, i64 2
%86 = bitcast double* %85 to <2 x double>*
%87 = load <2 x double>, <2 x double>* %86
%88 = getelementptr inbounds double, double* %11, i64 %71
%89 = bitcast double* %88 to <2 x double>*
store <2 x double> %84, <2 x double>* %89
%90 = getelementptr inbounds double, double* %88, i64 2
%91 = bitcast double* %90 to <2 x double>*
store <2 x double> %87, <2 x double>* %91
%92 = add nuw i64 %49, 8
%93 = add i64 %50, 2
%94 = icmp eq i64 %93, %47
br i1 %94, label %95, label %48
95: ; preds = %48, %39
%96 = phi i64 [ 0, %39 ], [ %92, %48 ]
%97 = icmp eq i64 %44, 0
br i1 %97, label %119, label %98
98: ; preds = %95
%99 = getelementptr inbounds double, double* %2, i64 %96
%100 = bitcast double* %99 to <2 x double>*
%101 = load <2 x double>, <2 x double>* %100
%102 = getelementptr inbounds double, double* %99, i64 2
%103 = bitcast double* %102 to <2 x double>*
%104 = load <2 x double>, <2 x double>* %103
%105 = getelementptr inbounds double, double* %3, i64 %96
%106 = bitcast double* %105 to <2 x double>*
store <2 x double> %101, <2 x double>* %106
%107 = getelementptr inbounds double, double* %105, i64 2
%108 = bitcast double* %107 to <2 x double>*
store <2 x double> %104, <2 x double>* %108
%109 = getelementptr inbounds double, double* %10, i64 %96
%110 = bitcast double* %109 to <2 x double>*
%111 = load <2 x double>, <2 x double>* %110
%112 = getelementptr inbounds double, double* %109, i64 2
%113 = bitcast double* %112 to <2 x double>*
%114 = load <2 x double>, <2 x double>* %113
%115 = getelementptr inbounds double, double* %11, i64 %96
%116 = bitcast double* %115 to <2 x double>*
store <2 x double> %111, <2 x double>* %116
%117 = getelementptr inbounds double, double* %115, i64 2
%118 = bitcast double* %117 to <2 x double>*
store <2 x double> %114, <2 x double>* %118
br label %119
119: ; preds = %95, %98
%120 = icmp eq i64 %40, %12
br i1 %120, label %138, label %121
121: ; preds = %14, %7, %119
%122 = phi i64 [ 0, %14 ], [ 0, %7 ], [ %40, %119 ]
%123 = xor i64 %122, -1
%124 = and i64 %12, 1
%125 = icmp eq i64 %124, 0
br i1 %125, label %134, label %126
126: ; preds = %121
%127 = getelementptr inbounds double, double* %2, i64 %122
%128 = load double, double* %127
%129 = getelementptr inbounds double, double* %3, i64 %122
store double %128, double* %129
%130 = getelementptr inbounds double, double* %10, i64 %122
%131 = load double, double* %130
%132 = getelementptr inbounds double, double* %11, i64 %122
store double %131, double* %132
%133 = or i64 %122, 1
br label %134
134: ; preds = %126, %121
%135 = phi i64 [ %122, %121 ], [ %133, %126 ]
%136 = sub nsw i64 0, %12
%137 = icmp eq i64 %123, %136
br i1 %137, label %138, label %157
138: ; preds = %134, %157, %119, %4
%139 = icmp sgt i32 %1, 2
br i1 %139, label %140, label %193
140: ; preds = %138
%141 = add nsw i32 %0, -1
%142 = sext i32 %141 to i64
%143 = zext i32 %1 to i64
%144 = zext i32 %6 to i64
%145 = and i64 %144, 1
%146 = icmp eq i64 %145, 0
br i1 %146, label %147, label %154
147: ; preds = %140
%148 = getelementptr inbounds double, double* %2, i64 %143
%149 = load double, double* %148
%150 = getelementptr inbounds double, double* %3, i64 %143
store double %149, double* %150
%151 = getelementptr inbounds double, double* %148, i64 %142
%152 = load double, double* %151
%153 = getelementptr inbounds double, double* %150, i64 %142
store double %152, double* %153
br label %154
154: ; preds = %147, %140
%155 = phi i64 [ 1, %140 ], [ 2, %147 ]
%156 = icmp eq i32 %6, 2
br i1 %156, label %193, label %174
157: ; preds = %134, %157
%158 = phi i64 [ %172, %157 ], [ %135, %134 ]
%159 = getelementptr inbounds double, double* %2, i64 %158
%160 = load double, double* %159
%161 = getelementptr inbounds double, double* %3, i64 %158
store double %160, double* %161
%162 = getelementptr inbounds double, double* %10, i64 %158
%163 = load double, double* %162
%164 = getelementptr inbounds double, double* %11, i64 %158
store double %163, double* %164
%165 = add nuw nsw i64 %158, 1
%166 = getelementptr inbounds double, double* %2, i64 %165
%167 = load double, double* %166
%168 = getelementptr inbounds double, double* %3, i64 %165
store double %167, double* %168
%169 = getelementptr inbounds double, double* %10, i64 %165
%170 = load double, double* %169
%171 = getelementptr inbounds double, double* %11, i64 %165
store double %170, double* %171
%172 = add nuw nsw i64 %158, 2
%173 = icmp eq i64 %172, %12
br i1 %173, label %138, label %157
174: ; preds = %154, %174
%175 = phi i64 [ %191, %174 ], [ %155, %154 ]
%176 = mul nsw i64 %175, %143
%177 = getelementptr inbounds double, double* %2, i64 %176
%178 = load double, double* %177
%179 = getelementptr inbounds double, double* %3, i64 %176
store double %178, double* %179
%180 = getelementptr inbounds double, double* %177, i64 %142
%181 = load double, double* %180
%182 = getelementptr inbounds double, double* %179, i64 %142
store double %181, double* %182
%183 = add nuw nsw i64 %175, 1
%184 = mul nsw i64 %183, %143
%185 = getelementptr inbounds double, double* %2, i64 %184
%186 = load double, double* %185
%187 = getelementptr inbounds double, double* %3, i64 %184
store double %186, double* %187
%188 = getelementptr inbounds double, double* %185, i64 %142
%189 = load double, double* %188
%190 = getelementptr inbounds double, double* %187, i64 %142
store double %189, double* %190
%191 = add nuw nsw i64 %175, 2
%192 = icmp eq i64 %191, %144
br i1 %192, label %193, label %174
193: ; preds = %154, %174, %138
ret void
}