; LLVM IR from aap/librw :: src/d3d/xbox.ll (ZN2rw4xbox17readNativeTextureEPNS_6StreamE)

; 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"

%"struct.rw::Error" = type { i32, i32 }
%"struct.rw::Texture" = type { ptr, ptr, %"struct.rw::LLLink", [32 x i8], [32 x i8], i32, i32, %"struct.rw::LLLink" }
%"struct.rw::LLLink" = type { ptr, ptr }
%"struct.rw::xbox::XboxRaster" = type { ptr, ptr, i32, i32, i8, i8, i32 }
%"struct.rw::Raster" = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, i32, i32, i32, ptr, i32, i32 }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZN2rw4xbox18nativeRasterOffsetE = external dso_local global i32, align 4
@.str.18 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__._ZN2rw4xbox17readNativeTextureEPNS_6StreamE = external hidden unnamed_addr constant [47 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

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

declare noundef zeroext i1 @_ZN2rw9findChunkEPNS_6StreamEjPjS2_(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

declare noundef ptr @_ZN2rw9dbgsprintEjz(i32 noundef, ...) #1

declare void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef) #1

declare noundef i32 @_ZN2rw6Stream7readU32Ev(ptr noundef nonnull align 8 dereferenceable(8)) #1

declare noundef i32 @_ZN2rw6Stream7readI32Ev(ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

declare noundef ptr @_ZN2rw6Raster4lockEii(ptr noundef nonnull align 8 dereferenceable(96), i32 noundef, i32 noundef) #1

declare void @_ZN2rw6Raster6unlockEi(ptr noundef nonnull align 8 dereferenceable(96), i32 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN2rw4xbox17readNativeTextureEPNS_6StreamE(ptr noundef %0) #4 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"struct.rw::Error", align 4
  %7 = alloca i32, align 4
  %8 = alloca %"struct.rw::Error", align 4
  %9 = alloca %"struct.rw::Error", align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = call noundef zeroext i1 @_ZN2rw9findChunkEPNS_6StreamEjPjS2_(ptr noundef %25, i32 noundef 1, ptr noundef null, ptr noundef %4)
  br i1 %26, label %38, label %27

27:                                               ; preds = %1
  br label %28

28:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %29 = getelementptr inbounds %"struct.rw::Error", ptr %6, i32 0, i32 0
  store i32 2, ptr %29, align 4, !tbaa !9
  %30 = getelementptr inbounds %"struct.rw::Error", ptr %6, i32 0, i32 1
  store i32 -2147483644, ptr %30, align 4, !tbaa !12
  %31 = load ptr, ptr @stderr, align 8, !tbaa !5
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 878) #5
  %33 = load ptr, ptr @stderr, align 8, !tbaa !5
  %34 = call noundef ptr (i32, ...) @_ZN2rw9dbgsprintEjz(i32 noundef -2147483644, ptr noundef @.str.3)
  %35 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef @.str.2, ptr noundef %34) #5
  call void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %36

36:                                               ; preds = %28
  br label %37

37:                                               ; preds = %36
  store ptr null, ptr %2, align 8
  store i32 1, ptr %7, align 4
  br label %240

38:                                               ; preds = %1
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = call noundef i32 @_ZN2rw6Stream7readU32Ev(ptr noundef nonnull align 8 dereferenceable(8) %39)
  store i32 %40, ptr %5, align 4, !tbaa !13
  %41 = load i32, ptr %5, align 4, !tbaa !13
  %42 = icmp ne i32 %41, 5
  br i1 %42, label %43, label %55

43:                                               ; preds = %38
  br label %44

44:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %45 = getelementptr inbounds %"struct.rw::Error", ptr %8, i32 0, i32 0
  store i32 2, ptr %45, align 4, !tbaa !9
  %46 = getelementptr inbounds %"struct.rw::Error", ptr %8, i32 0, i32 1
  store i32 -2147483642, ptr %46, align 4, !tbaa !12
  %47 = load ptr, ptr @stderr, align 8, !tbaa !5
  %48 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %47, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 883) #5
  %49 = load ptr, ptr @stderr, align 8, !tbaa !5
  %50 = load i32, ptr %5, align 4, !tbaa !13
  %51 = call noundef ptr (i32, ...) @_ZN2rw9dbgsprintEjz(i32 noundef -2147483642, i32 noundef %50)
  %52 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %49, ptr noundef @.str.2, ptr noundef %51) #5
  call void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %53

53:                                               ; preds = %44
  br label %54

54:                                               ; preds = %53
  store ptr null, ptr %2, align 8
  store i32 1, ptr %7, align 4
  br label %240

55:                                               ; preds = %38
  %56 = load i32, ptr %4, align 4, !tbaa !13
  %57 = icmp ult i32 %56, 212993
  br i1 %57, label %58, label %70

58:                                               ; preds = %55
  br label %59

59:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %60 = getelementptr inbounds %"struct.rw::Error", ptr %9, i32 0, i32 0
  store i32 2, ptr %60, align 4, !tbaa !9
  %61 = getelementptr inbounds %"struct.rw::Error", ptr %9, i32 0, i32 1
  store i32 -2147483643, ptr %61, align 4, !tbaa !12
  %62 = load ptr, ptr @stderr, align 8, !tbaa !5
  %63 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %62, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 887) #5
  %64 = load ptr, ptr @stderr, align 8, !tbaa !5
  %65 = load i32, ptr %4, align 4, !tbaa !13
  %66 = call noundef ptr (i32, ...) @_ZN2rw9dbgsprintEjz(i32 noundef -2147483643, i32 noundef %65)
  %67 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef @.str.2, ptr noundef %66) #5
  call void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %68

68:                                               ; preds = %59
  br label %69

69:                                               ; preds = %68
  store ptr null, ptr %2, align 8
  store i32 1, ptr %7, align 4
  br label %240

70:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %71 = call noundef ptr @_ZN2rw7Texture6createEPNS_6RasterE(ptr noundef null)
  store ptr %71, ptr %10, align 8, !tbaa !5
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  %73 = icmp eq ptr %72, null
  br i1 %73, label %74, label %75

74:                                               ; preds = %70
  store ptr null, ptr %2, align 8
  store i32 1, ptr %7, align 4
  br label %239

75:                                               ; preds = %70
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = call noundef i32 @_ZN2rw6Stream7readU32Ev(ptr noundef nonnull align 8 dereferenceable(8) %76)
  %78 = load ptr, ptr %10, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.rw::Texture", ptr %78, i32 0, i32 5
  store i32 %77, ptr %79, align 8, !tbaa !14
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.rw::Texture", ptr %81, i32 0, i32 3
  %83 = getelementptr inbounds [32 x i8], ptr %82, i64 0, i64 0
  %84 = load ptr, ptr %80, align 8, !tbaa !17
  %85 = getelementptr inbounds ptr, ptr %84, i64 4
  %86 = load ptr, ptr %85, align 8
  %87 = call noundef i32 %86(ptr noundef nonnull align 8 dereferenceable(8) %80, ptr noundef %83, i32 noundef 32)
  %88 = load ptr, ptr %3, align 8, !tbaa !5
  %89 = load ptr, ptr %10, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.rw::Texture", ptr %89, i32 0, i32 4
  %91 = getelementptr inbounds [32 x i8], ptr %90, i64 0, i64 0
  %92 = load ptr, ptr %88, align 8, !tbaa !17
  %93 = getelementptr inbounds ptr, ptr %92, i64 4
  %94 = load ptr, ptr %93, align 8
  %95 = call noundef i32 %94(ptr noundef nonnull align 8 dereferenceable(8) %88, ptr noundef %91, i32 noundef 32)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = call noundef i32 @_ZN2rw6Stream7readI32Ev(ptr noundef nonnull align 8 dereferenceable(8) %96)
  store i32 %97, ptr %11, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %98 = load ptr, ptr %3, align 8, !tbaa !5
  %99 = call noundef signext i16 @_ZN2rw6Stream7readI16Ev(ptr noundef nonnull align 8 dereferenceable(8) %98)
  %100 = sext i16 %99 to i32
  store i32 %100, ptr %12, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = call noundef signext i16 @_ZN2rw6Stream7readI16Ev(ptr noundef nonnull align 8 dereferenceable(8) %101)
  %103 = sext i16 %102 to i32
  store i32 %103, ptr %13, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = call noundef zeroext i16 @_ZN2rw6Stream7readU16Ev(ptr noundef nonnull align 8 dereferenceable(8) %104)
  %106 = zext i16 %105 to i32
  store i32 %106, ptr %14, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = call noundef zeroext i16 @_ZN2rw6Stream7readU16Ev(ptr noundef nonnull align 8 dereferenceable(8) %107)
  %109 = zext i16 %108 to i32
  store i32 %109, ptr %15, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = call noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %110)
  %112 = zext i8 %111 to i32
  store i32 %112, ptr %16, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %113 = load ptr, ptr %3, align 8, !tbaa !5
  %114 = call noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %113)
  %115 = zext i8 %114 to i32
  store i32 %115, ptr %17, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %116 = load ptr, ptr %3, align 8, !tbaa !5
  %117 = call noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %116)
  %118 = zext i8 %117 to i32
  store i32 %118, ptr %18, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = call noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %119)
  %121 = zext i8 %120 to i32
  store i32 %121, ptr %19, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = call noundef i32 @_ZN2rw6Stream7readI32Ev(ptr noundef nonnull align 8 dereferenceable(8) %122)
  store i32 %123, ptr %20, align 4, !tbaa !13
  %124 = load i32, ptr %13, align 4, !tbaa !13
  %125 = icmp eq i32 %124, 0
  br i1 %125, label %126, label %127

126:                                              ; preds = %75
  br label %129

127:                                              ; preds = %75
  call void @__assert_fail(ptr noundef @.str.18, ptr noundef @.str.1, i32 noundef 916, ptr noundef @__PRETTY_FUNCTION__._ZN2rw4xbox17readNativeTextureEPNS_6StreamE) #6
  unreachable

128:                                              ; No predecessors!
  br label %129

129:                                              ; preds = %128, %126
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %130 = load i32, ptr %19, align 4, !tbaa !13
  %131 = icmp ne i32 %130, 0
  br i1 %131, label %132, label %181

132:                                              ; preds = %129
  %133 = load i32, ptr %14, align 4, !tbaa !13
  %134 = load i32, ptr %15, align 4, !tbaa !13
  %135 = load i32, ptr %16, align 4, !tbaa !13
  %136 = load i32, ptr %11, align 4, !tbaa !13
  %137 = load i32, ptr %18, align 4, !tbaa !13
  %138 = or i32 %136, %137
  %139 = or i32 %138, 128
  %140 = call noundef ptr @_ZN2rw6Raster6createEiiiii(i32 noundef %133, i32 noundef %134, i32 noundef %135, i32 noundef %139, i32 noundef 5)
  store ptr %140, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %141 = load ptr, ptr %21, align 8, !tbaa !5
  %142 = load i32, ptr @_ZN2rw4xbox18nativeRasterOffsetE, align 4, !tbaa !13
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds i8, ptr %141, i64 %143
  store ptr %144, ptr %22, align 8, !tbaa !5
  %145 = load i32, ptr %19, align 4, !tbaa !13
  %146 = load ptr, ptr %22, align 8, !tbaa !5
  %147 = getelementptr inbounds %"struct.rw::xbox::XboxRaster", ptr %146, i32 0, i32 2
  store i32 %145, ptr %147, align 8, !tbaa !19
  %148 = load i32, ptr %12, align 4, !tbaa !13
  %149 = icmp ne i32 %148, 0
  %150 = load ptr, ptr %22, align 8, !tbaa !5
  %151 = getelementptr inbounds %"struct.rw::xbox::XboxRaster", ptr %150, i32 0, i32 4
  %152 = zext i1 %149 to i8
  store i8 %152, ptr %151, align 8, !tbaa !22
  %153 = load ptr, ptr %21, align 8, !tbaa !5
  %154 = getelementptr inbounds %"struct.rw::Raster", ptr %153, i32 0, i32 5
  %155 = load i32, ptr %154, align 4, !tbaa !23
  %156 = load ptr, ptr %21, align 8, !tbaa !5
  %157 = getelementptr inbounds %"struct.rw::Raster", ptr %156, i32 0, i32 6
  %158 = load i32, ptr %157, align 8, !tbaa !25
  %159 = load ptr, ptr %21, align 8, !tbaa !5
  %160 = getelementptr inbounds %"struct.rw::Raster", ptr %159, i32 0, i32 4
  %161 = load i32, ptr %160, align 8, !tbaa !26
  %162 = and i32 %161, 32768
  %163 = icmp ne i32 %162, 0
  br i1 %163, label %164, label %166

164:                                              ; preds = %132
  %165 = load i32, ptr %17, align 4, !tbaa !13
  br label %167

166:                                              ; preds = %132
  br label %167

167:                                              ; preds = %166, %164
  %168 = phi i32 [ %165, %164 ], [ 1, %166 ]
  %169 = load ptr, ptr %22, align 8, !tbaa !5
  %170 = getelementptr inbounds %"struct.rw::xbox::XboxRaster", ptr %169, i32 0, i32 2
  %171 = load i32, ptr %170, align 8, !tbaa !19
  %172 = call noundef ptr @_ZN2rw4xboxL13createTextureEiiij(i32 noundef %155, i32 noundef %158, i32 noundef %168, i32 noundef %171)
  %173 = load ptr, ptr %22, align 8, !tbaa !5
  %174 = getelementptr inbounds %"struct.rw::xbox::XboxRaster", ptr %173, i32 0, i32 0
  store ptr %172, ptr %174, align 8, !tbaa !27
  %175 = load ptr, ptr %22, align 8, !tbaa !5
  %176 = getelementptr inbounds %"struct.rw::xbox::XboxRaster", ptr %175, i32 0, i32 5
  store i8 1, ptr %176, align 1, !tbaa !28
  %177 = load ptr, ptr %21, align 8, !tbaa !5
  %178 = getelementptr inbounds %"struct.rw::Raster", ptr %177, i32 0, i32 2
  %179 = load i32, ptr %178, align 8, !tbaa !29
  %180 = and i32 %179, -129
  store i32 %180, ptr %178, align 8, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br label %189

181:                                              ; preds = %129
  %182 = load i32, ptr %14, align 4, !tbaa !13
  %183 = load i32, ptr %15, align 4, !tbaa !13
  %184 = load i32, ptr %16, align 4, !tbaa !13
  %185 = load i32, ptr %11, align 4, !tbaa !13
  %186 = load i32, ptr %18, align 4, !tbaa !13
  %187 = or i32 %185, %186
  %188 = call noundef ptr @_ZN2rw6Raster6createEiiiii(i32 noundef %182, i32 noundef %183, i32 noundef %184, i32 noundef %187, i32 noundef 5)
  store ptr %188, ptr %21, align 8, !tbaa !5
  br label %189

189:                                              ; preds = %181, %167
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %190 = load ptr, ptr %21, align 8, !tbaa !5
  %191 = load i32, ptr @_ZN2rw4xbox18nativeRasterOffsetE, align 4, !tbaa !13
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds i8, ptr %190, i64 %192
  store ptr %193, ptr %23, align 8, !tbaa !5
  %194 = load ptr, ptr %21, align 8, !tbaa !5
  %195 = load ptr, ptr %10, align 8, !tbaa !5
  %196 = getelementptr inbounds %"struct.rw::Texture", ptr %195, i32 0, i32 0
  store ptr %194, ptr %196, align 8, !tbaa !30
  %197 = load ptr, ptr %21, align 8, !tbaa !5
  %198 = getelementptr inbounds %"struct.rw::Raster", ptr %197, i32 0, i32 4
  %199 = load i32, ptr %198, align 8, !tbaa !26
  %200 = and i32 %199, 16384
  %201 = icmp ne i32 %200, 0
  br i1 %201, label %202, label %211

202:                                              ; preds = %189
  %203 = load ptr, ptr %3, align 8, !tbaa !5
  %204 = load ptr, ptr %23, align 8, !tbaa !5
  %205 = getelementptr inbounds %"struct.rw::xbox::XboxRaster", ptr %204, i32 0, i32 1
  %206 = load ptr, ptr %205, align 8, !tbaa !31
  %207 = load ptr, ptr %203, align 8, !tbaa !17
  %208 = getelementptr inbounds ptr, ptr %207, i64 4
  %209 = load ptr, ptr %208, align 8
  %210 = call noundef i32 %209(ptr noundef nonnull align 8 dereferenceable(8) %203, ptr noundef %206, i32 noundef 128)
  br label %227

211:                                              ; preds = %189
  %212 = load ptr, ptr %21, align 8, !tbaa !5
  %213 = getelementptr inbounds %"struct.rw::Raster", ptr %212, i32 0, i32 4
  %214 = load i32, ptr %213, align 8, !tbaa !26
  %215 = and i32 %214, 8192
  %216 = icmp ne i32 %215, 0
  br i1 %216, label %217, label %226

217:                                              ; preds = %211
  %218 = load ptr, ptr %3, align 8, !tbaa !5
  %219 = load ptr, ptr %23, align 8, !tbaa !5
  %220 = getelementptr inbounds %"struct.rw::xbox::XboxRaster", ptr %219, i32 0, i32 1
  %221 = load ptr, ptr %220, align 8, !tbaa !31
  %222 = load ptr, ptr %218, align 8, !tbaa !17
  %223 = getelementptr inbounds ptr, ptr %222, i64 4
  %224 = load ptr, ptr %223, align 8
  %225 = call noundef i32 %224(ptr noundef nonnull align 8 dereferenceable(8) %218, ptr noundef %221, i32 noundef 1024)
  br label %226

226:                                              ; preds = %217, %211
  br label %227

227:                                              ; preds = %226, %202
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %228 = load ptr, ptr %21, align 8, !tbaa !5
  %229 = call noundef ptr @_ZN2rw6Raster4lockEii(ptr noundef nonnull align 8 dereferenceable(96) %228, i32 noundef 0, i32 noundef 5)
  store ptr %229, ptr %24, align 8, !tbaa !5
  %230 = load ptr, ptr %3, align 8, !tbaa !5
  %231 = load ptr, ptr %24, align 8, !tbaa !5
  %232 = load i32, ptr %20, align 4, !tbaa !13
  %233 = load ptr, ptr %230, align 8, !tbaa !17
  %234 = getelementptr inbounds ptr, ptr %233, i64 4
  %235 = load ptr, ptr %234, align 8
  %236 = call noundef i32 %235(ptr noundef nonnull align 8 dereferenceable(8) %230, ptr noundef %231, i32 noundef %232)
  %237 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZN2rw6Raster6unlockEi(ptr noundef nonnull align 8 dereferenceable(96) %237, i32 noundef 0)
  %238 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %238, ptr %2, align 8
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %239

239:                                              ; preds = %227, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %240

240:                                              ; preds = %239, %69, %54, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  %241 = load ptr, ptr %2, align 8
  ret ptr %241
}

declare noundef ptr @_ZN2rw7Texture6createEPNS_6RasterE(ptr noundef) #1

declare noundef signext i16 @_ZN2rw6Stream7readI16Ev(ptr noundef nonnull align 8 dereferenceable(8)) #1

declare noundef zeroext i16 @_ZN2rw6Stream7readU16Ev(ptr noundef nonnull align 8 dereferenceable(8)) #1

declare noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8)) #1

declare noundef ptr @_ZN2rw6Raster6createEiiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZN2rw4xboxL13createTextureEiiij(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #3 = { 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 #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { 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, !11, i64 0}
!10 = !{!"_ZTSN2rw5ErrorE", !11, i64 0, !11, i64 4}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 4}
!13 = !{!11, !11, i64 0}
!14 = !{!15, !11, i64 96}
!15 = !{!"_ZTSN2rw7TextureE", !6, i64 0, !6, i64 8, !16, i64 16, !7, i64 32, !7, i64 64, !11, i64 96, !11, i64 100, !16, i64 104}
!16 = !{!"_ZTSN2rw6LLLinkE", !6, i64 0, !6, i64 8}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !8, i64 0}
!19 = !{!20, !11, i64 16}
!20 = !{!"_ZTSN2rw4xbox10XboxRasterE", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !21, i64 24, !21, i64 25, !11, i64 28}
!21 = !{!"bool", !7, i64 0}
!22 = !{!20, !21, i64 24}
!23 = !{!24, !11, i64 20}
!24 = !{!"_ZTSN2rw6RasterE", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !11, i64 64, !11, i64 68, !11, i64 72, !6, i64 80, !11, i64 88, !11, i64 92}
!25 = !{!24, !11, i64 24}
!26 = !{!24, !11, i64 16}
!27 = !{!20, !6, i64 0}
!28 = !{!20, !21, i64 25}
!29 = !{!24, !11, i64 8}
!30 = !{!15, !6, i64 0}
!31 = !{!20, !6, i64 8}


; 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"

%"struct.rw::Error" = type { i32, i32 }

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZN2rw4xbox18nativeRasterOffsetE = external dso_local local_unnamed_addr global i32, align 4
@.str.18 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__._ZN2rw4xbox17readNativeTextureEPNS_6StreamE = external hidden unnamed_addr constant [47 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

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

declare noundef zeroext i1 @_ZN2rw9findChunkEPNS_6StreamEjPjS2_(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

declare noundef ptr @_ZN2rw9dbgsprintEjz(i32 noundef, ...) local_unnamed_addr #1

declare void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef) local_unnamed_addr #1

declare noundef i32 @_ZN2rw6Stream7readU32Ev(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

declare noundef i32 @_ZN2rw6Stream7readI32Ev(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

declare noundef ptr @_ZN2rw6Raster4lockEii(ptr noundef nonnull align 8 dereferenceable(96), i32 noundef, i32 noundef) local_unnamed_addr #1

declare void @_ZN2rw6Raster6unlockEi(ptr noundef nonnull align 8 dereferenceable(96), i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN2rw4xbox17readNativeTextureEPNS_6StreamE(ptr noundef %0) local_unnamed_addr #4 {
  %2 = alloca i32, align 4
  %3 = alloca %"struct.rw::Error", align 4
  %4 = alloca %"struct.rw::Error", align 4
  %5 = alloca %"struct.rw::Error", align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %6 = call noundef zeroext i1 @_ZN2rw9findChunkEPNS_6StreamEjPjS2_(ptr noundef %0, i32 noundef 1, ptr noundef null, ptr noundef nonnull %2)
  br i1 %6, label %14, label %7

7:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  store i32 2, ptr %3, align 4, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %3, i64 4
  store i32 -2147483644, ptr %8, align 4, !tbaa !10
  %9 = load ptr, ptr @stderr, align 8, !tbaa !11
  %10 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 878) #6
  %11 = load ptr, ptr @stderr, align 8, !tbaa !11
  %12 = call noundef ptr (i32, ...) @_ZN2rw9dbgsprintEjz(i32 noundef -2147483644, ptr noundef nonnull @.str.3)
  %13 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef nonnull @.str.2, ptr noundef %12) #6
  call void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef nonnull %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br label %116

14:                                               ; preds = %1
  %15 = call noundef i32 @_ZN2rw6Stream7readU32Ev(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %.not = icmp eq i32 %15, 5
  br i1 %.not, label %23, label %16

16:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  store i32 2, ptr %4, align 4, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %4, i64 4
  store i32 -2147483642, ptr %17, align 4, !tbaa !10
  %18 = load ptr, ptr @stderr, align 8, !tbaa !11
  %19 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 883) #6
  %20 = load ptr, ptr @stderr, align 8, !tbaa !11
  %21 = call noundef ptr (i32, ...) @_ZN2rw9dbgsprintEjz(i32 noundef -2147483642, i32 noundef %15)
  %22 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef nonnull @.str.2, ptr noundef %21) #6
  call void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef nonnull %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %116

23:                                               ; preds = %14
  %24 = load i32, ptr %2, align 4, !tbaa !13
  %25 = icmp ult i32 %24, 212993
  br i1 %25, label %26, label %34

26:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  store i32 2, ptr %5, align 4, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %5, i64 4
  store i32 -2147483643, ptr %27, align 4, !tbaa !10
  %28 = load ptr, ptr @stderr, align 8, !tbaa !11
  %29 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 887) #6
  %30 = load ptr, ptr @stderr, align 8, !tbaa !11
  %31 = load i32, ptr %2, align 4, !tbaa !13
  %32 = call noundef ptr (i32, ...) @_ZN2rw9dbgsprintEjz(i32 noundef -2147483643, i32 noundef %31)
  %33 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef nonnull @.str.2, ptr noundef %32) #6
  call void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef nonnull %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %116

34:                                               ; preds = %23
  %35 = call noundef ptr @_ZN2rw7Texture6createEPNS_6RasterE(ptr noundef null)
  %36 = icmp eq ptr %35, null
  br i1 %36, label %116, label %37

37:                                               ; preds = %34
  %38 = call noundef i32 @_ZN2rw6Stream7readU32Ev(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %39 = getelementptr inbounds i8, ptr %35, i64 96
  store i32 %38, ptr %39, align 8, !tbaa !14
  %40 = getelementptr inbounds i8, ptr %35, i64 32
  %41 = load ptr, ptr %0, align 8, !tbaa !17
  %42 = getelementptr inbounds i8, ptr %41, i64 32
  %43 = load ptr, ptr %42, align 8
  %44 = call noundef i32 %43(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %40, i32 noundef 32)
  %45 = getelementptr inbounds i8, ptr %35, i64 64
  %46 = load ptr, ptr %0, align 8, !tbaa !17
  %47 = getelementptr inbounds i8, ptr %46, i64 32
  %48 = load ptr, ptr %47, align 8
  %49 = call noundef i32 %48(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %45, i32 noundef 32)
  %50 = call noundef i32 @_ZN2rw6Stream7readI32Ev(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %51 = call noundef signext i16 @_ZN2rw6Stream7readI16Ev(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %52 = call noundef signext i16 @_ZN2rw6Stream7readI16Ev(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %53 = call noundef zeroext i16 @_ZN2rw6Stream7readU16Ev(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %54 = zext i16 %53 to i32
  %55 = call noundef zeroext i16 @_ZN2rw6Stream7readU16Ev(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %56 = zext i16 %55 to i32
  %57 = call noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %58 = zext i8 %57 to i32
  %59 = call noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %60 = zext i8 %59 to i32
  %61 = call noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %62 = call noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %63 = zext i8 %62 to i32
  %64 = call noundef i32 @_ZN2rw6Stream7readI32Ev(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %65 = icmp eq i16 %52, 0
  br i1 %65, label %67, label %66

66:                                               ; preds = %37
  call void @__assert_fail(ptr noundef nonnull @.str.18, ptr noundef nonnull @.str.1, i32 noundef 916, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN2rw4xbox17readNativeTextureEPNS_6StreamE) #7
  unreachable

67:                                               ; preds = %37
  %68 = zext i8 %61 to i32
  %.not65 = icmp eq i8 %62, 0
  %69 = or i32 %50, %68
  br i1 %.not65, label %93, label %70

70:                                               ; preds = %67
  %71 = or i32 %69, 128
  %72 = call noundef ptr @_ZN2rw6Raster6createEiiiii(i32 noundef %54, i32 noundef %56, i32 noundef %58, i32 noundef %71, i32 noundef 5)
  %73 = load i32, ptr @_ZN2rw4xbox18nativeRasterOffsetE, align 4, !tbaa !13
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds i8, ptr %72, i64 %74
  %76 = getelementptr inbounds i8, ptr %75, i64 16
  store i32 %63, ptr %76, align 8, !tbaa !19
  %77 = icmp ne i16 %51, 0
  %78 = getelementptr inbounds i8, ptr %75, i64 24
  %79 = zext i1 %77 to i8
  store i8 %79, ptr %78, align 8, !tbaa !22
  %80 = getelementptr inbounds i8, ptr %72, i64 20
  %81 = load i32, ptr %80, align 4, !tbaa !23
  %82 = getelementptr inbounds i8, ptr %72, i64 24
  %83 = load i32, ptr %82, align 8, !tbaa !25
  %84 = getelementptr inbounds i8, ptr %72, i64 16
  %85 = load i32, ptr %84, align 8, !tbaa !26
  %86 = and i32 %85, 32768
  %.not66 = icmp eq i32 %86, 0
  %87 = select i1 %.not66, i32 1, i32 %60
  %88 = call noundef ptr @_ZN2rw4xboxL13createTextureEiiij(i32 noundef %81, i32 noundef %83, i32 noundef %87, i32 noundef %63)
  store ptr %88, ptr %75, align 8, !tbaa !27
  %89 = getelementptr inbounds i8, ptr %75, i64 25
  store i8 1, ptr %89, align 1, !tbaa !28
  %90 = getelementptr inbounds i8, ptr %72, i64 8
  %91 = load i32, ptr %90, align 8, !tbaa !29
  %92 = and i32 %91, -129
  store i32 %92, ptr %90, align 8, !tbaa !29
  br label %95

93:                                               ; preds = %67
  %94 = call noundef ptr @_ZN2rw6Raster6createEiiiii(i32 noundef %54, i32 noundef %56, i32 noundef %58, i32 noundef %69, i32 noundef 5)
  br label %95

95:                                               ; preds = %93, %70
  %.061 = phi ptr [ %72, %70 ], [ %94, %93 ]
  %96 = load i32, ptr @_ZN2rw4xbox18nativeRasterOffsetE, align 4, !tbaa !13
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds i8, ptr %.061, i64 %97
  store ptr %.061, ptr %35, align 8, !tbaa !30
  %99 = getelementptr inbounds i8, ptr %.061, i64 16
  %100 = load i32, ptr %99, align 8, !tbaa !26
  %101 = and i32 %100, 16384
  %.not67 = icmp eq i32 %101, 0
  br i1 %.not67, label %102, label %.sink.split

102:                                              ; preds = %95
  %103 = and i32 %100, 8192
  %.not68 = icmp eq i32 %103, 0
  br i1 %.not68, label %110, label %.sink.split

.sink.split:                                      ; preds = %102, %95
  %.sink69 = phi i32 [ 128, %95 ], [ 1024, %102 ]
  %104 = getelementptr inbounds i8, ptr %98, i64 8
  %105 = load ptr, ptr %104, align 8, !tbaa !31
  %106 = load ptr, ptr %0, align 8, !tbaa !17
  %107 = getelementptr inbounds i8, ptr %106, i64 32
  %108 = load ptr, ptr %107, align 8
  %109 = call noundef i32 %108(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %105, i32 noundef %.sink69)
  br label %110

110:                                              ; preds = %.sink.split, %102
  %111 = call noundef ptr @_ZN2rw6Raster4lockEii(ptr noundef nonnull align 8 dereferenceable(96) %.061, i32 noundef 0, i32 noundef 5)
  %112 = load ptr, ptr %0, align 8, !tbaa !17
  %113 = getelementptr inbounds i8, ptr %112, i64 32
  %114 = load ptr, ptr %113, align 8
  %115 = call noundef i32 %114(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %111, i32 noundef %64)
  call void @_ZN2rw6Raster6unlockEi(ptr noundef nonnull align 8 dereferenceable(96) %.061, i32 noundef 0)
  br label %116

116:                                              ; preds = %110, %34, %26, %16, %7
  %.1 = phi ptr [ null, %16 ], [ null, %26 ], [ null, %7 ], [ %35, %110 ], [ null, %34 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  ret ptr %.1
}

declare noundef ptr @_ZN2rw7Texture6createEPNS_6RasterE(ptr noundef) local_unnamed_addr #1

declare noundef signext i16 @_ZN2rw6Stream7readI16Ev(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

declare noundef zeroext i16 @_ZN2rw6Stream7readU16Ev(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

declare noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

declare noundef ptr @_ZN2rw6Raster6createEiiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZN2rw4xboxL13createTextureEiiij(i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #3 = { 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 #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { cold nounwind }
attributes #7 = { 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, !7, i64 0}
!6 = !{!"_ZTSN2rw5ErrorE", !7, i64 0, !7, i64 4}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 4}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !7, i64 96}
!15 = !{!"_ZTSN2rw7TextureE", !12, i64 0, !12, i64 8, !16, i64 16, !8, i64 32, !8, i64 64, !7, i64 96, !7, i64 100, !16, i64 104}
!16 = !{!"_ZTSN2rw6LLLinkE", !12, i64 0, !12, i64 8}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !9, i64 0}
!19 = !{!20, !7, i64 16}
!20 = !{!"_ZTSN2rw4xbox10XboxRasterE", !12, i64 0, !12, i64 8, !7, i64 16, !7, i64 20, !21, i64 24, !21, i64 25, !7, i64 28}
!21 = !{!"bool", !8, i64 0}
!22 = !{!20, !21, i64 24}
!23 = !{!24, !7, i64 20}
!24 = !{!"_ZTSN2rw6RasterE", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !7, i64 64, !7, i64 68, !7, i64 72, !12, i64 80, !7, i64 88, !7, i64 92}
!25 = !{!24, !7, i64 24}
!26 = !{!24, !7, i64 16}
!27 = !{!20, !12, i64 0}
!28 = !{!20, !21, i64 25}
!29 = !{!24, !7, i64 8}
!30 = !{!15, !12, i64 0}
!31 = !{!20, !12, i64 8}


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