; LLVM IR from Lut1n/ImpGears :: src/ImpGears/Geometry/Geometry.ll (ZN3imp8Geometry15reduceTrianglesEf)

; 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.imp::Vec" = type <{ %"class.imp::Object", [3 x float], [4 x i8] }>
%"class.imp::Object" = type { ptr, %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.imp::Vec3" = type { %"class.imp::Vec.base", [4 x i8] }
%"class.imp::Vec.base" = type <{ %"class.imp::Object", [3 x float] }>
%"class.imp::Geometry" = type <{ %"class.imp::Object", i32, [4 x i8], %"class.std::vector", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.5", i8, i8, i8, i8, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_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<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl" }
%"struct.std::_Vector_base<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl" = type { %"struct.std::_Vector_base<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl_data" }
%"struct.std::_Vector_base<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<imp::Vec<2, float>, std::allocator<imp::Vec<2, float>>>::_Vector_impl" }
%"struct.std::_Vector_base<imp::Vec<2, float>, std::allocator<imp::Vec<2, float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<imp::Vec<2, float>, std::allocator<imp::Vec<2, float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<imp::Vec<2, float>, std::allocator<imp::Vec<2, float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3imp3VecILi3EfEmlEf(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec") align 8, ptr noundef nonnull align 8 dereferenceable(36), float noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec") align 8, ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36), float noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec") align 8, ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36)) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp3VecILi3EfEC2Ef(ptr noundef nonnull align 8 dereferenceable(36), float noundef) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp8Geometry15reduceTrianglesEf(ptr noundef nonnull align 8 dereferenceable(156) %0, float noundef %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca float, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.imp::Vec3", align 8
  %7 = alloca %"class.imp::Vec", align 8
  %8 = alloca %"class.imp::Vec", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.imp::Vec", align 8
  %12 = alloca %"class.imp::Vec", align 8
  %13 = alloca %"class.imp::Vec", align 8
  %14 = alloca %"class.imp::Vec", align 8
  %15 = alloca %"class.imp::Vec", align 8
  %16 = alloca %"class.imp::Vec", align 8
  %17 = alloca %"class.imp::Vec", align 8
  %18 = alloca %"class.imp::Vec", align 8
  %19 = alloca %"class.imp::Vec", align 8
  %20 = alloca %"class.imp::Vec", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store float %1, ptr %4, align 4, !tbaa !9
  %21 = load ptr, ptr %3, align 8
  %22 = getelementptr inbounds %"class.imp::Geometry", ptr %21, i32 0, i32 1
  %23 = load i32, ptr %22, align 8, !tbaa !11
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %25, label %160

25:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 0, ptr %5, align 4, !tbaa !31
  br label %26

26:                                               ; preds = %79, %25
  %27 = load i32, ptr %5, align 4, !tbaa !31
  %28 = call noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156) %21)
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  br label %159

31:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 40, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr %8) #3
  %32 = load i32, ptr %5, align 4, !tbaa !31
  %33 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %21, i32 noundef %32)
  %34 = load i32, ptr %5, align 4, !tbaa !31
  %35 = add nsw i32 %34, 1
  %36 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %21, i32 noundef %35)
  call void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %8, ptr noundef nonnull align 8 dereferenceable(36) %33, ptr noundef nonnull align 8 dereferenceable(36) %36)
  %37 = load i32, ptr %5, align 4, !tbaa !31
  %38 = add nsw i32 %37, 2
  %39 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %21, i32 noundef %38)
  invoke void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %7, ptr noundef nonnull align 8 dereferenceable(36) %8, ptr noundef nonnull align 8 dereferenceable(36) %39)
          to label %40 unwind label %82

40:                                               ; preds = %31
  invoke void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36) %6, ptr noundef nonnull align 8 dereferenceable(36) %7, float noundef 1.000000e+00)
          to label %41 unwind label %86

41:                                               ; preds = %40
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %7) #3
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %8) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr %11) #3
  invoke void @_ZN3imp3VecILi3EfEC2Ef(ptr noundef nonnull align 8 dereferenceable(36) %11, float noundef 0x3FD5555560000000)
          to label %42 unwind label %91

42:                                               ; preds = %41
  %43 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp3VecILi3EfEmLERKS1_(ptr noundef nonnull align 8 dereferenceable(36) %6, ptr noundef nonnull align 8 dereferenceable(36) %11)
          to label %44 unwind label %95

44:                                               ; preds = %42
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr %14) #3
  %45 = load i32, ptr %5, align 4, !tbaa !31
  %46 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %21, i32 noundef %45)
  invoke void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %14, ptr noundef nonnull align 8 dereferenceable(36) %46, ptr noundef nonnull align 8 dereferenceable(36) %6)
          to label %47 unwind label %100

47:                                               ; preds = %44
  %48 = load float, ptr %4, align 4, !tbaa !9
  invoke void @_ZNK3imp3VecILi3EfEmlEf(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %13, ptr noundef nonnull align 8 dereferenceable(36) %14, float noundef %48)
          to label %49 unwind label %104

49:                                               ; preds = %47
  invoke void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %12, ptr noundef nonnull align 8 dereferenceable(36) %13, ptr noundef nonnull align 8 dereferenceable(36) %6)
          to label %50 unwind label %108

50:                                               ; preds = %49
  %51 = load i32, ptr %5, align 4, !tbaa !31
  %52 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %21, i32 noundef %51)
  %53 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSILi3EEERKS0_RKNS_3VecIXT_EfEE(ptr noundef nonnull align 8 dereferenceable(36) %52, ptr noundef nonnull align 8 dereferenceable(36) %12)
          to label %54 unwind label %112

54:                                               ; preds = %50
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %12) #3
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %13) #3
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %14) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr %17) #3
  %55 = load i32, ptr %5, align 4, !tbaa !31
  %56 = add nsw i32 %55, 1
  %57 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %21, i32 noundef %56)
  invoke void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %17, ptr noundef nonnull align 8 dereferenceable(36) %57, ptr noundef nonnull align 8 dereferenceable(36) %6)
          to label %58 unwind label %119

58:                                               ; preds = %54
  %59 = load float, ptr %4, align 4, !tbaa !9
  invoke void @_ZNK3imp3VecILi3EfEmlEf(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %16, ptr noundef nonnull align 8 dereferenceable(36) %17, float noundef %59)
          to label %60 unwind label %123

60:                                               ; preds = %58
  invoke void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %15, ptr noundef nonnull align 8 dereferenceable(36) %16, ptr noundef nonnull align 8 dereferenceable(36) %6)
          to label %61 unwind label %127

61:                                               ; preds = %60
  %62 = load i32, ptr %5, align 4, !tbaa !31
  %63 = add nsw i32 %62, 1
  %64 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %21, i32 noundef %63)
  %65 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSILi3EEERKS0_RKNS_3VecIXT_EfEE(ptr noundef nonnull align 8 dereferenceable(36) %64, ptr noundef nonnull align 8 dereferenceable(36) %15)
          to label %66 unwind label %131

66:                                               ; preds = %61
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %15) #3
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %16) #3
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %17) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr %20) #3
  %67 = load i32, ptr %5, align 4, !tbaa !31
  %68 = add nsw i32 %67, 2
  %69 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %21, i32 noundef %68)
  invoke void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %20, ptr noundef nonnull align 8 dereferenceable(36) %69, ptr noundef nonnull align 8 dereferenceable(36) %6)
          to label %70 unwind label %138

70:                                               ; preds = %66
  %71 = load float, ptr %4, align 4, !tbaa !9
  invoke void @_ZNK3imp3VecILi3EfEmlEf(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %19, ptr noundef nonnull align 8 dereferenceable(36) %20, float noundef %71)
          to label %72 unwind label %142

72:                                               ; preds = %70
  invoke void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %18, ptr noundef nonnull align 8 dereferenceable(36) %19, ptr noundef nonnull align 8 dereferenceable(36) %6)
          to label %73 unwind label %146

73:                                               ; preds = %72
  %74 = load i32, ptr %5, align 4, !tbaa !31
  %75 = add nsw i32 %74, 2
  %76 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %21, i32 noundef %75)
  %77 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSILi3EEERKS0_RKNS_3VecIXT_EfEE(ptr noundef nonnull align 8 dereferenceable(36) %76, ptr noundef nonnull align 8 dereferenceable(36) %18)
          to label %78 unwind label %150

78:                                               ; preds = %73
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %18) #3
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %19) #3
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %20) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %18) #3
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %6) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %6) #3
  br label %79

79:                                               ; preds = %78
  %80 = load i32, ptr %5, align 4, !tbaa !31
  %81 = add nsw i32 %80, 3
  store i32 %81, ptr %5, align 4, !tbaa !31
  br label %26, !llvm.loop !33

82:                                               ; preds = %31
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %9, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %10, align 4
  br label %90

86:                                               ; preds = %40
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %9, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %10, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %7) #3
  br label %90

90:                                               ; preds = %86, %82
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %8) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #3
  br label %158

91:                                               ; preds = %41
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %9, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %10, align 4
  br label %99

95:                                               ; preds = %42
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %9, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %10, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11) #3
  br label %99

99:                                               ; preds = %95, %91
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #3
  br label %157

100:                                              ; preds = %44
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %9, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %10, align 4
  br label %118

104:                                              ; preds = %47
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %9, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %10, align 4
  br label %117

108:                                              ; preds = %49
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %9, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %10, align 4
  br label %116

112:                                              ; preds = %50
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %9, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %10, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %12) #3
  br label %116

116:                                              ; preds = %112, %108
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %13) #3
  br label %117

117:                                              ; preds = %116, %104
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %14) #3
  br label %118

118:                                              ; preds = %117, %100
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %12) #3
  br label %157

119:                                              ; preds = %54
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %9, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %10, align 4
  br label %137

123:                                              ; preds = %58
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %9, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %10, align 4
  br label %136

127:                                              ; preds = %60
  %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 %135

131:                                              ; preds = %61
  %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 @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %15) #3
  br label %135

135:                                              ; preds = %131, %127
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %16) #3
  br label %136

136:                                              ; preds = %135, %123
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %17) #3
  br label %137

137:                                              ; preds = %136, %119
  call void @llvm.lifetime.end.p0(i64 40, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #3
  br label %157

138:                                              ; preds = %66
  %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 %156

142:                                              ; preds = %70
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %9, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %10, align 4
  br label %155

146:                                              ; preds = %72
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %9, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %10, align 4
  br label %154

150:                                              ; preds = %73
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %9, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %10, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %18) #3
  br label %154

154:                                              ; preds = %150, %146
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %19) #3
  br label %155

155:                                              ; preds = %154, %142
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %20) #3
  br label %156

156:                                              ; preds = %155, %138
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %18) #3
  br label %157

157:                                              ; preds = %156, %137, %118, %99
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %6) #3
  br label %158

158:                                              ; preds = %157, %90
  call void @llvm.lifetime.end.p0(i64 40, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  br label %161

159:                                              ; preds = %30
  br label %160

160:                                              ; preds = %159, %2
  ret void

161:                                              ; preds = %158
  %162 = load ptr, ptr %9, align 8
  %163 = load i32, ptr %10, align 4
  %164 = insertvalue { ptr, i32 } poison, ptr %162, 0
  %165 = insertvalue { ptr, i32 } %164, i32 %163, 1
  resume { ptr, i32 } %165
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 = !{!"float", !7, i64 0}
!11 = !{!12, !17, i64 24}
!12 = !{!"_ZTSN3imp8GeometryE", !13, i64 0, !17, i64 24, !18, i64 32, !22, i64 56, !22, i64 80, !22, i64 104, !26, i64 128, !30, i64 152, !30, i64 153, !30, i64 154, !30, i64 155}
!13 = !{!"_ZTSN3imp6ObjectE", !14, i64 8}
!14 = !{!"_ZTSSt10shared_ptrIN3imp6ObjectEE", !15, i64 0}
!15 = !{!"_ZTSSt12__shared_ptrIN3imp6ObjectELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !16, i64 8}
!16 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!17 = !{!"_ZTSN3imp8Geometry9PrimitiveE", !7, i64 0}
!18 = !{!"_ZTSSt6vectorIjSaIjEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTSSt6vectorIN3imp4Vec3ESaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIN3imp4Vec3ESaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN3imp4Vec3ESaIS1_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIN3imp4Vec3ESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"_ZTSSt6vectorIN3imp3VecILi2EfEESaIS2_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIN3imp3VecILi2EfEESaIS2_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIN3imp3VecILi2EfEESaIS2_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIN3imp3VecILi2EfEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!30 = !{!"bool", !7, i64 0}
!31 = !{!32, !32, i64 0}
!32 = !{!"int", !7, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.imp::Vec" = type <{ %"class.imp::Object", [3 x float], [4 x i8] }>
%"class.imp::Object" = type { ptr, %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.imp::Vec3" = type { %"class.imp::Vec.base", [4 x i8] }
%"class.imp::Vec.base" = type <{ %"class.imp::Object", [3 x float] }>

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3imp3VecILi3EfEmlEf(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec") align 8, ptr noundef nonnull align 8 dereferenceable(36), float noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec") align 8, ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36), float noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec") align 8, ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp3VecILi3EfEC2Ef(ptr noundef nonnull align 8 dereferenceable(36), float noundef) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp8Geometry15reduceTrianglesEf(ptr noundef nonnull align 8 dereferenceable(156) %0, float noundef %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.imp::Vec3", align 8
  %4 = alloca %"class.imp::Vec", align 8
  %5 = alloca %"class.imp::Vec", align 8
  %6 = alloca %"class.imp::Vec", align 8
  %7 = alloca %"class.imp::Vec", align 8
  %8 = alloca %"class.imp::Vec", align 8
  %9 = alloca %"class.imp::Vec", align 8
  %10 = alloca %"class.imp::Vec", align 8
  %11 = alloca %"class.imp::Vec", align 8
  %12 = alloca %"class.imp::Vec", align 8
  %13 = alloca %"class.imp::Vec", align 8
  %14 = alloca %"class.imp::Vec", align 8
  %15 = alloca %"class.imp::Vec", align 8
  %16 = getelementptr inbounds i8, ptr %0, i64 24
  %17 = load i32, ptr %16, align 8, !tbaa !5
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %2
  %19 = tail call noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156) %0)
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader, %27
  %.01719 = phi i32 [ %38, %27 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #3
  %21 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %.01719)
  %22 = add nuw nsw i32 %.01719, 1
  %23 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %22)
  call void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %5, ptr noundef nonnull align 8 dereferenceable(36) %21, ptr noundef nonnull align 8 dereferenceable(36) %23)
  %24 = add nuw nsw i32 %.01719, 2
  %25 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %24)
  call void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %4, ptr noundef nonnull align 8 dereferenceable(36) %5, ptr noundef nonnull align 8 dereferenceable(36) %25)
  invoke void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36) %3, ptr noundef nonnull align 8 dereferenceable(36) %4, float noundef 1.000000e+00)
          to label %26 unwind label %41

26:                                               ; preds = %.lr.ph
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %4) #3
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %5) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #3
  invoke void @_ZN3imp3VecILi3EfEC2Ef(ptr noundef nonnull align 8 dereferenceable(36) %6, float noundef 0x3FD5555560000000)
          to label %27 unwind label %43

27:                                               ; preds = %26
  %28 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp3VecILi3EfEmLERKS1_(ptr noundef nonnull align 8 dereferenceable(36) %3, ptr noundef nonnull align 8 dereferenceable(36) %6)
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %6) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #3
  %29 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %.01719)
  call void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %9, ptr noundef nonnull align 8 dereferenceable(36) %29, ptr noundef nonnull align 8 dereferenceable(36) %3)
  call void @_ZNK3imp3VecILi3EfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %8, ptr noundef nonnull align 8 dereferenceable(36) %9, float noundef %1)
  call void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %7, ptr noundef nonnull align 8 dereferenceable(36) %8, ptr noundef nonnull align 8 dereferenceable(36) %3)
  %30 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %.01719)
  %31 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSILi3EEERKS0_RKNS_3VecIXT_EfEE(ptr noundef nonnull align 8 dereferenceable(36) %30, ptr noundef nonnull align 8 dereferenceable(36) %7)
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %7) #3
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %8) #3
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %9) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %10) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %11) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %12) #3
  %32 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %22)
  call void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %12, ptr noundef nonnull align 8 dereferenceable(36) %32, ptr noundef nonnull align 8 dereferenceable(36) %3)
  call void @_ZNK3imp3VecILi3EfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %11, ptr noundef nonnull align 8 dereferenceable(36) %12, float noundef %1)
  call void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %10, ptr noundef nonnull align 8 dereferenceable(36) %11, ptr noundef nonnull align 8 dereferenceable(36) %3)
  %33 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %22)
  %34 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSILi3EEERKS0_RKNS_3VecIXT_EfEE(ptr noundef nonnull align 8 dereferenceable(36) %33, ptr noundef nonnull align 8 dereferenceable(36) %10)
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %10) #3
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11) #3
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %12) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %12) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %13) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %14) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %15) #3
  %35 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %24)
  call void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %15, ptr noundef nonnull align 8 dereferenceable(36) %35, ptr noundef nonnull align 8 dereferenceable(36) %3)
  call void @_ZNK3imp3VecILi3EfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %14, ptr noundef nonnull align 8 dereferenceable(36) %15, float noundef %1)
  call void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %13, ptr noundef nonnull align 8 dereferenceable(36) %14, ptr noundef nonnull align 8 dereferenceable(36) %3)
  %36 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %24)
  %37 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSILi3EEERKS0_RKNS_3VecIXT_EfEE(ptr noundef nonnull align 8 dereferenceable(36) %36, ptr noundef nonnull align 8 dereferenceable(36) %13)
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %13) #3
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %14) #3
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %15) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %15) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #3
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %3) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #3
  %38 = add nuw nsw i32 %.01719, 3
  %39 = call noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156) %0)
  %40 = icmp slt i32 %38, %39
  br i1 %40, label %.lr.ph, label %.loopexit, !llvm.loop !28

41:                                               ; preds = %.lr.ph
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %4) #3
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %5) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #3
  br label %45

43:                                               ; preds = %26
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #3
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %3) #3
  br label %45

45:                                               ; preds = %43, %41
  %.pn = phi { ptr, i32 } [ %44, %43 ], [ %42, %41 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #3
  resume { ptr, i32 } %.pn

.loopexit:                                        ; preds = %27, %.preheader, %2
  ret void
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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, !14, i64 24}
!6 = !{!"_ZTSN3imp8GeometryE", !7, i64 0, !14, i64 24, !15, i64 32, !19, i64 56, !19, i64 80, !19, i64 104, !23, i64 128, !27, i64 152, !27, i64 153, !27, i64 154, !27, i64 155}
!7 = !{!"_ZTSN3imp6ObjectE", !8, i64 8}
!8 = !{!"_ZTSSt10shared_ptrIN3imp6ObjectEE", !9, i64 0}
!9 = !{!"_ZTSSt12__shared_ptrIN3imp6ObjectELN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0, !13, i64 8}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0}
!14 = !{!"_ZTSN3imp8Geometry9PrimitiveE", !11, i64 0}
!15 = !{!"_ZTSSt6vectorIjSaIjEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!19 = !{!"_ZTSSt6vectorIN3imp4Vec3ESaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIN3imp4Vec3ESaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN3imp4Vec3ESaIS1_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN3imp4Vec3ESaIS1_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!23 = !{!"_ZTSSt6vectorIN3imp3VecILi2EfEESaIS2_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIN3imp3VecILi2EfEESaIS2_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIN3imp3VecILi2EfEESaIS2_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIN3imp3VecILi2EfEESaIS2_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!27 = !{!"bool", !11, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}


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