; LLVM IR from filipwasil/fillwave :: src/flc/texturing/Texture2D.ll (ZN3flw3flc9Texture2D8sendDataEPh)

; 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::unique_ptr.5" = type { %"struct.std::__uniq_ptr_data.6" }
%"struct.std::__uniq_ptr_data.6" = type { %"class.std::__uniq_ptr_impl.7" }
%"class.std::__uniq_ptr_impl.7" = type { %"class.std::tuple.8" }
%"class.std::tuple.8" = type { %"struct.std::_Tuple_impl.9" }
%"struct.std::_Tuple_impl.9" = type { %"struct.std::_Tuple_impl.10", %"struct.std::_Head_base.12" }
%"struct.std::_Tuple_impl.10" = type { %"struct.std::_Head_base.11" }
%"struct.std::_Head_base.11" = type { ptr }
%"struct.std::_Head_base.12" = type { ptr }
%"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.__gnu_cxx::__normal_iterator" = type { ptr }
%"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 }
%"struct.flw::flc::TextureConfig" = type { %"struct.flw::flc::TextureConfig::Header", %"struct.flw::flc::TextureConfig::Content", i32, %"class.std::unique_ptr.5", %"class.std::vector.13" }
%"struct.flw::flc::TextureConfig::Header" = type { i32, i32, i32, i32, i32, i32 }
%"struct.flw::flc::TextureConfig::Content" = type { i32, i8, i8, i32, i32 }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<flw::flc::TextureConfig::Mipmap, flw::AllocatorStack<flw::flc::TextureConfig::Mipmap>>::_Vector_impl" }
%"struct.std::_Vector_base<flw::flc::TextureConfig::Mipmap, flw::AllocatorStack<flw::flc::TextureConfig::Mipmap>>::_Vector_impl" = type { %"class.flw::AllocatorStack", %"struct.std::_Vector_base<flw::flc::TextureConfig::Mipmap, flw::AllocatorStack<flw::flc::TextureConfig::Mipmap>>::_Vector_impl_data" }
%"class.flw::AllocatorStack" = type { %"struct.std::array" }
%"struct.std::array" = type { [32 x %"struct.flw::flc::TextureConfig::Mipmap"] }
%"struct.flw::flc::TextureConfig::Mipmap" = type { i32, i32, i32, i32, %"class.std::unique_ptr.5" }
%"struct.std::_Vector_base<flw::flc::TextureConfig::Mipmap, flw::AllocatorStack<flw::flc::TextureConfig::Mipmap>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZL5_tag_B5cxx11 = external hidden global %"class.std::__cxx11::basic_string", align 8
@glad_glCompressedTexImage2D = external global ptr, 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 [29 x i8], align 1
@glad_glTexImage2D = external global ptr, align 8
@.str.10 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [17 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 @_ZN3flw3flc9Texture2D8sendDataEPh(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::unique_ptr.5", align 8
  %6 = alloca i32, align 4
  %7 = alloca [256 x i8], align 16
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %14 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %15 = alloca i32, align 4
  %16 = alloca [256 x i8], align 16
  %17 = alloca i32, align 4
  %18 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %19 = alloca i32, align 4
  %20 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %21 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %22 = alloca i64, align 8
  %23 = alloca ptr, align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca [256 x i8], align 16
  %29 = alloca i32, align 4
  %30 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %31 = alloca i32, align 4
  %32 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %33 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %34 = load ptr, ptr %3, align 8
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = icmp ne ptr %35, null
  br i1 %36, label %37, label %43

37:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #8
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3flw25make_pu_with_no_ownershipIhEESt10unique_ptrIT_PFvPS2_EES3_(ptr dead_on_unwind writable sret(%"class.std::unique_ptr.5") align 8 %5, ptr noundef %38)
  %39 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %34, i32 0, i32 1
  %40 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #8
  %41 = getelementptr inbounds %"struct.flw::flc::TextureConfig", ptr %40, i32 0, i32 3
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10unique_ptrIhPFvPhEEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(16) %41, ptr noundef nonnull align 8 dereferenceable(16) %5) #8
  call void @_ZNSt10unique_ptrIhPFvPhEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #8
  br label %43

43:                                               ; preds = %37, %2
  %44 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %34, i32 0, i32 1
  %45 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %44) #8
  %46 = getelementptr inbounds %"struct.flw::flc::TextureConfig", ptr %45, i32 0, i32 1
  %47 = getelementptr inbounds %"struct.flw::flc::TextureConfig::Content", ptr %46, i32 0, i32 2
  %48 = load i8, ptr %47, align 1, !tbaa !9
  %49 = icmp ne i8 %48, 0
  br i1 %49, label %50, label %148

50:                                               ; preds = %43
  %51 = load ptr, ptr @glad_glCompressedTexImage2D, align 8, !tbaa !5
  %52 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %34, i32 0, i32 1
  %53 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %52) #8
  %54 = getelementptr inbounds %"struct.flw::flc::TextureConfig", ptr %53, i32 0, i32 1
  %55 = getelementptr inbounds %"struct.flw::flc::TextureConfig::Content", ptr %54, i32 0, i32 0
  %56 = load i32, ptr %55, align 8, !tbaa !29
  %57 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %34, i32 0, i32 1
  %58 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %57) #8
  %59 = getelementptr inbounds %"struct.flw::flc::TextureConfig", ptr %58, i32 0, i32 0
  %60 = getelementptr inbounds %"struct.flw::flc::TextureConfig::Header", ptr %59, i32 0, i32 0
  %61 = load i32, ptr %60, align 8, !tbaa !30
  %62 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %34, i32 0, i32 1
  %63 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %62) #8
  %64 = getelementptr inbounds %"struct.flw::flc::TextureConfig", ptr %63, i32 0, i32 0
  %65 = getelementptr inbounds %"struct.flw::flc::TextureConfig::Header", ptr %64, i32 0, i32 2
  %66 = load i32, ptr %65, align 8, !tbaa !31
  %67 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %34, i32 0, i32 1
  %68 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %67) #8
  %69 = getelementptr inbounds %"struct.flw::flc::TextureConfig", ptr %68, i32 0, i32 0
  %70 = getelementptr inbounds %"struct.flw::flc::TextureConfig::Header", ptr %69, i32 0, i32 1
  %71 = load i32, ptr %70, align 4, !tbaa !32
  %72 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %34, i32 0, i32 1
  %73 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %72) #8
  %74 = getelementptr inbounds %"struct.flw::flc::TextureConfig", ptr %73, i32 0, i32 1
  %75 = getelementptr inbounds %"struct.flw::flc::TextureConfig::Content", ptr %74, i32 0, i32 3
  %76 = load i32, ptr %75, align 8, !tbaa !33
  %77 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %34, i32 0, i32 1
  %78 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %77) #8
  %79 = getelementptr inbounds %"struct.flw::flc::TextureConfig", ptr %78, i32 0, i32 1
  %80 = getelementptr inbounds %"struct.flw::flc::TextureConfig::Content", ptr %79, i32 0, i32 4
  %81 = load i32, ptr %80, align 4, !tbaa !34
  %82 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %34, i32 0, i32 1
  %83 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %82) #8
  %84 = getelementptr inbounds %"struct.flw::flc::TextureConfig", ptr %83, i32 0, i32 3
  %85 = call noundef ptr @_ZNKSt10unique_ptrIhPFvPhEE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %84) #8
  call void %51(i32 noundef 3553, i32 noundef %56, i32 noundef %61, i32 noundef %66, i32 noundef %71, i32 noundef %76, i32 noundef %81, ptr noundef %85)
  br label %86

86:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  %87 = call noundef i32 @_Z10getGlErrorv()
  store i32 %87, ptr %6, align 4, !tbaa !35
  %88 = load i32, ptr %6, align 4, !tbaa !35
  %89 = icmp ne i32 0, %88
  br i1 %89, label %90, label %146

90:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 256, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  %91 = getelementptr inbounds [256 x i8], ptr %7, i64 0, i64 0
  %92 = load i32, ptr %6, align 4, !tbaa !35
  %93 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %91, ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef %92) #8
  store i32 %93, ptr %8, align 4, !tbaa !35
  %94 = load i32, ptr %8, align 4, !tbaa !35
  %95 = icmp sgt i32 %94, 0
  br i1 %95, label %96, label %109

96:                                               ; preds = %90
  br label %97

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

100:                                              ; preds = %97
  %101 = getelementptr inbounds [256 x i8], ptr %7, i64 0, i64 0
  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 @.str.6, i32 noundef 57, ptr noundef @.str.7, ptr noundef %101)
          to label %102 unwind label %105

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

103:                                              ; preds = %102
  br label %104

104:                                              ; preds = %103
  br label %109

105:                                              ; preds = %100, %97
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %10, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %11, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %9) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr %9) #8
  br label %145

109:                                              ; preds = %104, %90
  %110 = load i32, ptr %6, align 4, !tbaa !35
  %111 = icmp eq i32 %110, 1286
  br i1 %111, label %112, label %133

112:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %113 = call noundef i32 @_Z20getFramebufferStatusv()
  store i32 %113, ptr %12, align 4, !tbaa !35
  %114 = getelementptr inbounds [256 x i8], ptr %7, i64 0, i64 0
  %115 = load i32, ptr %12, align 4, !tbaa !35
  %116 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %114, ptr noundef @.str.3, ptr noundef @.str.8, i32 noundef %115) #8
  store i32 %116, ptr %8, align 4, !tbaa !35
  %117 = load i32, ptr %8, align 4, !tbaa !35
  %118 = icmp sgt i32 %117, 0
  br i1 %118, label %119, label %132

119:                                              ; preds = %112
  br label %120

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

123:                                              ; preds = %120
  %124 = getelementptr inbounds [256 x i8], ptr %7, i64 0, i64 0
  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 @.str.6, i32 noundef 57, ptr noundef @.str.7, ptr noundef %124)
          to label %125 unwind label %128

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

126:                                              ; preds = %125
  br label %127

127:                                              ; preds = %126
  br label %132

128:                                              ; preds = %123, %120
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %10, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %11, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %13) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %145

132:                                              ; preds = %127, %112
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %133

133:                                              ; preds = %132, %109
  br label %134

134:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 392, ptr %14) #8
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %14)
  %135 = getelementptr inbounds i8, ptr %14, i64 16
  %136 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %135, ptr noundef @.str.5)
          to label %137 unwind label %141

137:                                              ; preds = %134
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_S7_EEvRNS0_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 57, ptr noundef @.str.7, ptr noundef @.str.9)
          to label %138 unwind label %141

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

139:                                              ; preds = %138
  br label %140

140:                                              ; preds = %139
  call void @abort() #9
  unreachable

141:                                              ; preds = %137, %134
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %10, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %11, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %14) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr %14) #8
  br label %145

145:                                              ; preds = %141, %128, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 256, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %351

146:                                              ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %147

147:                                              ; preds = %146
  br label %251

148:                                              ; preds = %43
  %149 = load ptr, ptr @glad_glTexImage2D, align 8, !tbaa !5
  %150 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %34, i32 0, i32 1
  %151 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %150) #8
  %152 = getelementptr inbounds %"struct.flw::flc::TextureConfig", ptr %151, i32 0, i32 1
  %153 = getelementptr inbounds %"struct.flw::flc::TextureConfig::Content", ptr %152, i32 0, i32 0
  %154 = load i32, ptr %153, align 8, !tbaa !29
  %155 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %34, i32 0, i32 1
  %156 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %155) #8
  %157 = getelementptr inbounds %"struct.flw::flc::TextureConfig", ptr %156, i32 0, i32 0
  %158 = getelementptr inbounds %"struct.flw::flc::TextureConfig::Header", ptr %157, i32 0, i32 0
  %159 = load i32, ptr %158, align 8, !tbaa !30
  %160 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %34, i32 0, i32 1
  %161 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %160) #8
  %162 = getelementptr inbounds %"struct.flw::flc::TextureConfig", ptr %161, i32 0, i32 0
  %163 = getelementptr inbounds %"struct.flw::flc::TextureConfig::Header", ptr %162, i32 0, i32 2
  %164 = load i32, ptr %163, align 8, !tbaa !31
  %165 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %34, i32 0, i32 1
  %166 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %165) #8
  %167 = getelementptr inbounds %"struct.flw::flc::TextureConfig", ptr %166, i32 0, i32 0
  %168 = getelementptr inbounds %"struct.flw::flc::TextureConfig::Header", ptr %167, i32 0, i32 1
  %169 = load i32, ptr %168, align 4, !tbaa !32
  %170 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %34, i32 0, i32 1
  %171 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %170) #8
  %172 = getelementptr inbounds %"struct.flw::flc::TextureConfig", ptr %171, i32 0, i32 1
  %173 = getelementptr inbounds %"struct.flw::flc::TextureConfig::Content", ptr %172, i32 0, i32 3
  %174 = load i32, ptr %173, align 8, !tbaa !33
  %175 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %34, i32 0, i32 1
  %176 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %175) #8
  %177 = getelementptr inbounds %"struct.flw::flc::TextureConfig", ptr %176, i32 0, i32 0
  %178 = getelementptr inbounds %"struct.flw::flc::TextureConfig::Header", ptr %177, i32 0, i32 4
  %179 = load i32, ptr %178, align 8, !tbaa !36
  %180 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %34, i32 0, i32 1
  %181 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %180) #8
  %182 = getelementptr inbounds %"struct.flw::flc::TextureConfig", ptr %181, i32 0, i32 0
  %183 = getelementptr inbounds %"struct.flw::flc::TextureConfig::Header", ptr %182, i32 0, i32 3
  %184 = load i32, ptr %183, align 4, !tbaa !37
  %185 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %34, i32 0, i32 1
  %186 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %185) #8
  %187 = getelementptr inbounds %"struct.flw::flc::TextureConfig", ptr %186, i32 0, i32 3
  %188 = call noundef ptr @_ZNKSt10unique_ptrIhPFvPhEE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %187) #8
  call void %149(i32 noundef 3553, i32 noundef %154, i32 noundef %159, i32 noundef %164, i32 noundef %169, i32 noundef %174, i32 noundef %179, i32 noundef %184, ptr noundef %188)
  br label %189

189:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %190 = call noundef i32 @_Z10getGlErrorv()
  store i32 %190, ptr %15, align 4, !tbaa !35
  %191 = load i32, ptr %15, align 4, !tbaa !35
  %192 = icmp ne i32 0, %191
  br i1 %192, label %193, label %249

193:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 256, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %194 = getelementptr inbounds [256 x i8], ptr %16, i64 0, i64 0
  %195 = load i32, ptr %15, align 4, !tbaa !35
  %196 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %194, ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef %195) #8
  store i32 %196, ptr %17, align 4, !tbaa !35
  %197 = load i32, ptr %17, align 4, !tbaa !35
  %198 = icmp sgt i32 %197, 0
  br i1 %198, label %199, label %212

199:                                              ; preds = %193
  br label %200

200:                                              ; preds = %199
  call void @llvm.lifetime.start.p0(i64 392, ptr %18) #8
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %18)
  %201 = getelementptr inbounds i8, ptr %18, i64 16
  %202 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %201, ptr noundef @.str.5)
          to label %203 unwind label %208

203:                                              ; preds = %200
  %204 = getelementptr inbounds [256 x i8], ptr %16, i64 0, i64 0
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_PcEEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %18, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef @.str.6, i32 noundef 68, ptr noundef @.str.7, ptr noundef %204)
          to label %205 unwind label %208

205:                                              ; preds = %203
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %18) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr %18) #8
  br label %206

206:                                              ; preds = %205
  br label %207

207:                                              ; preds = %206
  br label %212

208:                                              ; preds = %203, %200
  %209 = landingpad { ptr, i32 }
          cleanup
  %210 = extractvalue { ptr, i32 } %209, 0
  store ptr %210, ptr %10, align 8
  %211 = extractvalue { ptr, i32 } %209, 1
  store i32 %211, ptr %11, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %18) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr %18) #8
  br label %248

212:                                              ; preds = %207, %193
  %213 = load i32, ptr %15, align 4, !tbaa !35
  %214 = icmp eq i32 %213, 1286
  br i1 %214, label %215, label %236

215:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  %216 = call noundef i32 @_Z20getFramebufferStatusv()
  store i32 %216, ptr %19, align 4, !tbaa !35
  %217 = getelementptr inbounds [256 x i8], ptr %16, i64 0, i64 0
  %218 = load i32, ptr %19, align 4, !tbaa !35
  %219 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %217, ptr noundef @.str.3, ptr noundef @.str.8, i32 noundef %218) #8
  store i32 %219, ptr %17, align 4, !tbaa !35
  %220 = load i32, ptr %17, align 4, !tbaa !35
  %221 = icmp sgt i32 %220, 0
  br i1 %221, label %222, label %235

222:                                              ; preds = %215
  br label %223

223:                                              ; preds = %222
  call void @llvm.lifetime.start.p0(i64 392, ptr %20) #8
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %20)
  %224 = getelementptr inbounds i8, ptr %20, i64 16
  %225 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %224, ptr noundef @.str.5)
          to label %226 unwind label %231

226:                                              ; preds = %223
  %227 = getelementptr inbounds [256 x i8], ptr %16, 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 68, ptr noundef @.str.7, ptr noundef %227)
          to label %228 unwind label %231

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

229:                                              ; preds = %228
  br label %230

230:                                              ; preds = %229
  br label %235

231:                                              ; preds = %226, %223
  %232 = landingpad { ptr, i32 }
          cleanup
  %233 = extractvalue { ptr, i32 } %232, 0
  store ptr %233, ptr %10, align 8
  %234 = extractvalue { ptr, i32 } %232, 1
  store i32 %234, ptr %11, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %20) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %248

235:                                              ; preds = %230, %215
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %236

236:                                              ; preds = %235, %212
  br label %237

237:                                              ; preds = %236
  call void @llvm.lifetime.start.p0(i64 392, ptr %21) #8
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %21)
  %238 = getelementptr inbounds i8, ptr %21, i64 16
  %239 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %238, ptr noundef @.str.5)
          to label %240 unwind label %244

240:                                              ; preds = %237
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_S7_EEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %21, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef @.str.6, i32 noundef 68, ptr noundef @.str.7, ptr noundef @.str.10)
          to label %241 unwind label %244

241:                                              ; preds = %240
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %21) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr %21) #8
  br label %242

242:                                              ; preds = %241
  br label %243

243:                                              ; preds = %242
  call void @abort() #9
  unreachable

244:                                              ; preds = %240, %237
  %245 = landingpad { ptr, i32 }
          cleanup
  %246 = extractvalue { ptr, i32 } %245, 0
  store ptr %246, ptr %10, align 8
  %247 = extractvalue { ptr, i32 } %245, 1
  store i32 %247, ptr %11, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %21) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr %21) #8
  br label %248

248:                                              ; preds = %244, %231, %208
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 256, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %351

249:                                              ; preds = %189
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %250

250:                                              ; preds = %249
  br label %251

251:                                              ; preds = %250, %147
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  store i64 1, ptr %22, align 8, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %252 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %34, i32 0, i32 1
  %253 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %252) #8
  %254 = getelementptr inbounds %"struct.flw::flc::TextureConfig", ptr %253, i32 0, i32 4
  store ptr %254, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %255 = load ptr, ptr %23, align 8, !tbaa !5
  %256 = call ptr @_ZNSt6vectorIN3flw3flc13TextureConfig6MipmapENS0_14AllocatorStackIS3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(1048) %255) #8
  %257 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %256, ptr %257, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %258 = load ptr, ptr %23, align 8, !tbaa !5
  %259 = call ptr @_ZNSt6vectorIN3flw3flc13TextureConfig6MipmapENS0_14AllocatorStackIS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(1048) %258) #8
  %260 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %259, ptr %260, align 8
  br label %261

261:                                              ; preds = %285, %251
  %262 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3flw3flc13TextureConfig6MipmapESt6vectorIS4_NS1_14AllocatorStackIS4_EEEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25) #8
  br i1 %262, label %264, label %263

263:                                              ; preds = %261
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  br label %287

264:                                              ; preds = %261
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  %265 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN3flw3flc13TextureConfig6MipmapESt6vectorIS4_NS1_14AllocatorStackIS4_EEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  store ptr %265, ptr %26, align 8, !tbaa !5
  %266 = load ptr, ptr @glad_glCompressedTexImage2D, align 8, !tbaa !5
  %267 = load i64, ptr %22, align 8, !tbaa !38
  %268 = add i64 %267, 1
  store i64 %268, ptr %22, align 8, !tbaa !38
  %269 = trunc i64 %267 to i32
  %270 = load ptr, ptr %26, align 8, !tbaa !5
  %271 = getelementptr inbounds %"struct.flw::flc::TextureConfig::Mipmap", ptr %270, i32 0, i32 3
  %272 = load i32, ptr %271, align 4, !tbaa !40
  %273 = load ptr, ptr %26, align 8, !tbaa !5
  %274 = getelementptr inbounds %"struct.flw::flc::TextureConfig::Mipmap", ptr %273, i32 0, i32 2
  %275 = load i32, ptr %274, align 8, !tbaa !42
  %276 = load ptr, ptr %26, align 8, !tbaa !5
  %277 = getelementptr inbounds %"struct.flw::flc::TextureConfig::Mipmap", ptr %276, i32 0, i32 1
  %278 = load i32, ptr %277, align 4, !tbaa !43
  %279 = load ptr, ptr %26, align 8, !tbaa !5
  %280 = getelementptr inbounds %"struct.flw::flc::TextureConfig::Mipmap", ptr %279, i32 0, i32 0
  %281 = load i32, ptr %280, align 8, !tbaa !44
  %282 = load ptr, ptr %26, align 8, !tbaa !5
  %283 = getelementptr inbounds %"struct.flw::flc::TextureConfig::Mipmap", ptr %282, i32 0, i32 4
  %284 = call noundef ptr @_ZNKSt10unique_ptrIhPFvPhEE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %283) #8
  call void %266(i32 noundef 3553, i32 noundef %269, i32 noundef %272, i32 noundef %275, i32 noundef %278, i32 noundef 0, i32 noundef %281, ptr noundef %284)
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  br label %285

285:                                              ; preds = %264
  %286 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN3flw3flc13TextureConfig6MipmapESt6vectorIS4_NS1_14AllocatorStackIS4_EEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  br label %261

287:                                              ; preds = %263
  br label %288

288:                                              ; preds = %287
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  %289 = call noundef i32 @_Z10getGlErrorv()
  store i32 %289, ptr %27, align 4, !tbaa !35
  %290 = load i32, ptr %27, align 4, !tbaa !35
  %291 = icmp ne i32 0, %290
  br i1 %291, label %292, label %348

292:                                              ; preds = %288
  call void @llvm.lifetime.start.p0(i64 256, ptr %28) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  %293 = getelementptr inbounds [256 x i8], ptr %28, i64 0, i64 0
  %294 = load i32, ptr %27, align 4, !tbaa !35
  %295 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %293, ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef %294) #8
  store i32 %295, ptr %29, align 4, !tbaa !35
  %296 = load i32, ptr %29, align 4, !tbaa !35
  %297 = icmp sgt i32 %296, 0
  br i1 %297, label %298, label %311

298:                                              ; preds = %292
  br label %299

299:                                              ; preds = %298
  call void @llvm.lifetime.start.p0(i64 392, ptr %30) #8
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %30)
  %300 = getelementptr inbounds i8, ptr %30, i64 16
  %301 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %300, ptr noundef @.str.5)
          to label %302 unwind label %307

302:                                              ; preds = %299
  %303 = getelementptr inbounds [256 x i8], ptr %28, i64 0, i64 0
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_PcEEvRNS0_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 83, ptr noundef @.str.7, ptr noundef %303)
          to label %304 unwind label %307

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

305:                                              ; preds = %304
  br label %306

306:                                              ; preds = %305
  br label %311

307:                                              ; preds = %302, %299
  %308 = landingpad { ptr, i32 }
          cleanup
  %309 = extractvalue { ptr, i32 } %308, 0
  store ptr %309, ptr %10, align 8
  %310 = extractvalue { ptr, i32 } %308, 1
  store i32 %310, ptr %11, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %30) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr %30) #8
  br label %347

311:                                              ; preds = %306, %292
  %312 = load i32, ptr %27, align 4, !tbaa !35
  %313 = icmp eq i32 %312, 1286
  br i1 %313, label %314, label %335

314:                                              ; preds = %311
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  %315 = call noundef i32 @_Z20getFramebufferStatusv()
  store i32 %315, ptr %31, align 4, !tbaa !35
  %316 = getelementptr inbounds [256 x i8], ptr %28, i64 0, i64 0
  %317 = load i32, ptr %31, align 4, !tbaa !35
  %318 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %316, ptr noundef @.str.3, ptr noundef @.str.8, i32 noundef %317) #8
  store i32 %318, ptr %29, align 4, !tbaa !35
  %319 = load i32, ptr %29, align 4, !tbaa !35
  %320 = icmp sgt i32 %319, 0
  br i1 %320, label %321, label %334

321:                                              ; preds = %314
  br label %322

322:                                              ; preds = %321
  call void @llvm.lifetime.start.p0(i64 392, ptr %32) #8
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %32)
  %323 = getelementptr inbounds i8, ptr %32, i64 16
  %324 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %323, ptr noundef @.str.5)
          to label %325 unwind label %330

325:                                              ; preds = %322
  %326 = getelementptr inbounds [256 x i8], ptr %28, i64 0, i64 0
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_PcEEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %32, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef @.str.6, i32 noundef 83, ptr noundef @.str.7, ptr noundef %326)
          to label %327 unwind label %330

327:                                              ; preds = %325
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %32) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr %32) #8
  br label %328

328:                                              ; preds = %327
  br label %329

329:                                              ; preds = %328
  br label %334

330:                                              ; preds = %325, %322
  %331 = landingpad { ptr, i32 }
          cleanup
  %332 = extractvalue { ptr, i32 } %331, 0
  store ptr %332, ptr %10, align 8
  %333 = extractvalue { ptr, i32 } %331, 1
  store i32 %333, ptr %11, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %32) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %347

334:                                              ; preds = %329, %314
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %335

335:                                              ; preds = %334, %311
  br label %336

336:                                              ; preds = %335
  call void @llvm.lifetime.start.p0(i64 392, ptr %33) #8
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %33)
  %337 = getelementptr inbounds i8, ptr %33, i64 16
  %338 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %337, ptr noundef @.str.5)
          to label %339 unwind label %343

339:                                              ; preds = %336
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_S7_EEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %33, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef @.str.6, i32 noundef 83, ptr noundef @.str.7, ptr noundef @.str.11)
          to label %340 unwind label %343

340:                                              ; preds = %339
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %33) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr %33) #8
  br label %341

341:                                              ; preds = %340
  br label %342

342:                                              ; preds = %341
  call void @abort() #9
  unreachable

343:                                              ; preds = %339, %336
  %344 = landingpad { ptr, i32 }
          cleanup
  %345 = extractvalue { ptr, i32 } %344, 0
  store ptr %345, ptr %10, align 8
  %346 = extractvalue { ptr, i32 } %344, 1
  store i32 %346, ptr %11, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %33) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr %33) #8
  br label %347

347:                                              ; preds = %343, %330, %307
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 256, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %351

348:                                              ; preds = %288
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  br label %349

349:                                              ; preds = %348
  br label %350

350:                                              ; preds = %349
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  ret void

351:                                              ; preds = %347, %248, %145
  %352 = load ptr, ptr %10, align 8
  %353 = load i32, ptr %11, align 4
  %354 = insertvalue { ptr, i32 } poison, ptr %352, 0
  %355 = insertvalue { ptr, i32 } %354, i32 %353, 1
  resume { ptr, i32 } %355
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3flw25make_pu_with_no_ownershipIhEESt10unique_ptrIT_PFvPS2_EES3_(ptr dead_on_unwind noalias writable sret(%"class.std::unique_ptr.5") align 8, ptr noundef) #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10unique_ptrIhPFvPhEED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2 align 2

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

declare noundef i32 @_Z10getGlErrorv() #3

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

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

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

declare noundef i32 @_Z20getFramebufferStatusv() #3

; 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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPN3flw3flc13TextureConfig6MipmapESt6vectorIS4_NS1_14AllocatorStackIS4_EEEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #7

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN3flw3flc13TextureConfig6MipmapESt6vectorIS4_NS1_14AllocatorStackIS4_EEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 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 = { 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 #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 = { 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { 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, !7, i64 29}
!10 = !{!"_ZTSN3flw3flc13TextureConfigE", !11, i64 0, !13, i64 24, !14, i64 40, !15, i64 48, !23, i64 64}
!11 = !{!"_ZTSN3flw3flc13TextureConfig6HeaderE", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSN3flw3flc13TextureConfig7ContentE", !12, i64 0, !7, i64 4, !7, i64 5, !12, i64 8, !12, i64 12}
!14 = !{!"_ZTSN3flw3flc17EMemoryAllocationE", !7, i64 0}
!15 = !{!"_ZTSSt10unique_ptrIhPFvPhEE", !16, i64 0}
!16 = !{!"_ZTSSt15__uniq_ptr_dataIhPFvPhELb1ELb1EE", !17, i64 0}
!17 = !{!"_ZTSSt15__uniq_ptr_implIhPFvPhEE", !18, i64 0}
!18 = !{!"_ZTSSt5tupleIJPhPFvS0_EEE", !19, i64 0}
!19 = !{!"_ZTSSt11_Tuple_implILm0EJPhPFvS0_EEE", !20, i64 0, !22, i64 8}
!20 = !{!"_ZTSSt11_Tuple_implILm1EJPFvPhEEE", !21, i64 0}
!21 = !{!"_ZTSSt10_Head_baseILm1EPFvPhELb0EE", !6, i64 0}
!22 = !{!"_ZTSSt10_Head_baseILm0EPhLb0EE", !6, i64 0}
!23 = !{!"_ZTSSt6vectorIN3flw3flc13TextureConfig6MipmapENS0_14AllocatorStackIS3_EEE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIN3flw3flc13TextureConfig6MipmapENS0_14AllocatorStackIS3_EEE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIN3flw3flc13TextureConfig6MipmapENS0_14AllocatorStackIS3_EEE12_Vector_implE", !26, i64 0, !28, i64 1024}
!26 = !{!"_ZTSN3flw14AllocatorStackINS_3flc13TextureConfig6MipmapEEE", !27, i64 0}
!27 = !{!"_ZTSSt5arrayIN3flw3flc13TextureConfig6MipmapELm32EE", !7, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIN3flw3flc13TextureConfig6MipmapENS0_14AllocatorStackIS3_EEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!10, !12, i64 24}
!30 = !{!10, !12, i64 0}
!31 = !{!10, !12, i64 8}
!32 = !{!10, !12, i64 4}
!33 = !{!10, !12, i64 32}
!34 = !{!10, !12, i64 36}
!35 = !{!12, !12, i64 0}
!36 = !{!10, !12, i64 16}
!37 = !{!10, !12, i64 12}
!38 = !{!39, !39, i64 0}
!39 = !{!"long", !7, i64 0}
!40 = !{!41, !12, i64 12}
!41 = !{!"_ZTSN3flw3flc13TextureConfig6MipmapE", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !15, i64 16}
!42 = !{!41, !12, i64 8}
!43 = !{!41, !12, i64 4}
!44 = !{!41, !12, 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::unique_ptr.5" = type { %"struct.std::__uniq_ptr_data.6" }
%"struct.std::__uniq_ptr_data.6" = type { %"class.std::__uniq_ptr_impl.7" }
%"class.std::__uniq_ptr_impl.7" = type { %"class.std::tuple.8" }
%"class.std::tuple.8" = type { %"struct.std::_Tuple_impl.9" }
%"struct.std::_Tuple_impl.9" = type { %"struct.std::_Tuple_impl.10", %"struct.std::_Head_base.12" }
%"struct.std::_Tuple_impl.10" = type { %"struct.std::_Head_base.11" }
%"struct.std::_Head_base.11" = type { ptr }
%"struct.std::_Head_base.12" = type { ptr }
%"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.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZL5_tag_B5cxx11 = external hidden global %"class.std::__cxx11::basic_string", align 8
@glad_glCompressedTexImage2D = external local_unnamed_addr global ptr, 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 [29 x i8], align 1
@glad_glTexImage2D = external local_unnamed_addr global ptr, align 8
@.str.10 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [17 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 @_ZN3flw3flc9Texture2D8sendDataEPh(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::unique_ptr.5", align 8
  %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 %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca [256 x i8], align 16
  %15 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %16 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %17 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %23, label %18

18:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #8
  call void @_ZN3flw25make_pu_with_no_ownershipIhEESt10unique_ptrIT_PFvPS2_EES3_(ptr dead_on_unwind nonnull writable sret(%"class.std::unique_ptr.5") align 8 %3, ptr noundef nonnull %1)
  %19 = getelementptr inbounds i8, ptr %0, i64 48
  %20 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #8
  %21 = getelementptr inbounds i8, ptr %20, i64 48
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10unique_ptrIhPFvPhEEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %3) #8
  call void @_ZNSt10unique_ptrIhPFvPhEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  br label %23

23:                                               ; preds = %18, %2
  %24 = getelementptr inbounds i8, ptr %0, i64 48
  %25 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  %26 = getelementptr inbounds i8, ptr %25, i64 29
  %27 = load i8, ptr %26, align 1, !tbaa !5
  %.not39 = icmp eq i8 %27, 0
  br i1 %.not39, label %82, label %28

28:                                               ; preds = %23
  %29 = load ptr, ptr @glad_glCompressedTexImage2D, align 8, !tbaa !28
  %30 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  %31 = getelementptr inbounds i8, ptr %30, i64 24
  %32 = load i32, ptr %31, align 8, !tbaa !29
  %33 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  %34 = load i32, ptr %33, align 8, !tbaa !30
  %35 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  %36 = getelementptr inbounds i8, ptr %35, i64 8
  %37 = load i32, ptr %36, align 8, !tbaa !31
  %38 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  %39 = getelementptr inbounds i8, ptr %38, i64 4
  %40 = load i32, ptr %39, align 4, !tbaa !32
  %41 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  %42 = getelementptr inbounds i8, ptr %41, i64 32
  %43 = load i32, ptr %42, align 8, !tbaa !33
  %44 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  %45 = getelementptr inbounds i8, ptr %44, i64 36
  %46 = load i32, ptr %45, align 4, !tbaa !34
  %47 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  %48 = getelementptr inbounds i8, ptr %47, i64 48
  %49 = call noundef ptr @_ZNKSt10unique_ptrIhPFvPhEE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %48) #8
  call void %29(i32 noundef 3553, i32 noundef %32, i32 noundef %34, i32 noundef %37, i32 noundef %40, i32 noundef %43, i32 noundef %46, ptr noundef %49)
  %50 = call noundef i32 @_Z10getGlErrorv()
  %.not42 = icmp eq i32 %50, 0
  br i1 %.not42, label %139, label %51

51:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %4) #8
  %52 = 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 %50) #8
  %53 = icmp sgt i32 %52, 0
  br i1 %53, label %54, label %61

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

57:                                               ; preds = %54
  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 57, ptr noundef nonnull @.str.7, ptr noundef nonnull %4)
          to label %58 unwind label %59

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

59:                                               ; preds = %57, %54
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %5) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %5) #8
  br label %81

61:                                               ; preds = %58, %51
  %62 = icmp eq i32 %50, 1286
  br i1 %62, label %63, label %74

63:                                               ; preds = %61
  %64 = call noundef i32 @_Z20getFramebufferStatusv()
  %65 = 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 %64) #8
  %66 = icmp sgt i32 %65, 0
  br i1 %66, label %67, label %74

67:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %6) #8
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %6)
  %68 = getelementptr inbounds i8, ptr %6, i64 16
  %69 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %68, ptr noundef nonnull @.str.5)
          to label %70 unwind label %72

70:                                               ; preds = %67
  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 57, ptr noundef nonnull @.str.7, ptr noundef nonnull %4)
          to label %71 unwind label %72

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

72:                                               ; preds = %70, %67
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %6) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %6) #8
  br label %81

74:                                               ; preds = %63, %71, %61
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %7) #8
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %7)
  %75 = getelementptr inbounds i8, ptr %7, 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 nonnull @.str.5)
          to label %77 unwind label %79

77:                                               ; preds = %74
  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 57, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.9)
          to label %78 unwind label %79

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

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

81:                                               ; preds = %79, %72, %59
  %.pn46 = phi { ptr, i32 } [ %80, %79 ], [ %73, %72 ], [ %60, %59 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %4) #8
  br label %192

82:                                               ; preds = %23
  %83 = load ptr, ptr @glad_glTexImage2D, align 8, !tbaa !28
  %84 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  %85 = getelementptr inbounds i8, ptr %84, i64 24
  %86 = load i32, ptr %85, align 8, !tbaa !29
  %87 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  %88 = load i32, ptr %87, align 8, !tbaa !30
  %89 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  %90 = getelementptr inbounds i8, ptr %89, i64 8
  %91 = load i32, ptr %90, align 8, !tbaa !31
  %92 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  %93 = getelementptr inbounds i8, ptr %92, i64 4
  %94 = load i32, ptr %93, align 4, !tbaa !32
  %95 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  %96 = getelementptr inbounds i8, ptr %95, i64 32
  %97 = load i32, ptr %96, align 8, !tbaa !33
  %98 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  %99 = getelementptr inbounds i8, ptr %98, i64 16
  %100 = load i32, ptr %99, align 8, !tbaa !35
  %101 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  %102 = getelementptr inbounds i8, ptr %101, i64 12
  %103 = load i32, ptr %102, align 4, !tbaa !36
  %104 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  %105 = getelementptr inbounds i8, ptr %104, i64 48
  %106 = call noundef ptr @_ZNKSt10unique_ptrIhPFvPhEE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %105) #8
  call void %83(i32 noundef 3553, i32 noundef %86, i32 noundef %88, i32 noundef %91, i32 noundef %94, i32 noundef %97, i32 noundef %100, i32 noundef %103, ptr noundef %106)
  %107 = call noundef i32 @_Z10getGlErrorv()
  %.not40 = icmp eq i32 %107, 0
  br i1 %.not40, label %139, label %108

108:                                              ; preds = %82
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %8) #8
  %109 = 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 %107) #8
  %110 = icmp sgt i32 %109, 0
  br i1 %110, label %111, label %118

111:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %9) #8
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %9)
  %112 = getelementptr inbounds i8, ptr %9, 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) %9, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef nonnull @.str.6, i32 noundef 68, ptr noundef nonnull @.str.7, ptr noundef nonnull %8)
          to label %115 unwind label %116

115:                                              ; preds = %114
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %9) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %9) #8
  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) %9) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %9) #8
  br label %138

118:                                              ; preds = %115, %108
  %119 = icmp eq i32 %107, 1286
  br i1 %119, label %120, label %131

120:                                              ; preds = %118
  %121 = call noundef i32 @_Z20getFramebufferStatusv()
  %122 = 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 %121) #8
  %123 = icmp sgt i32 %122, 0
  br i1 %123, label %124, label %131

124:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %10) #8
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %10)
  %125 = getelementptr inbounds i8, ptr %10, i64 16
  %126 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %125, ptr noundef nonnull @.str.5)
          to label %127 unwind label %129

127:                                              ; preds = %124
  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 68, ptr noundef nonnull @.str.7, ptr noundef nonnull %8)
          to label %128 unwind label %129

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

129:                                              ; preds = %127, %124
  %130 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %10) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %10) #8
  br label %138

131:                                              ; preds = %120, %128, %118
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %11) #8
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %11)
  %132 = getelementptr inbounds i8, ptr %11, i64 16
  %133 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %132, ptr noundef nonnull @.str.5)
          to label %134 unwind label %136

134:                                              ; preds = %131
  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 68, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.10)
          to label %135 unwind label %136

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

136:                                              ; preds = %134, %131
  %137 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %11) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %11) #8
  br label %138

138:                                              ; preds = %136, %129, %116
  %.pn = phi { ptr, i32 } [ %137, %136 ], [ %130, %129 ], [ %117, %116 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %8) #8
  br label %192

139:                                              ; preds = %82, %28
  %140 = call noundef ptr @_ZNKSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  %141 = getelementptr inbounds i8, ptr %140, i64 64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %142 = call ptr @_ZNSt6vectorIN3flw3flc13TextureConfig6MipmapENS0_14AllocatorStackIS3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(1048) %141) #8
  store ptr %142, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #8
  %143 = call ptr @_ZNSt6vectorIN3flw3flc13TextureConfig6MipmapENS0_14AllocatorStackIS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(1048) %141) #8
  store ptr %143, ptr %13, align 8
  %144 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3flw3flc13TextureConfig6MipmapESt6vectorIS4_NS1_14AllocatorStackIS4_EEEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  br i1 %144, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %139
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  %145 = call noundef i32 @_Z10getGlErrorv()
  %.not43 = icmp eq i32 %145, 0
  br i1 %.not43, label %191, label %160

.lr.ph:                                           ; preds = %139, %.lr.ph
  %.03449 = phi i32 [ %148, %.lr.ph ], [ 1, %139 ]
  %146 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN3flw3flc13TextureConfig6MipmapESt6vectorIS4_NS1_14AllocatorStackIS4_EEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  %147 = load ptr, ptr @glad_glCompressedTexImage2D, align 8, !tbaa !28
  %148 = add i32 %.03449, 1
  %149 = getelementptr inbounds i8, ptr %146, i64 12
  %150 = load i32, ptr %149, align 4, !tbaa !37
  %151 = getelementptr inbounds i8, ptr %146, i64 8
  %152 = load i32, ptr %151, align 8, !tbaa !39
  %153 = getelementptr inbounds i8, ptr %146, i64 4
  %154 = load i32, ptr %153, align 4, !tbaa !40
  %155 = load i32, ptr %146, align 8, !tbaa !41
  %156 = getelementptr inbounds i8, ptr %146, i64 16
  %157 = call noundef ptr @_ZNKSt10unique_ptrIhPFvPhEE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %156) #8
  call void %147(i32 noundef 3553, i32 noundef %.03449, i32 noundef %150, i32 noundef %152, i32 noundef %154, i32 noundef 0, i32 noundef %155, ptr noundef %157)
  %158 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN3flw3flc13TextureConfig6MipmapESt6vectorIS4_NS1_14AllocatorStackIS4_EEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  %159 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3flw3flc13TextureConfig6MipmapESt6vectorIS4_NS1_14AllocatorStackIS4_EEEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  br i1 %159, label %.lr.ph, label %._crit_edge

160:                                              ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %14) #8
  %161 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %14, ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef nonnull @.str.4, i32 noundef %145) #8
  %162 = icmp sgt i32 %161, 0
  br i1 %162, label %163, label %170

163:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %15) #8
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %15)
  %164 = getelementptr inbounds i8, ptr %15, i64 16
  %165 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %164, ptr noundef nonnull @.str.5)
          to label %166 unwind label %168

166:                                              ; preds = %163
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_PcEEvRNS0_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 83, ptr noundef nonnull @.str.7, ptr noundef nonnull %14)
          to label %167 unwind label %168

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

168:                                              ; preds = %166, %163
  %169 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %15) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %15) #8
  br label %190

170:                                              ; preds = %167, %160
  %171 = icmp eq i32 %145, 1286
  br i1 %171, label %172, label %183

172:                                              ; preds = %170
  %173 = call noundef i32 @_Z20getFramebufferStatusv()
  %174 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %14, ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef nonnull @.str.8, i32 noundef %173) #8
  %175 = icmp sgt i32 %174, 0
  br i1 %175, label %176, label %183

176:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %16) #8
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %16)
  %177 = getelementptr inbounds i8, ptr %16, i64 16
  %178 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %177, ptr noundef nonnull @.str.5)
          to label %179 unwind label %181

179:                                              ; preds = %176
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_PcEEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %16, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef nonnull @.str.6, i32 noundef 83, ptr noundef nonnull @.str.7, ptr noundef nonnull %14)
          to label %180 unwind label %181

180:                                              ; preds = %179
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %16) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %16) #8
  br label %183

181:                                              ; preds = %179, %176
  %182 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %16) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %16) #8
  br label %190

183:                                              ; preds = %172, %180, %170
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %17) #8
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %17)
  %184 = getelementptr inbounds i8, ptr %17, i64 16
  %185 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %184, ptr noundef nonnull @.str.5)
          to label %186 unwind label %188

186:                                              ; preds = %183
  invoke void @_ZL14fLogWithStreamINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKciS7_S7_EEvRNS0_18basic_stringstreamIcS3_S4_EERKT_DpT0_(ptr noundef nonnull align 8 dereferenceable(128) %17, ptr noundef nonnull align 8 dereferenceable(32) @_ZL5_tag_B5cxx11, ptr noundef nonnull @.str.6, i32 noundef 83, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.11)
          to label %187 unwind label %188

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

188:                                              ; preds = %186, %183
  %189 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %17) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %17) #8
  br label %190

190:                                              ; preds = %188, %181, %168
  %.pn44 = phi { ptr, i32 } [ %189, %188 ], [ %182, %181 ], [ %169, %168 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %14) #8
  br label %192

191:                                              ; preds = %._crit_edge
  ret void

192:                                              ; preds = %190, %138, %81
  %.pn46.pn = phi { ptr, i32 } [ %.pn46, %81 ], [ %.pn44, %190 ], [ %.pn, %138 ]
  resume { ptr, i32 } %.pn46.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3flw25make_pu_with_no_ownershipIhEESt10unique_ptrIT_PFvPS2_EES3_(ptr dead_on_unwind noalias writable sret(%"class.std::unique_ptr.5") align 8, ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10unique_ptrIhPFvPhEED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2 align 2

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

declare noundef i32 @_Z10getGlErrorv() local_unnamed_addr #3

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

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

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

declare noundef i32 @_Z20getFramebufferStatusv() local_unnamed_addr #3

; 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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPN3flw3flc13TextureConfig6MipmapESt6vectorIS4_NS1_14AllocatorStackIS4_EEEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #7

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN3flw3flc13TextureConfig6MipmapESt6vectorIS4_NS1_14AllocatorStackIS4_EEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 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 = { 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 #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 = { 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 #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 = { 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { 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, !9, i64 29}
!6 = !{!"_ZTSN3flw3flc13TextureConfigE", !7, i64 0, !11, i64 24, !12, i64 40, !13, i64 48, !22, i64 64}
!7 = !{!"_ZTSN3flw3flc13TextureConfig6HeaderE", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12, !8, i64 16, !8, i64 20}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSN3flw3flc13TextureConfig7ContentE", !8, i64 0, !9, i64 4, !9, i64 5, !8, i64 8, !8, i64 12}
!12 = !{!"_ZTSN3flw3flc17EMemoryAllocationE", !9, i64 0}
!13 = !{!"_ZTSSt10unique_ptrIhPFvPhEE", !14, i64 0}
!14 = !{!"_ZTSSt15__uniq_ptr_dataIhPFvPhELb1ELb1EE", !15, i64 0}
!15 = !{!"_ZTSSt15__uniq_ptr_implIhPFvPhEE", !16, i64 0}
!16 = !{!"_ZTSSt5tupleIJPhPFvS0_EEE", !17, i64 0}
!17 = !{!"_ZTSSt11_Tuple_implILm0EJPhPFvS0_EEE", !18, i64 0, !21, i64 8}
!18 = !{!"_ZTSSt11_Tuple_implILm1EJPFvPhEEE", !19, i64 0}
!19 = !{!"_ZTSSt10_Head_baseILm1EPFvPhELb0EE", !20, i64 0}
!20 = !{!"any pointer", !9, i64 0}
!21 = !{!"_ZTSSt10_Head_baseILm0EPhLb0EE", !20, i64 0}
!22 = !{!"_ZTSSt6vectorIN3flw3flc13TextureConfig6MipmapENS0_14AllocatorStackIS3_EEE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIN3flw3flc13TextureConfig6MipmapENS0_14AllocatorStackIS3_EEE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN3flw3flc13TextureConfig6MipmapENS0_14AllocatorStackIS3_EEE12_Vector_implE", !25, i64 0, !27, i64 1024}
!25 = !{!"_ZTSN3flw14AllocatorStackINS_3flc13TextureConfig6MipmapEEE", !26, i64 0}
!26 = !{!"_ZTSSt5arrayIN3flw3flc13TextureConfig6MipmapELm32EE", !9, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIN3flw3flc13TextureConfig6MipmapENS0_14AllocatorStackIS3_EEE17_Vector_impl_dataE", !20, i64 0, !20, i64 8, !20, i64 16}
!28 = !{!20, !20, i64 0}
!29 = !{!6, !8, i64 24}
!30 = !{!6, !8, i64 0}
!31 = !{!6, !8, i64 8}
!32 = !{!6, !8, i64 4}
!33 = !{!6, !8, i64 32}
!34 = !{!6, !8, i64 36}
!35 = !{!6, !8, i64 16}
!36 = !{!6, !8, i64 12}
!37 = !{!38, !8, i64 12}
!38 = !{!"_ZTSN3flw3flc13TextureConfig6MipmapE", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12, !13, i64 16}
!39 = !{!38, !8, i64 8}
!40 = !{!38, !8, i64 4}
!41 = !{!38, !8, i64 0}


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