; LLVM IR from Phoenix15049/Absolute :: Main (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.Shader = type { i32 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%class.Quad = type { %class.Buffer, %class.Texture, %"struct.glm::mat", %"struct.glm::mat.4", %"struct.glm::vec.5", float, %"struct.glm::vec.5", %"struct.glm::vec.5", %"struct.glm::vec.5" }
%class.Buffer = type { i8, i32, i32, i32, i32, i32, i32, i32 }
%class.Texture = type { i32 }
%"struct.glm::mat" = type { [4 x %"struct.glm::vec"] }
%"struct.glm::vec" = type { %union.anon.0, %union.anon.1, %union.anon.2, %union.anon.3 }
%union.anon.0 = type { float }
%union.anon.1 = type { float }
%union.anon.2 = type { float }
%union.anon.3 = type { float }
%"struct.glm::mat.4" = type { [3 x %"struct.glm::vec.5"] }
%"struct.glm::vec.5" = type { %union.anon.6, %union.anon.7, %union.anon.8 }
%union.anon.6 = type { float }
%union.anon.7 = type { float }
%union.anon.8 = type { float }
%class.Cube = type { %class.Buffer, %class.Texture, %"struct.glm::mat", %"struct.glm::mat.4", %"struct.glm::vec.5", %"struct.glm::vec.5", float, %"struct.glm::vec.5", %"struct.glm::vec.5", %"struct.glm::vec.5" }
%class.Model = type <{ %"class.std::vector", %"class.std::vector.12", %"class.std::vector.17", %"struct.glm::mat", %"struct.glm::mat.4", %"struct.glm::vec.5", %"struct.glm::vec.5", float, %"struct.glm::vec.5", %"struct.glm::vec.5", %"struct.glm::vec.5", [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Mesh, std::allocator<Mesh>>::_Vector_impl" }
%"struct.std::_Vector_base<Mesh, std::allocator<Mesh>>::_Vector_impl" = type { %"struct.std::_Vector_base<Mesh, std::allocator<Mesh>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Mesh, std::allocator<Mesh>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.12" = type { %"struct.std::_Vector_base.13" }
%"struct.std::_Vector_base.13" = type { %"struct.std::_Vector_base<Buffer, std::allocator<Buffer>>::_Vector_impl" }
%"struct.std::_Vector_base<Buffer, std::allocator<Buffer>>::_Vector_impl" = type { %"struct.std::_Vector_base<Buffer, std::allocator<Buffer>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Buffer, std::allocator<Buffer>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = type { %"struct.std::_Vector_base<Material, std::allocator<Material>>::_Vector_impl" }
%"struct.std::_Vector_base<Material, std::allocator<Material>>::_Vector_impl" = type { %"struct.std::_Vector_base<Material, std::allocator<Material>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Material, std::allocator<Material>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.Camera = type { %"struct.glm::mat", %"struct.glm::mat", %"struct.glm::vec.5", %"struct.glm::vec.5", %"struct.glm::vec.5" }
%class.Light = type { %class.Buffer, %"struct.glm::mat", %"struct.glm::vec.5", %"struct.glm::vec.5", %"struct.glm::vec.5", %"struct.glm::vec.5" }

@isAppRunning = external dso_local global i8, align 1
@.str = external hidden unnamed_addr constant [18 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %class.Shader, align 4
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca %class.Quad, align 4
  %16 = alloca %class.Cube, align 4
  %17 = alloca %class.Model, align 8
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::allocator", align 1
  %20 = alloca %class.Camera, align 4
  %21 = alloca %class.Light, align 4
  %22 = alloca i8, align 1
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  %23 = call noundef ptr @_ZN6Screen8InstanceEv()
  %24 = call noundef zeroext i1 @_ZN6Screen10InitializeEv(ptr noundef nonnull align 8 dereferenceable(16) %23)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  call void @_ZN6ShaderC1Ev(ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %25 unwind label %69

25:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %26 unwind label %73

26:                                               ; preds = %25
  %27 = invoke noundef zeroext i1 @_ZN6Shader6CreateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %28 unwind label %77

28:                                               ; preds = %26
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #7
  invoke void @_ZN6Shader3UseEv(ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %29 unwind label %83

29:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store float 0.000000e+00, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store float 0.000000e+00, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 188, ptr %15) #7
  invoke void @_ZN4QuadC1Ev(ptr noundef nonnull align 4 dereferenceable(188) %15)
          to label %30 unwind label %87

30:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 200, ptr %16) #7
  invoke void @_ZN4CubeC1Ev(ptr noundef nonnull align 4 dereferenceable(200) %16)
          to label %31 unwind label %91

31:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 240, ptr %17) #7
  invoke void @_ZN5ModelC1Ev(ptr noundef nonnull align 8 dereferenceable(236) %17)
          to label %32 unwind label %95

32:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %33 unwind label %99

33:                                               ; preds = %32
  %34 = invoke noundef zeroext i1 @_ZN5Model4LoadERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(236) %17, ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %35 unwind label %103

35:                                               ; preds = %33
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 164, ptr %20) #7
  invoke void @_ZN6CameraC1Ev(ptr noundef nonnull align 4 dereferenceable(164) %20)
          to label %36 unwind label %108

36:                                               ; preds = %35
  invoke void @_ZN6Camera9Set3DViewEv(ptr noundef nonnull align 4 dereferenceable(164) %20)
          to label %37 unwind label %108

37:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 144, ptr %21) #7
  invoke void @_ZN5LightC1Ev(ptr noundef nonnull align 4 dereferenceable(144) %21)
          to label %38 unwind label %112

38:                                               ; preds = %37
  br label %39

39:                                               ; preds = %68, %38
  %40 = load i8, ptr @isAppRunning, align 1, !tbaa !13, !range !15, !noundef !16
  %41 = trunc i8 %40 to i1
  br i1 %41, label %42, label %124

42:                                               ; preds = %39
  %43 = invoke noundef ptr @_ZN6Screen8InstanceEv()
          to label %44 unwind label %116

44:                                               ; preds = %42
  invoke void @_ZN6Screen11ClearScreenEv(ptr noundef nonnull align 8 dereferenceable(16) %43)
          to label %45 unwind label %116

45:                                               ; preds = %44
  %46 = invoke noundef ptr @_ZN5Input8InstanceEv()
          to label %47 unwind label %116

47:                                               ; preds = %45
  invoke void @_ZN5Input6UpdateEv(ptr noundef nonnull align 4 dereferenceable(24) %46)
          to label %48 unwind label %116

48:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #7
  %49 = invoke noundef ptr @_ZN5Input8InstanceEv()
          to label %50 unwind label %120

50:                                               ; preds = %48
  %51 = invoke noundef signext i8 @_ZN5Input10GetKeyDownEv(ptr noundef nonnull align 4 dereferenceable(24) %49)
          to label %52 unwind label %120

52:                                               ; preds = %50
  store i8 %51, ptr %22, align 1, !tbaa !17
  %53 = invoke noundef ptr @_ZN5Input8InstanceEv()
          to label %54 unwind label %120

54:                                               ; preds = %52
  %55 = invoke noundef zeroext i1 @_ZN5Input10IsXClickedEv(ptr noundef nonnull align 4 dereferenceable(24) %53)
          to label %56 unwind label %120

56:                                               ; preds = %54
  %57 = xor i1 %55, true
  %58 = zext i1 %57 to i8
  store i8 %58, ptr @isAppRunning, align 1, !tbaa !13
  invoke void @_ZN6Camera6UpdateEv(ptr noundef nonnull align 4 dereferenceable(164) %20)
          to label %59 unwind label %120

59:                                               ; preds = %56
  invoke void @_ZN6Camera12SendToShaderERK6Shader(ptr noundef nonnull align 4 dereferenceable(164) %20, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %60 unwind label %120

60:                                               ; preds = %59
  invoke void @_ZN5Light6UpdateEv(ptr noundef nonnull align 4 dereferenceable(144) %21)
          to label %61 unwind label %120

61:                                               ; preds = %60
  invoke void @_ZN5Light6RenderERK6Shader(ptr noundef nonnull align 4 dereferenceable(144) %21, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %62 unwind label %120

62:                                               ; preds = %61
  invoke void @_ZN5Light12SendToShaderERK6Shader(ptr noundef nonnull align 4 dereferenceable(144) %21, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %63 unwind label %120

63:                                               ; preds = %62
  invoke void @_ZN5Model6UpdateEv(ptr noundef nonnull align 8 dereferenceable(236) %17)
          to label %64 unwind label %120

64:                                               ; preds = %63
  invoke void @_ZN5Model6RenderERK6Shader(ptr noundef nonnull align 8 dereferenceable(236) %17, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %65 unwind label %120

65:                                               ; preds = %64
  %66 = invoke noundef ptr @_ZN6Screen8InstanceEv()
          to label %67 unwind label %120

67:                                               ; preds = %65
  invoke void @_ZN6Screen7PresentEv(ptr noundef nonnull align 8 dereferenceable(16) %66)
          to label %68 unwind label %120

68:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #7
  br label %39, !llvm.loop !18

69:                                               ; preds = %2
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %9, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %10, align 4
  br label %82

73:                                               ; preds = %25
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %9, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %10, align 4
  br label %81

77:                                               ; preds = %26
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %9, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br label %81

81:                                               ; preds = %77, %73
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  br label %82

82:                                               ; preds = %81, %69
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #7
  br label %137

83:                                               ; preds = %28
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %9, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %10, align 4
  br label %137

87:                                               ; preds = %29
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %9, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %10, align 4
  br label %136

91:                                               ; preds = %30
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %9, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %10, align 4
  br label %135

95:                                               ; preds = %31
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %9, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %10, align 4
  br label %134

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

103:                                              ; preds = %33
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %9, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  br label %107

107:                                              ; preds = %103, %99
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #7
  br label %133

108:                                              ; preds = %36, %35
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %9, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %10, align 4
  br label %132

112:                                              ; preds = %37
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %9, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %10, align 4
  br label %131

116:                                              ; preds = %127, %125, %124, %47, %45, %44, %42
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %9, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %10, align 4
  br label %130

120:                                              ; preds = %67, %65, %64, %63, %62, %61, %60, %59, %56, %54, %52, %50, %48
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %9, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #7
  br label %130

124:                                              ; preds = %39
  invoke void @_ZN6Shader7DestroyEv(ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %125 unwind label %116

125:                                              ; preds = %124
  %126 = invoke noundef ptr @_ZN6Screen8InstanceEv()
          to label %127 unwind label %116

127:                                              ; preds = %125
  invoke void @_ZN6Screen8ShutdownEv(ptr noundef nonnull align 8 dereferenceable(16) %126)
          to label %128 unwind label %116

128:                                              ; preds = %127
  store i32 0, ptr %3, align 4
  call void @_ZN5LightD1Ev(ptr noundef nonnull align 4 dereferenceable(144) %21) #7
  call void @llvm.lifetime.end.p0(i64 144, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 164, ptr %20) #7
  call void @_ZN5ModelD2Ev(ptr noundef nonnull align 8 dereferenceable(236) %17) #7
  call void @llvm.lifetime.end.p0(i64 240, ptr %17) #7
  call void @_ZN4CubeD1Ev(ptr noundef nonnull align 4 dereferenceable(200) %16) #7
  call void @llvm.lifetime.end.p0(i64 200, ptr %16) #7
  call void @_ZN4QuadD1Ev(ptr noundef nonnull align 4 dereferenceable(188) %15) #7
  call void @llvm.lifetime.end.p0(i64 188, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @_ZN6ShaderD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %129 = load i32, ptr %3, align 4
  ret i32 %129

130:                                              ; preds = %120, %116
  call void @_ZN5LightD1Ev(ptr noundef nonnull align 4 dereferenceable(144) %21) #7
  br label %131

131:                                              ; preds = %130, %112
  call void @llvm.lifetime.end.p0(i64 144, ptr %21) #7
  br label %132

132:                                              ; preds = %131, %108
  call void @llvm.lifetime.end.p0(i64 164, ptr %20) #7
  br label %133

133:                                              ; preds = %132, %107
  call void @_ZN5ModelD2Ev(ptr noundef nonnull align 8 dereferenceable(236) %17) #7
  br label %134

134:                                              ; preds = %133, %95
  call void @llvm.lifetime.end.p0(i64 240, ptr %17) #7
  call void @_ZN4CubeD1Ev(ptr noundef nonnull align 4 dereferenceable(200) %16) #7
  br label %135

135:                                              ; preds = %134, %91
  call void @llvm.lifetime.end.p0(i64 200, ptr %16) #7
  call void @_ZN4QuadD1Ev(ptr noundef nonnull align 4 dereferenceable(188) %15) #7
  br label %136

136:                                              ; preds = %135, %87
  call void @llvm.lifetime.end.p0(i64 188, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %137

137:                                              ; preds = %136, %83, %82
  call void @_ZN6ShaderD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %138

138:                                              ; preds = %137
  %139 = load ptr, ptr %9, align 8
  %140 = load i32, ptr %10, align 4
  %141 = insertvalue { ptr, i32 } poison, ptr %139, 0
  %142 = insertvalue { ptr, i32 } %141, i32 %140, 1
  resume { ptr, i32 } %142
}

declare noundef ptr @_ZN6Screen8InstanceEv() #1

declare noundef zeroext i1 @_ZN6Screen10InitializeEv(ptr noundef nonnull align 8 dereferenceable(16)) #1

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

declare void @_ZN6ShaderC1Ev(ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1

declare noundef zeroext i1 @_ZN6Shader6CreateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #1

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

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

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

declare void @_ZN6Shader3UseEv(ptr noundef nonnull align 4 dereferenceable(4)) #1

declare void @_ZN4QuadC1Ev(ptr noundef nonnull align 4 dereferenceable(188)) unnamed_addr #1

declare void @_ZN4CubeC1Ev(ptr noundef nonnull align 4 dereferenceable(200)) unnamed_addr #1

declare void @_ZN5ModelC1Ev(ptr noundef nonnull align 8 dereferenceable(236)) unnamed_addr #1

declare noundef zeroext i1 @_ZN5Model4LoadERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(236), ptr noundef nonnull align 8 dereferenceable(32)) #1

declare void @_ZN6CameraC1Ev(ptr noundef nonnull align 4 dereferenceable(164)) unnamed_addr #1

declare void @_ZN6Camera9Set3DViewEv(ptr noundef nonnull align 4 dereferenceable(164)) #1

declare void @_ZN5LightC1Ev(ptr noundef nonnull align 4 dereferenceable(144)) unnamed_addr #1

declare void @_ZN6Screen11ClearScreenEv(ptr noundef nonnull align 8 dereferenceable(16)) #1

declare noundef ptr @_ZN5Input8InstanceEv() #1

declare void @_ZN5Input6UpdateEv(ptr noundef nonnull align 4 dereferenceable(24)) #1

declare noundef signext i8 @_ZN5Input10GetKeyDownEv(ptr noundef nonnull align 4 dereferenceable(24)) #1

declare noundef zeroext i1 @_ZN5Input10IsXClickedEv(ptr noundef nonnull align 4 dereferenceable(24)) #1

declare void @_ZN6Camera6UpdateEv(ptr noundef nonnull align 4 dereferenceable(164)) #1

declare void @_ZN6Camera12SendToShaderERK6Shader(ptr noundef nonnull align 4 dereferenceable(164), ptr noundef nonnull align 4 dereferenceable(4)) #1

declare void @_ZN5Light6UpdateEv(ptr noundef nonnull align 4 dereferenceable(144)) #1

declare void @_ZN5Light6RenderERK6Shader(ptr noundef nonnull align 4 dereferenceable(144), ptr noundef nonnull align 4 dereferenceable(4)) #1

declare void @_ZN5Light12SendToShaderERK6Shader(ptr noundef nonnull align 4 dereferenceable(144), ptr noundef nonnull align 4 dereferenceable(4)) #1

declare void @_ZN5Model6UpdateEv(ptr noundef nonnull align 8 dereferenceable(236)) #1

declare void @_ZN5Model6RenderERK6Shader(ptr noundef nonnull align 8 dereferenceable(236), ptr noundef nonnull align 4 dereferenceable(4)) #1

declare void @_ZN6Screen7PresentEv(ptr noundef nonnull align 8 dereferenceable(16)) #1

declare void @_ZN6Shader7DestroyEv(ptr noundef nonnull align 4 dereferenceable(4)) #1

declare void @_ZN6Screen8ShutdownEv(ptr noundef nonnull align 8 dereferenceable(16)) #1

; Function Attrs: nounwind
declare void @_ZN5LightD1Ev(ptr noundef nonnull align 4 dereferenceable(144)) unnamed_addr #5

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

; Function Attrs: nounwind
declare void @_ZN4CubeD1Ev(ptr noundef nonnull align 4 dereferenceable(200)) unnamed_addr #5

; Function Attrs: nounwind
declare void @_ZN4QuadD1Ev(ptr noundef nonnull align 4 dereferenceable(188)) unnamed_addr #5

; Function Attrs: nounwind
declare void @_ZN6ShaderD1Ev(ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = { "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 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 = { nounwind "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 = { 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 #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.Shader = type { i32 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%class.Quad = type { %class.Buffer, %class.Texture, %"struct.glm::mat", %"struct.glm::mat.4", %"struct.glm::vec.5", float, %"struct.glm::vec.5", %"struct.glm::vec.5", %"struct.glm::vec.5" }
%class.Buffer = type { i8, i32, i32, i32, i32, i32, i32, i32 }
%class.Texture = type { i32 }
%"struct.glm::mat" = type { [4 x %"struct.glm::vec"] }
%"struct.glm::vec" = type { %union.anon.0, %union.anon.1, %union.anon.2, %union.anon.3 }
%union.anon.0 = type { float }
%union.anon.1 = type { float }
%union.anon.2 = type { float }
%union.anon.3 = type { float }
%"struct.glm::mat.4" = type { [3 x %"struct.glm::vec.5"] }
%"struct.glm::vec.5" = type { %union.anon.6, %union.anon.7, %union.anon.8 }
%union.anon.6 = type { float }
%union.anon.7 = type { float }
%union.anon.8 = type { float }
%class.Cube = type { %class.Buffer, %class.Texture, %"struct.glm::mat", %"struct.glm::mat.4", %"struct.glm::vec.5", %"struct.glm::vec.5", float, %"struct.glm::vec.5", %"struct.glm::vec.5", %"struct.glm::vec.5" }
%class.Model = type <{ %"class.std::vector", %"class.std::vector.12", %"class.std::vector.17", %"struct.glm::mat", %"struct.glm::mat.4", %"struct.glm::vec.5", %"struct.glm::vec.5", float, %"struct.glm::vec.5", %"struct.glm::vec.5", %"struct.glm::vec.5", [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Mesh, std::allocator<Mesh>>::_Vector_impl" }
%"struct.std::_Vector_base<Mesh, std::allocator<Mesh>>::_Vector_impl" = type { %"struct.std::_Vector_base<Mesh, std::allocator<Mesh>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Mesh, std::allocator<Mesh>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.12" = type { %"struct.std::_Vector_base.13" }
%"struct.std::_Vector_base.13" = type { %"struct.std::_Vector_base<Buffer, std::allocator<Buffer>>::_Vector_impl" }
%"struct.std::_Vector_base<Buffer, std::allocator<Buffer>>::_Vector_impl" = type { %"struct.std::_Vector_base<Buffer, std::allocator<Buffer>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Buffer, std::allocator<Buffer>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = type { %"struct.std::_Vector_base<Material, std::allocator<Material>>::_Vector_impl" }
%"struct.std::_Vector_base<Material, std::allocator<Material>>::_Vector_impl" = type { %"struct.std::_Vector_base<Material, std::allocator<Material>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Material, std::allocator<Material>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.Camera = type { %"struct.glm::mat", %"struct.glm::mat", %"struct.glm::vec.5", %"struct.glm::vec.5", %"struct.glm::vec.5" }
%class.Light = type { %class.Buffer, %"struct.glm::mat", %"struct.glm::vec.5", %"struct.glm::vec.5", %"struct.glm::vec.5", %"struct.glm::vec.5" }

@isAppRunning = external dso_local local_unnamed_addr global i8, align 1
@.str = external hidden unnamed_addr constant [18 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.Shader, align 4
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca %class.Quad, align 4
  %9 = alloca %class.Cube, align 4
  %10 = alloca %class.Model, align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca %class.Camera, align 4
  %14 = alloca %class.Light, align 4
  %15 = tail call noundef ptr @_ZN6Screen8InstanceEv()
  %16 = tail call noundef zeroext i1 @_ZN6Screen10InitializeEv(ptr noundef nonnull align 8 dereferenceable(16) %15)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  call void @_ZN6ShaderC1Ev(ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %17 unwind label %58

17:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %18 unwind label %60

18:                                               ; preds = %17
  %19 = invoke noundef zeroext i1 @_ZN6Shader6CreateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %20 unwind label %62

20:                                               ; preds = %18
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  invoke void @_ZN6Shader3UseEv(ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %21 unwind label %66

21:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 188, ptr nonnull %8) #7
  invoke void @_ZN4QuadC1Ev(ptr noundef nonnull align 4 dereferenceable(188) %8)
          to label %22 unwind label %68

22:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %9) #7
  invoke void @_ZN4CubeC1Ev(ptr noundef nonnull align 4 dereferenceable(200) %9)
          to label %23 unwind label %70

23:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 240, ptr nonnull %10) #7
  invoke void @_ZN5ModelC1Ev(ptr noundef nonnull align 8 dereferenceable(236) %10)
          to label %24 unwind label %72

24:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %25 unwind label %74

25:                                               ; preds = %24
  %26 = invoke noundef zeroext i1 @_ZN5Model4LoadERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(236) %10, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %27 unwind label %76

27:                                               ; preds = %25
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 164, ptr nonnull %13) #7
  invoke void @_ZN6CameraC1Ev(ptr noundef nonnull align 4 dereferenceable(164) %13)
          to label %28 unwind label %79

28:                                               ; preds = %27
  invoke void @_ZN6Camera9Set3DViewEv(ptr noundef nonnull align 4 dereferenceable(164) %13)
          to label %29 unwind label %79

29:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %14) #7
  invoke void @_ZN5LightC1Ev(ptr noundef nonnull align 4 dereferenceable(144) %14)
          to label %.preheader unwind label %81

.preheader:                                       ; preds = %29, %57
  %30 = load i8, ptr @isAppRunning, align 1, !tbaa !5, !range !9, !noundef !10
  %31 = trunc nuw i8 %30 to i1
  br i1 %31, label %32, label %85

32:                                               ; preds = %.preheader
  %33 = invoke noundef ptr @_ZN6Screen8InstanceEv()
          to label %34 unwind label %.loopexit

34:                                               ; preds = %32
  invoke void @_ZN6Screen11ClearScreenEv(ptr noundef nonnull align 8 dereferenceable(16) %33)
          to label %35 unwind label %.loopexit

35:                                               ; preds = %34
  %36 = invoke noundef ptr @_ZN5Input8InstanceEv()
          to label %37 unwind label %.loopexit

37:                                               ; preds = %35
  invoke void @_ZN5Input6UpdateEv(ptr noundef nonnull align 4 dereferenceable(24) %36)
          to label %38 unwind label %.loopexit

38:                                               ; preds = %37
  %39 = invoke noundef ptr @_ZN5Input8InstanceEv()
          to label %40 unwind label %83

40:                                               ; preds = %38
  %41 = invoke noundef signext i8 @_ZN5Input10GetKeyDownEv(ptr noundef nonnull align 4 dereferenceable(24) %39)
          to label %42 unwind label %83

42:                                               ; preds = %40
  %43 = invoke noundef ptr @_ZN5Input8InstanceEv()
          to label %44 unwind label %83

44:                                               ; preds = %42
  %45 = invoke noundef zeroext i1 @_ZN5Input10IsXClickedEv(ptr noundef nonnull align 4 dereferenceable(24) %43)
          to label %46 unwind label %83

46:                                               ; preds = %44
  %47 = xor i1 %45, true
  %48 = zext i1 %47 to i8
  store i8 %48, ptr @isAppRunning, align 1, !tbaa !5
  invoke void @_ZN6Camera6UpdateEv(ptr noundef nonnull align 4 dereferenceable(164) %13)
          to label %49 unwind label %83

49:                                               ; preds = %46
  invoke void @_ZN6Camera12SendToShaderERK6Shader(ptr noundef nonnull align 4 dereferenceable(164) %13, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %50 unwind label %83

50:                                               ; preds = %49
  invoke void @_ZN5Light6UpdateEv(ptr noundef nonnull align 4 dereferenceable(144) %14)
          to label %51 unwind label %83

51:                                               ; preds = %50
  invoke void @_ZN5Light6RenderERK6Shader(ptr noundef nonnull align 4 dereferenceable(144) %14, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %52 unwind label %83

52:                                               ; preds = %51
  invoke void @_ZN5Light12SendToShaderERK6Shader(ptr noundef nonnull align 4 dereferenceable(144) %14, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %53 unwind label %83

53:                                               ; preds = %52
  invoke void @_ZN5Model6UpdateEv(ptr noundef nonnull align 8 dereferenceable(236) %10)
          to label %54 unwind label %83

54:                                               ; preds = %53
  invoke void @_ZN5Model6RenderERK6Shader(ptr noundef nonnull align 8 dereferenceable(236) %10, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %55 unwind label %83

55:                                               ; preds = %54
  %56 = invoke noundef ptr @_ZN6Screen8InstanceEv()
          to label %57 unwind label %83

57:                                               ; preds = %55
  invoke void @_ZN6Screen7PresentEv(ptr noundef nonnull align 8 dereferenceable(16) %56)
          to label %.preheader unwind label %83, !llvm.loop !11

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

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

62:                                               ; preds = %18
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  br label %64

64:                                               ; preds = %62, %60
  %.pn = phi { ptr, i32 } [ %63, %62 ], [ %61, %60 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  br label %65

65:                                               ; preds = %64, %58
  %.pn.pn = phi { ptr, i32 } [ %.pn, %64 ], [ %59, %58 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  br label %97

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

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

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

72:                                               ; preds = %23
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %94

74:                                               ; preds = %24
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %78

76:                                               ; preds = %25
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br label %78

78:                                               ; preds = %76, %74
  %.pn15 = phi { ptr, i32 } [ %77, %76 ], [ %75, %74 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #7
  br label %93

79:                                               ; preds = %28, %27
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %92

81:                                               ; preds = %29
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %91

.loopexit:                                        ; preds = %32, %34, %35, %37
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %90

.loopexit.split-lp:                               ; preds = %85, %86, %88
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %90

83:                                               ; preds = %57, %55, %54, %53, %52, %51, %50, %49, %46, %44, %42, %40, %38
  %84 = landingpad { ptr, i32 }
          cleanup
  br label %90

85:                                               ; preds = %.preheader
  invoke void @_ZN6Shader7DestroyEv(ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %86 unwind label %.loopexit.split-lp

86:                                               ; preds = %85
  %87 = invoke noundef ptr @_ZN6Screen8InstanceEv()
          to label %88 unwind label %.loopexit.split-lp

88:                                               ; preds = %86
  invoke void @_ZN6Screen8ShutdownEv(ptr noundef nonnull align 8 dereferenceable(16) %87)
          to label %89 unwind label %.loopexit.split-lp

89:                                               ; preds = %88
  call void @_ZN5LightD1Ev(ptr noundef nonnull align 4 dereferenceable(144) %14) #7
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 164, ptr nonnull %13) #7
  call void @_ZN5ModelD2Ev(ptr noundef nonnull align 8 dereferenceable(236) %10) #7
  call void @llvm.lifetime.end.p0(i64 240, ptr nonnull %10) #7
  call void @_ZN4CubeD1Ev(ptr noundef nonnull align 4 dereferenceable(200) %9) #7
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %9) #7
  call void @_ZN4QuadD1Ev(ptr noundef nonnull align 4 dereferenceable(188) %8) #7
  call void @llvm.lifetime.end.p0(i64 188, ptr nonnull %8) #7
  call void @_ZN6ShaderD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  ret i32 0

90:                                               ; preds = %.loopexit, %.loopexit.split-lp, %83
  %.pn17 = phi { ptr, i32 } [ %84, %83 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN5LightD1Ev(ptr noundef nonnull align 4 dereferenceable(144) %14) #7
  br label %91

91:                                               ; preds = %90, %81
  %.pn17.pn = phi { ptr, i32 } [ %.pn17, %90 ], [ %82, %81 ]
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %14) #7
  br label %92

92:                                               ; preds = %91, %79
  %.pn17.pn.pn = phi { ptr, i32 } [ %.pn17.pn, %91 ], [ %80, %79 ]
  call void @llvm.lifetime.end.p0(i64 164, ptr nonnull %13) #7
  br label %93

93:                                               ; preds = %92, %78
  %.pn17.pn.pn.pn = phi { ptr, i32 } [ %.pn17.pn.pn, %92 ], [ %.pn15, %78 ]
  call void @_ZN5ModelD2Ev(ptr noundef nonnull align 8 dereferenceable(236) %10) #7
  br label %94

94:                                               ; preds = %93, %72
  %.pn17.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn17.pn.pn.pn, %93 ], [ %73, %72 ]
  call void @llvm.lifetime.end.p0(i64 240, ptr nonnull %10) #7
  call void @_ZN4CubeD1Ev(ptr noundef nonnull align 4 dereferenceable(200) %9) #7
  br label %95

95:                                               ; preds = %94, %70
  %.pn17.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn17.pn.pn.pn.pn, %94 ], [ %71, %70 ]
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %9) #7
  call void @_ZN4QuadD1Ev(ptr noundef nonnull align 4 dereferenceable(188) %8) #7
  br label %96

96:                                               ; preds = %95, %68
  %.pn17.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn17.pn.pn.pn.pn.pn, %95 ], [ %69, %68 ]
  call void @llvm.lifetime.end.p0(i64 188, ptr nonnull %8) #7
  br label %97

97:                                               ; preds = %96, %66, %65
  %.pn17.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn17.pn.pn.pn.pn.pn.pn, %96 ], [ %67, %66 ], [ %.pn.pn, %65 ]
  call void @_ZN6ShaderD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn17.pn.pn.pn.pn.pn.pn.pn
}

declare noundef ptr @_ZN6Screen8InstanceEv() local_unnamed_addr #1

declare noundef zeroext i1 @_ZN6Screen10InitializeEv(ptr noundef nonnull align 8 dereferenceable(16)) 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

declare void @_ZN6ShaderC1Ev(ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1

declare noundef zeroext i1 @_ZN6Shader6CreateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) 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) #2

declare void @_ZN6Shader3UseEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

declare void @_ZN4QuadC1Ev(ptr noundef nonnull align 4 dereferenceable(188)) unnamed_addr #1

declare void @_ZN4CubeC1Ev(ptr noundef nonnull align 4 dereferenceable(200)) unnamed_addr #1

declare void @_ZN5ModelC1Ev(ptr noundef nonnull align 8 dereferenceable(236)) unnamed_addr #1

declare noundef zeroext i1 @_ZN5Model4LoadERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(236), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

declare void @_ZN6CameraC1Ev(ptr noundef nonnull align 4 dereferenceable(164)) unnamed_addr #1

declare void @_ZN6Camera9Set3DViewEv(ptr noundef nonnull align 4 dereferenceable(164)) local_unnamed_addr #1

declare void @_ZN5LightC1Ev(ptr noundef nonnull align 4 dereferenceable(144)) unnamed_addr #1

declare void @_ZN6Screen11ClearScreenEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

declare noundef ptr @_ZN5Input8InstanceEv() local_unnamed_addr #1

declare void @_ZN5Input6UpdateEv(ptr noundef nonnull align 4 dereferenceable(24)) local_unnamed_addr #1

declare noundef signext i8 @_ZN5Input10GetKeyDownEv(ptr noundef nonnull align 4 dereferenceable(24)) local_unnamed_addr #1

declare noundef zeroext i1 @_ZN5Input10IsXClickedEv(ptr noundef nonnull align 4 dereferenceable(24)) local_unnamed_addr #1

declare void @_ZN6Camera6UpdateEv(ptr noundef nonnull align 4 dereferenceable(164)) local_unnamed_addr #1

declare void @_ZN6Camera12SendToShaderERK6Shader(ptr noundef nonnull align 4 dereferenceable(164), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

declare void @_ZN5Light6UpdateEv(ptr noundef nonnull align 4 dereferenceable(144)) local_unnamed_addr #1

declare void @_ZN5Light6RenderERK6Shader(ptr noundef nonnull align 4 dereferenceable(144), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

declare void @_ZN5Light12SendToShaderERK6Shader(ptr noundef nonnull align 4 dereferenceable(144), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

declare void @_ZN5Model6UpdateEv(ptr noundef nonnull align 8 dereferenceable(236)) local_unnamed_addr #1

declare void @_ZN5Model6RenderERK6Shader(ptr noundef nonnull align 8 dereferenceable(236), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

declare void @_ZN6Screen7PresentEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

declare void @_ZN6Shader7DestroyEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

declare void @_ZN6Screen8ShutdownEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZN5LightD1Ev(ptr noundef nonnull align 4 dereferenceable(144)) unnamed_addr #5

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

; Function Attrs: nounwind
declare void @_ZN4CubeD1Ev(ptr noundef nonnull align 4 dereferenceable(200)) unnamed_addr #5

; Function Attrs: nounwind
declare void @_ZN4QuadD1Ev(ptr noundef nonnull align 4 dereferenceable(188)) unnamed_addr #5

; Function Attrs: nounwind
declare void @_ZN6ShaderD1Ev(ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = { "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 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 = { nounwind "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 = { 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 #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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i8 0, i8 2}
!10 = !{}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass