; LLVM IR from ImperialCollegeLondon/pnflow :: src/pnm/pnextract (medialSurf)

; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.medialSurface::node" = type { i16, i16, i16 }
%class.voxel = type <{ ptr, i16, i16, i16, [2 x i8], float, [4 x i8] }>
%class.medialSurface = type <{ ptr, i32, i32, i32, [4 x i8], i64, i64, ptr, %class.segment, %"class.std::vector", %"class.std::vector.0", %class.medialBall, float, [4 x i8], double, double, double, double, double, double, i32, [4 x i8], double, float, [4 x i8] }>
%class.segment = type { i32, i8, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<voxel, std::allocator<voxel>>::_Vector_impl" }
%"struct.std::_Vector_base<voxel, std::allocator<voxel>>::_Vector_impl" = type { %"struct.std::_Vector_base<voxel, std::allocator<voxel>>::_Vector_impl_data" }
%"struct.std::_Vector_base<voxel, std::allocator<voxel>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<medialBall, std::allocator<medialBall>>::_Vector_impl" }
%"struct.std::_Vector_base<medialBall, std::allocator<medialBall>>::_Vector_impl" = type { %"struct.std::_Vector_base<medialBall, std::allocator<medialBall>>::_Vector_impl_data" }
%"struct.std::_Vector_base<medialBall, std::allocator<medialBall>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.medialBall = type { ptr, float, float, float, i16, float, i16, i16, i16, i16, i16, ptr, ptr, ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK13medialSurface12calc_distmapEP5voxelhRK11voxelImageTIhERSt6vectorIS6_INS_4nodeESaIS7_EESaIS9_EE(ptr noundef nonnull align 8 dereferenceable(252) %0, ptr noundef %1, i8 noundef zeroext %2, ptr noundef nonnull align 8 dereferenceable(112) %3, ptr noundef nonnull align 8 dereferenceable(24) %4) #0 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.medialSurface::node", align 2
  %15 = alloca i32, align 4
  %16 = alloca double, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca ptr, align 8
  %40 = alloca i32, align 4
  %41 = alloca i32, align 4
  %42 = alloca i32, align 4
  %43 = alloca i32, align 4
  %44 = alloca i32, align 4
  %45 = alloca double, align 8
  %46 = alloca double, align 8
  %47 = alloca i32, align 4
  %48 = alloca i32, align 4
  %49 = alloca double, align 8
  %50 = alloca double, align 8
  %51 = alloca i32, align 4
  %52 = alloca i32, align 4
  %53 = alloca double, align 8
  %54 = alloca double, align 8
  %55 = alloca i32, align 4
  %56 = alloca i32, align 4
  %57 = alloca double, align 8
  %58 = alloca double, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i8 %2, ptr %8, align 1, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  %59 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = getelementptr inbounds %class.voxel, ptr %60, i32 0, i32 1
  %62 = load i16, ptr %61, align 8, !tbaa !10
  %63 = sext i16 %62 to i32
  store i32 %63, ptr %11, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = getelementptr inbounds %class.voxel, ptr %64, i32 0, i32 2
  %66 = load i16, ptr %65, align 2, !tbaa !16
  %67 = sext i16 %66 to i32
  store i32 %67, ptr %12, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = getelementptr inbounds %class.voxel, ptr %68, i32 0, i32 3
  %70 = load i16, ptr %69, align 4, !tbaa !17
  %71 = sext i16 %70 to i32
  store i32 %71, ptr %13, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 6, ptr %14) #9
  %72 = load i32, ptr %11, align 4, !tbaa !14
  %73 = load i32, ptr %12, align 4, !tbaa !14
  %74 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 3
  %75 = load i32, ptr %74, align 8, !tbaa !18
  %76 = sub nsw i32 0, %75
  call void @_ZN13medialSurface4nodeC2Eiii(ptr noundef nonnull align 2 dereferenceable(6) %14, i32 noundef %72, i32 noundef %73, i32 noundef %76)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  %77 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 1
  %78 = load i32, ptr %77, align 8, !tbaa !32
  %79 = mul nsw i32 2, %78
  store i32 %79, ptr %15, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  %80 = load i32, ptr %15, align 4, !tbaa !14
  %81 = load i32, ptr %15, align 4, !tbaa !14
  %82 = mul nsw i32 %80, %81
  %83 = sitofp i32 %82 to double
  store double %83, ptr %16, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  store i32 2, ptr %17, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  store i32 0, ptr %18, align 4, !tbaa !14
  %84 = load i32, ptr %13, align 4, !tbaa !14
  %85 = icmp sgt i32 %84, 0
  br i1 %85, label %86, label %304

86:                                               ; preds = %5
  %87 = load i8, ptr %8, align 1, !tbaa !9
  %88 = zext i8 %87 to i32
  %89 = load ptr, ptr %9, align 8, !tbaa !5
  %90 = getelementptr inbounds i8, ptr %89, i64 8
  %91 = load i32, ptr %11, align 4, !tbaa !14
  %92 = load i32, ptr %12, align 4, !tbaa !14
  %93 = load i32, ptr %13, align 4, !tbaa !14
  %94 = sub nsw i32 %93, 1
  %95 = sext i32 %94 to i64
  %96 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK10voxelFieldIhEclEiim(ptr noundef nonnull align 8 dereferenceable(56) %90, i32 noundef %91, i32 noundef %92, i64 noundef %95)
  %97 = load i8, ptr %96, align 1, !tbaa !9
  %98 = zext i8 %97 to i32
  %99 = icmp ne i32 %88, %98
  br i1 %99, label %100, label %111

100:                                              ; preds = %86
  %101 = load i32, ptr %11, align 4, !tbaa !14
  %102 = trunc i32 %101 to i16
  %103 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 0
  store i16 %102, ptr %103, align 2, !tbaa !34
  %104 = load i32, ptr %12, align 4, !tbaa !14
  %105 = trunc i32 %104 to i16
  %106 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 1
  store i16 %105, ptr %106, align 2, !tbaa !36
  %107 = load i32, ptr %13, align 4, !tbaa !14
  %108 = sub nsw i32 %107, 1
  %109 = trunc i32 %108 to i16
  %110 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 2
  store i16 %109, ptr %110, align 2, !tbaa !37
  store double 1.000000e+00, ptr %16, align 8, !tbaa !33
  store i32 3, ptr %17, align 4, !tbaa !14
  br label %303

111:                                              ; preds = %86
  %112 = load i32, ptr %12, align 4, !tbaa !14
  %113 = icmp sgt i32 %112, 0
  br i1 %113, label %114, label %217

114:                                              ; preds = %111
  %115 = load i8, ptr %8, align 1, !tbaa !9
  %116 = zext i8 %115 to i32
  %117 = load ptr, ptr %9, align 8, !tbaa !5
  %118 = getelementptr inbounds i8, ptr %117, i64 8
  %119 = load i32, ptr %11, align 4, !tbaa !14
  %120 = load i32, ptr %12, align 4, !tbaa !14
  %121 = sub nsw i32 %120, 1
  %122 = load i32, ptr %13, align 4, !tbaa !14
  %123 = sext i32 %122 to i64
  %124 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK10voxelFieldIhEclEiim(ptr noundef nonnull align 8 dereferenceable(56) %118, i32 noundef %119, i32 noundef %121, i64 noundef %123)
  %125 = load i8, ptr %124, align 1, !tbaa !9
  %126 = zext i8 %125 to i32
  %127 = icmp ne i32 %116, %126
  br i1 %127, label %128, label %139

128:                                              ; preds = %114
  %129 = load i32, ptr %11, align 4, !tbaa !14
  %130 = trunc i32 %129 to i16
  %131 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 0
  store i16 %130, ptr %131, align 2, !tbaa !34
  %132 = load i32, ptr %12, align 4, !tbaa !14
  %133 = sub nsw i32 %132, 1
  %134 = trunc i32 %133 to i16
  %135 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 1
  store i16 %134, ptr %135, align 2, !tbaa !36
  %136 = load i32, ptr %13, align 4, !tbaa !14
  %137 = trunc i32 %136 to i16
  %138 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 2
  store i16 %137, ptr %138, align 2, !tbaa !37
  store double 1.000000e+00, ptr %16, align 8, !tbaa !33
  store i32 3, ptr %17, align 4, !tbaa !14
  br label %216

139:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  %140 = load ptr, ptr %10, align 8, !tbaa !5
  %141 = load i32, ptr %12, align 4, !tbaa !14
  %142 = sub nsw i32 %141, 1
  %143 = sext i32 %142 to i64
  %144 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %140, i64 noundef %143) #9
  %145 = load i32, ptr %11, align 4, !tbaa !14
  %146 = sext i32 %145 to i64
  %147 = call noundef nonnull align 2 dereferenceable(6) ptr @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %144, i64 noundef %146) #9
  store ptr %147, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  %148 = load ptr, ptr %19, align 8, !tbaa !5
  %149 = getelementptr inbounds %"class.medialSurface::node", ptr %148, i32 0, i32 0
  %150 = load i16, ptr %149, align 2, !tbaa !34
  %151 = sext i16 %150 to i32
  %152 = load i32, ptr %11, align 4, !tbaa !14
  %153 = sub nsw i32 %151, %152
  %154 = load ptr, ptr %19, align 8, !tbaa !5
  %155 = getelementptr inbounds %"class.medialSurface::node", ptr %154, i32 0, i32 0
  %156 = load i16, ptr %155, align 2, !tbaa !34
  %157 = sext i16 %156 to i32
  %158 = load i32, ptr %11, align 4, !tbaa !14
  %159 = sub nsw i32 %157, %158
  %160 = mul nsw i32 %153, %159
  %161 = load ptr, ptr %19, align 8, !tbaa !5
  %162 = getelementptr inbounds %"class.medialSurface::node", ptr %161, i32 0, i32 1
  %163 = load i16, ptr %162, align 2, !tbaa !36
  %164 = sext i16 %163 to i32
  %165 = load i32, ptr %12, align 4, !tbaa !14
  %166 = sub nsw i32 %164, %165
  %167 = load ptr, ptr %19, align 8, !tbaa !5
  %168 = getelementptr inbounds %"class.medialSurface::node", ptr %167, i32 0, i32 1
  %169 = load i16, ptr %168, align 2, !tbaa !36
  %170 = sext i16 %169 to i32
  %171 = load i32, ptr %12, align 4, !tbaa !14
  %172 = sub nsw i32 %170, %171
  %173 = mul nsw i32 %166, %172
  %174 = add nsw i32 %160, %173
  %175 = load ptr, ptr %19, align 8, !tbaa !5
  %176 = getelementptr inbounds %"class.medialSurface::node", ptr %175, i32 0, i32 2
  %177 = load i16, ptr %176, align 2, !tbaa !37
  %178 = sext i16 %177 to i32
  %179 = load i32, ptr %13, align 4, !tbaa !14
  %180 = sub nsw i32 %178, %179
  %181 = load ptr, ptr %19, align 8, !tbaa !5
  %182 = getelementptr inbounds %"class.medialSurface::node", ptr %181, i32 0, i32 2
  %183 = load i16, ptr %182, align 2, !tbaa !37
  %184 = sext i16 %183 to i32
  %185 = load i32, ptr %13, align 4, !tbaa !14
  %186 = sub nsw i32 %184, %185
  %187 = mul nsw i32 %180, %186
  %188 = add nsw i32 %174, %187
  store i32 %188, ptr %20, align 4, !tbaa !14
  %189 = load i32, ptr %20, align 4, !tbaa !14
  %190 = sitofp i32 %189 to double
  %191 = fadd double %190, 0.000000e+00
  store double %191, ptr %16, align 8, !tbaa !33
  %192 = load i32, ptr %20, align 4, !tbaa !14
  %193 = call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %192)
  %194 = fneg double %193
  %195 = fsub double %194, 1.000000e+00
  %196 = fptosi double %195 to i32
  store i32 %196, ptr %17, align 4, !tbaa !14
  %197 = load ptr, ptr %19, align 8, !tbaa !5
  %198 = getelementptr inbounds %"class.medialSurface::node", ptr %197, i32 0, i32 1
  %199 = load i16, ptr %198, align 2, !tbaa !36
  %200 = sext i16 %199 to i32
  %201 = load i32, ptr %12, align 4, !tbaa !14
  %202 = sub nsw i32 %200, %201
  %203 = sub nsw i32 %202, 1
  store i32 %203, ptr %18, align 4, !tbaa !14
  %204 = load ptr, ptr %19, align 8, !tbaa !5
  %205 = getelementptr inbounds %"class.medialSurface::node", ptr %204, i32 0, i32 0
  %206 = load i16, ptr %205, align 2, !tbaa !34
  %207 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 0
  store i16 %206, ptr %207, align 2, !tbaa !34
  %208 = load ptr, ptr %19, align 8, !tbaa !5
  %209 = getelementptr inbounds %"class.medialSurface::node", ptr %208, i32 0, i32 1
  %210 = load i16, ptr %209, align 2, !tbaa !36
  %211 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 1
  store i16 %210, ptr %211, align 2, !tbaa !36
  %212 = load ptr, ptr %19, align 8, !tbaa !5
  %213 = getelementptr inbounds %"class.medialSurface::node", ptr %212, i32 0, i32 2
  %214 = load i16, ptr %213, align 2, !tbaa !37
  %215 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 2
  store i16 %214, ptr %215, align 2, !tbaa !37
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  br label %216

216:                                              ; preds = %139, %128
  br label %217

217:                                              ; preds = %216, %111
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  %218 = load ptr, ptr %10, align 8, !tbaa !5
  %219 = load i32, ptr %12, align 4, !tbaa !14
  %220 = sext i32 %219 to i64
  %221 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %218, i64 noundef %220) #9
  %222 = load i32, ptr %11, align 4, !tbaa !14
  %223 = sext i32 %222 to i64
  %224 = call noundef nonnull align 2 dereferenceable(6) ptr @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %221, i64 noundef %223) #9
  store ptr %224, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #9
  %225 = load ptr, ptr %21, align 8, !tbaa !5
  %226 = getelementptr inbounds %"class.medialSurface::node", ptr %225, i32 0, i32 0
  %227 = load i16, ptr %226, align 2, !tbaa !34
  %228 = sext i16 %227 to i32
  %229 = load i32, ptr %11, align 4, !tbaa !14
  %230 = sub nsw i32 %228, %229
  %231 = load ptr, ptr %21, align 8, !tbaa !5
  %232 = getelementptr inbounds %"class.medialSurface::node", ptr %231, i32 0, i32 0
  %233 = load i16, ptr %232, align 2, !tbaa !34
  %234 = sext i16 %233 to i32
  %235 = load i32, ptr %11, align 4, !tbaa !14
  %236 = sub nsw i32 %234, %235
  %237 = mul nsw i32 %230, %236
  %238 = load ptr, ptr %21, align 8, !tbaa !5
  %239 = getelementptr inbounds %"class.medialSurface::node", ptr %238, i32 0, i32 1
  %240 = load i16, ptr %239, align 2, !tbaa !36
  %241 = sext i16 %240 to i32
  %242 = load i32, ptr %12, align 4, !tbaa !14
  %243 = sub nsw i32 %241, %242
  %244 = load ptr, ptr %21, align 8, !tbaa !5
  %245 = getelementptr inbounds %"class.medialSurface::node", ptr %244, i32 0, i32 1
  %246 = load i16, ptr %245, align 2, !tbaa !36
  %247 = sext i16 %246 to i32
  %248 = load i32, ptr %12, align 4, !tbaa !14
  %249 = sub nsw i32 %247, %248
  %250 = mul nsw i32 %243, %249
  %251 = add nsw i32 %237, %250
  %252 = load ptr, ptr %21, align 8, !tbaa !5
  %253 = getelementptr inbounds %"class.medialSurface::node", ptr %252, i32 0, i32 2
  %254 = load i16, ptr %253, align 2, !tbaa !37
  %255 = sext i16 %254 to i32
  %256 = load i32, ptr %13, align 4, !tbaa !14
  %257 = sub nsw i32 %255, %256
  %258 = load ptr, ptr %21, align 8, !tbaa !5
  %259 = getelementptr inbounds %"class.medialSurface::node", ptr %258, i32 0, i32 2
  %260 = load i16, ptr %259, align 2, !tbaa !37
  %261 = sext i16 %260 to i32
  %262 = load i32, ptr %13, align 4, !tbaa !14
  %263 = sub nsw i32 %261, %262
  %264 = mul nsw i32 %257, %263
  %265 = add nsw i32 %251, %264
  store i32 %265, ptr %22, align 4, !tbaa !14
  %266 = load i32, ptr %22, align 4, !tbaa !14
  %267 = sitofp i32 %266 to double
  %268 = load double, ptr %16, align 8, !tbaa !33
  %269 = fcmp olt double %267, %268
  br i1 %269, label %270, label %302

270:                                              ; preds = %217
  %271 = load ptr, ptr %21, align 8, !tbaa !5
  %272 = getelementptr inbounds %"class.medialSurface::node", ptr %271, i32 0, i32 0
  %273 = load i16, ptr %272, align 2, !tbaa !34
  %274 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 0
  store i16 %273, ptr %274, align 2, !tbaa !34
  %275 = load ptr, ptr %21, align 8, !tbaa !5
  %276 = getelementptr inbounds %"class.medialSurface::node", ptr %275, i32 0, i32 1
  %277 = load i16, ptr %276, align 2, !tbaa !36
  %278 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 1
  store i16 %277, ptr %278, align 2, !tbaa !36
  %279 = load ptr, ptr %21, align 8, !tbaa !5
  %280 = getelementptr inbounds %"class.medialSurface::node", ptr %279, i32 0, i32 2
  %281 = load i16, ptr %280, align 2, !tbaa !37
  %282 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 2
  store i16 %281, ptr %282, align 2, !tbaa !37
  %283 = load i32, ptr %22, align 4, !tbaa !14
  %284 = sitofp i32 %283 to double
  %285 = fadd double %284, 0.000000e+00
  store double %285, ptr %16, align 8, !tbaa !33
  %286 = load ptr, ptr %21, align 8, !tbaa !5
  %287 = getelementptr inbounds %"class.medialSurface::node", ptr %286, i32 0, i32 2
  %288 = load i16, ptr %287, align 2, !tbaa !37
  %289 = sext i16 %288 to i32
  %290 = load i32, ptr %13, align 4, !tbaa !14
  %291 = sub nsw i32 %289, %290
  %292 = sub nsw i32 %291, 1
  store i32 %292, ptr %17, align 4, !tbaa !14
  %293 = load i32, ptr %12, align 4, !tbaa !14
  %294 = icmp eq i32 %293, 0
  br i1 %294, label %295, label %301

295:                                              ; preds = %270
  %296 = load double, ptr %16, align 8, !tbaa !33
  %297 = call double @sqrt(double noundef %296) #9
  %298 = fneg double %297
  %299 = fsub double %298, 1.000000e+00
  %300 = fptosi double %299 to i32
  store i32 %300, ptr %18, align 4, !tbaa !14
  br label %301

301:                                              ; preds = %295, %270
  br label %302

302:                                              ; preds = %301, %217
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  br label %303

303:                                              ; preds = %302, %100
  br label %545

304:                                              ; preds = %5
  %305 = load i32, ptr %12, align 4, !tbaa !14
  %306 = icmp sgt i32 %305, 0
  br i1 %306, label %307, label %405

307:                                              ; preds = %304
  %308 = load i8, ptr %8, align 1, !tbaa !9
  %309 = zext i8 %308 to i32
  %310 = load ptr, ptr %9, align 8, !tbaa !5
  %311 = getelementptr inbounds i8, ptr %310, i64 8
  %312 = load i32, ptr %11, align 4, !tbaa !14
  %313 = load i32, ptr %12, align 4, !tbaa !14
  %314 = sub nsw i32 %313, 1
  %315 = load i32, ptr %13, align 4, !tbaa !14
  %316 = sext i32 %315 to i64
  %317 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK10voxelFieldIhEclEiim(ptr noundef nonnull align 8 dereferenceable(56) %311, i32 noundef %312, i32 noundef %314, i64 noundef %316)
  %318 = load i8, ptr %317, align 1, !tbaa !9
  %319 = zext i8 %318 to i32
  %320 = icmp ne i32 %309, %319
  br i1 %320, label %321, label %332

321:                                              ; preds = %307
  %322 = load i32, ptr %11, align 4, !tbaa !14
  %323 = trunc i32 %322 to i16
  %324 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 0
  store i16 %323, ptr %324, align 2, !tbaa !34
  %325 = load i32, ptr %12, align 4, !tbaa !14
  %326 = sub nsw i32 %325, 1
  %327 = trunc i32 %326 to i16
  %328 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 1
  store i16 %327, ptr %328, align 2, !tbaa !36
  %329 = load i32, ptr %13, align 4, !tbaa !14
  %330 = trunc i32 %329 to i16
  %331 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 2
  store i16 %330, ptr %331, align 2, !tbaa !37
  store double 1.000000e+00, ptr %16, align 8, !tbaa !33
  store i32 3, ptr %17, align 4, !tbaa !14
  br label %404

332:                                              ; preds = %307
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #9
  %333 = load ptr, ptr %10, align 8, !tbaa !5
  %334 = load i32, ptr %12, align 4, !tbaa !14
  %335 = sub nsw i32 %334, 1
  %336 = sext i32 %335 to i64
  %337 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %333, i64 noundef %336) #9
  %338 = load i32, ptr %11, align 4, !tbaa !14
  %339 = sext i32 %338 to i64
  %340 = call noundef nonnull align 2 dereferenceable(6) ptr @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %337, i64 noundef %339) #9
  store ptr %340, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  %341 = load ptr, ptr %23, align 8, !tbaa !5
  %342 = getelementptr inbounds %"class.medialSurface::node", ptr %341, i32 0, i32 0
  %343 = load i16, ptr %342, align 2, !tbaa !34
  %344 = sext i16 %343 to i32
  %345 = load i32, ptr %11, align 4, !tbaa !14
  %346 = sub nsw i32 %344, %345
  %347 = load ptr, ptr %23, align 8, !tbaa !5
  %348 = getelementptr inbounds %"class.medialSurface::node", ptr %347, i32 0, i32 0
  %349 = load i16, ptr %348, align 2, !tbaa !34
  %350 = sext i16 %349 to i32
  %351 = load i32, ptr %11, align 4, !tbaa !14
  %352 = sub nsw i32 %350, %351
  %353 = mul nsw i32 %346, %352
  %354 = load ptr, ptr %23, align 8, !tbaa !5
  %355 = getelementptr inbounds %"class.medialSurface::node", ptr %354, i32 0, i32 1
  %356 = load i16, ptr %355, align 2, !tbaa !36
  %357 = sext i16 %356 to i32
  %358 = load i32, ptr %12, align 4, !tbaa !14
  %359 = sub nsw i32 %357, %358
  %360 = load ptr, ptr %23, align 8, !tbaa !5
  %361 = getelementptr inbounds %"class.medialSurface::node", ptr %360, i32 0, i32 1
  %362 = load i16, ptr %361, align 2, !tbaa !36
  %363 = sext i16 %362 to i32
  %364 = load i32, ptr %12, align 4, !tbaa !14
  %365 = sub nsw i32 %363, %364
  %366 = mul nsw i32 %359, %365
  %367 = add nsw i32 %353, %366
  %368 = load ptr, ptr %23, align 8, !tbaa !5
  %369 = getelementptr inbounds %"class.medialSurface::node", ptr %368, i32 0, i32 2
  %370 = load i16, ptr %369, align 2, !tbaa !37
  %371 = sext i16 %370 to i32
  %372 = load i32, ptr %13, align 4, !tbaa !14
  %373 = sub nsw i32 %371, %372
  %374 = load ptr, ptr %23, align 8, !tbaa !5
  %375 = getelementptr inbounds %"class.medialSurface::node", ptr %374, i32 0, i32 2
  %376 = load i16, ptr %375, align 2, !tbaa !37
  %377 = sext i16 %376 to i32
  %378 = load i32, ptr %13, align 4, !tbaa !14
  %379 = sub nsw i32 %377, %378
  %380 = mul nsw i32 %373, %379
  %381 = add nsw i32 %367, %380
  store i32 %381, ptr %24, align 4, !tbaa !14
  %382 = load i32, ptr %24, align 4, !tbaa !14
  %383 = sitofp i32 %382 to double
  %384 = fadd double %383, 0.000000e+00
  store double %384, ptr %16, align 8, !tbaa !33
  store i32 0, ptr %17, align 4, !tbaa !14
  %385 = load ptr, ptr %23, align 8, !tbaa !5
  %386 = getelementptr inbounds %"class.medialSurface::node", ptr %385, i32 0, i32 1
  %387 = load i16, ptr %386, align 2, !tbaa !36
  %388 = sext i16 %387 to i32
  %389 = load i32, ptr %12, align 4, !tbaa !14
  %390 = sub nsw i32 %388, %389
  %391 = sub nsw i32 %390, 1
  store i32 %391, ptr %18, align 4, !tbaa !14
  %392 = load ptr, ptr %23, align 8, !tbaa !5
  %393 = getelementptr inbounds %"class.medialSurface::node", ptr %392, i32 0, i32 0
  %394 = load i16, ptr %393, align 2, !tbaa !34
  %395 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 0
  store i16 %394, ptr %395, align 2, !tbaa !34
  %396 = load ptr, ptr %23, align 8, !tbaa !5
  %397 = getelementptr inbounds %"class.medialSurface::node", ptr %396, i32 0, i32 1
  %398 = load i16, ptr %397, align 2, !tbaa !36
  %399 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 1
  store i16 %398, ptr %399, align 2, !tbaa !36
  %400 = load ptr, ptr %23, align 8, !tbaa !5
  %401 = getelementptr inbounds %"class.medialSurface::node", ptr %400, i32 0, i32 2
  %402 = load i16, ptr %401, align 2, !tbaa !37
  %403 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 2
  store i16 %402, ptr %403, align 2, !tbaa !37
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  br label %404

404:                                              ; preds = %332, %321
  br label %544

405:                                              ; preds = %304
  %406 = load i32, ptr %11, align 4, !tbaa !14
  %407 = load i32, ptr %12, align 4, !tbaa !14
  %408 = load i32, ptr %13, align 4, !tbaa !14
  %409 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface8nextSeggEiii(ptr noundef nonnull align 8 dereferenceable(252) %59, i32 noundef %406, i32 noundef %407, i32 noundef %408)
  %410 = getelementptr inbounds %class.segment, ptr %409, i32 0, i32 0
  %411 = load i32, ptr %410, align 8, !tbaa !38
  %412 = call noundef zeroext i1 @_ZNK13medialSurface8isInsideEi(ptr noundef nonnull align 8 dereferenceable(252) %59, i32 noundef %411)
  br i1 %412, label %413, label %483

413:                                              ; preds = %405
  %414 = load i32, ptr %11, align 4, !tbaa !14
  %415 = load i32, ptr %12, align 4, !tbaa !14
  %416 = load i32, ptr %13, align 4, !tbaa !14
  %417 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface8nextSeggEiii(ptr noundef nonnull align 8 dereferenceable(252) %59, i32 noundef %414, i32 noundef %415, i32 noundef %416)
  %418 = getelementptr inbounds %class.segment, ptr %417, i32 0, i32 0
  %419 = load i32, ptr %418, align 8, !tbaa !38
  %420 = load i32, ptr %11, align 4, !tbaa !14
  %421 = sub nsw i32 %419, %420
  store i32 %421, ptr %15, align 4, !tbaa !14
  %422 = load i32, ptr %11, align 4, !tbaa !14
  %423 = load i32, ptr %12, align 4, !tbaa !14
  %424 = load i32, ptr %13, align 4, !tbaa !14
  %425 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface4seggEiii(ptr noundef nonnull align 8 dereferenceable(252) %59, i32 noundef %422, i32 noundef %423, i32 noundef %424)
  %426 = getelementptr inbounds %class.segment, ptr %425, i32 0, i32 0
  %427 = load i32, ptr %426, align 8, !tbaa !38
  %428 = sub nsw i32 %427, 1
  %429 = call noundef zeroext i1 @_ZNK13medialSurface8isInsideEi(ptr noundef nonnull align 8 dereferenceable(252) %59, i32 noundef %428)
  br i1 %429, label %430, label %467

430:                                              ; preds = %413
  %431 = load i32, ptr %11, align 4, !tbaa !14
  %432 = load i32, ptr %11, align 4, !tbaa !14
  %433 = load i32, ptr %12, align 4, !tbaa !14
  %434 = load i32, ptr %13, align 4, !tbaa !14
  %435 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface4seggEiii(ptr noundef nonnull align 8 dereferenceable(252) %59, i32 noundef %432, i32 noundef %433, i32 noundef %434)
  %436 = getelementptr inbounds %class.segment, ptr %435, i32 0, i32 0
  %437 = load i32, ptr %436, align 8, !tbaa !38
  %438 = sub nsw i32 %437, 1
  %439 = sub nsw i32 %431, %438
  %440 = load i32, ptr %15, align 4, !tbaa !14
  %441 = icmp slt i32 %439, %440
  br i1 %441, label %442, label %467

442:                                              ; preds = %430
  %443 = load i32, ptr %11, align 4, !tbaa !14
  %444 = load i32, ptr %11, align 4, !tbaa !14
  %445 = load i32, ptr %12, align 4, !tbaa !14
  %446 = load i32, ptr %13, align 4, !tbaa !14
  %447 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface4seggEiii(ptr noundef nonnull align 8 dereferenceable(252) %59, i32 noundef %444, i32 noundef %445, i32 noundef %446)
  %448 = getelementptr inbounds %class.segment, ptr %447, i32 0, i32 0
  %449 = load i32, ptr %448, align 8, !tbaa !38
  %450 = sub nsw i32 %449, 1
  %451 = sub nsw i32 %443, %450
  store i32 %451, ptr %15, align 4, !tbaa !14
  %452 = load i32, ptr %11, align 4, !tbaa !14
  %453 = load i32, ptr %12, align 4, !tbaa !14
  %454 = load i32, ptr %13, align 4, !tbaa !14
  %455 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface4seggEiii(ptr noundef nonnull align 8 dereferenceable(252) %59, i32 noundef %452, i32 noundef %453, i32 noundef %454)
  %456 = getelementptr inbounds %class.segment, ptr %455, i32 0, i32 0
  %457 = load i32, ptr %456, align 8, !tbaa !38
  %458 = sub nsw i32 %457, 1
  %459 = trunc i32 %458 to i16
  %460 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 0
  store i16 %459, ptr %460, align 2, !tbaa !34
  %461 = load i32, ptr %12, align 4, !tbaa !14
  %462 = trunc i32 %461 to i16
  %463 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 1
  store i16 %462, ptr %463, align 2, !tbaa !36
  %464 = load i32, ptr %13, align 4, !tbaa !14
  %465 = trunc i32 %464 to i16
  %466 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 2
  store i16 %465, ptr %466, align 2, !tbaa !37
  br label %482

467:                                              ; preds = %430, %413
  %468 = load i32, ptr %11, align 4, !tbaa !14
  %469 = load i32, ptr %12, align 4, !tbaa !14
  %470 = load i32, ptr %13, align 4, !tbaa !14
  %471 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface8nextSeggEiii(ptr noundef nonnull align 8 dereferenceable(252) %59, i32 noundef %468, i32 noundef %469, i32 noundef %470)
  %472 = getelementptr inbounds %class.segment, ptr %471, i32 0, i32 0
  %473 = load i32, ptr %472, align 8, !tbaa !38
  %474 = trunc i32 %473 to i16
  %475 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 0
  store i16 %474, ptr %475, align 2, !tbaa !34
  %476 = load i32, ptr %12, align 4, !tbaa !14
  %477 = trunc i32 %476 to i16
  %478 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 1
  store i16 %477, ptr %478, align 2, !tbaa !36
  %479 = load i32, ptr %13, align 4, !tbaa !14
  %480 = trunc i32 %479 to i16
  %481 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 2
  store i16 %480, ptr %481, align 2, !tbaa !37
  br label %482

482:                                              ; preds = %467, %442
  br label %534

483:                                              ; preds = %405
  %484 = load i32, ptr %11, align 4, !tbaa !14
  %485 = load i32, ptr %12, align 4, !tbaa !14
  %486 = load i32, ptr %13, align 4, !tbaa !14
  %487 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface4seggEiii(ptr noundef nonnull align 8 dereferenceable(252) %59, i32 noundef %484, i32 noundef %485, i32 noundef %486)
  %488 = getelementptr inbounds %class.segment, ptr %487, i32 0, i32 0
  %489 = load i32, ptr %488, align 8, !tbaa !38
  %490 = sub nsw i32 %489, 1
  %491 = call noundef zeroext i1 @_ZNK13medialSurface8isInsideEi(ptr noundef nonnull align 8 dereferenceable(252) %59, i32 noundef %490)
  br i1 %491, label %492, label %519

492:                                              ; preds = %483
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  %493 = load i32, ptr %11, align 4, !tbaa !14
  %494 = load i32, ptr %11, align 4, !tbaa !14
  %495 = load i32, ptr %12, align 4, !tbaa !14
  %496 = load i32, ptr %13, align 4, !tbaa !14
  %497 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface4seggEiii(ptr noundef nonnull align 8 dereferenceable(252) %59, i32 noundef %494, i32 noundef %495, i32 noundef %496)
  %498 = getelementptr inbounds %class.segment, ptr %497, i32 0, i32 0
  %499 = load i32, ptr %498, align 8, !tbaa !38
  %500 = sub nsw i32 %493, %499
  %501 = add nsw i32 %500, 1
  store i32 %501, ptr %25, align 4, !tbaa !14
  %502 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %503 = load i32, ptr %502, align 4, !tbaa !14
  store i32 %503, ptr %15, align 4, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  %504 = load i32, ptr %11, align 4, !tbaa !14
  %505 = load i32, ptr %12, align 4, !tbaa !14
  %506 = load i32, ptr %13, align 4, !tbaa !14
  %507 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface4seggEiii(ptr noundef nonnull align 8 dereferenceable(252) %59, i32 noundef %504, i32 noundef %505, i32 noundef %506)
  %508 = getelementptr inbounds %class.segment, ptr %507, i32 0, i32 0
  %509 = load i32, ptr %508, align 8, !tbaa !38
  %510 = sub nsw i32 %509, 1
  %511 = trunc i32 %510 to i16
  %512 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 0
  store i16 %511, ptr %512, align 2, !tbaa !34
  %513 = load i32, ptr %12, align 4, !tbaa !14
  %514 = trunc i32 %513 to i16
  %515 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 1
  store i16 %514, ptr %515, align 2, !tbaa !36
  %516 = load i32, ptr %13, align 4, !tbaa !14
  %517 = trunc i32 %516 to i16
  %518 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 2
  store i16 %517, ptr %518, align 2, !tbaa !37
  br label %533

519:                                              ; preds = %483
  %520 = load i32, ptr %11, align 4, !tbaa !14
  %521 = call noundef zeroext i1 @_ZNK13medialSurface8isInsideEi(ptr noundef nonnull align 8 dereferenceable(252) %59, i32 noundef %520)
  br i1 %521, label %522, label %530

522:                                              ; preds = %519
  %523 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 1
  %524 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 2
  %525 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 3
  %526 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %524, ptr noundef nonnull align 4 dereferenceable(4) %525)
  %527 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %523, ptr noundef nonnull align 4 dereferenceable(4) %526)
  %528 = load i32, ptr %527, align 4, !tbaa !14
  %529 = add nsw i32 %528, 1
  store i32 %529, ptr %15, align 4, !tbaa !14
  br label %532

530:                                              ; preds = %519
  %531 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  br label %532

532:                                              ; preds = %530, %522
  br label %533

533:                                              ; preds = %532, %492
  br label %534

534:                                              ; preds = %533, %482
  %535 = load i32, ptr %15, align 4, !tbaa !14
  %536 = load i32, ptr %15, align 4, !tbaa !14
  %537 = mul nsw i32 %535, %536
  %538 = sitofp i32 %537 to double
  %539 = fadd double %538, 0.000000e+00
  store double %539, ptr %16, align 8, !tbaa !33
  %540 = load i32, ptr %15, align 4, !tbaa !14
  %541 = sub nsw i32 0, %540
  store i32 %541, ptr %17, align 4, !tbaa !14
  %542 = load i32, ptr %15, align 4, !tbaa !14
  %543 = sub nsw i32 0, %542
  store i32 %543, ptr %18, align 4, !tbaa !14
  br label %544

544:                                              ; preds = %534, %404
  br label %545

545:                                              ; preds = %544, %303
  %546 = load i32, ptr %15, align 4, !tbaa !14
  %547 = icmp sle i32 %546, 0
  br i1 %547, label %548, label %575

548:                                              ; preds = %545
  %549 = load i32, ptr %11, align 4, !tbaa !14
  %550 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %549)
  %551 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %550, ptr noundef @.str.1)
  %552 = load i32, ptr %12, align 4, !tbaa !14
  %553 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %551, i32 noundef %552)
  %554 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %553, ptr noundef @.str.1)
  %555 = load i32, ptr %13, align 4, !tbaa !14
  %556 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %554, i32 noundef %555)
  %557 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %556, ptr noundef @.str.2)
  %558 = load i32, ptr %11, align 4, !tbaa !14
  %559 = load i32, ptr %12, align 4, !tbaa !14
  %560 = load i32, ptr %13, align 4, !tbaa !14
  %561 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface4seggEiii(ptr noundef nonnull align 8 dereferenceable(252) %59, i32 noundef %558, i32 noundef %559, i32 noundef %560)
  %562 = getelementptr inbounds %class.segment, ptr %561, i32 0, i32 0
  %563 = load i32, ptr %562, align 8, !tbaa !38
  %564 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %557, i32 noundef %563)
  %565 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %564, ptr noundef @.str.1)
  %566 = load i32, ptr %11, align 4, !tbaa !14
  %567 = load i32, ptr %12, align 4, !tbaa !14
  %568 = load i32, ptr %13, align 4, !tbaa !14
  %569 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface8nextSeggEiii(ptr noundef nonnull align 8 dereferenceable(252) %59, i32 noundef %566, i32 noundef %567, i32 noundef %568)
  %570 = getelementptr inbounds %class.segment, ptr %569, i32 0, i32 0
  %571 = load i32, ptr %570, align 8, !tbaa !38
  %572 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %565, i32 noundef %571)
  %573 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %572, ptr noundef @.str.1)
  %574 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %573, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %575

575:                                              ; preds = %548, %545
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #9
  %576 = load i32, ptr %17, align 4, !tbaa !14
  %577 = sub nsw i32 %576, 1
  store i32 %577, ptr %27, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #9
  %578 = load i32, ptr %13, align 4, !tbaa !14
  %579 = sub nsw i32 0, %578
  store i32 %579, ptr %28, align 4, !tbaa !14
  %580 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %27, ptr noundef nonnull align 4 dereferenceable(4) %28)
  %581 = load i32, ptr %580, align 4, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  store i32 %581, ptr %26, align 4, !tbaa !14
  br label %582

582:                                              ; preds = %813, %575
  %583 = load i32, ptr %26, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #9
  %584 = load double, ptr %16, align 8, !tbaa !33
  %585 = call double @sqrt(double noundef %584) #9
  %586 = fptosi double %585 to i32
  %587 = add nsw i32 %586, 1
  store i32 %587, ptr %29, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #9
  %588 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 3
  %589 = load i32, ptr %588, align 8, !tbaa !18
  %590 = load i32, ptr %13, align 4, !tbaa !14
  %591 = sub nsw i32 %589, %590
  %592 = sub nsw i32 %591, 1
  store i32 %592, ptr %30, align 4, !tbaa !14
  %593 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %29, ptr noundef nonnull align 4 dereferenceable(4) %30)
  %594 = load i32, ptr %593, align 4, !tbaa !14
  %595 = icmp sle i32 %583, %594
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #9
  br i1 %595, label %597, label %596

596:                                              ; preds = %582
  store i32 2, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  br label %816

597:                                              ; preds = %582
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #9
  %598 = load double, ptr %16, align 8, !tbaa !33
  %599 = load i32, ptr %26, align 4, !tbaa !14
  %600 = load i32, ptr %26, align 4, !tbaa !14
  %601 = mul nsw i32 %599, %600
  %602 = sitofp i32 %601 to double
  %603 = fsub double %598, %602
  %604 = call double @sqrt(double noundef %603) #9
  %605 = fadd double %604, 1.001000e+00
  %606 = fptosi double %605 to i32
  store i32 %606, ptr %33, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #9
  %607 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 2
  %608 = load i32, ptr %607, align 4, !tbaa !39
  %609 = load i32, ptr %12, align 4, !tbaa !14
  %610 = sub nsw i32 %608, %609
  %611 = sub nsw i32 %610, 1
  store i32 %611, ptr %34, align 4, !tbaa !14
  %612 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %33, ptr noundef nonnull align 4 dereferenceable(4) %34)
  %613 = load i32, ptr %612, align 4, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  store i32 %613, ptr %32, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #9
  %614 = load double, ptr %16, align 8, !tbaa !33
  %615 = load i32, ptr %26, align 4, !tbaa !14
  %616 = load i32, ptr %26, align 4, !tbaa !14
  %617 = mul nsw i32 %615, %616
  %618 = sitofp i32 %617 to double
  %619 = fsub double %614, %618
  %620 = call double @sqrt(double noundef %619) #9
  %621 = fneg double %620
  %622 = fptosi double %621 to i32
  store i32 %622, ptr %37, align 4, !tbaa !14
  %623 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %37, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %624 = load i32, ptr %623, align 4, !tbaa !14
  %625 = sub nsw i32 %624, 1
  store i32 %625, ptr %36, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #9
  %626 = load i32, ptr %12, align 4, !tbaa !14
  %627 = sub nsw i32 0, %626
  store i32 %627, ptr %38, align 4, !tbaa !14
  %628 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %36, ptr noundef nonnull align 4 dereferenceable(4) %38)
  %629 = load i32, ptr %628, align 4, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #9
  store i32 %629, ptr %35, align 4, !tbaa !14
  br label %630

630:                                              ; preds = %809, %597
  %631 = load i32, ptr %35, align 4, !tbaa !14
  %632 = load i32, ptr %32, align 4, !tbaa !14
  %633 = icmp sle i32 %631, %632
  br i1 %633, label %635, label %634

634:                                              ; preds = %630
  store i32 5, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #9
  br label %812

635:                                              ; preds = %630
  %636 = load i8, ptr %8, align 1, !tbaa !9
  %637 = zext i8 %636 to i32
  %638 = load ptr, ptr %9, align 8, !tbaa !5
  %639 = getelementptr inbounds i8, ptr %638, i64 8
  %640 = load i32, ptr %11, align 4, !tbaa !14
  %641 = load i32, ptr %12, align 4, !tbaa !14
  %642 = load i32, ptr %35, align 4, !tbaa !14
  %643 = add nsw i32 %641, %642
  %644 = load i32, ptr %13, align 4, !tbaa !14
  %645 = load i32, ptr %26, align 4, !tbaa !14
  %646 = add nsw i32 %644, %645
  %647 = sext i32 %646 to i64
  %648 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK10voxelFieldIhEclEiim(ptr noundef nonnull align 8 dereferenceable(56) %639, i32 noundef %640, i32 noundef %643, i64 noundef %647)
  %649 = load i8, ptr %648, align 1, !tbaa !9
  %650 = zext i8 %649 to i32
  %651 = icmp ne i32 %637, %650
  br i1 %651, label %652, label %686

652:                                              ; preds = %635
  %653 = load i32, ptr %35, align 4, !tbaa !14
  %654 = load i32, ptr %35, align 4, !tbaa !14
  %655 = mul nsw i32 %653, %654
  %656 = load i32, ptr %26, align 4, !tbaa !14
  %657 = load i32, ptr %26, align 4, !tbaa !14
  %658 = mul nsw i32 %656, %657
  %659 = add nsw i32 %655, %658
  %660 = sitofp i32 %659 to double
  %661 = load double, ptr %16, align 8, !tbaa !33
  %662 = fcmp olt double %660, %661
  br i1 %662, label %663, label %685

663:                                              ; preds = %652
  %664 = load i32, ptr %35, align 4, !tbaa !14
  %665 = load i32, ptr %35, align 4, !tbaa !14
  %666 = mul nsw i32 %664, %665
  %667 = load i32, ptr %26, align 4, !tbaa !14
  %668 = load i32, ptr %26, align 4, !tbaa !14
  %669 = mul nsw i32 %667, %668
  %670 = add nsw i32 %666, %669
  %671 = sitofp i32 %670 to double
  store double %671, ptr %16, align 8, !tbaa !33
  %672 = load i32, ptr %11, align 4, !tbaa !14
  %673 = trunc i32 %672 to i16
  %674 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 0
  store i16 %673, ptr %674, align 2, !tbaa !34
  %675 = load i32, ptr %12, align 4, !tbaa !14
  %676 = load i32, ptr %35, align 4, !tbaa !14
  %677 = add nsw i32 %675, %676
  %678 = trunc i32 %677 to i16
  %679 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 1
  store i16 %678, ptr %679, align 2, !tbaa !36
  %680 = load i32, ptr %13, align 4, !tbaa !14
  %681 = load i32, ptr %26, align 4, !tbaa !14
  %682 = add nsw i32 %680, %681
  %683 = trunc i32 %682 to i16
  %684 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 2
  store i16 %683, ptr %684, align 2, !tbaa !37
  br label %685

685:                                              ; preds = %663, %652
  br label %808

686:                                              ; preds = %635
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #9
  %687 = load i32, ptr %11, align 4, !tbaa !14
  %688 = load i32, ptr %12, align 4, !tbaa !14
  %689 = load i32, ptr %35, align 4, !tbaa !14
  %690 = add nsw i32 %688, %689
  %691 = load i32, ptr %13, align 4, !tbaa !14
  %692 = load i32, ptr %26, align 4, !tbaa !14
  %693 = add nsw i32 %691, %692
  %694 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface4seggEiii(ptr noundef nonnull align 8 dereferenceable(252) %59, i32 noundef %687, i32 noundef %690, i32 noundef %693)
  store ptr %694, ptr %39, align 8, !tbaa !5
  %695 = load ptr, ptr %39, align 8, !tbaa !5
  %696 = getelementptr inbounds %class.segment, ptr %695, i32 0, i32 0
  %697 = load i32, ptr %696, align 8, !tbaa !38
  %698 = icmp sgt i32 %697, 0
  br i1 %698, label %699, label %749

699:                                              ; preds = %686
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #9
  %700 = load ptr, ptr %39, align 8, !tbaa !5
  %701 = getelementptr inbounds %class.segment, ptr %700, i32 0, i32 0
  %702 = load i32, ptr %701, align 8, !tbaa !38
  %703 = sub nsw i32 %702, 1
  %704 = load i32, ptr %11, align 4, !tbaa !14
  %705 = sub nsw i32 %703, %704
  store i32 %705, ptr %40, align 4, !tbaa !14
  %706 = load i32, ptr %40, align 4, !tbaa !14
  %707 = load i32, ptr %40, align 4, !tbaa !14
  %708 = mul nsw i32 %706, %707
  %709 = load i32, ptr %35, align 4, !tbaa !14
  %710 = load i32, ptr %35, align 4, !tbaa !14
  %711 = mul nsw i32 %709, %710
  %712 = add nsw i32 %708, %711
  %713 = load i32, ptr %26, align 4, !tbaa !14
  %714 = load i32, ptr %26, align 4, !tbaa !14
  %715 = mul nsw i32 %713, %714
  %716 = add nsw i32 %712, %715
  %717 = sitofp i32 %716 to double
  %718 = load double, ptr %16, align 8, !tbaa !33
  %719 = fcmp olt double %717, %718
  br i1 %719, label %720, label %748

720:                                              ; preds = %699
  %721 = load i32, ptr %40, align 4, !tbaa !14
  %722 = load i32, ptr %40, align 4, !tbaa !14
  %723 = mul nsw i32 %721, %722
  %724 = load i32, ptr %35, align 4, !tbaa !14
  %725 = load i32, ptr %35, align 4, !tbaa !14
  %726 = mul nsw i32 %724, %725
  %727 = add nsw i32 %723, %726
  %728 = load i32, ptr %26, align 4, !tbaa !14
  %729 = load i32, ptr %26, align 4, !tbaa !14
  %730 = mul nsw i32 %728, %729
  %731 = add nsw i32 %727, %730
  %732 = sitofp i32 %731 to double
  store double %732, ptr %16, align 8, !tbaa !33
  %733 = load i32, ptr %11, align 4, !tbaa !14
  %734 = load i32, ptr %40, align 4, !tbaa !14
  %735 = add nsw i32 %733, %734
  %736 = trunc i32 %735 to i16
  %737 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 0
  store i16 %736, ptr %737, align 2, !tbaa !34
  %738 = load i32, ptr %12, align 4, !tbaa !14
  %739 = load i32, ptr %35, align 4, !tbaa !14
  %740 = add nsw i32 %738, %739
  %741 = trunc i32 %740 to i16
  %742 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 1
  store i16 %741, ptr %742, align 2, !tbaa !36
  %743 = load i32, ptr %13, align 4, !tbaa !14
  %744 = load i32, ptr %26, align 4, !tbaa !14
  %745 = add nsw i32 %743, %744
  %746 = trunc i32 %745 to i16
  %747 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 2
  store i16 %746, ptr %747, align 2, !tbaa !37
  br label %748

748:                                              ; preds = %720, %699
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #9
  br label %749

749:                                              ; preds = %748, %686
  %750 = load ptr, ptr %39, align 8, !tbaa !5
  %751 = getelementptr inbounds %class.segment, ptr %750, i64 1
  %752 = getelementptr inbounds %class.segment, ptr %751, i32 0, i32 0
  %753 = load i32, ptr %752, align 8, !tbaa !38
  %754 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 1
  %755 = load i32, ptr %754, align 8, !tbaa !32
  %756 = icmp slt i32 %753, %755
  br i1 %756, label %757, label %807

757:                                              ; preds = %749
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #9
  %758 = load ptr, ptr %39, align 8, !tbaa !5
  %759 = getelementptr inbounds %class.segment, ptr %758, i64 1
  %760 = getelementptr inbounds %class.segment, ptr %759, i32 0, i32 0
  %761 = load i32, ptr %760, align 8, !tbaa !38
  %762 = load i32, ptr %11, align 4, !tbaa !14
  %763 = sub nsw i32 %761, %762
  store i32 %763, ptr %41, align 4, !tbaa !14
  %764 = load i32, ptr %41, align 4, !tbaa !14
  %765 = load i32, ptr %41, align 4, !tbaa !14
  %766 = mul nsw i32 %764, %765
  %767 = load i32, ptr %35, align 4, !tbaa !14
  %768 = load i32, ptr %35, align 4, !tbaa !14
  %769 = mul nsw i32 %767, %768
  %770 = add nsw i32 %766, %769
  %771 = load i32, ptr %26, align 4, !tbaa !14
  %772 = load i32, ptr %26, align 4, !tbaa !14
  %773 = mul nsw i32 %771, %772
  %774 = add nsw i32 %770, %773
  %775 = sitofp i32 %774 to double
  %776 = load double, ptr %16, align 8, !tbaa !33
  %777 = fcmp olt double %775, %776
  br i1 %777, label %778, label %806

778:                                              ; preds = %757
  %779 = load i32, ptr %41, align 4, !tbaa !14
  %780 = load i32, ptr %41, align 4, !tbaa !14
  %781 = mul nsw i32 %779, %780
  %782 = load i32, ptr %35, align 4, !tbaa !14
  %783 = load i32, ptr %35, align 4, !tbaa !14
  %784 = mul nsw i32 %782, %783
  %785 = add nsw i32 %781, %784
  %786 = load i32, ptr %26, align 4, !tbaa !14
  %787 = load i32, ptr %26, align 4, !tbaa !14
  %788 = mul nsw i32 %786, %787
  %789 = add nsw i32 %785, %788
  %790 = sitofp i32 %789 to double
  store double %790, ptr %16, align 8, !tbaa !33
  %791 = load i32, ptr %11, align 4, !tbaa !14
  %792 = load i32, ptr %41, align 4, !tbaa !14
  %793 = add nsw i32 %791, %792
  %794 = trunc i32 %793 to i16
  %795 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 0
  store i16 %794, ptr %795, align 2, !tbaa !34
  %796 = load i32, ptr %12, align 4, !tbaa !14
  %797 = load i32, ptr %35, align 4, !tbaa !14
  %798 = add nsw i32 %796, %797
  %799 = trunc i32 %798 to i16
  %800 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 1
  store i16 %799, ptr %800, align 2, !tbaa !36
  %801 = load i32, ptr %13, align 4, !tbaa !14
  %802 = load i32, ptr %26, align 4, !tbaa !14
  %803 = add nsw i32 %801, %802
  %804 = trunc i32 %803 to i16
  %805 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 2
  store i16 %804, ptr %805, align 2, !tbaa !37
  br label %806

806:                                              ; preds = %778, %757
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #9
  br label %807

807:                                              ; preds = %806, %749
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #9
  br label %808

808:                                              ; preds = %807, %685
  br label %809

809:                                              ; preds = %808
  %810 = load i32, ptr %35, align 4, !tbaa !14
  %811 = add nsw i32 %810, 1
  store i32 %811, ptr %35, align 4, !tbaa !14
  br label %630, !llvm.loop !40

812:                                              ; preds = %634
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #9
  br label %813

813:                                              ; preds = %812
  %814 = load i32, ptr %26, align 4, !tbaa !14
  %815 = add nsw i32 %814, 1
  store i32 %815, ptr %26, align 4, !tbaa !14
  br label %582, !llvm.loop !42

816:                                              ; preds = %596
  %817 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 0
  %818 = load i16, ptr %817, align 2, !tbaa !34
  %819 = sext i16 %818 to i32
  %820 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 1
  %821 = load i16, ptr %820, align 2, !tbaa !36
  %822 = sext i16 %821 to i32
  %823 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 2
  %824 = load i16, ptr %823, align 2, !tbaa !37
  %825 = sext i16 %824 to i32
  %826 = call noundef zeroext i1 @_ZNK13medialSurface8isInsideEiii(ptr noundef nonnull align 8 dereferenceable(252) %59, i32 noundef %819, i32 noundef %822, i32 noundef %825)
  br i1 %826, label %931, label %827

827:                                              ; preds = %816
  %828 = load i32, ptr %11, align 4, !tbaa !14
  %829 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 1
  %830 = load i32, ptr %829, align 8, !tbaa !32
  %831 = sdiv i32 %830, 2
  %832 = icmp slt i32 %828, %831
  br i1 %832, label %833, label %839

833:                                              ; preds = %827
  %834 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 1
  %835 = load i32, ptr %834, align 8, !tbaa !32
  %836 = sub nsw i32 0, %835
  %837 = sdiv i32 %836, 4
  %838 = sub nsw i32 %837, 1
  br label %845

839:                                              ; preds = %827
  %840 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 1
  %841 = load i32, ptr %840, align 8, !tbaa !32
  %842 = mul nsw i32 %841, 5
  %843 = sdiv i32 %842, 4
  %844 = add nsw i32 %843, 1
  br label %845

845:                                              ; preds = %839, %833
  %846 = phi i32 [ %838, %833 ], [ %844, %839 ]
  %847 = trunc i32 %846 to i16
  %848 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 0
  store i16 %847, ptr %848, align 2, !tbaa !34
  %849 = load i32, ptr %12, align 4, !tbaa !14
  %850 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 2
  %851 = load i32, ptr %850, align 4, !tbaa !39
  %852 = sdiv i32 %851, 2
  %853 = icmp slt i32 %849, %852
  br i1 %853, label %854, label %860

854:                                              ; preds = %845
  %855 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 2
  %856 = load i32, ptr %855, align 4, !tbaa !39
  %857 = sub nsw i32 0, %856
  %858 = sdiv i32 %857, 4
  %859 = sub nsw i32 %858, 1
  br label %866

860:                                              ; preds = %845
  %861 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 2
  %862 = load i32, ptr %861, align 4, !tbaa !39
  %863 = mul nsw i32 %862, 5
  %864 = sdiv i32 %863, 4
  %865 = add nsw i32 %864, 1
  br label %866

866:                                              ; preds = %860, %854
  %867 = phi i32 [ %859, %854 ], [ %865, %860 ]
  %868 = trunc i32 %867 to i16
  %869 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 1
  store i16 %868, ptr %869, align 2, !tbaa !36
  %870 = load i32, ptr %13, align 4, !tbaa !14
  %871 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 3
  %872 = load i32, ptr %871, align 8, !tbaa !18
  %873 = sdiv i32 %872, 2
  %874 = icmp slt i32 %870, %873
  br i1 %874, label %875, label %881

875:                                              ; preds = %866
  %876 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 3
  %877 = load i32, ptr %876, align 8, !tbaa !18
  %878 = sub nsw i32 0, %877
  %879 = sdiv i32 %878, 4
  %880 = sub nsw i32 %879, 1
  br label %887

881:                                              ; preds = %866
  %882 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 3
  %883 = load i32, ptr %882, align 8, !tbaa !18
  %884 = mul nsw i32 %883, 5
  %885 = sdiv i32 %884, 4
  %886 = add nsw i32 %885, 1
  br label %887

887:                                              ; preds = %881, %875
  %888 = phi i32 [ %880, %875 ], [ %886, %881 ]
  %889 = trunc i32 %888 to i16
  %890 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 2
  store i16 %889, ptr %890, align 2, !tbaa !37
  %891 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 0
  %892 = load i16, ptr %891, align 2, !tbaa !34
  %893 = sext i16 %892 to i32
  %894 = load i32, ptr %11, align 4, !tbaa !14
  %895 = sub nsw i32 %893, %894
  %896 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 0
  %897 = load i16, ptr %896, align 2, !tbaa !34
  %898 = sext i16 %897 to i32
  %899 = load i32, ptr %11, align 4, !tbaa !14
  %900 = sub nsw i32 %898, %899
  %901 = mul nsw i32 %895, %900
  %902 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 1
  %903 = load i16, ptr %902, align 2, !tbaa !36
  %904 = sext i16 %903 to i32
  %905 = load i32, ptr %12, align 4, !tbaa !14
  %906 = sub nsw i32 %904, %905
  %907 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 1
  %908 = load i16, ptr %907, align 2, !tbaa !36
  %909 = sext i16 %908 to i32
  %910 = load i32, ptr %12, align 4, !tbaa !14
  %911 = sub nsw i32 %909, %910
  %912 = mul nsw i32 %906, %911
  %913 = add nsw i32 %901, %912
  %914 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 2
  %915 = load i16, ptr %914, align 2, !tbaa !37
  %916 = sext i16 %915 to i32
  %917 = load i32, ptr %13, align 4, !tbaa !14
  %918 = sub nsw i32 %916, %917
  %919 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 2
  %920 = load i16, ptr %919, align 2, !tbaa !37
  %921 = sext i16 %920 to i32
  %922 = load i32, ptr %13, align 4, !tbaa !14
  %923 = sub nsw i32 %921, %922
  %924 = mul nsw i32 %918, %923
  %925 = add nsw i32 %913, %924
  %926 = call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %925)
  %927 = fsub double %926, 5.000000e-01
  %928 = fptrunc double %927 to float
  %929 = load ptr, ptr %7, align 8, !tbaa !5
  %930 = getelementptr inbounds %class.voxel, ptr %929, i32 0, i32 5
  store float %928, ptr %930, align 8, !tbaa !43
  br label %1119

931:                                              ; preds = %816
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #9
  %932 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 0
  %933 = load i16, ptr %932, align 2, !tbaa !34
  %934 = sext i16 %933 to i32
  %935 = load i32, ptr %11, align 4, !tbaa !14
  %936 = sub nsw i32 %934, %935
  %937 = call i32 @llvm.abs.i32(i32 %936, i1 true)
  store i32 %937, ptr %42, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #9
  %938 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 1
  %939 = load i16, ptr %938, align 2, !tbaa !36
  %940 = sext i16 %939 to i32
  %941 = load i32, ptr %12, align 4, !tbaa !14
  %942 = sub nsw i32 %940, %941
  %943 = call i32 @llvm.abs.i32(i32 %942, i1 true)
  store i32 %943, ptr %43, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #9
  %944 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 2
  %945 = load i16, ptr %944, align 2, !tbaa !37
  %946 = sext i16 %945 to i32
  %947 = load i32, ptr %13, align 4, !tbaa !14
  %948 = sub nsw i32 %946, %947
  %949 = call i32 @llvm.abs.i32(i32 %948, i1 true)
  store i32 %949, ptr %44, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #9
  %950 = load i32, ptr %42, align 4, !tbaa !14
  %951 = load i32, ptr %42, align 4, !tbaa !14
  %952 = mul nsw i32 %950, %951
  %953 = load i32, ptr %43, align 4, !tbaa !14
  %954 = load i32, ptr %43, align 4, !tbaa !14
  %955 = mul nsw i32 %953, %954
  %956 = add nsw i32 %952, %955
  %957 = load i32, ptr %44, align 4, !tbaa !14
  %958 = load i32, ptr %44, align 4, !tbaa !14
  %959 = mul nsw i32 %957, %958
  %960 = add nsw i32 %956, %959
  %961 = call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %960)
  %962 = fsub double %961, 5.000000e-01
  store double %962, ptr %45, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #9
  %963 = load i32, ptr %12, align 4, !tbaa !14
  %964 = add nsw i32 %963, 2
  store i32 %964, ptr %47, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #9
  %965 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 2
  %966 = load i32, ptr %965, align 4, !tbaa !39
  %967 = load i32, ptr %12, align 4, !tbaa !14
  %968 = sub nsw i32 %966, %967
  %969 = add nsw i32 %968, 1
  store i32 %969, ptr %48, align 4, !tbaa !14
  %970 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %47, ptr noundef nonnull align 4 dereferenceable(4) %48)
  %971 = load i32, ptr %970, align 4, !tbaa !14
  %972 = sitofp i32 %971 to double
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #9
  store double %972, ptr %46, align 8, !tbaa !33
  %973 = load double, ptr %46, align 8, !tbaa !33
  %974 = load double, ptr %45, align 8, !tbaa !33
  %975 = fcmp olt double %973, %974
  br i1 %975, label %976, label %988

976:                                              ; preds = %931
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #9
  %977 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 15
  %978 = load double, ptr %977, align 8, !tbaa !44
  %979 = fsub double 1.000000e+00, %978
  %980 = load double, ptr %45, align 8, !tbaa !33
  %981 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 15
  %982 = load double, ptr %981, align 8, !tbaa !44
  %983 = load double, ptr %46, align 8, !tbaa !33
  %984 = fmul double %982, %983
  %985 = call double @llvm.fmuladd.f64(double %979, double %980, double %984)
  store double %985, ptr %49, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #9
  store double 1.000000e-02, ptr %50, align 8, !tbaa !33
  %986 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull align 8 dereferenceable(8) %50)
  %987 = load double, ptr %986, align 8, !tbaa !33
  store double %987, ptr %45, align 8, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #9
  br label %988

988:                                              ; preds = %976, %931
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #9
  %989 = load i32, ptr %13, align 4, !tbaa !14
  %990 = add nsw i32 %989, 2
  store i32 %990, ptr %51, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #9
  %991 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 3
  %992 = load i32, ptr %991, align 8, !tbaa !18
  %993 = load i32, ptr %13, align 4, !tbaa !14
  %994 = sub nsw i32 %992, %993
  %995 = add nsw i32 %994, 1
  store i32 %995, ptr %52, align 4, !tbaa !14
  %996 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %51, ptr noundef nonnull align 4 dereferenceable(4) %52)
  %997 = load i32, ptr %996, align 4, !tbaa !14
  %998 = sitofp i32 %997 to double
  store double %998, ptr %46, align 8, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #9
  %999 = load double, ptr %46, align 8, !tbaa !33
  %1000 = load double, ptr %45, align 8, !tbaa !33
  %1001 = fcmp olt double %999, %1000
  br i1 %1001, label %1002, label %1014

1002:                                             ; preds = %988
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #9
  %1003 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 15
  %1004 = load double, ptr %1003, align 8, !tbaa !44
  %1005 = fsub double 1.000000e+00, %1004
  %1006 = load double, ptr %45, align 8, !tbaa !33
  %1007 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 15
  %1008 = load double, ptr %1007, align 8, !tbaa !44
  %1009 = load double, ptr %46, align 8, !tbaa !33
  %1010 = fmul double %1008, %1009
  %1011 = call double @llvm.fmuladd.f64(double %1005, double %1006, double %1010)
  store double %1011, ptr %53, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #9
  store double 1.000000e-02, ptr %54, align 8, !tbaa !33
  %1012 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull align 8 dereferenceable(8) %54)
  %1013 = load double, ptr %1012, align 8, !tbaa !33
  store double %1013, ptr %45, align 8, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #9
  br label %1014

1014:                                             ; preds = %1002, %988
  call void @llvm.lifetime.start.p0(i64 4, ptr %55) #9
  %1015 = load i32, ptr %11, align 4, !tbaa !14
  %1016 = add nsw i32 %1015, 2
  store i32 %1016, ptr %55, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %56) #9
  %1017 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 1
  %1018 = load i32, ptr %1017, align 8, !tbaa !32
  %1019 = load i32, ptr %11, align 4, !tbaa !14
  %1020 = sub nsw i32 %1018, %1019
  %1021 = add nsw i32 %1020, 1
  store i32 %1021, ptr %56, align 4, !tbaa !14
  %1022 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %55, ptr noundef nonnull align 4 dereferenceable(4) %56)
  %1023 = load i32, ptr %1022, align 4, !tbaa !14
  %1024 = sitofp i32 %1023 to double
  store double %1024, ptr %46, align 8, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #9
  %1025 = load double, ptr %46, align 8, !tbaa !33
  %1026 = load double, ptr %45, align 8, !tbaa !33
  %1027 = fcmp olt double %1025, %1026
  br i1 %1027, label %1028, label %1040

1028:                                             ; preds = %1014
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #9
  %1029 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 14
  %1030 = load double, ptr %1029, align 8, !tbaa !45
  %1031 = fsub double 1.000000e+00, %1030
  %1032 = load double, ptr %45, align 8, !tbaa !33
  %1033 = getelementptr inbounds %class.medialSurface, ptr %59, i32 0, i32 14
  %1034 = load double, ptr %1033, align 8, !tbaa !45
  %1035 = load double, ptr %46, align 8, !tbaa !33
  %1036 = fmul double %1034, %1035
  %1037 = call double @llvm.fmuladd.f64(double %1031, double %1032, double %1036)
  store double %1037, ptr %57, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #9
  store double 1.000000e-01, ptr %58, align 8, !tbaa !33
  %1038 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull align 8 dereferenceable(8) %58)
  %1039 = load double, ptr %1038, align 8, !tbaa !33
  store double %1039, ptr %45, align 8, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #9
  br label %1040

1040:                                             ; preds = %1028, %1014
  %1041 = load double, ptr %45, align 8, !tbaa !33
  %1042 = fptrunc double %1041 to float
  %1043 = load ptr, ptr %7, align 8, !tbaa !5
  %1044 = getelementptr inbounds %class.voxel, ptr %1043, i32 0, i32 5
  store float %1042, ptr %1044, align 8, !tbaa !43
  %1045 = load double, ptr %16, align 8, !tbaa !33
  %1046 = fcmp ole double %1045, 0.000000e+00
  br i1 %1046, label %1047, label %1052

1047:                                             ; preds = %1040
  %1048 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
  %1049 = load double, ptr %16, align 8, !tbaa !33
  %1050 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %1048, double noundef %1049)
  %1051 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %1050, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %1052

1052:                                             ; preds = %1047, %1040
  %1053 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 0
  %1054 = load i16, ptr %1053, align 2, !tbaa !34
  %1055 = sext i16 %1054 to i32
  %1056 = icmp slt i32 %1055, -2000
  br i1 %1056, label %1060, label %1057

1057:                                             ; preds = %1052
  %1058 = load double, ptr %45, align 8, !tbaa !33
  %1059 = fcmp ogt double %1058, 1.600000e+07
  br i1 %1059, label %1060, label %1118

1060:                                             ; preds = %1057, %1052
  %1061 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.4)
  %1062 = getelementptr inbounds %"class.medialSurface::node", ptr %14, i32 0, i32 0
  %1063 = load i16, ptr %1062, align 2, !tbaa !34
  %1064 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEs(ptr noundef nonnull align 8 dereferenceable(8) %1061, i16 noundef signext %1063)
  %1065 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %1064, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %1066 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.5)
  %1067 = load double, ptr %16, align 8, !tbaa !33
  %1068 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %1066, double noundef %1067)
  %1069 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %1068, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %1070 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.6)
  %1071 = load i32, ptr %17, align 4, !tbaa !14
  %1072 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %1070, i32 noundef %1071)
  %1073 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %1072, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %1074 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.7)
  %1075 = load i32, ptr %11, align 4, !tbaa !14
  %1076 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %1074, i32 noundef %1075)
  %1077 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1076, ptr noundef @.str.8)
  %1078 = load i32, ptr %12, align 4, !tbaa !14
  %1079 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %1077, i32 noundef %1078)
  %1080 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1079, ptr noundef @.str.9)
  %1081 = load i32, ptr %13, align 4, !tbaa !14
  %1082 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %1080, i32 noundef %1081)
  %1083 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %1082, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %1084 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.10)
  %1085 = load ptr, ptr %10, align 8, !tbaa !5
  %1086 = load i32, ptr %12, align 4, !tbaa !14
  %1087 = sext i32 %1086 to i64
  %1088 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1085, i64 noundef %1087) #9
  %1089 = load i32, ptr %11, align 4, !tbaa !14
  %1090 = sext i32 %1089 to i64
  %1091 = call noundef nonnull align 2 dereferenceable(6) ptr @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1088, i64 noundef %1090) #9
  %1092 = getelementptr inbounds %"class.medialSurface::node", ptr %1091, i32 0, i32 0
  %1093 = load i16, ptr %1092, align 2, !tbaa !34
  %1094 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEs(ptr noundef nonnull align 8 dereferenceable(8) %1084, i16 noundef signext %1093)
  %1095 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1094, ptr noundef @.str.8)
  %1096 = load ptr, ptr %10, align 8, !tbaa !5
  %1097 = load i32, ptr %12, align 4, !tbaa !14
  %1098 = sext i32 %1097 to i64
  %1099 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1096, i64 noundef %1098) #9
  %1100 = load i32, ptr %11, align 4, !tbaa !14
  %1101 = sext i32 %1100 to i64
  %1102 = call noundef nonnull align 2 dereferenceable(6) ptr @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1099, i64 noundef %1101) #9
  %1103 = getelementptr inbounds %"class.medialSurface::node", ptr %1102, i32 0, i32 1
  %1104 = load i16, ptr %1103, align 2, !tbaa !36
  %1105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEs(ptr noundef nonnull align 8 dereferenceable(8) %1095, i16 noundef signext %1104)
  %1106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1105, ptr noundef @.str.9)
  %1107 = load ptr, ptr %10, align 8, !tbaa !5
  %1108 = load i32, ptr %12, align 4, !tbaa !14
  %1109 = sext i32 %1108 to i64
  %1110 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1107, i64 noundef %1109) #9
  %1111 = load i32, ptr %11, align 4, !tbaa !14
  %1112 = sext i32 %1111 to i64
  %1113 = call noundef nonnull align 2 dereferenceable(6) ptr @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1110, i64 noundef %1112) #9
  %1114 = getelementptr inbounds %"class.medialSurface::node", ptr %1113, i32 0, i32 2
  %1115 = load i16, ptr %1114, align 2, !tbaa !37
  %1116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEs(ptr noundef nonnull align 8 dereferenceable(8) %1106, i16 noundef signext %1115)
  %1117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %1116, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @exit(i32 noundef 0) #10
  unreachable

1118:                                             ; preds = %1057
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #9
  br label %1119

1119:                                             ; preds = %1118, %887
  %1120 = load ptr, ptr %10, align 8, !tbaa !5
  %1121 = load i32, ptr %12, align 4, !tbaa !14
  %1122 = sext i32 %1121 to i64
  %1123 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1120, i64 noundef %1122) #9
  %1124 = load i32, ptr %11, align 4, !tbaa !14
  %1125 = sext i32 %1124 to i64
  %1126 = call noundef nonnull align 2 dereferenceable(6) ptr @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1123, i64 noundef %1125) #9
  call void @_ZN13medialSurface4nodeaSERKS0_(ptr noundef nonnull align 2 dereferenceable(6) %1126, ptr noundef nonnull align 2 dereferenceable(6) %14)
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 6, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN13medialSurface4nodeC2Eiii(ptr noundef nonnull align 2 dereferenceable(6), i32 noundef, i32 noundef, i32 noundef) unnamed_addr #2 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef) #3

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK13medialSurface8isInsideEi(ptr noundef nonnull align 8 dereferenceable(252), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface8nextSeggEiii(ptr noundef nonnull align 8 dereferenceable(252), i32 noundef, i32 noundef, i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface4seggEiii(ptr noundef nonnull align 8 dereferenceable(252), i32 noundef, i32 noundef, i32 noundef) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK13medialSurface8isInsideEiii(ptr noundef nonnull align 8 dereferenceable(252), i32 noundef, i32 noundef, i32 noundef) #2 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #7

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) #0 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEs(ptr noundef nonnull align 8 dereferenceable(8), i16 noundef signext) #6

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN13medialSurface4nodeaSERKS0_(ptr noundef nonnull align 2 dereferenceable(6), ptr noundef nonnull align 2 dereferenceable(6)) #2 align 2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { noreturn 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 #9 = { nounwind }
attributes #10 = { noreturn 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 = !{!7, !7, i64 0}
!10 = !{!11, !12, i64 8}
!11 = !{!"_ZTS5voxel", !6, i64 0, !12, i64 8, !12, i64 10, !12, i64 12, !13, i64 16}
!12 = !{!"short", !7, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!11, !12, i64 10}
!17 = !{!11, !12, i64 12}
!18 = !{!19, !15, i64 16}
!19 = !{!"_ZTS13medialSurface", !6, i64 0, !15, i64 8, !15, i64 12, !15, i64 16, !20, i64 24, !20, i64 32, !6, i64 40, !21, i64 48, !22, i64 64, !26, i64 88, !30, i64 112, !13, i64 176, !31, i64 184, !31, i64 192, !31, i64 200, !31, i64 208, !31, i64 216, !31, i64 224, !15, i64 232, !31, i64 240, !13, i64 248}
!20 = !{!"long", !7, i64 0}
!21 = !{!"_ZTS7segment", !15, i64 0, !7, i64 4, !6, i64 8}
!22 = !{!"_ZTSSt6vectorI5voxelSaIS0_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseI5voxelSaIS0_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseI5voxelSaIS0_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseI5voxelSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"_ZTSSt6vectorI10medialBallSaIS0_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseI10medialBallSaIS0_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseI10medialBallSaIS0_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseI10medialBallSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!30 = !{!"_ZTS10medialBall", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !12, i64 20, !13, i64 24, !12, i64 28, !12, i64 30, !12, i64 32, !12, i64 34, !12, i64 36, !6, i64 40, !6, i64 48, !6, i64 56}
!31 = !{!"double", !7, i64 0}
!32 = !{!19, !15, i64 8}
!33 = !{!31, !31, i64 0}
!34 = !{!35, !12, i64 0}
!35 = !{!"_ZTSN13medialSurface4nodeE", !12, i64 0, !12, i64 2, !12, i64 4}
!36 = !{!35, !12, i64 2}
!37 = !{!35, !12, i64 4}
!38 = !{!21, !15, i64 0}
!39 = !{!19, !15, i64 12}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}
!42 = distinct !{!42, !41}
!43 = !{!11, !13, i64 16}
!44 = !{!19, !31, i64 192}
!45 = !{!19, !31, i64 184}


; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.medialSurface::node" = type { i16, i16, i16 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK13medialSurface12calc_distmapEP5voxelhRK11voxelImageTIhERSt6vectorIS6_INS_4nodeESaIS7_EESaIS9_EE(ptr noundef nonnull align 8 dereferenceable(252) %0, ptr nocapture noundef %1, i8 noundef zeroext %2, ptr noundef nonnull align 8 dereferenceable(112) %3, ptr noundef nonnull align 8 dereferenceable(24) %4) local_unnamed_addr #0 align 2 {
  %6 = alloca %"class.medialSurface::node", align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  %31 = getelementptr inbounds i8, ptr %1, i64 8
  %32 = load i16, ptr %31, align 8, !tbaa !5
  %33 = sext i16 %32 to i32
  %34 = getelementptr inbounds i8, ptr %1, i64 10
  %35 = load i16, ptr %34, align 2, !tbaa !12
  %36 = sext i16 %35 to i32
  %37 = sub nsw i32 0, %36
  %38 = getelementptr inbounds i8, ptr %1, i64 12
  %39 = load i16, ptr %38, align 4, !tbaa !13
  %40 = sext i16 %39 to i32
  %41 = sub nsw i32 0, %40
  call void @llvm.lifetime.start.p0(i64 6, ptr nonnull %6) #10
  %42 = getelementptr inbounds i8, ptr %0, i64 16
  %43 = load i32, ptr %42, align 8, !tbaa !14
  %44 = sub nsw i32 0, %43
  call void @_ZN13medialSurface4nodeC2Eiii(ptr noundef nonnull align 2 dereferenceable(6) %6, i32 noundef %33, i32 noundef %36, i32 noundef %44)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #10
  %45 = getelementptr inbounds i8, ptr %0, i64 8
  %46 = load i32, ptr %45, align 8, !tbaa !29
  %47 = shl nsw i32 %46, 1
  store i32 %47, ptr %7, align 4, !tbaa !30
  %48 = mul nsw i32 %47, %47
  %49 = uitofp nneg i32 %48 to double
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #10
  store i32 0, ptr %8, align 4, !tbaa !30
  %50 = icmp sgt i16 %39, 0
  br i1 %50, label %51, label %137

51:                                               ; preds = %5
  %52 = getelementptr inbounds i8, ptr %3, i64 8
  %53 = add nsw i32 %40, -1
  %54 = zext nneg i32 %53 to i64
  %55 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK10voxelFieldIhEclEiim(ptr noundef nonnull align 8 dereferenceable(56) %52, i32 noundef %33, i32 noundef %36, i64 noundef %54)
  %56 = load i8, ptr %55, align 1, !tbaa !31
  %.not322 = icmp eq i8 %56, %2
  br i1 %.not322, label %61, label %57

57:                                               ; preds = %51
  store i16 %32, ptr %6, align 4, !tbaa !32
  %58 = getelementptr inbounds i8, ptr %6, i64 2
  store i16 %35, ptr %58, align 2, !tbaa !34
  %59 = trunc nuw nsw i32 %53 to i16
  %60 = getelementptr inbounds i8, ptr %6, i64 4
  store i16 %59, ptr %60, align 4, !tbaa !35
  br label %thread-pre-split

61:                                               ; preds = %51
  %62 = icmp sgt i16 %35, 0
  br i1 %62, label %63, label %103

63:                                               ; preds = %61
  %64 = add nsw i32 %36, -1
  %65 = zext nneg i32 %40 to i64
  %66 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK10voxelFieldIhEclEiim(ptr noundef nonnull align 8 dereferenceable(56) %52, i32 noundef %33, i32 noundef %64, i64 noundef %65)
  %67 = load i8, ptr %66, align 1, !tbaa !31
  %.not323 = icmp eq i8 %67, %2
  br i1 %.not323, label %71, label %68

68:                                               ; preds = %63
  store i16 %32, ptr %6, align 4, !tbaa !32
  %69 = trunc nuw nsw i32 %64 to i16
  %70 = getelementptr inbounds i8, ptr %6, i64 2
  store i16 %69, ptr %70, align 2, !tbaa !34
  br label %.sink.split

71:                                               ; preds = %63
  %72 = zext nneg i32 %64 to i64
  %73 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %72) #10
  %74 = sext i16 %32 to i64
  %75 = call noundef nonnull align 2 dereferenceable(6) ptr @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %73, i64 noundef %74) #10
  %76 = load i16, ptr %75, align 2, !tbaa !32
  %77 = sext i16 %76 to i32
  %78 = sub nsw i32 %77, %33
  %79 = mul nsw i32 %78, %78
  %80 = getelementptr inbounds i8, ptr %75, i64 2
  %81 = load i16, ptr %80, align 2, !tbaa !34
  %82 = sext i16 %81 to i32
  %83 = sub nsw i32 %82, %36
  %84 = mul nsw i32 %83, %83
  %85 = add nuw nsw i32 %84, %79
  %86 = getelementptr inbounds i8, ptr %75, i64 4
  %87 = load i16, ptr %86, align 2, !tbaa !35
  %88 = sext i16 %87 to i32
  %89 = sub nsw i32 %88, %40
  %90 = mul nsw i32 %89, %89
  %91 = add nuw nsw i32 %85, %90
  %92 = uitofp nneg i32 %91 to double
  %93 = call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %91)
  %94 = fsub double -1.000000e+00, %93
  %95 = fptosi double %94 to i32
  %96 = xor i32 %36, -1
  %97 = load <2 x i16>, ptr %75, align 2, !tbaa !36
  %98 = extractelement <2 x i16> %97, i64 1
  %99 = sext i16 %98 to i32
  %100 = add nsw i32 %99, %96
  store i32 %100, ptr %8, align 4, !tbaa !30
  store <2 x i16> %97, ptr %6, align 4, !tbaa !36
  %101 = load i16, ptr %86, align 2, !tbaa !35
  br label %.sink.split

.sink.split:                                      ; preds = %71, %68
  %.sink = phi i16 [ %39, %68 ], [ %101, %71 ]
  %.0300.ph = phi i32 [ 3, %68 ], [ %95, %71 ]
  %.0297.ph = phi double [ 1.000000e+00, %68 ], [ %92, %71 ]
  %102 = getelementptr inbounds i8, ptr %6, i64 4
  store i16 %.sink, ptr %102, align 4, !tbaa !35
  br label %103

103:                                              ; preds = %.sink.split, %61
  %.0300 = phi i32 [ 2, %61 ], [ %.0300.ph, %.sink.split ]
  %.0297 = phi double [ %49, %61 ], [ %.0297.ph, %.sink.split ]
  %104 = sext i16 %35 to i64
  %105 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %104) #10
  %106 = sext i16 %32 to i64
  %107 = call noundef nonnull align 2 dereferenceable(6) ptr @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %105, i64 noundef %106) #10
  %108 = load i16, ptr %107, align 2, !tbaa !32
  %109 = sext i16 %108 to i32
  %110 = sub nsw i32 %109, %33
  %111 = mul nsw i32 %110, %110
  %112 = getelementptr inbounds i8, ptr %107, i64 2
  %113 = load i16, ptr %112, align 2, !tbaa !34
  %114 = sext i16 %113 to i32
  %115 = sub nsw i32 %114, %36
  %116 = mul nsw i32 %115, %115
  %117 = add nuw nsw i32 %116, %111
  %118 = getelementptr inbounds i8, ptr %107, i64 4
  %119 = load i16, ptr %118, align 2, !tbaa !35
  %120 = sext i16 %119 to i32
  %121 = sub nsw i32 %120, %40
  %122 = mul nsw i32 %121, %121
  %123 = add nuw nsw i32 %117, %122
  %124 = uitofp nneg i32 %123 to double
  %125 = fcmp ogt double %.0297, %124
  br i1 %125, label %126, label %thread-pre-split

126:                                              ; preds = %103
  store i16 %108, ptr %6, align 4, !tbaa !32
  %127 = getelementptr inbounds i8, ptr %6, i64 2
  store i16 %113, ptr %127, align 2, !tbaa !34
  %128 = getelementptr inbounds i8, ptr %6, i64 4
  store i16 %119, ptr %128, align 4, !tbaa !35
  %129 = load i16, ptr %118, align 2, !tbaa !35
  %130 = sext i16 %129 to i32
  %131 = xor i32 %40, -1
  %132 = add nsw i32 %130, %131
  %133 = icmp eq i16 %35, 0
  br i1 %133, label %134, label %thread-pre-split

134:                                              ; preds = %126
  %sqrt = call double @llvm.sqrt.f64(double %124)
  %135 = fsub double -1.000000e+00, %sqrt
  %136 = fptosi double %135 to i32
  store i32 %136, ptr %8, align 4, !tbaa !30
  br label %thread-pre-split

137:                                              ; preds = %5
  %138 = icmp sgt i16 %35, 0
  br i1 %138, label %139, label %174

139:                                              ; preds = %137
  %140 = getelementptr inbounds i8, ptr %3, i64 8
  %141 = add nsw i32 %36, -1
  %142 = sext i16 %39 to i64
  %143 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK10voxelFieldIhEclEiim(ptr noundef nonnull align 8 dereferenceable(56) %140, i32 noundef %33, i32 noundef %141, i64 noundef %142)
  %144 = load i8, ptr %143, align 1, !tbaa !31
  %.not = icmp eq i8 %144, %2
  br i1 %.not, label %149, label %145

145:                                              ; preds = %139
  store i16 %32, ptr %6, align 4, !tbaa !32
  %146 = trunc nuw nsw i32 %141 to i16
  %147 = getelementptr inbounds i8, ptr %6, i64 2
  store i16 %146, ptr %147, align 2, !tbaa !34
  %148 = getelementptr inbounds i8, ptr %6, i64 4
  store i16 %39, ptr %148, align 4, !tbaa !35
  br label %thread-pre-split

149:                                              ; preds = %139
  %150 = zext nneg i32 %141 to i64
  %151 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %150) #10
  %152 = sext i16 %32 to i64
  %153 = call noundef nonnull align 2 dereferenceable(6) ptr @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %151, i64 noundef %152) #10
  %154 = load i16, ptr %153, align 2, !tbaa !32
  %155 = sext i16 %154 to i32
  %156 = sub nsw i32 %155, %33
  %157 = mul nsw i32 %156, %156
  %158 = getelementptr inbounds i8, ptr %153, i64 2
  %159 = load i16, ptr %158, align 2, !tbaa !34
  %160 = sext i16 %159 to i32
  %161 = sub nsw i32 %160, %36
  %162 = mul nsw i32 %161, %161
  %163 = add nuw nsw i32 %162, %157
  %164 = getelementptr inbounds i8, ptr %153, i64 4
  %165 = load i16, ptr %164, align 2, !tbaa !35
  %166 = sext i16 %165 to i32
  %167 = sub nsw i32 %166, %40
  %168 = mul nsw i32 %167, %167
  %169 = add nuw nsw i32 %163, %168
  %170 = uitofp nneg i32 %169 to double
  %171 = add nsw i32 %161, -1
  store i32 %171, ptr %8, align 4, !tbaa !30
  store i16 %154, ptr %6, align 4, !tbaa !32
  %172 = getelementptr inbounds i8, ptr %6, i64 2
  store i16 %159, ptr %172, align 2, !tbaa !34
  %173 = getelementptr inbounds i8, ptr %6, i64 4
  store i16 %165, ptr %173, align 4, !tbaa !35
  br label %thread-pre-split

174:                                              ; preds = %137
  %175 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface8nextSeggEiii(ptr noundef nonnull align 8 dereferenceable(252) %0, i32 noundef %33, i32 noundef %36, i32 noundef %40)
  %176 = load i32, ptr %175, align 8, !tbaa !37
  %177 = call noundef zeroext i1 @_ZNK13medialSurface8isInsideEi(ptr noundef nonnull align 8 dereferenceable(252) %0, i32 noundef %176)
  br i1 %177, label %178, label %208

178:                                              ; preds = %174
  %179 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface8nextSeggEiii(ptr noundef nonnull align 8 dereferenceable(252) %0, i32 noundef %33, i32 noundef %36, i32 noundef %40)
  %180 = load i32, ptr %179, align 8, !tbaa !37
  %181 = sub nsw i32 %180, %33
  store i32 %181, ptr %7, align 4, !tbaa !30
  %182 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface4seggEiii(ptr noundef nonnull align 8 dereferenceable(252) %0, i32 noundef %33, i32 noundef %36, i32 noundef %40)
  %183 = load i32, ptr %182, align 8, !tbaa !37
  %184 = add nsw i32 %183, -1
  %185 = call noundef zeroext i1 @_ZNK13medialSurface8isInsideEi(ptr noundef nonnull align 8 dereferenceable(252) %0, i32 noundef %184)
  br i1 %185, label %186, label %202

186:                                              ; preds = %178
  %187 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface4seggEiii(ptr noundef nonnull align 8 dereferenceable(252) %0, i32 noundef %33, i32 noundef %36, i32 noundef %40)
  %188 = load i32, ptr %187, align 8, !tbaa !37
  %.neg330 = add nsw i32 %33, 1
  %189 = sub i32 %.neg330, %188
  %190 = load i32, ptr %7, align 4, !tbaa !30
  %191 = icmp slt i32 %189, %190
  br i1 %191, label %192, label %202

192:                                              ; preds = %186
  %193 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface4seggEiii(ptr noundef nonnull align 8 dereferenceable(252) %0, i32 noundef %33, i32 noundef %36, i32 noundef %40)
  %194 = load i32, ptr %193, align 8, !tbaa !37
  %195 = sub i32 %.neg330, %194
  store i32 %195, ptr %7, align 4, !tbaa !30
  %196 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface4seggEiii(ptr noundef nonnull align 8 dereferenceable(252) %0, i32 noundef %33, i32 noundef %36, i32 noundef %40)
  %197 = load i32, ptr %196, align 8, !tbaa !37
  %198 = trunc i32 %197 to i16
  %199 = add i16 %198, -1
  store i16 %199, ptr %6, align 4, !tbaa !32
  %200 = getelementptr inbounds i8, ptr %6, i64 2
  store i16 %35, ptr %200, align 2, !tbaa !34
  %201 = getelementptr inbounds i8, ptr %6, i64 4
  store i16 %39, ptr %201, align 4, !tbaa !35
  br label %236

202:                                              ; preds = %186, %178
  %203 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface8nextSeggEiii(ptr noundef nonnull align 8 dereferenceable(252) %0, i32 noundef %33, i32 noundef %36, i32 noundef %40)
  %204 = load i32, ptr %203, align 8, !tbaa !37
  %205 = trunc i32 %204 to i16
  store i16 %205, ptr %6, align 4, !tbaa !32
  %206 = getelementptr inbounds i8, ptr %6, i64 2
  store i16 %35, ptr %206, align 2, !tbaa !34
  %207 = getelementptr inbounds i8, ptr %6, i64 4
  store i16 %39, ptr %207, align 4, !tbaa !35
  br label %236

208:                                              ; preds = %174
  %209 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface4seggEiii(ptr noundef nonnull align 8 dereferenceable(252) %0, i32 noundef %33, i32 noundef %36, i32 noundef %40)
  %210 = load i32, ptr %209, align 8, !tbaa !37
  %211 = add nsw i32 %210, -1
  %212 = call noundef zeroext i1 @_ZNK13medialSurface8isInsideEi(ptr noundef nonnull align 8 dereferenceable(252) %0, i32 noundef %211)
  br i1 %212, label %213, label %226

213:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #10
  %214 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface4seggEiii(ptr noundef nonnull align 8 dereferenceable(252) %0, i32 noundef %33, i32 noundef %36, i32 noundef %40)
  %215 = load i32, ptr %214, align 8, !tbaa !37
  %216 = add nsw i32 %33, 1
  %217 = sub i32 %216, %215
  store i32 %217, ptr %9, align 4, !tbaa !30
  %218 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %219 = load i32, ptr %218, align 4, !tbaa !30
  store i32 %219, ptr %7, align 4, !tbaa !30
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #10
  %220 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface4seggEiii(ptr noundef nonnull align 8 dereferenceable(252) %0, i32 noundef %33, i32 noundef %36, i32 noundef %40)
  %221 = load i32, ptr %220, align 8, !tbaa !37
  %222 = trunc i32 %221 to i16
  %223 = add i16 %222, -1
  store i16 %223, ptr %6, align 4, !tbaa !32
  %224 = getelementptr inbounds i8, ptr %6, i64 2
  store i16 %35, ptr %224, align 2, !tbaa !34
  %225 = getelementptr inbounds i8, ptr %6, i64 4
  store i16 %39, ptr %225, align 4, !tbaa !35
  br label %236

226:                                              ; preds = %208
  %227 = call noundef zeroext i1 @_ZNK13medialSurface8isInsideEi(ptr noundef nonnull align 8 dereferenceable(252) %0, i32 noundef %33)
  br i1 %227, label %228, label %234

228:                                              ; preds = %226
  %229 = getelementptr inbounds i8, ptr %0, i64 12
  %230 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %229, ptr noundef nonnull align 4 dereferenceable(4) %42)
  %231 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %45, ptr noundef nonnull align 4 dereferenceable(4) %230)
  %232 = load i32, ptr %231, align 4, !tbaa !30
  %233 = add nsw i32 %232, 1
  store i32 %233, ptr %7, align 4, !tbaa !30
  br label %236

234:                                              ; preds = %226
  %235 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  br label %236

236:                                              ; preds = %213, %234, %228, %192, %202
  %237 = load i32, ptr %7, align 4, !tbaa !30
  %238 = mul nsw i32 %237, %237
  %239 = uitofp nneg i32 %238 to double
  %240 = sub nsw i32 0, %237
  store i32 %240, ptr %8, align 4, !tbaa !30
  br label %241

thread-pre-split:                                 ; preds = %57, %145, %149, %126, %134, %103
  %.2302.ph = phi i32 [ %.0300, %103 ], [ %132, %126 ], [ %132, %134 ], [ 0, %149 ], [ 3, %145 ], [ 3, %57 ]
  %.2299.ph = phi double [ %.0297, %103 ], [ %124, %126 ], [ %124, %134 ], [ %170, %149 ], [ 1.000000e+00, %145 ], [ 1.000000e+00, %57 ]
  %.pr = load i32, ptr %7, align 4, !tbaa !30
  br label %241

241:                                              ; preds = %thread-pre-split, %236
  %242 = phi i32 [ %.pr, %thread-pre-split ], [ %237, %236 ]
  %.2302 = phi i32 [ %.2302.ph, %thread-pre-split ], [ %240, %236 ]
  %.2299 = phi double [ %.2299.ph, %thread-pre-split ], [ %239, %236 ]
  %243 = icmp slt i32 %242, 1
  br i1 %243, label %244, label %260

244:                                              ; preds = %241
  %245 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %33)
  %246 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %245, ptr noundef nonnull @.str.1)
  %247 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %246, i32 noundef %36)
  %248 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %247, ptr noundef nonnull @.str.1)
  %249 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %248, i32 noundef %40)
  %250 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %249, ptr noundef nonnull @.str.2)
  %251 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface4seggEiii(ptr noundef nonnull align 8 dereferenceable(252) %0, i32 noundef %33, i32 noundef %36, i32 noundef %40)
  %252 = load i32, ptr %251, align 8, !tbaa !37
  %253 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %250, i32 noundef %252)
  %254 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %253, ptr noundef nonnull @.str.1)
  %255 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface8nextSeggEiii(ptr noundef nonnull align 8 dereferenceable(252) %0, i32 noundef %33, i32 noundef %36, i32 noundef %40)
  %256 = load i32, ptr %255, align 8, !tbaa !37
  %257 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %254, i32 noundef %256)
  %258 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %257, ptr noundef nonnull @.str.1)
  %259 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %258, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %260

260:                                              ; preds = %244, %241
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #10
  %261 = add nsw i32 %.2302, -1
  store i32 %261, ptr %10, align 4, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #10
  store i32 %41, ptr %11, align 4, !tbaa !30
  %262 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %263 = load i32, ptr %262, align 4, !tbaa !30
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #10
  %264 = xor i32 %40, -1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #10
  %265 = call double @sqrt(double noundef %.2299) #10
  %266 = fptosi double %265 to i32
  %267 = add nsw i32 %266, 1
  store i32 %267, ptr %12, align 4, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #10
  %268 = load i32, ptr %42, align 8, !tbaa !14
  %269 = add i32 %268, %264
  store i32 %269, ptr %13, align 4, !tbaa !30
  %270 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %271 = load i32, ptr %270, align 4, !tbaa !30
  %.not324337 = icmp sgt i32 %263, %271
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #10
  br i1 %.not324337, label %._crit_edge342, label %.lr.ph341

.lr.ph341:                                        ; preds = %260
  %272 = getelementptr inbounds i8, ptr %0, i64 12
  %273 = xor i32 %36, -1
  %274 = getelementptr inbounds i8, ptr %3, i64 8
  %275 = getelementptr inbounds i8, ptr %6, i64 2
  %276 = getelementptr inbounds i8, ptr %6, i64 4
  %277 = sext i32 %263 to i64
  %278 = sext i16 %39 to i64
  br label %288

._crit_edge342:                                   ; preds = %._crit_edge, %260
  %.3.lcssa = phi double [ %.2299, %260 ], [ %.4.lcssa, %._crit_edge ]
  %279 = load i16, ptr %6, align 4, !tbaa !32
  %280 = sext i16 %279 to i32
  %281 = getelementptr inbounds i8, ptr %6, i64 2
  %282 = load i16, ptr %281, align 2, !tbaa !34
  %283 = sext i16 %282 to i32
  %284 = getelementptr inbounds i8, ptr %6, i64 4
  %285 = load i16, ptr %284, align 4, !tbaa !35
  %286 = sext i16 %285 to i32
  %287 = call noundef zeroext i1 @_ZNK13medialSurface8isInsideEiii(ptr noundef nonnull align 8 dereferenceable(252) %0, i32 noundef %280, i32 noundef %283, i32 noundef %286)
  br i1 %287, label %418, label %362

288:                                              ; preds = %.lr.ph341, %._crit_edge
  %indvars.iv = phi i64 [ %277, %.lr.ph341 ], [ %indvars.iv.next, %._crit_edge ]
  %.3339 = phi double [ %.2299, %.lr.ph341 ], [ %.4.lcssa, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #10
  %289 = mul nsw i64 %indvars.iv, %indvars.iv
  %290 = trunc nsw i64 %289 to i32
  %291 = uitofp nneg i32 %290 to double
  %292 = fsub double %.3339, %291
  %293 = call double @sqrt(double noundef %292) #10
  %294 = fadd double %293, 1.001000e+00
  %295 = fptosi double %294 to i32
  store i32 %295, ptr %14, align 4, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #10
  %296 = load i32, ptr %272, align 4, !tbaa !38
  %297 = add i32 %296, %273
  store i32 %297, ptr %15, align 4, !tbaa !30
  %298 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %299 = load i32, ptr %298, align 4, !tbaa !30
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #10
  %300 = call double @sqrt(double noundef %292) #10
  %301 = fneg double %300
  %302 = fptosi double %301 to i32
  store i32 %302, ptr %17, align 4, !tbaa !30
  %303 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %304 = load i32, ptr %303, align 4, !tbaa !30
  %305 = add nsw i32 %304, -1
  store i32 %305, ptr %16, align 4, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #10
  store i32 %37, ptr %18, align 4, !tbaa !30
  %306 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %307 = load i32, ptr %306, align 4, !tbaa !30
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #10
  %.not325334 = icmp sgt i32 %307, %299
  br i1 %.not325334, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %288
  %308 = add nsw i64 %indvars.iv, %278
  %309 = trunc nsw i64 %308 to i32
  %310 = trunc i64 %308 to i16
  br label %319

._crit_edge:                                      ; preds = %360, %288
  %.4.lcssa = phi double [ %.3339, %288 ], [ %.9, %360 ]
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #10
  %311 = call double @sqrt(double noundef %.4.lcssa) #10
  %312 = fptosi double %311 to i32
  %313 = add nsw i32 %312, 1
  store i32 %313, ptr %12, align 4, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #10
  %314 = load i32, ptr %42, align 8, !tbaa !14
  %315 = add i32 %314, %264
  store i32 %315, ptr %13, align 4, !tbaa !30
  %316 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %317 = load i32, ptr %316, align 4, !tbaa !30
  %318 = sext i32 %317 to i64
  %.not324.not = icmp slt i64 %indvars.iv, %318
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #10
  br i1 %.not324.not, label %288, label %._crit_edge342, !llvm.loop !39

319:                                              ; preds = %.lr.ph, %360
  %.4336 = phi double [ %.3339, %.lr.ph ], [ %.9, %360 ]
  %.0304335 = phi i32 [ %307, %.lr.ph ], [ %361, %360 ]
  %320 = add nsw i32 %.0304335, %36
  %321 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK10voxelFieldIhEclEiim(ptr noundef nonnull align 8 dereferenceable(56) %274, i32 noundef %33, i32 noundef %320, i64 noundef %308)
  %322 = load i8, ptr %321, align 1, !tbaa !31
  %.not326 = icmp eq i8 %322, %2
  br i1 %.not326, label %328, label %323

323:                                              ; preds = %319
  %324 = mul nsw i32 %.0304335, %.0304335
  %325 = add nuw nsw i32 %324, %290
  %326 = uitofp nneg i32 %325 to double
  %327 = fcmp ogt double %.4336, %326
  br i1 %327, label %.sink.split348, label %360

328:                                              ; preds = %319
  %329 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface4seggEiii(ptr noundef nonnull align 8 dereferenceable(252) %0, i32 noundef %33, i32 noundef %320, i32 noundef %309)
  %330 = load i32, ptr %329, align 8, !tbaa !37
  %331 = icmp sgt i32 %330, 0
  br i1 %331, label %332, label %344

332:                                              ; preds = %328
  %333 = add nsw i32 %330, -1
  %334 = sub nsw i32 %333, %33
  %335 = mul nsw i32 %334, %334
  %336 = mul nsw i32 %.0304335, %.0304335
  %337 = add nuw nsw i32 %336, %290
  %338 = add nuw nsw i32 %337, %335
  %339 = uitofp nneg i32 %338 to double
  %340 = fcmp ogt double %.4336, %339
  br i1 %340, label %341, label %344

341:                                              ; preds = %332
  %342 = trunc i32 %333 to i16
  store i16 %342, ptr %6, align 4, !tbaa !32
  %343 = trunc i32 %320 to i16
  store i16 %343, ptr %275, align 2, !tbaa !34
  store i16 %310, ptr %276, align 4, !tbaa !35
  br label %344

344:                                              ; preds = %332, %341, %328
  %.6 = phi double [ %.4336, %328 ], [ %339, %341 ], [ %.4336, %332 ]
  %345 = getelementptr inbounds i8, ptr %329, i64 16
  %346 = load i32, ptr %345, align 8, !tbaa !37
  %347 = load i32, ptr %45, align 8, !tbaa !29
  %348 = icmp slt i32 %346, %347
  br i1 %348, label %349, label %360

349:                                              ; preds = %344
  %350 = sub nsw i32 %346, %33
  %351 = mul nsw i32 %350, %350
  %352 = mul nsw i32 %.0304335, %.0304335
  %353 = add nuw nsw i32 %352, %290
  %354 = add nuw nsw i32 %353, %351
  %355 = uitofp nneg i32 %354 to double
  %356 = fcmp ogt double %.6, %355
  br i1 %356, label %357, label %360

357:                                              ; preds = %349
  %358 = trunc i32 %346 to i16
  br label %.sink.split348

.sink.split348:                                   ; preds = %323, %357
  %storemerge = phi i16 [ %358, %357 ], [ %32, %323 ]
  %.9.ph = phi double [ %355, %357 ], [ %326, %323 ]
  store i16 %storemerge, ptr %6, align 4, !tbaa !32
  %359 = trunc i32 %320 to i16
  store i16 %359, ptr %275, align 2, !tbaa !34
  store i16 %310, ptr %276, align 4, !tbaa !35
  br label %360

360:                                              ; preds = %.sink.split348, %344, %349, %323
  %.9 = phi double [ %.4336, %323 ], [ %.6, %344 ], [ %.6, %349 ], [ %.9.ph, %.sink.split348 ]
  %361 = add i32 %.0304335, 1
  %exitcond.not = icmp eq i32 %.0304335, %299
  br i1 %exitcond.not, label %._crit_edge, label %319, !llvm.loop !41

362:                                              ; preds = %._crit_edge342
  %363 = load i32, ptr %45, align 8, !tbaa !29
  %364 = sdiv i32 %363, 2
  %365 = icmp sgt i32 %364, %33
  br i1 %365, label %366, label %369

366:                                              ; preds = %362
  %367 = sdiv i32 %363, -4
  %368 = add nsw i32 %367, -1
  br label %373

369:                                              ; preds = %362
  %370 = mul nsw i32 %363, 5
  %371 = sdiv i32 %370, 4
  %372 = add nsw i32 %371, 1
  br label %373

373:                                              ; preds = %369, %366
  %374 = phi i32 [ %368, %366 ], [ %372, %369 ]
  %375 = trunc i32 %374 to i16
  store i16 %375, ptr %6, align 4, !tbaa !32
  %376 = getelementptr inbounds i8, ptr %0, i64 12
  %377 = load i32, ptr %376, align 4, !tbaa !38
  %378 = sdiv i32 %377, 2
  %379 = icmp sgt i32 %378, %36
  br i1 %379, label %380, label %383

380:                                              ; preds = %373
  %381 = sdiv i32 %377, -4
  %382 = add nsw i32 %381, -1
  br label %387

383:                                              ; preds = %373
  %384 = mul nsw i32 %377, 5
  %385 = sdiv i32 %384, 4
  %386 = add nsw i32 %385, 1
  br label %387

387:                                              ; preds = %383, %380
  %388 = phi i32 [ %382, %380 ], [ %386, %383 ]
  %389 = trunc i32 %388 to i16
  store i16 %389, ptr %281, align 2, !tbaa !34
  %390 = load i32, ptr %42, align 8, !tbaa !14
  %391 = sdiv i32 %390, 2
  %392 = icmp sgt i32 %391, %40
  br i1 %392, label %393, label %396

393:                                              ; preds = %387
  %394 = sdiv i32 %390, -4
  %395 = add nsw i32 %394, -1
  br label %400

396:                                              ; preds = %387
  %397 = mul nsw i32 %390, 5
  %398 = sdiv i32 %397, 4
  %399 = add nsw i32 %398, 1
  br label %400

400:                                              ; preds = %396, %393
  %401 = phi i32 [ %395, %393 ], [ %399, %396 ]
  %402 = trunc i32 %401 to i16
  store i16 %402, ptr %284, align 4, !tbaa !35
  %sext327 = shl i32 %374, 16
  %403 = ashr exact i32 %sext327, 16
  %404 = sub nsw i32 %403, %33
  %405 = mul nsw i32 %404, %404
  %sext328 = shl i32 %388, 16
  %406 = ashr exact i32 %sext328, 16
  %407 = sub nsw i32 %406, %36
  %408 = mul nsw i32 %407, %407
  %409 = add nuw nsw i32 %408, %405
  %sext = shl i32 %401, 16
  %410 = ashr exact i32 %sext, 16
  %411 = sub nsw i32 %410, %40
  %412 = mul nsw i32 %411, %411
  %413 = add nuw nsw i32 %409, %412
  %414 = call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %413)
  %415 = fadd double %414, -5.000000e-01
  %416 = fptrunc double %415 to float
  %417 = getelementptr inbounds i8, ptr %1, i64 16
  store float %416, ptr %417, align 8, !tbaa !42
  br label %533

418:                                              ; preds = %._crit_edge342
  %419 = load i16, ptr %6, align 4, !tbaa !32
  %420 = sext i16 %419 to i32
  %421 = sub nsw i32 %420, %33
  %422 = load i16, ptr %281, align 2, !tbaa !34
  %423 = sext i16 %422 to i32
  %424 = sub nsw i32 %423, %36
  %425 = load i16, ptr %284, align 4, !tbaa !35
  %426 = sext i16 %425 to i32
  %427 = sub nsw i32 %426, %40
  %428 = mul i32 %421, %421
  %429 = mul i32 %424, %424
  %430 = add nuw nsw i32 %429, %428
  %431 = mul i32 %427, %427
  %432 = add nuw nsw i32 %430, %431
  %433 = call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %432)
  %434 = fadd double %433, -5.000000e-01
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #10
  %435 = add nsw i32 %36, 2
  store i32 %435, ptr %19, align 4, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #10
  %436 = getelementptr inbounds i8, ptr %0, i64 12
  %437 = load i32, ptr %436, align 4, !tbaa !38
  %reass.sub = sub i32 %437, %36
  %438 = add i32 %reass.sub, 1
  store i32 %438, ptr %20, align 4, !tbaa !30
  %439 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %440 = load i32, ptr %439, align 4, !tbaa !30
  %441 = sitofp i32 %440 to double
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #10
  %442 = fcmp ogt double %434, %441
  br i1 %442, label %443, label %451

443:                                              ; preds = %418
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #10
  %444 = getelementptr inbounds i8, ptr %0, i64 192
  %445 = load double, ptr %444, align 8, !tbaa !43
  %446 = fsub double 1.000000e+00, %445
  %447 = fmul double %445, %441
  %448 = call double @llvm.fmuladd.f64(double %446, double %434, double %447)
  store double %448, ptr %21, align 8, !tbaa !44
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #10
  store double 1.000000e-02, ptr %22, align 8, !tbaa !44
  %449 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22)
  %450 = load double, ptr %449, align 8, !tbaa !44
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #10
  br label %451

451:                                              ; preds = %443, %418
  %.0 = phi double [ %450, %443 ], [ %434, %418 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #10
  %452 = add nsw i32 %40, 2
  store i32 %452, ptr %23, align 4, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #10
  %453 = load i32, ptr %42, align 8, !tbaa !14
  %reass.sub344 = sub i32 %453, %40
  %454 = add i32 %reass.sub344, 1
  store i32 %454, ptr %24, align 4, !tbaa !30
  %455 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24)
  %456 = load i32, ptr %455, align 4, !tbaa !30
  %457 = sitofp i32 %456 to double
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #10
  %458 = fcmp ogt double %.0, %457
  br i1 %458, label %459, label %467

459:                                              ; preds = %451
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #10
  %460 = getelementptr inbounds i8, ptr %0, i64 192
  %461 = load double, ptr %460, align 8, !tbaa !43
  %462 = fsub double 1.000000e+00, %461
  %463 = fmul double %461, %457
  %464 = call double @llvm.fmuladd.f64(double %462, double %.0, double %463)
  store double %464, ptr %25, align 8, !tbaa !44
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #10
  store double 1.000000e-02, ptr %26, align 8, !tbaa !44
  %465 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26)
  %466 = load double, ptr %465, align 8, !tbaa !44
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #10
  br label %467

467:                                              ; preds = %459, %451
  %.1 = phi double [ %466, %459 ], [ %.0, %451 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %27) #10
  %468 = add nsw i32 %33, 2
  store i32 %468, ptr %27, align 4, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %28) #10
  %469 = load i32, ptr %45, align 8, !tbaa !29
  %reass.sub345 = sub i32 %469, %33
  %470 = add i32 %reass.sub345, 1
  store i32 %470, ptr %28, align 4, !tbaa !30
  %471 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %27, ptr noundef nonnull align 4 dereferenceable(4) %28)
  %472 = load i32, ptr %471, align 4, !tbaa !30
  %473 = sitofp i32 %472 to double
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %28) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %27) #10
  %474 = fcmp ogt double %.1, %473
  br i1 %474, label %475, label %483

475:                                              ; preds = %467
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #10
  %476 = getelementptr inbounds i8, ptr %0, i64 184
  %477 = load double, ptr %476, align 8, !tbaa !45
  %478 = fsub double 1.000000e+00, %477
  %479 = fmul double %477, %473
  %480 = call double @llvm.fmuladd.f64(double %478, double %.1, double %479)
  store double %480, ptr %29, align 8, !tbaa !44
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %30) #10
  store double 1.000000e-01, ptr %30, align 8, !tbaa !44
  %481 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %30)
  %482 = load double, ptr %481, align 8, !tbaa !44
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #10
  br label %483

483:                                              ; preds = %475, %467
  %.2 = phi double [ %482, %475 ], [ %.1, %467 ]
  %484 = fptrunc double %.2 to float
  %485 = getelementptr inbounds i8, ptr %1, i64 16
  store float %484, ptr %485, align 8, !tbaa !42
  %486 = fcmp ugt double %.3.lcssa, 0.000000e+00
  br i1 %486, label %491, label %487

487:                                              ; preds = %483
  %488 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.3)
  %489 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %488, double noundef %.3.lcssa)
  %490 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %489, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %491

491:                                              ; preds = %487, %483
  %492 = load i16, ptr %6, align 4, !tbaa !32
  %493 = icmp slt i16 %492, -2000
  %494 = fcmp ogt double %.2, 1.600000e+07
  %or.cond = select i1 %493, i1 true, i1 %494
  br i1 %or.cond, label %495, label %533

495:                                              ; preds = %491
  %496 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.4)
  %497 = load i16, ptr %6, align 4, !tbaa !32
  %498 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEs(ptr noundef nonnull align 8 dereferenceable(8) %496, i16 noundef signext %497)
  %499 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %498, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %500 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.5)
  %501 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %500, double noundef %.3.lcssa)
  %502 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %501, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %503 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.6)
  %504 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %503, i32 noundef %.2302)
  %505 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %504, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %506 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.7)
  %507 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %506, i32 noundef %33)
  %508 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %507, ptr noundef nonnull @.str.8)
  %509 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %508, i32 noundef %36)
  %510 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %509, ptr noundef nonnull @.str.9)
  %511 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %510, i32 noundef %40)
  %512 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %511, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %513 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.10)
  %514 = sext i16 %35 to i64
  %515 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %514) #10
  %516 = sext i16 %32 to i64
  %517 = call noundef nonnull align 2 dereferenceable(6) ptr @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %515, i64 noundef %516) #10
  %518 = load i16, ptr %517, align 2, !tbaa !32
  %519 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEs(ptr noundef nonnull align 8 dereferenceable(8) %513, i16 noundef signext %518)
  %520 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %519, ptr noundef nonnull @.str.8)
  %521 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %514) #10
  %522 = call noundef nonnull align 2 dereferenceable(6) ptr @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %521, i64 noundef %516) #10
  %523 = getelementptr inbounds i8, ptr %522, i64 2
  %524 = load i16, ptr %523, align 2, !tbaa !34
  %525 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEs(ptr noundef nonnull align 8 dereferenceable(8) %520, i16 noundef signext %524)
  %526 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %525, ptr noundef nonnull @.str.9)
  %527 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %514) #10
  %528 = call noundef nonnull align 2 dereferenceable(6) ptr @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %527, i64 noundef %516) #10
  %529 = getelementptr inbounds i8, ptr %528, i64 4
  %530 = load i16, ptr %529, align 2, !tbaa !35
  %531 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEs(ptr noundef nonnull align 8 dereferenceable(8) %526, i16 noundef signext %530)
  %532 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %531, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @exit(i32 noundef 0) #11
  unreachable

533:                                              ; preds = %491, %400
  %534 = sext i16 %35 to i64
  %535 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %534) #10
  %536 = sext i16 %32 to i64
  %537 = call noundef nonnull align 2 dereferenceable(6) ptr @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %535, i64 noundef %536) #10
  call void @_ZN13medialSurface4nodeaSERKS0_(ptr noundef nonnull align 2 dereferenceable(6) %537, ptr noundef nonnull align 2 dereferenceable(6) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 6, ptr nonnull %6) #10
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN13medialSurface4nodeC2Eiii(ptr noundef nonnull align 2 dereferenceable(6), i32 noundef, i32 noundef, i32 noundef) unnamed_addr #2 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface8nextSeggEiii(ptr noundef nonnull align 8 dereferenceable(252), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK13medialSurface4seggEiii(ptr noundef nonnull align 8 dereferenceable(252), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #7

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) local_unnamed_addr #0 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEs(ptr noundef nonnull align 8 dereferenceable(8), i16 noundef signext) local_unnamed_addr #6

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN13medialSurface4nodeaSERKS0_(ptr noundef nonnull align 2 dereferenceable(6), ptr noundef nonnull align 2 dereferenceable(6)) local_unnamed_addr #2 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.sqrt.f64(double) #9

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nofree nounwind willreturn memory(write) "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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { noreturn 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 #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #10 = { nounwind }
attributes #11 = { noreturn 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, !10, i64 8}
!6 = !{!"_ZTS5voxel", !7, i64 0, !10, i64 8, !10, i64 10, !10, i64 12, !11, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"short", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!6, !10, i64 10}
!13 = !{!6, !10, i64 12}
!14 = !{!15, !16, i64 16}
!15 = !{!"_ZTS13medialSurface", !7, i64 0, !16, i64 8, !16, i64 12, !16, i64 16, !17, i64 24, !17, i64 32, !7, i64 40, !18, i64 48, !19, i64 64, !23, i64 88, !27, i64 112, !11, i64 176, !28, i64 184, !28, i64 192, !28, i64 200, !28, i64 208, !28, i64 216, !28, i64 224, !16, i64 232, !28, i64 240, !11, i64 248}
!16 = !{!"int", !8, i64 0}
!17 = !{!"long", !8, i64 0}
!18 = !{!"_ZTS7segment", !16, i64 0, !8, i64 4, !7, i64 8}
!19 = !{!"_ZTSSt6vectorI5voxelSaIS0_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseI5voxelSaIS0_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseI5voxelSaIS0_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseI5voxelSaIS0_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!23 = !{!"_ZTSSt6vectorI10medialBallSaIS0_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseI10medialBallSaIS0_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseI10medialBallSaIS0_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseI10medialBallSaIS0_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!27 = !{!"_ZTS10medialBall", !7, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !10, i64 20, !11, i64 24, !10, i64 28, !10, i64 30, !10, i64 32, !10, i64 34, !10, i64 36, !7, i64 40, !7, i64 48, !7, i64 56}
!28 = !{!"double", !8, i64 0}
!29 = !{!15, !16, i64 8}
!30 = !{!16, !16, i64 0}
!31 = !{!8, !8, i64 0}
!32 = !{!33, !10, i64 0}
!33 = !{!"_ZTSN13medialSurface4nodeE", !10, i64 0, !10, i64 2, !10, i64 4}
!34 = !{!33, !10, i64 2}
!35 = !{!33, !10, i64 4}
!36 = !{!10, !10, i64 0}
!37 = !{!18, !16, i64 0}
!38 = !{!15, !16, i64 12}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = distinct !{!41, !40}
!42 = !{!6, !11, i64 16}
!43 = !{!15, !28, i64 192}
!44 = !{!28, !28, i64 0}
!45 = !{!15, !28, i64 184}


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