#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 */
int /*<<< orphan*/ compute(float **, float **, float **, float **, float **,
                           float, float);
int /*<<< orphan*/ fetch(int, float volatile *, float **);
int /*<<< orphan*/ seg_write(int, float volatile *, float **);
void segmentation_acc(volatile float *A_bus, volatile float *B_bus,
                      volatile float *C_bus, int c[2]) {
  float phi0[66][66], phi1[66][66], phi2[66][66], phi3[66][66], u0[66][66],
      u1[66][66];
  float curvature_motion_part0[66][66];
  float curvature_motion_part1[66][66];
  int i;
  float c1;
  float c2;
  c1 = c[0];
  c2 = c[1];
  fetch(0, A_bus, phi0);
  fetch(1, A_bus, phi1);
  fetch(2, A_bus, phi2);
  fetch(1, B_bus, u0);
  compute(phi0, phi1, phi2, u0, curvature_motion_part1, c1, c2);
  fetch(3, A_bus, phi3);
  fetch(2, B_bus, u1);
  for (i = 2; i < 61 - 2; i++) {
    if (i % 4 == 0) {
      fetch(i + 2, A_bus, phi2);
      fetch(i + 1, B_bus, u0);
      compute(phi3, phi0, phi1, u1, curvature_motion_part0, c1, c2);
      seg_write(i, C_bus, curvature_motion_part1);
    } else if (i % 4 == 1) {
      fetch(i + 2, A_bus, phi3);
      fetch(i + 1, B_bus, u1);
      compute(phi0, phi1, phi2, u0, curvature_motion_part1, c1, c2);
      seg_write(i, C_bus, curvature_motion_part0);
    } else if (i % 4 == 2) {
      fetch(i + 2, A_bus, phi0);
      fetch(i + 1, B_bus, u0);
      compute(phi1, phi2, phi3, u1, curvature_motion_part0, c1, c2);
      seg_write(i, C_bus, curvature_motion_part1);
    } else {
      fetch(i + 2, A_bus, phi1);
      fetch(i + 1, B_bus, u1);
      compute(phi2, phi3, phi0, u0, curvature_motion_part1, c1, c2);
      seg_write(i, C_bus, curvature_motion_part0);
    }
  }
  compute(phi2, phi3, phi0, u0, curvature_motion_part1, c1, c2);
  seg_write(58, C_bus, curvature_motion_part0);
  seg_write(59, C_bus, curvature_motion_part1);
}


x86 assembly (clang, -O0):
<segmentation_acc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220b0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cvtsi2ssl (%rax),%xmm0
movss  %xmm0,-0x220a8(%rbp)
ff
mov    -0x20(%rbp),%rax
cvtsi2ssl 0x4(%rax),%xmm0
movss  %xmm0,-0x220ac(%rbp)
ff
mov    -0x8(%rbp),%rsi
lea    -0x4430(%rbp),%rdx
xor    %edi,%edi
call   1040 <fetch@plt>
mov    -0x8(%rbp),%rsi
lea    -0x8840(%rbp),%rdx
mov    $0x1,%edi
call   1040 <fetch@plt>
mov    -0x8(%rbp),%rsi
lea    -0xcc50(%rbp),%rdx
mov    $0x2,%edi
call   1040 <fetch@plt>
mov    -0x10(%rbp),%rsi
lea    -0x15470(%rbp),%rdx
mov    $0x1,%edi
call   1040 <fetch@plt>
lea    -0x4430(%rbp),%rdi
lea    -0x8840(%rbp),%rsi
lea    -0xcc50(%rbp),%rdx
lea    -0x15470(%rbp),%rcx
lea    -0x220a0(%rbp),%r8
movss  -0x220a8(%rbp),%xmm0
ff
movss  -0x220ac(%rbp),%xmm1
ff
call   1050 <compute@plt>
mov    -0x8(%rbp),%rsi
lea    -0x11060(%rbp),%rdx
mov    $0x3,%edi
call   1040 <fetch@plt>
mov    -0x10(%rbp),%rsi
lea    -0x19880(%rbp),%rdx
mov    $0x2,%edi
call   1040 <fetch@plt>
movl   $0x2,-0x220a4(%rbp)
cmpl   $0x3b,-0x220a4(%rbp)
jge    14ad <segmentation_acc+0x37d>
mov    -0x220a4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    12d2 <segmentation_acc+0x1a2>
mov    -0x220a4(%rbp),%edi
add    $0x2,%edi
mov    -0x8(%rbp),%rsi
lea    -0xcc50(%rbp),%rdx
call   1040 <fetch@plt>
mov    -0x220a4(%rbp),%edi
add    $0x1,%edi
mov    -0x10(%rbp),%rsi
lea    -0x15470(%rbp),%rdx
call   1040 <fetch@plt>
lea    -0x11060(%rbp),%rdi
lea    -0x4430(%rbp),%rsi
lea    -0x8840(%rbp),%rdx
lea    -0x19880(%rbp),%rcx
lea    -0x1dc90(%rbp),%r8
movss  -0x220a8(%rbp),%xmm0
ff
movss  -0x220ac(%rbp),%xmm1
ff
call   1050 <compute@plt>
mov    -0x220a4(%rbp),%edi
mov    -0x18(%rbp),%rsi
lea    -0x220a0(%rbp),%rdx
call   1030 <seg_write@plt>
jmp    1494 <segmentation_acc+0x364>
mov    -0x220a4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    136e <segmentation_acc+0x23e>
mov    -0x220a4(%rbp),%edi
add    $0x2,%edi
mov    -0x8(%rbp),%rsi
lea    -0x11060(%rbp),%rdx
call   1040 <fetch@plt>
mov    -0x220a4(%rbp),%edi
add    $0x1,%edi
mov    -0x10(%rbp),%rsi
lea    -0x19880(%rbp),%rdx
call   1040 <fetch@plt>
lea    -0x4430(%rbp),%rdi
lea    -0x8840(%rbp),%rsi
lea    -0xcc50(%rbp),%rdx
lea    -0x15470(%rbp),%rcx
lea    -0x220a0(%rbp),%r8
movss  -0x220a8(%rbp),%xmm0
ff
movss  -0x220ac(%rbp),%xmm1
ff
call   1050 <compute@plt>
mov    -0x220a4(%rbp),%edi
mov    -0x18(%rbp),%rsi
lea    -0x1dc90(%rbp),%rdx
call   1030 <seg_write@plt>
jmp    148f <segmentation_acc+0x35f>
mov    -0x220a4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x2,%edx
jne    140a <segmentation_acc+0x2da>
mov    -0x220a4(%rbp),%edi
add    $0x2,%edi
mov    -0x8(%rbp),%rsi
lea    -0x4430(%rbp),%rdx
call   1040 <fetch@plt>
mov    -0x220a4(%rbp),%edi
add    $0x1,%edi
mov    -0x10(%rbp),%rsi
lea    -0x15470(%rbp),%rdx
call   1040 <fetch@plt>
lea    -0x8840(%rbp),%rdi
lea    -0xcc50(%rbp),%rsi
lea    -0x11060(%rbp),%rdx
lea    -0x19880(%rbp),%rcx
lea    -0x1dc90(%rbp),%r8
movss  -0x220a8(%rbp),%xmm0
ff
movss  -0x220ac(%rbp),%xmm1
ff
call   1050 <compute@plt>
mov    -0x220a4(%rbp),%edi
mov    -0x18(%rbp),%rsi
lea    -0x220a0(%rbp),%rdx
call   1030 <seg_write@plt>
jmp    148a <segmentation_acc+0x35a>
mov    -0x220a4(%rbp),%edi
add    $0x2,%edi
mov    -0x8(%rbp),%rsi
lea    -0x8840(%rbp),%rdx
call   1040 <fetch@plt>
mov    -0x220a4(%rbp),%edi
add    $0x1,%edi
mov    -0x10(%rbp),%rsi
lea    -0x19880(%rbp),%rdx
call   1040 <fetch@plt>
lea    -0xcc50(%rbp),%rdi
lea    -0x11060(%rbp),%rsi
lea    -0x4430(%rbp),%rdx
lea    -0x15470(%rbp),%rcx
lea    -0x220a0(%rbp),%r8
movss  -0x220a8(%rbp),%xmm0
ff
movss  -0x220ac(%rbp),%xmm1
ff
call   1050 <compute@plt>
mov    -0x220a4(%rbp),%edi
mov    -0x18(%rbp),%rsi
lea    -0x1dc90(%rbp),%rdx
call   1030 <seg_write@plt>
jmp    148f <segmentation_acc+0x35f>
jmp    1494 <segmentation_acc+0x364>
jmp    1499 <segmentation_acc+0x369>
mov    -0x220a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x220a4(%rbp)
jmp    1229 <segmentation_acc+0xf9>
lea    -0xcc50(%rbp),%rdi
lea    -0x11060(%rbp),%rsi
lea    -0x4430(%rbp),%rdx
lea    -0x15470(%rbp),%rcx
lea    -0x220a0(%rbp),%r8
movss  -0x220a8(%rbp),%xmm0
ff
movss  -0x220ac(%rbp),%xmm1
ff
call   1050 <compute@plt>
mov    -0x18(%rbp),%rsi
lea    -0x1dc90(%rbp),%rdx
mov    $0x3a,%edi
call   1030 <seg_write@plt>
mov    -0x18(%rbp),%rsi
lea    -0x220a0(%rbp),%rdx
mov    $0x3b,%edi
call   1030 <seg_write@plt>
add    $0x220b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<segmentation_acc>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x22098,%rsp
cvtsi2ssl (%rcx),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
xorps  %xmm0,%xmm0
cvtsi2ssl 0x4(%rcx),%xmm0
movss  %xmm0,0x8(%rsp)
lea    0x10(%rsp),%rdx
xor    %edi,%edi
mov    %rbx,%rsi
call   1040 <fetch@plt>
lea    0x15460(%rsp),%rdx
mov    $0x1,%edi
mov    %rbx,%rsi
call   1040 <fetch@plt>
mov    $0x2,%r12d
lea    0x11050(%rsp),%r13
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %r13,%rdx
call   1040 <fetch@plt>
lea    0x8830(%rsp),%rbp
mov    $0x1,%edi
mov    %r15,%rsi
mov    %rbp,%rdx
call   1040 <fetch@plt>
lea    0x4420(%rsp),%r8
lea    0x10(%rsp),%rdi
lea    0x15460(%rsp),%rsi
mov    %r13,%rdx
mov    %rbp,%rcx
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
call   1050 <compute@plt>
lea    0xcc40(%rsp),%rdx
mov    $0x3,%edi
mov    %rbx,%rsi
call   1040 <fetch@plt>
lea    0x19870(%rsp),%rdx
mov    $0x2,%edi
mov    %r15,%rsi
call   1040 <fetch@plt>
lea    0x1dc80(%rsp),%r13
jmp    1294 <segmentation_acc+0x164>
nopl   0x0(%rax)
lea    0xcc40(%rsp),%rdx
call   1040 <fetch@plt>
lea    0x1(%r12),%ebp
mov    %ebp,%edi
mov    %r15,%rsi
lea    0x19870(%rsp),%rdx
call   1040 <fetch@plt>
lea    0x10(%rsp),%rdi
lea    0x15460(%rsp),%rsi
lea    0x11050(%rsp),%rdx
lea    0x8830(%rsp),%rcx
lea    0x4420(%rsp),%r8
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
call   1050 <compute@plt>
mov    %r13,%rdx
mov    %r12d,%edi
mov    %r14,%rsi
call   1030 <seg_write@plt>
mov    %ebp,%r12d
cmp    $0x3b,%ebp
je     13ae <segmentation_acc+0x27e>
mov    %r12d,%eax
and    $0x3,%eax
lea    0x2(%r12),%edi
mov    %rbx,%rsi
cmp    $0x2,%eax
je     1300 <segmentation_acc+0x1d0>
cmp    $0x1,%eax
je     1220 <segmentation_acc+0xf0>
test   %eax,%eax
jne    1370 <segmentation_acc+0x240>
lea    0x11050(%rsp),%rdx
call   1040 <fetch@plt>
lea    0x1(%r12),%ebp
mov    %ebp,%edi
mov    %r15,%rsi
lea    0x8830(%rsp),%rdx
call   1040 <fetch@plt>
lea    0xcc40(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0x15460(%rsp),%rdx
jmp    1339 <segmentation_acc+0x209>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0x10(%rsp),%rdx
call   1040 <fetch@plt>
lea    0x1(%r12),%ebp
mov    %ebp,%edi
mov    %r15,%rsi
lea    0x8830(%rsp),%rdx
call   1040 <fetch@plt>
lea    0x15460(%rsp),%rdi
lea    0x11050(%rsp),%rsi
lea    0xcc40(%rsp),%rdx
lea    0x19870(%rsp),%rcx
mov    %r13,%r8
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
call   1050 <compute@plt>
lea    0x4420(%rsp),%rdx
jmp    127d <segmentation_acc+0x14d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0x15460(%rsp),%rdx
call   1040 <fetch@plt>
lea    0x1(%r12),%ebp
mov    %ebp,%edi
mov    %r15,%rsi
lea    0x19870(%rsp),%rdx
call   1040 <fetch@plt>
lea    0x11050(%rsp),%rdi
lea    0xcc40(%rsp),%rsi
lea    0x10(%rsp),%rdx
jmp    1259 <segmentation_acc+0x129>
lea    0x11050(%rsp),%rdi
lea    0xcc40(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x8830(%rsp),%rcx
lea    0x4420(%rsp),%rbx
mov    %rbx,%r8
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
call   1050 <compute@plt>
lea    0x1dc80(%rsp),%rdx
mov    $0x3a,%edi
mov    %r14,%rsi
call   1030 <seg_write@plt>
mov    $0x3b,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <seg_write@plt>
add    $0x22098,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @segmentation_acc(float* %0, float* %1, float* %2, i32* nocapture %3) {
%5 = alloca [66 x [66 x float]]
%6 = alloca [66 x [66 x float]]
%7 = alloca [66 x [66 x float]]
%8 = alloca [66 x [66 x float]]
%9 = alloca [66 x [66 x float]]
%10 = alloca [66 x [66 x float]]
%11 = alloca [66 x [66 x float]]
%12 = alloca [66 x [66 x float]]
%13 = bitcast [66 x [66 x float]]* %5 to i8*
%14 = bitcast [66 x [66 x float]]* %6 to i8*
%15 = bitcast [66 x [66 x float]]* %7 to i8*
%16 = bitcast [66 x [66 x float]]* %8 to i8*
%17 = bitcast [66 x [66 x float]]* %9 to i8*
%18 = bitcast [66 x [66 x float]]* %10 to i8*
%19 = bitcast [66 x [66 x float]]* %11 to i8*
%20 = bitcast [66 x [66 x float]]* %12 to i8*
%21 = load i32, i32* %3
%22 = sitofp i32 %21 to float
%23 = getelementptr inbounds i32, i32* %3, i64 1
%24 = load i32, i32* %23
%25 = sitofp i32 %24 to float
%26 = bitcast [66 x [66 x float]]* %5 to float**
%27 = call i32 @fetch(i32 0, float* %0, float** %26)
%28 = bitcast [66 x [66 x float]]* %6 to float**
%29 = call i32 @fetch(i32 1, float* %0, float** %28)
%30 = bitcast [66 x [66 x float]]* %7 to float**
%31 = call i32 @fetch(i32 2, float* %0, float** %30)
%32 = bitcast [66 x [66 x float]]* %9 to float**
%33 = call i32 @fetch(i32 1, float* %1, float** %32)
%34 = bitcast [66 x [66 x float]]* %12 to float**
%35 = call i32 @compute(float** %26, float** %28, float** %30, float** %32, float** %34, float %22, float %25)
%36 = bitcast [66 x [66 x float]]* %8 to float**
%37 = call i32 @fetch(i32 3, float* %0, float** %36)
%38 = bitcast [66 x [66 x float]]* %10 to float**
%39 = call i32 @fetch(i32 2, float* %1, float** %38)
%40 = bitcast [66 x [66 x float]]* %11 to float**
br label %41
41: ; preds = %4, %68
%42 = phi i32 [ 2, %4 ], [ %70, %68 ]
%43 = and i32 %42, 3
switch i32 %43, label %62 [
i32 0, label %44
i32 1, label %50
i32 2, label %56
]
44: ; preds = %41
%45 = add nuw nsw i32 %42, 2
%46 = call i32 @fetch(i32 %45, float* %0, float** %30)
%47 = add nuw nsw i32 %42, 1
%48 = call i32 @fetch(i32 %47, float* %1, float** %32)
%49 = call i32 @compute(float** %36, float** %26, float** %28, float** %38, float** %40, float %22, float %25)
br label %68
50: ; preds = %41
%51 = add nuw nsw i32 %42, 2
%52 = call i32 @fetch(i32 %51, float* %0, float** %36)
%53 = add nuw nsw i32 %42, 1
%54 = call i32 @fetch(i32 %53, float* %1, float** %38)
%55 = call i32 @compute(float** %26, float** %28, float** %30, float** %32, float** %34, float %22, float %25)
br label %68
56: ; preds = %41
%57 = add nuw nsw i32 %42, 2
%58 = call i32 @fetch(i32 %57, float* %0, float** %26)
%59 = add nuw nsw i32 %42, 1
%60 = call i32 @fetch(i32 %59, float* %1, float** %32)
%61 = call i32 @compute(float** %28, float** %30, float** %36, float** %38, float** %40, float %22, float %25)
br label %68
62: ; preds = %41
%63 = add nuw nsw i32 %42, 2
%64 = call i32 @fetch(i32 %63, float* %0, float** %28)
%65 = add nuw nsw i32 %42, 1
%66 = call i32 @fetch(i32 %65, float* %1, float** %38)
%67 = call i32 @compute(float** %30, float** %36, float** %26, float** %32, float** %34, float %22, float %25)
br label %68
68: ; preds = %44, %56, %62, %50
%69 = phi float** [ %34, %44 ], [ %34, %56 ], [ %40, %62 ], [ %40, %50 ]
%70 = phi i32 [ %47, %44 ], [ %59, %56 ], [ %65, %62 ], [ %53, %50 ]
%71 = call i32 @seg_write(i32 %42, float* %2, float** %69)
%72 = icmp eq i32 %70, 59
br i1 %72, label %73, label %41
73: ; preds = %68
%74 = call i32 @compute(float** %30, float** %36, float** %26, float** %32, float** %34, float %22, float %25)
%75 = call i32 @seg_write(i32 58, float* %2, float** %40)
%76 = call i32 @seg_write(i32 59, float* %2, float** %34)
ret void
}