; LLVM IR from steps3d/graphics-book :: Code/Core (Texture)

; 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.Data = type { ptr, ptr, i32, i32 }
%class.Texture = type { i32, i32, i32, i32, i32, i8, i32, %"class.std::__cxx11::basic_string" }
%"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] }
%struct.DDS_header = type { i32, i32, i32, i32, i32, i32, i32, i32, [11 x i32], %struct.anon, %struct.anon.0, i32 }
%struct.anon = type { i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.anon.0 = type { i32, i32, i32, i32 }

@__glewGenerateMipmap = external global ptr, align 8

declare i32 @__gxx_personality_v0(...)

declare void @glTexParameteri(i32 noundef, i32 noundef, i32 noundef) #0

declare void @glGenTextures(i32 noundef, ptr noundef) #0

declare void @glBindTexture(i32 noundef, i32 noundef) #0

declare void @glTexImage2D(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) #0

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7Texture9load2DHdrERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca %class.Data, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %14 = load ptr, ptr %4, align 8
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 7
  %17 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %15)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %18 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 7
  %19 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  %20 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 2
  %21 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 3
  %22 = call ptr @stbi_loadf(ptr noundef %19, ptr noundef %20, ptr noundef %21, ptr noundef %6, i32 noundef 0)
  store ptr %22, ptr %7, align 8, !tbaa !5
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = icmp eq ptr %23, null
  br i1 %24, label %25, label %247

25:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #5
  %26 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 7
  call void @_ZN4DataC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(32) %26)
  %27 = invoke noundef i32 @_ZNK4Data9getLengthEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %28 unwind label %32

28:                                               ; preds = %25
  %29 = sext i32 %27 to i64
  %30 = icmp ult i64 %29, 128
  br i1 %30, label %31, label %36

31:                                               ; preds = %28
  store i1 false, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %244

32:                                               ; preds = %25
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %9, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %10, align 4
  br label %246

36:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %37 = invoke noundef ptr @_ZNK4Data6getPtrEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %38 unwind label %44

38:                                               ; preds = %36
  store ptr %37, ptr %12, align 8, !tbaa !5
  %39 = load ptr, ptr %12, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.DDS_header, ptr %39, i32 0, i32 0
  %41 = load i32, ptr %40, align 4, !tbaa !9
  %42 = icmp ne i32 %41, 542327876
  br i1 %42, label %43, label %48

43:                                               ; preds = %38
  store i1 false, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %242

44:                                               ; preds = %36
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %9, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %10, align 4
  br label %243

48:                                               ; preds = %38
  %49 = load ptr, ptr %12, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.DDS_header, ptr %49, i32 0, i32 1
  %51 = load i32, ptr %50, align 4, !tbaa !14
  %52 = icmp ne i32 %51, 124
  br i1 %52, label %53, label %54

53:                                               ; preds = %48
  store i1 false, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %242

54:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 4103, ptr %13, align 4, !tbaa !15
  %55 = load ptr, ptr %12, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.DDS_header, ptr %55, i32 0, i32 2
  %57 = load i32, ptr %56, align 4, !tbaa !16
  %58 = load i32, ptr %13, align 4, !tbaa !15
  %59 = and i32 %57, %58
  %60 = load i32, ptr %13, align 4, !tbaa !15
  %61 = icmp ne i32 %59, %60
  br i1 %61, label %62, label %63

62:                                               ; preds = %54
  store i1 false, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %241

63:                                               ; preds = %54
  %64 = load ptr, ptr %12, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.DDS_header, ptr %64, i32 0, i32 9
  %66 = getelementptr inbounds %struct.anon, ptr %65, i32 0, i32 0
  %67 = load i32, ptr %66, align 4, !tbaa !17
  %68 = icmp ne i32 %67, 32
  br i1 %68, label %69, label %70

69:                                               ; preds = %63
  store i1 false, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %241

70:                                               ; preds = %63
  store i32 68, ptr %13, align 4, !tbaa !15
  %71 = load ptr, ptr %12, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.DDS_header, ptr %71, i32 0, i32 9
  %73 = getelementptr inbounds %struct.anon, ptr %72, i32 0, i32 1
  %74 = load i32, ptr %73, align 4, !tbaa !18
  %75 = load i32, ptr %13, align 4, !tbaa !15
  %76 = and i32 %74, %75
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %78, label %79

78:                                               ; preds = %70
  store i1 false, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %241

79:                                               ; preds = %70
  %80 = load ptr, ptr %12, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.DDS_header, ptr %80, i32 0, i32 10
  %82 = getelementptr inbounds %struct.anon.0, ptr %81, i32 0, i32 0
  %83 = load i32, ptr %82, align 4, !tbaa !19
  %84 = and i32 %83, 4096
  %85 = icmp eq i32 %84, 0
  br i1 %85, label %86, label %87

86:                                               ; preds = %79
  store i1 false, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %241

87:                                               ; preds = %79
  %88 = load ptr, ptr %12, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.DDS_header, ptr %88, i32 0, i32 10
  %90 = getelementptr inbounds %struct.anon.0, ptr %89, i32 0, i32 1
  %91 = load i32, ptr %90, align 4, !tbaa !20
  %92 = and i32 %91, 512
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %94, label %95

94:                                               ; preds = %87
  store i1 false, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %241

95:                                               ; preds = %87
  %96 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 1
  store i32 3553, ptr %96, align 4, !tbaa !21
  %97 = load ptr, ptr %12, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.DDS_header, ptr %97, i32 0, i32 4
  %99 = load i32, ptr %98, align 4, !tbaa !27
  %100 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 2
  store i32 %99, ptr %100, align 8, !tbaa !28
  %101 = load ptr, ptr %12, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.DDS_header, ptr %101, i32 0, i32 3
  %103 = load i32, ptr %102, align 4, !tbaa !29
  %104 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 3
  store i32 %103, ptr %104, align 4, !tbaa !30
  %105 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 4
  store i32 1, ptr %105, align 8, !tbaa !31
  %106 = load ptr, ptr %12, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.DDS_header, ptr %106, i32 0, i32 9
  %108 = getelementptr inbounds %struct.anon, ptr %107, i32 0, i32 2
  %109 = load i32, ptr %108, align 4, !tbaa !32
  %110 = icmp eq i32 %109, 113
  br i1 %110, label %111, label %130

111:                                              ; preds = %95
  %112 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 0
  invoke void @glGenTextures(i32 noundef 1, ptr noundef %112)
          to label %113 unwind label %126

113:                                              ; preds = %111
  %114 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 1
  %115 = load i32, ptr %114, align 4, !tbaa !21
  %116 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 0
  %117 = load i32, ptr %116, align 8, !tbaa !33
  invoke void @glBindTexture(i32 noundef %115, i32 noundef %117)
          to label %118 unwind label %126

118:                                              ; preds = %113
  %119 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 2
  %120 = load i32, ptr %119, align 8, !tbaa !28
  %121 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 3
  %122 = load i32, ptr %121, align 4, !tbaa !30
  %123 = load ptr, ptr %12, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.DDS_header, ptr %123, i64 1
  invoke void @glTexImage2D(i32 noundef 3553, i32 noundef 0, i32 noundef 34842, i32 noundef %120, i32 noundef %122, i32 noundef 0, i32 noundef 6408, i32 noundef 5131, ptr noundef %124)
          to label %125 unwind label %126

125:                                              ; preds = %118
  store i32 2, ptr %11, align 4
  br label %241

126:                                              ; preds = %227, %222, %220, %206, %201, %199, %185, %180, %178, %164, %159, %157, %143, %138, %136, %118, %113, %111
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %9, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %243

130:                                              ; preds = %95
  %131 = load ptr, ptr %12, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.DDS_header, ptr %131, i32 0, i32 9
  %133 = getelementptr inbounds %struct.anon, ptr %132, i32 0, i32 2
  %134 = load i32, ptr %133, align 4, !tbaa !32
  %135 = icmp eq i32 %134, 111
  br i1 %135, label %136, label %151

136:                                              ; preds = %130
  %137 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 0
  invoke void @glGenTextures(i32 noundef 1, ptr noundef %137)
          to label %138 unwind label %126

138:                                              ; preds = %136
  %139 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 1
  %140 = load i32, ptr %139, align 4, !tbaa !21
  %141 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 0
  %142 = load i32, ptr %141, align 8, !tbaa !33
  invoke void @glBindTexture(i32 noundef %140, i32 noundef %142)
          to label %143 unwind label %126

143:                                              ; preds = %138
  %144 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 2
  %145 = load i32, ptr %144, align 8, !tbaa !28
  %146 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 3
  %147 = load i32, ptr %146, align 4, !tbaa !30
  %148 = load ptr, ptr %12, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.DDS_header, ptr %148, i64 1
  invoke void @glTexImage2D(i32 noundef 3553, i32 noundef 0, i32 noundef 33325, i32 noundef %145, i32 noundef %147, i32 noundef 0, i32 noundef 6403, i32 noundef 5131, ptr noundef %149)
          to label %150 unwind label %126

150:                                              ; preds = %143
  store i32 2, ptr %11, align 4
  br label %241

151:                                              ; preds = %130
  %152 = load ptr, ptr %12, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.DDS_header, ptr %152, i32 0, i32 9
  %154 = getelementptr inbounds %struct.anon, ptr %153, i32 0, i32 2
  %155 = load i32, ptr %154, align 4, !tbaa !32
  %156 = icmp eq i32 %155, 112
  br i1 %156, label %157, label %172

157:                                              ; preds = %151
  %158 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 0
  invoke void @glGenTextures(i32 noundef 1, ptr noundef %158)
          to label %159 unwind label %126

159:                                              ; preds = %157
  %160 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 1
  %161 = load i32, ptr %160, align 4, !tbaa !21
  %162 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 0
  %163 = load i32, ptr %162, align 8, !tbaa !33
  invoke void @glBindTexture(i32 noundef %161, i32 noundef %163)
          to label %164 unwind label %126

164:                                              ; preds = %159
  %165 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 2
  %166 = load i32, ptr %165, align 8, !tbaa !28
  %167 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 3
  %168 = load i32, ptr %167, align 4, !tbaa !30
  %169 = load ptr, ptr %12, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.DDS_header, ptr %169, i64 1
  invoke void @glTexImage2D(i32 noundef 3553, i32 noundef 0, i32 noundef 33327, i32 noundef %166, i32 noundef %168, i32 noundef 0, i32 noundef 33319, i32 noundef 5131, ptr noundef %170)
          to label %171 unwind label %126

171:                                              ; preds = %164
  store i32 2, ptr %11, align 4
  br label %241

172:                                              ; preds = %151
  %173 = load ptr, ptr %12, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.DDS_header, ptr %173, i32 0, i32 9
  %175 = getelementptr inbounds %struct.anon, ptr %174, i32 0, i32 2
  %176 = load i32, ptr %175, align 4, !tbaa !32
  %177 = icmp eq i32 %176, 114
  br i1 %177, label %178, label %193

178:                                              ; preds = %172
  %179 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 0
  invoke void @glGenTextures(i32 noundef 1, ptr noundef %179)
          to label %180 unwind label %126

180:                                              ; preds = %178
  %181 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 1
  %182 = load i32, ptr %181, align 4, !tbaa !21
  %183 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 0
  %184 = load i32, ptr %183, align 8, !tbaa !33
  invoke void @glBindTexture(i32 noundef %182, i32 noundef %184)
          to label %185 unwind label %126

185:                                              ; preds = %180
  %186 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 2
  %187 = load i32, ptr %186, align 8, !tbaa !28
  %188 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 3
  %189 = load i32, ptr %188, align 4, !tbaa !30
  %190 = load ptr, ptr %12, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.DDS_header, ptr %190, i64 1
  invoke void @glTexImage2D(i32 noundef 3553, i32 noundef 0, i32 noundef 33326, i32 noundef %187, i32 noundef %189, i32 noundef 0, i32 noundef 6403, i32 noundef 5126, ptr noundef %191)
          to label %192 unwind label %126

192:                                              ; preds = %185
  store i32 2, ptr %11, align 4
  br label %241

193:                                              ; preds = %172
  %194 = load ptr, ptr %12, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.DDS_header, ptr %194, i32 0, i32 9
  %196 = getelementptr inbounds %struct.anon, ptr %195, i32 0, i32 2
  %197 = load i32, ptr %196, align 4, !tbaa !32
  %198 = icmp eq i32 %197, 115
  br i1 %198, label %199, label %214

199:                                              ; preds = %193
  %200 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 0
  invoke void @glGenTextures(i32 noundef 1, ptr noundef %200)
          to label %201 unwind label %126

201:                                              ; preds = %199
  %202 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 1
  %203 = load i32, ptr %202, align 4, !tbaa !21
  %204 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 0
  %205 = load i32, ptr %204, align 8, !tbaa !33
  invoke void @glBindTexture(i32 noundef %203, i32 noundef %205)
          to label %206 unwind label %126

206:                                              ; preds = %201
  %207 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 2
  %208 = load i32, ptr %207, align 8, !tbaa !28
  %209 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 3
  %210 = load i32, ptr %209, align 4, !tbaa !30
  %211 = load ptr, ptr %12, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.DDS_header, ptr %211, i64 1
  invoke void @glTexImage2D(i32 noundef 3553, i32 noundef 0, i32 noundef 33328, i32 noundef %208, i32 noundef %210, i32 noundef 0, i32 noundef 33319, i32 noundef 5126, ptr noundef %212)
          to label %213 unwind label %126

213:                                              ; preds = %206
  store i32 2, ptr %11, align 4
  br label %241

214:                                              ; preds = %193
  %215 = load ptr, ptr %12, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.DDS_header, ptr %215, i32 0, i32 9
  %217 = getelementptr inbounds %struct.anon, ptr %216, i32 0, i32 2
  %218 = load i32, ptr %217, align 4, !tbaa !32
  %219 = icmp eq i32 %218, 116
  br i1 %219, label %220, label %235

220:                                              ; preds = %214
  %221 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 0
  invoke void @glGenTextures(i32 noundef 1, ptr noundef %221)
          to label %222 unwind label %126

222:                                              ; preds = %220
  %223 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 1
  %224 = load i32, ptr %223, align 4, !tbaa !21
  %225 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 0
  %226 = load i32, ptr %225, align 8, !tbaa !33
  invoke void @glBindTexture(i32 noundef %224, i32 noundef %226)
          to label %227 unwind label %126

227:                                              ; preds = %222
  %228 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 2
  %229 = load i32, ptr %228, align 8, !tbaa !28
  %230 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 3
  %231 = load i32, ptr %230, align 4, !tbaa !30
  %232 = load ptr, ptr %12, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.DDS_header, ptr %232, i64 1
  invoke void @glTexImage2D(i32 noundef 3553, i32 noundef 0, i32 noundef 34836, i32 noundef %229, i32 noundef %231, i32 noundef 0, i32 noundef 6408, i32 noundef 5126, ptr noundef %233)
          to label %234 unwind label %126

234:                                              ; preds = %227
  store i32 2, ptr %11, align 4
  br label %241

235:                                              ; preds = %214
  br label %236

236:                                              ; preds = %235
  br label %237

237:                                              ; preds = %236
  br label %238

238:                                              ; preds = %237
  br label %239

239:                                              ; preds = %238
  br label %240

240:                                              ; preds = %239
  store i1 false, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %241

241:                                              ; preds = %240, %234, %213, %192, %171, %150, %125, %94, %86, %78, %69, %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %242

242:                                              ; preds = %241, %53, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %244

243:                                              ; preds = %126, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %246

244:                                              ; preds = %242, %31
  call void @_ZN4DataD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #5
  %245 = load i32, ptr %11, align 4
  switch i32 %245, label %290 [
    i32 2, label %261
  ]

246:                                              ; preds = %243, %32
  call void @_ZN4DataD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %292

247:                                              ; preds = %2
  %248 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 1
  store i32 3553, ptr %248, align 4, !tbaa !21
  %249 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 4
  store i32 1, ptr %249, align 8, !tbaa !31
  %250 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 0
  call void @glGenTextures(i32 noundef 1, ptr noundef %250)
  %251 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 1
  %252 = load i32, ptr %251, align 4, !tbaa !21
  %253 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 0
  %254 = load i32, ptr %253, align 8, !tbaa !33
  call void @glBindTexture(i32 noundef %252, i32 noundef %254)
  %255 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 2
  %256 = load i32, ptr %255, align 8, !tbaa !28
  %257 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 3
  %258 = load i32, ptr %257, align 4, !tbaa !30
  %259 = load ptr, ptr %7, align 8, !tbaa !5
  call void @glTexImage2D(i32 noundef 3553, i32 noundef 0, i32 noundef 34843, i32 noundef %256, i32 noundef %258, i32 noundef 0, i32 noundef 6407, i32 noundef 5126, ptr noundef %259)
  %260 = load ptr, ptr %7, align 8, !tbaa !5
  call void @stbi_image_free(ptr noundef %260)
  br label %261

261:                                              ; preds = %247, %244
  %262 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 1
  %263 = load i32, ptr %262, align 4, !tbaa !21
  call void @glTexParameteri(i32 noundef %263, i32 noundef 10242, i32 noundef 10497)
  %264 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 1
  %265 = load i32, ptr %264, align 4, !tbaa !21
  call void @glTexParameteri(i32 noundef %265, i32 noundef 10243, i32 noundef 10497)
  %266 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 5
  %267 = load i8, ptr %266, align 4, !tbaa !34, !range !35, !noundef !36
  %268 = trunc i8 %267 to i1
  br i1 %268, label %269, label %273

269:                                              ; preds = %261
  %270 = load ptr, ptr @__glewGenerateMipmap, align 8, !tbaa !5
  %271 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 1
  %272 = load i32, ptr %271, align 4, !tbaa !21
  call void %270(i32 noundef %272)
  br label %273

273:                                              ; preds = %269, %261
  %274 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 5
  %275 = load i8, ptr %274, align 4, !tbaa !34, !range !35, !noundef !36
  %276 = trunc i8 %275 to i1
  br i1 %276, label %277, label %282

277:                                              ; preds = %273
  %278 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 1
  %279 = load i32, ptr %278, align 4, !tbaa !21
  call void @glTexParameteri(i32 noundef %279, i32 noundef 10241, i32 noundef 9987)
  %280 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 1
  %281 = load i32, ptr %280, align 4, !tbaa !21
  call void @glTexParameteri(i32 noundef %281, i32 noundef 10240, i32 noundef 9729)
  br label %287

282:                                              ; preds = %273
  %283 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 1
  %284 = load i32, ptr %283, align 4, !tbaa !21
  call void @glTexParameteri(i32 noundef %284, i32 noundef 10241, i32 noundef 9729)
  %285 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 1
  %286 = load i32, ptr %285, align 4, !tbaa !21
  call void @glTexParameteri(i32 noundef %286, i32 noundef 10240, i32 noundef 9729)
  br label %287

287:                                              ; preds = %282, %277
  %288 = getelementptr inbounds %class.Texture, ptr %14, i32 0, i32 1
  %289 = load i32, ptr %288, align 4, !tbaa !21
  call void @glBindTexture(i32 noundef %289, i32 noundef 0)
  store i1 true, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %290

290:                                              ; preds = %287, %244
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %291 = load i1, ptr %3, align 1
  ret i1 %291

292:                                              ; preds = %246
  %293 = load ptr, ptr %9, align 8
  %294 = load i32, ptr %10, align 4
  %295 = insertvalue { ptr, i32 } poison, ptr %293, 0
  %296 = insertvalue { ptr, i32 } %295, i32 %294, 1
  resume { ptr, i32 } %296
}

declare ptr @stbi_loadf(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #0

declare void @_ZN4DataC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0

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

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

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

declare void @stbi_image_free(ptr noundef) #0

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

!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, !11, i64 0}
!10 = !{!"_ZTS10DDS_header", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !7, i64 32, !12, i64 76, !13, i64 108, !11, i64 124}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSN10DDS_headerUt_E", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28}
!13 = !{!"_ZTSN10DDS_headerUt0_E", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!14 = !{!10, !11, i64 4}
!15 = !{!11, !11, i64 0}
!16 = !{!10, !11, i64 8}
!17 = !{!10, !11, i64 76}
!18 = !{!10, !11, i64 80}
!19 = !{!10, !11, i64 108}
!20 = !{!10, !11, i64 112}
!21 = !{!22, !11, i64 4}
!22 = !{!"_ZTS7Texture", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !23, i64 20, !11, i64 24, !24, i64 32}
!23 = !{!"bool", !7, i64 0}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !25, i64 0, !26, i64 8, !7, i64 16}
!25 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!26 = !{!"long", !7, i64 0}
!27 = !{!10, !11, i64 16}
!28 = !{!22, !11, i64 8}
!29 = !{!10, !11, i64 12}
!30 = !{!22, !11, i64 12}
!31 = !{!22, !11, i64 16}
!32 = !{!10, !11, i64 84}
!33 = !{!22, !11, i64 0}
!34 = !{!22, !23, i64 20}
!35 = !{i8 0, i8 2}
!36 = !{}


; 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.Data = type { ptr, ptr, i32, i32 }

@__glewGenerateMipmap = external local_unnamed_addr global ptr, align 8

declare i32 @__gxx_personality_v0(...)

declare void @glTexParameteri(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

declare void @glGenTextures(i32 noundef, ptr noundef) local_unnamed_addr #0

declare void @glBindTexture(i32 noundef, i32 noundef) local_unnamed_addr #0

declare void @glTexImage2D(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7Texture9load2DHdrERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca %class.Data, align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 32
  %6 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  %7 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = getelementptr inbounds i8, ptr %0, i64 12
  %10 = call ptr @stbi_loadf(ptr noundef %7, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %3, i32 noundef 0)
  %11 = icmp eq ptr %10, null
  br i1 %11, label %12, label %83

12:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @_ZN4DataC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(32) %5)
  %13 = call noundef i32 @_ZNK4Data9getLengthEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %14 = icmp ult i32 %13, 128
  br i1 %14, label %.critedge, label %15

15:                                               ; preds = %12
  %16 = call noundef ptr @_ZNK4Data6getPtrEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %.not = icmp eq i32 %17, 542327876
  br i1 %.not, label %18, label %.critedge

18:                                               ; preds = %15
  %19 = getelementptr inbounds i8, ptr %16, i64 4
  %20 = load i32, ptr %19, align 4, !tbaa !12
  %.not36 = icmp eq i32 %20, 124
  br i1 %.not36, label %21, label %.critedge

21:                                               ; preds = %18
  %22 = getelementptr inbounds i8, ptr %16, i64 8
  %23 = load i32, ptr %22, align 4, !tbaa !13
  %24 = and i32 %23, 4103
  %.not37 = icmp eq i32 %24, 4103
  br i1 %.not37, label %25, label %.critedge

25:                                               ; preds = %21
  %26 = getelementptr inbounds i8, ptr %16, i64 76
  %27 = load i32, ptr %26, align 4, !tbaa !14
  %.not38 = icmp eq i32 %27, 32
  br i1 %.not38, label %28, label %.critedge

28:                                               ; preds = %25
  %29 = getelementptr inbounds i8, ptr %16, i64 80
  %30 = load i32, ptr %29, align 4, !tbaa !15
  %31 = and i32 %30, 68
  %32 = icmp eq i32 %31, 0
  br i1 %32, label %.critedge, label %33

33:                                               ; preds = %28
  %34 = getelementptr inbounds i8, ptr %16, i64 108
  %35 = load i32, ptr %34, align 4, !tbaa !16
  %36 = and i32 %35, 4096
  %37 = icmp eq i32 %36, 0
  br i1 %37, label %.critedge, label %38

38:                                               ; preds = %33
  %39 = getelementptr inbounds i8, ptr %16, i64 112
  %40 = load i32, ptr %39, align 4, !tbaa !17
  %41 = and i32 %40, 512
  %.not39 = icmp eq i32 %41, 0
  br i1 %.not39, label %42, label %.critedge

42:                                               ; preds = %38
  %43 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 3553, ptr %43, align 4, !tbaa !18
  %44 = getelementptr inbounds i8, ptr %16, i64 12
  %45 = load <2 x i32>, ptr %44, align 4, !tbaa !25
  %46 = shufflevector <2 x i32> %45, <2 x i32> poison, <2 x i32> <i32 1, i32 0>
  store <2 x i32> %46, ptr %8, align 8, !tbaa !25
  %47 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 1, ptr %47, align 8, !tbaa !26
  %48 = getelementptr inbounds i8, ptr %16, i64 84
  %49 = load i32, ptr %48, align 4, !tbaa !27
  switch i32 %49, label %.critedge [
    i32 113, label %50
    i32 111, label %56
    i32 112, label %60
    i32 114, label %64
    i32 115, label %68
    i32 116, label %72
  ]

50:                                               ; preds = %42
  invoke void @glGenTextures(i32 noundef 1, ptr noundef nonnull %0)
          to label %51 unwind label %54

51:                                               ; preds = %50
  %52 = load i32, ptr %43, align 4, !tbaa !18
  %53 = load i32, ptr %0, align 8, !tbaa !28
  invoke void @glBindTexture(i32 noundef %52, i32 noundef %53)
          to label %.invoke unwind label %54

54:                                               ; preds = %.invoke, %73, %72, %69, %68, %65, %64, %61, %60, %57, %56, %51, %50
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4DataD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  resume { ptr, i32 } %55

56:                                               ; preds = %42
  invoke void @glGenTextures(i32 noundef 1, ptr noundef nonnull %0)
          to label %57 unwind label %54

57:                                               ; preds = %56
  %58 = load i32, ptr %43, align 4, !tbaa !18
  %59 = load i32, ptr %0, align 8, !tbaa !28
  invoke void @glBindTexture(i32 noundef %58, i32 noundef %59)
          to label %.invoke unwind label %54

60:                                               ; preds = %42
  invoke void @glGenTextures(i32 noundef 1, ptr noundef nonnull %0)
          to label %61 unwind label %54

61:                                               ; preds = %60
  %62 = load i32, ptr %43, align 4, !tbaa !18
  %63 = load i32, ptr %0, align 8, !tbaa !28
  invoke void @glBindTexture(i32 noundef %62, i32 noundef %63)
          to label %.invoke unwind label %54

64:                                               ; preds = %42
  invoke void @glGenTextures(i32 noundef 1, ptr noundef nonnull %0)
          to label %65 unwind label %54

65:                                               ; preds = %64
  %66 = load i32, ptr %43, align 4, !tbaa !18
  %67 = load i32, ptr %0, align 8, !tbaa !28
  invoke void @glBindTexture(i32 noundef %66, i32 noundef %67)
          to label %.invoke unwind label %54

68:                                               ; preds = %42
  invoke void @glGenTextures(i32 noundef 1, ptr noundef nonnull %0)
          to label %69 unwind label %54

69:                                               ; preds = %68
  %70 = load i32, ptr %43, align 4, !tbaa !18
  %71 = load i32, ptr %0, align 8, !tbaa !28
  invoke void @glBindTexture(i32 noundef %70, i32 noundef %71)
          to label %.invoke unwind label %54

72:                                               ; preds = %42
  invoke void @glGenTextures(i32 noundef 1, ptr noundef nonnull %0)
          to label %73 unwind label %54

73:                                               ; preds = %72
  %74 = load i32, ptr %43, align 4, !tbaa !18
  %75 = load i32, ptr %0, align 8, !tbaa !28
  invoke void @glBindTexture(i32 noundef %74, i32 noundef %75)
          to label %.invoke unwind label %54

.invoke:                                          ; preds = %73, %69, %65, %61, %57, %51
  %76 = phi i32 [ 34842, %51 ], [ 33325, %57 ], [ 33327, %61 ], [ 33326, %65 ], [ 33328, %69 ], [ 34836, %73 ]
  %77 = phi i32 [ 6408, %51 ], [ 6403, %57 ], [ 33319, %61 ], [ 6403, %65 ], [ 33319, %69 ], [ 6408, %73 ]
  %78 = phi i32 [ 5131, %51 ], [ 5131, %57 ], [ 5131, %61 ], [ 5126, %65 ], [ 5126, %69 ], [ 5126, %73 ]
  %79 = load i32, ptr %8, align 8, !tbaa !29
  %80 = load i32, ptr %9, align 4, !tbaa !30
  %81 = getelementptr inbounds i8, ptr %16, i64 128
  invoke void @glTexImage2D(i32 noundef 3553, i32 noundef 0, i32 noundef %76, i32 noundef %79, i32 noundef %80, i32 noundef 0, i32 noundef %77, i32 noundef %78, ptr noundef nonnull %81)
          to label %82 unwind label %54

82:                                               ; preds = %.invoke
  call void @_ZN4DataD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  br label %90

83:                                               ; preds = %2
  %84 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 3553, ptr %84, align 4, !tbaa !18
  %85 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 1, ptr %85, align 8, !tbaa !26
  call void @glGenTextures(i32 noundef 1, ptr noundef nonnull %0)
  %86 = load i32, ptr %84, align 4, !tbaa !18
  %87 = load i32, ptr %0, align 8, !tbaa !28
  call void @glBindTexture(i32 noundef %86, i32 noundef %87)
  %88 = load i32, ptr %8, align 8, !tbaa !29
  %89 = load i32, ptr %9, align 4, !tbaa !30
  call void @glTexImage2D(i32 noundef 3553, i32 noundef 0, i32 noundef 34843, i32 noundef %88, i32 noundef %89, i32 noundef 0, i32 noundef 6407, i32 noundef 5126, ptr noundef nonnull %10)
  call void @stbi_image_free(ptr noundef nonnull %10)
  br label %90

90:                                               ; preds = %82, %83
  %91 = getelementptr inbounds i8, ptr %0, i64 4
  %92 = load i32, ptr %91, align 4, !tbaa !18
  call void @glTexParameteri(i32 noundef %92, i32 noundef 10242, i32 noundef 10497)
  %93 = load i32, ptr %91, align 4, !tbaa !18
  call void @glTexParameteri(i32 noundef %93, i32 noundef 10243, i32 noundef 10497)
  %94 = getelementptr inbounds i8, ptr %0, i64 20
  %95 = load i8, ptr %94, align 4, !tbaa !31, !range !32, !noundef !33
  %96 = trunc nuw i8 %95 to i1
  br i1 %96, label %97, label %100

97:                                               ; preds = %90
  %98 = load ptr, ptr @__glewGenerateMipmap, align 8, !tbaa !34
  %99 = load i32, ptr %91, align 4, !tbaa !18
  call void %98(i32 noundef %99)
  %.pre = load i8, ptr %94, align 4, !tbaa !31, !range !32
  br label %100

100:                                              ; preds = %97, %90
  %101 = phi i8 [ %.pre, %97 ], [ %95, %90 ]
  %102 = trunc nuw i8 %101 to i1
  %103 = load i32, ptr %91, align 4, !tbaa !18
  %. = select i1 %102, i32 9987, i32 9729
  call void @glTexParameteri(i32 noundef %103, i32 noundef 10241, i32 noundef %.)
  %104 = load i32, ptr %91, align 4, !tbaa !18
  call void @glTexParameteri(i32 noundef %104, i32 noundef 10240, i32 noundef 9729)
  %105 = load i32, ptr %91, align 4, !tbaa !18
  call void @glBindTexture(i32 noundef %105, i32 noundef 0)
  br label %106

.critedge:                                        ; preds = %42, %38, %33, %28, %25, %21, %18, %15, %12
  call void @_ZN4DataD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  br label %106

106:                                              ; preds = %.critedge, %100
  %.3 = phi i1 [ true, %100 ], [ false, %.critedge ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  ret i1 %.3
}

declare ptr @stbi_loadf(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @_ZN4DataC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0

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

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

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

declare void @stbi_image_free(ptr noundef) local_unnamed_addr #0

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

!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, !7, i64 0}
!6 = !{!"_ZTS10DDS_header", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !8, i64 32, !10, i64 76, !11, i64 108, !7, i64 124}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN10DDS_headerUt_E", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28}
!11 = !{!"_ZTSN10DDS_headerUt0_E", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12}
!12 = !{!6, !7, i64 4}
!13 = !{!6, !7, i64 8}
!14 = !{!6, !7, i64 76}
!15 = !{!6, !7, i64 80}
!16 = !{!6, !7, i64 108}
!17 = !{!6, !7, i64 112}
!18 = !{!19, !7, i64 4}
!19 = !{!"_ZTS7Texture", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !20, i64 20, !7, i64 24, !21, i64 32}
!20 = !{!"bool", !8, i64 0}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !22, i64 0, !24, i64 8, !8, i64 16}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !23, i64 0}
!23 = !{!"any pointer", !8, i64 0}
!24 = !{!"long", !8, i64 0}
!25 = !{!7, !7, i64 0}
!26 = !{!19, !7, i64 16}
!27 = !{!6, !7, i64 84}
!28 = !{!19, !7, i64 0}
!29 = !{!19, !7, i64 8}
!30 = !{!19, !7, i64 12}
!31 = !{!19, !20, i64 20}
!32 = !{i8 0, i8 2}
!33 = !{}
!34 = !{!23, !23, i64 0}


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