; LLVM IR from skywind3000/RenderHelp :: sample_04_gouraud (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.28" }
%"struct.RenderHelp::Vertex" = type <{ %struct.ShaderContext, float, %struct.Vector.20, %struct.Vector.1, %struct.Vector.24, [4 x i8] }>
%struct.ShaderContext = type { %"class.std::map", %"class.std::map.5", %"class.std::map.10", %"class.std::map.15" }
%"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.5" = type { %"class.std::_Rb_tree.6" }
%"class.std::_Rb_tree.6" = 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.10" = type { %"class.std::_Rb_tree.11" }
%"class.std::_Rb_tree.11" = 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.15" = type { %"class.std::_Rb_tree.16" }
%"class.std::_Rb_tree.16" = 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.20 = type { %union.anon.21 }
%union.anon.21 = type { %struct.anon.22 }
%struct.anon.22 = type { float, float, float, float }
%struct.Vector.1 = type { %union.anon.2 }
%union.anon.2 = type { %struct.anon.3 }
%struct.anon.3 = type { float, float }
%struct.Vector.24 = type { %union.anon.25 }
%union.anon.25 = type { %struct.anon.26 }
%struct.anon.26 = 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.28" = type { %"class.std::_Function_base", ptr }
%class.Bitmap = type { ptr, i32, i32, i32, ptr }
%struct.Matrix = type { [4 x [4 x float]] }
%struct.Vector = type { %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { float, float, float }
%class.anon = type { ptr, ptr, ptr }
%class.anon.30 = type { ptr }

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

; 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 #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z10draw_planeR10RenderHelpiiii(ptr noundef nonnull align 8 dereferenceable(824), i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 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, align 4
  %13 = alloca %struct.Vector, align 4
  %14 = alloca %struct.Vector, align 4
  %15 = alloca %struct.Matrix, align 4
  %16 = alloca %struct.Matrix, align 4
  %17 = alloca %struct.Matrix, align 4
  %18 = alloca %struct.Matrix, align 4
  %19 = alloca %struct.Matrix, align 4
  %20 = alloca %struct.Vector, align 4
  %21 = alloca %"class.std::function", align 8
  %22 = alloca %class.anon, align 8
  %23 = alloca %"class.std::function.28", align 8
  %24 = alloca %class.anon.30, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 824, ptr %2) #6
  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) #6
  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) #6
  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) #6
  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 %145

34:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  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) #6
  br label %60

39:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %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) #6
  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) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %144

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) #6
  invoke void @_ZL17matrix_set_rotateffff(ptr dead_on_unwind writable sret(%struct.Matrix) align 4 %10, float noundef -1.000000e+00, float noundef -5.000000e-01, float noundef 1.000000e+00, float noundef 1.000000e+00)
          to label %65 unwind label %91

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

66:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #6
  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 %99

67:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #6
  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 %103

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 %103

69:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %15) #6
  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 %109

70:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 64, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %17) #6
  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 %113

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 %113

72:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 64, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %19) #6
  invoke void @_Z13matrix_invertILm4EfE6MatrixIXT_EXT_ET0_ERKS2_(ptr dead_on_unwind writable sret(%struct.Matrix) align 4 %19, ptr noundef nonnull align 4 dereferenceable(64) %10)
          to label %73 unwind label %117

73:                                               ; preds = %72
  invoke void @_ZNK6MatrixILm4ELm4EfE9TransposeEv(ptr dead_on_unwind writable sret(%struct.Matrix) align 4 %18, ptr noundef nonnull align 4 dereferenceable(64) %19)
          to label %74 unwind label %117

74:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 64, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #6
  invoke void @_ZN6VectorILm3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %20, float noundef 1.000000e+00, float noundef 0.000000e+00, float noundef 2.000000e+00)
          to label %75 unwind label %121

75:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #6
  %76 = getelementptr inbounds %class.anon, ptr %22, i32 0, i32 0
  store ptr %16, ptr %76, align 8, !tbaa !12
  %77 = getelementptr inbounds %class.anon, ptr %22, i32 0, i32 1
  store ptr %18, ptr %77, align 8, !tbaa !12
  %78 = getelementptr inbounds %class.anon, ptr %22, i32 0, i32 2
  store ptr %20, ptr %78, align 8, !tbaa !12
  invoke void @"_ZNSt8functionIF6VectorILm4EfEiR13ShaderContextEEC2IZ4mainE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(24) %22)
          to label %79 unwind label %125

79:                                               ; preds = %75
  invoke void @_ZN10RenderHelp15SetVertexShaderESt8functionIF6VectorILm4EfEiR13ShaderContextEE(ptr noundef nonnull align 8 dereferenceable(824) %2, ptr noundef %21)
          to label %80 unwind label %129

80:                                               ; preds = %79
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %81 = getelementptr inbounds %class.anon.30, ptr %24, i32 0, i32 0
  store ptr %3, ptr %81, align 8, !tbaa !12
  call void @"_ZNSt8functionIF6VectorILm4EfER13ShaderContextEEC2IZ4mainE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #6
  invoke void @_ZN10RenderHelp14SetPixelShaderESt8functionIF6VectorILm4EfER13ShaderContextEE(ptr noundef nonnull align 8 dereferenceable(824) %2, ptr noundef %23)
          to label %82 unwind label %134

82:                                               ; preds = %80
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  invoke void @_Z10draw_planeR10RenderHelpiiii(ptr noundef nonnull align 8 dereferenceable(824) %2, i32 noundef 0, i32 noundef 1, i32 noundef 2, i32 noundef 3)
          to label %83 unwind label %121

83:                                               ; preds = %82
  invoke void @_Z10draw_planeR10RenderHelpiiii(ptr noundef nonnull align 8 dereferenceable(824) %2, i32 noundef 7, i32 noundef 6, i32 noundef 5, i32 noundef 4)
          to label %84 unwind label %121

84:                                               ; preds = %83
  invoke void @_Z10draw_planeR10RenderHelpiiii(ptr noundef nonnull align 8 dereferenceable(824) %2, i32 noundef 0, i32 noundef 4, i32 noundef 5, i32 noundef 1)
          to label %85 unwind label %121

85:                                               ; preds = %84
  invoke void @_Z10draw_planeR10RenderHelpiiii(ptr noundef nonnull align 8 dereferenceable(824) %2, i32 noundef 1, i32 noundef 5, i32 noundef 6, i32 noundef 2)
          to label %86 unwind label %121

86:                                               ; preds = %85
  invoke void @_Z10draw_planeR10RenderHelpiiii(ptr noundef nonnull align 8 dereferenceable(824) %2, i32 noundef 2, i32 noundef 6, i32 noundef 7, i32 noundef 3)
          to label %87 unwind label %121

87:                                               ; preds = %86
  invoke void @_Z10draw_planeR10RenderHelpiiii(ptr noundef nonnull align 8 dereferenceable(824) %2, i32 noundef 3, i32 noundef 7, i32 noundef 4, i32 noundef 0)
          to label %88 unwind label %121

88:                                               ; preds = %87
  invoke void @_ZN10RenderHelp8SaveFileEPKc(ptr noundef nonnull align 8 dereferenceable(824) %2, ptr noundef @.str)
          to label %89 unwind label %121

89:                                               ; preds = %88
  store i32 0, ptr %1, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #6
  call void @_ZN6BitmapD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #6
  call void @_ZN10RenderHelpD2Ev(ptr noundef nonnull align 8 dereferenceable(824) %2) #6
  call void @llvm.lifetime.end.p0(i64 824, ptr %2) #6
  %90 = load i32, ptr %1, align 4
  ret i32 %90

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

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

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

103:                                              ; preds = %68, %67
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %4, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #6
  br label %107

107:                                              ; preds = %103, %99
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #6
  br label %108

108:                                              ; preds = %107, %95
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #6
  br label %142

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

113:                                              ; preds = %71, %70
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %4, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 64, ptr %17) #6
  br label %140

117:                                              ; preds = %73, %72
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %4, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 64, ptr %19) #6
  br label %139

121:                                              ; preds = %88, %87, %86, %85, %84, %83, %82, %74
  %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 %138

125:                                              ; preds = %75
  %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
  br label %133

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

133:                                              ; preds = %129, %125
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #6
  br label %138

134:                                              ; preds = %80
  %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
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %138

138:                                              ; preds = %134, %133, %121
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #6
  br label %139

139:                                              ; preds = %138, %117
  call void @llvm.lifetime.end.p0(i64 64, ptr %18) #6
  br label %140

140:                                              ; preds = %139, %113
  call void @llvm.lifetime.end.p0(i64 64, ptr %16) #6
  br label %141

141:                                              ; preds = %140, %109
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #6
  br label %142

142:                                              ; preds = %141, %108
  call void @llvm.lifetime.end.p0(i64 64, ptr %11) #6
  br label %143

143:                                              ; preds = %142, %91
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #6
  br label %144

144:                                              ; preds = %143, %56
  call void @_ZN6BitmapD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  br label %145

145:                                              ; preds = %144, %30
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #6
  call void @_ZN10RenderHelpD2Ev(ptr noundef nonnull align 8 dereferenceable(824) %2) #6
  call void @llvm.lifetime.end.p0(i64 824, ptr %2) #6
  br label %146

146:                                              ; preds = %145
  %147 = load ptr, ptr %4, align 8
  %148 = load i32, ptr %5, align 4
  %149 = insertvalue { ptr, i32 } poison, ptr %147, 0
  %150 = insertvalue { ptr, i32 } %149, i32 %148, 1
  resume { ptr, i32 } %150
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10RenderHelpC2Eii(ptr noundef nonnull align 8 dereferenceable(824), i32 noundef, i32 noundef) unnamed_addr #4 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 #4 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) #0 align 2

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

; 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)) #4

; 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) #4

; 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)) #4

; 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)) #4

; 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)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10RenderHelp15SetVertexShaderESt8functionIF6VectorILm4EfEiR13ShaderContextEE(ptr noundef nonnull align 8 dereferenceable(824), ptr noundef) #4 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 #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10RenderHelp14SetPixelShaderESt8functionIF6VectorILm4EfER13ShaderContextEE(ptr noundef nonnull align 8 dereferenceable(824), ptr noundef) #4 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(8)) 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 uwtable
declare dso_local void @_ZN10RenderHelp8SaveFileEPKc(ptr noundef nonnull align 8 dereferenceable(824), ptr noundef) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6BitmapD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

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

attributes #0 = { 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 #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #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 = { 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}


; 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.28" }
%"struct.RenderHelp::Vertex" = type <{ %struct.ShaderContext, float, %struct.Vector.20, %struct.Vector.1, %struct.Vector.24, [4 x i8] }>
%struct.ShaderContext = type { %"class.std::map", %"class.std::map.5", %"class.std::map.10", %"class.std::map.15" }
%"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.5" = type { %"class.std::_Rb_tree.6" }
%"class.std::_Rb_tree.6" = 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.10" = type { %"class.std::_Rb_tree.11" }
%"class.std::_Rb_tree.11" = 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.15" = type { %"class.std::_Rb_tree.16" }
%"class.std::_Rb_tree.16" = 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.20 = type { %union.anon.21 }
%union.anon.21 = type { %struct.anon.22 }
%struct.anon.22 = type { float, float, float, float }
%struct.Vector.1 = type { %union.anon.2 }
%union.anon.2 = type { %struct.anon.3 }
%struct.anon.3 = type { float, float }
%struct.Vector.24 = type { %union.anon.25 }
%union.anon.25 = type { %struct.anon.26 }
%struct.anon.26 = 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.28" = type { %"class.std::_Function_base", ptr }
%class.Bitmap = type { ptr, i32, i32, i32, ptr }
%struct.Matrix = type { [4 x [4 x float]] }
%struct.Vector = type { %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { float, float, float }
%class.anon = type { ptr, ptr, ptr }
%class.anon.30 = type { ptr }

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

; 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 #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z10draw_planeR10RenderHelpiiii(ptr noundef nonnull align 8 dereferenceable(824), i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 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, align 4
  %6 = alloca %struct.Vector, align 4
  %7 = alloca %struct.Vector, 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.Vector, align 4
  %14 = alloca %"class.std::function", align 8
  %15 = alloca %class.anon, align 8
  %16 = alloca %"class.std::function.28", align 8
  %17 = alloca %class.anon.30, align 8
  call void @llvm.lifetime.start.p0(i64 824, ptr nonnull %1) #6
  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) #6
  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
  %.01132 = phi i32 [ %23, %22 ], [ 0, %0 ]
  %18 = lshr i32 %.01132, 5
  br label %24

19:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #6
  invoke void @_ZL17matrix_set_rotateffff(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 4 %3, float noundef -1.000000e+00, float noundef -5.000000e-01, float noundef 1.000000e+00, float noundef 1.000000e+00)
          to label %30 unwind label %49

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

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

24:                                               ; preds = %.preheader, %24
  %.031 = phi i32 [ 0, %.preheader ], [ %29, %24 ]
  %25 = lshr i32 %.031, 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 %.031, i32 noundef %.01132, i32 noundef %28)
  %29 = add nuw nsw i32 %.031, 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) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #6
  call void @_ZN6VectorILm3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %5, float noundef 3.500000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #6
  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) #6
  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 %51

31:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #6
  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 %53

32:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #6
  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 %55

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 %55

34:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12) #6
  invoke void @_Z13matrix_invertILm4EfE6MatrixIXT_EXT_ET0_ERKS2_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 4 %12, ptr noundef nonnull align 4 dereferenceable(64) %3)
          to label %35 unwind label %57

35:                                               ; preds = %34
  invoke void @_ZNK6MatrixILm4ELm4EfE9TransposeEv(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 4 %11, ptr noundef nonnull align 4 dereferenceable(64) %12)
          to label %36 unwind label %57

36:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #6
  call void @_ZN6VectorILm3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %13, float noundef 1.000000e+00, float noundef 0.000000e+00, float noundef 2.000000e+00)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #6
  store ptr %9, ptr %15, align 8, !tbaa !8
  %37 = getelementptr inbounds i8, ptr %15, i64 8
  store ptr %11, ptr %37, align 8, !tbaa !8
  %38 = getelementptr inbounds i8, ptr %15, i64 16
  store ptr %13, ptr %38, align 8, !tbaa !8
  invoke void @"_ZNSt8functionIF6VectorILm4EfEiR13ShaderContextEEC2IZ4mainE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %39 unwind label %61

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

40:                                               ; preds = %39
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #6
  store ptr %2, ptr %17, align 8, !tbaa !8
  call void @"_ZNSt8functionIF6VectorILm4EfER13ShaderContextEEC2IZ4mainE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  invoke void @_ZN10RenderHelp14SetPixelShaderESt8functionIF6VectorILm4EfER13ShaderContextEE(ptr noundef nonnull align 8 dereferenceable(824) %1, ptr noundef nonnull %16)
          to label %41 unwind label %66

41:                                               ; preds = %40
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  invoke void @_Z10draw_planeR10RenderHelpiiii(ptr noundef nonnull align 8 dereferenceable(824) %1, i32 noundef 0, i32 noundef 1, i32 noundef 2, i32 noundef 3)
          to label %42 unwind label %59

42:                                               ; preds = %41
  invoke void @_Z10draw_planeR10RenderHelpiiii(ptr noundef nonnull align 8 dereferenceable(824) %1, i32 noundef 7, i32 noundef 6, i32 noundef 5, i32 noundef 4)
          to label %43 unwind label %59

43:                                               ; preds = %42
  invoke void @_Z10draw_planeR10RenderHelpiiii(ptr noundef nonnull align 8 dereferenceable(824) %1, i32 noundef 0, i32 noundef 4, i32 noundef 5, i32 noundef 1)
          to label %44 unwind label %59

44:                                               ; preds = %43
  invoke void @_Z10draw_planeR10RenderHelpiiii(ptr noundef nonnull align 8 dereferenceable(824) %1, i32 noundef 1, i32 noundef 5, i32 noundef 6, i32 noundef 2)
          to label %45 unwind label %59

45:                                               ; preds = %44
  invoke void @_Z10draw_planeR10RenderHelpiiii(ptr noundef nonnull align 8 dereferenceable(824) %1, i32 noundef 2, i32 noundef 6, i32 noundef 7, i32 noundef 3)
          to label %46 unwind label %59

46:                                               ; preds = %45
  invoke void @_Z10draw_planeR10RenderHelpiiii(ptr noundef nonnull align 8 dereferenceable(824) %1, i32 noundef 3, i32 noundef 7, i32 noundef 4, i32 noundef 0)
          to label %47 unwind label %59

47:                                               ; preds = %46
  invoke void @_ZN10RenderHelp8SaveFileEPKc(ptr noundef nonnull align 8 dereferenceable(824) %1, ptr noundef nonnull @.str)
          to label %48 unwind label %59

48:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #6
  call void @_ZN6BitmapD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #6
  call void @_ZN10RenderHelpD2Ev(ptr noundef nonnull align 8 dereferenceable(824) %1) #6
  call void @llvm.lifetime.end.p0(i64 824, ptr nonnull %1) #6
  ret i32 0

49:                                               ; preds = %19
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %73

51:                                               ; preds = %30
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #6
  br label %72

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

55:                                               ; preds = %33, %32
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #6
  br label %70

57:                                               ; preds = %35, %34
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #6
  br label %69

59:                                               ; preds = %47, %46, %45, %44, %43, %42, %41
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %68

61:                                               ; preds = %36
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %65

63:                                               ; preds = %39
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  br label %65

65:                                               ; preds = %63, %61
  %.pn = phi { ptr, i32 } [ %64, %63 ], [ %62, %61 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #6
  br label %68

66:                                               ; preds = %40
  %67 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  br label %68

68:                                               ; preds = %66, %65, %59
  %.pn22 = phi { ptr, i32 } [ %60, %59 ], [ %67, %66 ], [ %.pn, %65 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #6
  br label %69

69:                                               ; preds = %68, %57
  %.pn22.pn = phi { ptr, i32 } [ %.pn22, %68 ], [ %58, %57 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #6
  br label %70

70:                                               ; preds = %69, %55
  %.pn22.pn.pn = phi { ptr, i32 } [ %.pn22.pn, %69 ], [ %56, %55 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #6
  br label %71

71:                                               ; preds = %70, %53
  %.pn22.pn.pn.pn = phi { ptr, i32 } [ %.pn22.pn.pn, %70 ], [ %54, %53 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #6
  br label %72

72:                                               ; preds = %71, %51
  %.pn22.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn22.pn.pn.pn, %71 ], [ %52, %51 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #6
  br label %73

73:                                               ; preds = %72, %49
  %.pn22.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn22.pn.pn.pn.pn, %72 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #6
  call void @_ZN6BitmapD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  br label %74

74:                                               ; preds = %73, %20
  %.pn22.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn22.pn.pn.pn.pn.pn, %73 ], [ %21, %20 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #6
  call void @_ZN10RenderHelpD2Ev(ptr noundef nonnull align 8 dereferenceable(824) %1) #6
  call void @llvm.lifetime.end.p0(i64 824, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn22.pn.pn.pn.pn.pn.pn
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10RenderHelpC2Eii(ptr noundef nonnull align 8 dereferenceable(824), i32 noundef, i32 noundef) unnamed_addr #4 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 #4 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 #0 align 2

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

; 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 #4

; 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 #4

; 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 #4

; 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 #4

; 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 #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10RenderHelp15SetVertexShaderESt8functionIF6VectorILm4EfEiR13ShaderContextEE(ptr noundef nonnull align 8 dereferenceable(824), ptr noundef) local_unnamed_addr #4 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 #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10RenderHelp14SetPixelShaderESt8functionIF6VectorILm4EfER13ShaderContextEE(ptr noundef nonnull align 8 dereferenceable(824), ptr noundef) local_unnamed_addr #4 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(8)) 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 uwtable
declare dso_local void @_ZN10RenderHelp8SaveFileEPKc(ptr noundef nonnull align 8 dereferenceable(824), ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6BitmapD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

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

attributes #0 = { 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 #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #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 = { 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 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}


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