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

; 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.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::allocator.2" = type { i8 }
%"class.imp::Vec3" = type { %"class.imp::Vec.base", [4 x i8] }
%"class.imp::Vec.base" = type <{ %"class.imp::Object", [3 x float] }>
%"class.__gnu_cxx::__normal_iterator.17" = 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.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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

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

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

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

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

; 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 nounwind uwtable
declare dso_local noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156)) #0 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)) #0 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 #3 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) #0 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp8Geometry15generateNormalsENS0_13NormalGenModeE(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector.0", align 8
  %6 = alloca %"class.std::allocator.2", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.imp::Vec3", align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.17", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.17", align 8
  %13 = alloca %"class.imp::Vec3", align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.imp::Vec3", align 8
  %16 = alloca %"class.imp::Vec3", align 8
  %17 = alloca %"class.imp::Vec3", align 8
  %18 = alloca %"class.imp::Vec3", align 8
  %19 = alloca %"class.imp::Vec", align 8
  %20 = alloca %"class.imp::Vec3", align 8
  %21 = alloca %"class.imp::Vec", align 8
  %22 = alloca %"class.imp::Vec3", align 8
  %23 = alloca %"class.imp::Vec", align 8
  %24 = alloca %"class.imp::Vec", align 8
  %25 = alloca %"class.imp::Vec", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %26 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #4
  %27 = call noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156) %26)
  %28 = sext i32 %27 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #4
  call void @_ZNSaIN3imp4Vec3EEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #4
  invoke void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %28, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %29 unwind label %37

29:                                               ; preds = %2
  %30 = getelementptr inbounds %"class.imp::Geometry", ptr %26, i32 0, i32 6
  %31 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %30, ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @_ZNSt15__new_allocatorIN3imp4Vec3EED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #4
  %32 = getelementptr inbounds %"class.imp::Geometry", ptr %26, i32 0, i32 11
  store i8 1, ptr %32, align 1, !tbaa !11
  %33 = getelementptr inbounds %"class.imp::Geometry", ptr %26, i32 0, i32 1
  %34 = load i32, ptr %33, align 8, !tbaa !31
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %36, label %41

36:                                               ; preds = %29
  br label %228

37:                                               ; preds = %2
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %7, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIN3imp4Vec3EED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #4
  br label %230

41:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 40, ptr %9) #4
  call void @_ZN3imp4Vec3C2Ev(ptr noundef nonnull align 8 dereferenceable(36) %9)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %42 = getelementptr inbounds %"class.imp::Geometry", ptr %26, i32 0, i32 4
  store ptr %42, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  %44 = call ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %43) #4
  %45 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.17", ptr %11, i32 0, i32 0
  store ptr %44, ptr %45, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  %47 = call ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %46) #4
  %48 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.17", ptr %12, i32 0, i32 0
  store ptr %47, ptr %48, align 8
  br label %49

49:                                               ; preds = %56, %41
  %50 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3imp4Vec3ESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  br i1 %50, label %52, label %51

51:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %62

52:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 40, ptr %13) #4
  %53 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN3imp4Vec3ESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %13, ptr noundef nonnull align 8 dereferenceable(36) %53) #4
  %54 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp3VecILi3EfEpLERKS1_(ptr noundef nonnull align 8 dereferenceable(36) %9, ptr noundef nonnull align 8 dereferenceable(36) %13)
          to label %55 unwind label %58

55:                                               ; preds = %52
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %13) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #4
  br label %56

56:                                               ; preds = %55
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN3imp4Vec3ESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  br label %49

58:                                               ; preds = %52
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %7, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %8, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %13) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %229

62:                                               ; preds = %51
  %63 = call noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156) %26)
  %64 = sitofp i32 %63 to float
  %65 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp3VecILi3EfEdVEf(ptr noundef nonnull align 8 dereferenceable(36) %9, float noundef %64)
          to label %66 unwind label %72

66:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !32
  br label %67

67:                                               ; preds = %220, %66
  %68 = load i32, ptr %14, align 4, !tbaa !32
  %69 = call noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156) %26)
  %70 = icmp slt i32 %68, %69
  br i1 %70, label %76, label %71

71:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %227

72:                                               ; preds = %62
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %7, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %8, align 4
  br label %229

76:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #4
  invoke void @_ZN3imp4Vec3C2Ev(ptr noundef nonnull align 8 dereferenceable(36) %15)
          to label %77 unwind label %103

77:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 40, ptr %16) #4
  invoke void @_ZN3imp4Vec3C2Ev(ptr noundef nonnull align 8 dereferenceable(36) %16)
          to label %78 unwind label %107

78:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 40, ptr %17) #4
  invoke void @_ZN3imp4Vec3C2Ev(ptr noundef nonnull align 8 dereferenceable(36) %17)
          to label %79 unwind label %111

79:                                               ; preds = %78
  %80 = load i32, ptr %4, align 4, !tbaa !9
  %81 = icmp eq i32 %80, 2
  br i1 %81, label %82, label %144

82:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 40, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %19) #4
  %83 = load i32, ptr %14, align 4, !tbaa !32
  %84 = add nsw i32 %83, 1
  %85 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %26, i32 noundef %84)
  %86 = load i32, ptr %14, align 4, !tbaa !32
  %87 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %26, i32 noundef %86)
  invoke void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %19, ptr noundef nonnull align 8 dereferenceable(36) %85, ptr noundef nonnull align 8 dereferenceable(36) %87)
          to label %88 unwind label %115

88:                                               ; preds = %82
  invoke void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36) %18, ptr noundef nonnull align 8 dereferenceable(36) %19, float noundef 1.000000e+00)
          to label %89 unwind label %119

89:                                               ; preds = %88
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %19) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %21) #4
  %90 = load i32, ptr %14, align 4, !tbaa !32
  %91 = add nsw i32 %90, 2
  %92 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %26, i32 noundef %91)
  %93 = load i32, ptr %14, align 4, !tbaa !32
  %94 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %26, i32 noundef %93)
  invoke void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %21, ptr noundef nonnull align 8 dereferenceable(36) %92, ptr noundef nonnull align 8 dereferenceable(36) %94)
          to label %95 unwind label %124

95:                                               ; preds = %89
  invoke void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36) %20, ptr noundef nonnull align 8 dereferenceable(36) %21, float noundef 1.000000e+00)
          to label %96 unwind label %128

96:                                               ; preds = %95
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %21) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %22) #4
  invoke void @_ZNK3imp4Vec35crossERKS0_(ptr dead_on_unwind writable sret(%"class.imp::Vec3") align 8 %22, ptr noundef nonnull align 8 dereferenceable(36) %18, ptr noundef nonnull align 8 dereferenceable(36) %20)
          to label %97 unwind label %133

97:                                               ; preds = %96
  %98 = invoke noundef float @_ZN3imp3VecILi3EfE9normalizeEv(ptr noundef nonnull align 8 dereferenceable(36) %22)
          to label %99 unwind label %137

99:                                               ; preds = %97
  %100 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %15, ptr noundef nonnull align 8 dereferenceable(36) %22) #4
  %101 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %16, ptr noundef nonnull align 8 dereferenceable(36) %22) #4
  %102 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %17, ptr noundef nonnull align 8 dereferenceable(36) %22) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %22) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %22) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %20) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %18) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %18) #4
  br label %144

103:                                              ; preds = %76
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %7, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %8, align 4
  br label %226

107:                                              ; preds = %77
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %7, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %8, align 4
  br label %225

111:                                              ; preds = %78
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %7, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %8, align 4
  br label %224

115:                                              ; preds = %82
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %7, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %8, align 4
  br label %123

119:                                              ; preds = %88
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %7, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %8, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %19) #4
  br label %123

123:                                              ; preds = %119, %115
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #4
  br label %143

124:                                              ; preds = %89
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %7, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %8, align 4
  br label %132

128:                                              ; preds = %95
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %7, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %8, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %21) #4
  br label %132

132:                                              ; preds = %128, %124
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #4
  br label %142

133:                                              ; preds = %96
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %7, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %8, align 4
  br label %141

137:                                              ; preds = %97
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %7, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %8, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %22) #4
  br label %141

141:                                              ; preds = %137, %133
  call void @llvm.lifetime.end.p0(i64 40, ptr %22) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %20) #4
  br label %142

142:                                              ; preds = %141, %132
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %18) #4
  br label %143

143:                                              ; preds = %142, %123
  call void @llvm.lifetime.end.p0(i64 40, ptr %18) #4
  br label %223

144:                                              ; preds = %99, %79
  %145 = load i32, ptr %4, align 4, !tbaa !9
  %146 = icmp eq i32 %145, 0
  br i1 %146, label %147, label %202

147:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 40, ptr %23) #4
  %148 = load i32, ptr %14, align 4, !tbaa !32
  %149 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %26, i32 noundef %148)
  invoke void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %23, ptr noundef nonnull align 8 dereferenceable(36) %149, ptr noundef nonnull align 8 dereferenceable(36) %9)
          to label %150 unwind label %171

150:                                              ; preds = %147
  %151 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSILi3EEERKS0_RKNS_3VecIXT_EfEE(ptr noundef nonnull align 8 dereferenceable(36) %15, ptr noundef nonnull align 8 dereferenceable(36) %23)
          to label %152 unwind label %175

152:                                              ; preds = %150
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %23) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %23) #4
  %153 = invoke noundef float @_ZN3imp3VecILi3EfE9normalizeEv(ptr noundef nonnull align 8 dereferenceable(36) %15)
          to label %154 unwind label %180

154:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 40, ptr %24) #4
  %155 = load i32, ptr %14, align 4, !tbaa !32
  %156 = add nsw i32 %155, 1
  %157 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %26, i32 noundef %156)
  invoke void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %24, ptr noundef nonnull align 8 dereferenceable(36) %157, ptr noundef nonnull align 8 dereferenceable(36) %9)
          to label %158 unwind label %184

158:                                              ; preds = %154
  %159 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSILi3EEERKS0_RKNS_3VecIXT_EfEE(ptr noundef nonnull align 8 dereferenceable(36) %16, ptr noundef nonnull align 8 dereferenceable(36) %24)
          to label %160 unwind label %188

160:                                              ; preds = %158
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %24) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %24) #4
  %161 = invoke noundef float @_ZN3imp3VecILi3EfE9normalizeEv(ptr noundef nonnull align 8 dereferenceable(36) %16)
          to label %162 unwind label %180

162:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 40, ptr %25) #4
  %163 = load i32, ptr %14, align 4, !tbaa !32
  %164 = add nsw i32 %163, 2
  %165 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %26, i32 noundef %164)
  invoke void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %25, ptr noundef nonnull align 8 dereferenceable(36) %165, ptr noundef nonnull align 8 dereferenceable(36) %9)
          to label %166 unwind label %193

166:                                              ; preds = %162
  %167 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSILi3EEERKS0_RKNS_3VecIXT_EfEE(ptr noundef nonnull align 8 dereferenceable(36) %17, ptr noundef nonnull align 8 dereferenceable(36) %25)
          to label %168 unwind label %197

168:                                              ; preds = %166
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %25) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %25) #4
  %169 = invoke noundef float @_ZN3imp3VecILi3EfE9normalizeEv(ptr noundef nonnull align 8 dereferenceable(36) %17)
          to label %170 unwind label %180

170:                                              ; preds = %168
  br label %202

171:                                              ; preds = %147
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %7, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %8, align 4
  br label %179

175:                                              ; preds = %150
  %176 = landingpad { ptr, i32 }
          cleanup
  %177 = extractvalue { ptr, i32 } %176, 0
  store ptr %177, ptr %7, align 8
  %178 = extractvalue { ptr, i32 } %176, 1
  store i32 %178, ptr %8, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %23) #4
  br label %179

179:                                              ; preds = %175, %171
  call void @llvm.lifetime.end.p0(i64 40, ptr %23) #4
  br label %223

180:                                              ; preds = %168, %160, %152
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %7, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %8, align 4
  br label %223

184:                                              ; preds = %154
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %7, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %8, align 4
  br label %192

188:                                              ; preds = %158
  %189 = landingpad { ptr, i32 }
          cleanup
  %190 = extractvalue { ptr, i32 } %189, 0
  store ptr %190, ptr %7, align 8
  %191 = extractvalue { ptr, i32 } %189, 1
  store i32 %191, ptr %8, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %24) #4
  br label %192

192:                                              ; preds = %188, %184
  call void @llvm.lifetime.end.p0(i64 40, ptr %24) #4
  br label %223

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

197:                                              ; preds = %166
  %198 = landingpad { ptr, i32 }
          cleanup
  %199 = extractvalue { ptr, i32 } %198, 0
  store ptr %199, ptr %7, align 8
  %200 = extractvalue { ptr, i32 } %198, 1
  store i32 %200, ptr %8, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %25) #4
  br label %201

201:                                              ; preds = %197, %193
  call void @llvm.lifetime.end.p0(i64 40, ptr %25) #4
  br label %223

202:                                              ; preds = %170, %144
  %203 = getelementptr inbounds %"class.imp::Geometry", ptr %26, i32 0, i32 6
  %204 = load i32, ptr %14, align 4, !tbaa !32
  %205 = sext i32 %204 to i64
  %206 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %203, i64 noundef %205) #4
  %207 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %206, ptr noundef nonnull align 8 dereferenceable(36) %15) #4
  %208 = getelementptr inbounds %"class.imp::Geometry", ptr %26, i32 0, i32 6
  %209 = load i32, ptr %14, align 4, !tbaa !32
  %210 = add nsw i32 %209, 1
  %211 = sext i32 %210 to i64
  %212 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %208, i64 noundef %211) #4
  %213 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %212, ptr noundef nonnull align 8 dereferenceable(36) %16) #4
  %214 = getelementptr inbounds %"class.imp::Geometry", ptr %26, i32 0, i32 6
  %215 = load i32, ptr %14, align 4, !tbaa !32
  %216 = add nsw i32 %215, 2
  %217 = sext i32 %216 to i64
  %218 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %214, i64 noundef %217) #4
  %219 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %218, ptr noundef nonnull align 8 dereferenceable(36) %17) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %17) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %17) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %16) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %15) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #4
  br label %220

220:                                              ; preds = %202
  %221 = load i32, ptr %14, align 4, !tbaa !32
  %222 = add nsw i32 %221, 3
  store i32 %222, ptr %14, align 4, !tbaa !32
  br label %67, !llvm.loop !34

223:                                              ; preds = %201, %192, %180, %179, %143
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %17) #4
  br label %224

224:                                              ; preds = %223, %111
  call void @llvm.lifetime.end.p0(i64 40, ptr %17) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %16) #4
  br label %225

225:                                              ; preds = %224, %107
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %15) #4
  br label %226

226:                                              ; preds = %225, %103
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %229

227:                                              ; preds = %71
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %9) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #4
  br label %228

228:                                              ; preds = %227, %36
  ret void

229:                                              ; preds = %226, %72, %58
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %9) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #4
  br label %230

230:                                              ; preds = %229, %37
  %231 = load ptr, ptr %7, align 8
  %232 = load i32, ptr %8, align 4
  %233 = insertvalue { ptr, i32 } poison, ptr %231, 0
  %234 = insertvalue { ptr, i32 } %233, i32 %232, 1
  resume { ptr, i32 } %234
}

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3imp4Vec35crossERKS0_(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec3") align 8, ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36)) #3 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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"_ZTSN3imp8Geometry13NormalGenModeE", !7, i64 0}
!11 = !{!12, !30, i64 155}
!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 = !{!12, !17, i64 24}
!32 = !{!33, !33, i64 0}
!33 = !{!"int", !7, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"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.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::allocator.2" = type { i8 }
%"class.imp::Vec3" = type { %"class.imp::Vec.base", [4 x i8] }
%"class.imp::Vec.base" = type <{ %"class.imp::Object", [3 x float] }>
%"class.__gnu_cxx::__normal_iterator.17" = type { ptr }

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

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

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

; Function Attrs: inlinehint mustprogress 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: mustprogress uwtable
declare dso_local noundef float @_ZN3imp3VecILi3EfE9normalizeEv(ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #3 align 2

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

; 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 nounwind uwtable
declare dso_local noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156)) local_unnamed_addr #0 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 #0 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 #3 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 #0 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp8Geometry15generateNormalsENS0_13NormalGenModeE(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector.0", align 8
  %4 = alloca %"class.std::allocator.2", align 1
  %5 = alloca %"class.imp::Vec3", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.17", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.17", align 8
  %8 = alloca %"class.imp::Vec3", align 8
  %9 = alloca %"class.imp::Vec3", align 8
  %10 = alloca %"class.imp::Vec3", align 8
  %11 = alloca %"class.imp::Vec3", align 8
  %12 = alloca %"class.imp::Vec3", align 8
  %13 = alloca %"class.imp::Vec", align 8
  %14 = alloca %"class.imp::Vec3", align 8
  %15 = alloca %"class.imp::Vec", align 8
  %16 = alloca %"class.imp::Vec3", align 8
  %17 = alloca %"class.imp::Vec", align 8
  %18 = alloca %"class.imp::Vec", align 8
  %19 = alloca %"class.imp::Vec", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  %20 = tail call noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156) %0)
  %21 = sext i32 %20 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #4
  call void @_ZNSaIN3imp4Vec3EEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  invoke void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %21, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %22 unwind label %28

22:                                               ; preds = %2
  %23 = getelementptr inbounds i8, ptr %0, i64 104
  %24 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @_ZNSt15__new_allocatorIN3imp4Vec3EED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  %25 = getelementptr inbounds i8, ptr %0, i64 155
  store i8 1, ptr %25, align 1, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %0, i64 24
  %27 = load i32, ptr %26, align 8, !tbaa !28
  %.not = icmp eq i32 %27, 0
  br i1 %.not, label %30, label %115

28:                                               ; preds = %2
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIN3imp4Vec3EED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  br label %116

30:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #4
  call void @_ZN3imp4Vec3C2Ev(ptr noundef nonnull align 8 dereferenceable(36) %5)
  %31 = getelementptr inbounds i8, ptr %0, i64 56
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %32 = call ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #4
  store ptr %32, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %33 = call ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #4
  store ptr %33, ptr %7, align 8
  %34 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3imp4Vec3ESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  br i1 %34, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %30
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  %35 = call noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156) %0)
  %36 = sitofp i32 %35 to float
  %37 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp3VecILi3EfEdVEf(ptr noundef nonnull align 8 dereferenceable(36) %5, float noundef %36)
  %38 = call noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156) %0)
  %39 = icmp sgt i32 %38, 0
  br i1 %39, label %.lr.ph38, label %._crit_edge39

.lr.ph:                                           ; preds = %30, %.lr.ph
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #4
  %40 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN3imp4Vec3ESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %8, ptr noundef nonnull align 8 dereferenceable(36) %40) #4
  %41 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp3VecILi3EfEpLERKS1_(ptr noundef nonnull align 8 dereferenceable(36) %5, ptr noundef nonnull align 8 dereferenceable(36) %8)
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %8) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #4
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN3imp4Vec3ESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  %43 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3imp4Vec3ESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  br i1 %43, label %.lr.ph, label %._crit_edge

._crit_edge39:                                    ; preds = %101, %._crit_edge
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %5) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #4
  br label %115

.lr.ph38:                                         ; preds = %._crit_edge, %101
  %indvars.iv = phi i64 [ %indvars.iv.next, %101 ], [ 0, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #4
  invoke void @_ZN3imp4Vec3C2Ev(ptr noundef nonnull align 8 dereferenceable(36) %9)
          to label %44 unwind label %65

44:                                               ; preds = %.lr.ph38
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %10) #4
  invoke void @_ZN3imp4Vec3C2Ev(ptr noundef nonnull align 8 dereferenceable(36) %10)
          to label %45 unwind label %67

45:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %11) #4
  invoke void @_ZN3imp4Vec3C2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11)
          to label %46 unwind label %69

46:                                               ; preds = %45
  switch i32 %1, label %._crit_edge41 [
    i32 2, label %47
    i32 0, label %82
  ]

._crit_edge41:                                    ; preds = %46
  %.pre = add nuw nsw i64 %indvars.iv, 1
  %.pre42 = add nuw nsw i64 %indvars.iv, 2
  br label %101

47:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %13) #4
  %48 = add nuw nsw i64 %indvars.iv, 1
  %49 = trunc nuw i64 %48 to i32
  %50 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %49)
  %51 = trunc nuw nsw i64 %indvars.iv to i32
  %52 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %51)
  call void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %13, ptr noundef nonnull align 8 dereferenceable(36) %50, ptr noundef nonnull align 8 dereferenceable(36) %52)
  invoke void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36) %12, ptr noundef nonnull align 8 dereferenceable(36) %13, float noundef 1.000000e+00)
          to label %53 unwind label %71

53:                                               ; preds = %47
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %13) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %15) #4
  %54 = add nuw nsw i64 %indvars.iv, 2
  %55 = trunc nuw i64 %54 to i32
  %56 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %55)
  %57 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %51)
  call void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %15, ptr noundef nonnull align 8 dereferenceable(36) %56, ptr noundef nonnull align 8 dereferenceable(36) %57)
  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 %58 unwind label %73

58:                                               ; preds = %53
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %15) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %16) #4
  invoke void @_ZNK3imp4Vec35crossERKS0_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec3") align 8 %16, ptr noundef nonnull align 8 dereferenceable(36) %12, ptr noundef nonnull align 8 dereferenceable(36) %14)
          to label %59 unwind label %75

59:                                               ; preds = %58
  %60 = invoke noundef float @_ZN3imp3VecILi3EfE9normalizeEv(ptr noundef nonnull align 8 dereferenceable(36) %16)
          to label %61 unwind label %77

61:                                               ; preds = %59
  %62 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %9, ptr noundef nonnull align 8 dereferenceable(36) %16) #4
  %63 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %10, ptr noundef nonnull align 8 dereferenceable(36) %16) #4
  %64 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %11, ptr noundef nonnull align 8 dereferenceable(36) %16) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %16) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %16) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %14) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %12) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %12) #4
  br label %101

65:                                               ; preds = %.lr.ph38
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %114

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

69:                                               ; preds = %45
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %112

71:                                               ; preds = %47
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %13) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #4
  br label %81

73:                                               ; preds = %53
  %74 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %15) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %15) #4
  br label %80

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

77:                                               ; preds = %59
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %16) #4
  br label %79

79:                                               ; preds = %77, %75
  %.pn = phi { ptr, i32 } [ %78, %77 ], [ %76, %75 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %16) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %14) #4
  br label %80

80:                                               ; preds = %79, %73
  %.pn.pn = phi { ptr, i32 } [ %.pn, %79 ], [ %74, %73 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %12) #4
  br label %81

81:                                               ; preds = %80, %71
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %80 ], [ %72, %71 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %12) #4
  br label %111

82:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %17) #4
  %83 = trunc nuw nsw i64 %indvars.iv to i32
  %84 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %83)
  call void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %17, ptr noundef nonnull align 8 dereferenceable(36) %84, ptr noundef nonnull align 8 dereferenceable(36) %5)
  %85 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSILi3EEERKS0_RKNS_3VecIXT_EfEE(ptr noundef nonnull align 8 dereferenceable(36) %9, ptr noundef nonnull align 8 dereferenceable(36) %17)
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %17) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %17) #4
  %86 = invoke noundef float @_ZN3imp3VecILi3EfE9normalizeEv(ptr noundef nonnull align 8 dereferenceable(36) %9)
          to label %87 unwind label %99

87:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %18) #4
  %88 = add nuw nsw i64 %indvars.iv, 1
  %89 = trunc nuw i64 %88 to i32
  %90 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %89)
  call void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %18, ptr noundef nonnull align 8 dereferenceable(36) %90, ptr noundef nonnull align 8 dereferenceable(36) %5)
  %91 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSILi3EEERKS0_RKNS_3VecIXT_EfEE(ptr noundef nonnull align 8 dereferenceable(36) %10, ptr noundef nonnull align 8 dereferenceable(36) %18)
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %18) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %18) #4
  %92 = invoke noundef float @_ZN3imp3VecILi3EfE9normalizeEv(ptr noundef nonnull align 8 dereferenceable(36) %10)
          to label %93 unwind label %99

93:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %19) #4
  %94 = add nuw nsw i64 %indvars.iv, 2
  %95 = trunc nuw i64 %94 to i32
  %96 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %95)
  call void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %19, ptr noundef nonnull align 8 dereferenceable(36) %96, ptr noundef nonnull align 8 dereferenceable(36) %5)
  %97 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSILi3EEERKS0_RKNS_3VecIXT_EfEE(ptr noundef nonnull align 8 dereferenceable(36) %11, ptr noundef nonnull align 8 dereferenceable(36) %19)
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %19) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %19) #4
  %98 = invoke noundef float @_ZN3imp3VecILi3EfE9normalizeEv(ptr noundef nonnull align 8 dereferenceable(36) %11)
          to label %101 unwind label %99

99:                                               ; preds = %93, %87, %82
  %100 = landingpad { ptr, i32 }
          cleanup
  br label %111

101:                                              ; preds = %._crit_edge41, %61, %93
  %.pre-phi43 = phi i64 [ %.pre42, %._crit_edge41 ], [ %54, %61 ], [ %94, %93 ]
  %.pre-phi = phi i64 [ %.pre, %._crit_edge41 ], [ %48, %61 ], [ %88, %93 ]
  %102 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %indvars.iv) #4
  %103 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %102, ptr noundef nonnull align 8 dereferenceable(36) %9) #4
  %104 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %.pre-phi) #4
  %105 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %104, ptr noundef nonnull align 8 dereferenceable(36) %10) #4
  %106 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %.pre-phi43) #4
  %107 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %106, ptr noundef nonnull align 8 dereferenceable(36) %11) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %10) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %9) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 3
  %108 = call noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156) %0)
  %109 = trunc nuw i64 %indvars.iv.next to i32
  %110 = icmp sgt i32 %108, %109
  br i1 %110, label %.lr.ph38, label %._crit_edge39, !llvm.loop !29

111:                                              ; preds = %99, %81
  %.pn30 = phi { ptr, i32 } [ %100, %99 ], [ %.pn.pn.pn, %81 ]
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11) #4
  br label %112

112:                                              ; preds = %111, %69
  %.pn30.pn = phi { ptr, i32 } [ %.pn30, %111 ], [ %70, %69 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %10) #4
  br label %113

113:                                              ; preds = %112, %67
  %.pn30.pn.pn = phi { ptr, i32 } [ %.pn30.pn, %112 ], [ %68, %67 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %9) #4
  br label %114

114:                                              ; preds = %113, %65
  %.pn30.pn.pn.pn = phi { ptr, i32 } [ %.pn30.pn.pn, %113 ], [ %66, %65 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %5) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #4
  br label %116

115:                                              ; preds = %22, %._crit_edge39
  ret void

116:                                              ; preds = %114, %28
  %.pn30.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn30.pn.pn.pn, %114 ], [ %29, %28 ]
  resume { ptr, i32 } %.pn30.pn.pn.pn.pn
}

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3imp4Vec35crossERKS0_(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec3") align 8, ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #3 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

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !27, i64 155}
!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 = !{!6, !14, i64 24}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


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