; LLVM IR from SourangshuGhosh/Fluid-Simulation-for-Computer-Graphics :: src/utils.ll (ZN5utils21sortInsideBorderCellsER7Array3dIbERSt6vectorI9GridIndexSaIS4_EES7_)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.Array3d.27 = type { i32, i32, i32, ptr, i8, i8, i32 }
%struct.GridIndex = type { i32, i32, i32 }

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI9GridIndexSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9GridIndexC2Eiii(ptr noundef nonnull align 4 dereferenceable(12), i32 noundef, i32 noundef, i32 noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5utils21sortInsideBorderCellsER7Array3dIbERSt6vectorI9GridIndexSaIS4_EES7_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #3 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %class.Array3d.27, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca [6 x %struct.GridIndex], align 16
  %18 = alloca [26 x %struct.GridIndex], align 16
  %19 = alloca %struct.GridIndex, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i8, align 1
  %24 = alloca i32, align 4
  %25 = alloca %struct.GridIndex, align 4
  %26 = alloca { i64, i32 }, align 4
  %27 = alloca %struct.GridIndex, align 4
  %28 = alloca { i64, i32 }, align 4
  %29 = alloca %struct.GridIndex, align 4
  %30 = alloca %struct.GridIndex, align 4
  %31 = alloca i32, align 4
  %32 = alloca %struct.GridIndex, align 4
  %33 = alloca { i64, i32 }, align 4
  %34 = alloca %struct.GridIndex, align 4
  %35 = alloca { i64, i32 }, align 4
  %36 = alloca %struct.GridIndex, align 4
  %37 = alloca { i64, i32 }, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %class.Array3d.27, ptr %38, i32 0, i32 0
  %40 = load i32, ptr %39, align 8, !tbaa !9
  store i32 %40, ptr %7, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %class.Array3d.27, ptr %41, i32 0, i32 1
  %43 = load i32, ptr %42, align 4, !tbaa !14
  store i32 %43, ptr %8, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %class.Array3d.27, ptr %44, i32 0, i32 2
  %46 = load i32, ptr %45, align 8, !tbaa !15
  store i32 %46, ptr %9, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #6
  %47 = load i32, ptr %7, align 4, !tbaa !13
  %48 = load i32, ptr %8, align 4, !tbaa !13
  %49 = load i32, ptr %9, align 4, !tbaa !13
  call void @_ZN7Array3dIbEC2Eiiib(ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef %47, i32 noundef %48, i32 noundef %49, i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !13
  br label %50

50:                                               ; preds = %92, %3
  %51 = load i32, ptr %11, align 4, !tbaa !13
  %52 = load i32, ptr %9, align 4, !tbaa !13
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %95

55:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !13
  br label %56

56:                                               ; preds = %88, %55
  %57 = load i32, ptr %13, align 4, !tbaa !13
  %58 = load i32, ptr %8, align 4, !tbaa !13
  %59 = icmp slt i32 %57, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %91

61:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !13
  br label %62

62:                                               ; preds = %84, %61
  %63 = load i32, ptr %14, align 4, !tbaa !13
  %64 = load i32, ptr %7, align 4, !tbaa !13
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %62
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %87

67:                                               ; preds = %62
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = load i32, ptr %14, align 4, !tbaa !13
  %70 = load i32, ptr %13, align 4, !tbaa !13
  %71 = load i32, ptr %11, align 4, !tbaa !13
  %72 = invoke noundef zeroext i1 @_ZN7Array3dIbEclEiii(ptr noundef nonnull align 8 dereferenceable(32) %68, i32 noundef %69, i32 noundef %70, i32 noundef %71)
          to label %73 unwind label %79

73:                                               ; preds = %67
  br i1 %72, label %74, label %83

74:                                               ; preds = %73
  %75 = load i32, ptr %14, align 4, !tbaa !13
  %76 = load i32, ptr %13, align 4, !tbaa !13
  %77 = load i32, ptr %11, align 4, !tbaa !13
  invoke void @_ZN7Array3dIbE3setEiiib(ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef %75, i32 noundef %76, i32 noundef %77, i1 noundef zeroext true)
          to label %78 unwind label %79

78:                                               ; preds = %74
  br label %83

79:                                               ; preds = %74, %67
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %15, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %290

83:                                               ; preds = %78, %73
  br label %84

84:                                               ; preds = %83
  %85 = load i32, ptr %14, align 4, !tbaa !13
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %14, align 4, !tbaa !13
  br label %62, !llvm.loop !16

87:                                               ; preds = %66
  br label %88

88:                                               ; preds = %87
  %89 = load i32, ptr %13, align 4, !tbaa !13
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %13, align 4, !tbaa !13
  br label %56, !llvm.loop !18

91:                                               ; preds = %60
  br label %92

92:                                               ; preds = %91
  %93 = load i32, ptr %11, align 4, !tbaa !13
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %11, align 4, !tbaa !13
  br label %50, !llvm.loop !19

95:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 72, ptr %17) #6
  %96 = getelementptr inbounds [6 x %struct.GridIndex], ptr %17, i32 0, i32 0
  %97 = getelementptr inbounds %struct.GridIndex, ptr %96, i64 6
  br label %98

98:                                               ; preds = %100, %95
  %99 = phi ptr [ %96, %95 ], [ %101, %100 ]
  invoke void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %99)
          to label %100 unwind label %118

100:                                              ; preds = %98
  %101 = getelementptr inbounds %struct.GridIndex, ptr %99, i64 1
  %102 = icmp eq ptr %101, %97
  br i1 %102, label %103, label %98

103:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 312, ptr %18) #6
  %104 = getelementptr inbounds [26 x %struct.GridIndex], ptr %18, i32 0, i32 0
  %105 = getelementptr inbounds %struct.GridIndex, ptr %104, i64 26
  br label %106

106:                                              ; preds = %108, %103
  %107 = phi ptr [ %104, %103 ], [ %109, %108 ]
  invoke void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %107)
          to label %108 unwind label %122

108:                                              ; preds = %106
  %109 = getelementptr inbounds %struct.GridIndex, ptr %107, i64 1
  %110 = icmp eq ptr %109, %105
  br i1 %110, label %111, label %106

111:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #6
  invoke void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %19)
          to label %112 unwind label %126

112:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !13
  br label %113

113:                                              ; preds = %283, %112
  %114 = load i32, ptr %20, align 4, !tbaa !13
  %115 = load i32, ptr %9, align 4, !tbaa !13
  %116 = icmp slt i32 %114, %115
  br i1 %116, label %130, label %117

117:                                              ; preds = %113
  store i32 11, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %286

118:                                              ; preds = %98
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %15, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %16, align 4
  br label %289

122:                                              ; preds = %106
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %15, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %16, align 4
  br label %288

126:                                              ; preds = %111
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %15, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %16, align 4
  br label %287

130:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !13
  br label %131

131:                                              ; preds = %279, %130
  %132 = load i32, ptr %21, align 4, !tbaa !13
  %133 = load i32, ptr %8, align 4, !tbaa !13
  %134 = icmp slt i32 %132, %133
  br i1 %134, label %136, label %135

135:                                              ; preds = %131
  store i32 14, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %282

136:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !13
  br label %137

137:                                              ; preds = %273, %136
  %138 = load i32, ptr %22, align 4, !tbaa !13
  %139 = load i32, ptr %7, align 4, !tbaa !13
  %140 = icmp slt i32 %138, %139
  br i1 %140, label %142, label %141

141:                                              ; preds = %137
  store i32 17, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %278

142:                                              ; preds = %137
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = load i32, ptr %22, align 4, !tbaa !13
  %145 = load i32, ptr %21, align 4, !tbaa !13
  %146 = load i32, ptr %20, align 4, !tbaa !13
  %147 = invoke noundef zeroext i1 @_ZN7Array3dIbEclEiii(ptr noundef nonnull align 8 dereferenceable(32) %143, i32 noundef %144, i32 noundef %145, i32 noundef %146)
          to label %148 unwind label %150

148:                                              ; preds = %142
  br i1 %147, label %154, label %149

149:                                              ; preds = %148
  br label %273

150:                                              ; preds = %154, %142
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %15, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %16, align 4
  br label %277

154:                                              ; preds = %148
  %155 = load i32, ptr %22, align 4, !tbaa !13
  %156 = load i32, ptr %21, align 4, !tbaa !13
  %157 = load i32, ptr %20, align 4, !tbaa !13
  %158 = getelementptr inbounds [6 x %struct.GridIndex], ptr %17, i64 0, i64 0
  invoke void @_ZN6Grid3d24getNeighbourGridIndices6EiiiP9GridIndex(i32 noundef %155, i32 noundef %156, i32 noundef %157, ptr noundef %158)
          to label %159 unwind label %150

159:                                              ; preds = %154
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #6
  store i8 1, ptr %23, align 1, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  store i32 0, ptr %24, align 4, !tbaa !13
  br label %160

160:                                              ; preds = %191, %159
  %161 = load i32, ptr %24, align 4, !tbaa !13
  %162 = icmp slt i32 %161, 6
  br i1 %162, label %164, label %163

163:                                              ; preds = %160
  store i32 20, ptr %12, align 4
  br label %194

164:                                              ; preds = %160
  %165 = load i32, ptr %24, align 4, !tbaa !13
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [6 x %struct.GridIndex], ptr %17, i64 0, i64 %166
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %167, i64 12, i1 false), !tbaa.struct !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 %19, i64 12, i1 false), !tbaa.struct !21
  %168 = load i32, ptr %7, align 4, !tbaa !13
  %169 = load i32, ptr %8, align 4, !tbaa !13
  %170 = load i32, ptr %9, align 4, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 %25, i64 12, i1 false)
  %171 = getelementptr inbounds { i64, i32 }, ptr %26, i32 0, i32 0
  %172 = load i64, ptr %171, align 4
  %173 = getelementptr inbounds { i64, i32 }, ptr %26, i32 0, i32 1
  %174 = load i32, ptr %173, align 4
  %175 = invoke noundef zeroext i1 @_ZN6Grid3d18isGridIndexInRangeE9GridIndexiii(i64 %172, i32 %174, i32 noundef %168, i32 noundef %169, i32 noundef %170)
          to label %176 unwind label %186

176:                                              ; preds = %164
  br i1 %175, label %177, label %185

177:                                              ; preds = %176
  %178 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 4 %19, i64 12, i1 false), !tbaa.struct !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 %27, i64 12, i1 false)
  %179 = getelementptr inbounds { i64, i32 }, ptr %28, i32 0, i32 0
  %180 = load i64, ptr %179, align 4
  %181 = getelementptr inbounds { i64, i32 }, ptr %28, i32 0, i32 1
  %182 = load i32, ptr %181, align 4
  %183 = invoke noundef zeroext i1 @_ZN7Array3dIbEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(32) %178, i64 %180, i32 %182)
          to label %184 unwind label %186

184:                                              ; preds = %177
  br i1 %183, label %190, label %185

185:                                              ; preds = %184, %176
  store i8 0, ptr %23, align 1, !tbaa !20
  store i32 20, ptr %12, align 4
  br label %194

186:                                              ; preds = %177, %164
  %187 = landingpad { ptr, i32 }
          cleanup
  %188 = extractvalue { ptr, i32 } %187, 0
  store ptr %188, ptr %15, align 8
  %189 = extractvalue { ptr, i32 } %187, 1
  store i32 %189, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %276

190:                                              ; preds = %184
  br label %191

191:                                              ; preds = %190
  %192 = load i32, ptr %24, align 4, !tbaa !13
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %24, align 4, !tbaa !13
  br label %160, !llvm.loop !22

194:                                              ; preds = %185, %163
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %195

195:                                              ; preds = %194
  %196 = load i8, ptr %23, align 1, !tbaa !20, !range !23, !noundef !24
  %197 = trunc i8 %196 to i1
  br i1 %197, label %198, label %209

198:                                              ; preds = %195
  %199 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %29) #6
  %200 = load i32, ptr %22, align 4, !tbaa !13
  %201 = load i32, ptr %21, align 4, !tbaa !13
  %202 = load i32, ptr %20, align 4, !tbaa !13
  invoke void @_ZN9GridIndexC2Eiii(ptr noundef nonnull align 4 dereferenceable(12) %29, i32 noundef %200, i32 noundef %201, i32 noundef %202)
          to label %203 unwind label %205

203:                                              ; preds = %198
  invoke void @_ZNSt6vectorI9GridIndexSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %199, ptr noundef nonnull align 4 dereferenceable(12) %29)
          to label %204 unwind label %205

204:                                              ; preds = %203
  call void @llvm.lifetime.end.p0(i64 12, ptr %29) #6
  store i32 19, ptr %12, align 4
  br label %270

205:                                              ; preds = %203, %198
  %206 = landingpad { ptr, i32 }
          cleanup
  %207 = extractvalue { ptr, i32 } %206, 0
  store ptr %207, ptr %15, align 8
  %208 = extractvalue { ptr, i32 } %206, 1
  store i32 %208, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %29) #6
  br label %276

209:                                              ; preds = %195
  %210 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %30) #6
  %211 = load i32, ptr %22, align 4, !tbaa !13
  %212 = load i32, ptr %21, align 4, !tbaa !13
  %213 = load i32, ptr %20, align 4, !tbaa !13
  invoke void @_ZN9GridIndexC2Eiii(ptr noundef nonnull align 4 dereferenceable(12) %30, i32 noundef %211, i32 noundef %212, i32 noundef %213)
          to label %214 unwind label %225

214:                                              ; preds = %209
  invoke void @_ZNSt6vectorI9GridIndexSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %210, ptr noundef nonnull align 4 dereferenceable(12) %30)
          to label %215 unwind label %225

215:                                              ; preds = %214
  call void @llvm.lifetime.end.p0(i64 12, ptr %30) #6
  %216 = load i32, ptr %22, align 4, !tbaa !13
  %217 = load i32, ptr %21, align 4, !tbaa !13
  %218 = load i32, ptr %20, align 4, !tbaa !13
  %219 = getelementptr inbounds [26 x %struct.GridIndex], ptr %18, i64 0, i64 0
  invoke void @_ZN6Grid3d25getNeighbourGridIndices26EiiiP9GridIndex(i32 noundef %216, i32 noundef %217, i32 noundef %218, ptr noundef %219)
          to label %220 unwind label %229

220:                                              ; preds = %215
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  store i32 0, ptr %31, align 4, !tbaa !13
  br label %221

221:                                              ; preds = %266, %220
  %222 = load i32, ptr %31, align 4, !tbaa !13
  %223 = icmp slt i32 %222, 26
  br i1 %223, label %233, label %224

224:                                              ; preds = %221
  store i32 23, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  br label %269

225:                                              ; preds = %214, %209
  %226 = landingpad { ptr, i32 }
          cleanup
  %227 = extractvalue { ptr, i32 } %226, 0
  store ptr %227, ptr %15, align 8
  %228 = extractvalue { ptr, i32 } %226, 1
  store i32 %228, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %30) #6
  br label %276

229:                                              ; preds = %215
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %15, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %16, align 4
  br label %276

233:                                              ; preds = %221
  %234 = load i32, ptr %31, align 4, !tbaa !13
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [26 x %struct.GridIndex], ptr %18, i64 0, i64 %235
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %236, i64 12, i1 false), !tbaa.struct !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %19, i64 12, i1 false), !tbaa.struct !21
  %237 = load i32, ptr %7, align 4, !tbaa !13
  %238 = load i32, ptr %8, align 4, !tbaa !13
  %239 = load i32, ptr %9, align 4, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 4 %32, i64 12, i1 false)
  %240 = getelementptr inbounds { i64, i32 }, ptr %33, i32 0, i32 0
  %241 = load i64, ptr %240, align 4
  %242 = getelementptr inbounds { i64, i32 }, ptr %33, i32 0, i32 1
  %243 = load i32, ptr %242, align 4
  %244 = invoke noundef zeroext i1 @_ZN6Grid3d18isGridIndexInRangeE9GridIndexiii(i64 %241, i32 %243, i32 noundef %237, i32 noundef %238, i32 noundef %239)
          to label %245 unwind label %254

245:                                              ; preds = %233
  br i1 %244, label %246, label %253

246:                                              ; preds = %245
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 4 %19, i64 12, i1 false), !tbaa.struct !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 4 %34, i64 12, i1 false)
  %247 = getelementptr inbounds { i64, i32 }, ptr %35, i32 0, i32 0
  %248 = load i64, ptr %247, align 4
  %249 = getelementptr inbounds { i64, i32 }, ptr %35, i32 0, i32 1
  %250 = load i32, ptr %249, align 4
  %251 = invoke noundef zeroext i1 @_ZN7Array3dIbEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(32) %10, i64 %248, i32 %250)
          to label %252 unwind label %254

252:                                              ; preds = %246
  br i1 %251, label %253, label %258

253:                                              ; preds = %252, %245
  br label %266

254:                                              ; preds = %260, %258, %246, %233
  %255 = landingpad { ptr, i32 }
          cleanup
  %256 = extractvalue { ptr, i32 } %255, 0
  store ptr %256, ptr %15, align 8
  %257 = extractvalue { ptr, i32 } %255, 1
  store i32 %257, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  br label %276

258:                                              ; preds = %252
  %259 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZNSt6vectorI9GridIndexSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %259, ptr noundef nonnull align 4 dereferenceable(12) %19)
          to label %260 unwind label %254

260:                                              ; preds = %258
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 4 %19, i64 12, i1 false), !tbaa.struct !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %36, i64 12, i1 false)
  %261 = getelementptr inbounds { i64, i32 }, ptr %37, i32 0, i32 0
  %262 = load i64, ptr %261, align 4
  %263 = getelementptr inbounds { i64, i32 }, ptr %37, i32 0, i32 1
  %264 = load i32, ptr %263, align 4
  invoke void @_ZN7Array3dIbE3setE9GridIndexb(ptr noundef nonnull align 8 dereferenceable(32) %10, i64 %262, i32 %264, i1 noundef zeroext true)
          to label %265 unwind label %254

265:                                              ; preds = %260
  br label %266

266:                                              ; preds = %265, %253
  %267 = load i32, ptr %31, align 4, !tbaa !13
  %268 = add nsw i32 %267, 1
  store i32 %268, ptr %31, align 4, !tbaa !13
  br label %221, !llvm.loop !25

269:                                              ; preds = %224
  store i32 0, ptr %12, align 4
  br label %270

270:                                              ; preds = %269, %204
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #6
  %271 = load i32, ptr %12, align 4
  switch i32 %271, label %296 [
    i32 0, label %272
    i32 19, label %273
  ]

272:                                              ; preds = %270
  br label %273

273:                                              ; preds = %272, %270, %149
  %274 = load i32, ptr %22, align 4, !tbaa !13
  %275 = add nsw i32 %274, 1
  store i32 %275, ptr %22, align 4, !tbaa !13
  br label %137, !llvm.loop !26

276:                                              ; preds = %254, %229, %225, %205, %186
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #6
  br label %277

277:                                              ; preds = %276, %150
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %287

278:                                              ; preds = %141
  br label %279

279:                                              ; preds = %278
  %280 = load i32, ptr %21, align 4, !tbaa !13
  %281 = add nsw i32 %280, 1
  store i32 %281, ptr %21, align 4, !tbaa !13
  br label %131, !llvm.loop !27

282:                                              ; preds = %135
  br label %283

283:                                              ; preds = %282
  %284 = load i32, ptr %20, align 4, !tbaa !13
  %285 = add nsw i32 %284, 1
  store i32 %285, ptr %20, align 4, !tbaa !13
  br label %113, !llvm.loop !28

286:                                              ; preds = %117
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 312, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %17) #6
  call void @_ZN7Array3dIbED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  ret void

287:                                              ; preds = %277, %126
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #6
  br label %288

288:                                              ; preds = %287, %122
  call void @llvm.lifetime.end.p0(i64 312, ptr %18) #6
  br label %289

289:                                              ; preds = %288, %118
  call void @llvm.lifetime.end.p0(i64 72, ptr %17) #6
  br label %290

290:                                              ; preds = %289, %79
  call void @_ZN7Array3dIbED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %291

291:                                              ; preds = %290
  %292 = load ptr, ptr %15, align 8
  %293 = load i32, ptr %16, align 4
  %294 = insertvalue { ptr, i32 } poison, ptr %292, 0
  %295 = insertvalue { ptr, i32 } %294, i32 %293, 1
  resume { ptr, i32 } %295

296:                                              ; preds = %270
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Array3dIbEC2Eiiib(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Array3dIbEclEiii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Array3dIbE3setEiiib(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Grid3d24getNeighbourGridIndices6EiiiP9GridIndex(i32 noundef, i32 noundef, i32 noundef, ptr noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6Grid3d18isGridIndexInRangeE9GridIndexiii(i64, i32, i32 noundef, i32 noundef, i32 noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Array3dIbEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(32), i64, i32) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Grid3d25getNeighbourGridIndices26EiiiP9GridIndex(i32 noundef, i32 noundef, i32 noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI9GridIndexSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Array3dIbE3setE9GridIndexb(ptr noundef nonnull align 8 dereferenceable(32), i64, i32, i1 noundef zeroext) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7Array3dIbED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTS7Array3dIbE", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16, !12, i64 24, !12, i64 25, !11, i64 28}
!11 = !{!"int", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{!10, !11, i64 4}
!15 = !{!10, !11, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}
!20 = !{!12, !12, i64 0}
!21 = !{i64 0, i64 4, !13, i64 4, i64 4, !13, i64 8, i64 4, !13}
!22 = distinct !{!22, !17}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = distinct !{!25, !17}
!26 = distinct !{!26, !17}
!27 = distinct !{!27, !17}
!28 = distinct !{!28, !17}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.Array3d.27 = type { i32, i32, i32, ptr, i8, i8, i32 }
%struct.GridIndex = type { i32, i32, i32 }

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI9GridIndexSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9GridIndexC2Eiii(ptr noundef nonnull align 4 dereferenceable(12), i32 noundef, i32 noundef, i32 noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5utils21sortInsideBorderCellsER7Array3dIbERSt6vectorI9GridIndexSaIS4_EES7_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %4 = alloca %class.Array3d.27, align 8
  %5 = alloca [6 x %struct.GridIndex], align 16
  %6 = alloca [26 x %struct.GridIndex], align 16
  %7 = alloca %struct.GridIndex, align 8
  %8 = alloca %struct.GridIndex, align 4
  %9 = alloca %struct.GridIndex, align 4
  %10 = load i32, ptr %0, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %0, i64 4
  %12 = load i32, ptr %11, align 4, !tbaa !12
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  %14 = load i32, ptr %13, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  call void @_ZN7Array3dIbEC2Eiiib(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %10, i32 noundef %12, i32 noundef %14, i1 noundef zeroext false)
  %15 = icmp sgt i32 %14, 0
  %16 = icmp sgt i32 %12, 0
  %17 = icmp sgt i32 %10, 0
  %18 = and i1 %16, %17
  %or.cond174 = and i1 %18, %15
  br i1 %or.cond174, label %.preheader111.us.us, label %._crit_edge

.preheader111.us.us:                              ; preds = %3, %._crit_edge115.split.us.us.us
  %.0116.us.us = phi i32 [ %26, %._crit_edge115.split.us.us.us ], [ 0, %3 ]
  br label %.preheader110.us.us.us

.preheader110.us.us.us:                           ; preds = %._crit_edge.us.us.us, %.preheader111.us.us
  %.083114.us.us.us = phi i32 [ 0, %.preheader111.us.us ], [ %25, %._crit_edge.us.us.us ]
  br label %19

19:                                               ; preds = %23, %.preheader110.us.us.us
  %.084113.us.us.us = phi i32 [ 0, %.preheader110.us.us.us ], [ %24, %23 ]
  %20 = invoke noundef zeroext i1 @_ZN7Array3dIbEclEiii(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef %.084113.us.us.us, i32 noundef %.083114.us.us.us, i32 noundef %.0116.us.us)
          to label %21 unwind label %.split.us.split.us.split.us

21:                                               ; preds = %19
  br i1 %20, label %22, label %23

22:                                               ; preds = %21
  invoke void @_ZN7Array3dIbE3setEiiib(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %.084113.us.us.us, i32 noundef %.083114.us.us.us, i32 noundef %.0116.us.us, i1 noundef zeroext true)
          to label %23 unwind label %.split.us.split.us.split.us

23:                                               ; preds = %22, %21
  %24 = add nuw nsw i32 %.084113.us.us.us, 1
  %exitcond.not = icmp eq i32 %24, %10
  br i1 %exitcond.not, label %._crit_edge.us.us.us, label %19, !llvm.loop !14

._crit_edge.us.us.us:                             ; preds = %23
  %25 = add nuw nsw i32 %.083114.us.us.us, 1
  %exitcond165.not = icmp eq i32 %25, %12
  br i1 %exitcond165.not, label %._crit_edge115.split.us.us.us, label %.preheader110.us.us.us, !llvm.loop !16

._crit_edge115.split.us.us.us:                    ; preds = %._crit_edge.us.us.us
  %26 = add nuw nsw i32 %.0116.us.us, 1
  %exitcond166.not = icmp eq i32 %26, %14
  br i1 %exitcond166.not, label %._crit_edge, label %.preheader111.us.us, !llvm.loop !17

.split.us.split.us.split.us:                      ; preds = %22, %19
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %79

._crit_edge:                                      ; preds = %._crit_edge115.split.us.us.us, %3
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %5) #6
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %5)
  %.ptr.1 = getelementptr inbounds i8, ptr %5, i64 12
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.1)
  %.ptr.2 = getelementptr inbounds i8, ptr %5, i64 24
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.2)
  %.ptr.3 = getelementptr inbounds i8, ptr %5, i64 36
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.3)
  %.ptr.4 = getelementptr inbounds i8, ptr %5, i64 48
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.4)
  %.ptr.5 = getelementptr inbounds i8, ptr %5, i64 60
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.5)
  call void @llvm.lifetime.start.p0(i64 312, ptr nonnull %6) #6
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %6)
  %.ptr101.1 = getelementptr inbounds i8, ptr %6, i64 12
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.1)
  %.ptr101.2 = getelementptr inbounds i8, ptr %6, i64 24
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.2)
  %.ptr101.3 = getelementptr inbounds i8, ptr %6, i64 36
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.3)
  %.ptr101.4 = getelementptr inbounds i8, ptr %6, i64 48
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.4)
  %.ptr101.5 = getelementptr inbounds i8, ptr %6, i64 60
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.5)
  %.ptr101.6 = getelementptr inbounds i8, ptr %6, i64 72
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.6)
  %.ptr101.7 = getelementptr inbounds i8, ptr %6, i64 84
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.7)
  %.ptr101.8 = getelementptr inbounds i8, ptr %6, i64 96
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.8)
  %.ptr101.9 = getelementptr inbounds i8, ptr %6, i64 108
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.9)
  %.ptr101.10 = getelementptr inbounds i8, ptr %6, i64 120
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.10)
  %.ptr101.11 = getelementptr inbounds i8, ptr %6, i64 132
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.11)
  %.ptr101.12 = getelementptr inbounds i8, ptr %6, i64 144
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.12)
  %.ptr101.13 = getelementptr inbounds i8, ptr %6, i64 156
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.13)
  %.ptr101.14 = getelementptr inbounds i8, ptr %6, i64 168
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.14)
  %.ptr101.15 = getelementptr inbounds i8, ptr %6, i64 180
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.15)
  %.ptr101.16 = getelementptr inbounds i8, ptr %6, i64 192
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.16)
  %.ptr101.17 = getelementptr inbounds i8, ptr %6, i64 204
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.17)
  %.ptr101.18 = getelementptr inbounds i8, ptr %6, i64 216
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.18)
  %.ptr101.19 = getelementptr inbounds i8, ptr %6, i64 228
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.19)
  %.ptr101.20 = getelementptr inbounds i8, ptr %6, i64 240
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.20)
  %.ptr101.21 = getelementptr inbounds i8, ptr %6, i64 252
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.21)
  %.ptr101.22 = getelementptr inbounds i8, ptr %6, i64 264
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.22)
  %.ptr101.23 = getelementptr inbounds i8, ptr %6, i64 276
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.23)
  %.ptr101.24 = getelementptr inbounds i8, ptr %6, i64 288
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.24)
  %.ptr101.25 = getelementptr inbounds i8, ptr %6, i64 300
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr101.25)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #6
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %7)
  br i1 %15, label %.preheader109.lr.ph, label %._crit_edge146

.preheader109.lr.ph:                              ; preds = %._crit_edge
  %28 = icmp sgt i32 %12, 0
  %.sroa.220.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  %29 = icmp sgt i32 %10, 0
  %or.cond175 = and i1 %28, %29
  br i1 %or.cond175, label %.preheader109.us.us, label %._crit_edge146

.preheader109.us.us:                              ; preds = %.preheader109.lr.ph, %._crit_edge127.split.us.us.us
  %.089144.us.us = phi i32 [ %71, %._crit_edge127.split.us.us.us ], [ 0, %.preheader109.lr.ph ]
  br label %.preheader108.us.us.us

.preheader108.us.us.us:                           ; preds = %._crit_edge125.us.us.us, %.preheader109.us.us
  %.090126.us.us.us = phi i32 [ 0, %.preheader109.us.us ], [ %70, %._crit_edge125.us.us.us ]
  br label %30

30:                                               ; preds = %.loopexit.us.us.us, %.preheader108.us.us.us
  %.091124.us.us.us = phi i32 [ 0, %.preheader108.us.us.us ], [ %69, %.loopexit.us.us.us ]
  %31 = invoke noundef zeroext i1 @_ZN7Array3dIbEclEiii(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef %.091124.us.us.us, i32 noundef %.090126.us.us.us, i32 noundef %.089144.us.us)
          to label %32 unwind label %.split.us128.split.us.split.us

32:                                               ; preds = %30
  br i1 %31, label %33, label %.loopexit.us.us.us

33:                                               ; preds = %32
  invoke void @_ZN6Grid3d24getNeighbourGridIndices6EiiiP9GridIndex(i32 noundef %.091124.us.us.us, i32 noundef %.090126.us.us.us, i32 noundef %.089144.us.us, ptr noundef nonnull %5)
          to label %.preheader107.us.us.us.preheader unwind label %.split.us128.split.us.split.us

.preheader107.us.us.us.preheader:                 ; preds = %33
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %7, ptr noundef nonnull align 16 dereferenceable(12) %5, i64 12, i1 false), !tbaa.struct !18
  %.sroa.019.0.copyload.us.us.us = load i64, ptr %7, align 8
  %.sroa.220.0.copyload.us.us.us = load i32, ptr %.sroa.220.0..sroa_idx, align 8, !tbaa !19
  %34 = call noundef zeroext i1 @_ZN6Grid3d18isGridIndexInRangeE9GridIndexiii(i64 %.sroa.019.0.copyload.us.us.us, i32 %.sroa.220.0.copyload.us.us.us, i32 noundef %10, i32 noundef %12, i32 noundef %14)
  br i1 %34, label %55, label %58

.preheader107.us.us.us.1:                         ; preds = %57
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %.ptr.1, i64 12, i1 false), !tbaa.struct !18
  %.sroa.019.0.copyload.us.us.us.1 = load i64, ptr %7, align 8
  %.sroa.220.0.copyload.us.us.us.1 = load i32, ptr %.sroa.220.0..sroa_idx, align 8, !tbaa !19
  %35 = call noundef zeroext i1 @_ZN6Grid3d18isGridIndexInRangeE9GridIndexiii(i64 %.sroa.019.0.copyload.us.us.us.1, i32 %.sroa.220.0.copyload.us.us.us.1, i32 noundef %10, i32 noundef %12, i32 noundef %14)
  br i1 %35, label %36, label %58

36:                                               ; preds = %.preheader107.us.us.us.1
  %.sroa.015.0.copyload.us.us.us.1 = load i64, ptr %7, align 8
  %.sroa.216.0.copyload.us.us.us.1 = load i32, ptr %.sroa.220.0..sroa_idx, align 8, !tbaa !19
  %37 = invoke noundef zeroext i1 @_ZN7Array3dIbEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 %.sroa.015.0.copyload.us.us.us.1, i32 %.sroa.216.0.copyload.us.us.us.1)
          to label %38 unwind label %.split130.us.split.us.split.us

38:                                               ; preds = %36
  br i1 %37, label %.preheader107.us.us.us.2, label %58

.preheader107.us.us.us.2:                         ; preds = %38
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %7, ptr noundef nonnull align 8 dereferenceable(12) %.ptr.2, i64 12, i1 false), !tbaa.struct !18
  %.sroa.019.0.copyload.us.us.us.2 = load i64, ptr %7, align 8
  %.sroa.220.0.copyload.us.us.us.2 = load i32, ptr %.sroa.220.0..sroa_idx, align 8, !tbaa !19
  %39 = call noundef zeroext i1 @_ZN6Grid3d18isGridIndexInRangeE9GridIndexiii(i64 %.sroa.019.0.copyload.us.us.us.2, i32 %.sroa.220.0.copyload.us.us.us.2, i32 noundef %10, i32 noundef %12, i32 noundef %14)
  br i1 %39, label %40, label %58

40:                                               ; preds = %.preheader107.us.us.us.2
  %.sroa.015.0.copyload.us.us.us.2 = load i64, ptr %7, align 8
  %.sroa.216.0.copyload.us.us.us.2 = load i32, ptr %.sroa.220.0..sroa_idx, align 8, !tbaa !19
  %41 = invoke noundef zeroext i1 @_ZN7Array3dIbEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 %.sroa.015.0.copyload.us.us.us.2, i32 %.sroa.216.0.copyload.us.us.us.2)
          to label %42 unwind label %.split130.us.split.us.split.us

42:                                               ; preds = %40
  br i1 %41, label %.preheader107.us.us.us.3, label %58

.preheader107.us.us.us.3:                         ; preds = %42
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %.ptr.3, i64 12, i1 false), !tbaa.struct !18
  %.sroa.019.0.copyload.us.us.us.3 = load i64, ptr %7, align 8
  %.sroa.220.0.copyload.us.us.us.3 = load i32, ptr %.sroa.220.0..sroa_idx, align 8, !tbaa !19
  %43 = call noundef zeroext i1 @_ZN6Grid3d18isGridIndexInRangeE9GridIndexiii(i64 %.sroa.019.0.copyload.us.us.us.3, i32 %.sroa.220.0.copyload.us.us.us.3, i32 noundef %10, i32 noundef %12, i32 noundef %14)
  br i1 %43, label %44, label %58

44:                                               ; preds = %.preheader107.us.us.us.3
  %.sroa.015.0.copyload.us.us.us.3 = load i64, ptr %7, align 8
  %.sroa.216.0.copyload.us.us.us.3 = load i32, ptr %.sroa.220.0..sroa_idx, align 8, !tbaa !19
  %45 = invoke noundef zeroext i1 @_ZN7Array3dIbEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 %.sroa.015.0.copyload.us.us.us.3, i32 %.sroa.216.0.copyload.us.us.us.3)
          to label %46 unwind label %.split130.us.split.us.split.us

46:                                               ; preds = %44
  br i1 %45, label %.preheader107.us.us.us.4, label %58

.preheader107.us.us.us.4:                         ; preds = %46
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %7, ptr noundef nonnull align 16 dereferenceable(12) %.ptr.4, i64 12, i1 false), !tbaa.struct !18
  %.sroa.019.0.copyload.us.us.us.4 = load i64, ptr %7, align 8
  %.sroa.220.0.copyload.us.us.us.4 = load i32, ptr %.sroa.220.0..sroa_idx, align 8, !tbaa !19
  %47 = call noundef zeroext i1 @_ZN6Grid3d18isGridIndexInRangeE9GridIndexiii(i64 %.sroa.019.0.copyload.us.us.us.4, i32 %.sroa.220.0.copyload.us.us.us.4, i32 noundef %10, i32 noundef %12, i32 noundef %14)
  br i1 %47, label %48, label %58

48:                                               ; preds = %.preheader107.us.us.us.4
  %.sroa.015.0.copyload.us.us.us.4 = load i64, ptr %7, align 8
  %.sroa.216.0.copyload.us.us.us.4 = load i32, ptr %.sroa.220.0..sroa_idx, align 8, !tbaa !19
  %49 = invoke noundef zeroext i1 @_ZN7Array3dIbEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 %.sroa.015.0.copyload.us.us.us.4, i32 %.sroa.216.0.copyload.us.us.us.4)
          to label %50 unwind label %.split130.us.split.us.split.us

50:                                               ; preds = %48
  br i1 %49, label %.preheader107.us.us.us.5, label %58

.preheader107.us.us.us.5:                         ; preds = %50
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %.ptr.5, i64 12, i1 false), !tbaa.struct !18
  %.sroa.019.0.copyload.us.us.us.5 = load i64, ptr %7, align 8
  %.sroa.220.0.copyload.us.us.us.5 = load i32, ptr %.sroa.220.0..sroa_idx, align 8, !tbaa !19
  %51 = call noundef zeroext i1 @_ZN6Grid3d18isGridIndexInRangeE9GridIndexiii(i64 %.sroa.019.0.copyload.us.us.us.5, i32 %.sroa.220.0.copyload.us.us.us.5, i32 noundef %10, i32 noundef %12, i32 noundef %14)
  br i1 %51, label %52, label %58

52:                                               ; preds = %.preheader107.us.us.us.5
  %.sroa.015.0.copyload.us.us.us.5 = load i64, ptr %7, align 8
  %.sroa.216.0.copyload.us.us.us.5 = load i32, ptr %.sroa.220.0..sroa_idx, align 8, !tbaa !19
  %53 = invoke noundef zeroext i1 @_ZN7Array3dIbEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 %.sroa.015.0.copyload.us.us.us.5, i32 %.sroa.216.0.copyload.us.us.us.5)
          to label %54 unwind label %.split130.us.split.us.split.us

54:                                               ; preds = %52
  br i1 %53, label %.critedge.us.us.us, label %58

.critedge.us.us.us:                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #6
  call void @_ZN9GridIndexC2Eiii(ptr noundef nonnull align 4 dereferenceable(12) %8, i32 noundef %.091124.us.us.us, i32 noundef %.090126.us.us.us, i32 noundef %.089144.us.us)
  invoke void @_ZNSt6vectorI9GridIndexSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(12) %8)
          to label %68 unwind label %.split142.us.split.us.split.us

55:                                               ; preds = %.preheader107.us.us.us.preheader
  %.sroa.015.0.copyload.us.us.us = load i64, ptr %7, align 8
  %.sroa.216.0.copyload.us.us.us = load i32, ptr %.sroa.220.0..sroa_idx, align 8, !tbaa !19
  %56 = invoke noundef zeroext i1 @_ZN7Array3dIbEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 %.sroa.015.0.copyload.us.us.us, i32 %.sroa.216.0.copyload.us.us.us)
          to label %57 unwind label %.split130.us.split.us.split.us

57:                                               ; preds = %55
  br i1 %56, label %.preheader107.us.us.us.1, label %58

58:                                               ; preds = %54, %.preheader107.us.us.us.5, %50, %.preheader107.us.us.us.4, %46, %.preheader107.us.us.us.3, %42, %.preheader107.us.us.us.2, %38, %.preheader107.us.us.us.1, %57, %.preheader107.us.us.us.preheader
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #6
  call void @_ZN9GridIndexC2Eiii(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef %.091124.us.us.us, i32 noundef %.090126.us.us.us, i32 noundef %.089144.us.us)
  invoke void @_ZNSt6vectorI9GridIndexSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(12) %9)
          to label %59 unwind label %.split133.us.split.us.split.us

59:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #6
  invoke void @_ZN6Grid3d25getNeighbourGridIndices26EiiiP9GridIndex(i32 noundef %.091124.us.us.us, i32 noundef %.090126.us.us.us, i32 noundef %.089144.us.us, ptr noundef nonnull %6)
          to label %.preheader.us.us.us unwind label %.split136.us.split.us.split.us

.preheader.us.us.us:                              ; preds = %59, %67
  %indvars.iv = phi i64 [ %indvars.iv.next, %67 ], [ 0, %59 ]
  %60 = getelementptr inbounds [26 x %struct.GridIndex], ptr %6, i64 0, i64 %indvars.iv
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %60, i64 12, i1 false), !tbaa.struct !18
  %.sroa.09.0.copyload.us.us.us = load i64, ptr %7, align 8
  %.sroa.210.0.copyload.us.us.us = load i32, ptr %.sroa.220.0..sroa_idx, align 8, !tbaa !19
  %61 = call noundef zeroext i1 @_ZN6Grid3d18isGridIndexInRangeE9GridIndexiii(i64 %.sroa.09.0.copyload.us.us.us, i32 %.sroa.210.0.copyload.us.us.us, i32 noundef %10, i32 noundef %12, i32 noundef %14)
  br i1 %61, label %62, label %67

62:                                               ; preds = %.preheader.us.us.us
  %.sroa.05.0.copyload.us.us.us = load i64, ptr %7, align 8
  %.sroa.26.0.copyload.us.us.us = load i32, ptr %.sroa.220.0..sroa_idx, align 8, !tbaa !19
  %63 = invoke noundef zeroext i1 @_ZN7Array3dIbEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 %.sroa.05.0.copyload.us.us.us, i32 %.sroa.26.0.copyload.us.us.us)
          to label %64 unwind label %.split139.us.split.us.split.us

64:                                               ; preds = %62
  br i1 %63, label %67, label %65

65:                                               ; preds = %64
  invoke void @_ZNSt6vectorI9GridIndexSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(12) %7)
          to label %66 unwind label %.split139.us.split.us.split.us

66:                                               ; preds = %65
  %.sroa.01.0.copyload.us.us.us = load i64, ptr %7, align 8
  %.sroa.22.0.copyload.us.us.us = load i32, ptr %.sroa.220.0..sroa_idx, align 8, !tbaa !19
  invoke void @_ZN7Array3dIbE3setE9GridIndexb(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 %.sroa.01.0.copyload.us.us.us, i32 %.sroa.22.0.copyload.us.us.us, i1 noundef zeroext true)
          to label %67 unwind label %.split139.us.split.us.split.us

67:                                               ; preds = %66, %64, %.preheader.us.us.us
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond170.not = icmp eq i64 %indvars.iv.next, 26
  br i1 %exitcond170.not, label %.loopexit.us.us.us, label %.preheader.us.us.us, !llvm.loop !20

68:                                               ; preds = %.critedge.us.us.us
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #6
  br label %.loopexit.us.us.us

.loopexit.us.us.us:                               ; preds = %67, %68, %32
  %69 = add nuw nsw i32 %.091124.us.us.us, 1
  %exitcond171.not = icmp eq i32 %69, %10
  br i1 %exitcond171.not, label %._crit_edge125.us.us.us, label %30, !llvm.loop !21

._crit_edge125.us.us.us:                          ; preds = %.loopexit.us.us.us
  %70 = add nuw nsw i32 %.090126.us.us.us, 1
  %exitcond172.not = icmp eq i32 %70, %12
  br i1 %exitcond172.not, label %._crit_edge127.split.us.us.us, label %.preheader108.us.us.us, !llvm.loop !22

._crit_edge127.split.us.us.us:                    ; preds = %._crit_edge125.us.us.us
  %71 = add nuw nsw i32 %.089144.us.us, 1
  %exitcond173.not = icmp eq i32 %71, %14
  br i1 %exitcond173.not, label %._crit_edge146, label %.preheader109.us.us, !llvm.loop !23

.split.us128.split.us.split.us:                   ; preds = %33, %30
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %78

.split130.us.split.us.split.us:                   ; preds = %52, %48, %44, %40, %36, %55
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %78

.split133.us.split.us.split.us:                   ; preds = %58
  %74 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #6
  br label %78

.split136.us.split.us.split.us:                   ; preds = %59
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %78

.split139.us.split.us.split.us:                   ; preds = %66, %65, %62
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %78

.split142.us.split.us.split.us:                   ; preds = %.critedge.us.us.us
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #6
  br label %78

._crit_edge146:                                   ; preds = %._crit_edge127.split.us.us.us, %.preheader109.lr.ph, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 312, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #6
  call void @_ZN7Array3dIbED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  ret void

78:                                               ; preds = %.split130.us.split.us.split.us, %.split142.us.split.us.split.us, %.split133.us.split.us.split.us, %.split136.us.split.us.split.us, %.split139.us.split.us.split.us, %.split.us128.split.us.split.us
  %.pn.pn = phi { ptr, i32 } [ %72, %.split.us128.split.us.split.us ], [ %77, %.split142.us.split.us.split.us ], [ %76, %.split139.us.split.us.split.us ], [ %75, %.split136.us.split.us.split.us ], [ %74, %.split133.us.split.us.split.us ], [ %73, %.split130.us.split.us.split.us ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 312, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #6
  br label %79

79:                                               ; preds = %78, %.split.us.split.us.split.us
  %.pn105 = phi { ptr, i32 } [ %27, %.split.us.split.us.split.us ], [ %.pn.pn, %78 ]
  call void @_ZN7Array3dIbED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn105
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Array3dIbEC2Eiiib(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Array3dIbEclEiii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Array3dIbE3setEiiib(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Grid3d24getNeighbourGridIndices6EiiiP9GridIndex(i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6Grid3d18isGridIndexInRangeE9GridIndexiii(i64, i32, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Array3dIbEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(32), i64, i32) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Grid3d25getNeighbourGridIndices26EiiiP9GridIndex(i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI9GridIndexSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Array3dIbE3setE9GridIndexb(ptr noundef nonnull align 8 dereferenceable(32), i64, i32, i1 noundef zeroext) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7Array3dIbED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTS7Array3dIbE", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !11, i64 24, !11, i64 25, !7, i64 28}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!6, !7, i64 4}
!13 = !{!6, !7, i64 8}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = !{i64 0, i64 4, !19, i64 4, i64 4, !19, i64 8, i64 4, !19}
!19 = !{!7, !7, i64 0}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !15}
!23 = distinct !{!23, !15}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass