; LLVM IR from skywind3000/RenderHelp :: sample_05_model (main)

; 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.RenderHelp = type { ptr, ptr, ptr, i32, i32, i32, i32, [3 x %"struct.RenderHelp::Vertex"], i32, i32, i32, i32, i8, i8, %"class.std::function", %"class.std::function.24" }
%"struct.RenderHelp::Vertex" = type <{ %struct.ShaderContext, float, %struct.Vector, %struct.Vector.16, %struct.Vector.20, [4 x i8] }>
%struct.ShaderContext = type { %"class.std::map", %"class.std::map.0", %"class.std::map.5", %"class.std::map.10" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, float>, std::_Select1st<std::pair<const int, float>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, float>, std::_Select1st<std::pair<const int, float>>, 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::map.0" = type { %"class.std::_Rb_tree.1" }
%"class.std::_Rb_tree.1" = type { %"struct.std::_Rb_tree<int, std::pair<const int, Vector<2, float>>, std::_Select1st<std::pair<const int, Vector<2, float>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, Vector<2, float>>, std::_Select1st<std::pair<const int, Vector<2, float>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.5" = type { %"class.std::_Rb_tree.6" }
%"class.std::_Rb_tree.6" = type { %"struct.std::_Rb_tree<int, std::pair<const int, Vector<3, float>>, std::_Select1st<std::pair<const int, Vector<3, float>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, Vector<3, float>>, std::_Select1st<std::pair<const int, Vector<3, float>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.10" = type { %"class.std::_Rb_tree.11" }
%"class.std::_Rb_tree.11" = type { %"struct.std::_Rb_tree<int, std::pair<const int, Vector<4, float>>, std::_Select1st<std::pair<const int, Vector<4, float>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, Vector<4, float>>, std::_Select1st<std::pair<const int, Vector<4, float>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%struct.Vector = type { %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { float, float, float, float }
%struct.Vector.16 = type { %union.anon.17 }
%union.anon.17 = type { %struct.anon.18 }
%struct.anon.18 = type { float, float }
%struct.Vector.20 = type { %union.anon.21 }
%union.anon.21 = type { %struct.anon.22 }
%struct.anon.22 = type { i32, i32 }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.std::function.24" = type { %"class.std::_Function_base", ptr }
%class.Model = type { ptr, %"class.std::vector", %"class.std::vector.29", %"class.std::vector", %"class.std::vector.34", ptr, ptr, ptr }
%"class.std::vector.29" = type { %"struct.std::_Vector_base.30" }
%"struct.std::_Vector_base.30" = type { %"struct.std::_Vector_base<std::vector<Vector<3, int>>, std::allocator<std::vector<Vector<3, int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<Vector<3, int>>, std::allocator<std::vector<Vector<3, int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<Vector<3, int>>, std::allocator<std::vector<Vector<3, int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<Vector<3, int>>, std::allocator<std::vector<Vector<3, int>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Vector<3, float>, std::allocator<Vector<3, float>>>::_Vector_impl" }
%"struct.std::_Vector_base<Vector<3, float>, std::allocator<Vector<3, float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Vector<3, float>, std::allocator<Vector<3, float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Vector<3, float>, std::allocator<Vector<3, float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.34" = type { %"struct.std::_Vector_base.35" }
%"struct.std::_Vector_base.35" = type { %"struct.std::_Vector_base<Vector<2, float>, std::allocator<Vector<2, float>>>::_Vector_impl" }
%"struct.std::_Vector_base<Vector<2, float>, std::allocator<Vector<2, float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Vector<2, float>, std::allocator<Vector<2, float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Vector<2, float>, std::allocator<Vector<2, float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Vector.39 = type { %union.anon.40 }
%union.anon.40 = type { %struct.anon.41 }
%struct.anon.41 = type { float, float, float }
%struct.Matrix = type { [4 x [4 x float]] }
%struct.anon.43 = type { %struct.Vector.39, %struct.Vector.39, %struct.Vector.16 }
%class.anon = type { ptr, ptr, ptr, ptr, ptr }
%class.anon.44 = type { ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %class.RenderHelp, align 8
  %3 = alloca %class.Model, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %struct.Vector.39, align 4
  %7 = alloca %struct.Vector.39, align 4
  %8 = alloca %struct.Vector.39, align 4
  %9 = alloca %struct.Vector.39, align 4
  %10 = alloca float, align 4
  %11 = alloca %struct.Matrix, align 4
  %12 = alloca %struct.Matrix, align 4
  %13 = alloca %struct.Matrix, align 4
  %14 = alloca %struct.Matrix, align 4
  %15 = alloca %struct.Matrix, align 4
  %16 = alloca %struct.Matrix, align 4
  %17 = alloca %struct.Matrix, align 4
  %18 = alloca [3 x %struct.anon.43], align 16
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %"class.std::function", align 8
  %22 = alloca %class.anon, align 8
  %23 = alloca %"class.std::function.24", align 8
  %24 = alloca %class.anon.44, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca %struct.Vector.39, align 4
  %29 = alloca %struct.Vector.16, align 4
  %30 = alloca %struct.Vector.39, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 824, ptr %2) #7
  call void @_ZN10RenderHelpC2Eii(ptr noundef nonnull align 8 dereferenceable(824) %2, i32 noundef 600, i32 noundef 800)
  call void @llvm.lifetime.start.p0(i64 128, ptr %3) #7
  invoke void @_ZN5ModelC2EPKc(ptr noundef nonnull align 8 dereferenceable(128) %3, ptr noundef @.str)
          to label %31 unwind label %71

31:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 12, ptr %6) #7
  invoke void @_ZN6VectorILm3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %6, float noundef 0.000000e+00, float noundef -5.000000e-01, float noundef 0x3FFB333340000000)
          to label %32 unwind label %75

32:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 12, ptr %7) #7
  invoke void @_ZN6VectorILm3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %7, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
          to label %33 unwind label %79

33:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 12, ptr %8) #7
  invoke void @_ZN6VectorILm3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %8, float noundef 0.000000e+00, float noundef 1.000000e+00, float noundef 0.000000e+00)
          to label %34 unwind label %83

34:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 12, ptr %9) #7
  invoke void @_ZN6VectorILm3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %9, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 0x3FEB333340000000)
          to label %35 unwind label %87

35:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store float 0x3FF921FB40000000, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr %11) #7
  invoke void @_ZL16matrix_set_scalefff(ptr dead_on_unwind writable sret(%struct.Matrix) align 4 %11, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00)
          to label %36 unwind label %91

36:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 64, ptr %12) #7
  invoke void @_ZL17matrix_set_lookatRK6VectorILm3EfES2_S2_(ptr dead_on_unwind writable sret(%struct.Matrix) align 4 %12, ptr noundef nonnull align 4 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %8)
          to label %37 unwind label %95

37:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 64, ptr %13) #7
  %38 = load float, ptr %10, align 4, !tbaa !5
  invoke void @_ZL22matrix_set_perspectiveffff(ptr dead_on_unwind writable sret(%struct.Matrix) align 4 %13, float noundef %38, float noundef 7.500000e-01, float noundef 1.000000e+00, float noundef 5.000000e+02)
          to label %39 unwind label %99

39:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr %15) #7
  invoke void @_ZmlILm4ELm4ELm4EfE6MatrixIXT_EXT1_ET2_ERKS0_IXT_EXT0_ES1_ERKS0_IXT0_EXT1_ES1_E(ptr dead_on_unwind writable sret(%struct.Matrix) align 4 %15, ptr noundef nonnull align 4 dereferenceable(64) %11, ptr noundef nonnull align 4 dereferenceable(64) %12)
          to label %40 unwind label %103

40:                                               ; preds = %39
  invoke void @_ZmlILm4ELm4ELm4EfE6MatrixIXT_EXT1_ET2_ERKS0_IXT_EXT0_ES1_ERKS0_IXT0_EXT1_ES1_E(ptr dead_on_unwind writable sret(%struct.Matrix) align 4 %14, ptr noundef nonnull align 4 dereferenceable(64) %15, ptr noundef nonnull align 4 dereferenceable(64) %13)
          to label %41 unwind label %103

41:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr %17) #7
  invoke void @_Z13matrix_invertILm4EfE6MatrixIXT_EXT_ET0_ERKS2_(ptr dead_on_unwind writable sret(%struct.Matrix) align 4 %17, ptr noundef nonnull align 4 dereferenceable(64) %11)
          to label %42 unwind label %107

42:                                               ; preds = %41
  invoke void @_ZNK6MatrixILm4ELm4EfE9TransposeEv(ptr dead_on_unwind writable sret(%struct.Matrix) align 4 %16, ptr noundef nonnull align 4 dereferenceable(64) %17)
          to label %43 unwind label %107

43:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 64, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 96, ptr %18) #7
  %44 = getelementptr inbounds [3 x %struct.anon.43], ptr %18, i32 0, i32 0
  %45 = getelementptr inbounds %struct.anon.43, ptr %44, i64 3
  br label %46

46:                                               ; preds = %48, %43
  %47 = phi ptr [ %44, %43 ], [ %49, %48 ]
  invoke void @"_ZZ4mainEN3$_2C2Ev"(ptr noundef nonnull align 4 dereferenceable(32) %47)
          to label %48 unwind label %111

48:                                               ; preds = %46
  %49 = getelementptr inbounds %struct.anon.43, ptr %47, i64 1
  %50 = icmp eq ptr %49, %45
  br i1 %50, label %51, label %46

51:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 1, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 40, ptr %22) #7
  %52 = getelementptr inbounds %class.anon, ptr %22, i32 0, i32 0
  store ptr %18, ptr %52, align 8, !tbaa !11
  %53 = getelementptr inbounds %class.anon, ptr %22, i32 0, i32 1
  store ptr %14, ptr %53, align 8, !tbaa !11
  %54 = getelementptr inbounds %class.anon, ptr %22, i32 0, i32 2
  store ptr %16, ptr %54, align 8, !tbaa !11
  %55 = getelementptr inbounds %class.anon, ptr %22, i32 0, i32 3
  store ptr %19, ptr %55, align 8, !tbaa !11
  %56 = getelementptr inbounds %class.anon, ptr %22, i32 0, i32 4
  store ptr %20, ptr %56, align 8, !tbaa !11
  invoke void @"_ZNSt8functionIF6VectorILm4EfEiR13ShaderContextEEC2IZ4mainE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(40) %22)
          to label %57 unwind label %115

57:                                               ; preds = %51
  invoke void @_ZN10RenderHelp15SetVertexShaderESt8functionIF6VectorILm4EfEiR13ShaderContextEE(ptr noundef nonnull align 8 dereferenceable(824) %2, ptr noundef %21)
          to label %58 unwind label %119

58:                                               ; preds = %57
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #7
  %59 = getelementptr inbounds %class.anon.44, ptr %24, i32 0, i32 0
  store ptr %19, ptr %59, align 8, !tbaa !11
  %60 = getelementptr inbounds %class.anon.44, ptr %24, i32 0, i32 1
  store ptr %20, ptr %60, align 8, !tbaa !11
  %61 = getelementptr inbounds %class.anon.44, ptr %24, i32 0, i32 2
  store ptr %9, ptr %61, align 8, !tbaa !11
  %62 = getelementptr inbounds %class.anon.44, ptr %24, i32 0, i32 3
  store ptr %3, ptr %62, align 8, !tbaa !11
  invoke void @"_ZNSt8functionIF6VectorILm4EfER13ShaderContextEEC2IZ4mainE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef nonnull align 8 dereferenceable(32) %24)
          to label %63 unwind label %124

63:                                               ; preds = %58
  invoke void @_ZN10RenderHelp14SetPixelShaderESt8functionIF6VectorILm4EfER13ShaderContextEE(ptr noundef nonnull align 8 dereferenceable(824) %2, ptr noundef %23)
          to label %64 unwind label %128

64:                                               ; preds = %63
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %65

65:                                               ; preds = %183, %64
  %66 = load i32, ptr %25, align 4, !tbaa !9
  %67 = invoke noundef i32 @_ZNK5Model6nfacesEv(ptr noundef nonnull align 8 dereferenceable(128) %3)
          to label %68 unwind label %133

68:                                               ; preds = %65
  %69 = icmp slt i32 %66, %67
  br i1 %69, label %137, label %70

70:                                               ; preds = %68
  store i32 2, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %187

71:                                               ; preds = %0
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %4, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %5, align 4
  br label %205

75:                                               ; preds = %31
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %4, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %5, align 4
  br label %204

79:                                               ; preds = %32
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %4, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %5, align 4
  br label %203

83:                                               ; preds = %33
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %4, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %5, align 4
  br label %202

87:                                               ; preds = %34
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %4, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %5, align 4
  br label %201

91:                                               ; preds = %35
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %4, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %5, align 4
  br label %200

95:                                               ; preds = %36
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %4, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %5, align 4
  br label %199

99:                                               ; preds = %37
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %4, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %5, align 4
  br label %198

103:                                              ; preds = %40, %39
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %4, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #7
  br label %197

107:                                              ; preds = %42, %41
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %4, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 64, ptr %17) #7
  br label %196

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

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

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

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

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

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

132:                                              ; preds = %128, %124
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #7
  br label %194

133:                                              ; preds = %180, %65
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %4, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %5, align 4
  br label %186

137:                                              ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  store i32 0, ptr %27, align 4, !tbaa !9
  br label %138

138:                                              ; preds = %164, %137
  %139 = load i32, ptr %27, align 4, !tbaa !9
  %140 = icmp slt i32 %139, 3
  br i1 %140, label %142, label %141

141:                                              ; preds = %138
  store i32 5, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %180

142:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 12, ptr %28) #7
  %143 = load i32, ptr %25, align 4, !tbaa !9
  %144 = load i32, ptr %27, align 4, !tbaa !9
  invoke void @_ZN5Model4vertEii(ptr dead_on_unwind writable sret(%struct.Vector.39) align 4 %28, ptr noundef nonnull align 8 dereferenceable(128) %3, i32 noundef %143, i32 noundef %144)
          to label %145 unwind label %167

145:                                              ; preds = %142
  %146 = load i32, ptr %27, align 4, !tbaa !9
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [3 x %struct.anon.43], ptr %18, i64 0, i64 %147
  %149 = getelementptr inbounds %struct.anon.43, ptr %148, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %149, ptr align 4 %28, i64 12, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 12, ptr %28) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %150 = load i32, ptr %25, align 4, !tbaa !9
  %151 = load i32, ptr %27, align 4, !tbaa !9
  invoke void @_ZNK5Model2uvEii(ptr dead_on_unwind writable sret(%struct.Vector.16) align 4 %29, ptr noundef nonnull align 8 dereferenceable(128) %3, i32 noundef %150, i32 noundef %151)
          to label %152 unwind label %171

152:                                              ; preds = %145
  %153 = load i32, ptr %27, align 4, !tbaa !9
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [3 x %struct.anon.43], ptr %18, i64 0, i64 %154
  %156 = getelementptr inbounds %struct.anon.43, ptr %155, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %156, ptr align 4 %29, i64 8, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %30) #7
  %157 = load i32, ptr %25, align 4, !tbaa !9
  %158 = load i32, ptr %27, align 4, !tbaa !9
  invoke void @_ZNK5Model6normalEii(ptr dead_on_unwind writable sret(%struct.Vector.39) align 4 %30, ptr noundef nonnull align 8 dereferenceable(128) %3, i32 noundef %157, i32 noundef %158)
          to label %159 unwind label %175

159:                                              ; preds = %152
  %160 = load i32, ptr %27, align 4, !tbaa !9
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [3 x %struct.anon.43], ptr %18, i64 0, i64 %161
  %163 = getelementptr inbounds %struct.anon.43, ptr %162, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %163, ptr align 4 %30, i64 12, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 12, ptr %30) #7
  br label %164

164:                                              ; preds = %159
  %165 = load i32, ptr %27, align 4, !tbaa !9
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %27, align 4, !tbaa !9
  br label %138, !llvm.loop !16

167:                                              ; preds = %142
  %168 = landingpad { ptr, i32 }
          cleanup
  %169 = extractvalue { ptr, i32 } %168, 0
  store ptr %169, ptr %4, align 8
  %170 = extractvalue { ptr, i32 } %168, 1
  store i32 %170, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %28) #7
  br label %179

171:                                              ; preds = %145
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %4, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  br label %179

175:                                              ; preds = %152
  %176 = landingpad { ptr, i32 }
          cleanup
  %177 = extractvalue { ptr, i32 } %176, 0
  store ptr %177, ptr %4, align 8
  %178 = extractvalue { ptr, i32 } %176, 1
  store i32 %178, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %30) #7
  br label %179

179:                                              ; preds = %175, %171, %167
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %186

180:                                              ; preds = %141
  %181 = invoke noundef zeroext i1 @_ZN10RenderHelp13DrawPrimitiveEv(ptr noundef nonnull align 8 dereferenceable(824) %2)
          to label %182 unwind label %133

182:                                              ; preds = %180
  br label %183

183:                                              ; preds = %182
  %184 = load i32, ptr %25, align 4, !tbaa !9
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %25, align 4, !tbaa !9
  br label %65, !llvm.loop !18

186:                                              ; preds = %179, %133
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %194

187:                                              ; preds = %70
  invoke void @_ZN10RenderHelp8SaveFileEPKc(ptr noundef nonnull align 8 dereferenceable(824) %2, ptr noundef @.str.1)
          to label %188 unwind label %190

188:                                              ; preds = %187
  store i32 0, ptr %1, align 4
  store i32 1, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 96, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %6) #7
  call void @_ZN5ModelD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %3) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr %3) #7
  call void @_ZN10RenderHelpD2Ev(ptr noundef nonnull align 8 dereferenceable(824) %2) #7
  call void @llvm.lifetime.end.p0(i64 824, ptr %2) #7
  %189 = load i32, ptr %1, align 4
  ret i32 %189

190:                                              ; preds = %187
  %191 = landingpad { ptr, i32 }
          cleanup
  %192 = extractvalue { ptr, i32 } %191, 0
  store ptr %192, ptr %4, align 8
  %193 = extractvalue { ptr, i32 } %191, 1
  store i32 %193, ptr %5, align 4
  br label %194

194:                                              ; preds = %190, %186, %132, %123
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %195

195:                                              ; preds = %194, %111
  call void @llvm.lifetime.end.p0(i64 96, ptr %18) #7
  br label %196

196:                                              ; preds = %195, %107
  call void @llvm.lifetime.end.p0(i64 64, ptr %16) #7
  br label %197

197:                                              ; preds = %196, %103
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #7
  br label %198

198:                                              ; preds = %197, %99
  call void @llvm.lifetime.end.p0(i64 64, ptr %13) #7
  br label %199

199:                                              ; preds = %198, %95
  call void @llvm.lifetime.end.p0(i64 64, ptr %12) #7
  br label %200

200:                                              ; preds = %199, %91
  call void @llvm.lifetime.end.p0(i64 64, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %201

201:                                              ; preds = %200, %87
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #7
  br label %202

202:                                              ; preds = %201, %83
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #7
  br label %203

203:                                              ; preds = %202, %79
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #7
  br label %204

204:                                              ; preds = %203, %75
  call void @llvm.lifetime.end.p0(i64 12, ptr %6) #7
  call void @_ZN5ModelD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %3) #7
  br label %205

205:                                              ; preds = %204, %71
  call void @llvm.lifetime.end.p0(i64 128, ptr %3) #7
  call void @_ZN10RenderHelpD2Ev(ptr noundef nonnull align 8 dereferenceable(824) %2) #7
  call void @llvm.lifetime.end.p0(i64 824, ptr %2) #7
  br label %206

206:                                              ; preds = %205
  %207 = load ptr, ptr %4, align 8
  %208 = load i32, ptr %5, align 4
  %209 = insertvalue { ptr, i32 } poison, ptr %207, 0
  %210 = insertvalue { ptr, i32 } %209, i32 %208, 1
  resume { ptr, i32 } %210
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10RenderHelpC2Eii(ptr noundef nonnull align 8 dereferenceable(824), i32 noundef, i32 noundef) unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6VectorILm3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZL16matrix_set_scalefff(ptr dead_on_unwind noalias writable sret(%struct.Matrix) align 4, float noundef, float noundef, float noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZL17matrix_set_lookatRK6VectorILm3EfES2_S2_(ptr dead_on_unwind noalias writable sret(%struct.Matrix) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZL22matrix_set_perspectiveffff(ptr dead_on_unwind noalias writable sret(%struct.Matrix) align 4, float noundef, float noundef, float noundef, float noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZmlILm4ELm4ELm4EfE6MatrixIXT_EXT1_ET2_ERKS0_IXT_EXT0_ES1_ERKS0_IXT0_EXT1_ES1_E(ptr dead_on_unwind noalias writable sret(%struct.Matrix) align 4, ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(64)) #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z13matrix_invertILm4EfE6MatrixIXT_EXT_ET0_ERKS2_(ptr dead_on_unwind noalias writable sret(%struct.Matrix) align 4, ptr noundef nonnull align 4 dereferenceable(64)) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK6MatrixILm4ELm4EfE9TransposeEv(ptr dead_on_unwind noalias writable sret(%struct.Matrix) align 4, ptr noundef nonnull align 4 dereferenceable(64)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZZ4mainEN3$_2C2Ev"(ptr noundef nonnull align 4 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10RenderHelp15SetVertexShaderESt8functionIF6VectorILm4EfEiR13ShaderContextEE(ptr noundef nonnull align 8 dereferenceable(824), ptr noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt8functionIF6VectorILm4EfEiR13ShaderContextEEC2IZ4mainE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10RenderHelp14SetPixelShaderESt8functionIF6VectorILm4EfER13ShaderContextEE(ptr noundef nonnull align 8 dereferenceable(824), ptr noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt8functionIF6VectorILm4EfER13ShaderContextEEC2IZ4mainE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5Model6nfacesEv(ptr noundef nonnull align 8 dereferenceable(128)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Model4vertEii(ptr dead_on_unwind noalias writable sret(%struct.Vector.39) align 4, ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, i32 noundef) #2 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Model2uvEii(ptr dead_on_unwind noalias writable sret(%struct.Vector.16) align 4, ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, i32 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Model6normalEii(ptr dead_on_unwind noalias writable sret(%struct.Vector.39) align 4, ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, i32 noundef) #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10RenderHelp8SaveFileEPKc(ptr noundef nonnull align 8 dereferenceable(824), ptr noundef) #2 align 2

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress 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 = { 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 #4 = { 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 #5 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 = !{!"float", !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 = !{!"any pointer", !7, i64 0}
!13 = !{i64 0, i64 12, !14}
!14 = !{!7, !7, i64 0}
!15 = !{i64 0, i64 8, !14}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}


; 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.RenderHelp = type { ptr, ptr, ptr, i32, i32, i32, i32, [3 x %"struct.RenderHelp::Vertex"], i32, i32, i32, i32, i8, i8, %"class.std::function", %"class.std::function.24" }
%"struct.RenderHelp::Vertex" = type <{ %struct.ShaderContext, float, %struct.Vector, %struct.Vector.16, %struct.Vector.20, [4 x i8] }>
%struct.ShaderContext = type { %"class.std::map", %"class.std::map.0", %"class.std::map.5", %"class.std::map.10" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, float>, std::_Select1st<std::pair<const int, float>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, float>, std::_Select1st<std::pair<const int, float>>, 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::map.0" = type { %"class.std::_Rb_tree.1" }
%"class.std::_Rb_tree.1" = type { %"struct.std::_Rb_tree<int, std::pair<const int, Vector<2, float>>, std::_Select1st<std::pair<const int, Vector<2, float>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, Vector<2, float>>, std::_Select1st<std::pair<const int, Vector<2, float>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.5" = type { %"class.std::_Rb_tree.6" }
%"class.std::_Rb_tree.6" = type { %"struct.std::_Rb_tree<int, std::pair<const int, Vector<3, float>>, std::_Select1st<std::pair<const int, Vector<3, float>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, Vector<3, float>>, std::_Select1st<std::pair<const int, Vector<3, float>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.10" = type { %"class.std::_Rb_tree.11" }
%"class.std::_Rb_tree.11" = type { %"struct.std::_Rb_tree<int, std::pair<const int, Vector<4, float>>, std::_Select1st<std::pair<const int, Vector<4, float>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, Vector<4, float>>, std::_Select1st<std::pair<const int, Vector<4, float>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%struct.Vector = type { %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { float, float, float, float }
%struct.Vector.16 = type { %union.anon.17 }
%union.anon.17 = type { %struct.anon.18 }
%struct.anon.18 = type { float, float }
%struct.Vector.20 = type { %union.anon.21 }
%union.anon.21 = type { %struct.anon.22 }
%struct.anon.22 = type { i32, i32 }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.std::function.24" = type { %"class.std::_Function_base", ptr }
%class.Model = type { ptr, %"class.std::vector", %"class.std::vector.29", %"class.std::vector", %"class.std::vector.34", ptr, ptr, ptr }
%"class.std::vector.29" = type { %"struct.std::_Vector_base.30" }
%"struct.std::_Vector_base.30" = type { %"struct.std::_Vector_base<std::vector<Vector<3, int>>, std::allocator<std::vector<Vector<3, int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<Vector<3, int>>, std::allocator<std::vector<Vector<3, int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<Vector<3, int>>, std::allocator<std::vector<Vector<3, int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<Vector<3, int>>, std::allocator<std::vector<Vector<3, int>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Vector<3, float>, std::allocator<Vector<3, float>>>::_Vector_impl" }
%"struct.std::_Vector_base<Vector<3, float>, std::allocator<Vector<3, float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Vector<3, float>, std::allocator<Vector<3, float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Vector<3, float>, std::allocator<Vector<3, float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.34" = type { %"struct.std::_Vector_base.35" }
%"struct.std::_Vector_base.35" = type { %"struct.std::_Vector_base<Vector<2, float>, std::allocator<Vector<2, float>>>::_Vector_impl" }
%"struct.std::_Vector_base<Vector<2, float>, std::allocator<Vector<2, float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Vector<2, float>, std::allocator<Vector<2, float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Vector<2, float>, std::allocator<Vector<2, float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Vector.39 = type { %union.anon.40 }
%union.anon.40 = type { %struct.anon.41 }
%struct.anon.41 = type { float, float, float }
%struct.Matrix = type { [4 x [4 x float]] }
%struct.anon.43 = type { %struct.Vector.39, %struct.Vector.39, %struct.Vector.16 }
%class.anon = type { ptr, ptr, ptr, ptr, ptr }
%class.anon.44 = type { ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %class.RenderHelp, align 8
  %2 = alloca %class.Model, align 8
  %3 = alloca %struct.Vector.39, align 4
  %4 = alloca %struct.Vector.39, align 4
  %5 = alloca %struct.Vector.39, align 4
  %6 = alloca %struct.Vector.39, align 4
  %7 = alloca %struct.Matrix, align 4
  %8 = alloca %struct.Matrix, align 4
  %9 = alloca %struct.Matrix, align 4
  %10 = alloca %struct.Matrix, align 4
  %11 = alloca %struct.Matrix, align 4
  %12 = alloca %struct.Matrix, align 4
  %13 = alloca %struct.Matrix, align 4
  %14 = alloca [3 x %struct.anon.43], align 16
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::function", align 8
  %18 = alloca %class.anon, align 8
  %19 = alloca %"class.std::function.24", align 8
  %20 = alloca %class.anon.44, align 8
  %21 = alloca %struct.Vector.39, align 4
  %22 = alloca %struct.Vector.16, align 8
  %23 = alloca %struct.Vector.39, align 4
  call void @llvm.lifetime.start.p0(i64 824, ptr nonnull %1) #7
  call void @_ZN10RenderHelpC2Eii(ptr noundef nonnull align 8 dereferenceable(824) %1, i32 noundef 600, i32 noundef 800)
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %2) #7
  invoke void @_ZN5ModelC2EPKc(ptr noundef nonnull align 8 dereferenceable(128) %2, ptr noundef nonnull @.str)
          to label %24 unwind label %54

24:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #7
  call void @_ZN6VectorILm3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %3, float noundef 0.000000e+00, float noundef -5.000000e-01, float noundef 0x3FFB333340000000)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #7
  call void @_ZN6VectorILm3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %4, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #7
  call void @_ZN6VectorILm3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %5, float noundef 0.000000e+00, float noundef 1.000000e+00, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #7
  call void @_ZN6VectorILm3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %6, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 0x3FEB333340000000)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #7
  invoke void @_ZL16matrix_set_scalefff(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 4 %7, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00)
          to label %25 unwind label %56

25:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #7
  invoke void @_ZL17matrix_set_lookatRK6VectorILm3EfES2_S2_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 4 %8, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %5)
          to label %26 unwind label %58

26:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #7
  invoke void @_ZL22matrix_set_perspectiveffff(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 4 %9, float noundef 0x3FF921FB40000000, float noundef 7.500000e-01, float noundef 1.000000e+00, float noundef 5.000000e+02)
          to label %27 unwind label %60

27:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #7
  invoke void @_ZmlILm4ELm4ELm4EfE6MatrixIXT_EXT1_ET2_ERKS0_IXT_EXT0_ES1_ERKS0_IXT0_EXT1_ES1_E(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 4 %11, ptr noundef nonnull align 4 dereferenceable(64) %7, ptr noundef nonnull align 4 dereferenceable(64) %8)
          to label %28 unwind label %62

28:                                               ; preds = %27
  invoke void @_ZmlILm4ELm4ELm4EfE6MatrixIXT_EXT1_ET2_ERKS0_IXT_EXT0_ES1_ERKS0_IXT0_EXT1_ES1_E(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 4 %10, ptr noundef nonnull align 4 dereferenceable(64) %11, ptr noundef nonnull align 4 dereferenceable(64) %9)
          to label %29 unwind label %62

29:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %13) #7
  invoke void @_Z13matrix_invertILm4EfE6MatrixIXT_EXT_ET0_ERKS2_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 4 %13, ptr noundef nonnull align 4 dereferenceable(64) %7)
          to label %30 unwind label %64

30:                                               ; preds = %29
  invoke void @_ZNK6MatrixILm4ELm4EfE9TransposeEv(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 4 %12, ptr noundef nonnull align 4 dereferenceable(64) %13)
          to label %31 unwind label %64

31:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %14) #7
  invoke void @"_ZZ4mainEN3$_2C2Ev"(ptr noundef nonnull align 4 dereferenceable(32) %14)
          to label %32 unwind label %66

32:                                               ; preds = %31
  %.ptr.1 = getelementptr inbounds i8, ptr %14, i64 32
  invoke void @"_ZZ4mainEN3$_2C2Ev"(ptr noundef nonnull align 4 dereferenceable(32) %.ptr.1)
          to label %33 unwind label %66

33:                                               ; preds = %32
  %.ptr.2 = getelementptr inbounds i8, ptr %14, i64 64
  invoke void @"_ZZ4mainEN3$_2C2Ev"(ptr noundef nonnull align 4 dereferenceable(32) %.ptr.2)
          to label %34 unwind label %66

34:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #7
  store i32 0, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  store i32 1, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %18) #7
  store ptr %14, ptr %18, align 8, !tbaa !9
  %35 = getelementptr inbounds i8, ptr %18, i64 8
  store ptr %10, ptr %35, align 8, !tbaa !9
  %36 = getelementptr inbounds i8, ptr %18, i64 16
  store ptr %12, ptr %36, align 8, !tbaa !9
  %37 = getelementptr inbounds i8, ptr %18, i64 24
  store ptr %15, ptr %37, align 8, !tbaa !9
  %38 = getelementptr inbounds i8, ptr %18, i64 32
  store ptr %16, ptr %38, align 8, !tbaa !9
  invoke void @"_ZNSt8functionIF6VectorILm4EfEiR13ShaderContextEEC2IZ4mainE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(40) %18)
          to label %39 unwind label %68

39:                                               ; preds = %34
  invoke void @_ZN10RenderHelp15SetVertexShaderESt8functionIF6VectorILm4EfEiR13ShaderContextEE(ptr noundef nonnull align 8 dereferenceable(824) %1, ptr noundef nonnull %17)
          to label %40 unwind label %70

40:                                               ; preds = %39
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %18) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %20) #7
  store ptr %15, ptr %20, align 8, !tbaa !9
  %41 = getelementptr inbounds i8, ptr %20, i64 8
  store ptr %16, ptr %41, align 8, !tbaa !9
  %42 = getelementptr inbounds i8, ptr %20, i64 16
  store ptr %6, ptr %42, align 8, !tbaa !9
  %43 = getelementptr inbounds i8, ptr %20, i64 24
  store ptr %2, ptr %43, align 8, !tbaa !9
  invoke void @"_ZNSt8functionIF6VectorILm4EfER13ShaderContextEEC2IZ4mainE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %44 unwind label %73

44:                                               ; preds = %40
  invoke void @_ZN10RenderHelp14SetPixelShaderESt8functionIF6VectorILm4EfER13ShaderContextEE(ptr noundef nonnull align 8 dereferenceable(824) %1, ptr noundef nonnull %19)
          to label %45 unwind label %75

45:                                               ; preds = %44
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %20) #7
  %46 = call noundef i32 @_ZNK5Model6nfacesEv(ptr noundef nonnull align 8 dereferenceable(128) %2)
  %47 = icmp sgt i32 %46, 0
  br i1 %47, label %.preheader.preheader, label %._crit_edge

.preheader.preheader:                             ; preds = %45
  %48 = getelementptr inbounds i8, ptr %14, i64 24
  %49 = getelementptr inbounds i8, ptr %14, i64 12
  %50 = getelementptr inbounds i8, ptr %14, i64 56
  %51 = getelementptr inbounds i8, ptr %14, i64 44
  %52 = getelementptr inbounds i8, ptr %14, i64 88
  %53 = getelementptr inbounds i8, ptr %14, i64 76
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %99
  %.01647 = phi i32 [ %100, %99 ], [ 0, %.preheader.preheader ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %21) #7
  invoke void @_ZN5Model4vertEii(ptr dead_on_unwind nonnull writable sret(%struct.Vector.39) align 4 %21, ptr noundef nonnull align 8 dereferenceable(128) %2, i32 noundef %.01647, i32 noundef 0)
          to label %80 unwind label %93

._crit_edge:                                      ; preds = %99, %45
  invoke void @_ZN10RenderHelp8SaveFileEPKc(ptr noundef nonnull align 8 dereferenceable(824) %1, ptr noundef nonnull @.str.1)
          to label %103 unwind label %104

54:                                               ; preds = %0
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %113

56:                                               ; preds = %24
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %112

58:                                               ; preds = %25
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %111

60:                                               ; preds = %26
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %110

62:                                               ; preds = %28, %27
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #7
  br label %109

64:                                               ; preds = %30, %29
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #7
  br label %108

66:                                               ; preds = %33, %32, %31
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %107

68:                                               ; preds = %34
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %72

70:                                               ; preds = %39
  %71 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %72

72:                                               ; preds = %70, %68
  %.pn = phi { ptr, i32 } [ %71, %70 ], [ %69, %68 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %18) #7
  br label %106

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

75:                                               ; preds = %44
  %76 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  br label %77

77:                                               ; preds = %75, %73
  %.pn33 = phi { ptr, i32 } [ %76, %75 ], [ %74, %73 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %20) #7
  br label %106

78:                                               ; preds = %91
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %106

80:                                               ; preds = %.preheader
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(12) %21, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #7
  invoke void @_ZNK5Model2uvEii(ptr dead_on_unwind nonnull writable sret(%struct.Vector.16) align 4 %22, ptr noundef nonnull align 8 dereferenceable(128) %2, i32 noundef %.01647, i32 noundef 0)
          to label %81 unwind label %95

81:                                               ; preds = %80
  %82 = load i64, ptr %22, align 8, !tbaa !12
  store i64 %82, ptr %48, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %23) #7
  invoke void @_ZNK5Model6normalEii(ptr dead_on_unwind nonnull writable sret(%struct.Vector.39) align 4 %23, ptr noundef nonnull align 8 dereferenceable(128) %2, i32 noundef %.01647, i32 noundef 0)
          to label %83 unwind label %97

83:                                               ; preds = %81
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %49, ptr noundef nonnull align 4 dereferenceable(12) %23, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %23) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %21) #7
  invoke void @_ZN5Model4vertEii(ptr dead_on_unwind nonnull writable sret(%struct.Vector.39) align 4 %21, ptr noundef nonnull align 8 dereferenceable(128) %2, i32 noundef %.01647, i32 noundef 1)
          to label %84 unwind label %93

84:                                               ; preds = %83
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(12) %.ptr.1, ptr noundef nonnull align 4 dereferenceable(12) %21, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #7
  invoke void @_ZNK5Model2uvEii(ptr dead_on_unwind nonnull writable sret(%struct.Vector.16) align 4 %22, ptr noundef nonnull align 8 dereferenceable(128) %2, i32 noundef %.01647, i32 noundef 1)
          to label %85 unwind label %95

85:                                               ; preds = %84
  %86 = load i64, ptr %22, align 8, !tbaa !12
  store i64 %86, ptr %50, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %23) #7
  invoke void @_ZNK5Model6normalEii(ptr dead_on_unwind nonnull writable sret(%struct.Vector.39) align 4 %23, ptr noundef nonnull align 8 dereferenceable(128) %2, i32 noundef %.01647, i32 noundef 1)
          to label %87 unwind label %97

87:                                               ; preds = %85
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %51, ptr noundef nonnull align 4 dereferenceable(12) %23, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %23) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %21) #7
  invoke void @_ZN5Model4vertEii(ptr dead_on_unwind nonnull writable sret(%struct.Vector.39) align 4 %21, ptr noundef nonnull align 8 dereferenceable(128) %2, i32 noundef %.01647, i32 noundef 2)
          to label %88 unwind label %93

88:                                               ; preds = %87
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(12) %.ptr.2, ptr noundef nonnull align 4 dereferenceable(12) %21, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #7
  invoke void @_ZNK5Model2uvEii(ptr dead_on_unwind nonnull writable sret(%struct.Vector.16) align 4 %22, ptr noundef nonnull align 8 dereferenceable(128) %2, i32 noundef %.01647, i32 noundef 2)
          to label %89 unwind label %95

89:                                               ; preds = %88
  %90 = load i64, ptr %22, align 8, !tbaa !12
  store i64 %90, ptr %52, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %23) #7
  invoke void @_ZNK5Model6normalEii(ptr dead_on_unwind nonnull writable sret(%struct.Vector.39) align 4 %23, ptr noundef nonnull align 8 dereferenceable(128) %2, i32 noundef %.01647, i32 noundef 2)
          to label %91 unwind label %97

91:                                               ; preds = %89
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %53, ptr noundef nonnull align 4 dereferenceable(12) %23, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %23) #7
  %92 = invoke noundef zeroext i1 @_ZN10RenderHelp13DrawPrimitiveEv(ptr noundef nonnull align 8 dereferenceable(824) %1)
          to label %99 unwind label %78

93:                                               ; preds = %87, %83, %.preheader
  %94 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #7
  br label %106

95:                                               ; preds = %88, %84, %80
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  br label %106

97:                                               ; preds = %89, %85, %81
  %98 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %23) #7
  br label %106

99:                                               ; preds = %91
  %100 = add nuw nsw i32 %.01647, 1
  %101 = call noundef i32 @_ZNK5Model6nfacesEv(ptr noundef nonnull align 8 dereferenceable(128) %2)
  %102 = icmp slt i32 %100, %101
  br i1 %102, label %.preheader, label %._crit_edge, !llvm.loop !13

103:                                              ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #7
  call void @_ZN5ModelD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %2) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %2) #7
  call void @_ZN10RenderHelpD2Ev(ptr noundef nonnull align 8 dereferenceable(824) %1) #7
  call void @llvm.lifetime.end.p0(i64 824, ptr nonnull %1) #7
  ret i32 0

104:                                              ; preds = %._crit_edge
  %105 = landingpad { ptr, i32 }
          cleanup
  br label %106

106:                                              ; preds = %78, %97, %95, %93, %104, %77, %72
  %.pn35.pn.pn = phi { ptr, i32 } [ %105, %104 ], [ %.pn33, %77 ], [ %.pn, %72 ], [ %79, %78 ], [ %98, %97 ], [ %96, %95 ], [ %94, %93 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  br label %107

107:                                              ; preds = %106, %66
  %.pn35.pn.pn.pn = phi { ptr, i32 } [ %.pn35.pn.pn, %106 ], [ %67, %66 ]
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %14) #7
  br label %108

108:                                              ; preds = %107, %64
  %.pn35.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn35.pn.pn.pn, %107 ], [ %65, %64 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #7
  br label %109

109:                                              ; preds = %108, %62
  %.pn35.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn35.pn.pn.pn.pn, %108 ], [ %63, %62 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #7
  br label %110

110:                                              ; preds = %109, %60
  %.pn35.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn35.pn.pn.pn.pn.pn, %109 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #7
  br label %111

111:                                              ; preds = %110, %58
  %.pn35.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn35.pn.pn.pn.pn.pn.pn, %110 ], [ %59, %58 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #7
  br label %112

112:                                              ; preds = %111, %56
  %.pn35.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn35.pn.pn.pn.pn.pn.pn.pn, %111 ], [ %57, %56 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #7
  call void @_ZN5ModelD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %2) #7
  br label %113

113:                                              ; preds = %112, %54
  %.pn35.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn35.pn.pn.pn.pn.pn.pn.pn.pn, %112 ], [ %55, %54 ]
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %2) #7
  call void @_ZN10RenderHelpD2Ev(ptr noundef nonnull align 8 dereferenceable(824) %1) #7
  call void @llvm.lifetime.end.p0(i64 824, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn35.pn.pn.pn.pn.pn.pn.pn.pn.pn
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10RenderHelpC2Eii(ptr noundef nonnull align 8 dereferenceable(824), i32 noundef, i32 noundef) unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6VectorILm3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZL16matrix_set_scalefff(ptr dead_on_unwind noalias writable sret(%struct.Matrix) align 4, float noundef, float noundef, float noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZL17matrix_set_lookatRK6VectorILm3EfES2_S2_(ptr dead_on_unwind noalias writable sret(%struct.Matrix) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZL22matrix_set_perspectiveffff(ptr dead_on_unwind noalias writable sret(%struct.Matrix) align 4, float noundef, float noundef, float noundef, float noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZmlILm4ELm4ELm4EfE6MatrixIXT_EXT1_ET2_ERKS0_IXT_EXT0_ES1_ERKS0_IXT0_EXT1_ES1_E(ptr dead_on_unwind noalias writable sret(%struct.Matrix) align 4, ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(64)) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z13matrix_invertILm4EfE6MatrixIXT_EXT_ET0_ERKS2_(ptr dead_on_unwind noalias writable sret(%struct.Matrix) align 4, ptr noundef nonnull align 4 dereferenceable(64)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK6MatrixILm4ELm4EfE9TransposeEv(ptr dead_on_unwind noalias writable sret(%struct.Matrix) align 4, ptr noundef nonnull align 4 dereferenceable(64)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZZ4mainEN3$_2C2Ev"(ptr noundef nonnull align 4 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10RenderHelp15SetVertexShaderESt8functionIF6VectorILm4EfEiR13ShaderContextEE(ptr noundef nonnull align 8 dereferenceable(824), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt8functionIF6VectorILm4EfEiR13ShaderContextEEC2IZ4mainE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10RenderHelp14SetPixelShaderESt8functionIF6VectorILm4EfER13ShaderContextEE(ptr noundef nonnull align 8 dereferenceable(824), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt8functionIF6VectorILm4EfER13ShaderContextEEC2IZ4mainE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5Model6nfacesEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Model4vertEii(ptr dead_on_unwind noalias writable sret(%struct.Vector.39) align 4, ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Model2uvEii(ptr dead_on_unwind noalias writable sret(%struct.Vector.16) align 4, ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Model6normalEii(ptr dead_on_unwind noalias writable sret(%struct.Vector.39) align 4, ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10RenderHelp8SaveFileEPKc(ptr noundef nonnull align 8 dereferenceable(824), ptr noundef) local_unnamed_addr #2 align 2

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

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

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


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