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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.imp::Vec" = type <{ %"class.imp::Object", [3 x float], [4 x i8] }>
%"class.imp::Object" = type { ptr, %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.imp::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.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: 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 noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(36) ptr @_ZNK3imp8GeometryixEi(ptr noundef nonnull align 8 dereferenceable(156), i32 noundef) #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 nounwind uwtable
declare dso_local void @_ZNK3imp3VecILi3EfEdvEf(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec") align 8, ptr noundef nonnull align 8 dereferenceable(36), float noundef) #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 #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp10subdivLineERKNS_8GeometryEi(ptr dead_on_unwind noalias writable sret(%"class.imp::Geometry") align 8 %0, ptr noundef nonnull align 8 dereferenceable(156) %1, i32 noundef %2) #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i1, align 1
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.imp::Vec3", align 8
  %14 = alloca %"class.imp::Vec", align 8
  %15 = alloca %"class.imp::Vec", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.imp::Vec3", align 8
  %18 = alloca %"class.imp::Vec", align 8
  %19 = alloca %"class.imp::Vec", align 8
  %20 = alloca %"class.imp::Vec3", align 8
  %21 = alloca %"class.imp::Vec3", align 8
  %22 = alloca %"class.imp::Vec", align 8
  %23 = alloca %"class.imp::Vec", align 8
  %24 = alloca %"class.imp::Vec3", align 8
  %25 = alloca %"class.std::vector.0", align 8
  %26 = alloca %"class.std::initializer_list", align 8
  %27 = alloca [2 x %"class.imp::Vec3"], align 8
  %28 = alloca %"class.std::allocator.2", align 1
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  store i1 false, ptr %7, align 1
  call void @_ZN3imp8GeometryC1Ev(ptr noundef nonnull align 8 dereferenceable(156) %0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %29 = load i32, ptr %6, align 4, !tbaa !9
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %31

31:                                               ; preds = %188, %3
  %32 = load i32, ptr %9, align 4, !tbaa !9
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = invoke noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156) %33)
          to label %35 unwind label %38

35:                                               ; preds = %31
  %36 = icmp slt i32 %32, %34
  br i1 %36, label %42, label %37

37:                                               ; preds = %35
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %193

38:                                               ; preds = %31
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %10, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %11, align 4
  br label %192

42:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 40, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #4
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = load i32, ptr %9, align 4, !tbaa !9
  %45 = add nsw i32 %44, 1
  %46 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZNK3imp8GeometryixEi(ptr noundef nonnull align 8 dereferenceable(156) %43, i32 noundef %45)
          to label %47 unwind label %63

47:                                               ; preds = %42
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = load i32, ptr %9, align 4, !tbaa !9
  %50 = add nsw i32 %49, 0
  %51 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZNK3imp8GeometryixEi(ptr noundef nonnull align 8 dereferenceable(156) %48, i32 noundef %50)
          to label %52 unwind label %63

52:                                               ; preds = %47
  invoke void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %15, ptr noundef nonnull align 8 dereferenceable(36) %46, ptr noundef nonnull align 8 dereferenceable(36) %51)
          to label %53 unwind label %63

53:                                               ; preds = %52
  %54 = load i32, ptr %8, align 4, !tbaa !9
  %55 = sitofp i32 %54 to float
  invoke void @_ZNK3imp3VecILi3EfEdvEf(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %14, ptr noundef nonnull align 8 dereferenceable(36) %15, float noundef %55)
          to label %56 unwind label %67

56:                                               ; preds = %53
  invoke void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36) %13, ptr noundef nonnull align 8 dereferenceable(36) %14, float noundef 1.000000e+00)
          to label %57 unwind label %71

57:                                               ; preds = %56
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %14) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %15) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %118, %57
  %59 = load i32, ptr %16, align 4, !tbaa !9
  %60 = load i32, ptr %8, align 4, !tbaa !9
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %77, label %62

62:                                               ; preds = %58
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %187

63:                                               ; preds = %52, %47, %42
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %10, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %11, align 4
  br label %76

67:                                               ; preds = %53
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %10, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %11, align 4
  br label %75

71:                                               ; preds = %56
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %10, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %11, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %14) #4
  br label %75

75:                                               ; preds = %71, %67
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %15) #4
  br label %76

76:                                               ; preds = %75, %63
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #4
  br label %191

77:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 40, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %18) #4
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = load i32, ptr %9, align 4, !tbaa !9
  %80 = add nsw i32 %79, 0
  %81 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZNK3imp8GeometryixEi(ptr noundef nonnull align 8 dereferenceable(156) %78, i32 noundef %80)
          to label %82 unwind label %121

82:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 40, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %20) #4
  %83 = load i32, ptr %16, align 4, !tbaa !9
  %84 = add nsw i32 %83, 0
  %85 = sitofp i32 %84 to float
  invoke void @_ZN3imp4Vec3C2Ef(ptr noundef nonnull align 8 dereferenceable(36) %20, float noundef %85)
          to label %86 unwind label %125

86:                                               ; preds = %82
  invoke void @_ZNK3imp3VecILi3EfEmlERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %19, ptr noundef nonnull align 8 dereferenceable(36) %13, ptr noundef nonnull align 8 dereferenceable(36) %20)
          to label %87 unwind label %129

87:                                               ; preds = %86
  invoke void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %18, ptr noundef nonnull align 8 dereferenceable(36) %81, ptr noundef nonnull align 8 dereferenceable(36) %19)
          to label %88 unwind label %133

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

89:                                               ; preds = %88
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %18) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %19) #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 @llvm.lifetime.end.p0(i64 40, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %22) #4
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = load i32, ptr %9, align 4, !tbaa !9
  %92 = add nsw i32 %91, 0
  %93 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZNK3imp8GeometryixEi(ptr noundef nonnull align 8 dereferenceable(156) %90, i32 noundef %92)
          to label %94 unwind label %145

94:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 40, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %24) #4
  %95 = load i32, ptr %16, align 4, !tbaa !9
  %96 = add nsw i32 %95, 1
  %97 = sitofp i32 %96 to float
  invoke void @_ZN3imp4Vec3C2Ef(ptr noundef nonnull align 8 dereferenceable(36) %24, float noundef %97)
          to label %98 unwind label %149

98:                                               ; preds = %94
  invoke void @_ZNK3imp3VecILi3EfEmlERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %23, ptr noundef nonnull align 8 dereferenceable(36) %13, ptr noundef nonnull align 8 dereferenceable(36) %24)
          to label %99 unwind label %153

99:                                               ; preds = %98
  invoke void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %22, ptr noundef nonnull align 8 dereferenceable(36) %93, ptr noundef nonnull align 8 dereferenceable(36) %23)
          to label %100 unwind label %157

100:                                              ; preds = %99
  invoke void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36) %21, ptr noundef nonnull align 8 dereferenceable(36) %22, float noundef 1.000000e+00)
          to label %101 unwind label %161

101:                                              ; preds = %100
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %22) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %23) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %24) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %27) #4
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %27, ptr noundef nonnull align 8 dereferenceable(36) %17) #4
  %102 = getelementptr inbounds %"class.imp::Vec3", ptr %27, i64 1
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %102, ptr noundef nonnull align 8 dereferenceable(36) %21) #4
  %103 = getelementptr inbounds %"class.std::initializer_list", ptr %26, i32 0, i32 0
  store ptr %27, ptr %103, align 8, !tbaa !11
  %104 = getelementptr inbounds %"class.std::initializer_list", ptr %26, i32 0, i32 1
  store i64 2, ptr %104, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #4
  call void @_ZNSaIN3imp4Vec3EEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #4
  %105 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8
  %107 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 1
  %108 = load i64, ptr %107, align 8
  invoke void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr %106, i64 %108, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %109 unwind label %169

109:                                              ; preds = %101
  invoke void @_ZN3imp8Geometry3addERKSt6vectorINS_4Vec3ESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(156) %0, ptr noundef nonnull align 8 dereferenceable(24) %25)
          to label %110 unwind label %173

110:                                              ; preds = %109
  call void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #4
  call void @_ZNSt15__new_allocatorIN3imp4Vec3EED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #4
  %111 = getelementptr inbounds [2 x %"class.imp::Vec3"], ptr %27, i32 0, i32 0
  %112 = getelementptr inbounds %"class.imp::Vec3", ptr %111, i64 2
  br label %113

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

117:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 80, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #4
  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 @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %17) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %17) #4
  br label %118

118:                                              ; preds = %117
  %119 = load i32, ptr %16, align 4, !tbaa !9
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %16, align 4, !tbaa !9
  br label %58, !llvm.loop !15

121:                                              ; preds = %77
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %10, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %11, align 4
  br label %144

125:                                              ; preds = %82
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %10, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %11, align 4
  br label %143

129:                                              ; preds = %86
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %10, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %11, align 4
  br label %142

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

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

141:                                              ; preds = %137, %133
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %19) #4
  br label %142

142:                                              ; preds = %141, %129
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %20) #4
  br label %143

143:                                              ; preds = %142, %125
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #4
  br label %144

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

145:                                              ; preds = %89
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %10, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %11, align 4
  br label %168

149:                                              ; preds = %94
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %10, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %11, align 4
  br label %167

153:                                              ; preds = %98
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %10, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %11, align 4
  br label %166

157:                                              ; preds = %99
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %10, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %11, align 4
  br label %165

161:                                              ; preds = %100
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %10, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %11, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %22) #4
  br label %165

165:                                              ; preds = %161, %157
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %23) #4
  br label %166

166:                                              ; preds = %165, %153
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %24) #4
  br label %167

167:                                              ; preds = %166, %149
  call void @llvm.lifetime.end.p0(i64 40, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %23) #4
  br label %168

168:                                              ; preds = %167, %145
  call void @llvm.lifetime.end.p0(i64 40, ptr %22) #4
  br label %185

169:                                              ; preds = %101
  %170 = landingpad { ptr, i32 }
          cleanup
  %171 = extractvalue { ptr, i32 } %170, 0
  store ptr %171, ptr %10, align 8
  %172 = extractvalue { ptr, i32 } %170, 1
  store i32 %172, ptr %11, align 4
  br label %177

173:                                              ; preds = %109
  %174 = landingpad { ptr, i32 }
          cleanup
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %10, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %11, align 4
  call void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #4
  br label %177

177:                                              ; preds = %173, %169
  call void @_ZNSt15__new_allocatorIN3imp4Vec3EED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #4
  %178 = getelementptr inbounds [2 x %"class.imp::Vec3"], ptr %27, i32 0, i32 0
  %179 = getelementptr inbounds %"class.imp::Vec3", ptr %178, i64 2
  br label %180

180:                                              ; preds = %180, %177
  %181 = phi ptr [ %179, %177 ], [ %182, %180 ]
  %182 = getelementptr inbounds %"class.imp::Vec3", ptr %181, i64 -1
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %182) #4
  %183 = icmp eq ptr %182, %178
  br i1 %183, label %184, label %180

184:                                              ; preds = %180
  call void @llvm.lifetime.end.p0(i64 80, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %21) #4
  br label %185

185:                                              ; preds = %184, %168
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %17) #4
  br label %186

186:                                              ; preds = %185, %144
  call void @llvm.lifetime.end.p0(i64 40, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %13) #4
  br label %191

187:                                              ; preds = %62
  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 %188

188:                                              ; preds = %187
  %189 = load i32, ptr %9, align 4, !tbaa !9
  %190 = add nsw i32 %189, 2
  store i32 %190, ptr %9, align 4, !tbaa !9
  br label %31, !llvm.loop !17

191:                                              ; preds = %186, %76
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #4
  br label %192

192:                                              ; preds = %191, %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @_ZN3imp8GeometryD2Ev(ptr noundef nonnull align 8 dereferenceable(156) %0) #4
  br label %197

193:                                              ; preds = %37
  store i1 true, ptr %7, align 1
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  %194 = load i1, ptr %7, align 1
  br i1 %194, label %196, label %195

195:                                              ; preds = %193
  call void @_ZN3imp8GeometryD2Ev(ptr noundef nonnull align 8 dereferenceable(156) %0) #4
  br label %196

196:                                              ; preds = %195, %193
  ret void

197:                                              ; preds = %192
  %198 = load ptr, ptr %10, align 8
  %199 = load i32, ptr %11, align 4
  %200 = insertvalue { ptr, i32 } poison, ptr %198, 0
  %201 = insertvalue { ptr, i32 } %200, i32 %199, 1
  resume { ptr, i32 } %201
}

; 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 }

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

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


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

%"class.imp::Vec" = type <{ %"class.imp::Object", [3 x float], [4 x i8] }>
%"class.imp::Object" = type { ptr, %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.imp::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.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: 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 noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(36) ptr @_ZNK3imp8GeometryixEi(ptr noundef nonnull align 8 dereferenceable(156), i32 noundef) 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 nounwind uwtable
declare dso_local void @_ZNK3imp3VecILi3EfEdvEf(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec") align 8, ptr noundef nonnull align 8 dereferenceable(36), float noundef) 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 #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp10subdivLineERKNS_8GeometryEi(ptr dead_on_unwind noalias writable sret(%"class.imp::Geometry") align 8 %0, ptr noundef nonnull align 8 dereferenceable(156) %1, i32 noundef %2) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.imp::Vec3", align 8
  %5 = alloca %"class.imp::Vec", align 8
  %6 = alloca %"class.imp::Vec", align 8
  %7 = alloca %"class.imp::Vec3", align 8
  %8 = alloca %"class.imp::Vec", align 8
  %9 = alloca %"class.imp::Vec", align 8
  %10 = alloca %"class.imp::Vec3", align 8
  %11 = alloca %"class.imp::Vec3", align 8
  %12 = alloca %"class.imp::Vec", align 8
  %13 = alloca %"class.imp::Vec", align 8
  %14 = alloca %"class.imp::Vec3", align 8
  %15 = alloca %"class.std::vector.0", align 8
  %16 = alloca [2 x %"class.imp::Vec3"], align 8
  %17 = alloca %"class.std::allocator.2", align 1
  tail call void @_ZN3imp8GeometryC1Ev(ptr noundef nonnull align 8 dereferenceable(156) %0)
  %18 = tail call noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156) %1)
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.lr.ph42, label %._crit_edge43

.lr.ph42:                                         ; preds = %3
  %20 = add i32 %2, 1
  %21 = sitofp i32 %20 to float
  %.not38 = icmp slt i32 %2, 0
  %22 = getelementptr inbounds i8, ptr %16, i64 40
  br i1 %.not38, label %.lr.ph42.split.us, label %.lr.ph42.split.preheader

.lr.ph42.split.preheader:                         ; preds = %.lr.ph42
  %23 = getelementptr inbounds i8, ptr %16, i64 40
  br label %.lr.ph42.split

.lr.ph42.split.us:                                ; preds = %.lr.ph42, %27
  %.040.us = phi i32 [ %28, %27 ], [ 0, %.lr.ph42 ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #4
  %24 = or disjoint i32 %.040.us, 1
  %25 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNK3imp8GeometryixEi(ptr noundef nonnull align 8 dereferenceable(156) %1, i32 noundef %24)
  %26 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNK3imp8GeometryixEi(ptr noundef nonnull align 8 dereferenceable(156) %1, i32 noundef %.040.us)
  call void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %6, ptr noundef nonnull align 8 dereferenceable(36) %25, ptr noundef nonnull align 8 dereferenceable(36) %26)
  call void @_ZNK3imp3VecILi3EfEdvEf(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %5, ptr noundef nonnull align 8 dereferenceable(36) %6, float noundef %21)
  invoke void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36) %4, ptr noundef nonnull align 8 dereferenceable(36) %5, float noundef 1.000000e+00)
          to label %27 unwind label %.split.us

27:                                               ; preds = %.lr.ph42.split.us
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %5) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %6) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %4) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #4
  %28 = add nuw nsw i32 %.040.us, 2
  %29 = call noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156) %1)
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %.lr.ph42.split.us, label %._crit_edge43, !llvm.loop !5

.split.us:                                        ; preds = %.lr.ph42.split.us
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %39

.lr.ph42.split:                                   ; preds = %.lr.ph42.split.preheader, %._crit_edge
  %.040 = phi i32 [ %35, %._crit_edge ], [ 0, %.lr.ph42.split.preheader ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #4
  %32 = or disjoint i32 %.040, 1
  %33 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNK3imp8GeometryixEi(ptr noundef nonnull align 8 dereferenceable(156) %1, i32 noundef %32)
  %34 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNK3imp8GeometryixEi(ptr noundef nonnull align 8 dereferenceable(156) %1, i32 noundef %.040)
  call void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %6, ptr noundef nonnull align 8 dereferenceable(36) %33, ptr noundef nonnull align 8 dereferenceable(36) %34)
  call void @_ZNK3imp3VecILi3EfEdvEf(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %5, ptr noundef nonnull align 8 dereferenceable(36) %6, float noundef %21)
  invoke void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36) %4, ptr noundef nonnull align 8 dereferenceable(36) %5, float noundef 1.000000e+00)
          to label %.lr.ph unwind label %.split

.lr.ph:                                           ; preds = %.lr.ph42.split
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %5) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %6) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #4
  br label %40

._crit_edge:                                      ; preds = %51
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %4) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #4
  %35 = add nuw nsw i32 %.040, 2
  %36 = call noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156) %1)
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %.lr.ph42.split, label %._crit_edge43, !llvm.loop !5

.split:                                           ; preds = %.lr.ph42.split
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %39

39:                                               ; preds = %.split.us, %.split
  %.us-phi = phi { ptr, i32 } [ %38, %.split ], [ %31, %.split.us ]
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %5) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %6) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #4
  br label %70

40:                                               ; preds = %.lr.ph, %51
  %.02039 = phi i32 [ 0, %.lr.ph ], [ %46, %51 ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #4
  %41 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNK3imp8GeometryixEi(ptr noundef nonnull align 8 dereferenceable(156) %1, i32 noundef %.040)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %10) #4
  %42 = uitofp nneg i32 %.02039 to float
  invoke void @_ZN3imp4Vec3C2Ef(ptr noundef nonnull align 8 dereferenceable(36) %10, float noundef %42)
          to label %43 unwind label %52

43:                                               ; preds = %40
  call void @_ZNK3imp3VecILi3EfEmlERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %9, ptr noundef nonnull align 8 dereferenceable(36) %4, ptr noundef nonnull align 8 dereferenceable(36) %10)
  call void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %8, ptr noundef nonnull align 8 dereferenceable(36) %41, ptr noundef nonnull align 8 dereferenceable(36) %9)
  invoke void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36) %7, ptr noundef nonnull align 8 dereferenceable(36) %8, float noundef 1.000000e+00)
          to label %44 unwind label %54

44:                                               ; preds = %43
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %8) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %9) #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 @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %12) #4
  %45 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNK3imp8GeometryixEi(ptr noundef nonnull align 8 dereferenceable(156) %1, i32 noundef %.040)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %14) #4
  %46 = add nuw i32 %.02039, 1
  %47 = uitofp nneg i32 %46 to float
  invoke void @_ZN3imp4Vec3C2Ef(ptr noundef nonnull align 8 dereferenceable(36) %14, float noundef %47)
          to label %48 unwind label %57

48:                                               ; preds = %44
  call void @_ZNK3imp3VecILi3EfEmlERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %13, ptr noundef nonnull align 8 dereferenceable(36) %4, ptr noundef nonnull align 8 dereferenceable(36) %14)
  call void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %12, ptr noundef nonnull align 8 dereferenceable(36) %45, ptr noundef nonnull align 8 dereferenceable(36) %13)
  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 %49 unwind label %59

49:                                               ; preds = %48
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %12) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %13) #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 @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %16) #4
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %16, ptr noundef nonnull align 8 dereferenceable(36) %7) #4
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %22, ptr noundef nonnull align 8 dereferenceable(36) %11) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %17) #4
  call void @_ZNSaIN3imp4Vec3EEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  invoke void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr nonnull %16, i64 2, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %50 unwind label %62

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

51:                                               ; preds = %50
  call void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  call void @_ZNSt15__new_allocatorIN3imp4Vec3EED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %23) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %16) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #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) %7) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #4
  %exitcond.not = icmp eq i32 %.02039, %2
  br i1 %exitcond.not, label %._crit_edge, label %40, !llvm.loop !7

52:                                               ; preds = %40
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %56

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

56:                                               ; preds = %54, %52
  %.pn = phi { ptr, i32 } [ %55, %54 ], [ %53, %52 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #4
  br label %69

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

59:                                               ; preds = %48
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %12) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %13) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %14) #4
  br label %61

61:                                               ; preds = %59, %57
  %.pn31 = phi { ptr, i32 } [ %60, %59 ], [ %58, %57 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %12) #4
  br label %68

62:                                               ; preds = %49
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %66

64:                                               ; preds = %50
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  br label %66

66:                                               ; preds = %64, %62
  %.pn33 = phi { ptr, i32 } [ %65, %64 ], [ %63, %62 ]
  call void @_ZNSt15__new_allocatorIN3imp4Vec3EED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #4
  %67 = getelementptr inbounds i8, ptr %16, i64 40
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %67) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %16) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11) #4
  br label %68

68:                                               ; preds = %66, %61
  %.pn33.pn = phi { ptr, i32 } [ %.pn33, %66 ], [ %.pn31, %61 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %7) #4
  br label %69

69:                                               ; preds = %68, %56
  %.pn33.pn.pn = phi { ptr, i32 } [ %.pn33.pn, %68 ], [ %.pn, %56 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %4) #4
  br label %70

70:                                               ; preds = %69, %39
  %.pn33.pn.pn.pn = phi { ptr, i32 } [ %.pn33.pn.pn, %69 ], [ %.us-phi, %39 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #4
  call void @_ZN3imp8GeometryD2Ev(ptr noundef nonnull align 8 dereferenceable(156) %0) #4
  resume { ptr, i32 } %.pn33.pn.pn.pn

._crit_edge43:                                    ; preds = %._crit_edge, %27, %3
  ret void
}

; 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 }

!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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}


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