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

; 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.voxelImageT = type { %class.voxelImageTBase, %class.voxelField, %class.var3.10, %class.var3.10 }
%class.voxelImageTBase = type { ptr }
%class.voxelField = type { ptr, i64, %class.var3, %"class.std::vector.5" }
%class.var3 = type { i32, i32, i32 }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.var3.10 = type { double, double, double }
%"class.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<std::vector<medialSurface::node>, std::allocator<std::vector<medialSurface::node>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<medialSurface::node>, std::allocator<std::vector<medialSurface::node>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<medialSurface::node>, std::allocator<std::vector<medialSurface::node>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<medialSurface::node>, std::allocator<std::vector<medialSurface::node>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.16" = type { %"struct.std::_Vector_base.17" }
%"struct.std::_Vector_base.17" = type { %"struct.std::_Vector_base<medialSurface::node, std::allocator<medialSurface::node>>::_Vector_impl" }
%"struct.std::_Vector_base<medialSurface::node, std::allocator<medialSurface::node>>::_Vector_impl" = type { %"struct.std::_Vector_base<medialSurface::node, std::allocator<medialSurface::node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<medialSurface::node, std::allocator<medialSurface::node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.18" = type { i8 }
%"class.std::allocator.13" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%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 }
%"class.medialSurface::node" = type { i16, i16, i16 }
%class.voxel = type <{ ptr, i16, i16, i16, [2 x i8], float, [4 x i8] }>

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.11 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK13medialSurface12calc_distmapEP5voxelhRK11voxelImageTIhERSt6vectorIS6_INS_4nodeESaIS7_EESaIS9_EE(ptr noundef nonnull align 8 dereferenceable(252), ptr noundef, i8 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

; 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 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; 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) #3

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

; 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)) #3

; 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)) #5

; 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12segToVxlMeshRK13medialSurface(ptr dead_on_unwind noalias writable sret(%class.voxelImageT) align 8, ptr noundef nonnull align 8 dereferenceable(252)) #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11voxelImageTIhED2Ev(ptr noundef nonnull align 8 dereferenceable(112)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13medialSurface13calc_distmapsEv(ptr noundef nonnull align 8 dereferenceable(252) %0) #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %class.voxelImageT, align 8
  %4 = alloca double, align 8
  %5 = alloca %"class.std::vector.11", align 8
  %6 = alloca %"class.std::vector.16", align 8
  %7 = alloca %"class.std::allocator.18", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::allocator.13", align 1
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %20 = load ptr, ptr %2, align 8
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.11)
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %21, i32 noundef 0)
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout)
  %24 = getelementptr inbounds %class.medialSurface, ptr %20, i32 0, i32 5
  %25 = load i64, ptr %24, align 8, !tbaa !9
  %26 = icmp ne i64 %25, 0
  br i1 %26, label %30, label %27

27:                                               ; preds = %1
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.12)
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %190

30:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 112, ptr %3) #6
  call void @_Z12segToVxlMeshRK13medialSurface(ptr dead_on_unwind writable sret(%class.voxelImageT) align 8 %3, ptr noundef nonnull align 8 dereferenceable(252) %20)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store double 0.000000e+00, ptr %4, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #6
  %31 = getelementptr inbounds %class.medialSurface, ptr %20, i32 0, i32 2
  %32 = load i32, ptr %31, align 4, !tbaa !27
  %33 = add nsw i32 %32, 1
  %34 = sext i32 %33 to i64
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #6
  %35 = getelementptr inbounds %class.medialSurface, ptr %20, i32 0, i32 1
  %36 = load i32, ptr %35, align 8, !tbaa !28
  %37 = sext i32 %36 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #6
  call void @_ZNSaIN13medialSurface4nodeEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  invoke void @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %37, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %38 unwind label %47

38:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #6
  call void @_ZNSaISt6vectorIN13medialSurface4nodeESaIS1_EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  invoke void @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEC2EmRKS3_RKS4_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %34, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %39 unwind label %51

39:                                               ; preds = %38
  call void @_ZNSt15__new_allocatorISt6vectorIN13medialSurface4nodeESaIS2_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @_ZNSt15__new_allocatorIN13medialSurface4nodeEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !29
  br label %40

40:                                               ; preds = %99, %39
  %41 = load i32, ptr %11, align 4, !tbaa !29
  %42 = getelementptr inbounds %class.medialSurface, ptr %20, i32 0, i32 2
  %43 = load i32, ptr %42, align 4, !tbaa !27
  %44 = add nsw i32 %43, 1
  %45 = icmp slt i32 %41, %44
  br i1 %45, label %56, label %46

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

47:                                               ; preds = %30
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %8, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %9, align 4
  br label %55

51:                                               ; preds = %38
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %8, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %9, align 4
  call void @_ZNSt15__new_allocatorISt6vectorIN13medialSurface4nodeESaIS2_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  br label %55

55:                                               ; preds = %51, %47
  call void @_ZNSt15__new_allocatorIN13medialSurface4nodeEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  br label %183

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

57:                                               ; preds = %95, %56
  %58 = load i32, ptr %13, align 4, !tbaa !29
  %59 = getelementptr inbounds %class.medialSurface, ptr %20, i32 0, i32 1
  %60 = load i32, ptr %59, align 8, !tbaa !28
  %61 = icmp slt i32 %58, %60
  br i1 %61, label %63, label %62

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

63:                                               ; preds = %57
  %64 = load i32, ptr %13, align 4, !tbaa !29
  %65 = trunc i32 %64 to i16
  %66 = load i32, ptr %11, align 4, !tbaa !29
  %67 = sext i32 %66 to i64
  %68 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %67) #6
  %69 = load i32, ptr %13, align 4, !tbaa !29
  %70 = sext i32 %69 to i64
  %71 = call noundef nonnull align 2 dereferenceable(6) ptr @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %68, i64 noundef %70) #6
  %72 = getelementptr inbounds %"class.medialSurface::node", ptr %71, i32 0, i32 0
  store i16 %65, ptr %72, align 2, !tbaa !30
  %73 = load i32, ptr %11, align 4, !tbaa !29
  %74 = trunc i32 %73 to i16
  %75 = load i32, ptr %11, align 4, !tbaa !29
  %76 = sext i32 %75 to i64
  %77 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %76) #6
  %78 = load i32, ptr %13, align 4, !tbaa !29
  %79 = sext i32 %78 to i64
  %80 = call noundef nonnull align 2 dereferenceable(6) ptr @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %77, i64 noundef %79) #6
  %81 = getelementptr inbounds %"class.medialSurface::node", ptr %80, i32 0, i32 1
  store i16 %74, ptr %81, align 2, !tbaa !32
  %82 = getelementptr inbounds %class.medialSurface, ptr %20, i32 0, i32 3
  %83 = load i32, ptr %82, align 8, !tbaa !33
  %84 = sub nsw i32 0, %83
  %85 = sdiv i32 %84, 2
  %86 = sub nsw i32 %85, 1
  %87 = trunc i32 %86 to i16
  %88 = load i32, ptr %11, align 4, !tbaa !29
  %89 = sext i32 %88 to i64
  %90 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %89) #6
  %91 = load i32, ptr %13, align 4, !tbaa !29
  %92 = sext i32 %91 to i64
  %93 = call noundef nonnull align 2 dereferenceable(6) ptr @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %90, i64 noundef %92) #6
  %94 = getelementptr inbounds %"class.medialSurface::node", ptr %93, i32 0, i32 2
  store i16 %87, ptr %94, align 2, !tbaa !34
  br label %95

95:                                               ; preds = %63
  %96 = load i32, ptr %13, align 4, !tbaa !29
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %13, align 4, !tbaa !29
  br label %57, !llvm.loop !35

98:                                               ; preds = %62
  br label %99

99:                                               ; preds = %98
  %100 = load i32, ptr %11, align 4, !tbaa !29
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %11, align 4, !tbaa !29
  br label %40, !llvm.loop !37

102:                                              ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %103 = getelementptr inbounds %class.medialSurface, ptr %20, i32 0, i32 9
  %104 = call noundef i64 @_ZNKSt6vectorI5voxelSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %103) #6
  %105 = udiv i64 %104, 200
  %106 = trunc i64 %105 to i32
  %107 = mul nsw i32 10, %106
  store i32 %107, ptr %15, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 1, ptr %16, align 4, !tbaa !29
  %108 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %109 unwind label %123

109:                                              ; preds = %102
  %110 = load i32, ptr %108, align 4, !tbaa !29
  %111 = sext i32 %110 to i64
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  store i64 %111, ptr %14, align 8, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %112 = getelementptr inbounds %class.medialSurface, ptr %20, i32 0, i32 9
  %113 = call ptr @_ZNSt6vectorI5voxelSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %112) #6
  %114 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %113, ptr %114, align 8
  %115 = call noundef nonnull align 8 dereferenceable(20) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  store ptr %115, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %116 = getelementptr inbounds %class.medialSurface, ptr %20, i32 0, i32 9
  %117 = call noundef nonnull align 8 dereferenceable(20) ptr @_ZNSt6vectorI5voxelSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %116, i64 noundef 0) #6
  store ptr %117, ptr %19, align 8, !tbaa !5
  br label %118

118:                                              ; preds = %156, %109
  %119 = load ptr, ptr %19, align 8, !tbaa !5
  %120 = load ptr, ptr %17, align 8, !tbaa !5
  %121 = icmp ult ptr %119, %120
  br i1 %121, label %127, label %122

122:                                              ; preds = %118
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %159

123:                                              ; preds = %102
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %8, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %182

127:                                              ; preds = %118
  %128 = load ptr, ptr %19, align 8, !tbaa !5
  invoke void @_ZNK13medialSurface12calc_distmapEP5voxelhRK11voxelImageTIhERSt6vectorIS6_INS_4nodeESaIS7_EESaIS9_EE(ptr noundef nonnull align 8 dereferenceable(252) %20, ptr noundef %128, i8 noundef zeroext 0, ptr noundef nonnull align 8 dereferenceable(112) %3, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %129 unwind label %145

129:                                              ; preds = %127
  %130 = load ptr, ptr %19, align 8, !tbaa !5
  %131 = ptrtoint ptr %130 to i64
  %132 = load i64, ptr %14, align 8, !tbaa !38
  %133 = urem i64 %131, %132
  %134 = icmp eq i64 %133, 0
  br i1 %134, label %135, label %149

135:                                              ; preds = %129
  %136 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.13)
          to label %137 unwind label %145

137:                                              ; preds = %135
  %138 = load ptr, ptr %19, align 8, !tbaa !5
  %139 = getelementptr inbounds %class.voxel, ptr %138, i32 0, i32 5
  %140 = load float, ptr %139, align 8, !tbaa !39
  %141 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %136, float noundef %140)
          to label %142 unwind label %145

142:                                              ; preds = %137
  %143 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) %141)
          to label %144 unwind label %145

144:                                              ; preds = %142
  br label %149

145:                                              ; preds = %142, %137, %135, %127
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %8, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %182

149:                                              ; preds = %144, %129
  %150 = load ptr, ptr %19, align 8, !tbaa !5
  %151 = getelementptr inbounds %class.voxel, ptr %150, i32 0, i32 5
  %152 = load float, ptr %151, align 8, !tbaa !39
  %153 = fpext float %152 to double
  %154 = load double, ptr %4, align 8, !tbaa !26
  %155 = fadd double %154, %153
  store double %155, ptr %4, align 8, !tbaa !26
  br label %156

156:                                              ; preds = %149
  %157 = load ptr, ptr %19, align 8, !tbaa !5
  %158 = getelementptr inbounds %class.voxel, ptr %157, i32 1
  store ptr %158, ptr %19, align 8, !tbaa !5
  br label %118, !llvm.loop !41

159:                                              ; preds = %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  %160 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.14)
          to label %161 unwind label %184

161:                                              ; preds = %159
  %162 = load double, ptr %4, align 8, !tbaa !26
  %163 = getelementptr inbounds %class.medialSurface, ptr %20, i32 0, i32 5
  %164 = load i64, ptr %163, align 8, !tbaa !9
  %165 = uitofp i64 %164 to double
  %166 = fdiv double %162, %165
  %167 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %160, double noundef %166)
          to label %168 unwind label %184

168:                                              ; preds = %161
  %169 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %167, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %170 unwind label %184

170:                                              ; preds = %168
  %171 = getelementptr inbounds %class.medialSurface, ptr %20, i32 0, i32 12
  %172 = load float, ptr %171, align 8, !tbaa !42
  %173 = fpext float %172 to double
  %174 = fcmp olt double %173, 0.000000e+00
  br i1 %174, label %175, label %188

175:                                              ; preds = %170
  %176 = load double, ptr %4, align 8, !tbaa !26
  %177 = getelementptr inbounds %class.medialSurface, ptr %20, i32 0, i32 5
  %178 = load i64, ptr %177, align 8, !tbaa !9
  %179 = uitofp i64 %178 to double
  %180 = fdiv double %176, %179
  invoke void @_ZN13medialSurface11setDefaultsEd(ptr noundef nonnull align 8 dereferenceable(252) %20, double noundef %180)
          to label %181 unwind label %184

181:                                              ; preds = %175
  br label %188

182:                                              ; preds = %145, %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  br label %183

183:                                              ; preds = %182, %55
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  br label %189

184:                                              ; preds = %175, %168, %161, %159
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %8, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %9, align 4
  br label %189

188:                                              ; preds = %181, %170
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @_ZN11voxelImageTIhED2Ev(ptr noundef nonnull align 8 dereferenceable(112) %3) #6
  call void @llvm.lifetime.end.p0(i64 112, ptr %3) #6
  br label %190

189:                                              ; preds = %184, %183
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @_ZN11voxelImageTIhED2Ev(ptr noundef nonnull align 8 dereferenceable(112) %3) #6
  call void @llvm.lifetime.end.p0(i64 112, ptr %3) #6
  br label %191

190:                                              ; preds = %188, %27
  ret void

191:                                              ; preds = %189
  %192 = load ptr, ptr %8, align 8
  %193 = load i32, ptr %9, align 4
  %194 = insertvalue { ptr, i32 } poison, ptr %192, 0
  %195 = insertvalue { ptr, i32 } %194, i32 %193, 1
  resume { ptr, i32 } %195
}

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8)) #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEC2EmRKS3_RKS4_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(20) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt6vectorIN13medialSurface4nodeESaIS2_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #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 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 24}
!10 = !{!"_ZTS13medialSurface", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !12, i64 24, !12, i64 32, !6, i64 40, !13, i64 48, !14, i64 64, !18, i64 88, !22, i64 112, !23, i64 176, !25, i64 184, !25, i64 192, !25, i64 200, !25, i64 208, !25, i64 216, !25, i64 224, !11, i64 232, !25, i64 240, !23, i64 248}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!"_ZTS7segment", !11, i64 0, !7, i64 4, !6, i64 8}
!14 = !{!"_ZTSSt6vectorI5voxelSaIS0_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseI5voxelSaIS0_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseI5voxelSaIS0_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseI5voxelSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"_ZTSSt6vectorI10medialBallSaIS0_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseI10medialBallSaIS0_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseI10medialBallSaIS0_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseI10medialBallSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTS10medialBall", !6, i64 0, !23, i64 8, !23, i64 12, !23, i64 16, !24, i64 20, !23, i64 24, !24, i64 28, !24, i64 30, !24, i64 32, !24, i64 34, !24, i64 36, !6, i64 40, !6, i64 48, !6, i64 56}
!23 = !{!"float", !7, i64 0}
!24 = !{!"short", !7, i64 0}
!25 = !{!"double", !7, i64 0}
!26 = !{!25, !25, i64 0}
!27 = !{!10, !11, i64 12}
!28 = !{!10, !11, i64 8}
!29 = !{!11, !11, i64 0}
!30 = !{!31, !24, i64 0}
!31 = !{!"_ZTSN13medialSurface4nodeE", !24, i64 0, !24, i64 2, !24, i64 4}
!32 = !{!31, !24, i64 2}
!33 = !{!10, !11, i64 16}
!34 = !{!31, !24, i64 4}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = distinct !{!37, !36}
!38 = !{!12, !12, i64 0}
!39 = !{!40, !23, i64 16}
!40 = !{!"_ZTS5voxel", !6, i64 0, !24, i64 8, !24, i64 10, !24, i64 12, !23, i64 16}
!41 = distinct !{!41, !36}
!42 = !{!10, !23, i64 176}


; 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.voxelImageT = type { %class.voxelImageTBase, %class.voxelField, %class.var3.10, %class.var3.10 }
%class.voxelImageTBase = type { ptr }
%class.voxelField = type { ptr, i64, %class.var3, %"class.std::vector.5" }
%class.var3 = type { i32, i32, i32 }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.var3.10 = type { double, double, double }
%"class.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<std::vector<medialSurface::node>, std::allocator<std::vector<medialSurface::node>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<medialSurface::node>, std::allocator<std::vector<medialSurface::node>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<medialSurface::node>, std::allocator<std::vector<medialSurface::node>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<medialSurface::node>, std::allocator<std::vector<medialSurface::node>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.16" = type { %"struct.std::_Vector_base.17" }
%"struct.std::_Vector_base.17" = type { %"struct.std::_Vector_base<medialSurface::node, std::allocator<medialSurface::node>>::_Vector_impl" }
%"struct.std::_Vector_base<medialSurface::node, std::allocator<medialSurface::node>>::_Vector_impl" = type { %"struct.std::_Vector_base<medialSurface::node, std::allocator<medialSurface::node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<medialSurface::node, std::allocator<medialSurface::node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.18" = type { i8 }
%"class.std::allocator.13" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.11 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK13medialSurface12calc_distmapEP5voxelhRK11voxelImageTIhERSt6vectorIS6_INS_4nodeESaIS7_EESaIS9_EE(ptr noundef nonnull align 8 dereferenceable(252), ptr noundef, i8 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

; 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 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; 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 #3

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

; 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)) #3

; 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 #5

; 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12segToVxlMeshRK13medialSurface(ptr dead_on_unwind noalias writable sret(%class.voxelImageT) align 8, ptr noundef nonnull align 8 dereferenceable(252)) local_unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11voxelImageTIhED2Ev(ptr noundef nonnull align 8 dereferenceable(112)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13medialSurface13calc_distmapsEv(ptr noundef nonnull align 8 dereferenceable(252) %0) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %class.voxelImageT, align 8
  %3 = alloca %"class.std::vector.11", align 8
  %4 = alloca %"class.std::vector.16", align 8
  %5 = alloca %"class.std::allocator.18", align 1
  %6 = alloca %"class.std::allocator.13", align 1
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = tail 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.11)
  %11 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %10, i32 noundef 0)
  %12 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout)
  %13 = getelementptr inbounds i8, ptr %0, i64 24
  %14 = load i64, ptr %13, align 8, !tbaa !5
  %.not = icmp eq i64 %14, 0
  br i1 %.not, label %15, label %18

15:                                               ; preds = %1
  %16 = tail 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.12)
  %17 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %115

18:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %2) #6
  call void @_Z12segToVxlMeshRK13medialSurface(ptr dead_on_unwind nonnull writable sret(%class.voxelImageT) align 8 %2, ptr noundef nonnull align 8 dereferenceable(252) %0)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  %19 = getelementptr inbounds i8, ptr %0, i64 12
  %20 = load i32, ptr %19, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  %21 = getelementptr inbounds i8, ptr %0, i64 8
  %22 = load i32, ptr %21, align 8, !tbaa !26
  %23 = sext i32 %22 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #6
  call void @_ZNSaIN13medialSurface4nodeEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  invoke void @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %23, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %24 unwind label %48

24:                                               ; preds = %18
  %25 = add nsw i32 %20, 1
  %26 = sext i32 %25 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @_ZNSaISt6vectorIN13medialSurface4nodeESaIS1_EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEC2EmRKS3_RKS4_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %26, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %27 unwind label %50

27:                                               ; preds = %24
  call void @_ZNSt15__new_allocatorISt6vectorIN13medialSurface4nodeESaIS2_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @_ZNSt15__new_allocatorIN13medialSurface4nodeEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  %28 = load i32, ptr %19, align 4, !tbaa !25
  %.not3339 = icmp slt i32 %28, 0
  br i1 %.not3339, label %._crit_edge41, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %27
  %29 = getelementptr inbounds i8, ptr %0, i64 16
  %30 = load i32, ptr %21, align 8, !tbaa !26
  %31 = icmp sgt i32 %30, 0
  br i1 %31, label %.preheader, label %._crit_edge41

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %32 = phi i32 [ %53, %._crit_edge ], [ %28, %.preheader.lr.ph ]
  %33 = phi i32 [ %54, %._crit_edge ], [ %30, %.preheader.lr.ph ]
  %indvars.iv49 = phi i64 [ %indvars.iv.next50, %._crit_edge ], [ 0, %.preheader.lr.ph ]
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %35 = trunc i64 %indvars.iv49 to i16
  br label %56

._crit_edge41:                                    ; preds = %._crit_edge, %.preheader.lr.ph, %27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %36 = getelementptr inbounds i8, ptr %0, i64 64
  %37 = call noundef i64 @_ZNKSt6vectorI5voxelSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #6
  %38 = udiv i64 %37, 200
  %39 = trunc i64 %38 to i32
  %40 = mul nsw i32 %39, 10
  store i32 %40, ptr %7, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  store i32 1, ptr %8, align 4, !tbaa !27
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %42 = load i32, ptr %41, align 4, !tbaa !27
  %43 = sext i32 %42 to i64
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %44 = call ptr @_ZNSt6vectorI5voxelSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #6
  store ptr %44, ptr %9, align 8
  %45 = call noundef nonnull align 8 dereferenceable(20) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  %46 = call noundef nonnull align 8 dereferenceable(20) ptr @_ZNSt6vectorI5voxelSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef 0) #6
  %47 = icmp ult ptr %46, %45
  br i1 %47, label %.lr.ph45, label %._crit_edge46

48:                                               ; preds = %18
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %52

50:                                               ; preds = %24
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorIN13medialSurface4nodeESaIS2_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  br label %52

52:                                               ; preds = %50, %48
  %.pn = phi { ptr, i32 } [ %51, %50 ], [ %49, %48 ]
  call void @_ZNSt15__new_allocatorIN13medialSurface4nodeEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  br label %110

._crit_edge.loopexit:                             ; preds = %56
  %.pre = load i32, ptr %19, align 4, !tbaa !25
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %53 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %32, %.preheader ]
  %54 = phi i32 [ %70, %._crit_edge.loopexit ], [ %33, %.preheader ]
  %indvars.iv.next50 = add nuw nsw i64 %indvars.iv49, 1
  %55 = sext i32 %53 to i64
  %.not33.not = icmp slt i64 %indvars.iv49, %55
  br i1 %.not33.not, label %.preheader, label %._crit_edge41, !llvm.loop !28

56:                                               ; preds = %.lr.ph, %56
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %56 ]
  %57 = trunc i64 %indvars.iv to i16
  %58 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv49) #6
  %59 = call noundef nonnull align 2 dereferenceable(6) ptr @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %indvars.iv) #6
  store i16 %57, ptr %59, align 2, !tbaa !31
  %60 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv49) #6
  %61 = call noundef nonnull align 2 dereferenceable(6) ptr @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %indvars.iv) #6
  %62 = getelementptr inbounds i8, ptr %61, i64 2
  store i16 %35, ptr %62, align 2, !tbaa !33
  %63 = load i32, ptr %29, align 8, !tbaa !34
  %64 = sdiv i32 %63, -2
  %65 = trunc i32 %64 to i16
  %66 = add i16 %65, -1
  %67 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv49) #6
  %68 = call noundef nonnull align 2 dereferenceable(6) ptr @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %67, i64 noundef %indvars.iv) #6
  %69 = getelementptr inbounds i8, ptr %68, i64 4
  store i16 %66, ptr %69, align 2, !tbaa !35
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %70 = load i32, ptr %21, align 8, !tbaa !26
  %71 = sext i32 %70 to i64
  %72 = icmp slt i64 %indvars.iv.next, %71
  br i1 %72, label %56, label %._crit_edge.loopexit, !llvm.loop !36

._crit_edge46:                                    ; preds = %88, %._crit_edge41
  %.025.lcssa = phi double [ 0.000000e+00, %._crit_edge41 ], [ %92, %88 ]
  call void @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  %73 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.14)
          to label %95 unwind label %111

.lr.ph45:                                         ; preds = %._crit_edge41, %88
  %.043 = phi ptr [ %93, %88 ], [ %46, %._crit_edge41 ]
  %.02542 = phi double [ %92, %88 ], [ 0.000000e+00, %._crit_edge41 ]
  invoke void @_ZNK13medialSurface12calc_distmapEP5voxelhRK11voxelImageTIhERSt6vectorIS6_INS_4nodeESaIS7_EESaIS9_EE(ptr noundef nonnull align 8 dereferenceable(252) %0, ptr noundef nonnull %.043, i8 noundef zeroext 0, ptr noundef nonnull align 8 dereferenceable(112) %2, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %74 unwind label %86

74:                                               ; preds = %.lr.ph45
  %75 = ptrtoint ptr %.043 to i64
  %76 = urem i64 %75, %43
  %77 = icmp eq i64 %76, 0
  br i1 %77, label %78, label %88

78:                                               ; preds = %74
  %79 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.13)
          to label %80 unwind label %86

80:                                               ; preds = %78
  %81 = getelementptr inbounds i8, ptr %.043, i64 16
  %82 = load float, ptr %81, align 8, !tbaa !37
  %83 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %79, float noundef %82)
          to label %84 unwind label %86

84:                                               ; preds = %80
  %85 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) %83)
          to label %88 unwind label %86

86:                                               ; preds = %84, %80, %78, %.lr.ph45
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  br label %110

88:                                               ; preds = %84, %74
  %89 = getelementptr inbounds i8, ptr %.043, i64 16
  %90 = load float, ptr %89, align 8, !tbaa !37
  %91 = fpext float %90 to double
  %92 = fadd double %.02542, %91
  %93 = getelementptr inbounds i8, ptr %.043, i64 24
  %94 = icmp ult ptr %93, %45
  br i1 %94, label %.lr.ph45, label %._crit_edge46, !llvm.loop !39

95:                                               ; preds = %._crit_edge46
  %96 = load i64, ptr %13, align 8, !tbaa !5
  %97 = uitofp i64 %96 to double
  %98 = fdiv double %.025.lcssa, %97
  %99 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %73, double noundef %98)
          to label %100 unwind label %111

100:                                              ; preds = %95
  %101 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %99, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %102 unwind label %111

102:                                              ; preds = %100
  %103 = getelementptr inbounds i8, ptr %0, i64 176
  %104 = load float, ptr %103, align 8, !tbaa !40
  %105 = fcmp olt float %104, 0.000000e+00
  br i1 %105, label %106, label %113

106:                                              ; preds = %102
  %107 = load i64, ptr %13, align 8, !tbaa !5
  %108 = uitofp i64 %107 to double
  %109 = fdiv double %.025.lcssa, %108
  invoke void @_ZN13medialSurface11setDefaultsEd(ptr noundef nonnull align 8 dereferenceable(252) %0, double noundef %109)
          to label %113 unwind label %111

110:                                              ; preds = %86, %52
  %.pn34 = phi { ptr, i32 } [ %87, %86 ], [ %.pn, %52 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  br label %114

111:                                              ; preds = %106, %100, %95, %._crit_edge46
  %112 = landingpad { ptr, i32 }
          cleanup
  br label %114

113:                                              ; preds = %106, %102
  call void @_ZN11voxelImageTIhED2Ev(ptr noundef nonnull align 8 dereferenceable(112) %2) #6
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %2) #6
  br label %115

114:                                              ; preds = %111, %110
  %.pn34.pn = phi { ptr, i32 } [ %.pn34, %110 ], [ %112, %111 ]
  call void @_ZN11voxelImageTIhED2Ev(ptr noundef nonnull align 8 dereferenceable(112) %2) #6
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn34.pn

115:                                              ; preds = %113, %15
  ret void
}

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN13medialSurface4nodeESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIS_IN13medialSurface4nodeESaIS1_EESaIS3_EEC2EmRKS3_RKS4_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(20) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt6vectorIN13medialSurface4nodeESaIS2_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #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 = { 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 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !11, i64 24}
!6 = !{!"_ZTS13medialSurface", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !11, i64 24, !11, i64 32, !7, i64 40, !12, i64 48, !13, i64 64, !17, i64 88, !21, i64 112, !22, i64 176, !24, i64 184, !24, i64 192, !24, i64 200, !24, i64 208, !24, i64 216, !24, i64 224, !10, i64 232, !24, i64 240, !22, i64 248}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!"_ZTS7segment", !10, i64 0, !8, i64 4, !7, i64 8}
!13 = !{!"_ZTSSt6vectorI5voxelSaIS0_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseI5voxelSaIS0_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseI5voxelSaIS0_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseI5voxelSaIS0_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!17 = !{!"_ZTSSt6vectorI10medialBallSaIS0_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseI10medialBallSaIS0_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseI10medialBallSaIS0_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseI10medialBallSaIS0_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!21 = !{!"_ZTS10medialBall", !7, i64 0, !22, i64 8, !22, i64 12, !22, i64 16, !23, i64 20, !22, i64 24, !23, i64 28, !23, i64 30, !23, i64 32, !23, i64 34, !23, i64 36, !7, i64 40, !7, i64 48, !7, i64 56}
!22 = !{!"float", !8, i64 0}
!23 = !{!"short", !8, i64 0}
!24 = !{!"double", !8, i64 0}
!25 = !{!6, !10, i64 12}
!26 = !{!6, !10, i64 8}
!27 = !{!10, !10, i64 0}
!28 = distinct !{!28, !29, !30}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!"llvm.loop.unswitch.partial.disable"}
!31 = !{!32, !23, i64 0}
!32 = !{!"_ZTSN13medialSurface4nodeE", !23, i64 0, !23, i64 2, !23, i64 4}
!33 = !{!32, !23, i64 2}
!34 = !{!6, !10, i64 16}
!35 = !{!32, !23, i64 4}
!36 = distinct !{!36, !29}
!37 = !{!38, !22, i64 16}
!38 = !{!"_ZTS5voxel", !7, i64 0, !23, i64 8, !23, i64 10, !23, i64 12, !22, i64 16}
!39 = distinct !{!39, !29}
!40 = !{!6, !22, i64 176}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass