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

; 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.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::vector.54" = type { %"struct.std::_Vector_base.55" }
%"struct.std::_Vector_base.55" = 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.__gnu_cxx::__normal_iterator.59" = type { ptr }
%class.metaballcomparer = type { i8 }
%"class.std::reverse_iterator" = type { %"class.__gnu_cxx::__normal_iterator.60" }
%"class.__gnu_cxx::__normal_iterator.60" = 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.voxel = type <{ ptr, i16, i16, i16, [2 x i8], float, [4 x i8] }>

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.55 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [11 x i8], align 1

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

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

; Function Attrs: 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) #1

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3 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)) #1

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13medialSurface13calc_distmapsEv(ptr noundef nonnull align 8 dereferenceable(252)) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorI5voxelSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 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)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13medialSurface12smoothRadiusEv(ptr noundef nonnull align 8 dereferenceable(252)) #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxltIP5voxelSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13medialSurface15buildvoxelspaceEv(ptr noundef nonnull align 8 dereferenceable(252)) #3 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13medialSurface31paradox_pre_removeincludedballIEv(ptr noundef nonnull align 8 dereferenceable(252)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13medialSurface26paradoxremoveincludedballIEv(ptr noundef nonnull align 8 dereferenceable(252)) #3 align 2

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPP5voxelSt6vectorIS3_SaIS3_EEEE16metaballcomparerEvT_SA_T0_(ptr, ptr) #1

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxltIPP5voxelSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13medialSurface23createBallsAndHierarchyEv(ptr noundef nonnull align 8 dereferenceable(252) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca double, align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.std::vector.54", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator.59", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator.59", align 8
  %17 = alloca %class.metaballcomparer, align 1
  %18 = alloca %"class.__gnu_cxx::__normal_iterator.59", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator.59", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.59", align 8
  %21 = alloca i32, align 4
  %22 = alloca %"class.std::reverse_iterator", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator.60", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator.60", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator.60", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator.60", align 8
  %27 = alloca %"class.__gnu_cxx::__normal_iterator.60", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator.60", align 8
  %29 = alloca %"class.__gnu_cxx::__normal_iterator.60", align 8
  %30 = alloca %"class.__gnu_cxx::__normal_iterator.60", align 8
  %31 = alloca %"class.__gnu_cxx::__normal_iterator.60", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %32 = load ptr, ptr %2, align 8
  call void @_ZN13medialSurface15buildvoxelspaceEv(ptr noundef nonnull align 8 dereferenceable(252) %32)
  call void @_ZN13medialSurface13calc_distmapsEv(ptr noundef nonnull align 8 dereferenceable(252) %32)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %40, %1
  %34 = load i32, ptr %3, align 4, !tbaa !9
  %35 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 20
  %36 = load i32, ptr %35, align 8, !tbaa !11
  %37 = icmp slt i32 %34, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %43

39:                                               ; preds = %33
  call void @_ZN13medialSurface12smoothRadiusEv(ptr noundef nonnull align 8 dereferenceable(252) %32)
  br label %40

40:                                               ; preds = %39
  %41 = load i32, ptr %3, align 4, !tbaa !9
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %3, align 4, !tbaa !9
  br label %33, !llvm.loop !27

43:                                               ; preds = %38
  %44 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 6
  store i64 0, ptr %44, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store double 0.000000e+00, ptr %4, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %45 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 9
  %46 = call ptr @_ZNSt6vectorI5voxelSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %45) #6
  %47 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %46, ptr %47, align 8
  %48 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEmiEl(ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef 1) #6
  %49 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  store ptr %48, ptr %49, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %50 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 9
  %51 = call ptr @_ZNSt6vectorI5voxelSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %50) #6
  %52 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %51, ptr %52, align 8
  br label %53

53:                                               ; preds = %79, %43
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %55 = call noundef zeroext i1 @_ZN9__gnu_cxxltIP5voxelSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br i1 %55, label %56, label %80

56:                                               ; preds = %53
  %57 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %58 = getelementptr inbounds %class.voxel, ptr %57, i32 0, i32 5
  %59 = load float, ptr %58, align 8, !tbaa !31
  %60 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 12
  %61 = load float, ptr %60, align 8, !tbaa !33
  %62 = fcmp oge float %59, %61
  br i1 %62, label %63, label %76

63:                                               ; preds = %56
  %64 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 11
  %65 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %66 = getelementptr inbounds %class.voxel, ptr %65, i32 0, i32 0
  store ptr %64, ptr %66, align 8, !tbaa !34
  %67 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 6
  %68 = load i64, ptr %67, align 8, !tbaa !29
  %69 = add i64 %68, 1
  store i64 %69, ptr %67, align 8, !tbaa !29
  %70 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %71 = getelementptr inbounds %class.voxel, ptr %70, i32 0, i32 5
  %72 = load float, ptr %71, align 8, !tbaa !31
  %73 = fpext float %72 to double
  %74 = load double, ptr %4, align 8, !tbaa !30
  %75 = fadd double %74, %73
  store double %75, ptr %4, align 8, !tbaa !30
  br label %79

76:                                               ; preds = %56
  %77 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %78 = getelementptr inbounds %class.voxel, ptr %77, i32 0, i32 0
  store ptr null, ptr %78, align 8, !tbaa !34
  br label %79

79:                                               ; preds = %76, %63
  br label %53, !llvm.loop !35

80:                                               ; preds = %53
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.55)
  %82 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 6
  %83 = load i64, ptr %82, align 8, !tbaa !29
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %81, i64 noundef %83)
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef @.str.56)
  %86 = load double, ptr %4, align 8, !tbaa !30
  %87 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 6
  %88 = load i64, ptr %87, align 8, !tbaa !29
  %89 = uitofp i64 %88 to double
  %90 = fdiv double %86, %89
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %85, double noundef %90)
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @_ZN13medialSurface31paradox_pre_removeincludedballIEv(ptr noundef nonnull align 8 dereferenceable(252) %32)
  call void @_ZN13medialSurface26paradoxremoveincludedballIEv(ptr noundef nonnull align 8 dereferenceable(252) %32)
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.57)
  %94 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 6
  %95 = load i64, ptr %94, align 8, !tbaa !29
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %93, i64 noundef %95)
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %96, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #6
  call void @_ZNSt6vectorIP5voxelSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  %98 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 6
  %99 = load i64, ptr %98, align 8, !tbaa !29
  invoke void @_ZNSt6vectorIP5voxelSaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %99)
          to label %100 unwind label %127

100:                                              ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %101 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 9
  %102 = call ptr @_ZNSt6vectorI5voxelSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %101) #6
  %103 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %102, ptr %103, align 8
  %104 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEmiEl(ptr noundef nonnull align 8 dereferenceable(8) %12, i64 noundef 1) #6
  %105 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %104, ptr %105, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %106 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 9
  %107 = call ptr @_ZNSt6vectorI5voxelSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %106) #6
  %108 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %107, ptr %108, align 8
  br label %109

109:                                              ; preds = %143, %100
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  %111 = call noundef zeroext i1 @_ZN9__gnu_cxxltIP5voxelSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %110, ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  br i1 %111, label %112, label %144

112:                                              ; preds = %109
  %113 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  %114 = getelementptr inbounds %class.voxel, ptr %113, i32 0, i32 0
  %115 = load ptr, ptr %114, align 8, !tbaa !34
  %116 = icmp ne ptr %115, null
  br i1 %116, label %117, label %143

117:                                              ; preds = %112
  %118 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  %119 = getelementptr inbounds %class.voxel, ptr %118, i32 0, i32 5
  %120 = load float, ptr %119, align 8, !tbaa !31
  %121 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 12
  %122 = load float, ptr %121, align 8, !tbaa !33
  %123 = fcmp oge float %120, %122
  br i1 %123, label %124, label %135

124:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %125 = call noundef nonnull align 8 dereferenceable(20) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  store ptr %125, ptr %14, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIP5voxelSaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %126 unwind label %131

126:                                              ; preds = %124
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %142

127:                                              ; preds = %163, %80
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %9, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %10, align 4
  br label %297

131:                                              ; preds = %124
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %9, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %188

135:                                              ; preds = %117
  %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.58)
          to label %137 unwind label %138

137:                                              ; preds = %135
  br label %142

138:                                              ; preds = %154, %152, %150, %146, %144, %135
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %9, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %10, align 4
  br label %188

142:                                              ; preds = %137, %126
  br label %143

143:                                              ; preds = %142, %112
  br label %109, !llvm.loop !36

144:                                              ; preds = %109
  %145 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.59)
          to label %146 unwind label %138

146:                                              ; preds = %144
  %147 = call noundef i64 @_ZNKSt6vectorIP5voxelSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  %148 = trunc i64 %147 to i32
  %149 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %145, i32 noundef %148)
          to label %150 unwind label %138

150:                                              ; preds = %146
  %151 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %149, ptr noundef @.str.60)
          to label %152 unwind label %138

152:                                              ; preds = %150
  %153 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %151, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %154 unwind label %138

154:                                              ; preds = %152
  %155 = call ptr @_ZNSt6vectorIP5voxelSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  %156 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.59", ptr %15, i32 0, i32 0
  store ptr %155, ptr %156, align 8
  %157 = call ptr @_ZNSt6vectorIP5voxelSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  %158 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.59", ptr %16, i32 0, i32 0
  store ptr %157, ptr %158, align 8
  %159 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.59", ptr %15, i32 0, i32 0
  %160 = load ptr, ptr %159, align 8
  %161 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.59", ptr %16, i32 0, i32 0
  %162 = load ptr, ptr %161, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPP5voxelSt6vectorIS3_SaIS3_EEEE16metaballcomparerEvT_SA_T0_(ptr %160, ptr %162)
          to label %163 unwind label %138

163:                                              ; preds = %154
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  %164 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 10
  %165 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 6
  %166 = load i64, ptr %165, align 8, !tbaa !29
  invoke void @_ZNSt6vectorI10medialBallSaIS0_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %164, i64 noundef %166)
          to label %167 unwind label %127

167:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %168 = call ptr @_ZNSt6vectorIP5voxelSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  %169 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.59", ptr %19, i32 0, i32 0
  store ptr %168, ptr %169, align 8
  %170 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP5voxelSt6vectorIS2_SaIS2_EEEmiEl(ptr noundef nonnull align 8 dereferenceable(8) %19, i64 noundef 1) #6
  %171 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.59", ptr %18, i32 0, i32 0
  store ptr %170, ptr %171, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %172 = call ptr @_ZNSt6vectorIP5voxelSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  %173 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.59", ptr %20, i32 0, i32 0
  store ptr %172, ptr %173, align 8
  br label %174

174:                                              ; preds = %184, %167
  %175 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPP5voxelSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  %176 = call noundef zeroext i1 @_ZN9__gnu_cxxltIPP5voxelSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %175, ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  br i1 %176, label %177, label %197

177:                                              ; preds = %174
  %178 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 10
  %179 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP5voxelSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !9
  %180 = invoke noundef nonnull align 8 dereferenceable(64) ptr @_ZNSt6vectorI10medialBallSaIS0_EE12emplace_backIJRP5voxeliEEERS0_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %178, ptr noundef nonnull align 8 dereferenceable(8) %179, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %181 unwind label %189

181:                                              ; preds = %177
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %182 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 10
  call void @_ZNSt6vectorI10medialBallSaIS0_EE6rbeginEv(ptr dead_on_unwind writable sret(%"class.std::reverse_iterator") align 8 %22, ptr noundef nonnull align 8 dereferenceable(24) %182) #6
  %183 = invoke noundef nonnull align 8 dereferenceable(64) ptr @_ZNKSt16reverse_iteratorIN9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS2_SaIS2_EEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %184 unwind label %193

184:                                              ; preds = %181
  %185 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP5voxelSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  %186 = load ptr, ptr %185, align 8, !tbaa !5
  %187 = getelementptr inbounds %class.voxel, ptr %186, i32 0, i32 0
  store ptr %183, ptr %187, align 8, !tbaa !34
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %174, !llvm.loop !37

188:                                              ; preds = %138, %131
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %297

189:                                              ; preds = %177
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %9, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %212

193:                                              ; preds = %181
  %194 = landingpad { ptr, i32 }
          cleanup
  %195 = extractvalue { ptr, i32 } %194, 0
  store ptr %195, ptr %9, align 8
  %196 = extractvalue { ptr, i32 } %194, 1
  store i32 %196, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %212

197:                                              ; preds = %174
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %198 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 10
  %199 = call ptr @_ZNSt6vectorI10medialBallSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %198) #6
  %200 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.60", ptr %23, i32 0, i32 0
  store ptr %199, ptr %200, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %201 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 10
  %202 = call ptr @_ZNSt6vectorI10medialBallSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %201) #6
  %203 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.60", ptr %25, i32 0, i32 0
  store ptr %202, ptr %203, align 8
  %204 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS1_SaIS1_EEEmiEl(ptr noundef nonnull align 8 dereferenceable(8) %25, i64 noundef 1) #6
  %205 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.60", ptr %24, i32 0, i32 0
  store ptr %204, ptr %205, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  br label %206

206:                                              ; preds = %211, %197
  %207 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #6
  %208 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP10medialBallSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %207, ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  br i1 %208, label %209, label %217

209:                                              ; preds = %206
  %210 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #6
  invoke void @_ZN13medialSurface10moveUphillEP10medialBall(ptr noundef nonnull align 8 dereferenceable(252) %32, ptr noundef %210)
          to label %211 unwind label %213

211:                                              ; preds = %209
  br label %206, !llvm.loop !38

212:                                              ; preds = %193, %189
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %297

213:                                              ; preds = %209
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %9, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %296

217:                                              ; preds = %206
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %218 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 10
  %219 = call ptr @_ZNSt6vectorI10medialBallSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %218) #6
  %220 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.60", ptr %27, i32 0, i32 0
  store ptr %219, ptr %220, align 8
  %221 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS1_SaIS1_EEEmiEl(ptr noundef nonnull align 8 dereferenceable(8) %27, i64 noundef 1) #6
  %222 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.60", ptr %26, i32 0, i32 0
  store ptr %221, ptr %222, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  br label %223

223:                                              ; preds = %228, %217
  %224 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %26) #6
  %225 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP10medialBallSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %224, ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  br i1 %225, label %226, label %233

226:                                              ; preds = %223
  %227 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %26) #6
  invoke void @_ZN13medialSurface12moveUphillp1EP10medialBall(ptr noundef nonnull align 8 dereferenceable(252) %32, ptr noundef %227)
          to label %228 unwind label %229

228:                                              ; preds = %226
  br label %223, !llvm.loop !39

229:                                              ; preds = %226
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %9, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %296

233:                                              ; preds = %223
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %234 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 10
  %235 = call ptr @_ZNSt6vectorI10medialBallSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %234) #6
  %236 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.60", ptr %29, i32 0, i32 0
  store ptr %235, ptr %236, align 8
  %237 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS1_SaIS1_EEEmiEl(ptr noundef nonnull align 8 dereferenceable(8) %29, i64 noundef 1) #6
  %238 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.60", ptr %28, i32 0, i32 0
  store ptr %237, ptr %238, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  br label %239

239:                                              ; preds = %244, %233
  %240 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #6
  %241 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP10medialBallSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %240, ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  br i1 %241, label %242, label %249

242:                                              ; preds = %239
  %243 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #6
  invoke void @_ZN13medialSurface10moveUphillEP10medialBall(ptr noundef nonnull align 8 dereferenceable(252) %32, ptr noundef %243)
          to label %244 unwind label %245

244:                                              ; preds = %242
  br label %239, !llvm.loop !40

245:                                              ; preds = %242
  %246 = landingpad { ptr, i32 }
          cleanup
  %247 = extractvalue { ptr, i32 } %246, 0
  store ptr %247, ptr %9, align 8
  %248 = extractvalue { ptr, i32 } %246, 1
  store i32 %248, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  br label %296

249:                                              ; preds = %239
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  %250 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.61)
          to label %251 unwind label %277

251:                                              ; preds = %249
  %252 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout)
          to label %253 unwind label %277

253:                                              ; preds = %251
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %254 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 10
  %255 = call ptr @_ZNSt6vectorI10medialBallSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %254) #6
  %256 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.60", ptr %30, i32 0, i32 0
  store ptr %255, ptr %256, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %257 = getelementptr inbounds %class.medialSurface, ptr %32, i32 0, i32 10
  %258 = call ptr @_ZNSt6vectorI10medialBallSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %257) #6
  %259 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.60", ptr %31, i32 0, i32 0
  store ptr %258, ptr %259, align 8
  br label %260

260:                                              ; preds = %285, %253
  %261 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP10medialBallSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  br i1 %261, label %262, label %287

262:                                              ; preds = %260
  %263 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %31) #6
  invoke void @_ZN13medialSurface8findBossEP10medialBall(ptr noundef nonnull align 8 dereferenceable(252) %32, ptr noundef %263)
          to label %264 unwind label %281

264:                                              ; preds = %262
  %265 = call noundef i64 @_ZN9__gnu_cxxmiIP10medialBallSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS9_SC_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %30) #6
  %266 = srem i64 %265, 100000
  %267 = icmp eq i64 %266, 0
  br i1 %267, label %268, label %285

268:                                              ; preds = %264
  %269 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.62)
          to label %270 unwind label %281

270:                                              ; preds = %268
  %271 = call noundef i64 @_ZN9__gnu_cxxmiIP10medialBallSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS9_SC_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %30) #6
  %272 = trunc i64 %271 to i32
  %273 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %269, i32 noundef %272)
          to label %274 unwind label %281

274:                                              ; preds = %270
  %275 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout)
          to label %276 unwind label %281

276:                                              ; preds = %274
  br label %285

277:                                              ; preds = %251, %249
  %278 = landingpad { ptr, i32 }
          cleanup
  %279 = extractvalue { ptr, i32 } %278, 0
  store ptr %279, ptr %9, align 8
  %280 = extractvalue { ptr, i32 } %278, 1
  store i32 %280, ptr %10, align 4
  br label %296

281:                                              ; preds = %293, %289, %287, %274, %270, %268, %262
  %282 = landingpad { ptr, i32 }
          cleanup
  %283 = extractvalue { ptr, i32 } %282, 0
  store ptr %283, ptr %9, align 8
  %284 = extractvalue { ptr, i32 } %282, 1
  store i32 %284, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br label %296

285:                                              ; preds = %276, %264
  %286 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %31) #6
  br label %260, !llvm.loop !41

287:                                              ; preds = %260
  %288 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.62)
          to label %289 unwind label %281

289:                                              ; preds = %287
  %290 = call noundef i64 @_ZN9__gnu_cxxmiIP10medialBallSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS9_SC_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %30) #6
  %291 = trunc i64 %290 to i32
  %292 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %288, i32 noundef %291)
          to label %293 unwind label %281

293:                                              ; preds = %289
  %294 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %292, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %295 unwind label %281

295:                                              ; preds = %293
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @_ZNSt6vectorIP5voxelSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  ret void

296:                                              ; preds = %281, %277, %245, %229, %213
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %297

297:                                              ; preds = %296, %212, %188, %127
  call void @_ZNSt6vectorIP5voxelSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %298

298:                                              ; preds = %297
  %299 = load ptr, ptr %9, align 8
  %300 = load i32, ptr %10, align 4
  %301 = insertvalue { ptr, i32 } poison, ptr %299, 0
  %302 = insertvalue { ptr, i32 } %301, i32 %300, 1
  resume { ptr, i32 } %302
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI10medialBallSaIS0_EE6rbeginEv(ptr dead_on_unwind noalias writable sret(%"class.std::reverse_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIP10medialBallSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

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

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


; 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.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::vector.54" = type { %"struct.std::_Vector_base.55" }
%"struct.std::_Vector_base.55" = 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.__gnu_cxx::__normal_iterator.59" = type { ptr }
%"class.std::reverse_iterator" = type { %"class.__gnu_cxx::__normal_iterator.60" }
%"class.__gnu_cxx::__normal_iterator.60" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.55 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [11 x i8], align 1

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

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

; Function Attrs: 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 #1

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13medialSurface13calc_distmapsEv(ptr noundef nonnull align 8 dereferenceable(252)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorI5voxelSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 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 #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13medialSurface12smoothRadiusEv(ptr noundef nonnull align 8 dereferenceable(252)) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxltIP5voxelSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13medialSurface15buildvoxelspaceEv(ptr noundef nonnull align 8 dereferenceable(252)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13medialSurface31paradox_pre_removeincludedballIEv(ptr noundef nonnull align 8 dereferenceable(252)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13medialSurface26paradoxremoveincludedballIEv(ptr noundef nonnull align 8 dereferenceable(252)) local_unnamed_addr #3 align 2

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPP5voxelSt6vectorIS3_SaIS3_EEEE16metaballcomparerEvT_SA_T0_(ptr, ptr) local_unnamed_addr #1

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxltIPP5voxelSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13medialSurface23createBallsAndHierarchyEv(ptr noundef nonnull align 8 dereferenceable(252) %0) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.std::vector.54", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.59", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.59", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.59", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::reverse_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator.60", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator.60", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator.60", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator.60", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator.60", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.60", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator.60", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator.60", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator.60", align 8
  tail call void @_ZN13medialSurface15buildvoxelspaceEv(ptr noundef nonnull align 8 dereferenceable(252) %0)
  tail call void @_ZN13medialSurface13calc_distmapsEv(ptr noundef nonnull align 8 dereferenceable(252) %0)
  %24 = getelementptr inbounds i8, ptr %0, i64 232
  %25 = load i32, ptr %24, align 8, !tbaa !5
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %1
  %27 = getelementptr inbounds i8, ptr %0, i64 32
  store i64 0, ptr %27, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %28 = getelementptr inbounds i8, ptr %0, i64 64
  %29 = tail call ptr @_ZNSt6vectorI5voxelSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #6
  store ptr %29, ptr %3, align 8
  %30 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEmiEl(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef 1) #6
  store ptr %30, ptr %2, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %31 = call ptr @_ZNSt6vectorI5voxelSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #6
  store ptr %31, ptr %4, align 8
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  %33 = call noundef zeroext i1 @_ZN9__gnu_cxxltIP5voxelSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %33, label %.lr.ph25, label %._crit_edge26

.lr.ph25:                                         ; preds = %._crit_edge
  %34 = getelementptr inbounds i8, ptr %0, i64 176
  %35 = getelementptr inbounds i8, ptr %0, i64 112
  br label %39

.lr.ph:                                           ; preds = %1, %.lr.ph
  %.022 = phi i32 [ %36, %.lr.ph ], [ 0, %1 ]
  tail call void @_ZN13medialSurface12smoothRadiusEv(ptr noundef nonnull align 8 dereferenceable(252) %0)
  %36 = add nuw nsw i32 %.022, 1
  %37 = load i32, ptr %24, align 8, !tbaa !5
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %.lr.ph, label %._crit_edge, !llvm.loop !26

39:                                               ; preds = %.lr.ph25, %55
  %.0723 = phi double [ 0.000000e+00, %.lr.ph25 ], [ %.1, %55 ]
  %40 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  %41 = getelementptr inbounds i8, ptr %40, i64 16
  %42 = load float, ptr %41, align 8, !tbaa !28
  %43 = load float, ptr %34, align 8, !tbaa !30
  %44 = fcmp ult float %42, %43
  %45 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  br i1 %44, label %54, label %46

46:                                               ; preds = %39
  store ptr %35, ptr %45, align 8, !tbaa !31
  %47 = load i64, ptr %27, align 8, !tbaa !25
  %48 = add i64 %47, 1
  store i64 %48, ptr %27, align 8, !tbaa !25
  %49 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  %50 = getelementptr inbounds i8, ptr %49, i64 16
  %51 = load float, ptr %50, align 8, !tbaa !28
  %52 = fpext float %51 to double
  %53 = fadd double %.0723, %52
  br label %55

54:                                               ; preds = %39
  store ptr null, ptr %45, align 8, !tbaa !31
  br label %55

55:                                               ; preds = %54, %46
  %.1 = phi double [ %53, %46 ], [ %.0723, %54 ]
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  %57 = call noundef zeroext i1 @_ZN9__gnu_cxxltIP5voxelSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %57, label %39, label %._crit_edge26, !llvm.loop !32

._crit_edge26:                                    ; preds = %55, %._crit_edge
  %.07.lcssa = phi double [ 0.000000e+00, %._crit_edge ], [ %.1, %55 ]
  %58 = 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.55)
  %59 = load i64, ptr %27, align 8, !tbaa !25
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %58, i64 noundef %59)
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef nonnull @.str.56)
  %62 = load i64, ptr %27, align 8, !tbaa !25
  %63 = uitofp i64 %62 to double
  %64 = fdiv double %.07.lcssa, %63
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %61, double noundef %64)
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %65, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @_ZN13medialSurface31paradox_pre_removeincludedballIEv(ptr noundef nonnull align 8 dereferenceable(252) %0)
  call void @_ZN13medialSurface26paradoxremoveincludedballIEv(ptr noundef nonnull align 8 dereferenceable(252) %0)
  %67 = 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.57)
  %68 = load i64, ptr %27, align 8, !tbaa !25
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %67, i64 noundef %68)
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @_ZNSt6vectorIP5voxelSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %71 = load i64, ptr %27, align 8, !tbaa !25
  invoke void @_ZNSt6vectorIP5voxelSaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %71)
          to label %72 unwind label %91

72:                                               ; preds = %._crit_edge26
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %73 = call ptr @_ZNSt6vectorI5voxelSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #6
  store ptr %73, ptr %7, align 8
  %74 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEmiEl(ptr noundef nonnull align 8 dereferenceable(8) %7, i64 noundef 1) #6
  store ptr %74, ptr %6, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %75 = call ptr @_ZNSt6vectorI5voxelSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #6
  store ptr %75, ptr %8, align 8
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  %77 = call noundef zeroext i1 @_ZN9__gnu_cxxltIP5voxelSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  br i1 %77, label %.lr.ph28, label %._crit_edge29

.lr.ph28:                                         ; preds = %72
  %78 = getelementptr inbounds i8, ptr %0, i64 176
  br label %79

79:                                               ; preds = %.lr.ph28, %97
  %80 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  %81 = load ptr, ptr %80, align 8, !tbaa !31
  %.not = icmp eq ptr %81, null
  br i1 %.not, label %97, label %82

82:                                               ; preds = %79
  %83 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  %84 = getelementptr inbounds i8, ptr %83, i64 16
  %85 = load float, ptr %84, align 8, !tbaa !28
  %86 = load float, ptr %78, align 8, !tbaa !30
  %87 = fcmp ult float %85, %86
  br i1 %87, label %95, label %88

88:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %89 = call noundef nonnull align 8 dereferenceable(20) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  store ptr %89, ptr %9, align 8, !tbaa !33
  invoke void @_ZNSt6vectorIP5voxelSaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %90 unwind label %93

90:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %97

91:                                               ; preds = %112, %._crit_edge26
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %198

93:                                               ; preds = %88
  %94 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %129

95:                                               ; preds = %82
  %96 = 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.58)
          to label %97 unwind label %.loopexit17

.loopexit17:                                      ; preds = %95
  %lpad.loopexit19 = landingpad { ptr, i32 }
          cleanup
  br label %129

.loopexit.split-lp18:                             ; preds = %._crit_edge29, %101, %105, %107, %109
  %lpad.loopexit.split-lp20 = landingpad { ptr, i32 }
          cleanup
  br label %129

97:                                               ; preds = %90, %95, %79
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  %99 = call noundef zeroext i1 @_ZN9__gnu_cxxltIP5voxelSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %98, ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  br i1 %99, label %79, label %._crit_edge29, !llvm.loop !34

._crit_edge29:                                    ; preds = %97, %72
  %100 = 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.59)
          to label %101 unwind label %.loopexit.split-lp18

101:                                              ; preds = %._crit_edge29
  %102 = call noundef i64 @_ZNKSt6vectorIP5voxelSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %103 = trunc i64 %102 to i32
  %104 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %100, i32 noundef %103)
          to label %105 unwind label %.loopexit.split-lp18

105:                                              ; preds = %101
  %106 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %104, ptr noundef nonnull @.str.60)
          to label %107 unwind label %.loopexit.split-lp18

107:                                              ; preds = %105
  %108 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %106, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %109 unwind label %.loopexit.split-lp18

109:                                              ; preds = %107
  %110 = call ptr @_ZNSt6vectorIP5voxelSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %111 = call ptr @_ZNSt6vectorIP5voxelSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPP5voxelSt6vectorIS3_SaIS3_EEEE16metaballcomparerEvT_SA_T0_(ptr %110, ptr %111)
          to label %112 unwind label %.loopexit.split-lp18

112:                                              ; preds = %109
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  %113 = getelementptr inbounds i8, ptr %0, i64 88
  %114 = load i64, ptr %27, align 8, !tbaa !25
  invoke void @_ZNSt6vectorI10medialBallSaIS0_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %113, i64 noundef %114)
          to label %115 unwind label %91

115:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %116 = call ptr @_ZNSt6vectorIP5voxelSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  store ptr %116, ptr %11, align 8
  %117 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP5voxelSt6vectorIS2_SaIS2_EEEmiEl(ptr noundef nonnull align 8 dereferenceable(8) %11, i64 noundef 1) #6
  store ptr %117, ptr %10, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  %118 = call ptr @_ZNSt6vectorIP5voxelSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  store ptr %118, ptr %12, align 8
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPP5voxelSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  %120 = call noundef zeroext i1 @_ZN9__gnu_cxxltIPP5voxelSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %119, ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  br i1 %120, label %.lr.ph31, label %._crit_edge32

.lr.ph31:                                         ; preds = %115, %123
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP5voxelSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #6
  store i32 0, ptr %13, align 4, !tbaa !35
  %122 = invoke noundef nonnull align 8 dereferenceable(64) ptr @_ZNSt6vectorI10medialBallSaIS0_EE12emplace_backIJRP5voxeliEEERS0_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %113, ptr noundef nonnull align 8 dereferenceable(8) %121, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %123 unwind label %130

123:                                              ; preds = %.lr.ph31
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  call void @_ZNSt6vectorI10medialBallSaIS0_EE6rbeginEv(ptr dead_on_unwind nonnull writable sret(%"class.std::reverse_iterator") align 8 %14, ptr noundef nonnull align 8 dereferenceable(24) %113) #6
  %124 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNKSt16reverse_iteratorIN9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS2_SaIS2_EEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP5voxelSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  %126 = load ptr, ptr %125, align 8, !tbaa !33
  store ptr %124, ptr %126, align 8, !tbaa !31
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPP5voxelSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  %128 = call noundef zeroext i1 @_ZN9__gnu_cxxltIPP5voxelSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %127, ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  br i1 %128, label %.lr.ph31, label %._crit_edge32, !llvm.loop !36

129:                                              ; preds = %.loopexit17, %.loopexit.split-lp18, %93
  %.pn14 = phi { ptr, i32 } [ %94, %93 ], [ %lpad.loopexit19, %.loopexit17 ], [ %lpad.loopexit.split-lp20, %.loopexit.split-lp18 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %198

130:                                              ; preds = %.lr.ph31
  %131 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  br label %198

._crit_edge32:                                    ; preds = %123, %115
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #6
  %132 = call ptr @_ZNSt6vectorI10medialBallSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %113) #6
  store ptr %132, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #6
  %133 = call ptr @_ZNSt6vectorI10medialBallSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %113) #6
  store ptr %133, ptr %17, align 8
  %134 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS1_SaIS1_EEEmiEl(ptr noundef nonnull align 8 dereferenceable(8) %17, i64 noundef 1) #6
  store ptr %134, ptr %16, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  br label %135

135:                                              ; preds = %138, %._crit_edge32
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  %137 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP10medialBallSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %136, ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  br i1 %137, label %138, label %142

138:                                              ; preds = %135
  %139 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  invoke void @_ZN13medialSurface10moveUphillEP10medialBall(ptr noundef nonnull align 8 dereferenceable(252) %0, ptr noundef nonnull %139)
          to label %135 unwind label %140, !llvm.loop !37

140:                                              ; preds = %138
  %141 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  br label %197

142:                                              ; preds = %135
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #6
  %143 = call ptr @_ZNSt6vectorI10medialBallSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %113) #6
  store ptr %143, ptr %19, align 8
  %144 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS1_SaIS1_EEEmiEl(ptr noundef nonnull align 8 dereferenceable(8) %19, i64 noundef 1) #6
  store ptr %144, ptr %18, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #6
  br label %145

145:                                              ; preds = %148, %142
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  %147 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP10medialBallSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %146, ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  br i1 %147, label %148, label %152

148:                                              ; preds = %145
  %149 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  invoke void @_ZN13medialSurface12moveUphillp1EP10medialBall(ptr noundef nonnull align 8 dereferenceable(252) %0, ptr noundef nonnull %149)
          to label %145 unwind label %150, !llvm.loop !38

150:                                              ; preds = %148
  %151 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  br label %197

152:                                              ; preds = %145
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #6
  %153 = call ptr @_ZNSt6vectorI10medialBallSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %113) #6
  store ptr %153, ptr %21, align 8
  %154 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS1_SaIS1_EEEmiEl(ptr noundef nonnull align 8 dereferenceable(8) %21, i64 noundef 1) #6
  store ptr %154, ptr %20, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #6
  br label %155

155:                                              ; preds = %158, %152
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  %157 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP10medialBallSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %156, ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  br i1 %157, label %158, label %162

158:                                              ; preds = %155
  %159 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  invoke void @_ZN13medialSurface10moveUphillEP10medialBall(ptr noundef nonnull align 8 dereferenceable(252) %0, ptr noundef nonnull %159)
          to label %155 unwind label %160, !llvm.loop !39

160:                                              ; preds = %158
  %161 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #6
  br label %197

162:                                              ; preds = %155
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #6
  %163 = 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.61)
          to label %164 unwind label %183

164:                                              ; preds = %162
  %165 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout)
          to label %166 unwind label %183

166:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #6
  %167 = call ptr @_ZNSt6vectorI10medialBallSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %113) #6
  store ptr %167, ptr %22, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #6
  %168 = call ptr @_ZNSt6vectorI10medialBallSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %113) #6
  store ptr %168, ptr %23, align 8
  %169 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP10medialBallSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  br i1 %169, label %.lr.ph34, label %._crit_edge35

.lr.ph34:                                         ; preds = %166, %186
  %170 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  invoke void @_ZN13medialSurface8findBossEP10medialBall(ptr noundef nonnull align 8 dereferenceable(252) %0, ptr noundef nonnull %170)
          to label %171 unwind label %.loopexit

171:                                              ; preds = %.lr.ph34
  %172 = call noundef i64 @_ZN9__gnu_cxxmiIP10medialBallSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS9_SC_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  %173 = srem i64 %172, 100000
  %174 = icmp eq i64 %173, 0
  br i1 %174, label %175, label %186

175:                                              ; preds = %171
  %176 = 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.62)
          to label %177 unwind label %.loopexit

177:                                              ; preds = %175
  %178 = call noundef i64 @_ZN9__gnu_cxxmiIP10medialBallSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS9_SC_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  %179 = trunc i64 %178 to i32
  %180 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %176, i32 noundef %179)
          to label %181 unwind label %.loopexit

181:                                              ; preds = %177
  %182 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout)
          to label %186 unwind label %.loopexit

183:                                              ; preds = %164, %162
  %184 = landingpad { ptr, i32 }
          cleanup
  br label %197

.loopexit:                                        ; preds = %.lr.ph34, %175, %177, %181
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %185

.loopexit.split-lp:                               ; preds = %._crit_edge35, %190, %194
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %185

185:                                              ; preds = %.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #6
  br label %197

186:                                              ; preds = %181, %171
  %187 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP10medialBallSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  %188 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP10medialBallSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  br i1 %188, label %.lr.ph34, label %._crit_edge35, !llvm.loop !40

._crit_edge35:                                    ; preds = %186, %166
  %189 = 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.62)
          to label %190 unwind label %.loopexit.split-lp

190:                                              ; preds = %._crit_edge35
  %191 = call noundef i64 @_ZN9__gnu_cxxmiIP10medialBallSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS9_SC_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  %192 = trunc i64 %191 to i32
  %193 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %189, i32 noundef %192)
          to label %194 unwind label %.loopexit.split-lp

194:                                              ; preds = %190
  %195 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %193, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %196 unwind label %.loopexit.split-lp

196:                                              ; preds = %194
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  call void @_ZNSt6vectorIP5voxelSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  ret void

197:                                              ; preds = %185, %183, %160, %150, %140
  %.pn = phi { ptr, i32 } [ %141, %140 ], [ %151, %150 ], [ %161, %160 ], [ %lpad.phi, %185 ], [ %184, %183 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  br label %198

198:                                              ; preds = %197, %130, %129, %91
  %.pn14.pn = phi { ptr, i32 } [ %.pn14, %129 ], [ %131, %130 ], [ %.pn, %197 ], [ %92, %91 ]
  call void @_ZNSt6vectorIP5voxelSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn14.pn
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI10medialBallSaIS0_EE6rbeginEv(ptr dead_on_unwind noalias writable sret(%"class.std::reverse_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIP10medialBallSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 = { 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress 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, !10, i64 232}
!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, !11, i64 32}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!29, !22, i64 16}
!29 = !{!"_ZTS5voxel", !7, i64 0, !23, i64 8, !23, i64 10, !23, i64 12, !22, i64 16}
!30 = !{!6, !22, i64 176}
!31 = !{!29, !7, i64 0}
!32 = distinct !{!32, !27}
!33 = !{!7, !7, i64 0}
!34 = distinct !{!34, !27}
!35 = !{!10, !10, i64 0}
!36 = distinct !{!36, !27}
!37 = distinct !{!37, !27}
!38 = distinct !{!38, !27}
!39 = distinct !{!39, !27}
!40 = distinct !{!40, !27}


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