; LLVM IR from SourangshuGhosh/Fluid-Simulation-for-Computer-Graphics :: src (polygonizer3d)

; 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.vmath::vec3" = type { float, float, float }
%struct.GridIndex = type { i32, i32, i32 }
%class.Polygonizer3d = type <{ i32, i32, i32, [4 x i8], double, double, ptr, i8, [7 x i8], ptr, i8, [7 x i8] }>
%"struct.Polygonizer3d::EdgeGrid" = type { %class.Array3d.1, %class.Array3d.1, %class.Array3d.1 }
%class.Array3d.1 = type <{ i32, i32, i32, [4 x i8], ptr, i8, [3 x i8], i32, i32, [4 x i8] }>

@_ZN13Polygonizer3d10_edgeTableE = external dso_local constant [256 x i32], align 16

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13Polygonizer3d18_getVertexPositionE9GridIndex(ptr dead_on_unwind noalias writable sret(%"class.vmath::vec3") align 4, ptr noundef nonnull align 8 dereferenceable(57), i64, i32) #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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Grid3d20getGridIndexVerticesE9GridIndexPS0_(i64, i32, ptr noundef) #5

declare noundef double @_ZN11ScalarField19getScalarFieldValueE9GridIndex(ptr noundef nonnull align 8 dereferenceable(248), i64, i32) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind noalias writable sret(%"class.vmath::vec3") align 4, ptr noundef nonnull align 8 dereferenceable(57), ptr noundef, ptr noundef, double noundef, double noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13Polygonizer3d20_calculateVertexListE9GridIndexiRNS_8EdgeGridERSt6vectorIN5vmath4vec3ESaIS5_EEPi(ptr noundef nonnull align 8 dereferenceable(57) %0, i64 %1, i32 %2, i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(120) %4, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef %6) #1 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca %struct.GridIndex, align 4
  %9 = alloca { i64, i32 }, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca [8 x %struct.GridIndex], align 16
  %16 = alloca [8 x double], align 16
  %17 = alloca [8 x %"class.vmath::vec3"], align 16
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca %"class.vmath::vec3", align 4
  %21 = alloca %struct.GridIndex, align 4
  %22 = alloca { i64, i32 }, align 4
  %23 = alloca i32, align 4
  %24 = alloca %struct.GridIndex, align 4
  %25 = alloca { i64, i32 }, align 4
  %26 = alloca %"class.vmath::vec3", align 4
  %27 = alloca %struct.GridIndex, align 4
  %28 = alloca { i64, i32 }, align 4
  %29 = alloca %struct.GridIndex, align 4
  %30 = alloca { i64, i32 }, align 4
  %31 = alloca %"class.vmath::vec3", align 4
  %32 = alloca %"class.vmath::vec3", align 4
  %33 = alloca %"class.vmath::vec3", 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
  %38 = alloca %struct.GridIndex, align 4
  %39 = alloca { i64, i32 }, align 4
  %40 = alloca %"class.vmath::vec3", align 4
  %41 = alloca %"class.vmath::vec3", align 4
  %42 = alloca %"class.vmath::vec3", align 4
  %43 = alloca %struct.GridIndex, align 4
  %44 = alloca { i64, i32 }, align 4
  %45 = alloca %struct.GridIndex, align 4
  %46 = alloca { i64, i32 }, align 4
  %47 = alloca %struct.GridIndex, align 4
  %48 = alloca { i64, i32 }, align 4
  %49 = alloca %"class.vmath::vec3", align 4
  %50 = alloca %"class.vmath::vec3", align 4
  %51 = alloca %"class.vmath::vec3", align 4
  %52 = alloca %struct.GridIndex, align 4
  %53 = alloca { i64, i32 }, align 4
  %54 = alloca %struct.GridIndex, align 4
  %55 = alloca { i64, i32 }, align 4
  %56 = alloca %struct.GridIndex, align 4
  %57 = alloca { i64, i32 }, align 4
  %58 = alloca %"class.vmath::vec3", align 4
  %59 = alloca %"class.vmath::vec3", align 4
  %60 = alloca %"class.vmath::vec3", align 4
  %61 = alloca %struct.GridIndex, align 4
  %62 = alloca { i64, i32 }, align 4
  %63 = alloca %struct.GridIndex, align 4
  %64 = alloca { i64, i32 }, align 4
  %65 = alloca %struct.GridIndex, align 4
  %66 = alloca { i64, i32 }, align 4
  %67 = alloca %"class.vmath::vec3", align 4
  %68 = alloca %"class.vmath::vec3", align 4
  %69 = alloca %"class.vmath::vec3", align 4
  %70 = alloca %struct.GridIndex, align 4
  %71 = alloca { i64, i32 }, align 4
  %72 = alloca %struct.GridIndex, align 4
  %73 = alloca { i64, i32 }, align 4
  %74 = alloca %struct.GridIndex, align 4
  %75 = alloca { i64, i32 }, align 4
  %76 = alloca %"class.vmath::vec3", align 4
  %77 = alloca %"class.vmath::vec3", align 4
  %78 = alloca %"class.vmath::vec3", align 4
  %79 = alloca %struct.GridIndex, align 4
  %80 = alloca { i64, i32 }, align 4
  %81 = alloca %struct.GridIndex, align 4
  %82 = alloca { i64, i32 }, align 4
  %83 = alloca %struct.GridIndex, align 4
  %84 = alloca { i64, i32 }, align 4
  %85 = alloca %"class.vmath::vec3", align 4
  %86 = alloca %"class.vmath::vec3", align 4
  %87 = alloca %"class.vmath::vec3", align 4
  %88 = alloca %struct.GridIndex, align 4
  %89 = alloca { i64, i32 }, align 4
  %90 = alloca %struct.GridIndex, align 4
  %91 = alloca { i64, i32 }, align 4
  %92 = alloca %struct.GridIndex, align 4
  %93 = alloca { i64, i32 }, align 4
  %94 = alloca %"class.vmath::vec3", align 4
  %95 = alloca %"class.vmath::vec3", align 4
  %96 = alloca %"class.vmath::vec3", align 4
  %97 = alloca %struct.GridIndex, align 4
  %98 = alloca { i64, i32 }, align 4
  %99 = alloca %struct.GridIndex, align 4
  %100 = alloca { i64, i32 }, align 4
  %101 = alloca %struct.GridIndex, align 4
  %102 = alloca { i64, i32 }, align 4
  %103 = alloca %"class.vmath::vec3", align 4
  %104 = alloca %"class.vmath::vec3", align 4
  %105 = alloca %"class.vmath::vec3", align 4
  %106 = alloca %struct.GridIndex, align 4
  %107 = alloca { i64, i32 }, align 4
  %108 = alloca %struct.GridIndex, align 4
  %109 = alloca { i64, i32 }, align 4
  %110 = alloca %struct.GridIndex, align 4
  %111 = alloca { i64, i32 }, align 4
  %112 = alloca %"class.vmath::vec3", align 4
  %113 = alloca %"class.vmath::vec3", align 4
  %114 = alloca %"class.vmath::vec3", align 4
  %115 = alloca %struct.GridIndex, align 4
  %116 = alloca { i64, i32 }, align 4
  %117 = alloca %struct.GridIndex, align 4
  %118 = alloca { i64, i32 }, align 4
  %119 = alloca %struct.GridIndex, align 4
  %120 = alloca { i64, i32 }, align 4
  %121 = alloca %"class.vmath::vec3", align 4
  %122 = alloca %"class.vmath::vec3", align 4
  %123 = alloca %"class.vmath::vec3", align 4
  %124 = alloca %struct.GridIndex, align 4
  %125 = alloca { i64, i32 }, align 4
  %126 = alloca %struct.GridIndex, align 4
  %127 = alloca { i64, i32 }, align 4
  %128 = alloca %struct.GridIndex, align 4
  %129 = alloca { i64, i32 }, align 4
  %130 = alloca %"class.vmath::vec3", align 4
  %131 = alloca %"class.vmath::vec3", align 4
  %132 = alloca %"class.vmath::vec3", align 4
  %133 = alloca %struct.GridIndex, align 4
  %134 = alloca { i64, i32 }, align 4
  %135 = alloca %struct.GridIndex, align 4
  %136 = alloca { i64, i32 }, align 4
  %137 = getelementptr inbounds { i64, i32 }, ptr %9, i32 0, i32 0
  store i64 %1, ptr %137, align 4
  %138 = getelementptr inbounds { i64, i32 }, ptr %9, i32 0, i32 1
  store i32 %2, ptr %138, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %9, i64 12, i1 false)
  store ptr %0, ptr %10, align 8, !tbaa !5
  store i32 %3, ptr %11, align 4, !tbaa !9
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  %139 = load ptr, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 96, ptr %15) #7
  %140 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i32 0, i32 0
  %141 = getelementptr inbounds %struct.GridIndex, ptr %140, i64 8
  br label %142

142:                                              ; preds = %142, %7
  %143 = phi ptr [ %140, %7 ], [ %144, %142 ]
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %143)
  %144 = getelementptr inbounds %struct.GridIndex, ptr %143, i64 1
  %145 = icmp eq ptr %144, %141
  br i1 %145, label %146, label %142

146:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 64, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 96, ptr %17) #7
  %147 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i32 0, i32 0
  %148 = getelementptr inbounds %"class.vmath::vec3", ptr %147, i64 8
  br label %149

149:                                              ; preds = %151, %146
  %150 = phi ptr [ %147, %146 ], [ %152, %151 ]
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %150)
          to label %151 unwind label %166

151:                                              ; preds = %149
  %152 = getelementptr inbounds %"class.vmath::vec3", ptr %150, i64 1
  %153 = icmp eq ptr %152, %148
  br i1 %153, label %154, label %149

154:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #7
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %20)
          to label %155 unwind label %176

155:                                              ; preds = %154
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %8, i64 12, i1 false), !tbaa.struct !11
  %156 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %21, i64 12, i1 false)
  %157 = getelementptr inbounds { i64, i32 }, ptr %22, i32 0, i32 0
  %158 = load i64, ptr %157, align 4
  %159 = getelementptr inbounds { i64, i32 }, ptr %22, i32 0, i32 1
  %160 = load i32, ptr %159, align 4
  invoke void @_ZN6Grid3d20getGridIndexVerticesE9GridIndexPS0_(i64 %158, i32 %160, ptr noundef %156)
          to label %161 unwind label %180

161:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %162

162:                                              ; preds = %210, %161
  %163 = load i32, ptr %23, align 4, !tbaa !9
  %164 = icmp slt i32 %163, 8
  br i1 %164, label %184, label %165

165:                                              ; preds = %162
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %222

166:                                              ; preds = %149
  %167 = landingpad { ptr, i32 }
          cleanup
  %168 = extractvalue { ptr, i32 } %167, 0
  store ptr %168, ptr %18, align 8
  %169 = extractvalue { ptr, i32 } %167, 1
  store i32 %169, ptr %19, align 4
  %170 = icmp eq ptr %147, %150
  br i1 %170, label %175, label %171

171:                                              ; preds = %171, %166
  %172 = phi ptr [ %150, %166 ], [ %173, %171 ]
  %173 = getelementptr inbounds %"class.vmath::vec3", ptr %172, i64 -1
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %173) #7
  %174 = icmp eq ptr %173, %147
  br i1 %174, label %175, label %171

175:                                              ; preds = %171, %166
  br label %911

176:                                              ; preds = %154
  %177 = landingpad { ptr, i32 }
          cleanup
  %178 = extractvalue { ptr, i32 } %177, 0
  store ptr %178, ptr %18, align 8
  %179 = extractvalue { ptr, i32 } %177, 1
  store i32 %179, ptr %19, align 4
  br label %903

180:                                              ; preds = %882, %865, %863, %845, %826, %809, %807, %789, %770, %753, %751, %733, %714, %697, %695, %677, %658, %641, %639, %621, %602, %585, %583, %565, %546, %529, %527, %509, %490, %473, %471, %453, %434, %417, %415, %397, %378, %361, %359, %341, %322, %305, %303, %285, %266, %249, %247, %229, %155
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %18, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %19, align 4
  br label %902

184:                                              ; preds = %162
  %185 = getelementptr inbounds %class.Polygonizer3d, ptr %139, i32 0, i32 6
  %186 = load ptr, ptr %185, align 8, !tbaa !12
  %187 = load i32, ptr %23, align 4, !tbaa !9
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 %188
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %189, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 %24, i64 12, i1 false)
  %190 = getelementptr inbounds { i64, i32 }, ptr %25, i32 0, i32 0
  %191 = load i64, ptr %190, align 4
  %192 = getelementptr inbounds { i64, i32 }, ptr %25, i32 0, i32 1
  %193 = load i32, ptr %192, align 4
  %194 = invoke noundef double @_ZN11ScalarField19getScalarFieldValueE9GridIndex(ptr noundef nonnull align 8 dereferenceable(248) %186, i64 %191, i32 %193)
          to label %195 unwind label %213

195:                                              ; preds = %184
  %196 = load i32, ptr %23, align 4, !tbaa !9
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 %197
  store double %194, ptr %198, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 12, ptr %26) #7
  %199 = load i32, ptr %23, align 4, !tbaa !9
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 %200
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 4 %201, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 %27, i64 12, i1 false)
  %202 = getelementptr inbounds { i64, i32 }, ptr %28, i32 0, i32 0
  %203 = load i64, ptr %202, align 4
  %204 = getelementptr inbounds { i64, i32 }, ptr %28, i32 0, i32 1
  %205 = load i32, ptr %204, align 4
  invoke void @_ZN13Polygonizer3d18_getVertexPositionE9GridIndex(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %26, ptr noundef nonnull align 8 dereferenceable(57) %139, i64 %203, i32 %205)
          to label %206 unwind label %217

206:                                              ; preds = %195
  %207 = load i32, ptr %23, align 4, !tbaa !9
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 %208
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %209, ptr align 4 %26, i64 12, i1 false), !tbaa.struct !17
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %26) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #7
  br label %210

210:                                              ; preds = %206
  %211 = load i32, ptr %23, align 4, !tbaa !9
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr %23, align 4, !tbaa !9
  br label %162, !llvm.loop !20

213:                                              ; preds = %184
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %18, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %19, align 4
  br label %221

217:                                              ; preds = %195
  %218 = landingpad { ptr, i32 }
          cleanup
  %219 = extractvalue { ptr, i32 } %218, 0
  store ptr %219, ptr %18, align 8
  %220 = extractvalue { ptr, i32 } %218, 1
  store i32 %220, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #7
  br label %221

221:                                              ; preds = %217, %213
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %902

222:                                              ; preds = %165
  %223 = load i32, ptr %11, align 4, !tbaa !9
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [256 x i32], ptr @_ZN13Polygonizer3d10_edgeTableE, i64 0, i64 %224
  %226 = load i32, ptr %225, align 4, !tbaa !9
  %227 = and i32 %226, 1
  %228 = icmp ne i32 %227, 0
  br i1 %228, label %229, label %278

229:                                              ; preds = %222
  %230 = load ptr, ptr %12, align 8, !tbaa !5
  %231 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %230, i32 0, i32 0
  %232 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 16 %232, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 4 %29, i64 12, i1 false)
  %233 = getelementptr inbounds { i64, i32 }, ptr %30, i32 0, i32 0
  %234 = load i64, ptr %233, align 4
  %235 = getelementptr inbounds { i64, i32 }, ptr %30, i32 0, i32 1
  %236 = load i32, ptr %235, align 4
  %237 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %231, i64 %234, i32 %236)
          to label %238 unwind label %180

238:                                              ; preds = %229
  %239 = icmp eq i32 %237, -1
  br i1 %239, label %240, label %266

240:                                              ; preds = %238
  call void @llvm.lifetime.start.p0(i64 12, ptr %31) #7
  %241 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 16 %241, i64 12, i1 false), !tbaa.struct !17
  %242 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 4 %242, i64 12, i1 false), !tbaa.struct !17
  %243 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 0
  %244 = load double, ptr %243, align 16, !tbaa !16
  %245 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 1
  %246 = load double, ptr %245, align 8, !tbaa !16
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %31, ptr noundef nonnull align 8 dereferenceable(57) %139, ptr noundef %32, ptr noundef %33, double noundef %244, double noundef %246)
          to label %247 unwind label %262

247:                                              ; preds = %240
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %31, i64 12, i1 false), !tbaa.struct !17
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %31) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %33) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %32) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #7
  %248 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %248, ptr noundef nonnull align 4 dereferenceable(12) %20)
          to label %249 unwind label %180

249:                                              ; preds = %247
  %250 = load ptr, ptr %12, align 8, !tbaa !5
  %251 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %250, i32 0, i32 0
  %252 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 16 %252, i64 12, i1 false), !tbaa.struct !11
  %253 = load ptr, ptr %13, align 8, !tbaa !5
  %254 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %253) #7
  %255 = trunc i64 %254 to i32
  %256 = sub nsw i32 %255, 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 4 %34, i64 12, i1 false)
  %257 = getelementptr inbounds { i64, i32 }, ptr %35, i32 0, i32 0
  %258 = load i64, ptr %257, align 4
  %259 = getelementptr inbounds { i64, i32 }, ptr %35, i32 0, i32 1
  %260 = load i32, ptr %259, align 4
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %251, i64 %258, i32 %260, i32 noundef %256)
          to label %261 unwind label %180

261:                                              ; preds = %249
  br label %266

262:                                              ; preds = %240
  %263 = landingpad { ptr, i32 }
          cleanup
  %264 = extractvalue { ptr, i32 } %263, 0
  store ptr %264, ptr %18, align 8
  %265 = extractvalue { ptr, i32 } %263, 1
  store i32 %265, ptr %19, align 4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %33) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %32) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #7
  br label %902

266:                                              ; preds = %261, %238
  %267 = load ptr, ptr %12, align 8, !tbaa !5
  %268 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %267, i32 0, i32 0
  %269 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 16 %269, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %36, i64 12, i1 false)
  %270 = getelementptr inbounds { i64, i32 }, ptr %37, i32 0, i32 0
  %271 = load i64, ptr %270, align 4
  %272 = getelementptr inbounds { i64, i32 }, ptr %37, i32 0, i32 1
  %273 = load i32, ptr %272, align 4
  %274 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %268, i64 %271, i32 %273)
          to label %275 unwind label %180

275:                                              ; preds = %266
  %276 = load ptr, ptr %14, align 8, !tbaa !5
  %277 = getelementptr inbounds i32, ptr %276, i64 0
  store i32 %274, ptr %277, align 4, !tbaa !9
  br label %278

278:                                              ; preds = %275, %222
  %279 = load i32, ptr %11, align 4, !tbaa !9
  %280 = sext i32 %279 to i64
  %281 = getelementptr inbounds [256 x i32], ptr @_ZN13Polygonizer3d10_edgeTableE, i64 0, i64 %280
  %282 = load i32, ptr %281, align 4, !tbaa !9
  %283 = and i32 %282, 2
  %284 = icmp ne i32 %283, 0
  br i1 %284, label %285, label %334

285:                                              ; preds = %278
  %286 = load ptr, ptr %12, align 8, !tbaa !5
  %287 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %286, i32 0, i32 2
  %288 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %38, ptr align 4 %288, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %39, ptr align 4 %38, i64 12, i1 false)
  %289 = getelementptr inbounds { i64, i32 }, ptr %39, i32 0, i32 0
  %290 = load i64, ptr %289, align 4
  %291 = getelementptr inbounds { i64, i32 }, ptr %39, i32 0, i32 1
  %292 = load i32, ptr %291, align 4
  %293 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %287, i64 %290, i32 %292)
          to label %294 unwind label %180

294:                                              ; preds = %285
  %295 = icmp eq i32 %293, -1
  br i1 %295, label %296, label %322

296:                                              ; preds = %294
  call void @llvm.lifetime.start.p0(i64 12, ptr %40) #7
  %297 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %41, ptr align 4 %297, i64 12, i1 false), !tbaa.struct !17
  %298 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %42, ptr align 8 %298, i64 12, i1 false), !tbaa.struct !17
  %299 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 1
  %300 = load double, ptr %299, align 8, !tbaa !16
  %301 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 2
  %302 = load double, ptr %301, align 16, !tbaa !16
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %40, ptr noundef nonnull align 8 dereferenceable(57) %139, ptr noundef %41, ptr noundef %42, double noundef %300, double noundef %302)
          to label %303 unwind label %318

303:                                              ; preds = %296
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %40, i64 12, i1 false), !tbaa.struct !17
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %40) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %42) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %41) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %40) #7
  %304 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %304, ptr noundef nonnull align 4 dereferenceable(12) %20)
          to label %305 unwind label %180

305:                                              ; preds = %303
  %306 = load ptr, ptr %12, align 8, !tbaa !5
  %307 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %306, i32 0, i32 2
  %308 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %43, ptr align 4 %308, i64 12, i1 false), !tbaa.struct !11
  %309 = load ptr, ptr %13, align 8, !tbaa !5
  %310 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %309) #7
  %311 = trunc i64 %310 to i32
  %312 = sub nsw i32 %311, 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %44, ptr align 4 %43, i64 12, i1 false)
  %313 = getelementptr inbounds { i64, i32 }, ptr %44, i32 0, i32 0
  %314 = load i64, ptr %313, align 4
  %315 = getelementptr inbounds { i64, i32 }, ptr %44, i32 0, i32 1
  %316 = load i32, ptr %315, align 4
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %307, i64 %314, i32 %316, i32 noundef %312)
          to label %317 unwind label %180

317:                                              ; preds = %305
  br label %322

318:                                              ; preds = %296
  %319 = landingpad { ptr, i32 }
          cleanup
  %320 = extractvalue { ptr, i32 } %319, 0
  store ptr %320, ptr %18, align 8
  %321 = extractvalue { ptr, i32 } %319, 1
  store i32 %321, ptr %19, align 4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %42) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %41) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %40) #7
  br label %902

322:                                              ; preds = %317, %294
  %323 = load ptr, ptr %12, align 8, !tbaa !5
  %324 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %323, i32 0, i32 2
  %325 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %45, ptr align 4 %325, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %46, ptr align 4 %45, i64 12, i1 false)
  %326 = getelementptr inbounds { i64, i32 }, ptr %46, i32 0, i32 0
  %327 = load i64, ptr %326, align 4
  %328 = getelementptr inbounds { i64, i32 }, ptr %46, i32 0, i32 1
  %329 = load i32, ptr %328, align 4
  %330 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %324, i64 %327, i32 %329)
          to label %331 unwind label %180

331:                                              ; preds = %322
  %332 = load ptr, ptr %14, align 8, !tbaa !5
  %333 = getelementptr inbounds i32, ptr %332, i64 1
  store i32 %330, ptr %333, align 4, !tbaa !9
  br label %334

334:                                              ; preds = %331, %278
  %335 = load i32, ptr %11, align 4, !tbaa !9
  %336 = sext i32 %335 to i64
  %337 = getelementptr inbounds [256 x i32], ptr @_ZN13Polygonizer3d10_edgeTableE, i64 0, i64 %336
  %338 = load i32, ptr %337, align 4, !tbaa !9
  %339 = and i32 %338, 4
  %340 = icmp ne i32 %339, 0
  br i1 %340, label %341, label %390

341:                                              ; preds = %334
  %342 = load ptr, ptr %12, align 8, !tbaa !5
  %343 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %342, i32 0, i32 0
  %344 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %47, ptr align 4 %344, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %48, ptr align 4 %47, i64 12, i1 false)
  %345 = getelementptr inbounds { i64, i32 }, ptr %48, i32 0, i32 0
  %346 = load i64, ptr %345, align 4
  %347 = getelementptr inbounds { i64, i32 }, ptr %48, i32 0, i32 1
  %348 = load i32, ptr %347, align 4
  %349 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %343, i64 %346, i32 %348)
          to label %350 unwind label %180

350:                                              ; preds = %341
  %351 = icmp eq i32 %349, -1
  br i1 %351, label %352, label %378

352:                                              ; preds = %350
  call void @llvm.lifetime.start.p0(i64 12, ptr %49) #7
  %353 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %50, ptr align 8 %353, i64 12, i1 false), !tbaa.struct !17
  %354 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %51, ptr align 4 %354, i64 12, i1 false), !tbaa.struct !17
  %355 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 2
  %356 = load double, ptr %355, align 16, !tbaa !16
  %357 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 3
  %358 = load double, ptr %357, align 8, !tbaa !16
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %49, ptr noundef nonnull align 8 dereferenceable(57) %139, ptr noundef %50, ptr noundef %51, double noundef %356, double noundef %358)
          to label %359 unwind label %374

359:                                              ; preds = %352
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %49, i64 12, i1 false), !tbaa.struct !17
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %49) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %51) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %50) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %49) #7
  %360 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %360, ptr noundef nonnull align 4 dereferenceable(12) %20)
          to label %361 unwind label %180

361:                                              ; preds = %359
  %362 = load ptr, ptr %12, align 8, !tbaa !5
  %363 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %362, i32 0, i32 0
  %364 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %52, ptr align 4 %364, i64 12, i1 false), !tbaa.struct !11
  %365 = load ptr, ptr %13, align 8, !tbaa !5
  %366 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %365) #7
  %367 = trunc i64 %366 to i32
  %368 = sub nsw i32 %367, 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %53, ptr align 4 %52, i64 12, i1 false)
  %369 = getelementptr inbounds { i64, i32 }, ptr %53, i32 0, i32 0
  %370 = load i64, ptr %369, align 4
  %371 = getelementptr inbounds { i64, i32 }, ptr %53, i32 0, i32 1
  %372 = load i32, ptr %371, align 4
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %363, i64 %370, i32 %372, i32 noundef %368)
          to label %373 unwind label %180

373:                                              ; preds = %361
  br label %378

374:                                              ; preds = %352
  %375 = landingpad { ptr, i32 }
          cleanup
  %376 = extractvalue { ptr, i32 } %375, 0
  store ptr %376, ptr %18, align 8
  %377 = extractvalue { ptr, i32 } %375, 1
  store i32 %377, ptr %19, align 4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %51) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %50) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %49) #7
  br label %902

378:                                              ; preds = %373, %350
  %379 = load ptr, ptr %12, align 8, !tbaa !5
  %380 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %379, i32 0, i32 0
  %381 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %54, ptr align 4 %381, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %55, ptr align 4 %54, i64 12, i1 false)
  %382 = getelementptr inbounds { i64, i32 }, ptr %55, i32 0, i32 0
  %383 = load i64, ptr %382, align 4
  %384 = getelementptr inbounds { i64, i32 }, ptr %55, i32 0, i32 1
  %385 = load i32, ptr %384, align 4
  %386 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %380, i64 %383, i32 %385)
          to label %387 unwind label %180

387:                                              ; preds = %378
  %388 = load ptr, ptr %14, align 8, !tbaa !5
  %389 = getelementptr inbounds i32, ptr %388, i64 2
  store i32 %386, ptr %389, align 4, !tbaa !9
  br label %390

390:                                              ; preds = %387, %334
  %391 = load i32, ptr %11, align 4, !tbaa !9
  %392 = sext i32 %391 to i64
  %393 = getelementptr inbounds [256 x i32], ptr @_ZN13Polygonizer3d10_edgeTableE, i64 0, i64 %392
  %394 = load i32, ptr %393, align 4, !tbaa !9
  %395 = and i32 %394, 8
  %396 = icmp ne i32 %395, 0
  br i1 %396, label %397, label %446

397:                                              ; preds = %390
  %398 = load ptr, ptr %12, align 8, !tbaa !5
  %399 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %398, i32 0, i32 2
  %400 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %56, ptr align 16 %400, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %57, ptr align 4 %56, i64 12, i1 false)
  %401 = getelementptr inbounds { i64, i32 }, ptr %57, i32 0, i32 0
  %402 = load i64, ptr %401, align 4
  %403 = getelementptr inbounds { i64, i32 }, ptr %57, i32 0, i32 1
  %404 = load i32, ptr %403, align 4
  %405 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %399, i64 %402, i32 %404)
          to label %406 unwind label %180

406:                                              ; preds = %397
  %407 = icmp eq i32 %405, -1
  br i1 %407, label %408, label %434

408:                                              ; preds = %406
  call void @llvm.lifetime.start.p0(i64 12, ptr %58) #7
  %409 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %59, ptr align 4 %409, i64 12, i1 false), !tbaa.struct !17
  %410 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %60, ptr align 16 %410, i64 12, i1 false), !tbaa.struct !17
  %411 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 3
  %412 = load double, ptr %411, align 8, !tbaa !16
  %413 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 0
  %414 = load double, ptr %413, align 16, !tbaa !16
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %58, ptr noundef nonnull align 8 dereferenceable(57) %139, ptr noundef %59, ptr noundef %60, double noundef %412, double noundef %414)
          to label %415 unwind label %430

415:                                              ; preds = %408
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %58, i64 12, i1 false), !tbaa.struct !17
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %58) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %60) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %59) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %58) #7
  %416 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %416, ptr noundef nonnull align 4 dereferenceable(12) %20)
          to label %417 unwind label %180

417:                                              ; preds = %415
  %418 = load ptr, ptr %12, align 8, !tbaa !5
  %419 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %418, i32 0, i32 2
  %420 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %61, ptr align 16 %420, i64 12, i1 false), !tbaa.struct !11
  %421 = load ptr, ptr %13, align 8, !tbaa !5
  %422 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %421) #7
  %423 = trunc i64 %422 to i32
  %424 = sub nsw i32 %423, 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %62, ptr align 4 %61, i64 12, i1 false)
  %425 = getelementptr inbounds { i64, i32 }, ptr %62, i32 0, i32 0
  %426 = load i64, ptr %425, align 4
  %427 = getelementptr inbounds { i64, i32 }, ptr %62, i32 0, i32 1
  %428 = load i32, ptr %427, align 4
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %419, i64 %426, i32 %428, i32 noundef %424)
          to label %429 unwind label %180

429:                                              ; preds = %417
  br label %434

430:                                              ; preds = %408
  %431 = landingpad { ptr, i32 }
          cleanup
  %432 = extractvalue { ptr, i32 } %431, 0
  store ptr %432, ptr %18, align 8
  %433 = extractvalue { ptr, i32 } %431, 1
  store i32 %433, ptr %19, align 4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %60) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %59) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %58) #7
  br label %902

434:                                              ; preds = %429, %406
  %435 = load ptr, ptr %12, align 8, !tbaa !5
  %436 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %435, i32 0, i32 2
  %437 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %63, ptr align 16 %437, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %64, ptr align 4 %63, i64 12, i1 false)
  %438 = getelementptr inbounds { i64, i32 }, ptr %64, i32 0, i32 0
  %439 = load i64, ptr %438, align 4
  %440 = getelementptr inbounds { i64, i32 }, ptr %64, i32 0, i32 1
  %441 = load i32, ptr %440, align 4
  %442 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %436, i64 %439, i32 %441)
          to label %443 unwind label %180

443:                                              ; preds = %434
  %444 = load ptr, ptr %14, align 8, !tbaa !5
  %445 = getelementptr inbounds i32, ptr %444, i64 3
  store i32 %442, ptr %445, align 4, !tbaa !9
  br label %446

446:                                              ; preds = %443, %390
  %447 = load i32, ptr %11, align 4, !tbaa !9
  %448 = sext i32 %447 to i64
  %449 = getelementptr inbounds [256 x i32], ptr @_ZN13Polygonizer3d10_edgeTableE, i64 0, i64 %448
  %450 = load i32, ptr %449, align 4, !tbaa !9
  %451 = and i32 %450, 16
  %452 = icmp ne i32 %451, 0
  br i1 %452, label %453, label %502

453:                                              ; preds = %446
  %454 = load ptr, ptr %12, align 8, !tbaa !5
  %455 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %454, i32 0, i32 0
  %456 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %65, ptr align 16 %456, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %66, ptr align 4 %65, i64 12, i1 false)
  %457 = getelementptr inbounds { i64, i32 }, ptr %66, i32 0, i32 0
  %458 = load i64, ptr %457, align 4
  %459 = getelementptr inbounds { i64, i32 }, ptr %66, i32 0, i32 1
  %460 = load i32, ptr %459, align 4
  %461 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %455, i64 %458, i32 %460)
          to label %462 unwind label %180

462:                                              ; preds = %453
  %463 = icmp eq i32 %461, -1
  br i1 %463, label %464, label %490

464:                                              ; preds = %462
  call void @llvm.lifetime.start.p0(i64 12, ptr %67) #7
  %465 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %68, ptr align 16 %465, i64 12, i1 false), !tbaa.struct !17
  %466 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %69, ptr align 4 %466, i64 12, i1 false), !tbaa.struct !17
  %467 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 4
  %468 = load double, ptr %467, align 16, !tbaa !16
  %469 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 5
  %470 = load double, ptr %469, align 8, !tbaa !16
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %67, ptr noundef nonnull align 8 dereferenceable(57) %139, ptr noundef %68, ptr noundef %69, double noundef %468, double noundef %470)
          to label %471 unwind label %486

471:                                              ; preds = %464
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %67, i64 12, i1 false), !tbaa.struct !17
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %67) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %69) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %68) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %67) #7
  %472 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %472, ptr noundef nonnull align 4 dereferenceable(12) %20)
          to label %473 unwind label %180

473:                                              ; preds = %471
  %474 = load ptr, ptr %12, align 8, !tbaa !5
  %475 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %474, i32 0, i32 0
  %476 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %70, ptr align 16 %476, i64 12, i1 false), !tbaa.struct !11
  %477 = load ptr, ptr %13, align 8, !tbaa !5
  %478 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %477) #7
  %479 = trunc i64 %478 to i32
  %480 = sub nsw i32 %479, 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %71, ptr align 4 %70, i64 12, i1 false)
  %481 = getelementptr inbounds { i64, i32 }, ptr %71, i32 0, i32 0
  %482 = load i64, ptr %481, align 4
  %483 = getelementptr inbounds { i64, i32 }, ptr %71, i32 0, i32 1
  %484 = load i32, ptr %483, align 4
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %475, i64 %482, i32 %484, i32 noundef %480)
          to label %485 unwind label %180

485:                                              ; preds = %473
  br label %490

486:                                              ; preds = %464
  %487 = landingpad { ptr, i32 }
          cleanup
  %488 = extractvalue { ptr, i32 } %487, 0
  store ptr %488, ptr %18, align 8
  %489 = extractvalue { ptr, i32 } %487, 1
  store i32 %489, ptr %19, align 4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %69) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %68) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %67) #7
  br label %902

490:                                              ; preds = %485, %462
  %491 = load ptr, ptr %12, align 8, !tbaa !5
  %492 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %491, i32 0, i32 0
  %493 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %72, ptr align 16 %493, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %73, ptr align 4 %72, i64 12, i1 false)
  %494 = getelementptr inbounds { i64, i32 }, ptr %73, i32 0, i32 0
  %495 = load i64, ptr %494, align 4
  %496 = getelementptr inbounds { i64, i32 }, ptr %73, i32 0, i32 1
  %497 = load i32, ptr %496, align 4
  %498 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %492, i64 %495, i32 %497)
          to label %499 unwind label %180

499:                                              ; preds = %490
  %500 = load ptr, ptr %14, align 8, !tbaa !5
  %501 = getelementptr inbounds i32, ptr %500, i64 4
  store i32 %498, ptr %501, align 4, !tbaa !9
  br label %502

502:                                              ; preds = %499, %446
  %503 = load i32, ptr %11, align 4, !tbaa !9
  %504 = sext i32 %503 to i64
  %505 = getelementptr inbounds [256 x i32], ptr @_ZN13Polygonizer3d10_edgeTableE, i64 0, i64 %504
  %506 = load i32, ptr %505, align 4, !tbaa !9
  %507 = and i32 %506, 32
  %508 = icmp ne i32 %507, 0
  br i1 %508, label %509, label %558

509:                                              ; preds = %502
  %510 = load ptr, ptr %12, align 8, !tbaa !5
  %511 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %510, i32 0, i32 2
  %512 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %74, ptr align 4 %512, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %75, ptr align 4 %74, i64 12, i1 false)
  %513 = getelementptr inbounds { i64, i32 }, ptr %75, i32 0, i32 0
  %514 = load i64, ptr %513, align 4
  %515 = getelementptr inbounds { i64, i32 }, ptr %75, i32 0, i32 1
  %516 = load i32, ptr %515, align 4
  %517 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %511, i64 %514, i32 %516)
          to label %518 unwind label %180

518:                                              ; preds = %509
  %519 = icmp eq i32 %517, -1
  br i1 %519, label %520, label %546

520:                                              ; preds = %518
  call void @llvm.lifetime.start.p0(i64 12, ptr %76) #7
  %521 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %77, ptr align 4 %521, i64 12, i1 false), !tbaa.struct !17
  %522 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %78, ptr align 8 %522, i64 12, i1 false), !tbaa.struct !17
  %523 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 5
  %524 = load double, ptr %523, align 8, !tbaa !16
  %525 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 6
  %526 = load double, ptr %525, align 16, !tbaa !16
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %76, ptr noundef nonnull align 8 dereferenceable(57) %139, ptr noundef %77, ptr noundef %78, double noundef %524, double noundef %526)
          to label %527 unwind label %542

527:                                              ; preds = %520
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %76, i64 12, i1 false), !tbaa.struct !17
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %76) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %78) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %77) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %76) #7
  %528 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %528, ptr noundef nonnull align 4 dereferenceable(12) %20)
          to label %529 unwind label %180

529:                                              ; preds = %527
  %530 = load ptr, ptr %12, align 8, !tbaa !5
  %531 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %530, i32 0, i32 2
  %532 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %79, ptr align 4 %532, i64 12, i1 false), !tbaa.struct !11
  %533 = load ptr, ptr %13, align 8, !tbaa !5
  %534 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %533) #7
  %535 = trunc i64 %534 to i32
  %536 = sub nsw i32 %535, 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %80, ptr align 4 %79, i64 12, i1 false)
  %537 = getelementptr inbounds { i64, i32 }, ptr %80, i32 0, i32 0
  %538 = load i64, ptr %537, align 4
  %539 = getelementptr inbounds { i64, i32 }, ptr %80, i32 0, i32 1
  %540 = load i32, ptr %539, align 4
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %531, i64 %538, i32 %540, i32 noundef %536)
          to label %541 unwind label %180

541:                                              ; preds = %529
  br label %546

542:                                              ; preds = %520
  %543 = landingpad { ptr, i32 }
          cleanup
  %544 = extractvalue { ptr, i32 } %543, 0
  store ptr %544, ptr %18, align 8
  %545 = extractvalue { ptr, i32 } %543, 1
  store i32 %545, ptr %19, align 4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %78) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %77) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %76) #7
  br label %902

546:                                              ; preds = %541, %518
  %547 = load ptr, ptr %12, align 8, !tbaa !5
  %548 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %547, i32 0, i32 2
  %549 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %81, ptr align 4 %549, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %82, ptr align 4 %81, i64 12, i1 false)
  %550 = getelementptr inbounds { i64, i32 }, ptr %82, i32 0, i32 0
  %551 = load i64, ptr %550, align 4
  %552 = getelementptr inbounds { i64, i32 }, ptr %82, i32 0, i32 1
  %553 = load i32, ptr %552, align 4
  %554 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %548, i64 %551, i32 %553)
          to label %555 unwind label %180

555:                                              ; preds = %546
  %556 = load ptr, ptr %14, align 8, !tbaa !5
  %557 = getelementptr inbounds i32, ptr %556, i64 5
  store i32 %554, ptr %557, align 4, !tbaa !9
  br label %558

558:                                              ; preds = %555, %502
  %559 = load i32, ptr %11, align 4, !tbaa !9
  %560 = sext i32 %559 to i64
  %561 = getelementptr inbounds [256 x i32], ptr @_ZN13Polygonizer3d10_edgeTableE, i64 0, i64 %560
  %562 = load i32, ptr %561, align 4, !tbaa !9
  %563 = and i32 %562, 64
  %564 = icmp ne i32 %563, 0
  br i1 %564, label %565, label %614

565:                                              ; preds = %558
  %566 = load ptr, ptr %12, align 8, !tbaa !5
  %567 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %566, i32 0, i32 0
  %568 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %83, ptr align 4 %568, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %84, ptr align 4 %83, i64 12, i1 false)
  %569 = getelementptr inbounds { i64, i32 }, ptr %84, i32 0, i32 0
  %570 = load i64, ptr %569, align 4
  %571 = getelementptr inbounds { i64, i32 }, ptr %84, i32 0, i32 1
  %572 = load i32, ptr %571, align 4
  %573 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %567, i64 %570, i32 %572)
          to label %574 unwind label %180

574:                                              ; preds = %565
  %575 = icmp eq i32 %573, -1
  br i1 %575, label %576, label %602

576:                                              ; preds = %574
  call void @llvm.lifetime.start.p0(i64 12, ptr %85) #7
  %577 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %86, ptr align 8 %577, i64 12, i1 false), !tbaa.struct !17
  %578 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %87, ptr align 4 %578, i64 12, i1 false), !tbaa.struct !17
  %579 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 6
  %580 = load double, ptr %579, align 16, !tbaa !16
  %581 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 7
  %582 = load double, ptr %581, align 8, !tbaa !16
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %85, ptr noundef nonnull align 8 dereferenceable(57) %139, ptr noundef %86, ptr noundef %87, double noundef %580, double noundef %582)
          to label %583 unwind label %598

583:                                              ; preds = %576
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %85, i64 12, i1 false), !tbaa.struct !17
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %85) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %87) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %86) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %85) #7
  %584 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %584, ptr noundef nonnull align 4 dereferenceable(12) %20)
          to label %585 unwind label %180

585:                                              ; preds = %583
  %586 = load ptr, ptr %12, align 8, !tbaa !5
  %587 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %586, i32 0, i32 0
  %588 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %88, ptr align 4 %588, i64 12, i1 false), !tbaa.struct !11
  %589 = load ptr, ptr %13, align 8, !tbaa !5
  %590 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %589) #7
  %591 = trunc i64 %590 to i32
  %592 = sub nsw i32 %591, 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %89, ptr align 4 %88, i64 12, i1 false)
  %593 = getelementptr inbounds { i64, i32 }, ptr %89, i32 0, i32 0
  %594 = load i64, ptr %593, align 4
  %595 = getelementptr inbounds { i64, i32 }, ptr %89, i32 0, i32 1
  %596 = load i32, ptr %595, align 4
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %587, i64 %594, i32 %596, i32 noundef %592)
          to label %597 unwind label %180

597:                                              ; preds = %585
  br label %602

598:                                              ; preds = %576
  %599 = landingpad { ptr, i32 }
          cleanup
  %600 = extractvalue { ptr, i32 } %599, 0
  store ptr %600, ptr %18, align 8
  %601 = extractvalue { ptr, i32 } %599, 1
  store i32 %601, ptr %19, align 4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %87) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %86) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %85) #7
  br label %902

602:                                              ; preds = %597, %574
  %603 = load ptr, ptr %12, align 8, !tbaa !5
  %604 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %603, i32 0, i32 0
  %605 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %90, ptr align 4 %605, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %91, ptr align 4 %90, i64 12, i1 false)
  %606 = getelementptr inbounds { i64, i32 }, ptr %91, i32 0, i32 0
  %607 = load i64, ptr %606, align 4
  %608 = getelementptr inbounds { i64, i32 }, ptr %91, i32 0, i32 1
  %609 = load i32, ptr %608, align 4
  %610 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %604, i64 %607, i32 %609)
          to label %611 unwind label %180

611:                                              ; preds = %602
  %612 = load ptr, ptr %14, align 8, !tbaa !5
  %613 = getelementptr inbounds i32, ptr %612, i64 6
  store i32 %610, ptr %613, align 4, !tbaa !9
  br label %614

614:                                              ; preds = %611, %558
  %615 = load i32, ptr %11, align 4, !tbaa !9
  %616 = sext i32 %615 to i64
  %617 = getelementptr inbounds [256 x i32], ptr @_ZN13Polygonizer3d10_edgeTableE, i64 0, i64 %616
  %618 = load i32, ptr %617, align 4, !tbaa !9
  %619 = and i32 %618, 128
  %620 = icmp ne i32 %619, 0
  br i1 %620, label %621, label %670

621:                                              ; preds = %614
  %622 = load ptr, ptr %12, align 8, !tbaa !5
  %623 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %622, i32 0, i32 2
  %624 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %92, ptr align 16 %624, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %93, ptr align 4 %92, i64 12, i1 false)
  %625 = getelementptr inbounds { i64, i32 }, ptr %93, i32 0, i32 0
  %626 = load i64, ptr %625, align 4
  %627 = getelementptr inbounds { i64, i32 }, ptr %93, i32 0, i32 1
  %628 = load i32, ptr %627, align 4
  %629 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %623, i64 %626, i32 %628)
          to label %630 unwind label %180

630:                                              ; preds = %621
  %631 = icmp eq i32 %629, -1
  br i1 %631, label %632, label %658

632:                                              ; preds = %630
  call void @llvm.lifetime.start.p0(i64 12, ptr %94) #7
  %633 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %95, ptr align 4 %633, i64 12, i1 false), !tbaa.struct !17
  %634 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %96, ptr align 16 %634, i64 12, i1 false), !tbaa.struct !17
  %635 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 7
  %636 = load double, ptr %635, align 8, !tbaa !16
  %637 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 4
  %638 = load double, ptr %637, align 16, !tbaa !16
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %94, ptr noundef nonnull align 8 dereferenceable(57) %139, ptr noundef %95, ptr noundef %96, double noundef %636, double noundef %638)
          to label %639 unwind label %654

639:                                              ; preds = %632
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %94, i64 12, i1 false), !tbaa.struct !17
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %94) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %96) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %95) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %94) #7
  %640 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %640, ptr noundef nonnull align 4 dereferenceable(12) %20)
          to label %641 unwind label %180

641:                                              ; preds = %639
  %642 = load ptr, ptr %12, align 8, !tbaa !5
  %643 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %642, i32 0, i32 2
  %644 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %97, ptr align 16 %644, i64 12, i1 false), !tbaa.struct !11
  %645 = load ptr, ptr %13, align 8, !tbaa !5
  %646 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %645) #7
  %647 = trunc i64 %646 to i32
  %648 = sub nsw i32 %647, 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %98, ptr align 4 %97, i64 12, i1 false)
  %649 = getelementptr inbounds { i64, i32 }, ptr %98, i32 0, i32 0
  %650 = load i64, ptr %649, align 4
  %651 = getelementptr inbounds { i64, i32 }, ptr %98, i32 0, i32 1
  %652 = load i32, ptr %651, align 4
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %643, i64 %650, i32 %652, i32 noundef %648)
          to label %653 unwind label %180

653:                                              ; preds = %641
  br label %658

654:                                              ; preds = %632
  %655 = landingpad { ptr, i32 }
          cleanup
  %656 = extractvalue { ptr, i32 } %655, 0
  store ptr %656, ptr %18, align 8
  %657 = extractvalue { ptr, i32 } %655, 1
  store i32 %657, ptr %19, align 4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %96) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %95) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %94) #7
  br label %902

658:                                              ; preds = %653, %630
  %659 = load ptr, ptr %12, align 8, !tbaa !5
  %660 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %659, i32 0, i32 2
  %661 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %99, ptr align 16 %661, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %100, ptr align 4 %99, i64 12, i1 false)
  %662 = getelementptr inbounds { i64, i32 }, ptr %100, i32 0, i32 0
  %663 = load i64, ptr %662, align 4
  %664 = getelementptr inbounds { i64, i32 }, ptr %100, i32 0, i32 1
  %665 = load i32, ptr %664, align 4
  %666 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %660, i64 %663, i32 %665)
          to label %667 unwind label %180

667:                                              ; preds = %658
  %668 = load ptr, ptr %14, align 8, !tbaa !5
  %669 = getelementptr inbounds i32, ptr %668, i64 7
  store i32 %666, ptr %669, align 4, !tbaa !9
  br label %670

670:                                              ; preds = %667, %614
  %671 = load i32, ptr %11, align 4, !tbaa !9
  %672 = sext i32 %671 to i64
  %673 = getelementptr inbounds [256 x i32], ptr @_ZN13Polygonizer3d10_edgeTableE, i64 0, i64 %672
  %674 = load i32, ptr %673, align 4, !tbaa !9
  %675 = and i32 %674, 256
  %676 = icmp ne i32 %675, 0
  br i1 %676, label %677, label %726

677:                                              ; preds = %670
  %678 = load ptr, ptr %12, align 8, !tbaa !5
  %679 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %678, i32 0, i32 1
  %680 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %101, ptr align 16 %680, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %102, ptr align 4 %101, i64 12, i1 false)
  %681 = getelementptr inbounds { i64, i32 }, ptr %102, i32 0, i32 0
  %682 = load i64, ptr %681, align 4
  %683 = getelementptr inbounds { i64, i32 }, ptr %102, i32 0, i32 1
  %684 = load i32, ptr %683, align 4
  %685 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %679, i64 %682, i32 %684)
          to label %686 unwind label %180

686:                                              ; preds = %677
  %687 = icmp eq i32 %685, -1
  br i1 %687, label %688, label %714

688:                                              ; preds = %686
  call void @llvm.lifetime.start.p0(i64 12, ptr %103) #7
  %689 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %104, ptr align 16 %689, i64 12, i1 false), !tbaa.struct !17
  %690 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %105, ptr align 16 %690, i64 12, i1 false), !tbaa.struct !17
  %691 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 0
  %692 = load double, ptr %691, align 16, !tbaa !16
  %693 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 4
  %694 = load double, ptr %693, align 16, !tbaa !16
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %103, ptr noundef nonnull align 8 dereferenceable(57) %139, ptr noundef %104, ptr noundef %105, double noundef %692, double noundef %694)
          to label %695 unwind label %710

695:                                              ; preds = %688
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %103, i64 12, i1 false), !tbaa.struct !17
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %103) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %105) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %104) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %103) #7
  %696 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %696, ptr noundef nonnull align 4 dereferenceable(12) %20)
          to label %697 unwind label %180

697:                                              ; preds = %695
  %698 = load ptr, ptr %12, align 8, !tbaa !5
  %699 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %698, i32 0, i32 1
  %700 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %106, ptr align 16 %700, i64 12, i1 false), !tbaa.struct !11
  %701 = load ptr, ptr %13, align 8, !tbaa !5
  %702 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %701) #7
  %703 = trunc i64 %702 to i32
  %704 = sub nsw i32 %703, 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %107, ptr align 4 %106, i64 12, i1 false)
  %705 = getelementptr inbounds { i64, i32 }, ptr %107, i32 0, i32 0
  %706 = load i64, ptr %705, align 4
  %707 = getelementptr inbounds { i64, i32 }, ptr %107, i32 0, i32 1
  %708 = load i32, ptr %707, align 4
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %699, i64 %706, i32 %708, i32 noundef %704)
          to label %709 unwind label %180

709:                                              ; preds = %697
  br label %714

710:                                              ; preds = %688
  %711 = landingpad { ptr, i32 }
          cleanup
  %712 = extractvalue { ptr, i32 } %711, 0
  store ptr %712, ptr %18, align 8
  %713 = extractvalue { ptr, i32 } %711, 1
  store i32 %713, ptr %19, align 4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %105) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %104) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %103) #7
  br label %902

714:                                              ; preds = %709, %686
  %715 = load ptr, ptr %12, align 8, !tbaa !5
  %716 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %715, i32 0, i32 1
  %717 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %108, ptr align 16 %717, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %109, ptr align 4 %108, i64 12, i1 false)
  %718 = getelementptr inbounds { i64, i32 }, ptr %109, i32 0, i32 0
  %719 = load i64, ptr %718, align 4
  %720 = getelementptr inbounds { i64, i32 }, ptr %109, i32 0, i32 1
  %721 = load i32, ptr %720, align 4
  %722 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %716, i64 %719, i32 %721)
          to label %723 unwind label %180

723:                                              ; preds = %714
  %724 = load ptr, ptr %14, align 8, !tbaa !5
  %725 = getelementptr inbounds i32, ptr %724, i64 8
  store i32 %722, ptr %725, align 4, !tbaa !9
  br label %726

726:                                              ; preds = %723, %670
  %727 = load i32, ptr %11, align 4, !tbaa !9
  %728 = sext i32 %727 to i64
  %729 = getelementptr inbounds [256 x i32], ptr @_ZN13Polygonizer3d10_edgeTableE, i64 0, i64 %728
  %730 = load i32, ptr %729, align 4, !tbaa !9
  %731 = and i32 %730, 512
  %732 = icmp ne i32 %731, 0
  br i1 %732, label %733, label %782

733:                                              ; preds = %726
  %734 = load ptr, ptr %12, align 8, !tbaa !5
  %735 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %734, i32 0, i32 1
  %736 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %110, ptr align 4 %736, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %111, ptr align 4 %110, i64 12, i1 false)
  %737 = getelementptr inbounds { i64, i32 }, ptr %111, i32 0, i32 0
  %738 = load i64, ptr %737, align 4
  %739 = getelementptr inbounds { i64, i32 }, ptr %111, i32 0, i32 1
  %740 = load i32, ptr %739, align 4
  %741 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %735, i64 %738, i32 %740)
          to label %742 unwind label %180

742:                                              ; preds = %733
  %743 = icmp eq i32 %741, -1
  br i1 %743, label %744, label %770

744:                                              ; preds = %742
  call void @llvm.lifetime.start.p0(i64 12, ptr %112) #7
  %745 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %113, ptr align 4 %745, i64 12, i1 false), !tbaa.struct !17
  %746 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %114, ptr align 4 %746, i64 12, i1 false), !tbaa.struct !17
  %747 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 1
  %748 = load double, ptr %747, align 8, !tbaa !16
  %749 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 5
  %750 = load double, ptr %749, align 8, !tbaa !16
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %112, ptr noundef nonnull align 8 dereferenceable(57) %139, ptr noundef %113, ptr noundef %114, double noundef %748, double noundef %750)
          to label %751 unwind label %766

751:                                              ; preds = %744
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %112, i64 12, i1 false), !tbaa.struct !17
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %112) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %114) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %113) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %112) #7
  %752 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %752, ptr noundef nonnull align 4 dereferenceable(12) %20)
          to label %753 unwind label %180

753:                                              ; preds = %751
  %754 = load ptr, ptr %12, align 8, !tbaa !5
  %755 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %754, i32 0, i32 1
  %756 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %115, ptr align 4 %756, i64 12, i1 false), !tbaa.struct !11
  %757 = load ptr, ptr %13, align 8, !tbaa !5
  %758 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %757) #7
  %759 = trunc i64 %758 to i32
  %760 = sub nsw i32 %759, 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %116, ptr align 4 %115, i64 12, i1 false)
  %761 = getelementptr inbounds { i64, i32 }, ptr %116, i32 0, i32 0
  %762 = load i64, ptr %761, align 4
  %763 = getelementptr inbounds { i64, i32 }, ptr %116, i32 0, i32 1
  %764 = load i32, ptr %763, align 4
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %755, i64 %762, i32 %764, i32 noundef %760)
          to label %765 unwind label %180

765:                                              ; preds = %753
  br label %770

766:                                              ; preds = %744
  %767 = landingpad { ptr, i32 }
          cleanup
  %768 = extractvalue { ptr, i32 } %767, 0
  store ptr %768, ptr %18, align 8
  %769 = extractvalue { ptr, i32 } %767, 1
  store i32 %769, ptr %19, align 4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %114) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %113) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %112) #7
  br label %902

770:                                              ; preds = %765, %742
  %771 = load ptr, ptr %12, align 8, !tbaa !5
  %772 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %771, i32 0, i32 1
  %773 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %117, ptr align 4 %773, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %118, ptr align 4 %117, i64 12, i1 false)
  %774 = getelementptr inbounds { i64, i32 }, ptr %118, i32 0, i32 0
  %775 = load i64, ptr %774, align 4
  %776 = getelementptr inbounds { i64, i32 }, ptr %118, i32 0, i32 1
  %777 = load i32, ptr %776, align 4
  %778 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %772, i64 %775, i32 %777)
          to label %779 unwind label %180

779:                                              ; preds = %770
  %780 = load ptr, ptr %14, align 8, !tbaa !5
  %781 = getelementptr inbounds i32, ptr %780, i64 9
  store i32 %778, ptr %781, align 4, !tbaa !9
  br label %782

782:                                              ; preds = %779, %726
  %783 = load i32, ptr %11, align 4, !tbaa !9
  %784 = sext i32 %783 to i64
  %785 = getelementptr inbounds [256 x i32], ptr @_ZN13Polygonizer3d10_edgeTableE, i64 0, i64 %784
  %786 = load i32, ptr %785, align 4, !tbaa !9
  %787 = and i32 %786, 1024
  %788 = icmp ne i32 %787, 0
  br i1 %788, label %789, label %838

789:                                              ; preds = %782
  %790 = load ptr, ptr %12, align 8, !tbaa !5
  %791 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %790, i32 0, i32 1
  %792 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %119, ptr align 8 %792, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %120, ptr align 4 %119, i64 12, i1 false)
  %793 = getelementptr inbounds { i64, i32 }, ptr %120, i32 0, i32 0
  %794 = load i64, ptr %793, align 4
  %795 = getelementptr inbounds { i64, i32 }, ptr %120, i32 0, i32 1
  %796 = load i32, ptr %795, align 4
  %797 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %791, i64 %794, i32 %796)
          to label %798 unwind label %180

798:                                              ; preds = %789
  %799 = icmp eq i32 %797, -1
  br i1 %799, label %800, label %826

800:                                              ; preds = %798
  call void @llvm.lifetime.start.p0(i64 12, ptr %121) #7
  %801 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %122, ptr align 8 %801, i64 12, i1 false), !tbaa.struct !17
  %802 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %123, ptr align 8 %802, i64 12, i1 false), !tbaa.struct !17
  %803 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 2
  %804 = load double, ptr %803, align 16, !tbaa !16
  %805 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 6
  %806 = load double, ptr %805, align 16, !tbaa !16
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %121, ptr noundef nonnull align 8 dereferenceable(57) %139, ptr noundef %122, ptr noundef %123, double noundef %804, double noundef %806)
          to label %807 unwind label %822

807:                                              ; preds = %800
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %121, i64 12, i1 false), !tbaa.struct !17
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %121) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %123) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %122) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %121) #7
  %808 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %808, ptr noundef nonnull align 4 dereferenceable(12) %20)
          to label %809 unwind label %180

809:                                              ; preds = %807
  %810 = load ptr, ptr %12, align 8, !tbaa !5
  %811 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %810, i32 0, i32 1
  %812 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %124, ptr align 8 %812, i64 12, i1 false), !tbaa.struct !11
  %813 = load ptr, ptr %13, align 8, !tbaa !5
  %814 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %813) #7
  %815 = trunc i64 %814 to i32
  %816 = sub nsw i32 %815, 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %125, ptr align 4 %124, i64 12, i1 false)
  %817 = getelementptr inbounds { i64, i32 }, ptr %125, i32 0, i32 0
  %818 = load i64, ptr %817, align 4
  %819 = getelementptr inbounds { i64, i32 }, ptr %125, i32 0, i32 1
  %820 = load i32, ptr %819, align 4
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %811, i64 %818, i32 %820, i32 noundef %816)
          to label %821 unwind label %180

821:                                              ; preds = %809
  br label %826

822:                                              ; preds = %800
  %823 = landingpad { ptr, i32 }
          cleanup
  %824 = extractvalue { ptr, i32 } %823, 0
  store ptr %824, ptr %18, align 8
  %825 = extractvalue { ptr, i32 } %823, 1
  store i32 %825, ptr %19, align 4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %123) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %122) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %121) #7
  br label %902

826:                                              ; preds = %821, %798
  %827 = load ptr, ptr %12, align 8, !tbaa !5
  %828 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %827, i32 0, i32 1
  %829 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %126, ptr align 8 %829, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %127, ptr align 4 %126, i64 12, i1 false)
  %830 = getelementptr inbounds { i64, i32 }, ptr %127, i32 0, i32 0
  %831 = load i64, ptr %830, align 4
  %832 = getelementptr inbounds { i64, i32 }, ptr %127, i32 0, i32 1
  %833 = load i32, ptr %832, align 4
  %834 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %828, i64 %831, i32 %833)
          to label %835 unwind label %180

835:                                              ; preds = %826
  %836 = load ptr, ptr %14, align 8, !tbaa !5
  %837 = getelementptr inbounds i32, ptr %836, i64 10
  store i32 %834, ptr %837, align 4, !tbaa !9
  br label %838

838:                                              ; preds = %835, %782
  %839 = load i32, ptr %11, align 4, !tbaa !9
  %840 = sext i32 %839 to i64
  %841 = getelementptr inbounds [256 x i32], ptr @_ZN13Polygonizer3d10_edgeTableE, i64 0, i64 %840
  %842 = load i32, ptr %841, align 4, !tbaa !9
  %843 = and i32 %842, 2048
  %844 = icmp ne i32 %843, 0
  br i1 %844, label %845, label %894

845:                                              ; preds = %838
  %846 = load ptr, ptr %12, align 8, !tbaa !5
  %847 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %846, i32 0, i32 1
  %848 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %128, ptr align 4 %848, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %129, ptr align 4 %128, i64 12, i1 false)
  %849 = getelementptr inbounds { i64, i32 }, ptr %129, i32 0, i32 0
  %850 = load i64, ptr %849, align 4
  %851 = getelementptr inbounds { i64, i32 }, ptr %129, i32 0, i32 1
  %852 = load i32, ptr %851, align 4
  %853 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %847, i64 %850, i32 %852)
          to label %854 unwind label %180

854:                                              ; preds = %845
  %855 = icmp eq i32 %853, -1
  br i1 %855, label %856, label %882

856:                                              ; preds = %854
  call void @llvm.lifetime.start.p0(i64 12, ptr %130) #7
  %857 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %131, ptr align 4 %857, i64 12, i1 false), !tbaa.struct !17
  %858 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i64 0, i64 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %132, ptr align 4 %858, i64 12, i1 false), !tbaa.struct !17
  %859 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 3
  %860 = load double, ptr %859, align 8, !tbaa !16
  %861 = getelementptr inbounds [8 x double], ptr %16, i64 0, i64 7
  %862 = load double, ptr %861, align 8, !tbaa !16
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %130, ptr noundef nonnull align 8 dereferenceable(57) %139, ptr noundef %131, ptr noundef %132, double noundef %860, double noundef %862)
          to label %863 unwind label %878

863:                                              ; preds = %856
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %130, i64 12, i1 false), !tbaa.struct !17
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %130) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %132) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %131) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %130) #7
  %864 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %864, ptr noundef nonnull align 4 dereferenceable(12) %20)
          to label %865 unwind label %180

865:                                              ; preds = %863
  %866 = load ptr, ptr %12, align 8, !tbaa !5
  %867 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %866, i32 0, i32 1
  %868 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %133, ptr align 4 %868, i64 12, i1 false), !tbaa.struct !11
  %869 = load ptr, ptr %13, align 8, !tbaa !5
  %870 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %869) #7
  %871 = trunc i64 %870 to i32
  %872 = sub nsw i32 %871, 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %134, ptr align 4 %133, i64 12, i1 false)
  %873 = getelementptr inbounds { i64, i32 }, ptr %134, i32 0, i32 0
  %874 = load i64, ptr %873, align 4
  %875 = getelementptr inbounds { i64, i32 }, ptr %134, i32 0, i32 1
  %876 = load i32, ptr %875, align 4
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %867, i64 %874, i32 %876, i32 noundef %872)
          to label %877 unwind label %180

877:                                              ; preds = %865
  br label %882

878:                                              ; preds = %856
  %879 = landingpad { ptr, i32 }
          cleanup
  %880 = extractvalue { ptr, i32 } %879, 0
  store ptr %880, ptr %18, align 8
  %881 = extractvalue { ptr, i32 } %879, 1
  store i32 %881, ptr %19, align 4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %132) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %131) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %130) #7
  br label %902

882:                                              ; preds = %877, %854
  %883 = load ptr, ptr %12, align 8, !tbaa !5
  %884 = getelementptr inbounds %"struct.Polygonizer3d::EdgeGrid", ptr %883, i32 0, i32 1
  %885 = getelementptr inbounds [8 x %struct.GridIndex], ptr %15, i64 0, i64 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %135, ptr align 4 %885, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %136, ptr align 4 %135, i64 12, i1 false)
  %886 = getelementptr inbounds { i64, i32 }, ptr %136, i32 0, i32 0
  %887 = load i64, ptr %886, align 4
  %888 = getelementptr inbounds { i64, i32 }, ptr %136, i32 0, i32 1
  %889 = load i32, ptr %888, align 4
  %890 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %884, i64 %887, i32 %889)
          to label %891 unwind label %180

891:                                              ; preds = %882
  %892 = load ptr, ptr %14, align 8, !tbaa !5
  %893 = getelementptr inbounds i32, ptr %892, i64 11
  store i32 %890, ptr %893, align 4, !tbaa !9
  br label %894

894:                                              ; preds = %891, %838
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %20) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #7
  %895 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i32 0, i32 0
  %896 = getelementptr inbounds %"class.vmath::vec3", ptr %895, i64 8
  br label %897

897:                                              ; preds = %897, %894
  %898 = phi ptr [ %896, %894 ], [ %899, %897 ]
  %899 = getelementptr inbounds %"class.vmath::vec3", ptr %898, i64 -1
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %899) #7
  %900 = icmp eq ptr %899, %895
  br i1 %900, label %901, label %897

901:                                              ; preds = %897
  call void @llvm.lifetime.end.p0(i64 96, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 96, ptr %15) #7
  ret void

902:                                              ; preds = %878, %822, %766, %710, %654, %598, %542, %486, %430, %374, %318, %262, %221, %180
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %20) #7
  br label %903

903:                                              ; preds = %902, %176
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #7
  %904 = getelementptr inbounds [8 x %"class.vmath::vec3"], ptr %17, i32 0, i32 0
  %905 = getelementptr inbounds %"class.vmath::vec3", ptr %904, i64 8
  br label %906

906:                                              ; preds = %906, %903
  %907 = phi ptr [ %905, %903 ], [ %908, %906 ]
  %908 = getelementptr inbounds %"class.vmath::vec3", ptr %907, i64 -1
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %908) #7
  %909 = icmp eq ptr %908, %904
  br i1 %909, label %910, label %906

910:                                              ; preds = %906
  br label %911

911:                                              ; preds = %910, %175
  call void @llvm.lifetime.end.p0(i64 96, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 96, ptr %15) #7
  br label %912

912:                                              ; preds = %911
  %913 = load ptr, ptr %18, align 8
  %914 = load i32, ptr %19, align 4
  %915 = insertvalue { ptr, i32 } poison, ptr %913, 0
  %916 = insertvalue { ptr, i32 } %915, i32 %914, 1
  resume { ptr, i32 } %916
}

declare void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36), i64, i32) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36), i64, i32, i32 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind "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 = { 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 #5 = { 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 #6 = { "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 #7 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 4, !9}
!12 = !{!13, !6, i64 32}
!13 = !{!"_ZTS13Polygonizer3d", !10, i64 0, !10, i64 4, !10, i64 8, !14, i64 16, !14, i64 24, !6, i64 32, !15, i64 40, !6, i64 48, !15, i64 56}
!14 = !{!"double", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{!14, !14, i64 0}
!17 = !{i64 0, i64 4, !18, i64 4, i64 4, !18, i64 8, i64 4, !18}
!18 = !{!19, !19, i64 0}
!19 = !{!"float", !7, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}


; 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.vmath::vec3" = type { float, float, float }
%struct.GridIndex = type { i32, i32, i32 }

@_ZN13Polygonizer3d10_edgeTableE = external dso_local local_unnamed_addr constant [256 x i32], align 16

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

; 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 uwtable
declare dso_local void @_ZN13Polygonizer3d18_getVertexPositionE9GridIndex(ptr dead_on_unwind noalias writable sret(%"class.vmath::vec3") align 4, ptr noundef nonnull align 8 dereferenceable(57), i64, i32) local_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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Grid3d20getGridIndexVerticesE9GridIndexPS0_(i64, i32, ptr noundef) local_unnamed_addr #5

declare noundef double @_ZN11ScalarField19getScalarFieldValueE9GridIndex(ptr noundef nonnull align 8 dereferenceable(248), i64, i32) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind noalias writable sret(%"class.vmath::vec3") align 4, ptr noundef nonnull align 8 dereferenceable(57), ptr noundef, ptr noundef, double noundef, double noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13Polygonizer3d20_calculateVertexListE9GridIndexiRNS_8EdgeGridERSt6vectorIN5vmath4vec3ESaIS5_EEPi(ptr noundef nonnull align 8 dereferenceable(57) %0, i64 %1, i32 %2, i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(120) %4, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr nocapture noundef writeonly %6) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca [8 x %struct.GridIndex], align 16
  %9 = alloca [8 x %"class.vmath::vec3"], align 16
  %10 = alloca %"class.vmath::vec3", align 4
  %11 = alloca %"class.vmath::vec3", align 4
  %12 = alloca %"class.vmath::vec3", align 4
  %13 = alloca %"class.vmath::vec3", align 4
  %14 = alloca %"class.vmath::vec3", align 4
  %15 = alloca %"class.vmath::vec3", align 4
  %16 = alloca %"class.vmath::vec3", align 4
  %17 = alloca %"class.vmath::vec3", align 4
  %18 = alloca %"class.vmath::vec3", align 4
  %19 = alloca %"class.vmath::vec3", align 4
  %20 = alloca %"class.vmath::vec3", align 4
  %21 = alloca %"class.vmath::vec3", align 4
  %22 = alloca %"class.vmath::vec3", align 4
  %23 = alloca %"class.vmath::vec3", align 4
  %24 = alloca %"class.vmath::vec3", align 4
  %25 = alloca %"class.vmath::vec3", align 4
  %26 = alloca %"class.vmath::vec3", align 4
  %27 = alloca %"class.vmath::vec3", align 4
  %28 = alloca %"class.vmath::vec3", align 4
  %29 = alloca %"class.vmath::vec3", align 4
  %30 = alloca %"class.vmath::vec3", align 4
  %31 = alloca %"class.vmath::vec3", align 4
  %32 = alloca %"class.vmath::vec3", align 4
  %33 = alloca %"class.vmath::vec3", align 4
  %34 = alloca %"class.vmath::vec3", align 4
  %35 = alloca %"class.vmath::vec3", align 4
  %36 = alloca %"class.vmath::vec3", align 4
  %37 = alloca %"class.vmath::vec3", align 4
  %38 = alloca %"class.vmath::vec3", align 4
  %39 = alloca %"class.vmath::vec3", align 4
  %40 = alloca %"class.vmath::vec3", align 4
  %41 = alloca %"class.vmath::vec3", align 4
  %42 = alloca %"class.vmath::vec3", align 4
  %43 = alloca %"class.vmath::vec3", align 4
  %44 = alloca %"class.vmath::vec3", align 4
  %45 = alloca %"class.vmath::vec3", align 4
  %46 = alloca %"class.vmath::vec3", align 4
  %47 = alloca %"class.vmath::vec3", align 4
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %8) #7
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %8)
  %.ptr.1 = getelementptr inbounds i8, ptr %8, i64 12
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.1)
  %.ptr.2 = getelementptr inbounds i8, ptr %8, i64 24
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.2)
  %.ptr.3 = getelementptr inbounds i8, ptr %8, i64 36
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.3)
  %.ptr.4 = getelementptr inbounds i8, ptr %8, i64 48
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.4)
  %.ptr.5 = getelementptr inbounds i8, ptr %8, i64 60
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.5)
  %.ptr.6 = getelementptr inbounds i8, ptr %8, i64 72
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.6)
  %.ptr.7 = getelementptr inbounds i8, ptr %8, i64 84
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.7)
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %9) #7
  call void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %9)
  %.ptr262.1 = getelementptr inbounds i8, ptr %9, i64 12
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr262.1)
          to label %48 unwind label %.preheader279.preheader

48:                                               ; preds = %7
  %.ptr262.2 = getelementptr inbounds i8, ptr %9, i64 24
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr262.2)
          to label %49 unwind label %.preheader279.preheader

49:                                               ; preds = %48
  %.ptr262.3 = getelementptr inbounds i8, ptr %9, i64 36
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr262.3)
          to label %50 unwind label %.preheader279.preheader

50:                                               ; preds = %49
  %.ptr262.4 = getelementptr inbounds i8, ptr %9, i64 48
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr262.4)
          to label %51 unwind label %.preheader279.preheader

51:                                               ; preds = %50
  %.ptr262.5 = getelementptr inbounds i8, ptr %9, i64 60
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr262.5)
          to label %52 unwind label %.preheader279.preheader

52:                                               ; preds = %51
  %.ptr262.6 = getelementptr inbounds i8, ptr %9, i64 72
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr262.6)
          to label %53 unwind label %.preheader279.preheader

53:                                               ; preds = %52
  %.ptr262.7 = getelementptr inbounds i8, ptr %9, i64 84
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr262.7)
          to label %54 unwind label %.preheader279.preheader

54:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #7
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %10)
          to label %55 unwind label %62

55:                                               ; preds = %54
  invoke void @_ZN6Grid3d20getGridIndexVerticesE9GridIndexPS0_(i64 %1, i32 %2, ptr noundef nonnull %8)
          to label %.preheader unwind label %64

.preheader:                                       ; preds = %55
  %56 = getelementptr inbounds i8, ptr %0, i64 32
  %57 = load ptr, ptr %56, align 8, !tbaa !5
  %.sroa.0149.0.copyload = load i64, ptr %8, align 16
  %.sroa.2150.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 8
  %.sroa.2150.0.copyload = load i32, ptr %.sroa.2150.0..sroa_idx, align 8, !tbaa !13
  %58 = invoke noundef double @_ZN11ScalarField19getScalarFieldValueE9GridIndex(ptr noundef nonnull align 8 dereferenceable(248) %57, i64 %.sroa.0149.0.copyload, i32 %.sroa.2150.0.copyload)
          to label %66 unwind label %100

.preheader279.preheader:                          ; preds = %7, %48, %49, %50, %51, %52, %53
  %.ptr262.lcssa.ph = phi ptr [ %.ptr262.7, %53 ], [ %.ptr262.6, %52 ], [ %.ptr262.5, %51 ], [ %.ptr262.4, %50 ], [ %.ptr262.3, %49 ], [ %.ptr262.2, %48 ], [ %.ptr262.1, %7 ]
  %lpad.thr_comm = landingpad { ptr, i32 }
          cleanup
  br label %.preheader279

.preheader279:                                    ; preds = %.preheader279.preheader, %.preheader279
  %59 = phi ptr [ %60, %.preheader279 ], [ %.ptr262.lcssa.ph, %.preheader279.preheader ]
  %60 = getelementptr inbounds i8, ptr %59, i64 -12
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %60) #7
  %61 = icmp eq ptr %60, %9
  br i1 %61, label %.loopexit, label %.preheader279

62:                                               ; preds = %54
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.loopexit

64:                                               ; preds = %321, %315, %314, %308, %302, %296, %295, %289, %283, %277, %276, %270, %264, %258, %257, %251, %245, %239, %238, %232, %226, %220, %219, %214, %208, %202, %201, %195, %189, %183, %182, %177, %171, %165, %164, %158, %152, %146, %145, %140, %134, %128, %127, %121, %116, %110, %109, %104, %55
  %65 = landingpad { ptr, i32 }
          cleanup
  br label %333

66:                                               ; preds = %.preheader
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #7
  %.sroa.0145.0.copyload = load i64, ptr %8, align 16
  %.sroa.2146.0.copyload = load i32, ptr %.sroa.2150.0..sroa_idx, align 8, !tbaa !13
  invoke void @_ZN13Polygonizer3d18_getVertexPositionE9GridIndex(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %11, ptr noundef nonnull align 8 dereferenceable(57) %0, i64 %.sroa.0145.0.copyload, i32 %.sroa.2146.0.copyload)
          to label %67 unwind label %102

67:                                               ; preds = %66
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %11, i64 12, i1 false), !tbaa.struct !14
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %11) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #7
  %68 = load ptr, ptr %56, align 8, !tbaa !5
  %.sroa.0149.0.copyload.1 = load i64, ptr %.ptr.1, align 4
  %.sroa.2150.0..sroa_idx.1 = getelementptr inbounds i8, ptr %8, i64 20
  %.sroa.2150.0.copyload.1 = load i32, ptr %.sroa.2150.0..sroa_idx.1, align 4, !tbaa !13
  %69 = invoke noundef double @_ZN11ScalarField19getScalarFieldValueE9GridIndex(ptr noundef nonnull align 8 dereferenceable(248) %68, i64 %.sroa.0149.0.copyload.1, i32 %.sroa.2150.0.copyload.1)
          to label %70 unwind label %100

70:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #7
  %.sroa.0145.0.copyload.1 = load i64, ptr %.ptr.1, align 4
  %.sroa.2146.0.copyload.1 = load i32, ptr %.sroa.2150.0..sroa_idx.1, align 4, !tbaa !13
  invoke void @_ZN13Polygonizer3d18_getVertexPositionE9GridIndex(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %11, ptr noundef nonnull align 8 dereferenceable(57) %0, i64 %.sroa.0145.0.copyload.1, i32 %.sroa.2146.0.copyload.1)
          to label %71 unwind label %102

71:                                               ; preds = %70
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %.ptr262.1, ptr noundef nonnull align 4 dereferenceable(12) %11, i64 12, i1 false), !tbaa.struct !14
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %11) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #7
  %72 = load ptr, ptr %56, align 8, !tbaa !5
  %.sroa.0149.0.copyload.2 = load i64, ptr %.ptr.2, align 8
  %.sroa.2150.0..sroa_idx.2 = getelementptr inbounds i8, ptr %8, i64 32
  %.sroa.2150.0.copyload.2 = load i32, ptr %.sroa.2150.0..sroa_idx.2, align 16, !tbaa !13
  %73 = invoke noundef double @_ZN11ScalarField19getScalarFieldValueE9GridIndex(ptr noundef nonnull align 8 dereferenceable(248) %72, i64 %.sroa.0149.0.copyload.2, i32 %.sroa.2150.0.copyload.2)
          to label %74 unwind label %100

74:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #7
  %.sroa.0145.0.copyload.2 = load i64, ptr %.ptr.2, align 8
  %.sroa.2146.0.copyload.2 = load i32, ptr %.sroa.2150.0..sroa_idx.2, align 16, !tbaa !13
  invoke void @_ZN13Polygonizer3d18_getVertexPositionE9GridIndex(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %11, ptr noundef nonnull align 8 dereferenceable(57) %0, i64 %.sroa.0145.0.copyload.2, i32 %.sroa.2146.0.copyload.2)
          to label %75 unwind label %102

75:                                               ; preds = %74
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %.ptr262.2, ptr noundef nonnull align 4 dereferenceable(12) %11, i64 12, i1 false), !tbaa.struct !14
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %11) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #7
  %76 = load ptr, ptr %56, align 8, !tbaa !5
  %.sroa.0149.0.copyload.3 = load i64, ptr %.ptr.3, align 4
  %.sroa.2150.0..sroa_idx.3 = getelementptr inbounds i8, ptr %8, i64 44
  %.sroa.2150.0.copyload.3 = load i32, ptr %.sroa.2150.0..sroa_idx.3, align 4, !tbaa !13
  %77 = invoke noundef double @_ZN11ScalarField19getScalarFieldValueE9GridIndex(ptr noundef nonnull align 8 dereferenceable(248) %76, i64 %.sroa.0149.0.copyload.3, i32 %.sroa.2150.0.copyload.3)
          to label %78 unwind label %100

78:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #7
  %.sroa.0145.0.copyload.3 = load i64, ptr %.ptr.3, align 4
  %.sroa.2146.0.copyload.3 = load i32, ptr %.sroa.2150.0..sroa_idx.3, align 4, !tbaa !13
  invoke void @_ZN13Polygonizer3d18_getVertexPositionE9GridIndex(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %11, ptr noundef nonnull align 8 dereferenceable(57) %0, i64 %.sroa.0145.0.copyload.3, i32 %.sroa.2146.0.copyload.3)
          to label %79 unwind label %102

79:                                               ; preds = %78
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %.ptr262.3, ptr noundef nonnull align 4 dereferenceable(12) %11, i64 12, i1 false), !tbaa.struct !14
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %11) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #7
  %80 = load ptr, ptr %56, align 8, !tbaa !5
  %.sroa.0149.0.copyload.4 = load i64, ptr %.ptr.4, align 16
  %.sroa.2150.0..sroa_idx.4 = getelementptr inbounds i8, ptr %8, i64 56
  %.sroa.2150.0.copyload.4 = load i32, ptr %.sroa.2150.0..sroa_idx.4, align 8, !tbaa !13
  %81 = invoke noundef double @_ZN11ScalarField19getScalarFieldValueE9GridIndex(ptr noundef nonnull align 8 dereferenceable(248) %80, i64 %.sroa.0149.0.copyload.4, i32 %.sroa.2150.0.copyload.4)
          to label %82 unwind label %100

82:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #7
  %.sroa.0145.0.copyload.4 = load i64, ptr %.ptr.4, align 16
  %.sroa.2146.0.copyload.4 = load i32, ptr %.sroa.2150.0..sroa_idx.4, align 8, !tbaa !13
  invoke void @_ZN13Polygonizer3d18_getVertexPositionE9GridIndex(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %11, ptr noundef nonnull align 8 dereferenceable(57) %0, i64 %.sroa.0145.0.copyload.4, i32 %.sroa.2146.0.copyload.4)
          to label %83 unwind label %102

83:                                               ; preds = %82
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(12) %.ptr262.4, ptr noundef nonnull align 4 dereferenceable(12) %11, i64 12, i1 false), !tbaa.struct !14
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %11) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #7
  %84 = load ptr, ptr %56, align 8, !tbaa !5
  %.sroa.0149.0.copyload.5 = load i64, ptr %.ptr.5, align 4
  %.sroa.2150.0..sroa_idx.5 = getelementptr inbounds i8, ptr %8, i64 68
  %.sroa.2150.0.copyload.5 = load i32, ptr %.sroa.2150.0..sroa_idx.5, align 4, !tbaa !13
  %85 = invoke noundef double @_ZN11ScalarField19getScalarFieldValueE9GridIndex(ptr noundef nonnull align 8 dereferenceable(248) %84, i64 %.sroa.0149.0.copyload.5, i32 %.sroa.2150.0.copyload.5)
          to label %86 unwind label %100

86:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #7
  %.sroa.0145.0.copyload.5 = load i64, ptr %.ptr.5, align 4
  %.sroa.2146.0.copyload.5 = load i32, ptr %.sroa.2150.0..sroa_idx.5, align 4, !tbaa !13
  invoke void @_ZN13Polygonizer3d18_getVertexPositionE9GridIndex(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %11, ptr noundef nonnull align 8 dereferenceable(57) %0, i64 %.sroa.0145.0.copyload.5, i32 %.sroa.2146.0.copyload.5)
          to label %87 unwind label %102

87:                                               ; preds = %86
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %.ptr262.5, ptr noundef nonnull align 4 dereferenceable(12) %11, i64 12, i1 false), !tbaa.struct !14
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %11) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #7
  %88 = load ptr, ptr %56, align 8, !tbaa !5
  %.sroa.0149.0.copyload.6 = load i64, ptr %.ptr.6, align 8
  %.sroa.2150.0..sroa_idx.6 = getelementptr inbounds i8, ptr %8, i64 80
  %.sroa.2150.0.copyload.6 = load i32, ptr %.sroa.2150.0..sroa_idx.6, align 16, !tbaa !13
  %89 = invoke noundef double @_ZN11ScalarField19getScalarFieldValueE9GridIndex(ptr noundef nonnull align 8 dereferenceable(248) %88, i64 %.sroa.0149.0.copyload.6, i32 %.sroa.2150.0.copyload.6)
          to label %90 unwind label %100

90:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #7
  %.sroa.0145.0.copyload.6 = load i64, ptr %.ptr.6, align 8
  %.sroa.2146.0.copyload.6 = load i32, ptr %.sroa.2150.0..sroa_idx.6, align 16, !tbaa !13
  invoke void @_ZN13Polygonizer3d18_getVertexPositionE9GridIndex(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %11, ptr noundef nonnull align 8 dereferenceable(57) %0, i64 %.sroa.0145.0.copyload.6, i32 %.sroa.2146.0.copyload.6)
          to label %91 unwind label %102

91:                                               ; preds = %90
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %.ptr262.6, ptr noundef nonnull align 4 dereferenceable(12) %11, i64 12, i1 false), !tbaa.struct !14
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %11) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #7
  %92 = load ptr, ptr %56, align 8, !tbaa !5
  %.sroa.0149.0.copyload.7 = load i64, ptr %.ptr.7, align 4
  %.sroa.2150.0..sroa_idx.7 = getelementptr inbounds i8, ptr %8, i64 92
  %.sroa.2150.0.copyload.7 = load i32, ptr %.sroa.2150.0..sroa_idx.7, align 4, !tbaa !13
  %93 = invoke noundef double @_ZN11ScalarField19getScalarFieldValueE9GridIndex(ptr noundef nonnull align 8 dereferenceable(248) %92, i64 %.sroa.0149.0.copyload.7, i32 %.sroa.2150.0.copyload.7)
          to label %94 unwind label %100

94:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #7
  %.sroa.0145.0.copyload.7 = load i64, ptr %.ptr.7, align 4
  %.sroa.2146.0.copyload.7 = load i32, ptr %.sroa.2150.0..sroa_idx.7, align 4, !tbaa !13
  invoke void @_ZN13Polygonizer3d18_getVertexPositionE9GridIndex(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %11, ptr noundef nonnull align 8 dereferenceable(57) %0, i64 %.sroa.0145.0.copyload.7, i32 %.sroa.2146.0.copyload.7)
          to label %95 unwind label %102

95:                                               ; preds = %94
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %.ptr262.7, ptr noundef nonnull align 4 dereferenceable(12) %11, i64 12, i1 false), !tbaa.struct !14
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %11) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #7
  %96 = sext i32 %3 to i64
  %97 = getelementptr inbounds [256 x i32], ptr @_ZN13Polygonizer3d10_edgeTableE, i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !13
  %99 = and i32 %98, 1
  %.not = icmp eq i32 %99, 0
  br i1 %.not, label %119, label %104

100:                                              ; preds = %91, %87, %83, %79, %75, %71, %67, %.preheader
  %101 = landingpad { ptr, i32 }
          cleanup
  br label %333

102:                                              ; preds = %94, %90, %86, %82, %78, %74, %70, %66
  %103 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #7
  br label %333

104:                                              ; preds = %95
  %.sroa.0141.0.copyload = load i64, ptr %8, align 16
  %.sroa.2142.0.copyload = load i32, ptr %.sroa.2150.0..sroa_idx, align 8, !tbaa !13
  %105 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.0141.0.copyload, i32 %.sroa.2142.0.copyload)
          to label %106 unwind label %64

106:                                              ; preds = %104
  %107 = icmp eq i32 %105, -1
  br i1 %107, label %108, label %116

108:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 16 dereferenceable(12) %9, i64 12, i1 false), !tbaa.struct !14
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(12) %.ptr262.1, i64 12, i1 false), !tbaa.struct !14
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %12, ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull %13, ptr noundef nonnull %14, double noundef %58, double noundef %69)
          to label %109 unwind label %114

109:                                              ; preds = %108
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %12, i64 12, i1 false), !tbaa.struct !14
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %12) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %14) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %13) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #7
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(12) %10)
          to label %110 unwind label %64

110:                                              ; preds = %109
  %.sroa.0137.0.copyload = load i64, ptr %8, align 16
  %.sroa.2138.0.copyload = load i32, ptr %.sroa.2150.0..sroa_idx, align 8, !tbaa !13
  %111 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %112 = trunc i64 %111 to i32
  %113 = add nsw i32 %112, -1
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.0137.0.copyload, i32 %.sroa.2138.0.copyload, i32 noundef %113)
          to label %116 unwind label %64

114:                                              ; preds = %108
  %115 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %14) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %13) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #7
  br label %333

116:                                              ; preds = %110, %106
  %.sroa.0133.0.copyload = load i64, ptr %8, align 16
  %.sroa.2134.0.copyload = load i32, ptr %.sroa.2150.0..sroa_idx, align 8, !tbaa !13
  %117 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.0133.0.copyload, i32 %.sroa.2134.0.copyload)
          to label %118 unwind label %64

118:                                              ; preds = %116
  store i32 %117, ptr %6, align 4, !tbaa !13
  br label %119

119:                                              ; preds = %118, %95
  %120 = and i32 %98, 2
  %.not264 = icmp eq i32 %120, 0
  br i1 %.not264, label %138, label %121

121:                                              ; preds = %119
  %122 = getelementptr inbounds i8, ptr %4, i64 80
  %.sroa.0129.0.copyload = load i64, ptr %.ptr.1, align 4
  %.sroa.2130.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 20
  %.sroa.2130.0.copyload = load i32, ptr %.sroa.2130.0..sroa_idx, align 4, !tbaa !13
  %123 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %122, i64 %.sroa.0129.0.copyload, i32 %.sroa.2130.0.copyload)
          to label %124 unwind label %64

124:                                              ; preds = %121
  %125 = icmp eq i32 %123, -1
  br i1 %125, label %126, label %134

126:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %15) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %16, ptr noundef nonnull align 4 dereferenceable(12) %.ptr262.1, i64 12, i1 false), !tbaa.struct !14
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %17, ptr noundef nonnull align 8 dereferenceable(12) %.ptr262.2, i64 12, i1 false), !tbaa.struct !14
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %15, ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull %16, ptr noundef nonnull %17, double noundef %69, double noundef %73)
          to label %127 unwind label %132

127:                                              ; preds = %126
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %15, i64 12, i1 false), !tbaa.struct !14
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %15) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %17) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %16) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #7
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(12) %10)
          to label %128 unwind label %64

128:                                              ; preds = %127
  %.sroa.0125.0.copyload = load i64, ptr %.ptr.1, align 4
  %.sroa.2126.0.copyload = load i32, ptr %.sroa.2130.0..sroa_idx, align 4, !tbaa !13
  %129 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %130 = trunc i64 %129 to i32
  %131 = add nsw i32 %130, -1
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %122, i64 %.sroa.0125.0.copyload, i32 %.sroa.2126.0.copyload, i32 noundef %131)
          to label %134 unwind label %64

132:                                              ; preds = %126
  %133 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %17) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %16) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #7
  br label %333

134:                                              ; preds = %128, %124
  %.sroa.0121.0.copyload = load i64, ptr %.ptr.1, align 4
  %.sroa.2122.0.copyload = load i32, ptr %.sroa.2130.0..sroa_idx, align 4, !tbaa !13
  %135 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %122, i64 %.sroa.0121.0.copyload, i32 %.sroa.2122.0.copyload)
          to label %136 unwind label %64

136:                                              ; preds = %134
  %137 = getelementptr inbounds i8, ptr %6, i64 4
  store i32 %135, ptr %137, align 4, !tbaa !13
  br label %138

138:                                              ; preds = %136, %119
  %139 = and i32 %98, 4
  %.not265 = icmp eq i32 %139, 0
  br i1 %.not265, label %156, label %140

140:                                              ; preds = %138
  %.sroa.0117.0.copyload = load i64, ptr %.ptr.3, align 4
  %.sroa.2118.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 44
  %.sroa.2118.0.copyload = load i32, ptr %.sroa.2118.0..sroa_idx, align 4, !tbaa !13
  %141 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.0117.0.copyload, i32 %.sroa.2118.0.copyload)
          to label %142 unwind label %64

142:                                              ; preds = %140
  %143 = icmp eq i32 %141, -1
  br i1 %143, label %144, label %152

144:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %18) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %19, ptr noundef nonnull align 8 dereferenceable(12) %.ptr262.2, i64 12, i1 false), !tbaa.struct !14
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %.ptr262.3, i64 12, i1 false), !tbaa.struct !14
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %18, ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull %19, ptr noundef nonnull %20, double noundef %73, double noundef %77)
          to label %145 unwind label %150

145:                                              ; preds = %144
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %18, i64 12, i1 false), !tbaa.struct !14
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %18) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %20) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %19) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %18) #7
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(12) %10)
          to label %146 unwind label %64

146:                                              ; preds = %145
  %.sroa.0113.0.copyload = load i64, ptr %.ptr.3, align 4
  %.sroa.2114.0.copyload = load i32, ptr %.sroa.2118.0..sroa_idx, align 4, !tbaa !13
  %147 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %148 = trunc i64 %147 to i32
  %149 = add nsw i32 %148, -1
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.0113.0.copyload, i32 %.sroa.2114.0.copyload, i32 noundef %149)
          to label %152 unwind label %64

150:                                              ; preds = %144
  %151 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %20) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %19) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %18) #7
  br label %333

152:                                              ; preds = %146, %142
  %.sroa.0109.0.copyload = load i64, ptr %.ptr.3, align 4
  %.sroa.2110.0.copyload = load i32, ptr %.sroa.2118.0..sroa_idx, align 4, !tbaa !13
  %153 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.0109.0.copyload, i32 %.sroa.2110.0.copyload)
          to label %154 unwind label %64

154:                                              ; preds = %152
  %155 = getelementptr inbounds i8, ptr %6, i64 8
  store i32 %153, ptr %155, align 4, !tbaa !13
  br label %156

156:                                              ; preds = %154, %138
  %157 = and i32 %98, 8
  %.not266 = icmp eq i32 %157, 0
  br i1 %.not266, label %175, label %158

158:                                              ; preds = %156
  %159 = getelementptr inbounds i8, ptr %4, i64 80
  %.sroa.0105.0.copyload = load i64, ptr %8, align 16
  %.sroa.2106.0.copyload = load i32, ptr %.sroa.2150.0..sroa_idx, align 8, !tbaa !13
  %160 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %159, i64 %.sroa.0105.0.copyload, i32 %.sroa.2106.0.copyload)
          to label %161 unwind label %64

161:                                              ; preds = %158
  %162 = icmp eq i32 %160, -1
  br i1 %162, label %163, label %171

163:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %21) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %22, ptr noundef nonnull align 4 dereferenceable(12) %.ptr262.3, i64 12, i1 false), !tbaa.struct !14
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %23, ptr noundef nonnull align 16 dereferenceable(12) %9, i64 12, i1 false), !tbaa.struct !14
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %21, ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull %22, ptr noundef nonnull %23, double noundef %77, double noundef %58)
          to label %164 unwind label %169

164:                                              ; preds = %163
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %21, i64 12, i1 false), !tbaa.struct !14
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %21) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %23) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %22) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #7
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(12) %10)
          to label %165 unwind label %64

165:                                              ; preds = %164
  %.sroa.0101.0.copyload = load i64, ptr %8, align 16
  %.sroa.2102.0.copyload = load i32, ptr %.sroa.2150.0..sroa_idx, align 8, !tbaa !13
  %166 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %167 = trunc i64 %166 to i32
  %168 = add nsw i32 %167, -1
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %159, i64 %.sroa.0101.0.copyload, i32 %.sroa.2102.0.copyload, i32 noundef %168)
          to label %171 unwind label %64

169:                                              ; preds = %163
  %170 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %23) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %22) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #7
  br label %333

171:                                              ; preds = %165, %161
  %.sroa.097.0.copyload = load i64, ptr %8, align 16
  %.sroa.298.0.copyload = load i32, ptr %.sroa.2150.0..sroa_idx, align 8, !tbaa !13
  %172 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %159, i64 %.sroa.097.0.copyload, i32 %.sroa.298.0.copyload)
          to label %173 unwind label %64

173:                                              ; preds = %171
  %174 = getelementptr inbounds i8, ptr %6, i64 12
  store i32 %172, ptr %174, align 4, !tbaa !13
  br label %175

175:                                              ; preds = %173, %156
  %176 = and i32 %98, 16
  %.not267 = icmp eq i32 %176, 0
  br i1 %.not267, label %193, label %177

177:                                              ; preds = %175
  %.sroa.093.0.copyload = load i64, ptr %.ptr.4, align 16
  %.sroa.294.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 56
  %.sroa.294.0.copyload = load i32, ptr %.sroa.294.0..sroa_idx, align 8, !tbaa !13
  %178 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.093.0.copyload, i32 %.sroa.294.0.copyload)
          to label %179 unwind label %64

179:                                              ; preds = %177
  %180 = icmp eq i32 %178, -1
  br i1 %180, label %181, label %189

181:                                              ; preds = %179
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %24) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %25, ptr noundef nonnull align 16 dereferenceable(12) %.ptr262.4, i64 12, i1 false), !tbaa.struct !14
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %26, ptr noundef nonnull align 4 dereferenceable(12) %.ptr262.5, i64 12, i1 false), !tbaa.struct !14
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %24, ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull %25, ptr noundef nonnull %26, double noundef %81, double noundef %85)
          to label %182 unwind label %187

182:                                              ; preds = %181
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %24, i64 12, i1 false), !tbaa.struct !14
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %24) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %26) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %25) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %24) #7
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(12) %10)
          to label %183 unwind label %64

183:                                              ; preds = %182
  %.sroa.089.0.copyload = load i64, ptr %.ptr.4, align 16
  %.sroa.290.0.copyload = load i32, ptr %.sroa.294.0..sroa_idx, align 8, !tbaa !13
  %184 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %185 = trunc i64 %184 to i32
  %186 = add nsw i32 %185, -1
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.089.0.copyload, i32 %.sroa.290.0.copyload, i32 noundef %186)
          to label %189 unwind label %64

187:                                              ; preds = %181
  %188 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %26) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %25) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %24) #7
  br label %333

189:                                              ; preds = %183, %179
  %.sroa.085.0.copyload = load i64, ptr %.ptr.4, align 16
  %.sroa.286.0.copyload = load i32, ptr %.sroa.294.0..sroa_idx, align 8, !tbaa !13
  %190 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.085.0.copyload, i32 %.sroa.286.0.copyload)
          to label %191 unwind label %64

191:                                              ; preds = %189
  %192 = getelementptr inbounds i8, ptr %6, i64 16
  store i32 %190, ptr %192, align 4, !tbaa !13
  br label %193

193:                                              ; preds = %191, %175
  %194 = and i32 %98, 32
  %.not268 = icmp eq i32 %194, 0
  br i1 %.not268, label %212, label %195

195:                                              ; preds = %193
  %196 = getelementptr inbounds i8, ptr %4, i64 80
  %.sroa.081.0.copyload = load i64, ptr %.ptr.5, align 4
  %.sroa.282.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 68
  %.sroa.282.0.copyload = load i32, ptr %.sroa.282.0..sroa_idx, align 4, !tbaa !13
  %197 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %196, i64 %.sroa.081.0.copyload, i32 %.sroa.282.0.copyload)
          to label %198 unwind label %64

198:                                              ; preds = %195
  %199 = icmp eq i32 %197, -1
  br i1 %199, label %200, label %208

200:                                              ; preds = %198
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %27) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %28, ptr noundef nonnull align 4 dereferenceable(12) %.ptr262.5, i64 12, i1 false), !tbaa.struct !14
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %29, ptr noundef nonnull align 8 dereferenceable(12) %.ptr262.6, i64 12, i1 false), !tbaa.struct !14
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %27, ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull %28, ptr noundef nonnull %29, double noundef %85, double noundef %89)
          to label %201 unwind label %206

201:                                              ; preds = %200
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %27, i64 12, i1 false), !tbaa.struct !14
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %27) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %29) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %28) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %27) #7
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(12) %10)
          to label %202 unwind label %64

202:                                              ; preds = %201
  %.sroa.077.0.copyload = load i64, ptr %.ptr.5, align 4
  %.sroa.278.0.copyload = load i32, ptr %.sroa.282.0..sroa_idx, align 4, !tbaa !13
  %203 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %204 = trunc i64 %203 to i32
  %205 = add nsw i32 %204, -1
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %196, i64 %.sroa.077.0.copyload, i32 %.sroa.278.0.copyload, i32 noundef %205)
          to label %208 unwind label %64

206:                                              ; preds = %200
  %207 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %29) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %28) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %27) #7
  br label %333

208:                                              ; preds = %202, %198
  %.sroa.073.0.copyload = load i64, ptr %.ptr.5, align 4
  %.sroa.274.0.copyload = load i32, ptr %.sroa.282.0..sroa_idx, align 4, !tbaa !13
  %209 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %196, i64 %.sroa.073.0.copyload, i32 %.sroa.274.0.copyload)
          to label %210 unwind label %64

210:                                              ; preds = %208
  %211 = getelementptr inbounds i8, ptr %6, i64 20
  store i32 %209, ptr %211, align 4, !tbaa !13
  br label %212

212:                                              ; preds = %210, %193
  %213 = and i32 %98, 64
  %.not269 = icmp eq i32 %213, 0
  br i1 %.not269, label %230, label %214

214:                                              ; preds = %212
  %.sroa.069.0.copyload = load i64, ptr %.ptr.7, align 4
  %.sroa.270.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 92
  %.sroa.270.0.copyload = load i32, ptr %.sroa.270.0..sroa_idx, align 4, !tbaa !13
  %215 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.069.0.copyload, i32 %.sroa.270.0.copyload)
          to label %216 unwind label %64

216:                                              ; preds = %214
  %217 = icmp eq i32 %215, -1
  br i1 %217, label %218, label %226

218:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %30) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %31, ptr noundef nonnull align 8 dereferenceable(12) %.ptr262.6, i64 12, i1 false), !tbaa.struct !14
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %32, ptr noundef nonnull align 4 dereferenceable(12) %.ptr262.7, i64 12, i1 false), !tbaa.struct !14
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %30, ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull %31, ptr noundef nonnull %32, double noundef %89, double noundef %93)
          to label %219 unwind label %224

219:                                              ; preds = %218
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %30, i64 12, i1 false), !tbaa.struct !14
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %30) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %32) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %31) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %30) #7
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(12) %10)
          to label %220 unwind label %64

220:                                              ; preds = %219
  %.sroa.065.0.copyload = load i64, ptr %.ptr.7, align 4
  %.sroa.266.0.copyload = load i32, ptr %.sroa.270.0..sroa_idx, align 4, !tbaa !13
  %221 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %222 = trunc i64 %221 to i32
  %223 = add nsw i32 %222, -1
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.065.0.copyload, i32 %.sroa.266.0.copyload, i32 noundef %223)
          to label %226 unwind label %64

224:                                              ; preds = %218
  %225 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %32) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %31) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %30) #7
  br label %333

226:                                              ; preds = %220, %216
  %.sroa.061.0.copyload = load i64, ptr %.ptr.7, align 4
  %.sroa.262.0.copyload = load i32, ptr %.sroa.270.0..sroa_idx, align 4, !tbaa !13
  %227 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.061.0.copyload, i32 %.sroa.262.0.copyload)
          to label %228 unwind label %64

228:                                              ; preds = %226
  %229 = getelementptr inbounds i8, ptr %6, i64 24
  store i32 %227, ptr %229, align 4, !tbaa !13
  br label %230

230:                                              ; preds = %228, %212
  %231 = and i32 %98, 128
  %.not270 = icmp eq i32 %231, 0
  br i1 %.not270, label %249, label %232

232:                                              ; preds = %230
  %233 = getelementptr inbounds i8, ptr %4, i64 80
  %.sroa.057.0.copyload = load i64, ptr %.ptr.4, align 16
  %.sroa.258.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 56
  %.sroa.258.0.copyload = load i32, ptr %.sroa.258.0..sroa_idx, align 8, !tbaa !13
  %234 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %233, i64 %.sroa.057.0.copyload, i32 %.sroa.258.0.copyload)
          to label %235 unwind label %64

235:                                              ; preds = %232
  %236 = icmp eq i32 %234, -1
  br i1 %236, label %237, label %245

237:                                              ; preds = %235
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %33) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %34, ptr noundef nonnull align 4 dereferenceable(12) %.ptr262.7, i64 12, i1 false), !tbaa.struct !14
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %35, ptr noundef nonnull align 16 dereferenceable(12) %.ptr262.4, i64 12, i1 false), !tbaa.struct !14
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %33, ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull %34, ptr noundef nonnull %35, double noundef %93, double noundef %81)
          to label %238 unwind label %243

238:                                              ; preds = %237
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %33, i64 12, i1 false), !tbaa.struct !14
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %33) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %35) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %34) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %33) #7
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(12) %10)
          to label %239 unwind label %64

239:                                              ; preds = %238
  %.sroa.053.0.copyload = load i64, ptr %.ptr.4, align 16
  %.sroa.254.0.copyload = load i32, ptr %.sroa.258.0..sroa_idx, align 8, !tbaa !13
  %240 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %241 = trunc i64 %240 to i32
  %242 = add nsw i32 %241, -1
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %233, i64 %.sroa.053.0.copyload, i32 %.sroa.254.0.copyload, i32 noundef %242)
          to label %245 unwind label %64

243:                                              ; preds = %237
  %244 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %35) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %34) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %33) #7
  br label %333

245:                                              ; preds = %239, %235
  %.sroa.049.0.copyload = load i64, ptr %.ptr.4, align 16
  %.sroa.250.0.copyload = load i32, ptr %.sroa.258.0..sroa_idx, align 8, !tbaa !13
  %246 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %233, i64 %.sroa.049.0.copyload, i32 %.sroa.250.0.copyload)
          to label %247 unwind label %64

247:                                              ; preds = %245
  %248 = getelementptr inbounds i8, ptr %6, i64 28
  store i32 %246, ptr %248, align 4, !tbaa !13
  br label %249

249:                                              ; preds = %247, %230
  %250 = and i32 %98, 256
  %.not271 = icmp eq i32 %250, 0
  br i1 %.not271, label %268, label %251

251:                                              ; preds = %249
  %252 = getelementptr inbounds i8, ptr %4, i64 40
  %.sroa.045.0.copyload = load i64, ptr %8, align 16
  %.sroa.246.0.copyload = load i32, ptr %.sroa.2150.0..sroa_idx, align 8, !tbaa !13
  %253 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %252, i64 %.sroa.045.0.copyload, i32 %.sroa.246.0.copyload)
          to label %254 unwind label %64

254:                                              ; preds = %251
  %255 = icmp eq i32 %253, -1
  br i1 %255, label %256, label %264

256:                                              ; preds = %254
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %36) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %37, ptr noundef nonnull align 16 dereferenceable(12) %9, i64 12, i1 false), !tbaa.struct !14
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %38, ptr noundef nonnull align 16 dereferenceable(12) %.ptr262.4, i64 12, i1 false), !tbaa.struct !14
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %36, ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull %37, ptr noundef nonnull %38, double noundef %58, double noundef %81)
          to label %257 unwind label %262

257:                                              ; preds = %256
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %36, i64 12, i1 false), !tbaa.struct !14
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %36) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %38) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %37) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %36) #7
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(12) %10)
          to label %258 unwind label %64

258:                                              ; preds = %257
  %.sroa.041.0.copyload = load i64, ptr %8, align 16
  %.sroa.242.0.copyload = load i32, ptr %.sroa.2150.0..sroa_idx, align 8, !tbaa !13
  %259 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %260 = trunc i64 %259 to i32
  %261 = add nsw i32 %260, -1
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %252, i64 %.sroa.041.0.copyload, i32 %.sroa.242.0.copyload, i32 noundef %261)
          to label %264 unwind label %64

262:                                              ; preds = %256
  %263 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %38) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %37) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %36) #7
  br label %333

264:                                              ; preds = %258, %254
  %.sroa.037.0.copyload = load i64, ptr %8, align 16
  %.sroa.238.0.copyload = load i32, ptr %.sroa.2150.0..sroa_idx, align 8, !tbaa !13
  %265 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %252, i64 %.sroa.037.0.copyload, i32 %.sroa.238.0.copyload)
          to label %266 unwind label %64

266:                                              ; preds = %264
  %267 = getelementptr inbounds i8, ptr %6, i64 32
  store i32 %265, ptr %267, align 4, !tbaa !13
  br label %268

268:                                              ; preds = %266, %249
  %269 = and i32 %98, 512
  %.not272 = icmp eq i32 %269, 0
  br i1 %.not272, label %287, label %270

270:                                              ; preds = %268
  %271 = getelementptr inbounds i8, ptr %4, i64 40
  %.sroa.033.0.copyload = load i64, ptr %.ptr.1, align 4
  %.sroa.234.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 20
  %.sroa.234.0.copyload = load i32, ptr %.sroa.234.0..sroa_idx, align 4, !tbaa !13
  %272 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %271, i64 %.sroa.033.0.copyload, i32 %.sroa.234.0.copyload)
          to label %273 unwind label %64

273:                                              ; preds = %270
  %274 = icmp eq i32 %272, -1
  br i1 %274, label %275, label %283

275:                                              ; preds = %273
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %39) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %40, ptr noundef nonnull align 4 dereferenceable(12) %.ptr262.1, i64 12, i1 false), !tbaa.struct !14
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %41, ptr noundef nonnull align 4 dereferenceable(12) %.ptr262.5, i64 12, i1 false), !tbaa.struct !14
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %39, ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull %40, ptr noundef nonnull %41, double noundef %69, double noundef %85)
          to label %276 unwind label %281

276:                                              ; preds = %275
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %39, i64 12, i1 false), !tbaa.struct !14
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %39) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %41) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %40) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %39) #7
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(12) %10)
          to label %277 unwind label %64

277:                                              ; preds = %276
  %.sroa.029.0.copyload = load i64, ptr %.ptr.1, align 4
  %.sroa.230.0.copyload = load i32, ptr %.sroa.234.0..sroa_idx, align 4, !tbaa !13
  %278 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %279 = trunc i64 %278 to i32
  %280 = add nsw i32 %279, -1
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %271, i64 %.sroa.029.0.copyload, i32 %.sroa.230.0.copyload, i32 noundef %280)
          to label %283 unwind label %64

281:                                              ; preds = %275
  %282 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %41) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %40) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %39) #7
  br label %333

283:                                              ; preds = %277, %273
  %.sroa.025.0.copyload = load i64, ptr %.ptr.1, align 4
  %.sroa.226.0.copyload = load i32, ptr %.sroa.234.0..sroa_idx, align 4, !tbaa !13
  %284 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %271, i64 %.sroa.025.0.copyload, i32 %.sroa.226.0.copyload)
          to label %285 unwind label %64

285:                                              ; preds = %283
  %286 = getelementptr inbounds i8, ptr %6, i64 36
  store i32 %284, ptr %286, align 4, !tbaa !13
  br label %287

287:                                              ; preds = %285, %268
  %288 = and i32 %98, 1024
  %.not273 = icmp eq i32 %288, 0
  br i1 %.not273, label %306, label %289

289:                                              ; preds = %287
  %290 = getelementptr inbounds i8, ptr %4, i64 40
  %.sroa.021.0.copyload = load i64, ptr %.ptr.2, align 8
  %.sroa.222.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 32
  %.sroa.222.0.copyload = load i32, ptr %.sroa.222.0..sroa_idx, align 16, !tbaa !13
  %291 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %290, i64 %.sroa.021.0.copyload, i32 %.sroa.222.0.copyload)
          to label %292 unwind label %64

292:                                              ; preds = %289
  %293 = icmp eq i32 %291, -1
  br i1 %293, label %294, label %302

294:                                              ; preds = %292
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %42) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %43, ptr noundef nonnull align 8 dereferenceable(12) %.ptr262.2, i64 12, i1 false), !tbaa.struct !14
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %44, ptr noundef nonnull align 8 dereferenceable(12) %.ptr262.6, i64 12, i1 false), !tbaa.struct !14
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %42, ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull %43, ptr noundef nonnull %44, double noundef %73, double noundef %89)
          to label %295 unwind label %300

295:                                              ; preds = %294
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %42, i64 12, i1 false), !tbaa.struct !14
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %42) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %44) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %43) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %42) #7
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(12) %10)
          to label %296 unwind label %64

296:                                              ; preds = %295
  %.sroa.017.0.copyload = load i64, ptr %.ptr.2, align 8
  %.sroa.218.0.copyload = load i32, ptr %.sroa.222.0..sroa_idx, align 16, !tbaa !13
  %297 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %298 = trunc i64 %297 to i32
  %299 = add nsw i32 %298, -1
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %290, i64 %.sroa.017.0.copyload, i32 %.sroa.218.0.copyload, i32 noundef %299)
          to label %302 unwind label %64

300:                                              ; preds = %294
  %301 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %44) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %43) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %42) #7
  br label %333

302:                                              ; preds = %296, %292
  %.sroa.013.0.copyload = load i64, ptr %.ptr.2, align 8
  %.sroa.214.0.copyload = load i32, ptr %.sroa.222.0..sroa_idx, align 16, !tbaa !13
  %303 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %290, i64 %.sroa.013.0.copyload, i32 %.sroa.214.0.copyload)
          to label %304 unwind label %64

304:                                              ; preds = %302
  %305 = getelementptr inbounds i8, ptr %6, i64 40
  store i32 %303, ptr %305, align 4, !tbaa !13
  br label %306

306:                                              ; preds = %304, %287
  %307 = and i32 %98, 2048
  %.not274 = icmp eq i32 %307, 0
  br i1 %.not274, label %325, label %308

308:                                              ; preds = %306
  %309 = getelementptr inbounds i8, ptr %4, i64 40
  %.sroa.09.0.copyload = load i64, ptr %.ptr.3, align 4
  %.sroa.210.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 44
  %.sroa.210.0.copyload = load i32, ptr %.sroa.210.0..sroa_idx, align 4, !tbaa !13
  %310 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %309, i64 %.sroa.09.0.copyload, i32 %.sroa.210.0.copyload)
          to label %311 unwind label %64

311:                                              ; preds = %308
  %312 = icmp eq i32 %310, -1
  br i1 %312, label %313, label %321

313:                                              ; preds = %311
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %45) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %46, ptr noundef nonnull align 4 dereferenceable(12) %.ptr262.3, i64 12, i1 false), !tbaa.struct !14
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %47, ptr noundef nonnull align 4 dereferenceable(12) %.ptr262.7, i64 12, i1 false), !tbaa.struct !14
  invoke void @_ZN13Polygonizer3d13_vertexInterpEN5vmath4vec3ES1_dd(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %45, ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull %46, ptr noundef nonnull %47, double noundef %77, double noundef %93)
          to label %314 unwind label %319

314:                                              ; preds = %313
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %45, i64 12, i1 false), !tbaa.struct !14
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %45) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %47) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %46) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %45) #7
  invoke void @_ZNSt6vectorIN5vmath4vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(12) %10)
          to label %315 unwind label %64

315:                                              ; preds = %314
  %.sroa.05.0.copyload = load i64, ptr %.ptr.3, align 4
  %.sroa.26.0.copyload = load i32, ptr %.sroa.210.0..sroa_idx, align 4, !tbaa !13
  %316 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %317 = trunc i64 %316 to i32
  %318 = add nsw i32 %317, -1
  invoke void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %309, i64 %.sroa.05.0.copyload, i32 %.sroa.26.0.copyload, i32 noundef %318)
          to label %321 unwind label %64

319:                                              ; preds = %313
  %320 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %47) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %46) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %45) #7
  br label %333

321:                                              ; preds = %315, %311
  %.sroa.01.0.copyload = load i64, ptr %.ptr.3, align 4
  %.sroa.22.0.copyload = load i32, ptr %.sroa.210.0..sroa_idx, align 4, !tbaa !13
  %322 = invoke noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %309, i64 %.sroa.01.0.copyload, i32 %.sroa.22.0.copyload)
          to label %323 unwind label %64

323:                                              ; preds = %321
  %324 = getelementptr inbounds i8, ptr %6, i64 44
  store i32 %322, ptr %324, align 4, !tbaa !13
  br label %325

325:                                              ; preds = %323, %306
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %10) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #7
  %326 = getelementptr inbounds i8, ptr %9, i64 84
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %326) #7
  %327 = getelementptr inbounds i8, ptr %9, i64 72
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %327) #7
  %328 = getelementptr inbounds i8, ptr %9, i64 60
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %328) #7
  %329 = getelementptr inbounds i8, ptr %9, i64 48
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %329) #7
  %330 = getelementptr inbounds i8, ptr %9, i64 36
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %330) #7
  %331 = getelementptr inbounds i8, ptr %9, i64 24
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %331) #7
  %332 = getelementptr inbounds i8, ptr %9, i64 12
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %332) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %9) #7
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %8) #7
  ret void

333:                                              ; preds = %100, %102, %319, %300, %281, %262, %243, %224, %206, %187, %169, %150, %132, %114, %64
  %.pn.pn = phi { ptr, i32 } [ %65, %64 ], [ %320, %319 ], [ %301, %300 ], [ %282, %281 ], [ %263, %262 ], [ %244, %243 ], [ %225, %224 ], [ %207, %206 ], [ %188, %187 ], [ %170, %169 ], [ %151, %150 ], [ %133, %132 ], [ %115, %114 ], [ %103, %102 ], [ %101, %100 ]
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %10) #7
  br label %.loopexit.loopexit

.loopexit.loopexit:                               ; preds = %333, %62
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %333 ], [ %63, %62 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #7
  %334 = getelementptr inbounds i8, ptr %9, i64 84
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %334) #7
  %335 = getelementptr inbounds i8, ptr %9, i64 72
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %335) #7
  %336 = getelementptr inbounds i8, ptr %9, i64 60
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %336) #7
  %337 = getelementptr inbounds i8, ptr %9, i64 48
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %337) #7
  %338 = getelementptr inbounds i8, ptr %9, i64 36
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %338) #7
  %339 = getelementptr inbounds i8, ptr %9, i64 24
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %339) #7
  %340 = getelementptr inbounds i8, ptr %9, i64 12
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %340) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %9) #7
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader279, %.loopexit.loopexit
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %.loopexit.loopexit ], [ %lpad.thr_comm, %.preheader279 ]
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %8) #7
  resume { ptr, i32 } %.pn.pn.pn.pn
}

declare void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36), i64, i32) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36), i64, i32, i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind "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 = { 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 #5 = { 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 #6 = { "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 #7 = { 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, !11, i64 32}
!6 = !{!"_ZTS13Polygonizer3d", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !10, i64 24, !11, i64 32, !12, i64 40, !11, i64 48, !12, i64 56}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"bool", !8, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{i64 0, i64 4, !15, i64 4, i64 4, !15, i64 8, i64 4, !15}
!15 = !{!16, !16, i64 0}
!16 = !{!"float", !8, i64 0}


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