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

; 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::Matrix3" = type { %"class.imp::Matrix.base", [4 x i8] }
%"class.imp::Matrix.base" = type <{ %"class.imp::Object", [9 x float] }>
%"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::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 }
%"class.imp::Vec3" = type { %"class.imp::Vec.base", [4 x i8] }
%"class.imp::Vec.base" = type <{ %"class.imp::Object", [3 x float] }>
%"class.imp::Vec" = type <{ %"class.imp::Object", [3 x float], [4 x i8] }>
%"class.std::initializer_list" = type { ptr, i64 }
%"class.std::allocator.2" = type { i8 }

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

; Function Attrs: nounwind
declare void @_ZN3imp7Matrix3D1Ev(ptr noundef nonnull align 8 dereferenceable(60)) unnamed_addr #4

declare void @_ZN3imp7Matrix39rotationYEf(ptr dead_on_unwind writable sret(%"class.imp::Matrix3") align 8, float noundef) #5

declare void @_ZN3imp7Matrix39rotationZEf(ptr dead_on_unwind writable sret(%"class.imp::Matrix3") align 8, float noundef) #5

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3imp8Geometry12setPrimitiveENS0_9PrimitiveE(ptr noundef nonnull align 8 dereferenceable(156), i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp4Vec3C2Efff(ptr noundef nonnull align 8 dereferenceable(36), float noundef, float noundef, float noundef) 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 #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp8Geometry11tetrahedronEv(ptr dead_on_unwind noalias writable sret(%"class.imp::Geometry") align 8 %0) #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca %"class.imp::Vec3", align 8
  %6 = alloca %"class.imp::Vec3", align 8
  %7 = alloca %"class.imp::Vec", align 8
  %8 = alloca %"class.imp::Matrix3", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.imp::Vec3", align 8
  %12 = alloca %"class.imp::Vec", align 8
  %13 = alloca %"class.imp::Matrix3", align 8
  %14 = alloca %"class.imp::Vec3", align 8
  %15 = alloca %"class.imp::Vec", align 8
  %16 = alloca %"class.imp::Matrix3", align 8
  %17 = alloca i1, align 1
  %18 = alloca %"class.std::vector.0", align 8
  %19 = alloca %"class.std::initializer_list", align 8
  %20 = alloca [12 x %"class.imp::Vec3"], align 8
  %21 = alloca %"class.std::allocator.2", align 1
  store ptr %0, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store double 0x400921FAFC8B007A, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store double 0x4000C151FDB20051, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %5) #6
  call void @_ZN3imp4Vec3C2Efff(ptr noundef nonnull align 8 dereferenceable(36) %5, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 40, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %8) #6
  invoke void @_ZN3imp7Matrix39rotationYEf(ptr dead_on_unwind writable sret(%"class.imp::Matrix3") align 8 %8, float noundef 0x4000C15200000000)
          to label %22 unwind label %60

22:                                               ; preds = %1
  invoke void @_ZN3impmlILi3ELi3EfEENS_3VecIXT0_ET1_EERKNS1_IXT_ES2_EERKNS_6MatrixIXT_EXT0_ES2_EE(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %7, ptr noundef nonnull align 8 dereferenceable(36) %5, ptr noundef nonnull align 8 dereferenceable(60) %8)
          to label %23 unwind label %64

23:                                               ; preds = %22
  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 %24 unwind label %68

24:                                               ; preds = %23
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %7) #6
  call void @_ZN3imp7Matrix3D1Ev(ptr noundef nonnull align 8 dereferenceable(60) %8) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %13) #6
  invoke void @_ZN3imp7Matrix39rotationZEf(ptr dead_on_unwind writable sret(%"class.imp::Matrix3") align 8 %13, float noundef 0x4000C15200000000)
          to label %25 unwind label %74

25:                                               ; preds = %24
  invoke void @_ZN3impmlILi3ELi3EfEENS_3VecIXT0_ET1_EERKNS1_IXT_ES2_EERKNS_6MatrixIXT_EXT0_ES2_EE(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %12, ptr noundef nonnull align 8 dereferenceable(36) %6, ptr noundef nonnull align 8 dereferenceable(60) %13)
          to label %26 unwind label %78

26:                                               ; preds = %25
  invoke void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36) %11, ptr noundef nonnull align 8 dereferenceable(36) %12, float noundef 1.000000e+00)
          to label %27 unwind label %82

27:                                               ; preds = %26
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %12) #6
  call void @_ZN3imp7Matrix3D1Ev(ptr noundef nonnull align 8 dereferenceable(60) %13) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %16) #6
  invoke void @_ZN3imp7Matrix39rotationZEf(ptr dead_on_unwind writable sret(%"class.imp::Matrix3") align 8 %16, float noundef 0xC000C15200000000)
          to label %28 unwind label %88

28:                                               ; preds = %27
  invoke void @_ZN3impmlILi3ELi3EfEENS_3VecIXT0_ET1_EERKNS1_IXT_ES2_EERKNS_6MatrixIXT_EXT0_ES2_EE(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %15, ptr noundef nonnull align 8 dereferenceable(36) %6, ptr noundef nonnull align 8 dereferenceable(60) %16)
          to label %29 unwind label %92

29:                                               ; preds = %28
  invoke void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36) %14, ptr noundef nonnull align 8 dereferenceable(36) %15, float noundef 1.000000e+00)
          to label %30 unwind label %96

30:                                               ; preds = %29
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %15) #6
  call void @_ZN3imp7Matrix3D1Ev(ptr noundef nonnull align 8 dereferenceable(60) %16) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #6
  store i1 false, ptr %17, align 1
  invoke void @_ZN3imp8GeometryC1Ev(ptr noundef nonnull align 8 dereferenceable(156) %0)
          to label %31 unwind label %102

31:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 480, ptr %20) #6
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %20, ptr noundef nonnull align 8 dereferenceable(36) %5) #6
  %32 = getelementptr inbounds %"class.imp::Vec3", ptr %20, i64 1
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %32, ptr noundef nonnull align 8 dereferenceable(36) %6) #6
  %33 = getelementptr inbounds %"class.imp::Vec3", ptr %20, i64 2
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %33, ptr noundef nonnull align 8 dereferenceable(36) %11) #6
  %34 = getelementptr inbounds %"class.imp::Vec3", ptr %20, i64 3
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %34, ptr noundef nonnull align 8 dereferenceable(36) %5) #6
  %35 = getelementptr inbounds %"class.imp::Vec3", ptr %20, i64 4
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %35, ptr noundef nonnull align 8 dereferenceable(36) %11) #6
  %36 = getelementptr inbounds %"class.imp::Vec3", ptr %20, i64 5
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %36, ptr noundef nonnull align 8 dereferenceable(36) %14) #6
  %37 = getelementptr inbounds %"class.imp::Vec3", ptr %20, i64 6
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %37, ptr noundef nonnull align 8 dereferenceable(36) %5) #6
  %38 = getelementptr inbounds %"class.imp::Vec3", ptr %20, i64 7
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %38, ptr noundef nonnull align 8 dereferenceable(36) %14) #6
  %39 = getelementptr inbounds %"class.imp::Vec3", ptr %20, i64 8
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %39, ptr noundef nonnull align 8 dereferenceable(36) %6) #6
  %40 = getelementptr inbounds %"class.imp::Vec3", ptr %20, i64 9
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %40, ptr noundef nonnull align 8 dereferenceable(36) %6) #6
  %41 = getelementptr inbounds %"class.imp::Vec3", ptr %20, i64 10
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %41, ptr noundef nonnull align 8 dereferenceable(36) %14) #6
  %42 = getelementptr inbounds %"class.imp::Vec3", ptr %20, i64 11
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %42, ptr noundef nonnull align 8 dereferenceable(36) %11) #6
  %43 = getelementptr inbounds %"class.std::initializer_list", ptr %19, i32 0, i32 0
  store ptr %20, ptr %43, align 8, !tbaa !9
  %44 = getelementptr inbounds %"class.std::initializer_list", ptr %19, i32 0, i32 1
  store i64 12, ptr %44, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #6
  call void @_ZNSaIN3imp4Vec3EEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  %45 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 0
  %46 = load ptr, ptr %45, align 8
  %47 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 1
  %48 = load i64, ptr %47, align 8
  invoke void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr %46, i64 %48, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %49 unwind label %106

49:                                               ; preds = %31
  invoke void @_ZN3imp8Geometry3addERKSt6vectorINS_4Vec3ESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(156) %0, ptr noundef nonnull align 8 dereferenceable(24) %18)
          to label %50 unwind label %110

50:                                               ; preds = %49
  call void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  call void @_ZNSt15__new_allocatorIN3imp4Vec3EED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  %51 = getelementptr inbounds [12 x %"class.imp::Vec3"], ptr %20, i32 0, i32 0
  %52 = getelementptr inbounds %"class.imp::Vec3", ptr %51, i64 12
  br label %53

53:                                               ; preds = %53, %50
  %54 = phi ptr [ %52, %50 ], [ %55, %53 ]
  %55 = getelementptr inbounds %"class.imp::Vec3", ptr %54, i64 -1
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %55) #6
  %56 = icmp eq ptr %55, %51
  br i1 %56, label %57, label %53

57:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 480, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  invoke void @_ZN3imp8Geometry12setPrimitiveENS0_9PrimitiveE(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef 0)
          to label %58 unwind label %122

58:                                               ; preds = %57
  store i1 true, ptr %17, align 1
  %59 = load i1, ptr %17, align 1
  br i1 %59, label %127, label %126

60:                                               ; preds = %1
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %9, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %10, align 4
  br label %73

64:                                               ; preds = %22
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %9, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %10, align 4
  br label %72

68:                                               ; preds = %23
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %9, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %10, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %7) #6
  br label %72

72:                                               ; preds = %68, %64
  call void @_ZN3imp7Matrix3D1Ev(ptr noundef nonnull align 8 dereferenceable(60) %8) #6
  br label %73

73:                                               ; preds = %72, %60
  call void @llvm.lifetime.end.p0(i64 64, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #6
  br label %132

74:                                               ; preds = %24
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %9, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %10, align 4
  br label %87

78:                                               ; preds = %25
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %9, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %10, align 4
  br label %86

82:                                               ; preds = %26
  %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
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %12) #6
  br label %86

86:                                               ; preds = %82, %78
  call void @_ZN3imp7Matrix3D1Ev(ptr noundef nonnull align 8 dereferenceable(60) %13) #6
  br label %87

87:                                               ; preds = %86, %74
  call void @llvm.lifetime.end.p0(i64 64, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %12) #6
  br label %131

88:                                               ; preds = %27
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %9, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %10, align 4
  br label %101

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

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

100:                                              ; preds = %96, %92
  call void @_ZN3imp7Matrix3D1Ev(ptr noundef nonnull align 8 dereferenceable(60) %16) #6
  br label %101

101:                                              ; preds = %100, %88
  call void @llvm.lifetime.end.p0(i64 64, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #6
  br label %130

102:                                              ; preds = %30
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %9, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %10, align 4
  br label %129

106:                                              ; preds = %31
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %9, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %10, align 4
  br label %114

110:                                              ; preds = %49
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %9, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %10, align 4
  call void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  br label %114

114:                                              ; preds = %110, %106
  call void @_ZNSt15__new_allocatorIN3imp4Vec3EED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  %115 = getelementptr inbounds [12 x %"class.imp::Vec3"], ptr %20, i32 0, i32 0
  %116 = getelementptr inbounds %"class.imp::Vec3", ptr %115, i64 12
  br label %117

117:                                              ; preds = %117, %114
  %118 = phi ptr [ %116, %114 ], [ %119, %117 ]
  %119 = getelementptr inbounds %"class.imp::Vec3", ptr %118, i64 -1
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %119) #6
  %120 = icmp eq ptr %119, %115
  br i1 %120, label %121, label %117

121:                                              ; preds = %117
  call void @llvm.lifetime.end.p0(i64 480, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  br label %128

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

126:                                              ; preds = %58
  call void @_ZN3imp8GeometryD2Ev(ptr noundef nonnull align 8 dereferenceable(156) %0) #6
  br label %127

127:                                              ; preds = %126, %58
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %14) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %6) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %6) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %5) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  ret void

128:                                              ; preds = %122, %121
  call void @_ZN3imp8GeometryD2Ev(ptr noundef nonnull align 8 dereferenceable(156) %0) #6
  br label %129

129:                                              ; preds = %128, %102
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %14) #6
  br label %130

130:                                              ; preds = %129, %101
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11) #6
  br label %131

131:                                              ; preds = %130, %87
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %6) #6
  br label %132

132:                                              ; preds = %131, %73
  call void @llvm.lifetime.end.p0(i64 40, ptr %6) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %5) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  br label %133

133:                                              ; preds = %132
  %134 = load ptr, ptr %9, align 8
  %135 = load i32, ptr %10, align 4
  %136 = insertvalue { ptr, i32 } poison, ptr %134, 0
  %137 = insertvalue { ptr, i32 } %136, i32 %135, 1
  resume { ptr, i32 } %137
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3impmlILi3ELi3EfEENS_3VecIXT0_ET1_EERKNS1_IXT_ES2_EERKNS_6MatrixIXT_EXT0_ES2_EE(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(60)) #1

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

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

declare void @_ZN3imp8GeometryC1Ev(ptr)

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSSt16initializer_listIN3imp4Vec3EE", !11, i64 0, !12, i64 8}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!10, !12, i64 8}


; 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::Matrix3" = type { %"class.imp::Matrix.base", [4 x i8] }
%"class.imp::Matrix.base" = type <{ %"class.imp::Object", [9 x float] }>
%"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::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 }
%"class.imp::Vec3" = type { %"class.imp::Vec.base", [4 x i8] }
%"class.imp::Vec.base" = type <{ %"class.imp::Object", [3 x float] }>
%"class.imp::Vec" = type <{ %"class.imp::Object", [3 x float], [4 x i8] }>
%"class.std::allocator.2" = type { i8 }

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

; Function Attrs: nounwind
declare void @_ZN3imp7Matrix3D1Ev(ptr noundef nonnull align 8 dereferenceable(60)) unnamed_addr #4

declare void @_ZN3imp7Matrix39rotationYEf(ptr dead_on_unwind writable sret(%"class.imp::Matrix3") align 8, float noundef) local_unnamed_addr #5

declare void @_ZN3imp7Matrix39rotationZEf(ptr dead_on_unwind writable sret(%"class.imp::Matrix3") align 8, float noundef) local_unnamed_addr #5

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp4Vec3C2Efff(ptr noundef nonnull align 8 dereferenceable(36), float noundef, float noundef, float noundef) 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 #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp8Geometry11tetrahedronEv(ptr dead_on_unwind noalias writable sret(%"class.imp::Geometry") align 8 %0) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.imp::Vec3", align 8
  %3 = alloca %"class.imp::Vec3", align 8
  %4 = alloca %"class.imp::Vec", align 8
  %5 = alloca %"class.imp::Matrix3", align 8
  %6 = alloca %"class.imp::Vec3", align 8
  %7 = alloca %"class.imp::Vec", align 8
  %8 = alloca %"class.imp::Matrix3", align 8
  %9 = alloca %"class.imp::Vec3", align 8
  %10 = alloca %"class.imp::Vec", align 8
  %11 = alloca %"class.imp::Matrix3", align 8
  %12 = alloca %"class.std::vector.0", align 8
  %13 = alloca [12 x %"class.imp::Vec3"], align 8
  %14 = alloca %"class.std::allocator.2", align 1
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %2) #6
  call void @_ZN3imp4Vec3C2Efff(ptr noundef nonnull align 8 dereferenceable(36) %2, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #6
  invoke void @_ZN3imp7Matrix39rotationYEf(ptr dead_on_unwind nonnull writable sret(%"class.imp::Matrix3") align 8 %5, float noundef 0x4000C15200000000)
          to label %15 unwind label %49

15:                                               ; preds = %1
  invoke void @_ZN3impmlILi3ELi3EfEENS_3VecIXT0_ET1_EERKNS1_IXT_ES2_EERKNS_6MatrixIXT_EXT0_ES2_EE(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %4, ptr noundef nonnull align 8 dereferenceable(36) %2, ptr noundef nonnull align 8 dereferenceable(60) %5)
          to label %16 unwind label %51

16:                                               ; preds = %15
  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 %17 unwind label %53

17:                                               ; preds = %16
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %4) #6
  call void @_ZN3imp7Matrix3D1Ev(ptr noundef nonnull align 8 dereferenceable(60) %5) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #6
  invoke void @_ZN3imp7Matrix39rotationZEf(ptr dead_on_unwind nonnull writable sret(%"class.imp::Matrix3") align 8 %8, float noundef 0x4000C15200000000)
          to label %18 unwind label %57

18:                                               ; preds = %17
  invoke void @_ZN3impmlILi3ELi3EfEENS_3VecIXT0_ET1_EERKNS1_IXT_ES2_EERKNS_6MatrixIXT_EXT0_ES2_EE(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %7, ptr noundef nonnull align 8 dereferenceable(36) %3, ptr noundef nonnull align 8 dereferenceable(60) %8)
          to label %19 unwind label %59

19:                                               ; preds = %18
  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 %20 unwind label %61

20:                                               ; preds = %19
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %7) #6
  call void @_ZN3imp7Matrix3D1Ev(ptr noundef nonnull align 8 dereferenceable(60) %8) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #6
  invoke void @_ZN3imp7Matrix39rotationZEf(ptr dead_on_unwind nonnull writable sret(%"class.imp::Matrix3") align 8 %11, float noundef 0xC000C15200000000)
          to label %21 unwind label %65

21:                                               ; preds = %20
  invoke void @_ZN3impmlILi3ELi3EfEENS_3VecIXT0_ET1_EERKNS1_IXT_ES2_EERKNS_6MatrixIXT_EXT0_ES2_EE(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %10, ptr noundef nonnull align 8 dereferenceable(36) %3, ptr noundef nonnull align 8 dereferenceable(60) %11)
          to label %22 unwind label %67

22:                                               ; preds = %21
  invoke void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36) %9, ptr noundef nonnull align 8 dereferenceable(36) %10, float noundef 1.000000e+00)
          to label %23 unwind label %69

23:                                               ; preds = %22
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %10) #6
  call void @_ZN3imp7Matrix3D1Ev(ptr noundef nonnull align 8 dereferenceable(60) %11) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #6
  invoke void @_ZN3imp8GeometryC1Ev(ptr noundef nonnull align 8 dereferenceable(156) %0)
          to label %24 unwind label %73

24:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 480, ptr nonnull %13) #6
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %13, ptr noundef nonnull align 8 dereferenceable(36) %2) #6
  %25 = getelementptr inbounds i8, ptr %13, i64 40
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %25, ptr noundef nonnull align 8 dereferenceable(36) %3) #6
  %26 = getelementptr inbounds i8, ptr %13, i64 80
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %26, ptr noundef nonnull align 8 dereferenceable(36) %6) #6
  %27 = getelementptr inbounds i8, ptr %13, i64 120
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %27, ptr noundef nonnull align 8 dereferenceable(36) %2) #6
  %28 = getelementptr inbounds i8, ptr %13, i64 160
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %28, ptr noundef nonnull align 8 dereferenceable(36) %6) #6
  %29 = getelementptr inbounds i8, ptr %13, i64 200
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %29, ptr noundef nonnull align 8 dereferenceable(36) %9) #6
  %30 = getelementptr inbounds i8, ptr %13, i64 240
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %30, ptr noundef nonnull align 8 dereferenceable(36) %2) #6
  %31 = getelementptr inbounds i8, ptr %13, i64 280
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %31, ptr noundef nonnull align 8 dereferenceable(36) %9) #6
  %32 = getelementptr inbounds i8, ptr %13, i64 320
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %32, ptr noundef nonnull align 8 dereferenceable(36) %3) #6
  %33 = getelementptr inbounds i8, ptr %13, i64 360
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %33, ptr noundef nonnull align 8 dereferenceable(36) %3) #6
  %34 = getelementptr inbounds i8, ptr %13, i64 400
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %34, ptr noundef nonnull align 8 dereferenceable(36) %9) #6
  %35 = getelementptr inbounds i8, ptr %13, i64 440
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %35, ptr noundef nonnull align 8 dereferenceable(36) %6) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #6
  call void @_ZNSaIN3imp4Vec3EEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  invoke void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr nonnull %13, i64 12, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %36 unwind label %75

36:                                               ; preds = %24
  invoke void @_ZN3imp8Geometry3addERKSt6vectorINS_4Vec3ESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(156) %0, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %37 unwind label %77

37:                                               ; preds = %36
  call void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @_ZNSt15__new_allocatorIN3imp4Vec3EED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #6
  %38 = getelementptr inbounds i8, ptr %13, i64 440
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %38) #6
  %39 = getelementptr inbounds i8, ptr %13, i64 400
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %39) #6
  %40 = getelementptr inbounds i8, ptr %13, i64 360
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %40) #6
  %41 = getelementptr inbounds i8, ptr %13, i64 320
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %41) #6
  %42 = getelementptr inbounds i8, ptr %13, i64 280
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %42) #6
  %43 = getelementptr inbounds i8, ptr %13, i64 240
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %43) #6
  %44 = getelementptr inbounds i8, ptr %13, i64 200
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %44) #6
  %45 = getelementptr inbounds i8, ptr %13, i64 160
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %45) #6
  %46 = getelementptr inbounds i8, ptr %13, i64 120
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %46) #6
  %47 = getelementptr inbounds i8, ptr %13, i64 80
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %47) #6
  %48 = getelementptr inbounds i8, ptr %13, i64 40
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %48) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %13) #6
  call void @llvm.lifetime.end.p0(i64 480, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  call void @_ZN3imp8Geometry12setPrimitiveENS0_9PrimitiveE(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef 0)
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %9) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %6) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %3) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %2) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #6
  ret void

49:                                               ; preds = %1
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %56

51:                                               ; preds = %15
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %55

53:                                               ; preds = %16
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %4) #6
  br label %55

55:                                               ; preds = %53, %51
  %.pn = phi { ptr, i32 } [ %54, %53 ], [ %52, %51 ]
  call void @_ZN3imp7Matrix3D1Ev(ptr noundef nonnull align 8 dereferenceable(60) %5) #6
  br label %56

56:                                               ; preds = %55, %49
  %.pn.pn = phi { ptr, i32 } [ %.pn, %55 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #6
  br label %94

57:                                               ; preds = %17
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %64

59:                                               ; preds = %18
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %63

61:                                               ; preds = %19
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %7) #6
  br label %63

63:                                               ; preds = %61, %59
  %.pn17 = phi { ptr, i32 } [ %62, %61 ], [ %60, %59 ]
  call void @_ZN3imp7Matrix3D1Ev(ptr noundef nonnull align 8 dereferenceable(60) %8) #6
  br label %64

64:                                               ; preds = %63, %57
  %.pn17.pn = phi { ptr, i32 } [ %.pn17, %63 ], [ %58, %57 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #6
  br label %93

65:                                               ; preds = %20
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %72

67:                                               ; preds = %21
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %71

69:                                               ; preds = %22
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %10) #6
  br label %71

71:                                               ; preds = %69, %67
  %.pn20 = phi { ptr, i32 } [ %70, %69 ], [ %68, %67 ]
  call void @_ZN3imp7Matrix3D1Ev(ptr noundef nonnull align 8 dereferenceable(60) %11) #6
  br label %72

72:                                               ; preds = %71, %65
  %.pn20.pn = phi { ptr, i32 } [ %.pn20, %71 ], [ %66, %65 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #6
  br label %92

73:                                               ; preds = %23
  %74 = landingpad { ptr, i32 }
          cleanup
  br label %91

75:                                               ; preds = %24
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %79

77:                                               ; preds = %36
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  br label %79

79:                                               ; preds = %77, %75
  %.pn23 = phi { ptr, i32 } [ %78, %77 ], [ %76, %75 ]
  call void @_ZNSt15__new_allocatorIN3imp4Vec3EED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #6
  %80 = getelementptr inbounds i8, ptr %13, i64 440
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %80) #6
  %81 = getelementptr inbounds i8, ptr %13, i64 400
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %81) #6
  %82 = getelementptr inbounds i8, ptr %13, i64 360
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %82) #6
  %83 = getelementptr inbounds i8, ptr %13, i64 320
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %83) #6
  %84 = getelementptr inbounds i8, ptr %13, i64 280
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %84) #6
  %85 = getelementptr inbounds i8, ptr %13, i64 240
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %85) #6
  %86 = getelementptr inbounds i8, ptr %13, i64 200
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %86) #6
  %87 = getelementptr inbounds i8, ptr %13, i64 160
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %87) #6
  %88 = getelementptr inbounds i8, ptr %13, i64 120
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %88) #6
  %89 = getelementptr inbounds i8, ptr %13, i64 80
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %89) #6
  %90 = getelementptr inbounds i8, ptr %13, i64 40
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %90) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %13) #6
  call void @llvm.lifetime.end.p0(i64 480, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  call void @_ZN3imp8GeometryD2Ev(ptr noundef nonnull align 8 dereferenceable(156) %0) #6
  br label %91

91:                                               ; preds = %79, %73
  %.pn23.pn = phi { ptr, i32 } [ %.pn23, %79 ], [ %74, %73 ]
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %9) #6
  br label %92

92:                                               ; preds = %91, %72
  %.pn23.pn.pn = phi { ptr, i32 } [ %.pn23.pn, %91 ], [ %.pn20.pn, %72 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %6) #6
  br label %93

93:                                               ; preds = %92, %64
  %.pn23.pn.pn.pn = phi { ptr, i32 } [ %.pn23.pn.pn, %92 ], [ %.pn17.pn, %64 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %3) #6
  br label %94

94:                                               ; preds = %93, %56
  %.pn23.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn23.pn.pn.pn, %93 ], [ %.pn.pn, %56 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %2) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn23.pn.pn.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3impmlILi3ELi3EfEENS_3VecIXT0_ET1_EERKNS1_IXT_ES2_EERKNS_6MatrixIXT_EXT0_ES2_EE(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(60)) local_unnamed_addr #1

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

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

declare void @_ZN3imp8GeometryC1Ev(ptr) local_unnamed_addr

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass