; LLVM IR from skywind3000/RenderHelp :: sample_02_texture (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.Bitmap = type { ptr, i32, i32, i32, ptr }
%struct.Matrix = type { [4 x [4 x float]] }
%struct.Vector.26 = type { %union.anon.27 }
%union.anon.27 = type { %struct.anon.28 }
%struct.anon.28 = type { float, float, float }
%struct.VertexAttrib = type { %struct.Vector, %struct.Vector.16 }
%class.anon = type { ptr, ptr, ptr }
%class.anon.30 = type { ptr, ptr }

@.str = 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.Bitmap, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %struct.Matrix, align 4
  %11 = alloca %struct.Matrix, align 4
  %12 = alloca %struct.Vector.26, align 4
  %13 = alloca %struct.Vector.26, align 4
  %14 = alloca %struct.Vector.26, 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.VertexAttrib], 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.30, align 8
  %24 = alloca [4 x %struct.VertexAttrib], align 16
  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 800, i32 noundef 600)
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #7
  invoke void @_ZN6BitmapC2Eii(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef 256, i32 noundef 256)
          to label %25 unwind label %30

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

26:                                               ; preds = %61, %25
  %27 = load i32, ptr %6, align 4, !tbaa !5
  %28 = icmp slt i32 %27, 256
  br i1 %28, label %34, label %29

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

30:                                               ; preds = %0
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %4, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %5, align 4
  br label %180

34:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %53, %34
  %36 = load i32, ptr %8, align 4, !tbaa !5
  %37 = icmp slt i32 %36, 256
  br i1 %37, label %39, label %38

38:                                               ; preds = %35
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %60

39:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %40 = load i32, ptr %8, align 4, !tbaa !5
  %41 = sdiv i32 %40, 32
  %42 = load i32, ptr %6, align 4, !tbaa !5
  %43 = sdiv i32 %42, 32
  %44 = add nsw i32 %41, %43
  %45 = and i32 %44, 1
  store i32 %45, ptr %9, align 4, !tbaa !5
  %46 = load i32, ptr %8, align 4, !tbaa !5
  %47 = load i32, ptr %6, align 4, !tbaa !5
  %48 = load i32, ptr %9, align 4, !tbaa !5
  %49 = icmp ne i32 %48, 0
  %50 = zext i1 %49 to i64
  %51 = select i1 %49, i32 -1, i32 -12600081
  invoke void @_ZN6Bitmap8SetPixelEiij(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %46, i32 noundef %47, i32 noundef %51)
          to label %52 unwind label %56

52:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %53

53:                                               ; preds = %52
  %54 = load i32, ptr %8, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %8, align 4, !tbaa !5
  br label %35, !llvm.loop !9

56:                                               ; preds = %39
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %4, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %179

60:                                               ; preds = %38
  br label %61

61:                                               ; preds = %60
  %62 = load i32, ptr %6, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %6, align 4, !tbaa !5
  br label %26, !llvm.loop !11

64:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 64, ptr %10) #7
  invoke void @_ZL19matrix_set_identityv(ptr dead_on_unwind writable sret(%struct.Matrix) align 4 %10)
          to label %65 unwind label %126

65:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 64, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #7
  invoke void @_ZN6VectorILm3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %12, float noundef 0xBFE6666660000000, float noundef 0.000000e+00, float noundef 1.500000e+00)
          to label %66 unwind label %130

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

67:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #7
  invoke void @_ZN6VectorILm3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %14, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
          to label %68 unwind label %138

68:                                               ; preds = %67
  invoke void @_ZL17matrix_set_lookatRK6VectorILm3EfES2_S2_(ptr dead_on_unwind writable sret(%struct.Matrix) align 4 %11, ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(12) %14)
          to label %69 unwind label %138

69:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr %15) #7
  invoke void @_ZL22matrix_set_perspectiveffff(ptr dead_on_unwind writable sret(%struct.Matrix) align 4 %15, float noundef 0x3FF921FB40000000, float noundef 0x3FF5555560000000, float noundef 1.000000e+00, float noundef 5.000000e+02)
          to label %70 unwind label %144

70:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 64, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr %17) #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 %17, ptr noundef nonnull align 4 dereferenceable(64) %10, ptr noundef nonnull align 4 dereferenceable(64) %11)
          to label %71 unwind label %148

71:                                               ; preds = %70
  invoke void @_ZmlILm4ELm4ELm4EfE6MatrixIXT_EXT1_ET2_ERKS0_IXT_EXT0_ES1_ERKS0_IXT0_EXT1_ES1_E(ptr dead_on_unwind writable sret(%struct.Matrix) align 4 %16, ptr noundef nonnull align 4 dereferenceable(64) %17, ptr noundef nonnull align 4 dereferenceable(64) %15)
          to label %72 unwind label %148

72:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 64, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 72, ptr %18) #7
  %73 = getelementptr inbounds [3 x %struct.VertexAttrib], ptr %18, i32 0, i32 0
  %74 = getelementptr inbounds %struct.VertexAttrib, ptr %73, i64 3
  br label %75

75:                                               ; preds = %77, %72
  %76 = phi ptr [ %73, %72 ], [ %78, %77 ]
  invoke void @_ZZ4mainEN12VertexAttribC2Ev(ptr noundef nonnull align 4 dereferenceable(24) %76)
          to label %77 unwind label %152

77:                                               ; preds = %75
  %78 = getelementptr inbounds %struct.VertexAttrib, ptr %76, i64 1
  %79 = icmp eq ptr %78, %74
  br i1 %79, label %80, label %75

80:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #7
  %81 = getelementptr inbounds %class.anon, ptr %21, i32 0, i32 0
  store ptr %18, ptr %81, align 8, !tbaa !12
  %82 = getelementptr inbounds %class.anon, ptr %21, i32 0, i32 1
  store ptr %16, ptr %82, align 8, !tbaa !12
  %83 = getelementptr inbounds %class.anon, ptr %21, i32 0, i32 2
  store ptr %19, ptr %83, align 8, !tbaa !12
  invoke void @"_ZNSt8functionIF6VectorILm4EfEiR13ShaderContextEEC2IZ4mainE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(24) %21)
          to label %84 unwind label %156

84:                                               ; preds = %80
  invoke void @_ZN10RenderHelp15SetVertexShaderESt8functionIF6VectorILm4EfEiR13ShaderContextEE(ptr noundef nonnull align 8 dereferenceable(824) %2, ptr noundef %20)
          to label %85 unwind label %160

85:                                               ; preds = %84
  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 16, ptr %23) #7
  %86 = getelementptr inbounds %class.anon.30, ptr %23, i32 0, i32 0
  store ptr %19, ptr %86, align 8, !tbaa !12
  %87 = getelementptr inbounds %class.anon.30, ptr %23, i32 0, i32 1
  store ptr %3, ptr %87, align 8, !tbaa !12
  call void @"_ZNSt8functionIF6VectorILm4EfER13ShaderContextEEC2IZ4mainE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull align 8 dereferenceable(16) %23) #7
  invoke void @_ZN10RenderHelp14SetPixelShaderESt8functionIF6VectorILm4EfER13ShaderContextEE(ptr noundef nonnull align 8 dereferenceable(824) %2, ptr noundef %22)
          to label %88 unwind label %165

88:                                               ; preds = %85
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 96, ptr %24) #7
  %89 = getelementptr inbounds %struct.VertexAttrib, ptr %24, i32 0, i32 0
  invoke void @_ZN6VectorILm4EfEC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %89, float noundef 1.000000e+00, float noundef -1.000000e+00, float noundef -1.000000e+00, float noundef 1.000000e+00)
          to label %90 unwind label %169

90:                                               ; preds = %88
  %91 = getelementptr inbounds %struct.VertexAttrib, ptr %24, i32 0, i32 1
  invoke void @_ZN6VectorILm2EfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %91, float noundef 0.000000e+00, float noundef 0.000000e+00)
          to label %92 unwind label %169

92:                                               ; preds = %90
  %93 = getelementptr inbounds %struct.VertexAttrib, ptr %24, i64 1
  %94 = getelementptr inbounds %struct.VertexAttrib, ptr %93, i32 0, i32 0
  invoke void @_ZN6VectorILm4EfEC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %94, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef -1.000000e+00, float noundef 1.000000e+00)
          to label %95 unwind label %169

95:                                               ; preds = %92
  %96 = getelementptr inbounds %struct.VertexAttrib, ptr %93, i32 0, i32 1
  invoke void @_ZN6VectorILm2EfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %96, float noundef 1.000000e+00, float noundef 0.000000e+00)
          to label %97 unwind label %169

97:                                               ; preds = %95
  %98 = getelementptr inbounds %struct.VertexAttrib, ptr %24, i64 2
  %99 = getelementptr inbounds %struct.VertexAttrib, ptr %98, i32 0, i32 0
  invoke void @_ZN6VectorILm4EfEC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %99, float noundef -1.000000e+00, float noundef 1.000000e+00, float noundef -1.000000e+00, float noundef 1.000000e+00)
          to label %100 unwind label %169

100:                                              ; preds = %97
  %101 = getelementptr inbounds %struct.VertexAttrib, ptr %98, i32 0, i32 1
  invoke void @_ZN6VectorILm2EfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %101, float noundef 1.000000e+00, float noundef 1.000000e+00)
          to label %102 unwind label %169

102:                                              ; preds = %100
  %103 = getelementptr inbounds %struct.VertexAttrib, ptr %24, i64 3
  %104 = getelementptr inbounds %struct.VertexAttrib, ptr %103, i32 0, i32 0
  invoke void @_ZN6VectorILm4EfEC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %104, float noundef -1.000000e+00, float noundef -1.000000e+00, float noundef -1.000000e+00, float noundef 1.000000e+00)
          to label %105 unwind label %169

105:                                              ; preds = %102
  %106 = getelementptr inbounds %struct.VertexAttrib, ptr %103, i32 0, i32 1
  invoke void @_ZN6VectorILm2EfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %106, float noundef 0.000000e+00, float noundef 1.000000e+00)
          to label %107 unwind label %169

107:                                              ; preds = %105
  %108 = getelementptr inbounds [4 x %struct.VertexAttrib], ptr %24, i64 0, i64 0
  %109 = getelementptr inbounds [3 x %struct.VertexAttrib], ptr %18, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %109, ptr align 16 %108, i64 24, i1 false), !tbaa.struct !14
  %110 = getelementptr inbounds [4 x %struct.VertexAttrib], ptr %24, i64 0, i64 1
  %111 = getelementptr inbounds [3 x %struct.VertexAttrib], ptr %18, i64 0, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %111, ptr align 8 %110, i64 24, i1 false), !tbaa.struct !14
  %112 = getelementptr inbounds [4 x %struct.VertexAttrib], ptr %24, i64 0, i64 2
  %113 = getelementptr inbounds [3 x %struct.VertexAttrib], ptr %18, i64 0, i64 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %113, ptr align 16 %112, i64 24, i1 false), !tbaa.struct !14
  %114 = invoke noundef zeroext i1 @_ZN10RenderHelp13DrawPrimitiveEv(ptr noundef nonnull align 8 dereferenceable(824) %2)
          to label %115 unwind label %169

115:                                              ; preds = %107
  %116 = getelementptr inbounds [4 x %struct.VertexAttrib], ptr %24, i64 0, i64 2
  %117 = getelementptr inbounds [3 x %struct.VertexAttrib], ptr %18, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %117, ptr align 16 %116, i64 24, i1 false), !tbaa.struct !14
  %118 = getelementptr inbounds [4 x %struct.VertexAttrib], ptr %24, i64 0, i64 3
  %119 = getelementptr inbounds [3 x %struct.VertexAttrib], ptr %18, i64 0, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %119, ptr align 8 %118, i64 24, i1 false), !tbaa.struct !14
  %120 = getelementptr inbounds [4 x %struct.VertexAttrib], ptr %24, i64 0, i64 0
  %121 = getelementptr inbounds [3 x %struct.VertexAttrib], ptr %18, i64 0, i64 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %121, ptr align 16 %120, i64 24, i1 false), !tbaa.struct !14
  %122 = invoke noundef zeroext i1 @_ZN10RenderHelp13DrawPrimitiveEv(ptr noundef nonnull align 8 dereferenceable(824) %2)
          to label %123 unwind label %169

123:                                              ; preds = %115
  invoke void @_ZN10RenderHelp8SaveFileEPKc(ptr noundef nonnull align 8 dereferenceable(824) %2, ptr noundef @.str)
          to label %124 unwind label %169

124:                                              ; preds = %123
  store i32 0, ptr %1, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 96, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #7
  call void @_ZN6BitmapD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, 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
  %125 = load i32, ptr %1, align 4
  ret i32 %125

126:                                              ; preds = %64
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %4, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %5, align 4
  br label %178

130:                                              ; preds = %65
  %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 %143

134:                                              ; preds = %66
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %4, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %5, align 4
  br label %142

138:                                              ; preds = %68, %67
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %4, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #7
  br label %142

142:                                              ; preds = %138, %134
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #7
  br label %143

143:                                              ; preds = %142, %130
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #7
  br label %177

144:                                              ; preds = %69
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %4, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %5, align 4
  br label %176

148:                                              ; preds = %71, %70
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %4, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 64, ptr %17) #7
  br label %175

152:                                              ; preds = %75
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %4, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %5, align 4
  br label %174

156:                                              ; preds = %80
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %4, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %5, align 4
  br label %164

160:                                              ; preds = %84
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %4, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %5, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #7
  br label %164

164:                                              ; preds = %160, %156
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #7
  br label %173

165:                                              ; preds = %85
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %4, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %5, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #7
  br label %173

169:                                              ; preds = %123, %115, %107, %105, %102, %100, %97, %95, %92, %90, %88
  %170 = landingpad { ptr, i32 }
          cleanup
  %171 = extractvalue { ptr, i32 } %170, 0
  store ptr %171, ptr %4, align 8
  %172 = extractvalue { ptr, i32 } %170, 1
  store i32 %172, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 96, ptr %24) #7
  br label %173

173:                                              ; preds = %169, %165, %164
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %174

174:                                              ; preds = %173, %152
  call void @llvm.lifetime.end.p0(i64 72, ptr %18) #7
  br label %175

175:                                              ; preds = %174, %148
  call void @llvm.lifetime.end.p0(i64 64, ptr %16) #7
  br label %176

176:                                              ; preds = %175, %144
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #7
  br label %177

177:                                              ; preds = %176, %143
  call void @llvm.lifetime.end.p0(i64 64, ptr %11) #7
  br label %178

178:                                              ; preds = %177, %126
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #7
  br label %179

179:                                              ; preds = %178, %56
  call void @_ZN6BitmapD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  br label %180

180:                                              ; preds = %179, %30
  call void @llvm.lifetime.end.p0(i64 32, 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 %181

181:                                              ; preds = %180
  %182 = load ptr, ptr %4, align 8
  %183 = load i32, ptr %5, align 4
  %184 = insertvalue { ptr, i32 } poison, ptr %182, 0
  %185 = insertvalue { ptr, i32 } %184, i32 %183, 1
  resume { ptr, i32 } %185
}

; 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 @_ZN6BitmapC2Eii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6Bitmap8SetPixelEiij(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, i32 noundef) #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZL19matrix_set_identityv(ptr dead_on_unwind noalias writable sret(%struct.Matrix) align 4) #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 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 @_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: inlinehint mustprogress uwtable
declare hidden void @_ZZ4mainEN12VertexAttribC2Ev(ptr noundef nonnull align 4 dereferenceable(24)) 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 nounwind uwtable
declare hidden void @"_ZNSt8functionIF6VectorILm4EfER13ShaderContextEEC2IZ4mainE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5 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 void @_ZN6VectorILm4EfEC2Effff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef, float noundef, float noundef) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6VectorILm2EfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #3 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 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 @_ZN6BitmapD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{i64 0, i64 16, !15, i64 16, i64 8, !15}
!15 = !{!7, !7, i64 0}


; 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.Bitmap = type { ptr, i32, i32, i32, ptr }
%struct.Matrix = type { [4 x [4 x float]] }
%struct.Vector.26 = type { %union.anon.27 }
%union.anon.27 = type { %struct.anon.28 }
%struct.anon.28 = type { float, float, float }
%struct.VertexAttrib = type { %struct.Vector, %struct.Vector.16 }
%class.anon = type { ptr, ptr, ptr }
%class.anon.30 = type { ptr, ptr }

@.str = 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.Bitmap, align 8
  %3 = alloca %struct.Matrix, align 4
  %4 = alloca %struct.Matrix, align 4
  %5 = alloca %struct.Vector.26, align 4
  %6 = alloca %struct.Vector.26, align 4
  %7 = alloca %struct.Vector.26, align 4
  %8 = alloca %struct.Matrix, align 4
  %9 = alloca %struct.Matrix, align 4
  %10 = alloca %struct.Matrix, align 4
  %11 = alloca [3 x %struct.VertexAttrib], align 16
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::function", align 8
  %14 = alloca %class.anon, align 8
  %15 = alloca %"class.std::function.24", align 8
  %16 = alloca %class.anon.30, align 8
  %17 = alloca [4 x %struct.VertexAttrib], align 16
  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 800, i32 noundef 600)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #7
  invoke void @_ZN6BitmapC2Eii(ptr noundef nonnull align 8 dereferenceable(32) %2, i32 noundef 256, i32 noundef 256)
          to label %.preheader unwind label %20

.preheader:                                       ; preds = %0, %22
  %.01134 = phi i32 [ %23, %22 ], [ 0, %0 ]
  %18 = lshr i32 %.01134, 5
  br label %24

19:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #7
  invoke void @_ZL19matrix_set_identityv(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 4 %3)
          to label %30 unwind label %56

20:                                               ; preds = %0
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %81

22:                                               ; preds = %24
  %23 = add nuw nsw i32 %.01134, 1
  %exitcond35.not = icmp eq i32 %23, 256
  br i1 %exitcond35.not, label %19, label %.preheader, !llvm.loop !5

24:                                               ; preds = %.preheader, %24
  %.033 = phi i32 [ 0, %.preheader ], [ %29, %24 ]
  %25 = lshr i32 %.033, 5
  %26 = add nuw nsw i32 %25, %18
  %27 = and i32 %26, 1
  %.not = icmp eq i32 %27, 0
  %28 = select i1 %.not, i32 -12600081, i32 -1
  call void @_ZN6Bitmap8SetPixelEiij(ptr noundef nonnull align 8 dereferenceable(32) %2, i32 noundef %.033, i32 noundef %.01134, i32 noundef %28)
  %29 = add nuw nsw i32 %.033, 1
  %exitcond.not = icmp eq i32 %29, 256
  br i1 %exitcond.not, label %22, label %24, !llvm.loop !7

30:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %4) #7
  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 0xBFE6666660000000, float noundef 0.000000e+00, float noundef 1.500000e+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 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #7
  call void @_ZN6VectorILm3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %7, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
  invoke void @_ZL17matrix_set_lookatRK6VectorILm3EfES2_S2_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 4 %4, ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(12) %7)
          to label %31 unwind label %58

31:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 12, 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.start.p0(i64 64, ptr nonnull %8) #7
  invoke void @_ZL22matrix_set_perspectiveffff(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 4 %8, float noundef 0x3FF921FB40000000, float noundef 0x3FF5555560000000, float noundef 1.000000e+00, float noundef 5.000000e+02)
          to label %32 unwind label %60

32:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #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 %10, ptr noundef nonnull align 4 dereferenceable(64) %3, ptr noundef nonnull align 4 dereferenceable(64) %4)
          to label %33 unwind label %62

33:                                               ; preds = %32
  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 %9, ptr noundef nonnull align 4 dereferenceable(64) %10, ptr noundef nonnull align 4 dereferenceable(64) %8)
          to label %34 unwind label %62

34:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %11) #7
  invoke void @_ZZ4mainEN12VertexAttribC2Ev(ptr noundef nonnull align 4 dereferenceable(24) %11)
          to label %35 unwind label %64

35:                                               ; preds = %34
  %.ptr.1 = getelementptr inbounds i8, ptr %11, i64 24
  invoke void @_ZZ4mainEN12VertexAttribC2Ev(ptr noundef nonnull align 4 dereferenceable(24) %.ptr.1)
          to label %36 unwind label %64

36:                                               ; preds = %35
  %.ptr.2 = getelementptr inbounds i8, ptr %11, i64 48
  invoke void @_ZZ4mainEN12VertexAttribC2Ev(ptr noundef nonnull align 4 dereferenceable(24) %.ptr.2)
          to label %37 unwind label %64

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

40:                                               ; preds = %37
  invoke void @_ZN10RenderHelp15SetVertexShaderESt8functionIF6VectorILm4EfEiR13ShaderContextEE(ptr noundef nonnull align 8 dereferenceable(824) %1, ptr noundef nonnull %13)
          to label %41 unwind label %68

41:                                               ; preds = %40
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #7
  store ptr %12, ptr %16, align 8, !tbaa !12
  %42 = getelementptr inbounds i8, ptr %16, i64 8
  store ptr %2, ptr %42, align 8, !tbaa !12
  call void @"_ZNSt8functionIF6VectorILm4EfER13ShaderContextEEC2IZ4mainE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(16) %16) #7
  invoke void @_ZN10RenderHelp14SetPixelShaderESt8functionIF6VectorILm4EfER13ShaderContextEE(ptr noundef nonnull align 8 dereferenceable(824) %1, ptr noundef nonnull %15)
          to label %43 unwind label %71

43:                                               ; preds = %41
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %17) #7
  call void @_ZN6VectorILm4EfEC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %17, float noundef 1.000000e+00, float noundef -1.000000e+00, float noundef -1.000000e+00, float noundef 1.000000e+00)
  %44 = getelementptr inbounds i8, ptr %17, i64 16
  call void @_ZN6VectorILm2EfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %44, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %45 = getelementptr inbounds i8, ptr %17, i64 24
  call void @_ZN6VectorILm4EfEC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %45, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef -1.000000e+00, float noundef 1.000000e+00)
  %46 = getelementptr inbounds i8, ptr %17, i64 40
  call void @_ZN6VectorILm2EfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %46, float noundef 1.000000e+00, float noundef 0.000000e+00)
  %47 = getelementptr inbounds i8, ptr %17, i64 48
  call void @_ZN6VectorILm4EfEC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %47, float noundef -1.000000e+00, float noundef 1.000000e+00, float noundef -1.000000e+00, float noundef 1.000000e+00)
  %48 = getelementptr inbounds i8, ptr %17, i64 64
  call void @_ZN6VectorILm2EfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %48, float noundef 1.000000e+00, float noundef 1.000000e+00)
  %49 = getelementptr inbounds i8, ptr %17, i64 72
  call void @_ZN6VectorILm4EfEC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %49, float noundef -1.000000e+00, float noundef -1.000000e+00, float noundef -1.000000e+00, float noundef 1.000000e+00)
  %50 = getelementptr inbounds i8, ptr %17, i64 88
  call void @_ZN6VectorILm2EfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %50, float noundef 0.000000e+00, float noundef 1.000000e+00)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %11, ptr noundef nonnull align 16 dereferenceable(24) %17, i64 24, i1 false), !tbaa.struct !14
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1, ptr noundef nonnull align 8 dereferenceable(24) %45, i64 24, i1 false), !tbaa.struct !14
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %.ptr.2, ptr noundef nonnull align 16 dereferenceable(24) %47, i64 24, i1 false), !tbaa.struct !14
  %51 = invoke noundef zeroext i1 @_ZN10RenderHelp13DrawPrimitiveEv(ptr noundef nonnull align 8 dereferenceable(824) %1)
          to label %52 unwind label %73

52:                                               ; preds = %43
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %11, ptr noundef nonnull align 16 dereferenceable(24) %47, i64 24, i1 false), !tbaa.struct !14
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1, ptr noundef nonnull align 8 dereferenceable(24) %49, i64 24, i1 false), !tbaa.struct !14
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %.ptr.2, ptr noundef nonnull align 16 dereferenceable(24) %17, i64 24, i1 false), !tbaa.struct !14
  %53 = invoke noundef zeroext i1 @_ZN10RenderHelp13DrawPrimitiveEv(ptr noundef nonnull align 8 dereferenceable(824) %1)
          to label %54 unwind label %73

54:                                               ; preds = %52
  invoke void @_ZN10RenderHelp8SaveFileEPKc(ptr noundef nonnull align 8 dereferenceable(824) %1, ptr noundef nonnull @.str)
          to label %55 unwind label %73

55:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %11) #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 %4) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #7
  call void @_ZN6BitmapD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, 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

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

58:                                               ; preds = %30
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, 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
  br label %79

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

62:                                               ; preds = %33, %32
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #7
  br label %77

64:                                               ; preds = %36, %35, %34
  %65 = landingpad { ptr, i32 }
          cleanup
  br label %76

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

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

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

71:                                               ; preds = %41
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  br label %75

73:                                               ; preds = %54, %52, %43
  %74 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %17) #7
  br label %75

75:                                               ; preds = %73, %71, %70
  %.pn24 = phi { ptr, i32 } [ %74, %73 ], [ %72, %71 ], [ %.pn, %70 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  br label %76

76:                                               ; preds = %75, %64
  %.pn24.pn = phi { ptr, i32 } [ %.pn24, %75 ], [ %65, %64 ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %11) #7
  br label %77

77:                                               ; preds = %76, %62
  %.pn24.pn.pn = phi { ptr, i32 } [ %.pn24.pn, %76 ], [ %63, %62 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #7
  br label %78

78:                                               ; preds = %77, %60
  %.pn24.pn.pn.pn = phi { ptr, i32 } [ %.pn24.pn.pn, %77 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #7
  br label %79

79:                                               ; preds = %78, %58
  %.pn24.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn24.pn.pn.pn, %78 ], [ %59, %58 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #7
  br label %80

80:                                               ; preds = %79, %56
  %.pn24.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn24.pn.pn.pn.pn, %79 ], [ %57, %56 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #7
  call void @_ZN6BitmapD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  br label %81

81:                                               ; preds = %80, %20
  %.pn24.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn24.pn.pn.pn.pn.pn, %80 ], [ %21, %20 ]
  call void @llvm.lifetime.end.p0(i64 32, 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 } %.pn24.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 @_ZN6BitmapC2Eii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZL19matrix_set_identityv(ptr dead_on_unwind noalias writable sret(%struct.Matrix) align 4) 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 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 @_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: inlinehint mustprogress uwtable
declare hidden void @_ZZ4mainEN12VertexAttribC2Ev(ptr noundef nonnull align 4 dereferenceable(24)) 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 nounwind uwtable
declare hidden void @"_ZNSt8functionIF6VectorILm4EfER13ShaderContextEEC2IZ4mainE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5 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 void @_ZN6VectorILm4EfEC2Effff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef, float noundef, float noundef) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6VectorILm2EfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #3 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 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 @_ZN6BitmapD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !10, i64 0}
!14 = !{i64 0, i64 16, !15, i64 16, i64 8, !15}
!15 = !{!10, !10, i64 0}


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