; LLVM IR from skywind3000/RenderHelp :: sample_06_normal (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 }
%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 %"class.std::function", align 8
  %21 = alloca %class.anon, align 8
  %22 = alloca %"class.std::function.24", align 8
  %23 = alloca %class.anon.44, align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca %struct.Vector.39, align 4
  %28 = alloca %struct.Vector.16, align 4
  %29 = 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 %30 unwind label %68

30:                                               ; 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 %31 unwind label %72

31:                                               ; preds = %30
  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 %32 unwind label %76

32:                                               ; preds = %31
  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 %33 unwind label %80

33:                                               ; preds = %32
  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 %34 unwind label %84

34:                                               ; preds = %33
  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 %35 unwind label %88

35:                                               ; preds = %34
  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 %36 unwind label %92

36:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 64, ptr %13) #7
  %37 = 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 %37, float noundef 7.500000e-01, float noundef 1.000000e+00, float noundef 5.000000e+02)
          to label %38 unwind label %96

38:                                               ; preds = %36
  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 %39 unwind label %100

39:                                               ; preds = %38
  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 %40 unwind label %100

40:                                               ; preds = %39
  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 %41 unwind label %104

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

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

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

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

50:                                               ; preds = %47
  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 24, ptr %21) #7
  %51 = getelementptr inbounds %class.anon, ptr %21, i32 0, i32 0
  store ptr %18, ptr %51, align 8, !tbaa !11
  %52 = getelementptr inbounds %class.anon, ptr %21, i32 0, i32 1
  store ptr %14, ptr %52, align 8, !tbaa !11
  %53 = getelementptr inbounds %class.anon, ptr %21, i32 0, i32 2
  store ptr %19, ptr %53, align 8, !tbaa !11
  invoke void @"_ZNSt8functionIF6VectorILm4EfEiR13ShaderContextEEC2IZ4mainE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(24) %21)
          to label %54 unwind label %112

54:                                               ; preds = %50
  invoke void @_ZN10RenderHelp15SetVertexShaderESt8functionIF6VectorILm4EfEiR13ShaderContextEE(ptr noundef nonnull align 8 dereferenceable(824) %2, ptr noundef %20)
          to label %55 unwind label %116

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

60:                                               ; preds = %55
  invoke void @_ZN10RenderHelp14SetPixelShaderESt8functionIF6VectorILm4EfER13ShaderContextEE(ptr noundef nonnull align 8 dereferenceable(824) %2, ptr noundef %22)
          to label %61 unwind label %125

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

62:                                               ; preds = %180, %61
  %63 = load i32, ptr %24, align 4, !tbaa !9
  %64 = invoke noundef i32 @_ZNK5Model6nfacesEv(ptr noundef nonnull align 8 dereferenceable(128) %3)
          to label %65 unwind label %130

65:                                               ; preds = %62
  %66 = icmp slt i32 %63, %64
  br i1 %66, label %134, label %67

67:                                               ; preds = %65
  store i32 2, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %184

68:                                               ; preds = %0
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %4, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %5, align 4
  br label %202

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

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

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

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

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

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

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

100:                                              ; preds = %39, %38
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %4, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #7
  br label %194

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

108:                                              ; preds = %45
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %4, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %5, align 4
  br label %192

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

116:                                              ; preds = %54
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %4, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %5, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #7
  br label %120

120:                                              ; preds = %116, %112
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #7
  br label %191

121:                                              ; preds = %55
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %4, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %5, align 4
  br label %129

125:                                              ; preds = %60
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %4, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %5, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #7
  br label %129

129:                                              ; preds = %125, %121
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #7
  br label %191

130:                                              ; preds = %177, %62
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %4, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %5, align 4
  br label %183

134:                                              ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  store i32 0, ptr %26, align 4, !tbaa !9
  br label %135

135:                                              ; preds = %161, %134
  %136 = load i32, ptr %26, align 4, !tbaa !9
  %137 = icmp slt i32 %136, 3
  br i1 %137, label %139, label %138

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

139:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 12, ptr %27) #7
  %140 = load i32, ptr %24, align 4, !tbaa !9
  %141 = load i32, ptr %26, align 4, !tbaa !9
  invoke void @_ZN5Model4vertEii(ptr dead_on_unwind writable sret(%struct.Vector.39) align 4 %27, ptr noundef nonnull align 8 dereferenceable(128) %3, i32 noundef %140, i32 noundef %141)
          to label %142 unwind label %164

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

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

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

161:                                              ; preds = %156
  %162 = load i32, ptr %26, align 4, !tbaa !9
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %26, align 4, !tbaa !9
  br label %135, !llvm.loop !16

164:                                              ; preds = %139
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %4, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %27) #7
  br label %176

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

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

176:                                              ; preds = %172, %168, %164
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %183

177:                                              ; preds = %138
  %178 = invoke noundef zeroext i1 @_ZN10RenderHelp13DrawPrimitiveEv(ptr noundef nonnull align 8 dereferenceable(824) %2)
          to label %179 unwind label %130

179:                                              ; preds = %177
  br label %180

180:                                              ; preds = %179
  %181 = load i32, ptr %24, align 4, !tbaa !9
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %24, align 4, !tbaa !9
  br label %62, !llvm.loop !18

183:                                              ; preds = %176, %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %191

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

185:                                              ; preds = %184
  store i32 0, ptr %1, align 4
  store i32 1, ptr %25, align 4
  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
  %186 = load i32, ptr %1, align 4
  ret i32 %186

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

191:                                              ; preds = %187, %183, %129, %120
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %192

192:                                              ; preds = %191, %108
  call void @llvm.lifetime.end.p0(i64 96, ptr %18) #7
  br label %193

193:                                              ; preds = %192, %104
  call void @llvm.lifetime.end.p0(i64 64, ptr %16) #7
  br label %194

194:                                              ; preds = %193, %100
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #7
  br label %195

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

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

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

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

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

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

201:                                              ; preds = %200, %72
  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 %202

202:                                              ; preds = %201, %68
  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 %203

203:                                              ; preds = %202
  %204 = load ptr, ptr %4, align 8
  %205 = load i32, ptr %5, align 4
  %206 = insertvalue { ptr, i32 } poison, ptr %204, 0
  %207 = insertvalue { ptr, i32 } %206, i32 %205, 1
  resume { ptr, i32 } %207
}

; 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(24)) 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 }
%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 %"class.std::function", align 8
  %17 = alloca %class.anon, align 8
  %18 = alloca %"class.std::function.24", align 8
  %19 = alloca %class.anon.44, align 8
  %20 = alloca %struct.Vector.39, align 4
  %21 = alloca %struct.Vector.16, align 8
  %22 = 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 %23 unwind label %51

23:                                               ; 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 %24 unwind label %53

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

25:                                               ; preds = %24
  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 %26 unwind label %57

26:                                               ; preds = %25
  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 %27 unwind label %59

27:                                               ; preds = %26
  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 %28 unwind label %59

28:                                               ; preds = %27
  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 %29 unwind label %61

29:                                               ; preds = %28
  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 %30 unwind label %61

30:                                               ; preds = %29
  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 %31 unwind label %63

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

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

33:                                               ; preds = %32
  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 24, ptr nonnull %17) #7
  store ptr %14, ptr %17, align 8, !tbaa !9
  %34 = getelementptr inbounds i8, ptr %17, i64 8
  store ptr %10, ptr %34, align 8, !tbaa !9
  %35 = getelementptr inbounds i8, ptr %17, i64 16
  store ptr %15, ptr %35, align 8, !tbaa !9
  invoke void @"_ZNSt8functionIF6VectorILm4EfEiR13ShaderContextEEC2IZ4mainE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(24) %17)
          to label %36 unwind label %65

36:                                               ; preds = %33
  invoke void @_ZN10RenderHelp15SetVertexShaderESt8functionIF6VectorILm4EfEiR13ShaderContextEE(ptr noundef nonnull align 8 dereferenceable(824) %1, ptr noundef nonnull %16)
          to label %37 unwind label %67

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

41:                                               ; preds = %37
  invoke void @_ZN10RenderHelp14SetPixelShaderESt8functionIF6VectorILm4EfER13ShaderContextEE(ptr noundef nonnull align 8 dereferenceable(824) %1, ptr noundef nonnull %18)
          to label %42 unwind label %72

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

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

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

._crit_edge:                                      ; preds = %96, %42
  invoke void @_ZN10RenderHelp8SaveFileEPKc(ptr noundef nonnull align 8 dereferenceable(824) %1, ptr noundef nonnull @.str.1)
          to label %100 unwind label %101

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

53:                                               ; preds = %23
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %109

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

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

59:                                               ; preds = %27, %26
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #7
  br label %106

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

63:                                               ; preds = %32, %31, %30
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %104

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

67:                                               ; preds = %36
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  br label %69

69:                                               ; preds = %67, %65
  %.pn = phi { ptr, i32 } [ %68, %67 ], [ %66, %65 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #7
  br label %103

70:                                               ; preds = %37
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %74

72:                                               ; preds = %41
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  br label %74

74:                                               ; preds = %72, %70
  %.pn33 = phi { ptr, i32 } [ %73, %72 ], [ %71, %70 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #7
  br label %103

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

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

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

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

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

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

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

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

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

88:                                               ; preds = %86
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %50, ptr noundef nonnull align 4 dereferenceable(12) %22, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %22) #7
  %89 = invoke noundef zeroext i1 @_ZN10RenderHelp13DrawPrimitiveEv(ptr noundef nonnull align 8 dereferenceable(824) %1)
          to label %96 unwind label %75

90:                                               ; preds = %84, %80, %.preheader
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #7
  br label %103

92:                                               ; preds = %85, %81, %77
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #7
  br label %103

94:                                               ; preds = %86, %82, %78
  %95 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %22) #7
  br label %103

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

100:                                              ; preds = %._crit_edge
  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

101:                                              ; preds = %._crit_edge
  %102 = landingpad { ptr, i32 }
          cleanup
  br label %103

103:                                              ; preds = %75, %94, %92, %90, %101, %74, %69
  %.pn35.pn.pn = phi { ptr, i32 } [ %102, %101 ], [ %.pn33, %74 ], [ %.pn, %69 ], [ %76, %75 ], [ %95, %94 ], [ %93, %92 ], [ %91, %90 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  br label %104

104:                                              ; preds = %103, %63
  %.pn35.pn.pn.pn = phi { ptr, i32 } [ %.pn35.pn.pn, %103 ], [ %64, %63 ]
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %14) #7
  br label %105

105:                                              ; preds = %104, %61
  %.pn35.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn35.pn.pn.pn, %104 ], [ %62, %61 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #7
  br label %106

106:                                              ; preds = %105, %59
  %.pn35.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn35.pn.pn.pn.pn, %105 ], [ %60, %59 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #7
  br label %107

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

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

109:                                              ; preds = %108, %53
  %.pn35.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn35.pn.pn.pn.pn.pn.pn.pn, %108 ], [ %54, %53 ]
  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 %110

110:                                              ; preds = %109, %51
  %.pn35.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn35.pn.pn.pn.pn.pn.pn.pn.pn, %109 ], [ %52, %51 ]
  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(24)) 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