; LLVM IR from filipwasil/fillwave :: src/flc/rendering (Texture2DRenderable)

; 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::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"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.flw::flc::Texture2DRenderable" = type <{ ptr, %"class.flw::flc::Texture2D", %"class.flw::flc::Framebuffer", i32, [4 x i8] }>
%"class.flw::flc::Texture2D" = type { %"class.flw::flc::Texture", %"class.std::unique_ptr", %"class.std::vector" }
%"class.flw::flc::Texture" = type { i32, [10 x i32] }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.1" }
%"struct.std::_Head_base.1" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.flw::flc::Framebuffer" = type <{ ptr, i32, [10 x i32], [4 x i8] }>

@_ZL5_tag_B5cxx11 = external hidden global %"class.std::__cxx11::basic_string", align 8
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [33 x i8], align 1
@glad_glDrawBuffer = external global ptr, align 8
@glad_glReadBuffer = external global ptr, align 8
@.str.10 = external hidden unnamed_addr constant [32 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3flw3flc19Texture2DRenderable13setAttachmentEjj(ptr noundef nonnull align 8 dereferenceable(148) %0, i32 noundef %1, i32 noundef %2) #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca [256 x i8], align 16
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %15 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca [256 x i8], align 16
  %19 = alloca i32, align 4
  %20 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %21 = alloca i32, align 4
  %22 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %23 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %24 = alloca i32, align 4
  %25 = alloca [256 x i8], align 16
  %26 = alloca i32, align 4
  %27 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %28 = alloca i32, align 4
  %29 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %30 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  %31 = load ptr, ptr %4, align 8
  %32 = load i32, ptr %5, align 4, !tbaa !9
  switch i32 %32, label %243 [
    i32 33306, label %33
    i32 36096, label %102
    i32 36064, label %173
  ]

33:                                               ; preds = %3
  %34 = getelementptr inbounds %"class.flw::flc::Texture2DRenderable", ptr %31, i32 0, i32 1
  call void @_ZN3flw3flc9Texture2D4bindEj(ptr noundef nonnull align 8 dereferenceable(80) %34, i32 noundef 0)
  call void @_ZN3flw3flc19Texture2DRenderable16bindForRenderingEv(ptr noundef nonnull align 8 dereferenceable(148) %31)
  %35 = getelementptr inbounds %"class.flw::flc::Texture2DRenderable", ptr %31, i32 0, i32 2
  %36 = load i32, ptr %6, align 4, !tbaa !9
  %37 = getelementptr inbounds %"class.flw::flc::Texture2DRenderable", ptr %31, i32 0, i32 1
  %38 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %37, i32 0, i32 0
  %39 = call noundef i32 @_ZN3flw3flc7Texture9getHandleEj(ptr noundef nonnull align 4 dereferenceable(44) %38, i32 noundef 0)
  call void @_ZN3flw3flc11Framebuffer15attachTexture2DEjjj(ptr noundef nonnull align 8 dereferenceable(52) %35, i32 noundef 33306, i32 noundef %36, i32 noundef %39)
  br label %40

40:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %41 = call noundef i32 @_Z10getGlErrorv()
  store i32 %41, ptr %7, align 4, !tbaa !9
  %42 = load i32, ptr %7, align 4, !tbaa !9
  %43 = icmp ne i32 0, %42
  br i1 %43, label %44, label %100

44:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 256, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %45 = getelementptr inbounds [256 x i8], ptr %8, i64 0, i64 0
  %46 = load i32, ptr %7, align 4, !tbaa !9
  %47 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %45, ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef %46) #7
  store i32 %47, ptr %9, align 4, !tbaa !9
  %48 = load i32, ptr %9, align 4, !tbaa !9
  %49 = icmp sgt i32 %48, 0
  br i1 %49, label %50, label %63

50:                                               ; preds = %44
  br label %51

51:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 392, ptr %10) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %10)
  %52 = getelementptr inbounds i8, ptr %10, i64 16
  %53 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef @.str.5)
          to label %54 unwind label %59

54:                                               ; preds = %51
  %55 = getelementptr inbounds [256 x i8], ptr %8, i64 0, i64 0
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_PcEEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %10, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef @.str.6, i32 noundef 72, ptr noundef @.str.7, ptr noundef %55)
          to label %56 unwind label %59

56:                                               ; preds = %54
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %10) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %10) #7
  br label %57

57:                                               ; preds = %56
  br label %58

58:                                               ; preds = %57
  br label %63

59:                                               ; preds = %54, %51
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %11, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %12, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %10) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %10) #7
  br label %99

63:                                               ; preds = %58, %44
  %64 = load i32, ptr %7, align 4, !tbaa !9
  %65 = icmp eq i32 %64, 1286
  br i1 %65, label %66, label %87

66:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %67 = call noundef i32 @_Z20getFramebufferStatusv()
  store i32 %67, ptr %13, align 4, !tbaa !9
  %68 = getelementptr inbounds [256 x i8], ptr %8, i64 0, i64 0
  %69 = load i32, ptr %13, align 4, !tbaa !9
  %70 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %68, ptr noundef @.str.3, ptr noundef @.str.8, i32 noundef %69) #7
  store i32 %70, ptr %9, align 4, !tbaa !9
  %71 = load i32, ptr %9, align 4, !tbaa !9
  %72 = icmp sgt i32 %71, 0
  br i1 %72, label %73, label %86

73:                                               ; preds = %66
  br label %74

74:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 392, ptr %14) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %14)
  %75 = getelementptr inbounds i8, ptr %14, i64 16
  %76 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %75, ptr noundef @.str.5)
          to label %77 unwind label %82

77:                                               ; preds = %74
  %78 = getelementptr inbounds [256 x i8], ptr %8, i64 0, i64 0
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_PcEEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %14, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef @.str.6, i32 noundef 72, ptr noundef @.str.7, ptr noundef %78)
          to label %79 unwind label %82

79:                                               ; preds = %77
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %14) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %14) #7
  br label %80

80:                                               ; preds = %79
  br label %81

81:                                               ; preds = %80
  br label %86

82:                                               ; preds = %77, %74
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %11, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %12, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %14) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %99

86:                                               ; preds = %81, %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %87

87:                                               ; preds = %86, %63
  br label %88

88:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 392, ptr %15) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %15)
  %89 = getelementptr inbounds i8, ptr %15, i64 16
  %90 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %89, ptr noundef @.str.5)
          to label %91 unwind label %95

91:                                               ; preds = %88
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_S7_EEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %15, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef @.str.6, i32 noundef 72, ptr noundef @.str.7, ptr noundef @.str.9)
          to label %92 unwind label %95

92:                                               ; preds = %91
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %15) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %15) #7
  br label %93

93:                                               ; preds = %92
  br label %94

94:                                               ; preds = %93
  call void @abort() #8
  unreachable

95:                                               ; preds = %91, %88
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %11, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %12, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %15) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %15) #7
  br label %99

99:                                               ; preds = %95, %82, %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %244

100:                                              ; preds = %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %101

101:                                              ; preds = %100
  call void @_ZN3flw3flc11Framebuffer21bindScreenFramebufferEv()
  br label %243

102:                                              ; preds = %3
  %103 = getelementptr inbounds %"class.flw::flc::Texture2DRenderable", ptr %31, i32 0, i32 1
  call void @_ZN3flw3flc9Texture2D4bindEj(ptr noundef nonnull align 8 dereferenceable(80) %103, i32 noundef 0)
  call void @_ZN3flw3flc19Texture2DRenderable16bindForRenderingEv(ptr noundef nonnull align 8 dereferenceable(148) %31)
  %104 = getelementptr inbounds %"class.flw::flc::Texture2DRenderable", ptr %31, i32 0, i32 2
  %105 = load i32, ptr %6, align 4, !tbaa !9
  %106 = getelementptr inbounds %"class.flw::flc::Texture2DRenderable", ptr %31, i32 0, i32 1
  %107 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %106, i32 0, i32 0
  %108 = call noundef i32 @_ZN3flw3flc7Texture9getHandleEj(ptr noundef nonnull align 4 dereferenceable(44) %107, i32 noundef 0)
  call void @_ZN3flw3flc11Framebuffer15attachTexture2DEjjj(ptr noundef nonnull align 8 dereferenceable(52) %104, i32 noundef 36096, i32 noundef %105, i32 noundef %108)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !9
  %109 = load ptr, ptr @glad_glDrawBuffer, align 8, !tbaa !5
  call void %109(i32 noundef 0)
  %110 = load ptr, ptr @glad_glReadBuffer, align 8, !tbaa !5
  call void %110(i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %111

111:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %112 = call noundef i32 @_Z10getGlErrorv()
  store i32 %112, ptr %17, align 4, !tbaa !9
  %113 = load i32, ptr %17, align 4, !tbaa !9
  %114 = icmp ne i32 0, %113
  br i1 %114, label %115, label %171

115:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 256, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %116 = getelementptr inbounds [256 x i8], ptr %18, i64 0, i64 0
  %117 = load i32, ptr %17, align 4, !tbaa !9
  %118 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %116, ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef %117) #7
  store i32 %118, ptr %19, align 4, !tbaa !9
  %119 = load i32, ptr %19, align 4, !tbaa !9
  %120 = icmp sgt i32 %119, 0
  br i1 %120, label %121, label %134

121:                                              ; preds = %115
  br label %122

122:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 392, ptr %20) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %20)
  %123 = getelementptr inbounds i8, ptr %20, i64 16
  %124 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %123, ptr noundef @.str.5)
          to label %125 unwind label %130

125:                                              ; preds = %122
  %126 = getelementptr inbounds [256 x i8], ptr %18, i64 0, i64 0
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_PcEEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %20, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef @.str.6, i32 noundef 94, ptr noundef @.str.7, ptr noundef %126)
          to label %127 unwind label %130

127:                                              ; preds = %125
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %20) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %20) #7
  br label %128

128:                                              ; preds = %127
  br label %129

129:                                              ; preds = %128
  br label %134

130:                                              ; preds = %125, %122
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %11, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %12, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %20) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %20) #7
  br label %170

134:                                              ; preds = %129, %115
  %135 = load i32, ptr %17, align 4, !tbaa !9
  %136 = icmp eq i32 %135, 1286
  br i1 %136, label %137, label %158

137:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %138 = call noundef i32 @_Z20getFramebufferStatusv()
  store i32 %138, ptr %21, align 4, !tbaa !9
  %139 = getelementptr inbounds [256 x i8], ptr %18, i64 0, i64 0
  %140 = load i32, ptr %21, align 4, !tbaa !9
  %141 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %139, ptr noundef @.str.3, ptr noundef @.str.8, i32 noundef %140) #7
  store i32 %141, ptr %19, align 4, !tbaa !9
  %142 = load i32, ptr %19, align 4, !tbaa !9
  %143 = icmp sgt i32 %142, 0
  br i1 %143, label %144, label %157

144:                                              ; preds = %137
  br label %145

145:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 392, ptr %22) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %22)
  %146 = getelementptr inbounds i8, ptr %22, i64 16
  %147 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %146, ptr noundef @.str.5)
          to label %148 unwind label %153

148:                                              ; preds = %145
  %149 = getelementptr inbounds [256 x i8], ptr %18, i64 0, i64 0
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_PcEEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %22, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef @.str.6, i32 noundef 94, ptr noundef @.str.7, ptr noundef %149)
          to label %150 unwind label %153

150:                                              ; preds = %148
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %22) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %22) #7
  br label %151

151:                                              ; preds = %150
  br label %152

152:                                              ; preds = %151
  br label %157

153:                                              ; preds = %148, %145
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %11, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %12, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %22) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %170

157:                                              ; preds = %152, %137
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %158

158:                                              ; preds = %157, %134
  br label %159

159:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 392, ptr %23) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %23)
  %160 = getelementptr inbounds i8, ptr %23, i64 16
  %161 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %160, ptr noundef @.str.5)
          to label %162 unwind label %166

162:                                              ; preds = %159
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_S7_EEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %23, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef @.str.6, i32 noundef 94, ptr noundef @.str.7, ptr noundef @.str.9)
          to label %163 unwind label %166

163:                                              ; preds = %162
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %23) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %23) #7
  br label %164

164:                                              ; preds = %163
  br label %165

165:                                              ; preds = %164
  call void @abort() #8
  unreachable

166:                                              ; preds = %162, %159
  %167 = landingpad { ptr, i32 }
          cleanup
  %168 = extractvalue { ptr, i32 } %167, 0
  store ptr %168, ptr %11, align 8
  %169 = extractvalue { ptr, i32 } %167, 1
  store i32 %169, ptr %12, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %23) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %23) #7
  br label %170

170:                                              ; preds = %166, %153, %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %244

171:                                              ; preds = %111
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %172

172:                                              ; preds = %171
  call void @_ZN3flw3flc11Framebuffer21bindScreenFramebufferEv()
  br label %243

173:                                              ; preds = %3
  %174 = getelementptr inbounds %"class.flw::flc::Texture2DRenderable", ptr %31, i32 0, i32 1
  call void @_ZN3flw3flc9Texture2D4bindEj(ptr noundef nonnull align 8 dereferenceable(80) %174, i32 noundef 0)
  call void @_ZN3flw3flc19Texture2DRenderable16bindForRenderingEv(ptr noundef nonnull align 8 dereferenceable(148) %31)
  %175 = getelementptr inbounds %"class.flw::flc::Texture2DRenderable", ptr %31, i32 0, i32 2
  %176 = load i32, ptr %6, align 4, !tbaa !9
  %177 = getelementptr inbounds %"class.flw::flc::Texture2DRenderable", ptr %31, i32 0, i32 1
  %178 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %177, i32 0, i32 0
  %179 = call noundef i32 @_ZN3flw3flc7Texture9getHandleEj(ptr noundef nonnull align 4 dereferenceable(44) %178, i32 noundef 0)
  call void @_ZN3flw3flc11Framebuffer15attachTexture2DEjjj(ptr noundef nonnull align 8 dereferenceable(52) %175, i32 noundef 36064, i32 noundef %176, i32 noundef %179)
  br label %180

180:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %181 = call noundef i32 @_Z10getGlErrorv()
  store i32 %181, ptr %24, align 4, !tbaa !9
  %182 = load i32, ptr %24, align 4, !tbaa !9
  %183 = icmp ne i32 0, %182
  br i1 %183, label %184, label %240

184:                                              ; preds = %180
  call void @llvm.lifetime.start.p0(i64 256, ptr %25) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %185 = getelementptr inbounds [256 x i8], ptr %25, i64 0, i64 0
  %186 = load i32, ptr %24, align 4, !tbaa !9
  %187 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %185, ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef %186) #7
  store i32 %187, ptr %26, align 4, !tbaa !9
  %188 = load i32, ptr %26, align 4, !tbaa !9
  %189 = icmp sgt i32 %188, 0
  br i1 %189, label %190, label %203

190:                                              ; preds = %184
  br label %191

191:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 392, ptr %27) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %27)
  %192 = getelementptr inbounds i8, ptr %27, i64 16
  %193 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %192, ptr noundef @.str.5)
          to label %194 unwind label %199

194:                                              ; preds = %191
  %195 = getelementptr inbounds [256 x i8], ptr %25, i64 0, i64 0
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_PcEEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %27, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef @.str.6, i32 noundef 101, ptr noundef @.str.7, ptr noundef %195)
          to label %196 unwind label %199

196:                                              ; preds = %194
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %27) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %27) #7
  br label %197

197:                                              ; preds = %196
  br label %198

198:                                              ; preds = %197
  br label %203

199:                                              ; preds = %194, %191
  %200 = landingpad { ptr, i32 }
          cleanup
  %201 = extractvalue { ptr, i32 } %200, 0
  store ptr %201, ptr %11, align 8
  %202 = extractvalue { ptr, i32 } %200, 1
  store i32 %202, ptr %12, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %27) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %27) #7
  br label %239

203:                                              ; preds = %198, %184
  %204 = load i32, ptr %24, align 4, !tbaa !9
  %205 = icmp eq i32 %204, 1286
  br i1 %205, label %206, label %227

206:                                              ; preds = %203
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  %207 = call noundef i32 @_Z20getFramebufferStatusv()
  store i32 %207, ptr %28, align 4, !tbaa !9
  %208 = getelementptr inbounds [256 x i8], ptr %25, i64 0, i64 0
  %209 = load i32, ptr %28, align 4, !tbaa !9
  %210 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %208, ptr noundef @.str.3, ptr noundef @.str.8, i32 noundef %209) #7
  store i32 %210, ptr %26, align 4, !tbaa !9
  %211 = load i32, ptr %26, align 4, !tbaa !9
  %212 = icmp sgt i32 %211, 0
  br i1 %212, label %213, label %226

213:                                              ; preds = %206
  br label %214

214:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 392, ptr %29) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %29)
  %215 = getelementptr inbounds i8, ptr %29, i64 16
  %216 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %215, ptr noundef @.str.5)
          to label %217 unwind label %222

217:                                              ; preds = %214
  %218 = getelementptr inbounds [256 x i8], ptr %25, i64 0, i64 0
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_PcEEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %29, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef @.str.6, i32 noundef 101, ptr noundef @.str.7, ptr noundef %218)
          to label %219 unwind label %222

219:                                              ; preds = %217
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %29) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %29) #7
  br label %220

220:                                              ; preds = %219
  br label %221

221:                                              ; preds = %220
  br label %226

222:                                              ; preds = %217, %214
  %223 = landingpad { ptr, i32 }
          cleanup
  %224 = extractvalue { ptr, i32 } %223, 0
  store ptr %224, ptr %11, align 8
  %225 = extractvalue { ptr, i32 } %223, 1
  store i32 %225, ptr %12, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %29) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %239

226:                                              ; preds = %221, %206
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %227

227:                                              ; preds = %226, %203
  br label %228

228:                                              ; preds = %227
  call void @llvm.lifetime.start.p0(i64 392, ptr %30) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %30)
  %229 = getelementptr inbounds i8, ptr %30, i64 16
  %230 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %229, ptr noundef @.str.5)
          to label %231 unwind label %235

231:                                              ; preds = %228
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_S7_EEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %30, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef @.str.6, i32 noundef 101, ptr noundef @.str.7, ptr noundef @.str.10)
          to label %232 unwind label %235

232:                                              ; preds = %231
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %30) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %30) #7
  br label %233

233:                                              ; preds = %232
  br label %234

234:                                              ; preds = %233
  call void @abort() #8
  unreachable

235:                                              ; preds = %231, %228
  %236 = landingpad { ptr, i32 }
          cleanup
  %237 = extractvalue { ptr, i32 } %236, 0
  store ptr %237, ptr %11, align 8
  %238 = extractvalue { ptr, i32 } %236, 1
  store i32 %238, ptr %12, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %30) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %30) #7
  br label %239

239:                                              ; preds = %235, %222, %199
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %244

240:                                              ; preds = %180
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %241

241:                                              ; preds = %240
  %242 = getelementptr inbounds %"class.flw::flc::Texture2DRenderable", ptr %31, i32 0, i32 1
  call void @_ZN3flw3flc9Texture2D6unbindEv(ptr noundef nonnull align 8 dereferenceable(80) %242)
  call void @_ZN3flw3flc11Framebuffer21bindScreenFramebufferEv()
  br label %243

243:                                              ; preds = %241, %172, %101, %3
  ret void

244:                                              ; preds = %239, %170, %99
  %245 = load ptr, ptr %11, align 8
  %246 = load i32, ptr %12, align 4
  %247 = insertvalue { ptr, i32 } poison, ptr %245, 0
  %248 = insertvalue { ptr, i32 } %247, i32 %246, 1
  resume { ptr, i32 } %248
}

declare void @_ZN3flw3flc9Texture2D4bindEj(ptr noundef nonnull align 8 dereferenceable(80), i32 noundef) #2

declare void @_ZN3flw3flc9Texture2D6unbindEv(ptr noundef nonnull align 8 dereferenceable(80)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3flw3flc19Texture2DRenderable16bindForRenderingEv(ptr noundef nonnull align 8 dereferenceable(148)) #1 align 2

declare void @_ZN3flw3flc11Framebuffer15attachTexture2DEjjj(ptr noundef nonnull align 8 dereferenceable(52), i32 noundef, i32 noundef, i32 noundef) #2

declare noundef i32 @_ZN3flw3flc7Texture9getHandleEj(ptr noundef nonnull align 4 dereferenceable(44), i32 noundef) #2

declare noundef i32 @_Z10getGlErrorv() #2

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #1 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) #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_PcEEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #5 align 2

declare noundef i32 @_Z20getFramebufferStatusv() #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_S7_EEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: noreturn nounwind
declare void @abort() #6

declare void @_ZN3flw3flc11Framebuffer21bindScreenFramebufferEv() #2

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


; 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::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"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 }

@_ZL5_tag_B5cxx11 = external hidden global %"class.std::__cxx11::basic_string", align 8
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [33 x i8], align 1
@glad_glDrawBuffer = external local_unnamed_addr global ptr, align 8
@glad_glReadBuffer = external local_unnamed_addr global ptr, align 8
@.str.10 = external hidden unnamed_addr constant [32 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3flw3flc19Texture2DRenderable13setAttachmentEjj(ptr noundef nonnull align 8 dereferenceable(148) %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca [256 x i8], align 16
  %5 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %6 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %7 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %8 = alloca [256 x i8], align 16
  %9 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %10 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %11 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %12 = alloca [256 x i8], align 16
  %13 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %14 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %15 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  switch i32 %1, label %127 [
    i32 33306, label %16
    i32 36096, label %52
    i32 36064, label %90
  ]

16:                                               ; preds = %3
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @_ZN3flw3flc9Texture2D4bindEj(ptr noundef nonnull align 8 dereferenceable(80) %17, i32 noundef 0)
  tail call void @_ZN3flw3flc19Texture2DRenderable16bindForRenderingEv(ptr noundef nonnull align 8 dereferenceable(148) %0)
  %18 = getelementptr inbounds i8, ptr %0, i64 88
  %19 = tail call noundef i32 @_ZN3flw3flc7Texture9getHandleEj(ptr noundef nonnull align 4 dereferenceable(44) %17, i32 noundef 0)
  tail call void @_ZN3flw3flc11Framebuffer15attachTexture2DEjjj(ptr noundef nonnull align 8 dereferenceable(52) %18, i32 noundef 33306, i32 noundef %2, i32 noundef %19)
  %20 = tail call noundef i32 @_Z10getGlErrorv()
  %.not35 = icmp eq i32 %20, 0
  br i1 %.not35, label %.sink.split, label %21

21:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %4) #7
  %22 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef nonnull @.str.4, i32 noundef %20) #7
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %24, label %31

24:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %5) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %5)
  %25 = getelementptr inbounds i8, ptr %5, i64 16
  %26 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull @.str.5)
          to label %27 unwind label %29

27:                                               ; preds = %24
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_PcEEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %5, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef nonnull @.str.6, i32 noundef 72, ptr noundef nonnull @.str.7, ptr noundef nonnull %4)
          to label %28 unwind label %29

28:                                               ; preds = %27
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %5) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %5) #7
  br label %31

29:                                               ; preds = %27, %24
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %5) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %5) #7
  br label %51

31:                                               ; preds = %28, %21
  %32 = icmp eq i32 %20, 1286
  br i1 %32, label %33, label %44

33:                                               ; preds = %31
  %34 = call noundef i32 @_Z20getFramebufferStatusv()
  %35 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef nonnull @.str.8, i32 noundef %34) #7
  %36 = icmp sgt i32 %35, 0
  br i1 %36, label %37, label %44

37:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %6) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %6)
  %38 = getelementptr inbounds i8, ptr %6, i64 16
  %39 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull @.str.5)
          to label %40 unwind label %42

40:                                               ; preds = %37
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_PcEEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %6, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef nonnull @.str.6, i32 noundef 72, ptr noundef nonnull @.str.7, ptr noundef nonnull %4)
          to label %41 unwind label %42

41:                                               ; preds = %40
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %6) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %6) #7
  br label %44

42:                                               ; preds = %40, %37
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %6) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %6) #7
  br label %51

44:                                               ; preds = %33, %41, %31
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %7) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %7)
  %45 = getelementptr inbounds i8, ptr %7, i64 16
  %46 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull @.str.5)
          to label %47 unwind label %49

47:                                               ; preds = %44
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_S7_EEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %7, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef nonnull @.str.6, i32 noundef 72, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.9)
          to label %48 unwind label %49

48:                                               ; preds = %47
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %7) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %7) #7
  call void @abort() #8
  unreachable

49:                                               ; preds = %47, %44
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %7) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %7) #7
  br label %51

51:                                               ; preds = %49, %42, %29
  %.pn36 = phi { ptr, i32 } [ %50, %49 ], [ %43, %42 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %4) #7
  br label %128

52:                                               ; preds = %3
  %53 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @_ZN3flw3flc9Texture2D4bindEj(ptr noundef nonnull align 8 dereferenceable(80) %53, i32 noundef 0)
  tail call void @_ZN3flw3flc19Texture2DRenderable16bindForRenderingEv(ptr noundef nonnull align 8 dereferenceable(148) %0)
  %54 = getelementptr inbounds i8, ptr %0, i64 88
  %55 = tail call noundef i32 @_ZN3flw3flc7Texture9getHandleEj(ptr noundef nonnull align 4 dereferenceable(44) %53, i32 noundef 0)
  tail call void @_ZN3flw3flc11Framebuffer15attachTexture2DEjjj(ptr noundef nonnull align 8 dereferenceable(52) %54, i32 noundef 36096, i32 noundef %2, i32 noundef %55)
  %56 = load ptr, ptr @glad_glDrawBuffer, align 8, !tbaa !5
  tail call void %56(i32 noundef 0)
  %57 = load ptr, ptr @glad_glReadBuffer, align 8, !tbaa !5
  tail call void %57(i32 noundef 0)
  %58 = tail call noundef i32 @_Z10getGlErrorv()
  %.not32 = icmp eq i32 %58, 0
  br i1 %.not32, label %.sink.split, label %59

59:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %8) #7
  %60 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef nonnull @.str.4, i32 noundef %58) #7
  %61 = icmp sgt i32 %60, 0
  br i1 %61, label %62, label %69

62:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %9) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %9)
  %63 = getelementptr inbounds i8, ptr %9, i64 16
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %63, ptr noundef nonnull @.str.5)
          to label %65 unwind label %67

65:                                               ; preds = %62
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_PcEEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %9, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef nonnull @.str.6, i32 noundef 94, ptr noundef nonnull @.str.7, ptr noundef nonnull %8)
          to label %66 unwind label %67

66:                                               ; preds = %65
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %9) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %9) #7
  br label %69

67:                                               ; preds = %65, %62
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %9) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %9) #7
  br label %89

69:                                               ; preds = %66, %59
  %70 = icmp eq i32 %58, 1286
  br i1 %70, label %71, label %82

71:                                               ; preds = %69
  %72 = call noundef i32 @_Z20getFramebufferStatusv()
  %73 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef nonnull @.str.8, i32 noundef %72) #7
  %74 = icmp sgt i32 %73, 0
  br i1 %74, label %75, label %82

75:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %10) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %10)
  %76 = getelementptr inbounds i8, ptr %10, i64 16
  %77 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef nonnull @.str.5)
          to label %78 unwind label %80

78:                                               ; preds = %75
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_PcEEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %10, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef nonnull @.str.6, i32 noundef 94, ptr noundef nonnull @.str.7, ptr noundef nonnull %8)
          to label %79 unwind label %80

79:                                               ; preds = %78
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %10) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %10) #7
  br label %82

80:                                               ; preds = %78, %75
  %81 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %10) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %10) #7
  br label %89

82:                                               ; preds = %71, %79, %69
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %11) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %11)
  %83 = getelementptr inbounds i8, ptr %11, i64 16
  %84 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef nonnull @.str.5)
          to label %85 unwind label %87

85:                                               ; preds = %82
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_S7_EEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %11, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef nonnull @.str.6, i32 noundef 94, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.9)
          to label %86 unwind label %87

86:                                               ; preds = %85
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %11) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %11) #7
  call void @abort() #8
  unreachable

87:                                               ; preds = %85, %82
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %11) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %11) #7
  br label %89

89:                                               ; preds = %87, %80, %67
  %.pn33 = phi { ptr, i32 } [ %88, %87 ], [ %81, %80 ], [ %68, %67 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %8) #7
  br label %128

90:                                               ; preds = %3
  %91 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @_ZN3flw3flc9Texture2D4bindEj(ptr noundef nonnull align 8 dereferenceable(80) %91, i32 noundef 0)
  tail call void @_ZN3flw3flc19Texture2DRenderable16bindForRenderingEv(ptr noundef nonnull align 8 dereferenceable(148) %0)
  %92 = getelementptr inbounds i8, ptr %0, i64 88
  %93 = tail call noundef i32 @_ZN3flw3flc7Texture9getHandleEj(ptr noundef nonnull align 4 dereferenceable(44) %91, i32 noundef 0)
  tail call void @_ZN3flw3flc11Framebuffer15attachTexture2DEjjj(ptr noundef nonnull align 8 dereferenceable(52) %92, i32 noundef 36064, i32 noundef %2, i32 noundef %93)
  %94 = tail call noundef i32 @_Z10getGlErrorv()
  %.not = icmp eq i32 %94, 0
  br i1 %.not, label %126, label %95

95:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %12) #7
  %96 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %12, ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef nonnull @.str.4, i32 noundef %94) #7
  %97 = icmp sgt i32 %96, 0
  br i1 %97, label %98, label %105

98:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %13) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %13)
  %99 = getelementptr inbounds i8, ptr %13, i64 16
  %100 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %99, ptr noundef nonnull @.str.5)
          to label %101 unwind label %103

101:                                              ; preds = %98
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_PcEEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %13, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef nonnull @.str.6, i32 noundef 101, ptr noundef nonnull @.str.7, ptr noundef nonnull %12)
          to label %102 unwind label %103

102:                                              ; preds = %101
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %13) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %13) #7
  br label %105

103:                                              ; preds = %101, %98
  %104 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %13) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %13) #7
  br label %125

105:                                              ; preds = %102, %95
  %106 = icmp eq i32 %94, 1286
  br i1 %106, label %107, label %118

107:                                              ; preds = %105
  %108 = call noundef i32 @_Z20getFramebufferStatusv()
  %109 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %12, ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef nonnull @.str.8, i32 noundef %108) #7
  %110 = icmp sgt i32 %109, 0
  br i1 %110, label %111, label %118

111:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %14) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %14)
  %112 = getelementptr inbounds i8, ptr %14, i64 16
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef nonnull @.str.5)
          to label %114 unwind label %116

114:                                              ; preds = %111
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_PcEEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %14, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef nonnull @.str.6, i32 noundef 101, ptr noundef nonnull @.str.7, ptr noundef nonnull %12)
          to label %115 unwind label %116

115:                                              ; preds = %114
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %14) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %14) #7
  br label %118

116:                                              ; preds = %114, %111
  %117 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %14) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %14) #7
  br label %125

118:                                              ; preds = %107, %115, %105
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %15) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %15)
  %119 = getelementptr inbounds i8, ptr %15, i64 16
  %120 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %119, ptr noundef nonnull @.str.5)
          to label %121 unwind label %123

121:                                              ; preds = %118
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_S7_EEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %15, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef nonnull @.str.6, i32 noundef 101, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.10)
          to label %122 unwind label %123

122:                                              ; preds = %121
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %15) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %15) #7
  call void @abort() #8
  unreachable

123:                                              ; preds = %121, %118
  %124 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %15) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %15) #7
  br label %125

125:                                              ; preds = %123, %116, %103
  %.pn = phi { ptr, i32 } [ %124, %123 ], [ %117, %116 ], [ %104, %103 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %12) #7
  br label %128

126:                                              ; preds = %90
  tail call void @_ZN3flw3flc9Texture2D6unbindEv(ptr noundef nonnull align 8 dereferenceable(80) %91)
  br label %.sink.split

.sink.split:                                      ; preds = %52, %16, %126
  tail call void @_ZN3flw3flc11Framebuffer21bindScreenFramebufferEv()
  br label %127

127:                                              ; preds = %.sink.split, %3
  ret void

128:                                              ; preds = %125, %89, %51
  %.pn.pn = phi { ptr, i32 } [ %.pn, %125 ], [ %.pn33, %89 ], [ %.pn36, %51 ]
  resume { ptr, i32 } %.pn.pn
}

declare void @_ZN3flw3flc9Texture2D4bindEj(ptr noundef nonnull align 8 dereferenceable(80), i32 noundef) local_unnamed_addr #2

declare void @_ZN3flw3flc9Texture2D6unbindEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3flw3flc19Texture2DRenderable16bindForRenderingEv(ptr noundef nonnull align 8 dereferenceable(148)) local_unnamed_addr #1 align 2

declare void @_ZN3flw3flc11Framebuffer15attachTexture2DEjjj(ptr noundef nonnull align 8 dereferenceable(52), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare noundef i32 @_ZN3flw3flc7Texture9getHandleEj(ptr noundef nonnull align 4 dereferenceable(44), i32 noundef) local_unnamed_addr #2

declare noundef i32 @_Z10getGlErrorv() local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #1 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 #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_PcEEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #5 align 2

declare noundef i32 @_Z20getFramebufferStatusv() local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_S7_EEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #6

declare void @_ZN3flw3flc11Framebuffer21bindScreenFramebufferEv() local_unnamed_addr #2

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass