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

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

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.48 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [14 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

declare i32 @__gxx_personality_v0(...)

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)) #5 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)) #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) #5 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)) #5 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 nounwind uwtable
declare dso_local noundef ptr @_ZN13medialSurface3vxlEiii(ptr noundef nonnull align 8 dereferenceable(252), i32 noundef, i32 noundef, i32 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13medialSurface26paradoxremoveincludedballIEv(ptr noundef nonnull align 8 dereferenceable(252) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.std::vector.54", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %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.metaballcomparer, align 1
  %13 = alloca i32, align 4
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.59", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator.59", align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca float, align 4
  %22 = alloca float, align 4
  %23 = alloca float, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca ptr, align 8
  %31 = alloca float, align 4
  %32 = alloca float, align 4
  %33 = alloca %"class.__gnu_cxx::__normal_iterator.59", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %34 = load ptr, ptr %2, align 8
  %35 = getelementptr inbounds %class.medialSurface, ptr %34, i32 0, i32 5
  %36 = load i64, ptr %35, align 8, !tbaa !9
  %37 = icmp ne i64 %36, 0
  br i1 %37, label %39, label %38

38:                                               ; preds = %1
  br label %331

39:                                               ; preds = %1
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.49)
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #8
  call void @_ZNSt6vectorIP5voxelSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %41 = getelementptr inbounds %class.medialSurface, ptr %34, i32 0, i32 6
  %42 = load i64, ptr %41, align 8, !tbaa !26
  invoke void @_ZNSt6vectorIP5voxelSaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %42)
          to label %43 unwind label %63

43:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %44 = getelementptr inbounds %class.medialSurface, ptr %34, i32 0, i32 9
  %45 = call ptr @_ZNSt6vectorI5voxelSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %44) #8
  %46 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %45, ptr %46, align 8
  %47 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEmiEl(ptr noundef nonnull align 8 dereferenceable(8) %7, i64 noundef 1) #8
  %48 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %47, ptr %48, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %49 = getelementptr inbounds %class.medialSurface, ptr %34, i32 0, i32 9
  %50 = call ptr @_ZNSt6vectorI5voxelSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %49) #8
  %51 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %50, ptr %51, align 8
  br label %52

52:                                               ; preds = %71, %43
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %54 = call noundef zeroext i1 @_ZN9__gnu_cxxltIP5voxelSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  br i1 %54, label %55, label %72

55:                                               ; preds = %52
  %56 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %57 = getelementptr inbounds %class.voxel, ptr %56, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8, !tbaa !27
  %59 = icmp ne ptr %58, null
  br i1 %59, label %60, label %71

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %61 = call noundef nonnull align 8 dereferenceable(20) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  store ptr %61, ptr %9, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIP5voxelSaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %62 unwind label %67

62:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %71

63:                                               ; preds = %90, %88, %79, %77, %75, %72, %39
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %4, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %5, align 4
  br label %330

67:                                               ; preds = %60
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %4, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %330

71:                                               ; preds = %62, %55
  br label %52, !llvm.loop !29

72:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  %73 = call noundef i64 @_ZNKSt6vectorIP5voxelSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %73)
          to label %75 unwind label %63

75:                                               ; preds = %72
  %76 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef @.str.50)
          to label %77 unwind label %63

77:                                               ; preds = %75
  %78 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %79 unwind label %63

79:                                               ; preds = %77
  %80 = call ptr @_ZNSt6vectorIP5voxelSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %81 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.59", ptr %10, i32 0, i32 0
  store ptr %80, ptr %81, align 8
  %82 = call ptr @_ZNSt6vectorIP5voxelSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %83 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.59", ptr %11, i32 0, i32 0
  store ptr %82, ptr %83, align 8
  %84 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.59", ptr %10, i32 0, i32 0
  %85 = load ptr, ptr %84, align 8
  %86 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.59", ptr %11, i32 0, i32 0
  %87 = load ptr, ptr %86, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPP5voxelSt6vectorIS3_SaIS3_EEEE16metaballcomparerEvT_SA_T0_(ptr %85, ptr %87)
          to label %88 unwind label %63

88:                                               ; preds = %79
  %89 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.51)
          to label %90 unwind label %63

90:                                               ; preds = %88
  %91 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout)
          to label %92 unwind label %63

92:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %93 = call ptr @_ZNSt6vectorIP5voxelSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %94 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.59", ptr %14, i32 0, i32 0
  store ptr %93, ptr %94, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %95 = call ptr @_ZNSt6vectorIP5voxelSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %96 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.59", ptr %15, i32 0, i32 0
  store ptr %95, ptr %96, align 8
  br label %97

97:                                               ; preds = %300, %298, %92
  %98 = call noundef zeroext i1 @_ZN9__gnu_cxxltIPP5voxelSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  br i1 %98, label %99, label %302

99:                                               ; preds = %97
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP5voxelSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  %101 = load ptr, ptr %100, align 8, !tbaa !5
  store ptr %101, ptr %16, align 8, !tbaa !5
  %102 = load ptr, ptr %16, align 8, !tbaa !5
  %103 = getelementptr inbounds %class.voxel, ptr %102, i32 0, i32 0
  %104 = load ptr, ptr %103, align 8, !tbaa !27
  %105 = icmp ne ptr %104, null
  br i1 %105, label %108, label %106

106:                                              ; preds = %99
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPP5voxelSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  store i32 4, ptr %17, align 4
  br label %298, !llvm.loop !32

108:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %109 = load ptr, ptr %16, align 8, !tbaa !5
  %110 = getelementptr inbounds %class.voxel, ptr %109, i32 0, i32 1
  %111 = load i16, ptr %110, align 8, !tbaa !33
  %112 = sext i16 %111 to i32
  store i32 %112, ptr %18, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  %113 = load ptr, ptr %16, align 8, !tbaa !5
  %114 = getelementptr inbounds %class.voxel, ptr %113, i32 0, i32 2
  %115 = load i16, ptr %114, align 2, !tbaa !34
  %116 = sext i16 %115 to i32
  store i32 %116, ptr %19, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %117 = load ptr, ptr %16, align 8, !tbaa !5
  %118 = getelementptr inbounds %class.voxel, ptr %117, i32 0, i32 3
  %119 = load i16, ptr %118, align 4, !tbaa !35
  %120 = sext i16 %119 to i32
  store i32 %120, ptr %20, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  %121 = load ptr, ptr %16, align 8, !tbaa !5
  %122 = getelementptr inbounds %class.voxel, ptr %121, i32 0, i32 5
  %123 = load float, ptr %122, align 8, !tbaa !36
  store float %123, ptr %21, align 4, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %124 = load float, ptr %21, align 4, !tbaa !37
  %125 = fpext float %124 to double
  %126 = fadd double %125, 5.500000e-01
  %127 = fptrunc double %126 to float
  store float %127, ptr %22, align 4, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %128 = getelementptr inbounds %class.medialSurface, ptr %34, i32 0, i32 22
  %129 = load double, ptr %128, align 8, !tbaa !38
  %130 = load float, ptr %21, align 4, !tbaa !37
  %131 = fpext float %130 to double
  %132 = getelementptr inbounds %class.medialSurface, ptr %34, i32 0, i32 23
  %133 = load float, ptr %132, align 8, !tbaa !39
  %134 = fpext float %133 to double
  %135 = call double @llvm.fmuladd.f64(double %129, double %131, double %134)
  %136 = fptrunc double %135 to float
  store float %136, ptr %23, align 4, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  %137 = load float, ptr %22, align 4, !tbaa !37
  %138 = fptosi float %137 to i32
  store i32 %138, ptr %24, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  %139 = load i32, ptr %24, align 4, !tbaa !31
  %140 = sub nsw i32 0, %139
  store i32 %140, ptr %27, align 4, !tbaa !31
  br label %141

141:                                              ; preds = %276, %108
  %142 = load i32, ptr %27, align 4, !tbaa !31
  %143 = load i32, ptr %24, align 4, !tbaa !31
  %144 = icmp sle i32 %142, %143
  br i1 %144, label %146, label %145

145:                                              ; preds = %141
  store i32 6, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  br label %280

146:                                              ; preds = %141
  %147 = load float, ptr %22, align 4, !tbaa !37
  %148 = load float, ptr %22, align 4, !tbaa !37
  %149 = load i32, ptr %27, align 4, !tbaa !31
  %150 = load i32, ptr %27, align 4, !tbaa !31
  %151 = mul nsw i32 %149, %150
  %152 = sitofp i32 %151 to float
  %153 = fneg float %152
  %154 = call float @llvm.fmuladd.f32(float %147, float %148, float %153)
  %155 = invoke noundef float @_ZSt4sqrtf(float noundef %154)
          to label %156 unwind label %165

156:                                              ; preds = %146
  %157 = fptosi float %155 to i32
  store i32 %157, ptr %25, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  %158 = load i32, ptr %25, align 4, !tbaa !31
  %159 = sub nsw i32 0, %158
  store i32 %159, ptr %28, align 4, !tbaa !31
  br label %160

160:                                              ; preds = %271, %156
  %161 = load i32, ptr %28, align 4, !tbaa !31
  %162 = load i32, ptr %25, align 4, !tbaa !31
  %163 = icmp sle i32 %161, %162
  br i1 %163, label %169, label %164

164:                                              ; preds = %160
  store i32 9, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %275

165:                                              ; preds = %146
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %4, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %5, align 4
  br label %279

169:                                              ; preds = %160
  %170 = load float, ptr %22, align 4, !tbaa !37
  %171 = load float, ptr %22, align 4, !tbaa !37
  %172 = load i32, ptr %27, align 4, !tbaa !31
  %173 = load i32, ptr %27, align 4, !tbaa !31
  %174 = mul nsw i32 %172, %173
  %175 = sitofp i32 %174 to float
  %176 = fneg float %175
  %177 = call float @llvm.fmuladd.f32(float %170, float %171, float %176)
  %178 = load i32, ptr %28, align 4, !tbaa !31
  %179 = load i32, ptr %28, align 4, !tbaa !31
  %180 = mul nsw i32 %178, %179
  %181 = sitofp i32 %180 to float
  %182 = fsub float %177, %181
  %183 = invoke noundef float @_ZSt4sqrtf(float noundef %182)
          to label %184 unwind label %193

184:                                              ; preds = %169
  %185 = fptosi float %183 to i32
  store i32 %185, ptr %26, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  %186 = load i32, ptr %26, align 4, !tbaa !31
  %187 = sub nsw i32 0, %186
  store i32 %187, ptr %29, align 4, !tbaa !31
  br label %188

188:                                              ; preds = %267, %184
  %189 = load i32, ptr %29, align 4, !tbaa !31
  %190 = load i32, ptr %26, align 4, !tbaa !31
  %191 = icmp sle i32 %189, %190
  br i1 %191, label %197, label %192

192:                                              ; preds = %188
  store i32 12, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %270

193:                                              ; preds = %169
  %194 = landingpad { ptr, i32 }
          cleanup
  %195 = extractvalue { ptr, i32 } %194, 0
  store ptr %195, ptr %4, align 8
  %196 = extractvalue { ptr, i32 } %194, 1
  store i32 %196, ptr %5, align 4
  br label %274

197:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %198 = load i32, ptr %18, align 4, !tbaa !31
  %199 = load i32, ptr %27, align 4, !tbaa !31
  %200 = add nsw i32 %198, %199
  %201 = load i32, ptr %19, align 4, !tbaa !31
  %202 = load i32, ptr %28, align 4, !tbaa !31
  %203 = add nsw i32 %201, %202
  %204 = load i32, ptr %20, align 4, !tbaa !31
  %205 = load i32, ptr %29, align 4, !tbaa !31
  %206 = add nsw i32 %204, %205
  %207 = invoke noundef ptr @_ZN13medialSurface3vxlEiii(ptr noundef nonnull align 8 dereferenceable(252) %34, i32 noundef %200, i32 noundef %203, i32 noundef %206)
          to label %208 unwind label %260

208:                                              ; preds = %197
  store ptr %207, ptr %30, align 8, !tbaa !5
  %209 = load ptr, ptr %30, align 8, !tbaa !5
  %210 = icmp ne ptr %209, null
  br i1 %210, label %211, label %266

211:                                              ; preds = %208
  %212 = load ptr, ptr %30, align 8, !tbaa !5
  %213 = getelementptr inbounds %class.voxel, ptr %212, i32 0, i32 0
  %214 = load ptr, ptr %213, align 8, !tbaa !27
  %215 = icmp ne ptr %214, null
  br i1 %215, label %216, label %266

216:                                              ; preds = %211
  %217 = load ptr, ptr %30, align 8, !tbaa !5
  %218 = load ptr, ptr %16, align 8, !tbaa !5
  %219 = icmp ne ptr %217, %218
  br i1 %219, label %220, label %266

220:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  %221 = load ptr, ptr %30, align 8, !tbaa !5
  %222 = getelementptr inbounds %class.voxel, ptr %221, i32 0, i32 5
  %223 = load float, ptr %222, align 8, !tbaa !36
  store float %223, ptr %31, align 4, !tbaa !37
  %224 = load float, ptr %31, align 4, !tbaa !37
  %225 = load float, ptr %21, align 4, !tbaa !37
  %226 = fcmp ole float %224, %225
  br i1 %226, label %227, label %265

227:                                              ; preds = %220
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  %228 = load i32, ptr %27, align 4, !tbaa !31
  %229 = load i32, ptr %27, align 4, !tbaa !31
  %230 = mul nsw i32 %228, %229
  %231 = load i32, ptr %28, align 4, !tbaa !31
  %232 = load i32, ptr %28, align 4, !tbaa !31
  %233 = mul nsw i32 %231, %232
  %234 = add nsw i32 %230, %233
  %235 = load i32, ptr %29, align 4, !tbaa !31
  %236 = load i32, ptr %29, align 4, !tbaa !31
  %237 = mul nsw i32 %235, %236
  %238 = add nsw i32 %234, %237
  %239 = sitofp i32 %238 to float
  %240 = call float @sqrtf(float noundef %239) #8
  store float %240, ptr %32, align 4, !tbaa !37
  %241 = load float, ptr %32, align 4, !tbaa !37
  %242 = load float, ptr %23, align 4, !tbaa !37
  %243 = fcmp olt float %241, %242
  br i1 %243, label %255, label %244

244:                                              ; preds = %227
  %245 = load float, ptr %32, align 4, !tbaa !37
  %246 = load float, ptr %31, align 4, !tbaa !37
  %247 = fadd float %245, %246
  %248 = fpext float %247 to double
  %249 = load float, ptr %22, align 4, !tbaa !37
  %250 = fpext float %249 to double
  %251 = getelementptr inbounds %class.medialSurface, ptr %34, i32 0, i32 17
  %252 = load double, ptr %251, align 8, !tbaa !40
  %253 = fadd double %250, %252
  %254 = fcmp olt double %248, %253
  br i1 %254, label %255, label %264

255:                                              ; preds = %244, %227
  %256 = load ptr, ptr %30, align 8, !tbaa !5
  %257 = getelementptr inbounds %class.voxel, ptr %256, i32 0, i32 0
  store ptr null, ptr %257, align 8, !tbaa !27
  %258 = load i32, ptr %13, align 4, !tbaa !31
  %259 = add nsw i32 %258, 1
  store i32 %259, ptr %13, align 4, !tbaa !31
  br label %264

260:                                              ; preds = %197
  %261 = landingpad { ptr, i32 }
          cleanup
  %262 = extractvalue { ptr, i32 } %261, 0
  store ptr %262, ptr %4, align 8
  %263 = extractvalue { ptr, i32 } %261, 1
  store i32 %263, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %274

264:                                              ; preds = %255, %244
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  br label %265

265:                                              ; preds = %264, %220
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %266

266:                                              ; preds = %265, %216, %211, %208
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  br label %267

267:                                              ; preds = %266
  %268 = load i32, ptr %29, align 4, !tbaa !31
  %269 = add nsw i32 %268, 1
  store i32 %269, ptr %29, align 4, !tbaa !31
  br label %188, !llvm.loop !41

270:                                              ; preds = %192
  br label %271

271:                                              ; preds = %270
  %272 = load i32, ptr %28, align 4, !tbaa !31
  %273 = add nsw i32 %272, 1
  store i32 %273, ptr %28, align 4, !tbaa !31
  br label %160, !llvm.loop !42

274:                                              ; preds = %260, %193
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %279

275:                                              ; preds = %164
  br label %276

276:                                              ; preds = %275
  %277 = load i32, ptr %27, align 4, !tbaa !31
  %278 = add nsw i32 %277, 1
  store i32 %278, ptr %27, align 4, !tbaa !31
  br label %141, !llvm.loop !43

279:                                              ; preds = %274, %165
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  br label %301

280:                                              ; preds = %145
  %281 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPP5voxelSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #8
  %282 = call ptr @_ZNSt6vectorIP5voxelSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %283 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.59", ptr %33, i32 0, i32 0
  store ptr %282, ptr %283, align 8
  %284 = call noundef i64 @_ZN9__gnu_cxxmiIPP5voxelSt6vectorIS2_SaIS2_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKSA_SD_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %33) #8
  %285 = srem i64 %284, 10000
  %286 = icmp eq i64 %285, 0
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  br i1 %286, label %287, label %297

287:                                              ; preds = %280
  %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.52)
          to label %289 unwind label %293

289:                                              ; preds = %287
  %290 = load i32, ptr %13, align 4, !tbaa !31
  %291 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %288, i32 noundef %290)
          to label %292 unwind label %293

292:                                              ; preds = %289
  br label %297

293:                                              ; preds = %289, %287
  %294 = landingpad { ptr, i32 }
          cleanup
  %295 = extractvalue { ptr, i32 } %294, 0
  store ptr %295, ptr %4, align 8
  %296 = extractvalue { ptr, i32 } %294, 1
  store i32 %296, ptr %5, align 4
  br label %301

297:                                              ; preds = %292, %280
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  store i32 0, ptr %17, align 4
  br label %298

298:                                              ; preds = %297, %106
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  %299 = load i32, ptr %17, align 4
  switch i32 %299, label %337 [
    i32 0, label %300
    i32 4, label %97
  ]

300:                                              ; preds = %298
  br label %97, !llvm.loop !32

301:                                              ; preds = %293, %279
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %329

302:                                              ; preds = %97
  %303 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.53)
          to label %304 unwind label %325

304:                                              ; preds = %302
  %305 = load i32, ptr %13, align 4, !tbaa !31
  %306 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %303, i32 noundef %305)
          to label %307 unwind label %325

307:                                              ; preds = %304
  %308 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %306, ptr noundef @.str.48)
          to label %309 unwind label %325

309:                                              ; preds = %307
  %310 = call noundef i64 @_ZNKSt6vectorIP5voxelSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %311 = load i32, ptr %13, align 4, !tbaa !31
  %312 = sext i32 %311 to i64
  %313 = sub i64 %310, %312
  %314 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %308, i64 noundef %313)
          to label %315 unwind label %325

315:                                              ; preds = %309
  %316 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %314, ptr noundef @.str.50)
          to label %317 unwind label %325

317:                                              ; preds = %315
  %318 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %316, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %319 unwind label %325

319:                                              ; preds = %317
  %320 = load i32, ptr %13, align 4, !tbaa !31
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds %class.medialSurface, ptr %34, i32 0, i32 6
  %323 = load i64, ptr %322, align 8, !tbaa !26
  %324 = sub i64 %323, %321
  store i64 %324, ptr %322, align 8, !tbaa !26
  store i32 1, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @_ZNSt6vectorIP5voxelSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #8
  br label %331

325:                                              ; preds = %317, %315, %309, %307, %304, %302
  %326 = landingpad { ptr, i32 }
          cleanup
  %327 = extractvalue { ptr, i32 } %326, 0
  store ptr %327, ptr %4, align 8
  %328 = extractvalue { ptr, i32 } %326, 1
  store i32 %328, ptr %5, align 4
  br label %329

329:                                              ; preds = %325, %301
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %330

330:                                              ; preds = %329, %67, %63
  call void @_ZNSt6vectorIP5voxelSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #8
  br label %332

331:                                              ; preds = %319, %38
  ret void

332:                                              ; preds = %330
  %333 = load ptr, ptr %4, align 8
  %334 = load i32, ptr %5, align 4
  %335 = insertvalue { ptr, i32 } poison, ptr %333, 0
  %336 = insertvalue { ptr, i32 } %335, i32 %334, 1
  resume { ptr, i32 } %336

337:                                              ; preds = %298
  unreachable
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4sqrtf(float noundef) #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

; Function Attrs: nounwind
declare float @sqrtf(float noundef) #7

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

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

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = { 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 #7 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }

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

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


; 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.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" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.59" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.48 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [14 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 nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

declare i32 @__gxx_personality_v0(...)

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 #5 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 #5 align 2

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

; 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 #5 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 #5 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 nounwind uwtable
declare dso_local noundef ptr @_ZN13medialSurface3vxlEiii(ptr noundef nonnull align 8 dereferenceable(252), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13medialSurface26paradoxremoveincludedballIEv(ptr noundef nonnull align 8 dereferenceable(252) %0) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector.54", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.59", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.59", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.59", align 8
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  %11 = load i64, ptr %10, align 8, !tbaa !5
  %.not = icmp eq i64 %11, 0
  br i1 %.not, label %162, label %12

12:                                               ; preds = %1
  %13 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.49)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #8
  call void @_ZNSt6vectorIP5voxelSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  %14 = getelementptr inbounds i8, ptr %0, i64 32
  %15 = load i64, ptr %14, align 8, !tbaa !25
  invoke void @_ZNSt6vectorIP5voxelSaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %15)
          to label %16 unwind label %28

16:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %17 = getelementptr inbounds i8, ptr %0, i64 64
  %18 = call ptr @_ZNSt6vectorI5voxelSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  store ptr %18, ptr %4, align 8
  %19 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEmiEl(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef 1) #8
  store ptr %19, ptr %3, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %20 = call ptr @_ZNSt6vectorI5voxelSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  store ptr %20, ptr %5, align 8
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  %22 = call noundef zeroext i1 @_ZN9__gnu_cxxltIP5voxelSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  br i1 %22, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %16, %32
  %23 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  %24 = load ptr, ptr %23, align 8, !tbaa !26
  %.not81 = icmp eq ptr %24, null
  br i1 %.not81, label %32, label %25

25:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %26 = call noundef nonnull align 8 dereferenceable(20) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  store ptr %26, ptr %6, align 8, !tbaa !28
  invoke void @_ZNSt6vectorIP5voxelSaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %27 unwind label %30

27:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %32

28:                                               ; preds = %46, %44, %41, %39, %37, %._crit_edge, %12
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %161

30:                                               ; preds = %25
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  br label %161

32:                                               ; preds = %27, %.lr.ph
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP5voxelSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  %34 = call noundef zeroext i1 @_ZN9__gnu_cxxltIP5voxelSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  br i1 %34, label %.lr.ph, label %._crit_edge, !llvm.loop !29

._crit_edge:                                      ; preds = %32, %16
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  %35 = call noundef i64 @_ZNKSt6vectorIP5voxelSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  %36 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %35)
          to label %37 unwind label %28

37:                                               ; preds = %._crit_edge
  %38 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull @.str.50)
          to label %39 unwind label %28

39:                                               ; preds = %37
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %41 unwind label %28

41:                                               ; preds = %39
  %42 = call ptr @_ZNSt6vectorIP5voxelSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  %43 = call ptr @_ZNSt6vectorIP5voxelSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPP5voxelSt6vectorIS3_SaIS3_EEEE16metaballcomparerEvT_SA_T0_(ptr %42, ptr %43)
          to label %44 unwind label %28

44:                                               ; preds = %41
  %45 = 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.51)
          to label %46 unwind label %28

46:                                               ; preds = %44
  %47 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout)
          to label %48 unwind label %28

48:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %49 = call ptr @_ZNSt6vectorIP5voxelSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  store ptr %49, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %50 = call ptr @_ZNSt6vectorIP5voxelSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  store ptr %50, ptr %8, align 8
  %51 = call noundef zeroext i1 @_ZN9__gnu_cxxltIPP5voxelSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  br i1 %51, label %.lr.ph107, label %._crit_edge108

.lr.ph107:                                        ; preds = %48
  %52 = getelementptr inbounds i8, ptr %0, i64 240
  %53 = getelementptr inbounds i8, ptr %0, i64 248
  %54 = getelementptr inbounds i8, ptr %0, i64 208
  br label %55

55:                                               ; preds = %.lr.ph107, %139
  %.065105 = phi i32 [ 0, %.lr.ph107 ], [ %.7, %139 ]
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP5voxelSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  %57 = load ptr, ptr %56, align 8, !tbaa !28
  %58 = load ptr, ptr %57, align 8, !tbaa !26
  %.not73 = icmp eq ptr %58, null
  br i1 %.not73, label %59, label %61

59:                                               ; preds = %55
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPP5voxelSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  br label %139, !llvm.loop !31

61:                                               ; preds = %55
  %62 = getelementptr inbounds i8, ptr %57, i64 8
  %63 = load i16, ptr %62, align 8, !tbaa !32
  %64 = sext i16 %63 to i32
  %65 = getelementptr inbounds i8, ptr %57, i64 10
  %66 = load i16, ptr %65, align 2, !tbaa !33
  %67 = sext i16 %66 to i32
  %68 = getelementptr inbounds i8, ptr %57, i64 12
  %69 = load i16, ptr %68, align 4, !tbaa !34
  %70 = sext i16 %69 to i32
  %71 = getelementptr inbounds i8, ptr %57, i64 16
  %72 = load float, ptr %71, align 8, !tbaa !35
  %73 = fpext float %72 to double
  %74 = fadd double %73, 5.500000e-01
  %75 = fptrunc double %74 to float
  %76 = load double, ptr %52, align 8, !tbaa !36
  %77 = load float, ptr %53, align 8, !tbaa !37
  %78 = fpext float %77 to double
  %79 = call double @llvm.fmuladd.f64(double %76, double %73, double %78)
  %80 = fptrunc double %79 to float
  %81 = fptosi float %75 to i32
  %.not7498 = icmp slt i32 %81, 0
  br i1 %.not7498, label %._crit_edge103, label %.lr.ph102

.lr.ph102:                                        ; preds = %61
  %82 = sub nsw i32 0, %81
  %83 = fpext float %75 to double
  br label %89

._crit_edge103:                                   ; preds = %._crit_edge96, %61
  %.166.lcssa = phi i32 [ %.065105, %61 ], [ %.2.lcssa, %._crit_edge96 ]
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPP5voxelSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %85 = call ptr @_ZNSt6vectorIP5voxelSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  store ptr %85, ptr %9, align 8
  %86 = call noundef i64 @_ZN9__gnu_cxxmiIPP5voxelSt6vectorIS2_SaIS2_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKSA_SD_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  %87 = srem i64 %86, 10000
  %88 = icmp eq i64 %87, 0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br i1 %88, label %133, label %139

89:                                               ; preds = %.lr.ph102, %._crit_edge96
  %.166100 = phi i32 [ %.065105, %.lr.ph102 ], [ %.2.lcssa, %._crit_edge96 ]
  %.06999 = phi i32 [ %82, %.lr.ph102 ], [ %98, %._crit_edge96 ]
  %90 = mul nsw i32 %.06999, %.06999
  %91 = uitofp nneg i32 %90 to float
  %92 = fneg float %91
  %93 = call float @llvm.fmuladd.f32(float %75, float %75, float %92)
  %94 = call noundef float @_ZSt4sqrtf(float noundef %93)
  %95 = fptosi float %94 to i32
  %.not7691 = icmp slt i32 %95, 0
  br i1 %.not7691, label %._crit_edge96, label %.lr.ph95

.lr.ph95:                                         ; preds = %89
  %96 = sub nsw i32 0, %95
  %97 = add nsw i32 %.06999, %64
  br label %99

._crit_edge96:                                    ; preds = %._crit_edge90, %89
  %.2.lcssa = phi i32 [ %.166100, %89 ], [ %.3.lcssa, %._crit_edge90 ]
  %98 = add i32 %.06999, 1
  %exitcond111.not = icmp eq i32 %.06999, %81
  br i1 %exitcond111.not, label %._crit_edge103, label %89, !llvm.loop !38

99:                                               ; preds = %.lr.ph95, %._crit_edge90
  %.293 = phi i32 [ %.166100, %.lr.ph95 ], [ %.3.lcssa, %._crit_edge90 ]
  %.06892 = phi i32 [ %96, %.lr.ph95 ], [ %108, %._crit_edge90 ]
  %100 = mul nsw i32 %.06892, %.06892
  %101 = uitofp nneg i32 %100 to float
  %102 = fsub float %93, %101
  %103 = call noundef float @_ZSt4sqrtf(float noundef %102)
  %104 = fptosi float %103 to i32
  %.not7785 = icmp slt i32 %104, 0
  br i1 %.not7785, label %._crit_edge90, label %.lr.ph89

.lr.ph89:                                         ; preds = %99
  %105 = sub nsw i32 0, %104
  %106 = add nsw i32 %.06892, %67
  %107 = add nuw nsw i32 %100, %90
  br label %109

._crit_edge90:                                    ; preds = %131, %99
  %.3.lcssa = phi i32 [ %.293, %99 ], [ %.6, %131 ]
  %108 = add i32 %.06892, 1
  %exitcond110.not = icmp eq i32 %.06892, %95
  br i1 %exitcond110.not, label %._crit_edge96, label %99, !llvm.loop !39

109:                                              ; preds = %.lr.ph89, %131
  %.387 = phi i32 [ %.293, %.lr.ph89 ], [ %.6, %131 ]
  %.06786 = phi i32 [ %105, %.lr.ph89 ], [ %132, %131 ]
  %110 = add nsw i32 %.06786, %70
  %111 = call noundef ptr @_ZN13medialSurface3vxlEiii(ptr noundef nonnull align 8 dereferenceable(252) %0, i32 noundef %97, i32 noundef %106, i32 noundef %110)
  %.not78 = icmp eq ptr %111, null
  br i1 %.not78, label %131, label %112

112:                                              ; preds = %109
  %113 = load ptr, ptr %111, align 8, !tbaa !26
  %.not79 = icmp eq ptr %113, null
  %.not80 = icmp eq ptr %111, %57
  %or.cond = or i1 %.not80, %.not79
  br i1 %or.cond, label %131, label %114

114:                                              ; preds = %112
  %115 = getelementptr inbounds i8, ptr %111, i64 16
  %116 = load float, ptr %115, align 8, !tbaa !35
  %117 = fcmp ugt float %116, %72
  br i1 %117, label %131, label %118

118:                                              ; preds = %114
  %119 = mul nsw i32 %.06786, %.06786
  %120 = add nuw nsw i32 %107, %119
  %121 = uitofp nneg i32 %120 to float
  %sqrt = call float @llvm.sqrt.f32(float %121)
  %122 = fcmp olt float %sqrt, %80
  br i1 %122, label %129, label %123

123:                                              ; preds = %118
  %124 = fadd float %sqrt, %116
  %125 = fpext float %124 to double
  %126 = load double, ptr %54, align 8, !tbaa !40
  %127 = fadd double %126, %83
  %128 = fcmp ogt double %127, %125
  br i1 %128, label %129, label %131

129:                                              ; preds = %123, %118
  store ptr null, ptr %111, align 8, !tbaa !26
  %130 = add nsw i32 %.387, 1
  br label %131

131:                                              ; preds = %114, %129, %123, %112, %109
  %.6 = phi i32 [ %.387, %112 ], [ %.387, %109 ], [ %.387, %114 ], [ %130, %129 ], [ %.387, %123 ]
  %132 = add i32 %.06786, 1
  %exitcond.not = icmp eq i32 %.06786, %104
  br i1 %exitcond.not, label %._crit_edge90, label %109, !llvm.loop !41

133:                                              ; preds = %._crit_edge103
  %134 = 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.52)
          to label %135 unwind label %137

135:                                              ; preds = %133
  %136 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %134, i32 noundef %.166.lcssa)
          to label %139 unwind label %137

137:                                              ; preds = %135, %133
  %138 = landingpad { ptr, i32 }
          cleanup
  br label %160

139:                                              ; preds = %._crit_edge103, %135, %59
  %.7 = phi i32 [ %.065105, %59 ], [ %.166.lcssa, %135 ], [ %.166.lcssa, %._crit_edge103 ]
  %140 = call noundef zeroext i1 @_ZN9__gnu_cxxltIPP5voxelSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  br i1 %140, label %55, label %._crit_edge108

._crit_edge108:                                   ; preds = %139, %48
  %.065.lcssa = phi i32 [ 0, %48 ], [ %.7, %139 ]
  %141 = 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.53)
          to label %142 unwind label %158

142:                                              ; preds = %._crit_edge108
  %143 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %141, i32 noundef %.065.lcssa)
          to label %144 unwind label %158

144:                                              ; preds = %142
  %145 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %143, ptr noundef nonnull @.str.48)
          to label %146 unwind label %158

146:                                              ; preds = %144
  %147 = call noundef i64 @_ZNKSt6vectorIP5voxelSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  %148 = sext i32 %.065.lcssa to i64
  %149 = sub i64 %147, %148
  %150 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %145, i64 noundef %149)
          to label %151 unwind label %158

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

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

155:                                              ; preds = %153
  %156 = load i64, ptr %14, align 8, !tbaa !25
  %157 = sub i64 %156, %148
  store i64 %157, ptr %14, align 8, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @_ZNSt6vectorIP5voxelSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #8
  br label %162

158:                                              ; preds = %153, %151, %146, %144, %142, %._crit_edge108
  %159 = landingpad { ptr, i32 }
          cleanup
  br label %160

160:                                              ; preds = %158, %137
  %.pn = phi { ptr, i32 } [ %138, %137 ], [ %159, %158 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  br label %161

161:                                              ; preds = %160, %30, %28
  %.pn82 = phi { ptr, i32 } [ %31, %30 ], [ %.pn, %160 ], [ %29, %28 ]
  call void @_ZNSt6vectorIP5voxelSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #8
  resume { ptr, i32 } %.pn82

162:                                              ; preds = %1, %155
  ret void
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4sqrtf(float noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.sqrt.f32(float) #7

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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = { 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 #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }

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

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


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