; LLVM IR from ronan-kerviche/glip-lib :: GLIP-Lib/src/Core/HdlFBO.ll (ZN4Glip6CoreGL6HdlFBO14beginRenderingEib)

; 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::__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.0" = type { i8 }
%"class.Glip::CoreGL::HdlFBO" = type <{ %"class.Glip::CoreGL::HdlAbstractTextureFormat.base", [4 x i8], %"class.std::vector", i32, i8, [3 x i8], ptr, i8, [7 x i8] }>
%"class.Glip::CoreGL::HdlAbstractTextureFormat.base" = type <{ ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Glip::CoreGL::HdlTexture *, std::allocator<Glip::CoreGL::HdlTexture *>>::_Vector_impl" }
%"struct.std::_Vector_base<Glip::CoreGL::HdlTexture *, std::allocator<Glip::CoreGL::HdlTexture *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Glip::CoreGL::HdlTexture *, std::allocator<Glip::CoreGL::HdlTexture *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Glip::CoreGL::HdlTexture *, std::allocator<Glip::CoreGL::HdlTexture *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [86 x i8], align 1
@_ZTIN4Glip9ExceptionE = external constant ptr
@__glewBindFramebuffer = external global ptr, align 8
@__glewDrawBuffers = external global ptr, align 8
@.str.14 = external hidden unnamed_addr constant [2 x i8], align 1
@__glewFramebufferRenderbuffer = external global ptr, align 8
@_ZZN4Glip6CoreGL6HdlFBO14beginRenderingEibE15attachmentsList = external hidden constant [16 x i32], align 16
@.str.21 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [71 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

declare ptr @__cxa_allocate_exception(i64)

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 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 #2 align 2

declare void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZN4Glip9ExceptionD1Ev(ptr noundef nonnull align 8 dereferenceable(152)) unnamed_addr #4

declare void @__cxa_throw(ptr, ptr, ptr)

; 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

declare void @__cxa_free_exception(ptr)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) #5

; Function Attrs: nounwind
declare void @_ZN4Glip6CoreGL17getGLEnumNameSafeB5cxx11ERKj(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 4 dereferenceable(4)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #5

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Glip8toStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 4 dereferenceable(4)) #2

declare noundef i32 @_ZNK4Glip6CoreGL24HdlAbstractTextureFormat8getWidthEv(ptr noundef nonnull align 8 dereferenceable(52)) #3

declare noundef i32 @_ZNK4Glip6CoreGL24HdlAbstractTextureFormat9getHeightEv(ptr noundef nonnull align 8 dereferenceable(52)) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Glip6CoreGL6HdlFBO14beginRenderingEib(ptr noundef nonnull align 8 dereferenceable(97) %0, i32 noundef %1, i1 noundef zeroext %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i8, align 1
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca i64, align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator.0", align 1
  %17 = alloca i32, align 4
  %18 = alloca i1, align 1
  %19 = alloca i32, align 4
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %24 = alloca %"class.std::allocator.0", align 1
  %25 = alloca i32, align 4
  %26 = alloca i1, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  %27 = zext i1 %2 to i8
  store i8 %27, ptr %6, align 1, !tbaa !11
  %28 = load ptr, ptr %4, align 8
  %29 = load i32, ptr %5, align 4, !tbaa !9
  %30 = icmp eq i32 %29, 0
  br i1 %30, label %31, label %35

31:                                               ; preds = %3
  %32 = getelementptr inbounds %"class.Glip::CoreGL::HdlFBO", ptr %28, i32 0, i32 2
  %33 = call noundef i64 @_ZNKSt6vectorIPN4Glip6CoreGL10HdlTextureESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #6
  %34 = trunc i64 %33 to i32
  store i32 %34, ptr %5, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %31, %3
  %36 = load i32, ptr %5, align 4, !tbaa !9
  %37 = getelementptr inbounds %"class.Glip::CoreGL::HdlFBO", ptr %28, i32 0, i32 2
  %38 = call noundef i64 @_ZNKSt6vectorIPN4Glip6CoreGL10HdlTextureESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #6
  %39 = trunc i64 %38 to i32
  %40 = icmp sgt i32 %36, %39
  br i1 %40, label %41, label %89

41:                                               ; preds = %35
  store i1 true, ptr %18, align 1
  %42 = call ptr @__cxa_allocate_exception(i64 152) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #6
  invoke void @_ZN4Glip8toStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %43 unwind label %52

43:                                               ; preds = %41
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef @.str.21, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %44 unwind label %56

44:                                               ; preds = %43
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef @.str.22)
          to label %45 unwind label %60

45:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %46 = getelementptr inbounds %"class.Glip::CoreGL::HdlFBO", ptr %28, i32 0, i32 2
  %47 = call noundef i64 @_ZNKSt6vectorIPN4Glip6CoreGL10HdlTextureESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %46) #6
  store i64 %47, ptr %14, align 8, !tbaa !13
  invoke void @_ZN4Glip8toStringImEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %13, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %48 unwind label %64

48:                                               ; preds = %45
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %49 unwind label %68

49:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %50 unwind label %72

50:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 3, ptr %17, align 4, !tbaa !15
  invoke void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152) %42, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef %15, i32 noundef 317, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %51 unwind label %76

51:                                               ; preds = %50
  store i1 false, ptr %18, align 1
  invoke void @__cxa_throw(ptr %42, ptr @_ZTIN4Glip9ExceptionE, ptr @_ZN4Glip9ExceptionD1Ev) #7
          to label %153 unwind label %76

52:                                               ; preds = %41
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %11, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %12, align 4
  br label %85

56:                                               ; preds = %43
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %11, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %12, align 4
  br label %84

60:                                               ; preds = %44
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %11, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %12, align 4
  br label %83

64:                                               ; preds = %45
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %11, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %12, align 4
  br label %82

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

72:                                               ; preds = %49
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %11, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %12, align 4
  br label %80

76:                                               ; preds = %51, %50
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %11, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  br label %80

80:                                               ; preds = %76, %72
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  br label %81

81:                                               ; preds = %80, %68
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  br label %82

82:                                               ; preds = %81, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  br label %83

83:                                               ; preds = %82, %60
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  br label %84

84:                                               ; preds = %83, %56
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  br label %85

85:                                               ; preds = %84, %52
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #6
  %86 = load i1, ptr %18, align 1
  br i1 %86, label %87, label %88

87:                                               ; preds = %85
  call void @__cxa_free_exception(ptr %42) #6
  br label %88

88:                                               ; preds = %87, %85
  br label %148

89:                                               ; preds = %35
  %90 = getelementptr inbounds %"class.Glip::CoreGL::HdlFBO", ptr %28, i32 0, i32 4
  %91 = load i8, ptr %90, align 4, !tbaa !17, !range !24, !noundef !25
  %92 = trunc i8 %91 to i1
  br i1 %92, label %93, label %127

93:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %94 = call noundef i32 @_ZN4Glip6CoreGL6HdlFBO4testEv(ptr noundef nonnull align 8 dereferenceable(97) %28)
  store i32 %94, ptr %19, align 4, !tbaa !9
  %95 = load i32, ptr %19, align 4, !tbaa !9
  %96 = icmp ne i32 %95, 36053
  br i1 %96, label %97, label %125

97:                                               ; preds = %93
  store i1 true, ptr %26, align 1
  %98 = call ptr @__cxa_allocate_exception(i64 152) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #6
  call void @_ZN4Glip6CoreGL17getGLEnumNameSafeB5cxx11ERKj(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %22, ptr noundef nonnull align 4 dereferenceable(4) %19) #6
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %21, ptr noundef @.str.23, ptr noundef nonnull align 8 dereferenceable(32) %22)
          to label %99 unwind label %103

99:                                               ; preds = %97
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %20, ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef @.str.14)
          to label %100 unwind label %107

100:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %24)
          to label %101 unwind label %111

101:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  store i32 3, ptr %25, align 4, !tbaa !15
  invoke void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152) %98, ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef %23, i32 noundef 324, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %102 unwind label %115

102:                                              ; preds = %101
  store i1 false, ptr %26, align 1
  invoke void @__cxa_throw(ptr %98, ptr @_ZTIN4Glip9ExceptionE, ptr @_ZN4Glip9ExceptionD1Ev) #7
          to label %153 unwind label %115

103:                                              ; preds = %97
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %11, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %12, align 4
  br label %121

107:                                              ; preds = %99
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %11, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %12, align 4
  br label %120

111:                                              ; preds = %100
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %11, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %12, align 4
  br label %119

115:                                              ; preds = %102, %101
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %11, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #6
  br label %119

119:                                              ; preds = %115, %111
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #6
  br label %120

120:                                              ; preds = %119, %107
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #6
  br label %121

121:                                              ; preds = %120, %103
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #6
  %122 = load i1, ptr %26, align 1
  br i1 %122, label %123, label %124

123:                                              ; preds = %121
  call void @__cxa_free_exception(ptr %98) #6
  br label %124

124:                                              ; preds = %123, %121
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %148

125:                                              ; preds = %93
  %126 = getelementptr inbounds %"class.Glip::CoreGL::HdlFBO", ptr %28, i32 0, i32 4
  store i8 0, ptr %126, align 4, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %127

127:                                              ; preds = %125, %89
  %128 = load ptr, ptr @__glewBindFramebuffer, align 8, !tbaa !5
  %129 = getelementptr inbounds %"class.Glip::CoreGL::HdlFBO", ptr %28, i32 0, i32 3
  %130 = load i32, ptr %129, align 8, !tbaa !26
  call void %128(i32 noundef 36160, i32 noundef %130)
  %131 = getelementptr inbounds %"class.Glip::CoreGL::HdlFBO", ptr %28, i32 0, i32 6
  %132 = load ptr, ptr %131, align 8, !tbaa !27
  %133 = icmp ne ptr %132, null
  br i1 %133, label %134, label %143

134:                                              ; preds = %127
  %135 = load i8, ptr %6, align 1, !tbaa !11, !range !24, !noundef !25
  %136 = trunc i8 %135 to i1
  br i1 %136, label %137, label %143

137:                                              ; preds = %134
  %138 = load ptr, ptr @__glewFramebufferRenderbuffer, align 8, !tbaa !5
  %139 = getelementptr inbounds %"class.Glip::CoreGL::HdlFBO", ptr %28, i32 0, i32 6
  %140 = load ptr, ptr %139, align 8, !tbaa !27
  %141 = call noundef i32 @_ZNK4Glip6CoreGL15HdlRenderBuffer5getIDEv(ptr noundef nonnull align 8 dereferenceable(24) %140)
  call void %138(i32 noundef 36160, i32 noundef 36096, i32 noundef 36161, i32 noundef %141)
  %142 = getelementptr inbounds %"class.Glip::CoreGL::HdlFBO", ptr %28, i32 0, i32 7
  store i8 1, ptr %142, align 8, !tbaa !28
  br label %143

143:                                              ; preds = %137, %134, %127
  %144 = load ptr, ptr @__glewDrawBuffers, align 8, !tbaa !5
  %145 = load i32, ptr %5, align 4, !tbaa !9
  call void %144(i32 noundef %145, ptr noundef @_ZZN4Glip6CoreGL6HdlFBO14beginRenderingEibE15attachmentsList)
  %146 = call noundef i32 @_ZNK4Glip6CoreGL24HdlAbstractTextureFormat8getWidthEv(ptr noundef nonnull align 8 dereferenceable(52) %28)
  %147 = call noundef i32 @_ZNK4Glip6CoreGL24HdlAbstractTextureFormat9getHeightEv(ptr noundef nonnull align 8 dereferenceable(52) %28)
  call void @glViewport(i32 noundef 0, i32 noundef 0, i32 noundef %146, i32 noundef %147)
  ret void

148:                                              ; preds = %124, %88
  %149 = load ptr, ptr %11, align 8
  %150 = load i32, ptr %12, align 4
  %151 = insertvalue { ptr, i32 } poison, ptr %149, 0
  %152 = insertvalue { ptr, i32 } %151, i32 %150, 1
  resume { ptr, i32 } %152

153:                                              ; preds = %102, %51
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Glip8toStringImEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4Glip6CoreGL6HdlFBO4testEv(ptr noundef nonnull align 8 dereferenceable(97)) #2 align 2

declare void @glViewport(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #3

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

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

!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 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"_ZTSN4Glip9Exception4TypeE", !7, i64 0}
!17 = !{!18, !12, i64 84}
!18 = !{!"_ZTSN4Glip6CoreGL6HdlFBOE", !19, i64 0, !20, i64 56, !10, i64 80, !12, i64 84, !6, i64 88, !12, i64 96}
!19 = !{!"_ZTSN4Glip6CoreGL24HdlAbstractTextureFormatE", !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48}
!20 = !{!"_ZTSSt6vectorIPN4Glip6CoreGL10HdlTextureESaIS3_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIPN4Glip6CoreGL10HdlTextureESaIS3_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIPN4Glip6CoreGL10HdlTextureESaIS3_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIPN4Glip6CoreGL10HdlTextureESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{!18, !10, i64 80}
!27 = !{!18, !6, i64 88}
!28 = !{!18, !12, i64 96}


; 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::__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.0" = type { i8 }

@.str.2 = external hidden unnamed_addr constant [86 x i8], align 1
@_ZTIN4Glip9ExceptionE = external constant ptr
@__glewBindFramebuffer = external local_unnamed_addr global ptr, align 8
@__glewDrawBuffers = external local_unnamed_addr global ptr, align 8
@.str.14 = external hidden unnamed_addr constant [2 x i8], align 1
@__glewFramebufferRenderbuffer = external local_unnamed_addr global ptr, align 8
@_ZZN4Glip6CoreGL6HdlFBO14beginRenderingEibE15attachmentsList = external hidden constant [16 x i32], align 16
@.str.21 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [71 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 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 #2 align 2

declare void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZN4Glip9ExceptionD1Ev(ptr noundef nonnull align 8 dereferenceable(152)) unnamed_addr #4

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

; 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

; Function Attrs: nounwind
declare void @_ZN4Glip6CoreGL17getGLEnumNameSafeB5cxx11ERKj(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Glip8toStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

declare noundef i32 @_ZNK4Glip6CoreGL24HdlAbstractTextureFormat8getWidthEv(ptr noundef nonnull align 8 dereferenceable(52)) local_unnamed_addr #3

declare noundef i32 @_ZNK4Glip6CoreGL24HdlAbstractTextureFormat9getHeightEv(ptr noundef nonnull align 8 dereferenceable(52)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Glip6CoreGL6HdlFBO14beginRenderingEib(ptr noundef nonnull align 8 dereferenceable(97) %0, i32 noundef %1, i1 noundef zeroext %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca i64, align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator.0", align 1
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::allocator.0", align 1
  %20 = alloca i32, align 4
  store i32 %1, ptr %4, align 4, !tbaa !5
  %21 = icmp eq i32 %1, 0
  br i1 %21, label %22, label %26

22:                                               ; preds = %3
  %23 = getelementptr inbounds i8, ptr %0, i64 56
  %24 = tail call noundef i64 @_ZNKSt6vectorIPN4Glip6CoreGL10HdlTextureESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  %25 = trunc i64 %24 to i32
  store i32 %25, ptr %4, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %22, %3
  %27 = phi i32 [ %25, %22 ], [ %1, %3 ]
  %28 = getelementptr inbounds i8, ptr %0, i64 56
  %29 = tail call noundef i64 @_ZNKSt6vectorIPN4Glip6CoreGL10HdlTextureESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #6
  %30 = trunc i64 %29 to i32
  %31 = icmp sgt i32 %27, %30
  br i1 %31, label %32, label %59

32:                                               ; preds = %26
  %33 = tail call ptr @__cxa_allocate_exception(i64 152) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #6
  invoke void @_ZN4Glip8toStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %34 unwind label %.thread

34:                                               ; preds = %32
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull @.str.21, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %35 unwind label %.thread43

35:                                               ; preds = %34
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.22)
          to label %36 unwind label %44

36:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %37 = call noundef i64 @_ZNKSt6vectorIPN4Glip6CoreGL10HdlTextureESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #6
  store i64 %37, ptr %10, align 8, !tbaa !9
  invoke void @_ZN4Glip8toStringImEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %38 unwind label %46

38:                                               ; preds = %36
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %39 unwind label %48

39:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  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 %40 unwind label %50

40:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #6
  store i32 3, ptr %13, align 4, !tbaa !11
  invoke void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152) %33, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull %11, i32 noundef 317, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %41 unwind label %52

41:                                               ; preds = %40
  invoke void @__cxa_throw(ptr nonnull %33, ptr nonnull @_ZTIN4Glip9ExceptionE, ptr nonnull @_ZN4Glip9ExceptionD1Ev) #7
          to label %98 unwind label %52

.thread:                                          ; preds = %32
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  br label %58

.thread43:                                        ; preds = %34
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  br label %58

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

46:                                               ; preds = %36
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %56

48:                                               ; preds = %38
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %55

50:                                               ; preds = %39
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %54

52:                                               ; preds = %41, %40
  %.05 = phi i1 [ false, %41 ], [ true, %40 ]
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  br label %54

54:                                               ; preds = %52, %50
  %.pn31 = phi { ptr, i32 } [ %53, %52 ], [ %51, %50 ]
  %.16 = phi i1 [ %.05, %52 ], [ true, %50 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  br label %55

55:                                               ; preds = %54, %48
  %.pn31.pn = phi { ptr, i32 } [ %.pn31, %54 ], [ %49, %48 ]
  %.27 = phi i1 [ %.16, %54 ], [ true, %48 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  br label %56

56:                                               ; preds = %55, %46
  %.pn31.pn.pn = phi { ptr, i32 } [ %.pn31.pn, %55 ], [ %47, %46 ]
  %.38 = phi i1 [ %.27, %55 ], [ true, %46 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  br label %57

57:                                               ; preds = %44, %56
  %.pn31.pn.pn.pn = phi { ptr, i32 } [ %.pn31.pn.pn, %56 ], [ %45, %44 ]
  %.4 = phi i1 [ %.38, %56 ], [ true, %44 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  br i1 %.4, label %58, label %97

58:                                               ; preds = %.thread43, %.thread, %57
  %.pn31.pn.pn.pn.pn.pn42 = phi { ptr, i32 } [ %42, %.thread ], [ %.pn31.pn.pn.pn, %57 ], [ %43, %.thread43 ]
  call void @__cxa_free_exception(ptr %33) #6
  br label %97

59:                                               ; preds = %26
  %60 = getelementptr inbounds i8, ptr %0, i64 84
  %61 = load i8, ptr %60, align 4, !tbaa !13, !range !22, !noundef !23
  %62 = trunc nuw i8 %61 to i1
  br i1 %62, label %63, label %83

63:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #6
  %64 = tail call noundef i32 @_ZN4Glip6CoreGL6HdlFBO4testEv(ptr noundef nonnull align 8 dereferenceable(97) %0)
  store i32 %64, ptr %14, align 4, !tbaa !5
  %.not = icmp eq i32 %64, 36053
  br i1 %.not, label %82, label %65

65:                                               ; preds = %63
  %66 = tail call ptr @__cxa_allocate_exception(i64 152) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %16) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %17) #6
  call void @_ZN4Glip6CoreGL17getGLEnumNameSafeB5cxx11ERKj(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %17, ptr noundef nonnull align 4 dereferenceable(4) %14) #6
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef nonnull @.str.23, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %67 unwind label %.thread46

67:                                               ; preds = %65
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull @.str.14)
          to label %68 unwind label %72

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

69:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #6
  store i32 3, ptr %20, align 4, !tbaa !11
  invoke void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152) %66, ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull %18, i32 noundef 324, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %70 unwind label %76

70:                                               ; preds = %69
  invoke void @__cxa_throw(ptr nonnull %66, ptr nonnull @_ZTIN4Glip9ExceptionE, ptr nonnull @_ZN4Glip9ExceptionD1Ev) #7
          to label %98 unwind label %76

.thread46:                                        ; preds = %65
  %71 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #6
  br label %80

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

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

76:                                               ; preds = %70, %69
  %.0 = phi i1 [ false, %70 ], [ true, %69 ]
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #6
  br label %78

78:                                               ; preds = %76, %74
  %.pn = phi { ptr, i32 } [ %77, %76 ], [ %75, %74 ]
  %.1 = phi i1 [ %.0, %76 ], [ true, %74 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  br label %79

79:                                               ; preds = %72, %78
  %.pn.pn = phi { ptr, i32 } [ %.pn, %78 ], [ %73, %72 ]
  %.2 = phi i1 [ %.1, %78 ], [ true, %72 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #6
  br i1 %.2, label %80, label %81

80:                                               ; preds = %.thread46, %79
  %.pn.pn.pn50 = phi { ptr, i32 } [ %71, %.thread46 ], [ %.pn.pn, %79 ]
  call void @__cxa_free_exception(ptr %66) #6
  br label %81

81:                                               ; preds = %80, %79
  %.pn.pn.pn49 = phi { ptr, i32 } [ %.pn.pn.pn50, %80 ], [ %.pn.pn, %79 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #6
  br label %97

82:                                               ; preds = %63
  store i8 0, ptr %60, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #6
  br label %83

83:                                               ; preds = %82, %59
  %84 = load ptr, ptr @__glewBindFramebuffer, align 8, !tbaa !24
  %85 = getelementptr inbounds i8, ptr %0, i64 80
  %86 = load i32, ptr %85, align 8, !tbaa !25
  tail call void %84(i32 noundef 36160, i32 noundef %86)
  %87 = getelementptr inbounds i8, ptr %0, i64 88
  %88 = load ptr, ptr %87, align 8, !tbaa !26
  %.not27 = icmp ne ptr %88, null
  %brmerge.not = and i1 %.not27, %2
  br i1 %brmerge.not, label %89, label %93

89:                                               ; preds = %83
  %90 = load ptr, ptr @__glewFramebufferRenderbuffer, align 8, !tbaa !24
  %91 = tail call noundef i32 @_ZNK4Glip6CoreGL15HdlRenderBuffer5getIDEv(ptr noundef nonnull align 8 dereferenceable(24) %88)
  tail call void %90(i32 noundef 36160, i32 noundef 36096, i32 noundef 36161, i32 noundef %91)
  %92 = getelementptr inbounds i8, ptr %0, i64 96
  store i8 1, ptr %92, align 8, !tbaa !27
  br label %93

93:                                               ; preds = %83, %89
  %94 = load ptr, ptr @__glewDrawBuffers, align 8, !tbaa !24
  tail call void %94(i32 noundef %27, ptr noundef nonnull @_ZZN4Glip6CoreGL6HdlFBO14beginRenderingEibE15attachmentsList)
  %95 = tail call noundef i32 @_ZNK4Glip6CoreGL24HdlAbstractTextureFormat8getWidthEv(ptr noundef nonnull align 8 dereferenceable(52) %0)
  %96 = tail call noundef i32 @_ZNK4Glip6CoreGL24HdlAbstractTextureFormat9getHeightEv(ptr noundef nonnull align 8 dereferenceable(52) %0)
  tail call void @glViewport(i32 noundef 0, i32 noundef 0, i32 noundef %95, i32 noundef %96)
  ret void

97:                                               ; preds = %57, %58, %81
  %.pn31.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn31.pn.pn.pn.pn.pn42, %58 ], [ %.pn31.pn.pn.pn, %57 ], [ %.pn.pn.pn49, %81 ]
  resume { ptr, i32 } %.pn31.pn.pn.pn.pn.pn.pn

98:                                               ; preds = %70, %41
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Glip8toStringImEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4Glip6CoreGL6HdlFBO4testEv(ptr noundef nonnull align 8 dereferenceable(97)) local_unnamed_addr #2 align 2

declare void @glViewport(i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

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

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

!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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTSN4Glip9Exception4TypeE", !7, i64 0}
!13 = !{!14, !21, i64 84}
!14 = !{!"_ZTSN4Glip6CoreGL6HdlFBOE", !15, i64 0, !16, i64 56, !6, i64 80, !21, i64 84, !20, i64 88, !21, i64 96}
!15 = !{!"_ZTSN4Glip6CoreGL24HdlAbstractTextureFormatE", !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48}
!16 = !{!"_ZTSSt6vectorIPN4Glip6CoreGL10HdlTextureESaIS3_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIPN4Glip6CoreGL10HdlTextureESaIS3_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIPN4Glip6CoreGL10HdlTextureESaIS3_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIPN4Glip6CoreGL10HdlTextureESaIS3_EE17_Vector_impl_dataE", !20, i64 0, !20, i64 8, !20, i64 16}
!20 = !{!"any pointer", !7, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!20, !20, i64 0}
!25 = !{!14, !6, i64 80}
!26 = !{!14, !20, i64 88}
!27 = !{!14, !21, i64 96}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass