#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*/ initialiseCell(double *, double *, int *, int, int, int, int,
                                  int);
void initialiseFields(double *collideField, double *streamField, int *flagField,
                      int xlength) {
  int x, y, z, length_tot;
  length_tot = xlength + 2;
  z = 0;
  for (y = 0; y < length_tot; ++y) {
    for (x = 0; x < length_tot; ++x) {
      initialiseCell(collideField, streamField, flagField, length_tot, x, y, z,
                     1);
    }
  }
  for (z = 1; z <= xlength; ++z) {
    y = 0;
    for (x = 0; x < length_tot; ++x) {
      initialiseCell(collideField, streamField, flagField, length_tot, x, y, z,
                     1);
    }
    for (y = 1; y <= xlength; ++y) {
      x = 0;
      initialiseCell(collideField, streamField, flagField, length_tot, x, y, z,
                     1);
      for (x = 1; x <= xlength; ++x) {
        initialiseCell(collideField, streamField, flagField, length_tot, x, y,
                       z, 0);
      }
      x = xlength + 1;
      initialiseCell(collideField, streamField, flagField, length_tot, x, y, z,
                     1);
    }
    y = xlength + 1;
    for (x = 0; x < length_tot; ++x) {
      initialiseCell(collideField, streamField, flagField, length_tot, x, y, z,
                     1);
    }
  }
  z = xlength + 1;
  for (y = 0; y < length_tot; ++y) {
    for (x = 0; x < length_tot; ++x) {
      initialiseCell(collideField, streamField, flagField, length_tot, x, y, z,
                     2);
    }
  }
}


x86 assembly (clang, -O0):
<initialiseFields>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x2c(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    11a8 <initialiseFields+0x98>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1195 <initialiseFields+0x85>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x24(%rbp),%r9d
mov    -0x28(%rbp),%eax
mov    %eax,(%rsp)
movl   $0x1,0x8(%rsp)
call   1030 <initialiseCell@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1151 <initialiseFields+0x41>
jmp    119a <initialiseFields+0x8a>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    113e <initialiseFields+0x2e>
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     1347 <initialiseFields+0x237>
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    120d <initialiseFields+0xfd>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x24(%rbp),%r9d
mov    -0x28(%rbp),%eax
mov    %eax,(%rsp)
movl   $0x1,0x8(%rsp)
call   1030 <initialiseCell@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11c9 <initialiseFields+0xb9>
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     12e0 <initialiseFields+0x1d0>
movl   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x24(%rbp),%r9d
mov    -0x28(%rbp),%eax
mov    %eax,(%rsp)
movl   $0x1,0x8(%rsp)
call   1030 <initialiseCell@plt>
movl   $0x1,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     129f <initialiseFields+0x18f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x24(%rbp),%r9d
mov    -0x28(%rbp),%eax
xor    %r10d,%r10d
mov    %eax,(%rsp)
movl   $0x0,0x8(%rsp)
call   1030 <initialiseCell@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1258 <initialiseFields+0x148>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x24(%rbp),%r9d
mov    -0x28(%rbp),%eax
mov    %eax,(%rsp)
movl   $0x1,0x8(%rsp)
call   1030 <initialiseCell@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1214 <initialiseFields+0x104>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1334 <initialiseFields+0x224>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x24(%rbp),%r9d
mov    -0x28(%rbp),%eax
mov    %eax,(%rsp)
movl   $0x1,0x8(%rsp)
call   1030 <initialiseCell@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    12f0 <initialiseFields+0x1e0>
jmp    1339 <initialiseFields+0x229>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11af <initialiseFields+0x9f>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    13c1 <initialiseFields+0x2b1>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    13ae <initialiseFields+0x29e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x24(%rbp),%r9d
mov    -0x28(%rbp),%eax
mov    %eax,(%rsp)
movl   $0x2,0x8(%rsp)
call   1030 <initialiseCell@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    136a <initialiseFields+0x25a>
jmp    13b3 <initialiseFields+0x2a3>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1357 <initialiseFields+0x247>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialiseFields>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rsi,%r13
mov    %rdi,%r14
lea    0x2(%rcx),%eax
cmp    $0xffffffff,%ecx
mov    %eax,0x4(%rsp)
jl     1362 <initialiseFields+0x252>
mov    %rcx,0x28(%rsp)
cmp    $0x2,%eax
mov    $0x1,%r12d
cmovge %eax,%r12d
xor    %r15d,%r15d
nopl   0x0(%rax)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %r13,%rsi
mov    %rdx,%rbp
mov    0x4(%rsp),%ecx
mov    %ebx,%r8d
mov    %r15d,%r9d
push   $0x1
push   $0x0
call   1030 <initialiseCell@plt>
mov    %rbp,%rdx
add    $0x10,%rsp
add    $0x1,%ebx
cmp    %ebx,%r12d
jne    1160 <initialiseFields+0x50>
add    $0x1,%r15d
cmp    %r12d,%r15d
jne    1150 <initialiseFields+0x40>
mov    0x28(%rsp),%rcx
test   %ecx,%ecx
mov    0x4(%rsp),%r12d
jle    1362 <initialiseFields+0x252>
mov    %r14,0x20(%rsp)
mov    %r13,0x30(%rsp)
mov    %rdx,0x38(%rsp)
lea    0x1(%rcx),%eax
mov    %rax,0x10(%rsp)
cmp    $0x2,%r12d
mov    $0x1,%r13d
mov    $0x1,%r14d
cmovge %r12d,%r14d
mov    %ecx,%eax
neg    %eax
mov    %rax,0x40(%rsp)
mov    %r14d,0x1c(%rsp)
mov    0x38(%rsp),%r15
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %ebx,%ebx
mov    0x30(%rsp),%rbp
nopw   0x0(%rax,%rax,1)
mov    0x20(%rsp),%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
mov    %r12d,%ecx
mov    %ebx,%r8d
xor    %r9d,%r9d
push   $0x1
push   %r13
call   1030 <initialiseCell@plt>
add    $0x10,%rsp
add    $0x1,%ebx
cmp    %ebx,%r14d
jne    1200 <initialiseFields+0xf0>
mov    $0x1,%eax
mov    %rax,0x8(%rsp)
mov    0x20(%rsp),%r12
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
mov    0x4(%rsp),%ecx
xor    %r8d,%r8d
mov    0x8(%rsp),%r9
push   $0x1
push   %r13
call   1030 <initialiseCell@plt>
add    $0x10,%rsp
mov    $0x1,%ebx
mov    %rbp,%r14
mov    0x40(%rsp),%rbp
nop
mov    %r12,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
mov    0x4(%rsp),%ecx
mov    %ebx,%r8d
mov    0x8(%rsp),%r9
push   $0x0
push   %r13
call   1030 <initialiseCell@plt>
add    $0x10,%rsp
lea    (%rbx,%rbp,1),%eax
add    $0x1,%eax
mov    %ebx,%ecx
add    $0x1,%ecx
mov    %ecx,%ebx
cmp    $0x1,%eax
jne    1270 <initialiseFields+0x160>
mov    %r12,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
mov    0x4(%rsp),%ecx
mov    0x10(%rsp),%r8
mov    0x8(%rsp),%rbx
mov    %ebx,%r9d
push   $0x1
push   %r13
call   1030 <initialiseCell@plt>
add    $0x10,%rsp
lea    0x1(%rbx),%eax
cmp    0x28(%rsp),%ebx
mov    %rax,0x8(%rsp)
mov    %r14,%rbp
jne    1240 <initialiseFields+0x130>
mov    %r13,0x8(%rsp)
mov    %r12,%r13
xor    %ebx,%ebx
mov    0x4(%rsp),%r12d
mov    0x10(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r13,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
mov    %r12d,%ecx
mov    %ebx,%r8d
mov    %r14d,%r9d
push   $0x1
push   0x10(%rsp)
call   1030 <initialiseCell@plt>
add    $0x10,%rsp
add    $0x1,%ebx
cmp    %ebx,0x1c(%rsp)
jne    1300 <initialiseFields+0x1f0>
mov    0x8(%rsp),%rdx
lea    0x1(%rdx),%eax
mov    0x28(%rsp),%rcx
cmp    %ecx,%edx
mov    %eax,%r13d
mov    0x1c(%rsp),%r14d
jne    11f0 <initialiseFields+0xe0>
mov    0x38(%rsp),%rdx
mov    0x30(%rsp),%r13
mov    0x20(%rsp),%r14
mov    0x10(%rsp),%rax
cmp    $0xffffffff,%ecx
jge    136a <initialiseFields+0x25a>
jmp    13d7 <initialiseFields+0x2c7>
lea    0x1(%rcx),%eax
cmp    $0xffffffff,%ecx
jl     13d7 <initialiseFields+0x2c7>
mov    0x4(%rsp),%ecx
cmp    $0x2,%ecx
mov    $0x1,%ebp
cmovge %ecx,%ebp
xor    %r12d,%r12d
mov    %rax,0x10(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %r13,%rsi
mov    %rdx,%r15
mov    0x4(%rsp),%ecx
mov    %ebx,%r8d
mov    %r12d,%r9d
push   $0x2
push   %rax
call   1030 <initialiseCell@plt>
mov    0x20(%rsp),%rax
mov    %r15,%rdx
add    $0x10,%rsp
add    $0x1,%ebx
cmp    %ebx,%ebp
jne    13a0 <initialiseFields+0x290>
add    $0x1,%r12d
cmp    %ebp,%r12d
jne    1390 <initialiseFields+0x280>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @initialiseFields(double* %0, double* %1, i32* %2, i32 %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store double* %0, double** %5
store double* %1, double** %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%13 = load i32, i32* %8
%14 = add nsw i32 %13, 2
store i32 %14, i32* %12
store i32 0, i32* %11
store i32 0, i32* %10
br label %15
15: ; preds = %37, %4
%16 = load i32, i32* %10
%17 = load i32, i32* %12
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %40
19: ; preds = %15
store i32 0, i32* %9
br label %20
20: ; preds = %33, %19
%21 = load i32, i32* %9
%22 = load i32, i32* %12
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %36
24: ; preds = %20
%25 = load double*, double** %5
%26 = load double*, double** %6
%27 = load i32*, i32** %7
%28 = load i32, i32* %12
%29 = load i32, i32* %9
%30 = load i32, i32* %10
%31 = load i32, i32* %11
%32 = call i32 @initialiseCell(double* %25, double* %26, i32* %27, i32 %28, i32 %29, i32 %30, i32 %31, i32 1)
br label %33
33: ; preds = %24
%34 = load i32, i32* %9
%35 = add nsw i32 %34, 1
store i32 %35, i32* %9
br label %20
36: ; preds = %20
br label %37
37: ; preds = %36
%38 = load i32, i32* %10
%39 = add nsw i32 %38, 1
store i32 %39, i32* %10
br label %15
40: ; preds = %15
store i32 1, i32* %11
br label %41
41: ; preds = %126, %40
%42 = load i32, i32* %11
%43 = load i32, i32* %8
%44 = icmp sle i32 %42, %43
br i1 %44, label %45, label %129
45: ; preds = %41
store i32 0, i32* %10
store i32 0, i32* %9
br label %46
46: ; preds = %59, %45
%47 = load i32, i32* %9
%48 = load i32, i32* %12
%49 = icmp slt i32 %47, %48
br i1 %49, label %50, label %62
50: ; preds = %46
%51 = load double*, double** %5
%52 = load double*, double** %6
%53 = load i32*, i32** %7
%54 = load i32, i32* %12
%55 = load i32, i32* %9
%56 = load i32, i32* %10
%57 = load i32, i32* %11
%58 = call i32 @initialiseCell(double* %51, double* %52, i32* %53, i32 %54, i32 %55, i32 %56, i32 %57, i32 1)
br label %59
59: ; preds = %50
%60 = load i32, i32* %9
%61 = add nsw i32 %60, 1
store i32 %61, i32* %9
br label %46
62: ; preds = %46
store i32 1, i32* %10
br label %63
63: ; preds = %103, %62
%64 = load i32, i32* %10
%65 = load i32, i32* %8
%66 = icmp sle i32 %64, %65
br i1 %66, label %67, label %106
67: ; preds = %63
store i32 0, i32* %9
%68 = load double*, double** %5
%69 = load double*, double** %6
%70 = load i32*, i32** %7
%71 = load i32, i32* %12
%72 = load i32, i32* %9
%73 = load i32, i32* %10
%74 = load i32, i32* %11
%75 = call i32 @initialiseCell(double* %68, double* %69, i32* %70, i32 %71, i32 %72, i32 %73, i32 %74, i32 1)
store i32 1, i32* %9
br label %76
76: ; preds = %89, %67
%77 = load i32, i32* %9
%78 = load i32, i32* %8
%79 = icmp sle i32 %77, %78
br i1 %79, label %80, label %92
80: ; preds = %76
%81 = load double*, double** %5
%82 = load double*, double** %6
%83 = load i32*, i32** %7
%84 = load i32, i32* %12
%85 = load i32, i32* %9
%86 = load i32, i32* %10
%87 = load i32, i32* %11
%88 = call i32 @initialiseCell(double* %81, double* %82, i32* %83, i32 %84, i32 %85, i32 %86, i32 %87, i32 0)
br label %89
89: ; preds = %80
%90 = load i32, i32* %9
%91 = add nsw i32 %90, 1
store i32 %91, i32* %9
br label %76
92: ; preds = %76
%93 = load i32, i32* %8
%94 = add nsw i32 %93, 1
store i32 %94, i32* %9
%95 = load double*, double** %5
%96 = load double*, double** %6
%97 = load i32*, i32** %7
%98 = load i32, i32* %12
%99 = load i32, i32* %9
%100 = load i32, i32* %10
%101 = load i32, i32* %11
%102 = call i32 @initialiseCell(double* %95, double* %96, i32* %97, i32 %98, i32 %99, i32 %100, i32 %101, i32 1)
br label %103
103: ; preds = %92
%104 = load i32, i32* %10
%105 = add nsw i32 %104, 1
store i32 %105, i32* %10
br label %63
106: ; preds = %63
%107 = load i32, i32* %8
%108 = add nsw i32 %107, 1
store i32 %108, i32* %10
store i32 0, i32* %9
br label %109
109: ; preds = %122, %106
%110 = load i32, i32* %9
%111 = load i32, i32* %12
%112 = icmp slt i32 %110, %111
br i1 %112, label %113, label %125
113: ; preds = %109
%114 = load double*, double** %5
%115 = load double*, double** %6
%116 = load i32*, i32** %7
%117 = load i32, i32* %12
%118 = load i32, i32* %9
%119 = load i32, i32* %10
%120 = load i32, i32* %11
%121 = call i32 @initialiseCell(double* %114, double* %115, i32* %116, i32 %117, i32 %118, i32 %119, i32 %120, i32 1)
br label %122
122: ; preds = %113
%123 = load i32, i32* %9
%124 = add nsw i32 %123, 1
store i32 %124, i32* %9
br label %109
125: ; preds = %109
br label %126
126: ; preds = %125
%127 = load i32, i32* %11
%128 = add nsw i32 %127, 1
store i32 %128, i32* %11
br label %41
129: ; preds = %41
%130 = load i32, i32* %8
%131 = add nsw i32 %130, 1
store i32 %131, i32* %11
store i32 0, i32* %10
br label %132
132: ; preds = %154, %129
%133 = load i32, i32* %10
%134 = load i32, i32* %12
%135 = icmp slt i32 %133, %134
br i1 %135, label %136, label %157
136: ; preds = %132
store i32 0, i32* %9
br label %137
137: ; preds = %150, %136
%138 = load i32, i32* %9
%139 = load i32, i32* %12
%140 = icmp slt i32 %138, %139
br i1 %140, label %141, label %153
141: ; preds = %137
%142 = load double*, double** %5
%143 = load double*, double** %6
%144 = load i32*, i32** %7
%145 = load i32, i32* %12
%146 = load i32, i32* %9
%147 = load i32, i32* %10
%148 = load i32, i32* %11
%149 = call i32 @initialiseCell(double* %142, double* %143, i32* %144, i32 %145, i32 %146, i32 %147, i32 %148, i32 2)
br label %150
150: ; preds = %141
%151 = load i32, i32* %9
%152 = add nsw i32 %151, 1
store i32 %152, i32* %9
br label %137
153: ; preds = %137
br label %154
154: ; preds = %153
%155 = load i32, i32* %10
%156 = add nsw i32 %155, 1
store i32 %156, i32* %10
br label %132
157: ; preds = %132
ret void
}

LLVM IR (-O2):
define void @initialiseFields(double* %0, double* %1, i32* %2, i32 %3) {
%5 = add i32 %3, 2
%6 = icmp sgt i32 %3, -2
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = call i32 @llvm.smax.i32(i32 %5, i32 1)
br label %9
9: ; preds = %23, %7
%10 = phi i32 [ 0, %7 ], [ %24, %23 ]
br label %18
11: ; preds = %23
%12 = icmp slt i32 %3, 1
br i1 %12, label %13, label %15
13: ; preds = %4, %11
%14 = add nsw i32 %3, 1
br label %53
15: ; preds = %11
%16 = add nuw i32 %3, 1
%17 = call i32 @llvm.smax.i32(i32 %5, i32 1)
br label %26
18: ; preds = %9, %18
%19 = phi i32 [ %21, %18 ], [ 0, %9 ]
%20 = tail call i32 @initialiseCell(double* %0, double* %1, i32* %2, i32 %5, i32 %19, i32 %10, i32 0, i32 1)
%21 = add nuw nsw i32 %19, 1
%22 = icmp eq i32 %21, %8
br i1 %22, label %23, label %18
23: ; preds = %18
%24 = add nuw nsw i32 %10, 1
%25 = icmp eq i32 %24, %8
br i1 %25, label %11, label %9
26: ; preds = %50, %15
%27 = phi i32 [ 1, %15 ], [ %51, %50 ]
br label %28
28: ; preds = %26, %28
%29 = phi i32 [ %31, %28 ], [ 0, %26 ]
%30 = tail call i32 @initialiseCell(double* %0, double* %1, i32* %2, i32 %5, i32 %29, i32 0, i32 %27, i32 1)
%31 = add nuw nsw i32 %29, 1
%32 = icmp eq i32 %31, %17
br i1 %32, label %33, label %28
33: ; preds = %28, %41
%34 = phi i32 [ %43, %41 ], [ 1, %28 ]
%35 = tail call i32 @initialiseCell(double* %0, double* %1, i32* %2, i32 %5, i32 0, i32 %34, i32 %27, i32 1)
br label %36
36: ; preds = %33, %36
%37 = phi i32 [ %39, %36 ], [ 1, %33 ]
%38 = tail call i32 @initialiseCell(double* %0, double* %1, i32* %2, i32 %5, i32 %37, i32 %34, i32 %27, i32 0)
%39 = add nuw i32 %37, 1
%40 = icmp eq i32 %37, %3
br i1 %40, label %41, label %36
41: ; preds = %36
%42 = tail call i32 @initialiseCell(double* %0, double* %1, i32* %2, i32 %5, i32 %16, i32 %34, i32 %27, i32 1)
%43 = add nuw i32 %34, 1
%44 = icmp eq i32 %34, %3
br i1 %44, label %45, label %33
45: ; preds = %41, %45
%46 = phi i32 [ %48, %45 ], [ 0, %41 ]
%47 = tail call i32 @initialiseCell(double* %0, double* %1, i32* %2, i32 %5, i32 %46, i32 %16, i32 %27, i32 1)
%48 = add nuw nsw i32 %46, 1
%49 = icmp eq i32 %48, %17
br i1 %49, label %50, label %45
50: ; preds = %45
%51 = add nuw i32 %27, 1
%52 = icmp eq i32 %27, %3
br i1 %52, label %53, label %26
53: ; preds = %50, %13
%54 = phi i32 [ %14, %13 ], [ %16, %50 ]
br i1 %6, label %55, label %67
55: ; preds = %53
%56 = call i32 @llvm.smax.i32(i32 %5, i32 1)
br label %57
57: ; preds = %64, %55
%58 = phi i32 [ 0, %55 ], [ %65, %64 ]
br label %59
59: ; preds = %57, %59
%60 = phi i32 [ %62, %59 ], [ 0, %57 ]
%61 = tail call i32 @initialiseCell(double* %0, double* %1, i32* %2, i32 %5, i32 %60, i32 %58, i32 %54, i32 2)
%62 = add nuw nsw i32 %60, 1
%63 = icmp eq i32 %62, %56
br i1 %63, label %64, label %59
64: ; preds = %59
%65 = add nuw nsw i32 %58, 1
%66 = icmp eq i32 %65, %56
br i1 %66, label %67, label %57
67: ; preds = %64, %53
ret void
}