; LLVM IR from Lut1n/ImpGears :: src/OGLPlugin/FrameBuffer.ll (ZN3imp11FrameBuffer5buildERKSt10shared_ptrINS_7CubeMapEEib)

; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"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.13" = type { i8 }
%"class.imp::FrameBuffer" = type { %"class.imp::Object", i32, i32, i32, i32, i8, i8, i32, i32, %"class.std::vector", %"class.std::vector.0", %"class.std::vector.5", %"class.std::shared_ptr.10" }
%"class.imp::Object" = type { ptr, %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::shared_ptr<imp::Texture>, std::allocator<std::shared_ptr<imp::Texture>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<imp::Texture>, std::allocator<std::shared_ptr<imp::Texture>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<imp::Texture>, std::allocator<std::shared_ptr<imp::Texture>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<imp::Texture>, std::allocator<std::shared_ptr<imp::Texture>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<imp::Vec4, std::allocator<imp::Vec4>>::_Vector_impl" }
%"struct.std::_Vector_base<imp::Vec4, std::allocator<imp::Vec4>>::_Vector_impl" = type { %"struct.std::_Vector_base<imp::Vec4, std::allocator<imp::Vec4>>::_Vector_impl_data" }
%"struct.std::_Vector_base<imp::Vec4, std::allocator<imp::Vec4>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::shared_ptr.10" = type { %"class.std::__shared_ptr.11" }
%"class.std::__shared_ptr.11" = type { ptr, %"class.std::__shared_count" }

@_ZN3imp11FrameBuffer8_s_countE = external dso_local global i32, align 4
@__glewGenFramebuffers = external global ptr, align 8
@__glewBindFramebuffer = external global ptr, align 8
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [78 x i8], align 1
@__glewFramebufferTexture2D = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1
@__glewDrawBuffers = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [17 x i8], align 1
@__glewGenRenderbuffers = external global ptr, align 8
@__glewBindRenderbuffer = external global ptr, align 8
@__glewRenderbufferStorage = external global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@__glewFramebufferRenderbuffer = external global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [17 x i8], align 1
@__glewCheckFramebufferStatus = external global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [42 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp11FrameBuffer7destroyEv(ptr noundef nonnull align 8 dereferenceable(144)) #0 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z12GLcheckErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKci(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef) #2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNSt6vectorIjSaIjEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp11FrameBuffer5buildERKSt10shared_ptrINS_7CubeMapEEib(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, i32 noundef %2, i1 noundef zeroext %3) #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator.13", align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator.13", align 1
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::allocator.13", align 1
  %20 = alloca i32, align 4
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::allocator.13", align 1
  %23 = alloca i32, align 4
  %24 = alloca %"class.std::__cxx11::basic_string", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  %25 = zext i1 %3 to i8
  store i8 %25, ptr %8, align 1, !tbaa !11
  %26 = load ptr, ptr %5, align 8
  call void @_ZN3imp11FrameBuffer7destroyEv(ptr noundef nonnull align 8 dereferenceable(144) %26)
  %27 = load i8, ptr %8, align 1, !tbaa !11, !range !13, !noundef !14
  %28 = trunc i8 %27 to i1
  %29 = getelementptr inbounds %"class.imp::FrameBuffer", ptr %26, i32 0, i32 5
  %30 = zext i1 %28 to i8
  store i8 %30, ptr %29, align 8, !tbaa !15
  %31 = getelementptr inbounds %"class.imp::FrameBuffer", ptr %26, i32 0, i32 3
  store i32 1, ptr %31, align 8, !tbaa !35
  %32 = getelementptr inbounds %"class.imp::FrameBuffer", ptr %26, i32 0, i32 9
  call void @_ZNSt6vectorISt10shared_ptrIN3imp7TextureEESaIS3_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #4
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds %"class.imp::FrameBuffer", ptr %26, i32 0, i32 12
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN3imp7CubeMapEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 8 dereferenceable(16) %33) #4
  %36 = load i32, ptr %7, align 4, !tbaa !9
  %37 = getelementptr inbounds %"class.imp::FrameBuffer", ptr %26, i32 0, i32 4
  store i32 %36, ptr %37, align 4, !tbaa !36
  %38 = getelementptr inbounds %"class.imp::FrameBuffer", ptr %26, i32 0, i32 6
  store i8 1, ptr %38, align 1, !tbaa !37
  %39 = getelementptr inbounds %"class.imp::FrameBuffer", ptr %26, i32 0, i32 12
  %40 = call noundef zeroext i1 @_ZNKSt12__shared_ptrIN3imp7CubeMapELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %39) #4
  br i1 %40, label %42, label %41

41:                                               ; preds = %4
  br label %191

42:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %43 = load ptr, ptr @__glewGenFramebuffers, align 8, !tbaa !5
  call void %43(i32 noundef 1, ptr noundef %9)
  %44 = load i32, ptr @_ZN3imp11FrameBuffer8_s_countE, align 4, !tbaa !9
  %45 = add i32 %44, 1
  store i32 %45, ptr @_ZN3imp11FrameBuffer8_s_countE, align 4, !tbaa !9
  %46 = load i32, ptr %9, align 4, !tbaa !9
  %47 = getelementptr inbounds %"class.imp::FrameBuffer", ptr %26, i32 0, i32 1
  store i32 %46, ptr %47, align 8, !tbaa !38
  %48 = load ptr, ptr @__glewBindFramebuffer, align 8, !tbaa !5
  %49 = getelementptr inbounds %"class.imp::FrameBuffer", ptr %26, i32 0, i32 1
  %50 = load i32, ptr %49, align 8, !tbaa !38
  call void %48(i32 noundef 36160, i32 noundef %50)
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %51 unwind label %61

51:                                               ; preds = %42
  %52 = invoke noundef zeroext i1 @_Z12GLcheckErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKci(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.1, i32 noundef 147)
          to label %53 unwind label %65

53:                                               ; preds = %51
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #4
  %54 = getelementptr inbounds %"class.imp::FrameBuffer", ptr %26, i32 0, i32 10
  call void @_ZNSt6vectorIjSaIjEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %54) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %55

55:                                               ; preds = %85, %53
  %56 = load i32, ptr %14, align 4, !tbaa !9
  %57 = getelementptr inbounds %"class.imp::FrameBuffer", ptr %26, i32 0, i32 3
  %58 = load i32, ptr %57, align 8, !tbaa !35
  %59 = icmp slt i32 %56, %58
  br i1 %59, label %70, label %60

60:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %97

61:                                               ; preds = %42
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %12, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %13, align 4
  br label %69

65:                                               ; preds = %51
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %12, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  br label %69

69:                                               ; preds = %65, %61
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #4
  br label %192

70:                                               ; preds = %55
  %71 = load ptr, ptr @__glewFramebufferTexture2D, align 8, !tbaa !5
  %72 = load i32, ptr %14, align 4, !tbaa !9
  %73 = add nsw i32 36064, %72
  %74 = load i32, ptr %7, align 4, !tbaa !9
  %75 = add nsw i32 34069, %74
  %76 = getelementptr inbounds %"class.imp::FrameBuffer", ptr %26, i32 0, i32 12
  %77 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp7CubeMapELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %76) #4
  %78 = call noundef i32 @_ZNK3imp7CubeMap10getVideoIDEv(ptr noundef nonnull align 8 dereferenceable(88) %77)
  call void %71(i32 noundef 36160, i32 noundef %73, i32 noundef %75, i32 noundef %78, i32 noundef 0)
  %79 = getelementptr inbounds %"class.imp::FrameBuffer", ptr %26, i32 0, i32 10
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %80 = load i32, ptr %14, align 4, !tbaa !9
  %81 = add nsw i32 36064, %80
  store i32 %81, ptr %15, align 4, !tbaa !9
  call void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %79, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %82 unwind label %88

82:                                               ; preds = %70
  %83 = invoke noundef zeroext i1 @_Z12GLcheckErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKci(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.1, i32 noundef 154)
          to label %84 unwind label %92

84:                                               ; preds = %82
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #4
  br label %85

85:                                               ; preds = %84
  %86 = load i32, ptr %14, align 4, !tbaa !9
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %14, align 4, !tbaa !9
  br label %55, !llvm.loop !39

88:                                               ; preds = %70
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %12, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %13, align 4
  br label %96

92:                                               ; preds = %82
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %12, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  br label %96

96:                                               ; preds = %92, %88
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %192

97:                                               ; preds = %60
  %98 = load ptr, ptr @__glewDrawBuffers, align 8, !tbaa !5
  %99 = getelementptr inbounds %"class.imp::FrameBuffer", ptr %26, i32 0, i32 10
  %100 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %99) #4
  %101 = trunc i64 %100 to i32
  %102 = getelementptr inbounds %"class.imp::FrameBuffer", ptr %26, i32 0, i32 10
  %103 = call noundef ptr @_ZNSt6vectorIjSaIjEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %102) #4
  call void %98(i32 noundef %101, ptr noundef %103)
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %104 unwind label %131

104:                                              ; preds = %97
  %105 = invoke noundef zeroext i1 @_Z12GLcheckErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKci(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef @.str.1, i32 noundef 157)
          to label %106 unwind label %135

106:                                              ; preds = %104
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #4
  %107 = getelementptr inbounds %"class.imp::FrameBuffer", ptr %26, i32 0, i32 7
  store i32 1024, ptr %107, align 4, !tbaa !41
  %108 = getelementptr inbounds %"class.imp::FrameBuffer", ptr %26, i32 0, i32 8
  store i32 1024, ptr %108, align 8, !tbaa !42
  %109 = getelementptr inbounds %"class.imp::FrameBuffer", ptr %26, i32 0, i32 5
  %110 = load i8, ptr %109, align 8, !tbaa !15, !range !13, !noundef !14
  %111 = trunc i8 %110 to i1
  br i1 %111, label %112, label %149

112:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %113 = getelementptr inbounds %"class.imp::FrameBuffer", ptr %26, i32 0, i32 2
  %114 = load i32, ptr %113, align 4, !tbaa !43
  store i32 %114, ptr %20, align 4, !tbaa !9
  %115 = load ptr, ptr @__glewGenRenderbuffers, align 8, !tbaa !5
  call void %115(i32 noundef 1, ptr noundef %20)
  %116 = load i32, ptr %20, align 4, !tbaa !9
  %117 = getelementptr inbounds %"class.imp::FrameBuffer", ptr %26, i32 0, i32 2
  store i32 %116, ptr %117, align 4, !tbaa !43
  %118 = load ptr, ptr @__glewBindRenderbuffer, align 8, !tbaa !5
  %119 = load i32, ptr %20, align 4, !tbaa !9
  call void %118(i32 noundef 36161, i32 noundef %119)
  %120 = load ptr, ptr @__glewRenderbufferStorage, align 8, !tbaa !5
  %121 = getelementptr inbounds %"class.imp::FrameBuffer", ptr %26, i32 0, i32 7
  %122 = load i32, ptr %121, align 4, !tbaa !41
  %123 = getelementptr inbounds %"class.imp::FrameBuffer", ptr %26, i32 0, i32 8
  %124 = load i32, ptr %123, align 8, !tbaa !42
  call void %120(i32 noundef 36161, i32 noundef 33189, i32 noundef %122, i32 noundef %124)
  %125 = load ptr, ptr @__glewBindRenderbuffer, align 8, !tbaa !5
  call void %125(i32 noundef 36161, i32 noundef 0)
  %126 = load ptr, ptr @__glewFramebufferRenderbuffer, align 8, !tbaa !5
  %127 = load i32, ptr %20, align 4, !tbaa !9
  call void %126(i32 noundef 36160, i32 noundef 36096, i32 noundef 36161, i32 noundef %127)
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef @.str.6, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %128 unwind label %140

128:                                              ; preds = %112
  %129 = invoke noundef zeroext i1 @_Z12GLcheckErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKci(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef @.str.1, i32 noundef 173)
          to label %130 unwind label %144

130:                                              ; preds = %128
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %149

131:                                              ; preds = %97
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %12, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %13, align 4
  br label %139

135:                                              ; preds = %104
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %12, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #4
  br label %139

139:                                              ; preds = %135, %131
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #4
  br label %192

140:                                              ; preds = %112
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %12, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %13, align 4
  br label %148

144:                                              ; preds = %128
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %12, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #4
  br label %148

148:                                              ; preds = %144, %140
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %192

149:                                              ; preds = %130, %106
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  %150 = load ptr, ptr @__glewCheckFramebufferStatus, align 8, !tbaa !5
  %151 = call i32 %150(i32 noundef 36160)
  store i32 %151, ptr %23, align 4, !tbaa !9
  %152 = load i32, ptr %23, align 4, !tbaa !9
  %153 = icmp ne i32 %152, 36053
  br i1 %153, label %154, label %189

154:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #4
  %155 = load i32, ptr %23, align 4, !tbaa !9
  %156 = icmp eq i32 %155, 36054
  br i1 %156, label %157, label %164

157:                                              ; preds = %154
  %158 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef @.str.8)
          to label %159 unwind label %160

159:                                              ; preds = %157
  br label %164

160:                                              ; preds = %186, %184, %182, %179, %173, %167, %157
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %12, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  br label %192

164:                                              ; preds = %159, %154
  %165 = load i32, ptr %23, align 4, !tbaa !9
  %166 = icmp eq i32 %165, 36057
  br i1 %166, label %167, label %170

167:                                              ; preds = %164
  %168 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef @.str.9)
          to label %169 unwind label %160

169:                                              ; preds = %167
  br label %170

170:                                              ; preds = %169, %164
  %171 = load i32, ptr %23, align 4, !tbaa !9
  %172 = icmp eq i32 %171, 36055
  br i1 %172, label %173, label %176

173:                                              ; preds = %170
  %174 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef @.str.10)
          to label %175 unwind label %160

175:                                              ; preds = %173
  br label %176

176:                                              ; preds = %175, %170
  %177 = load i32, ptr %23, align 4, !tbaa !9
  %178 = icmp eq i32 %177, 36061
  br i1 %178, label %179, label %182

179:                                              ; preds = %176
  %180 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef @.str.11)
          to label %181 unwind label %160

181:                                              ; preds = %179
  br label %182

182:                                              ; preds = %181, %176
  %183 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.12)
          to label %184 unwind label %160

184:                                              ; preds = %182
  %185 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %183, ptr noundef nonnull align 8 dereferenceable(32) %24)
          to label %186 unwind label %160

186:                                              ; preds = %184
  %187 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %185, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %188 unwind label %160

188:                                              ; preds = %186
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #4
  br label %189

189:                                              ; preds = %188, %149
  %190 = load ptr, ptr @__glewBindFramebuffer, align 8, !tbaa !5
  call void %190(i32 noundef 36160, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %191

191:                                              ; preds = %189, %41
  ret void

192:                                              ; preds = %160, %148, %139, %96, %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %193

193:                                              ; preds = %192
  %194 = load ptr, ptr %12, align 8
  %195 = load i32, ptr %13, align 4
  %196 = insertvalue { ptr, i32 } poison, ptr %194, 0
  %197 = insertvalue { ptr, i32 } %196, i32 %195, 1
  resume { ptr, i32 } %197
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN3imp7CubeMapEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt12__shared_ptrIN3imp7CubeMapELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

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

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

; 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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !12, i64 40}
!16 = !{!"_ZTSN3imp11FrameBufferE", !17, i64 0, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !12, i64 40, !12, i64 41, !10, i64 44, !10, i64 48, !21, i64 56, !25, i64 80, !29, i64 104, !33, i64 128}
!17 = !{!"_ZTSN3imp6ObjectE", !18, i64 8}
!18 = !{!"_ZTSSt10shared_ptrIN3imp6ObjectEE", !19, i64 0}
!19 = !{!"_ZTSSt12__shared_ptrIN3imp6ObjectELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !20, i64 8}
!20 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!21 = !{!"_ZTSSt6vectorISt10shared_ptrIN3imp7TextureEESaIS3_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN3imp7TextureEESaIS3_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3imp7TextureEESaIS3_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3imp7TextureEESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTSSt6vectorIjSaIjEE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!"_ZTSSt6vectorIN3imp4Vec4ESaIS1_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseIN3imp4Vec4ESaIS1_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIN3imp4Vec4ESaIS1_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIN3imp4Vec4ESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!33 = !{!"_ZTSSt10shared_ptrIN3imp7CubeMapEE", !34, i64 0}
!34 = !{!"_ZTSSt12__shared_ptrIN3imp7CubeMapELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !20, i64 8}
!35 = !{!16, !10, i64 32}
!36 = !{!16, !10, i64 36}
!37 = !{!16, !12, i64 41}
!38 = !{!16, !10, i64 24}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = !{!16, !10, i64 44}
!42 = !{!16, !10, i64 48}
!43 = !{!16, !10, i64 28}


; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"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.13" = type { i8 }

@_ZN3imp11FrameBuffer8_s_countE = external dso_local local_unnamed_addr global i32, align 4
@__glewGenFramebuffers = external local_unnamed_addr global ptr, align 8
@__glewBindFramebuffer = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [78 x i8], align 1
@__glewFramebufferTexture2D = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1
@__glewDrawBuffers = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [17 x i8], align 1
@__glewGenRenderbuffers = external local_unnamed_addr global ptr, align 8
@__glewBindRenderbuffer = external local_unnamed_addr global ptr, align 8
@__glewRenderbufferStorage = external local_unnamed_addr global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@__glewFramebufferRenderbuffer = external local_unnamed_addr global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [17 x i8], align 1
@__glewCheckFramebufferStatus = external local_unnamed_addr global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [42 x i8], align 1
@switch.table._ZN3imp11FrameBuffer5buildERKSt10shared_ptrINS_7CubeMapEEib = private unnamed_addr constant [8 x ptr] [ptr @.str.8, ptr @.str.10, ptr @.str.8, ptr @.str.9, ptr @.str.8, ptr @.str.8, ptr @.str.8, ptr @.str.11], align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp11FrameBuffer7destroyEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z12GLcheckErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKci(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIjSaIjEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNSt6vectorIjSaIjEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp11FrameBuffer5buildERKSt10shared_ptrINS_7CubeMapEEib(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, i32 noundef %2, i1 noundef zeroext %3) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator.13", align 1
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator.13", align 1
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator.13", align 1
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator.13", align 1
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = zext i1 %3 to i8
  tail call void @_ZN3imp11FrameBuffer7destroyEv(ptr noundef nonnull align 8 dereferenceable(144) %0)
  %18 = getelementptr inbounds i8, ptr %0, i64 40
  store i8 %17, ptr %18, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %0, i64 32
  store i32 1, ptr %19, align 8, !tbaa !30
  %20 = getelementptr inbounds i8, ptr %0, i64 56
  tail call void @_ZNSt6vectorISt10shared_ptrIN3imp7TextureEESaIS3_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #4
  %21 = getelementptr inbounds i8, ptr %0, i64 128
  %22 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN3imp7CubeMapEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %1) #4
  %23 = getelementptr inbounds i8, ptr %0, i64 36
  store i32 %2, ptr %23, align 4, !tbaa !31
  %24 = getelementptr inbounds i8, ptr %0, i64 41
  store i8 1, ptr %24, align 1, !tbaa !32
  %25 = tail call noundef zeroext i1 @_ZNKSt12__shared_ptrIN3imp7CubeMapELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %21) #4
  br i1 %25, label %26, label %115

26:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %27 = load ptr, ptr @__glewGenFramebuffers, align 8, !tbaa !33
  call void %27(i32 noundef 1, ptr noundef nonnull %5)
  %28 = load i32, ptr @_ZN3imp11FrameBuffer8_s_countE, align 4, !tbaa !34
  %29 = add i32 %28, 1
  store i32 %29, ptr @_ZN3imp11FrameBuffer8_s_countE, align 4, !tbaa !34
  %30 = load i32, ptr %5, align 4, !tbaa !34
  %31 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 %30, ptr %31, align 8, !tbaa !35
  %32 = load ptr, ptr @__glewBindFramebuffer, align 8, !tbaa !33
  call void %32(i32 noundef 36160, i32 noundef %30)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %33 unwind label %44

33:                                               ; preds = %26
  %34 = invoke noundef zeroext i1 @_Z12GLcheckErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKci(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.1, i32 noundef 147)
          to label %35 unwind label %46

35:                                               ; preds = %33
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  %36 = getelementptr inbounds i8, ptr %0, i64 80
  call void @_ZNSt6vectorIjSaIjEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #4
  %37 = load i32, ptr %19, align 8, !tbaa !30
  %38 = icmp sgt i32 %37, 0
  br i1 %38, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %35
  %39 = add nsw i32 %2, 34069
  br label %49

._crit_edge:                                      ; preds = %56, %35
  %40 = load ptr, ptr @__glewDrawBuffers, align 8, !tbaa !33
  %41 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #4
  %42 = trunc i64 %41 to i32
  %43 = call noundef ptr @_ZNSt6vectorIjSaIjEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #4
  call void %40(i32 noundef %42, ptr noundef %43)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %65 unwind label %87

44:                                               ; preds = %26
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %48

46:                                               ; preds = %33
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  br label %48

48:                                               ; preds = %46, %44
  %.pn = phi { ptr, i32 } [ %47, %46 ], [ %45, %44 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  br label %116

49:                                               ; preds = %.lr.ph, %56
  %.01530 = phi i32 [ 0, %.lr.ph ], [ %57, %56 ]
  %50 = load ptr, ptr @__glewFramebufferTexture2D, align 8, !tbaa !33
  %51 = add nuw nsw i32 %.01530, 36064
  %52 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp7CubeMapELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %21) #4
  %53 = call noundef i32 @_ZNK3imp7CubeMap10getVideoIDEv(ptr noundef nonnull align 8 dereferenceable(88) %52)
  call void %50(i32 noundef 36160, i32 noundef %51, i32 noundef %39, i32 noundef %53, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  store i32 %51, ptr %8, align 4, !tbaa !34
  call void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %36, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %54 unwind label %60

54:                                               ; preds = %49
  %55 = invoke noundef zeroext i1 @_Z12GLcheckErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKci(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.1, i32 noundef 154)
          to label %56 unwind label %62

56:                                               ; preds = %54
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  %57 = add nuw nsw i32 %.01530, 1
  %58 = load i32, ptr %19, align 8, !tbaa !30
  %59 = icmp slt i32 %57, %58
  br i1 %59, label %49, label %._crit_edge, !llvm.loop !36

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

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

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

65:                                               ; preds = %._crit_edge
  %66 = invoke noundef zeroext i1 @_Z12GLcheckErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKci(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull @.str.1, i32 noundef 157)
          to label %67 unwind label %89

67:                                               ; preds = %65
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #4
  %68 = getelementptr inbounds i8, ptr %0, i64 44
  store i32 1024, ptr %68, align 4, !tbaa !38
  %69 = getelementptr inbounds i8, ptr %0, i64 48
  store i32 1024, ptr %69, align 8, !tbaa !39
  %70 = load i8, ptr %18, align 8, !tbaa !5, !range !40, !noundef !41
  %71 = trunc nuw i8 %70 to i1
  br i1 %71, label %72, label %97

72:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #4
  %73 = getelementptr inbounds i8, ptr %0, i64 28
  %74 = load i32, ptr %73, align 4, !tbaa !42
  store i32 %74, ptr %13, align 4, !tbaa !34
  %75 = load ptr, ptr @__glewGenRenderbuffers, align 8, !tbaa !33
  call void %75(i32 noundef 1, ptr noundef nonnull %13)
  %76 = load i32, ptr %13, align 4, !tbaa !34
  store i32 %76, ptr %73, align 4, !tbaa !42
  %77 = load ptr, ptr @__glewBindRenderbuffer, align 8, !tbaa !33
  call void %77(i32 noundef 36161, i32 noundef %76)
  %78 = load ptr, ptr @__glewRenderbufferStorage, align 8, !tbaa !33
  %79 = load i32, ptr %68, align 4, !tbaa !38
  %80 = load i32, ptr %69, align 8, !tbaa !39
  call void %78(i32 noundef 36161, i32 noundef 33189, i32 noundef %79, i32 noundef %80)
  %81 = load ptr, ptr @__glewBindRenderbuffer, align 8, !tbaa !33
  call void %81(i32 noundef 36161, i32 noundef 0)
  %82 = load ptr, ptr @__glewFramebufferRenderbuffer, align 8, !tbaa !33
  %83 = load i32, ptr %13, align 4, !tbaa !34
  call void %82(i32 noundef 36160, i32 noundef 36096, i32 noundef 36161, i32 noundef %83)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull @.str.6, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %84 unwind label %92

84:                                               ; preds = %72
  %85 = invoke noundef zeroext i1 @_Z12GLcheckErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKci(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull @.str.1, i32 noundef 173)
          to label %86 unwind label %94

86:                                               ; preds = %84
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #4
  br label %97

87:                                               ; preds = %._crit_edge
  %88 = landingpad { ptr, i32 }
          cleanup
  br label %91

89:                                               ; preds = %65
  %90 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #4
  br label %91

91:                                               ; preds = %89, %87
  %.pn23 = phi { ptr, i32 } [ %90, %89 ], [ %88, %87 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #4
  br label %116

92:                                               ; preds = %72
  %93 = landingpad { ptr, i32 }
          cleanup
  br label %96

94:                                               ; preds = %84
  %95 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #4
  br label %96

96:                                               ; preds = %94, %92
  %.pn25 = phi { ptr, i32 } [ %95, %94 ], [ %93, %92 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #4
  br label %116

97:                                               ; preds = %86, %67
  %98 = load ptr, ptr @__glewCheckFramebufferStatus, align 8, !tbaa !33
  %99 = call i32 %98(i32 noundef 36160)
  %.not = icmp eq i32 %99, 36053
  br i1 %.not, label %113, label %100

100:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %16) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  %switch.tableidx = add i32 %99, -36054
  %101 = icmp ult i32 %switch.tableidx, 8
  br i1 %101, label %switch.hole_check, label %106

102:                                              ; preds = %switch.lookup, %110, %108, %106
  %103 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #4
  br label %116

switch.hole_check:                                ; preds = %100
  %switch.maskindex = trunc nuw i32 %switch.tableidx to i8
  %switch.shifted = lshr i8 -117, %switch.maskindex
  %switch.lobit = trunc i8 %switch.shifted to i1
  br i1 %switch.lobit, label %switch.lookup, label %106

switch.lookup:                                    ; preds = %switch.hole_check
  %104 = zext nneg i32 %switch.tableidx to i64
  %switch.gep = getelementptr inbounds [8 x ptr], ptr @switch.table._ZN3imp11FrameBuffer5buildERKSt10shared_ptrINS_7CubeMapEEib, i64 0, i64 %104
  %switch.load = load ptr, ptr %switch.gep, align 8
  %105 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull %switch.load)
          to label %106 unwind label %102

106:                                              ; preds = %switch.hole_check, %100, %switch.lookup
  %107 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.12)
          to label %108 unwind label %102

108:                                              ; preds = %106
  %109 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %107, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %110 unwind label %102

110:                                              ; preds = %108
  %111 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %109, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %112 unwind label %102

112:                                              ; preds = %110
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #4
  br label %113

113:                                              ; preds = %112, %97
  %114 = load ptr, ptr @__glewBindFramebuffer, align 8, !tbaa !33
  call void %114(i32 noundef 36160, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  br label %115

115:                                              ; preds = %4, %113
  ret void

116:                                              ; preds = %102, %96, %91, %64, %48
  %.pn27.pn = phi { ptr, i32 } [ %.pn27, %64 ], [ %103, %102 ], [ %.pn25, %96 ], [ %.pn23, %91 ], [ %.pn, %48 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  resume { ptr, i32 } %.pn27.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt10shared_ptrIN3imp7TextureEESaIS3_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN3imp7CubeMapEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt12__shared_ptrIN3imp7CubeMapELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp7CubeMapELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

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

; 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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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, !15, i64 40}
!6 = !{!"_ZTSN3imp11FrameBufferE", !7, i64 0, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !15, i64 40, !15, i64 41, !14, i64 44, !14, i64 48, !16, i64 56, !20, i64 80, !24, i64 104, !28, i64 128}
!7 = !{!"_ZTSN3imp6ObjectE", !8, i64 8}
!8 = !{!"_ZTSSt10shared_ptrIN3imp6ObjectEE", !9, i64 0}
!9 = !{!"_ZTSSt12__shared_ptrIN3imp6ObjectELN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0, !13, i64 8}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0}
!14 = !{!"int", !11, i64 0}
!15 = !{!"bool", !11, i64 0}
!16 = !{!"_ZTSSt6vectorISt10shared_ptrIN3imp7TextureEESaIS3_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN3imp7TextureEESaIS3_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3imp7TextureEESaIS3_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3imp7TextureEESaIS3_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!20 = !{!"_ZTSSt6vectorIjSaIjEE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!24 = !{!"_ZTSSt6vectorIN3imp4Vec4ESaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIN3imp4Vec4ESaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIN3imp4Vec4ESaIS1_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIN3imp4Vec4ESaIS1_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!28 = !{!"_ZTSSt10shared_ptrIN3imp7CubeMapEE", !29, i64 0}
!29 = !{!"_ZTSSt12__shared_ptrIN3imp7CubeMapELN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0, !13, i64 8}
!30 = !{!6, !14, i64 32}
!31 = !{!6, !14, i64 36}
!32 = !{!6, !15, i64 41}
!33 = !{!10, !10, i64 0}
!34 = !{!14, !14, i64 0}
!35 = !{!6, !14, i64 24}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = !{!6, !14, i64 44}
!39 = !{!6, !14, i64 48}
!40 = !{i8 0, i8 2}
!41 = !{}
!42 = !{!6, !14, i64 28}


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