; LLVM IR from Lut1n/ImpGears :: src/ImpGears/Graphics/Rasterizer.ll (ZN3imp10Rasterizer8triangleERKNS_4Vec3ES3_S3_)

; 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::Vec3" = type { %"class.imp::Vec.base", [4 x i8] }
%"class.imp::Vec.base" = type <{ %"class.imp::Object", [3 x float] }>
%"class.imp::Object" = type { ptr, %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.imp::Rasterizer" = type { %"class.imp::Object", %"class.std::map.24", %"class.std::vector.30", %"class.std::vector.30", %"struct.imp::UniformMap", %"class.imp::Vec4", %"class.std::shared_ptr.35" }
%"class.std::map.24" = type { %"class.std::_Rb_tree.25" }
%"class.std::_Rb_tree.25" = type { %"struct.std::_Rb_tree<int, std::pair<const int, std::shared_ptr<imp::Image>>, std::_Select1st<std::pair<const int, std::shared_ptr<imp::Image>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, std::shared_ptr<imp::Image>>, std::_Select1st<std::pair<const int, std::shared_ptr<imp::Image>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.30" = type { %"struct.std::_Vector_base.31" }
%"struct.std::_Vector_base.31" = type { %"struct.std::_Vector_base<imp::Varyings, std::allocator<imp::Varyings>>::_Vector_impl" }
%"struct.std::_Vector_base<imp::Varyings, std::allocator<imp::Varyings>>::_Vector_impl" = type { %"struct.std::_Vector_base<imp::Varyings, std::allocator<imp::Varyings>>::_Vector_impl_data" }
%"struct.std::_Vector_base<imp::Varyings, std::allocator<imp::Varyings>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.imp::UniformMap" = type { %"class.std::map", %"class.imp::Matrix3", %"class.imp::Matrix4", %"class.imp::Vec3", %"class.imp::Vec4", %"class.std::shared_ptr.2" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::shared_ptr<imp::Uniform>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::shared_ptr<imp::Uniform>>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::shared_ptr<imp::Uniform>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::shared_ptr<imp::Uniform>>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.imp::Matrix3" = type { %"class.imp::Matrix.base", [4 x i8] }
%"class.imp::Matrix.base" = type <{ %"class.imp::Object", [9 x float] }>
%"class.imp::Matrix4" = type { %"class.imp::Matrix.0" }
%"class.imp::Matrix.0" = type { %"class.imp::Object", [16 x float] }
%"class.std::shared_ptr.2" = type { %"class.std::__shared_ptr.3" }
%"class.std::__shared_ptr.3" = type { ptr, %"class.std::__shared_count" }
%"class.imp::Vec4" = type { %"class.imp::Vec.1" }
%"class.imp::Vec.1" = type { %"class.imp::Object", [4 x float] }
%"class.std::shared_ptr.35" = type { %"class.std::__shared_ptr.36" }
%"class.std::__shared_ptr.36" = type { ptr, %"class.std::__shared_count" }

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp8Varyings3mixERKS0_S2_f(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(80), float noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorIN3imp8VaryingsESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; 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 noundef float @_ZN3imp5clampIfEET_S1_S1_S1_(float noundef, float noundef, float noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp10Rasterizer5hLineERKNS_4Vec3ES3_RKNS_8VaryingsES6_(ptr noundef nonnull align 8 dereferenceable(472), ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZN3imp10linearstepIfEET_S1_S1_S1_(float noundef, float noundef, float noundef) #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp10Rasterizer8triangleERKNS_4Vec3ES3_S3_(ptr noundef nonnull align 8 dereferenceable(472) %0, ptr noundef nonnull align 8 dereferenceable(36) %1, ptr noundef nonnull align 8 dereferenceable(36) %2, ptr noundef nonnull align 8 dereferenceable(36) %3) #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca [3 x %"class.imp::Vec3"], align 16
  %10 = alloca [2 x %"class.imp::Vec3"], align 16
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca %"class.imp::Vec3", align 8
  %22 = alloca %"class.imp::Vec3", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %23 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 120, ptr %9) #4
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %9, ptr noundef nonnull align 8 dereferenceable(36) %24) #4
  %25 = getelementptr inbounds %"class.imp::Vec3", ptr %9, i64 1
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %25, ptr noundef nonnull align 8 dereferenceable(36) %26) #4
  %27 = getelementptr inbounds %"class.imp::Vec3", ptr %9, i64 2
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %27, ptr noundef nonnull align 8 dereferenceable(36) %28) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %10) #4
  %29 = getelementptr inbounds [2 x %"class.imp::Vec3"], ptr %10, i32 0, i32 0
  %30 = getelementptr inbounds %"class.imp::Vec3", ptr %29, i64 2
  br label %31

31:                                               ; preds = %33, %4
  %32 = phi ptr [ %29, %4 ], [ %34, %33 ]
  invoke void @_ZN3imp4Vec3C2Ev(ptr noundef nonnull align 8 dereferenceable(36) %32)
          to label %33 unwind label %51

33:                                               ; preds = %31
  %34 = getelementptr inbounds %"class.imp::Vec3", ptr %32, i64 1
  %35 = icmp eq ptr %34, %30
  br i1 %35, label %36, label %31

36:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 1, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 2, ptr %15, align 4, !tbaa !9
  %37 = load i32, ptr %13, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %9, i64 0, i64 %38
  %40 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %39)
          to label %41 unwind label %61

41:                                               ; preds = %36
  %42 = load float, ptr %40, align 4, !tbaa !11
  %43 = load i32, ptr %14, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %9, i64 0, i64 %44
  %46 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %45)
          to label %47 unwind label %61

47:                                               ; preds = %41
  %48 = load float, ptr %46, align 4, !tbaa !11
  %49 = fcmp ogt float %42, %48
  br i1 %49, label %50, label %65

50:                                               ; preds = %47
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14) #4
  br label %65

51:                                               ; preds = %31
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %11, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %12, align 4
  %55 = icmp eq ptr %29, %32
  br i1 %55, label %60, label %56

56:                                               ; preds = %56, %51
  %57 = phi ptr [ %32, %51 ], [ %58, %56 ]
  %58 = getelementptr inbounds %"class.imp::Vec3", ptr %57, i64 -1
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %58) #4
  %59 = icmp eq ptr %58, %29
  br i1 %59, label %60, label %56

60:                                               ; preds = %56, %51
  br label %276

61:                                               ; preds = %85, %80, %70, %65, %41, %36
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %11, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %12, align 4
  br label %268

65:                                               ; preds = %50, %47
  %66 = load i32, ptr %13, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %9, i64 0, i64 %67
  %69 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %68)
          to label %70 unwind label %61

70:                                               ; preds = %65
  %71 = load float, ptr %69, align 4, !tbaa !11
  %72 = load i32, ptr %15, align 4, !tbaa !9
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %9, i64 0, i64 %73
  %75 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %74)
          to label %76 unwind label %61

76:                                               ; preds = %70
  %77 = load float, ptr %75, align 4, !tbaa !11
  %78 = fcmp ogt float %71, %77
  br i1 %78, label %79, label %80

79:                                               ; preds = %76
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %15) #4
  br label %80

80:                                               ; preds = %79, %76
  %81 = load i32, ptr %14, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %9, i64 0, i64 %82
  %84 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %83)
          to label %85 unwind label %61

85:                                               ; preds = %80
  %86 = load float, ptr %84, align 4, !tbaa !11
  %87 = load i32, ptr %15, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %9, i64 0, i64 %88
  %90 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %89)
          to label %91 unwind label %61

91:                                               ; preds = %85
  %92 = load float, ptr %90, align 4, !tbaa !11
  %93 = fcmp ogt float %86, %92
  br i1 %93, label %94, label %95

94:                                               ; preds = %91
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15) #4
  br label %95

95:                                               ; preds = %94, %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %96 = load i32, ptr %13, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %9, i64 0, i64 %97
  %99 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %98)
          to label %100 unwind label %119

100:                                              ; preds = %95
  %101 = load float, ptr %99, align 4, !tbaa !11
  %102 = invoke noundef float @_ZSt5floorf(float noundef %101)
          to label %103 unwind label %119

103:                                              ; preds = %100
  %104 = fptosi float %102 to i32
  store i32 %104, ptr %16, align 4, !tbaa !9
  br label %105

105:                                              ; preds = %230, %103
  %106 = load i32, ptr %16, align 4, !tbaa !9
  %107 = sitofp i32 %106 to float
  %108 = load i32, ptr %15, align 4, !tbaa !9
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %9, i64 0, i64 %109
  %111 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %110)
          to label %112 unwind label %119

112:                                              ; preds = %105
  %113 = load float, ptr %111, align 4, !tbaa !11
  %114 = invoke noundef float @_ZSt5floorf(float noundef %113)
          to label %115 unwind label %119

115:                                              ; preds = %112
  %116 = fadd float %114, 1.000000e+00
  %117 = fcmp olt float %107, %116
  br i1 %117, label %123, label %118

118:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %253

119:                                              ; preds = %112, %105, %100, %95
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %11, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %12, align 4
  br label %252

123:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %124 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %124, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %125 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %125, ptr %18, align 4, !tbaa !9
  %126 = load i32, ptr %16, align 4, !tbaa !9
  %127 = sitofp i32 %126 to float
  %128 = load i32, ptr %14, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %9, i64 0, i64 %129
  %131 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %130)
          to label %132 unwind label %138

132:                                              ; preds = %123
  %133 = load float, ptr %131, align 4, !tbaa !11
  %134 = fcmp olt float %127, %133
  br i1 %134, label %135, label %142

135:                                              ; preds = %132
  %136 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %136, ptr %17, align 4, !tbaa !9
  %137 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %137, ptr %18, align 4, !tbaa !9
  br label %142

138:                                              ; preds = %123
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %11, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %12, align 4
  br label %251

142:                                              ; preds = %135, %132
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %143 = load i32, ptr %17, align 4, !tbaa !9
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %9, i64 0, i64 %144
  %146 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %145)
          to label %147 unwind label %233

147:                                              ; preds = %142
  %148 = load float, ptr %146, align 4, !tbaa !11
  %149 = load i32, ptr %18, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %9, i64 0, i64 %150
  %152 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %151)
          to label %153 unwind label %233

153:                                              ; preds = %147
  %154 = load float, ptr %152, align 4, !tbaa !11
  %155 = load i32, ptr %16, align 4, !tbaa !9
  %156 = sitofp i32 %155 to float
  %157 = invoke noundef float @_ZN3imp10linearstepIfEET_S1_S1_S1_(float noundef %148, float noundef %154, float noundef %156)
          to label %158 unwind label %233

158:                                              ; preds = %153
  %159 = invoke noundef float @_ZN3imp5clampIfEET_S1_S1_S1_(float noundef %157, float noundef 0.000000e+00, float noundef 1.000000e+00)
          to label %160 unwind label %233

160:                                              ; preds = %158
  store float %159, ptr %19, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %161 = load i32, ptr %13, align 4, !tbaa !9
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %9, i64 0, i64 %162
  %164 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %163)
          to label %165 unwind label %237

165:                                              ; preds = %160
  %166 = load float, ptr %164, align 4, !tbaa !11
  %167 = load i32, ptr %15, align 4, !tbaa !9
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %9, i64 0, i64 %168
  %170 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %169)
          to label %171 unwind label %237

171:                                              ; preds = %165
  %172 = load float, ptr %170, align 4, !tbaa !11
  %173 = load i32, ptr %16, align 4, !tbaa !9
  %174 = sitofp i32 %173 to float
  %175 = invoke noundef float @_ZN3imp10linearstepIfEET_S1_S1_S1_(float noundef %166, float noundef %172, float noundef %174)
          to label %176 unwind label %237

176:                                              ; preds = %171
  %177 = invoke noundef float @_ZN3imp5clampIfEET_S1_S1_S1_(float noundef %175, float noundef 0.000000e+00, float noundef 1.000000e+00)
          to label %178 unwind label %237

178:                                              ; preds = %176
  store float %177, ptr %20, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 40, ptr %21) #4
  %179 = load i32, ptr %17, align 4, !tbaa !9
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %9, i64 0, i64 %180
  %182 = load i32, ptr %18, align 4, !tbaa !9
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %9, i64 0, i64 %183
  %185 = load float, ptr %19, align 4, !tbaa !11
  invoke void @_ZN3imp3mixINS_4Vec3EEET_RKS2_S4_f(ptr dead_on_unwind writable sret(%"class.imp::Vec3") align 8 %21, ptr noundef nonnull align 8 dereferenceable(36) %181, ptr noundef nonnull align 8 dereferenceable(36) %184, float noundef %185)
          to label %186 unwind label %241

186:                                              ; preds = %178
  %187 = getelementptr inbounds [2 x %"class.imp::Vec3"], ptr %10, i64 0, i64 0
  %188 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSEOS0_(ptr noundef nonnull align 8 dereferenceable(36) %187, ptr noundef nonnull align 8 dereferenceable(36) %21) #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 @llvm.lifetime.start.p0(i64 40, ptr %22) #4
  %189 = load i32, ptr %13, align 4, !tbaa !9
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %9, i64 0, i64 %190
  %192 = load i32, ptr %15, align 4, !tbaa !9
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %9, i64 0, i64 %193
  %195 = load float, ptr %20, align 4, !tbaa !11
  invoke void @_ZN3imp3mixINS_4Vec3EEET_RKS2_S4_f(ptr dead_on_unwind writable sret(%"class.imp::Vec3") align 8 %22, ptr noundef nonnull align 8 dereferenceable(36) %191, ptr noundef nonnull align 8 dereferenceable(36) %194, float noundef %195)
          to label %196 unwind label %245

196:                                              ; preds = %186
  %197 = getelementptr inbounds [2 x %"class.imp::Vec3"], ptr %10, i64 0, i64 1
  %198 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSEOS0_(ptr noundef nonnull align 8 dereferenceable(36) %197, 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
  %199 = getelementptr inbounds %"class.imp::Rasterizer", ptr %23, i32 0, i32 3
  %200 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorIN3imp8VaryingsESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %199, i64 noundef 0) #4
  %201 = getelementptr inbounds %"class.imp::Rasterizer", ptr %23, i32 0, i32 2
  %202 = load i32, ptr %17, align 4, !tbaa !9
  %203 = sext i32 %202 to i64
  %204 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorIN3imp8VaryingsESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %201, i64 noundef %203) #4
  %205 = getelementptr inbounds %"class.imp::Rasterizer", ptr %23, i32 0, i32 2
  %206 = load i32, ptr %18, align 4, !tbaa !9
  %207 = sext i32 %206 to i64
  %208 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorIN3imp8VaryingsESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %205, i64 noundef %207) #4
  %209 = load float, ptr %19, align 4, !tbaa !11
  invoke void @_ZN3imp8Varyings3mixERKS0_S2_f(ptr noundef nonnull align 8 dereferenceable(80) %200, ptr noundef nonnull align 8 dereferenceable(80) %204, ptr noundef nonnull align 8 dereferenceable(80) %208, float noundef %209)
          to label %210 unwind label %237

210:                                              ; preds = %196
  %211 = getelementptr inbounds %"class.imp::Rasterizer", ptr %23, i32 0, i32 3
  %212 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorIN3imp8VaryingsESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %211, i64 noundef 1) #4
  %213 = getelementptr inbounds %"class.imp::Rasterizer", ptr %23, i32 0, i32 2
  %214 = load i32, ptr %13, align 4, !tbaa !9
  %215 = sext i32 %214 to i64
  %216 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorIN3imp8VaryingsESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %213, i64 noundef %215) #4
  %217 = getelementptr inbounds %"class.imp::Rasterizer", ptr %23, i32 0, i32 2
  %218 = load i32, ptr %15, align 4, !tbaa !9
  %219 = sext i32 %218 to i64
  %220 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorIN3imp8VaryingsESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %217, i64 noundef %219) #4
  %221 = load float, ptr %20, align 4, !tbaa !11
  invoke void @_ZN3imp8Varyings3mixERKS0_S2_f(ptr noundef nonnull align 8 dereferenceable(80) %212, ptr noundef nonnull align 8 dereferenceable(80) %216, ptr noundef nonnull align 8 dereferenceable(80) %220, float noundef %221)
          to label %222 unwind label %237

222:                                              ; preds = %210
  %223 = getelementptr inbounds [2 x %"class.imp::Vec3"], ptr %10, i64 0, i64 0
  %224 = getelementptr inbounds [2 x %"class.imp::Vec3"], ptr %10, i64 0, i64 1
  %225 = getelementptr inbounds %"class.imp::Rasterizer", ptr %23, i32 0, i32 3
  %226 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorIN3imp8VaryingsESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %225, i64 noundef 0) #4
  %227 = getelementptr inbounds %"class.imp::Rasterizer", ptr %23, i32 0, i32 3
  %228 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorIN3imp8VaryingsESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %227, i64 noundef 1) #4
  invoke void @_ZN3imp10Rasterizer5hLineERKNS_4Vec3ES3_RKNS_8VaryingsES6_(ptr noundef nonnull align 8 dereferenceable(472) %23, ptr noundef nonnull align 8 dereferenceable(36) %223, ptr noundef nonnull align 8 dereferenceable(36) %224, ptr noundef nonnull align 8 dereferenceable(80) %226, ptr noundef nonnull align 8 dereferenceable(80) %228)
          to label %229 unwind label %237

229:                                              ; preds = %222
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %230

230:                                              ; preds = %229
  %231 = load i32, ptr %16, align 4, !tbaa !9
  %232 = add nsw i32 %231, 1
  store i32 %232, ptr %16, align 4, !tbaa !9
  br label %105, !llvm.loop !13

233:                                              ; preds = %158, %153, %147, %142
  %234 = landingpad { ptr, i32 }
          cleanup
  %235 = extractvalue { ptr, i32 } %234, 0
  store ptr %235, ptr %11, align 8
  %236 = extractvalue { ptr, i32 } %234, 1
  store i32 %236, ptr %12, align 4
  br label %250

237:                                              ; preds = %222, %210, %196, %176, %171, %165, %160
  %238 = landingpad { ptr, i32 }
          cleanup
  %239 = extractvalue { ptr, i32 } %238, 0
  store ptr %239, ptr %11, align 8
  %240 = extractvalue { ptr, i32 } %238, 1
  store i32 %240, ptr %12, align 4
  br label %249

241:                                              ; preds = %178
  %242 = landingpad { ptr, i32 }
          cleanup
  %243 = extractvalue { ptr, i32 } %242, 0
  store ptr %243, ptr %11, align 8
  %244 = extractvalue { ptr, i32 } %242, 1
  store i32 %244, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #4
  br label %249

245:                                              ; preds = %186
  %246 = landingpad { ptr, i32 }
          cleanup
  %247 = extractvalue { ptr, i32 } %246, 0
  store ptr %247, ptr %11, align 8
  %248 = extractvalue { ptr, i32 } %246, 1
  store i32 %248, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 40, ptr %22) #4
  br label %249

249:                                              ; preds = %245, %241, %237
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %250

250:                                              ; preds = %249, %233
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %251

251:                                              ; preds = %250, %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %252

252:                                              ; preds = %251, %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %268

253:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  %254 = getelementptr inbounds [2 x %"class.imp::Vec3"], ptr %10, i32 0, i32 0
  %255 = getelementptr inbounds %"class.imp::Vec3", ptr %254, i64 2
  br label %256

256:                                              ; preds = %256, %253
  %257 = phi ptr [ %255, %253 ], [ %258, %256 ]
  %258 = getelementptr inbounds %"class.imp::Vec3", ptr %257, i64 -1
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %258) #4
  %259 = icmp eq ptr %258, %254
  br i1 %259, label %260, label %256

260:                                              ; preds = %256
  call void @llvm.lifetime.end.p0(i64 80, ptr %10) #4
  %261 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %9, i32 0, i32 0
  %262 = getelementptr inbounds %"class.imp::Vec3", ptr %261, i64 3
  br label %263

263:                                              ; preds = %263, %260
  %264 = phi ptr [ %262, %260 ], [ %265, %263 ]
  %265 = getelementptr inbounds %"class.imp::Vec3", ptr %264, i64 -1
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %265) #4
  %266 = icmp eq ptr %265, %261
  br i1 %266, label %267, label %263

267:                                              ; preds = %263
  call void @llvm.lifetime.end.p0(i64 120, ptr %9) #4
  ret void

268:                                              ; preds = %252, %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  %269 = getelementptr inbounds [2 x %"class.imp::Vec3"], ptr %10, i32 0, i32 0
  %270 = getelementptr inbounds %"class.imp::Vec3", ptr %269, i64 2
  br label %271

271:                                              ; preds = %271, %268
  %272 = phi ptr [ %270, %268 ], [ %273, %271 ]
  %273 = getelementptr inbounds %"class.imp::Vec3", ptr %272, i64 -1
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %273) #4
  %274 = icmp eq ptr %273, %269
  br i1 %274, label %275, label %271

275:                                              ; preds = %271
  br label %276

276:                                              ; preds = %275, %60
  call void @llvm.lifetime.end.p0(i64 80, ptr %10) #4
  %277 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %9, i32 0, i32 0
  %278 = getelementptr inbounds %"class.imp::Vec3", ptr %277, i64 3
  br label %279

279:                                              ; preds = %279, %276
  %280 = phi ptr [ %278, %276 ], [ %281, %279 ]
  %281 = getelementptr inbounds %"class.imp::Vec3", ptr %280, i64 -1
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %281) #4
  %282 = icmp eq ptr %281, %277
  br i1 %282, label %283, label %279

283:                                              ; preds = %279
  call void @llvm.lifetime.end.p0(i64 120, ptr %9) #4
  br label %284

284:                                              ; preds = %283
  %285 = load ptr, ptr %11, align 8
  %286 = load i32, ptr %12, align 4
  %287 = insertvalue { ptr, i32 } poison, ptr %285, 0
  %288 = insertvalue { ptr, i32 } %287, i32 %286, 1
  resume { ptr, i32 } %288
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp3mixINS_4Vec3EEET_RKS2_S4_f(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), float noundef) #1

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 #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, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"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::Vec3" = type { %"class.imp::Vec.base", [4 x i8] }
%"class.imp::Vec.base" = type <{ %"class.imp::Object", [3 x float] }>
%"class.imp::Object" = type { ptr, %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp8Varyings3mixERKS0_S2_f(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(80), float noundef) local_unnamed_addr #1 align 2

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

; 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 noundef float @_ZN3imp5clampIfEET_S1_S1_S1_(float noundef, float noundef, float noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp10Rasterizer5hLineERKNS_4Vec3ES3_RKNS_8VaryingsES6_(ptr noundef nonnull align 8 dereferenceable(472), ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZN3imp10linearstepIfEET_S1_S1_S1_(float noundef, float noundef, float noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp10Rasterizer8triangleERKNS_4Vec3ES3_S3_(ptr noundef nonnull align 8 dereferenceable(472) %0, ptr noundef nonnull align 8 dereferenceable(36) %1, ptr noundef nonnull align 8 dereferenceable(36) %2, ptr noundef nonnull align 8 dereferenceable(36) %3) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca [3 x %"class.imp::Vec3"], align 16
  %6 = alloca [2 x %"class.imp::Vec3"], align 16
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.imp::Vec3", align 8
  %11 = alloca %"class.imp::Vec3", align 8
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %5) #4
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %5, ptr noundef nonnull align 8 dereferenceable(36) %1) #4
  %12 = getelementptr inbounds i8, ptr %5, i64 40
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %12, ptr noundef nonnull align 8 dereferenceable(36) %2) #4
  %13 = getelementptr inbounds i8, ptr %5, i64 80
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %13, ptr noundef nonnull align 8 dereferenceable(36) %3) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %6) #4
  invoke void @_ZN3imp4Vec3C2Ev(ptr noundef nonnull align 8 dereferenceable(36) %6)
          to label %15 unwind label %.thread

.thread:                                          ; preds = %4
  %14 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

15:                                               ; preds = %4
  %.ptr.1 = getelementptr inbounds i8, ptr %6, i64 40
  invoke void @_ZN3imp4Vec3C2Ev(ptr noundef nonnull align 8 dereferenceable(36) %.ptr.1)
          to label %16 unwind label %.preheader.preheader

16:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  store i32 1, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  store i32 2, ptr %9, align 4, !tbaa !5
  %17 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %5)
  %18 = load float, ptr %17, align 4, !tbaa !9
  %19 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %12)
  %20 = load float, ptr %19, align 4, !tbaa !9
  %21 = fcmp ogt float %18, %20
  br i1 %21, label %22, label %25

22:                                               ; preds = %16
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8) #4
  %.pre = load i32, ptr %7, align 4, !tbaa !5
  %23 = sext i32 %.pre to i64
  br label %25

.preheader.preheader:                             ; preds = %15
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %6) #4
  br label %.loopexit

25:                                               ; preds = %22, %16
  %26 = phi i64 [ %23, %22 ], [ 0, %16 ]
  %27 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %5, i64 0, i64 %26
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %27)
  %29 = load float, ptr %28, align 4, !tbaa !9
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %13)
  %31 = load float, ptr %30, align 4, !tbaa !9
  %32 = fcmp ogt float %29, %31
  br i1 %32, label %33, label %34

33:                                               ; preds = %25
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %9) #4
  br label %34

34:                                               ; preds = %33, %25
  %35 = load i32, ptr %8, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %5, i64 0, i64 %36
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %37)
  %39 = load float, ptr %38, align 4, !tbaa !9
  %40 = load i32, ptr %9, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %5, i64 0, i64 %41
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %42)
  %44 = load float, ptr %43, align 4, !tbaa !9
  %45 = fcmp ogt float %39, %44
  br i1 %45, label %46, label %47

46:                                               ; preds = %34
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9) #4
  br label %47

47:                                               ; preds = %46, %34
  %48 = load i32, ptr %7, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %5, i64 0, i64 %49
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %50)
  %52 = load float, ptr %51, align 4, !tbaa !9
  %53 = call noundef float @_ZSt5floorf(float noundef %52)
  %54 = fptosi float %53 to i32
  %55 = sitofp i32 %54 to float
  %56 = load i32, ptr %9, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %5, i64 0, i64 %57
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %58)
  %60 = load float, ptr %59, align 4, !tbaa !9
  %61 = call noundef float @_ZSt5floorf(float noundef %60)
  %62 = fadd float %61, 1.000000e+00
  %63 = fcmp ogt float %62, %55
  br i1 %63, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %47
  %64 = getelementptr inbounds i8, ptr %0, i64 96
  %65 = getelementptr inbounds i8, ptr %0, i64 72
  br label %69

._crit_edge:                                      ; preds = %126, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  %66 = getelementptr inbounds i8, ptr %6, i64 40
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %66) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %6) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %6) #4
  %67 = getelementptr inbounds i8, ptr %5, i64 80
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %67) #4
  %68 = getelementptr inbounds i8, ptr %5, i64 40
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %68) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %5) #4
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %5) #4
  ret void

69:                                               ; preds = %.lr.ph, %126
  %70 = phi float [ %55, %.lr.ph ], [ %128, %126 ]
  %.02438 = phi i32 [ %54, %.lr.ph ], [ %127, %126 ]
  %71 = load i32, ptr %8, align 4, !tbaa !5
  %72 = load i32, ptr %9, align 4, !tbaa !5
  %73 = sext i32 %71 to i64
  %74 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %5, i64 0, i64 %73
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %74)
  %76 = load float, ptr %75, align 4, !tbaa !9
  %77 = fcmp ogt float %76, %70
  %78 = load i32, ptr %7, align 4
  %79 = load i32, ptr %8, align 4
  %.023 = select i1 %77, i32 %78, i32 %71
  %.022 = select i1 %77, i32 %79, i32 %72
  %80 = sext i32 %.023 to i64
  %81 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %5, i64 0, i64 %80
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %81)
  %83 = load float, ptr %82, align 4, !tbaa !9
  %84 = sext i32 %.022 to i64
  %85 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %5, i64 0, i64 %84
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %85)
  %87 = load float, ptr %86, align 4, !tbaa !9
  %88 = call noundef float @_ZN3imp10linearstepIfEET_S1_S1_S1_(float noundef %83, float noundef %87, float noundef %70)
  %89 = call noundef float @_ZN3imp5clampIfEET_S1_S1_S1_(float noundef %88, float noundef 0.000000e+00, float noundef 1.000000e+00)
  %90 = load i32, ptr %7, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %5, i64 0, i64 %91
  %93 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %92)
  %94 = load float, ptr %93, align 4, !tbaa !9
  %95 = load i32, ptr %9, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %5, i64 0, i64 %96
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %97)
  %99 = load float, ptr %98, align 4, !tbaa !9
  %100 = call noundef float @_ZN3imp10linearstepIfEET_S1_S1_S1_(float noundef %94, float noundef %99, float noundef %70)
  %101 = call noundef float @_ZN3imp5clampIfEET_S1_S1_S1_(float noundef %100, float noundef 0.000000e+00, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %10) #4
  invoke void @_ZN3imp3mixINS_4Vec3EEET_RKS2_S4_f(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec3") align 8 %10, ptr noundef nonnull align 8 dereferenceable(36) %81, ptr noundef nonnull align 8 dereferenceable(36) %85, float noundef %89)
          to label %102 unwind label %139

102:                                              ; preds = %69
  %103 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSEOS0_(ptr noundef nonnull align 8 dereferenceable(36) %6, ptr noundef nonnull align 8 dereferenceable(36) %10) #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.start.p0(i64 40, ptr nonnull %11) #4
  %104 = load i32, ptr %7, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %5, i64 0, i64 %105
  %107 = load i32, ptr %9, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %5, i64 0, i64 %108
  invoke void @_ZN3imp3mixINS_4Vec3EEET_RKS2_S4_f(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec3") align 8 %11, ptr noundef nonnull align 8 dereferenceable(36) %106, ptr noundef nonnull align 8 dereferenceable(36) %109, float noundef %101)
          to label %110 unwind label %141

110:                                              ; preds = %102
  %111 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSEOS0_(ptr noundef nonnull align 8 dereferenceable(36) %.ptr.1, 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
  %112 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorIN3imp8VaryingsESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %64, i64 noundef 0) #4
  %113 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorIN3imp8VaryingsESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %65, i64 noundef %80) #4
  %114 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorIN3imp8VaryingsESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %65, i64 noundef %84) #4
  invoke void @_ZN3imp8Varyings3mixERKS0_S2_f(ptr noundef nonnull align 8 dereferenceable(80) %112, ptr noundef nonnull align 8 dereferenceable(80) %113, ptr noundef nonnull align 8 dereferenceable(80) %114, float noundef %89)
          to label %115 unwind label %137

115:                                              ; preds = %110
  %116 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorIN3imp8VaryingsESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %64, i64 noundef 1) #4
  %117 = load i32, ptr %7, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorIN3imp8VaryingsESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %65, i64 noundef %118) #4
  %120 = load i32, ptr %9, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorIN3imp8VaryingsESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %65, i64 noundef %121) #4
  invoke void @_ZN3imp8Varyings3mixERKS0_S2_f(ptr noundef nonnull align 8 dereferenceable(80) %116, ptr noundef nonnull align 8 dereferenceable(80) %119, ptr noundef nonnull align 8 dereferenceable(80) %122, float noundef %101)
          to label %123 unwind label %137

123:                                              ; preds = %115
  %124 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorIN3imp8VaryingsESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %64, i64 noundef 0) #4
  %125 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorIN3imp8VaryingsESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %64, i64 noundef 1) #4
  invoke void @_ZN3imp10Rasterizer5hLineERKNS_4Vec3ES3_RKNS_8VaryingsES6_(ptr noundef nonnull align 8 dereferenceable(472) %0, ptr noundef nonnull align 8 dereferenceable(36) %6, ptr noundef nonnull align 8 dereferenceable(36) %.ptr.1, ptr noundef nonnull align 8 dereferenceable(80) %124, ptr noundef nonnull align 8 dereferenceable(80) %125)
          to label %126 unwind label %137

126:                                              ; preds = %123
  %127 = add nsw i32 %.02438, 1
  %128 = sitofp i32 %127 to float
  %129 = load i32, ptr %9, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %5, i64 0, i64 %130
  %132 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp4Vec31yEv(ptr noundef nonnull align 8 dereferenceable(36) %131)
  %133 = load float, ptr %132, align 4, !tbaa !9
  %134 = call noundef float @_ZSt5floorf(float noundef %133)
  %135 = fadd float %134, 1.000000e+00
  %136 = fcmp ogt float %135, %128
  br i1 %136, label %69, label %._crit_edge, !llvm.loop !11

137:                                              ; preds = %123, %115, %110
  %138 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.loopexit

139:                                              ; preds = %69
  %140 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #4
  br label %.loopexit.loopexit

141:                                              ; preds = %102
  %142 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #4
  br label %.loopexit.loopexit

.loopexit.loopexit:                               ; preds = %141, %139, %137
  %.pn = phi { ptr, i32 } [ %138, %137 ], [ %142, %141 ], [ %140, %139 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  %143 = getelementptr inbounds i8, ptr %6, i64 40
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %143) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %6) #4
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader.preheader, %.thread, %.loopexit.loopexit
  %.pn.pn = phi { ptr, i32 } [ %.pn, %.loopexit.loopexit ], [ %14, %.thread ], [ %24, %.preheader.preheader ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %6) #4
  %144 = getelementptr inbounds i8, ptr %5, i64 80
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %144) #4
  %145 = getelementptr inbounds i8, ptr %5, i64 40
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %145) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %5) #4
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %5) #4
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp3mixINS_4Vec3EEET_RKS2_S4_f(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), float noundef) local_unnamed_addr #1

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass