; LLVM IR from aap/librw :: src/tga.ll (ZN2rw7readTGAEPKc)

; 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::MemoryFunctions" = type { ptr, ptr, ptr, ptr, ptr }
%"struct.rw::TGAHeader" = type { i8, i8, i8, i16, i16, i8, i16, i16, i16, i16, i8, i8 }
%"class.rw::StreamMemory" = type <{ %"class.rw::Stream", ptr, i32, i32, i32, [4 x i8] }>
%"class.rw::Stream" = type { ptr }
%"struct.rw::Image" = type { i32, i32, i32, i32, i32, i32, ptr, ptr }

@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [55 x i8], align 1
@__PRETTY_FUNCTION__._ZN2rw7readTGAEPKc = external hidden unnamed_addr constant [33 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [42 x i8], align 1
@_ZN2rw6Engine8memfuncsE = external global %"struct.rw::MemoryFunctions", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2rw9TGAHeader4readEPNS_6StreamE(ptr noundef nonnull align 2 dereferenceable(20), ptr noundef) #0 align 2

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

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

25:                                               ; preds = %1
  br label %28

26:                                               ; preds = %1
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 78, ptr noundef @__PRETTY_FUNCTION__._ZN2rw7readTGAEPKc) #7
  unreachable

27:                                               ; No predecessors!
  br label %28

28:                                               ; preds = %27, %25
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #6
  call void @_ZN2rw12StreamMemoryC2Ev(ptr noundef nonnull align 8 dereferenceable(28) %9) #6
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = load i32, ptr %7, align 4, !tbaa !9
  %31 = invoke noundef ptr @_ZN2rw12StreamMemory4openEPhjj(ptr noundef nonnull align 8 dereferenceable(28) %9, ptr noundef %29, i32 noundef %30, i32 noundef 0)
          to label %32 unwind label %47

32:                                               ; preds = %28
  invoke void @_ZN2rw9TGAHeader4readEPNS_6StreamE(ptr noundef nonnull align 2 dereferenceable(20) %3, ptr noundef %9)
          to label %33 unwind label %47

33:                                               ; preds = %32
  %34 = getelementptr inbounds %"struct.rw::TGAHeader", ptr %3, i32 0, i32 2
  %35 = load i8, ptr %34, align 2, !tbaa !11
  %36 = sext i8 %35 to i32
  %37 = icmp eq i32 %36, 1
  br i1 %37, label %43, label %38

38:                                               ; preds = %33
  %39 = getelementptr inbounds %"struct.rw::TGAHeader", ptr %3, i32 0, i32 2
  %40 = load i8, ptr %39, align 2, !tbaa !11
  %41 = sext i8 %40 to i32
  %42 = icmp eq i32 %41, 2
  br label %43

43:                                               ; preds = %38, %33
  %44 = phi i1 [ true, %33 ], [ %42, %38 ]
  br i1 %44, label %45, label %46

45:                                               ; preds = %43
  br label %52

46:                                               ; preds = %43
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 83, ptr noundef @__PRETTY_FUNCTION__._ZN2rw7readTGAEPKc) #7
  unreachable

47:                                               ; preds = %116, %107, %52, %32, %28
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %10, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %11, align 4
  br label %353

51:                                               ; No predecessors!
  br label %52

52:                                               ; preds = %51, %45
  %53 = getelementptr inbounds %"struct.rw::TGAHeader", ptr %3, i32 0, i32 0
  %54 = load i8, ptr %53, align 2, !tbaa !14
  %55 = sext i8 %54 to i32
  invoke void @_ZN2rw12StreamMemory4seekEii(ptr noundef nonnull align 8 dereferenceable(28) %9, i32 noundef %55, i32 noundef 1)
          to label %56 unwind label %47

56:                                               ; preds = %52
  %57 = getelementptr inbounds %"struct.rw::TGAHeader", ptr %3, i32 0, i32 1
  %58 = load i8, ptr %57, align 1, !tbaa !15
  %59 = icmp ne i8 %58, 0
  br i1 %59, label %60, label %89

60:                                               ; preds = %56
  %61 = getelementptr inbounds %"struct.rw::TGAHeader", ptr %3, i32 0, i32 3
  %62 = load i16, ptr %61, align 2, !tbaa !16
  %63 = sext i16 %62 to i32
  %64 = icmp eq i32 %63, 0
  br i1 %64, label %65, label %66

65:                                               ; preds = %60
  br label %68

66:                                               ; preds = %60
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 86, ptr noundef @__PRETTY_FUNCTION__._ZN2rw7readTGAEPKc) #7
  unreachable

67:                                               ; No predecessors!
  br label %68

68:                                               ; preds = %67, %65
  %69 = getelementptr inbounds %"struct.rw::TGAHeader", ptr %3, i32 0, i32 4
  %70 = load i16, ptr %69, align 2, !tbaa !17
  %71 = sext i16 %70 to i32
  %72 = icmp sle i32 %71, 16
  %73 = zext i1 %72 to i64
  %74 = select i1 %72, i32 4, i32 8
  store i32 %74, ptr %5, align 4, !tbaa !9
  %75 = getelementptr inbounds %"struct.rw::TGAHeader", ptr %3, i32 0, i32 5
  %76 = load i8, ptr %75, align 2, !tbaa !18
  %77 = sext i8 %76 to i32
  store i32 %77, ptr %6, align 4, !tbaa !9
  %78 = load i32, ptr %6, align 4, !tbaa !9
  %79 = icmp eq i32 %78, 24
  br i1 %79, label %83, label %80

80:                                               ; preds = %68
  %81 = load i32, ptr %6, align 4, !tbaa !9
  %82 = icmp eq i32 %81, 32
  br label %83

83:                                               ; preds = %80, %68
  %84 = phi i1 [ true, %68 ], [ %82, %80 ]
  br i1 %84, label %85, label %86

85:                                               ; preds = %83
  br label %88

86:                                               ; preds = %83
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 89, ptr noundef @__PRETTY_FUNCTION__._ZN2rw7readTGAEPKc) #7
  unreachable

87:                                               ; No predecessors!
  br label %88

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

89:                                               ; preds = %56
  %90 = getelementptr inbounds %"struct.rw::TGAHeader", ptr %3, i32 0, i32 10
  %91 = load i8, ptr %90, align 2, !tbaa !19
  %92 = zext i8 %91 to i32
  store i32 %92, ptr %5, align 4, !tbaa !9
  %93 = load i32, ptr %5, align 4, !tbaa !9
  %94 = icmp eq i32 %93, 16
  br i1 %94, label %101, label %95

95:                                               ; preds = %89
  %96 = load i32, ptr %5, align 4, !tbaa !9
  %97 = icmp eq i32 %96, 24
  br i1 %97, label %101, label %98

98:                                               ; preds = %95
  %99 = load i32, ptr %5, align 4, !tbaa !9
  %100 = icmp eq i32 %99, 32
  br label %101

101:                                              ; preds = %98, %95, %89
  %102 = phi i1 [ true, %95 ], [ true, %89 ], [ %100, %98 ]
  br i1 %102, label %103, label %104

103:                                              ; preds = %101
  br label %106

104:                                              ; preds = %101
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 92, ptr noundef @__PRETTY_FUNCTION__._ZN2rw7readTGAEPKc) #7
  unreachable

105:                                              ; No predecessors!
  br label %106

106:                                              ; preds = %105, %103
  br label %107

107:                                              ; preds = %106, %88
  %108 = getelementptr inbounds %"struct.rw::TGAHeader", ptr %3, i32 0, i32 8
  %109 = load i16, ptr %108, align 2, !tbaa !20
  %110 = sext i16 %109 to i32
  %111 = getelementptr inbounds %"struct.rw::TGAHeader", ptr %3, i32 0, i32 9
  %112 = load i16, ptr %111, align 2, !tbaa !21
  %113 = sext i16 %112 to i32
  %114 = load i32, ptr %5, align 4, !tbaa !9
  %115 = invoke noundef ptr @_ZN2rw5Image6createEiii(i32 noundef %110, i32 noundef %113, i32 noundef %114)
          to label %116 unwind label %47

116:                                              ; preds = %107
  store ptr %115, ptr %4, align 8, !tbaa !5
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN2rw5Image8allocateEv(ptr noundef nonnull align 8 dereferenceable(40) %117)
          to label %118 unwind label %47

118:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %119 = getelementptr inbounds %"struct.rw::TGAHeader", ptr %3, i32 0, i32 1
  %120 = load i8, ptr %119, align 1, !tbaa !15
  %121 = icmp ne i8 %120, 0
  br i1 %121, label %122, label %126

122:                                              ; preds = %118
  %123 = load ptr, ptr %4, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.rw::Image", ptr %123, i32 0, i32 7
  %125 = load ptr, ptr %124, align 8, !tbaa !22
  br label %127

126:                                              ; preds = %118
  br label %127

127:                                              ; preds = %126, %122
  %128 = phi ptr [ %125, %122 ], [ null, %126 ]
  store ptr %128, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store ptr null, ptr %13, align 8, !tbaa !5
  %129 = load ptr, ptr %12, align 8, !tbaa !5
  %130 = icmp ne ptr %129, null
  br i1 %130, label %131, label %218

131:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %132 = load i32, ptr %5, align 4, !tbaa !9
  %133 = icmp eq i32 %132, 4
  %134 = zext i1 %133 to i64
  %135 = select i1 %133, i32 16, i32 256
  store i32 %135, ptr %14, align 4, !tbaa !9
  %136 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %136, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %137

137:                                              ; preds = %185, %131
  %138 = load i32, ptr %15, align 4, !tbaa !9
  %139 = getelementptr inbounds %"struct.rw::TGAHeader", ptr %3, i32 0, i32 4
  %140 = load i16, ptr %139, align 2, !tbaa !17
  %141 = sext i16 %140 to i32
  %142 = icmp slt i32 %138, %141
  br i1 %142, label %143, label %188

143:                                              ; preds = %137
  %144 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %145 unwind label %180

145:                                              ; preds = %143
  %146 = load ptr, ptr %13, align 8, !tbaa !5
  %147 = load i32, ptr %15, align 4, !tbaa !9
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [4 x i8], ptr %146, i64 %148
  %150 = getelementptr inbounds [4 x i8], ptr %149, i64 0, i64 2
  store i8 %144, ptr %150, align 1, !tbaa !24
  %151 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %152 unwind label %180

152:                                              ; preds = %145
  %153 = load ptr, ptr %13, align 8, !tbaa !5
  %154 = load i32, ptr %15, align 4, !tbaa !9
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [4 x i8], ptr %153, i64 %155
  %157 = getelementptr inbounds [4 x i8], ptr %156, i64 0, i64 1
  store i8 %151, ptr %157, align 1, !tbaa !24
  %158 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %159 unwind label %180

159:                                              ; preds = %152
  %160 = load ptr, ptr %13, align 8, !tbaa !5
  %161 = load i32, ptr %15, align 4, !tbaa !9
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [4 x i8], ptr %160, i64 %162
  %164 = getelementptr inbounds [4 x i8], ptr %163, i64 0, i64 0
  store i8 %158, ptr %164, align 1, !tbaa !24
  %165 = load ptr, ptr %13, align 8, !tbaa !5
  %166 = load i32, ptr %15, align 4, !tbaa !9
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [4 x i8], ptr %165, i64 %167
  %169 = getelementptr inbounds [4 x i8], ptr %168, i64 0, i64 3
  store i8 -1, ptr %169, align 1, !tbaa !24
  %170 = load i32, ptr %6, align 4, !tbaa !9
  %171 = icmp eq i32 %170, 32
  br i1 %171, label %172, label %184

172:                                              ; preds = %159
  %173 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %174 unwind label %180

174:                                              ; preds = %172
  %175 = load ptr, ptr %13, align 8, !tbaa !5
  %176 = load i32, ptr %15, align 4, !tbaa !9
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [4 x i8], ptr %175, i64 %177
  %179 = getelementptr inbounds [4 x i8], ptr %178, i64 0, i64 3
  store i8 %173, ptr %179, align 1, !tbaa !24
  br label %184

180:                                              ; preds = %172, %152, %145, %143
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %10, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %352

184:                                              ; preds = %174, %159
  br label %185

185:                                              ; preds = %184
  %186 = load i32, ptr %15, align 4, !tbaa !9
  %187 = add nsw i32 %186, 1
  store i32 %187, ptr %15, align 4, !tbaa !9
  br label %137, !llvm.loop !25

188:                                              ; preds = %137
  br label %189

189:                                              ; preds = %214, %188
  %190 = load i32, ptr %15, align 4, !tbaa !9
  %191 = load i32, ptr %14, align 4, !tbaa !9
  %192 = icmp slt i32 %190, %191
  br i1 %192, label %193, label %217

193:                                              ; preds = %189
  %194 = load ptr, ptr %13, align 8, !tbaa !5
  %195 = load i32, ptr %15, align 4, !tbaa !9
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [4 x i8], ptr %194, i64 %196
  %198 = getelementptr inbounds [4 x i8], ptr %197, i64 0, i64 2
  store i8 0, ptr %198, align 1, !tbaa !24
  %199 = load ptr, ptr %13, align 8, !tbaa !5
  %200 = load i32, ptr %15, align 4, !tbaa !9
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [4 x i8], ptr %199, i64 %201
  %203 = getelementptr inbounds [4 x i8], ptr %202, i64 0, i64 1
  store i8 0, ptr %203, align 1, !tbaa !24
  %204 = load ptr, ptr %13, align 8, !tbaa !5
  %205 = load i32, ptr %15, align 4, !tbaa !9
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [4 x i8], ptr %204, i64 %206
  %208 = getelementptr inbounds [4 x i8], ptr %207, i64 0, i64 0
  store i8 0, ptr %208, align 1, !tbaa !24
  %209 = load ptr, ptr %13, align 8, !tbaa !5
  %210 = load i32, ptr %15, align 4, !tbaa !9
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [4 x i8], ptr %209, i64 %211
  %213 = getelementptr inbounds [4 x i8], ptr %212, i64 0, i64 3
  store i8 -1, ptr %213, align 1, !tbaa !24
  br label %214

214:                                              ; preds = %193
  %215 = load i32, ptr %15, align 4, !tbaa !9
  %216 = add nsw i32 %215, 1
  store i32 %216, ptr %15, align 4, !tbaa !9
  br label %189, !llvm.loop !27

217:                                              ; preds = %189
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %218

218:                                              ; preds = %217, %127
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %219 = load ptr, ptr %4, align 8, !tbaa !5
  %220 = getelementptr inbounds %"struct.rw::Image", ptr %219, i32 0, i32 6
  %221 = load ptr, ptr %220, align 8, !tbaa !28
  store ptr %221, ptr %16, align 8, !tbaa !5
  %222 = getelementptr inbounds %"struct.rw::TGAHeader", ptr %3, i32 0, i32 11
  %223 = load i8, ptr %222, align 1, !tbaa !29
  %224 = zext i8 %223 to i32
  %225 = and i32 %224, 32
  %226 = icmp ne i32 %225, 0
  br i1 %226, label %239, label %227

227:                                              ; preds = %218
  %228 = load ptr, ptr %4, align 8, !tbaa !5
  %229 = getelementptr inbounds %"struct.rw::Image", ptr %228, i32 0, i32 2
  %230 = load i32, ptr %229, align 8, !tbaa !30
  %231 = sub nsw i32 %230, 1
  %232 = load ptr, ptr %4, align 8, !tbaa !5
  %233 = getelementptr inbounds %"struct.rw::Image", ptr %232, i32 0, i32 5
  %234 = load i32, ptr %233, align 4, !tbaa !31
  %235 = mul nsw i32 %231, %234
  %236 = load ptr, ptr %16, align 8, !tbaa !5
  %237 = sext i32 %235 to i64
  %238 = getelementptr inbounds i8, ptr %236, i64 %237
  store ptr %238, ptr %16, align 8, !tbaa !5
  br label %239

239:                                              ; preds = %227, %218
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %240

240:                                              ; preds = %338, %239
  %241 = load i32, ptr %17, align 4, !tbaa !9
  %242 = load ptr, ptr %4, align 8, !tbaa !5
  %243 = getelementptr inbounds %"struct.rw::Image", ptr %242, i32 0, i32 2
  %244 = load i32, ptr %243, align 8, !tbaa !30
  %245 = icmp slt i32 %241, %244
  br i1 %245, label %247, label %246

246:                                              ; preds = %240
  store i32 8, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %341

247:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %248 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %248, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %249

249:                                              ; preds = %315, %247
  %250 = load i32, ptr %20, align 4, !tbaa !9
  %251 = load ptr, ptr %4, align 8, !tbaa !5
  %252 = getelementptr inbounds %"struct.rw::Image", ptr %251, i32 0, i32 1
  %253 = load i32, ptr %252, align 4, !tbaa !32
  %254 = icmp slt i32 %250, %253
  br i1 %254, label %256, label %255

255:                                              ; preds = %249
  store i32 11, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %318

256:                                              ; preds = %249
  %257 = load ptr, ptr %4, align 8, !tbaa !5
  %258 = getelementptr inbounds %"struct.rw::Image", ptr %257, i32 0, i32 3
  %259 = load i32, ptr %258, align 4, !tbaa !33
  switch i32 %259, label %308 [
    i32 4, label %260
    i32 8, label %260
    i32 16, label %269
    i32 24, label %278
    i32 32, label %291
  ]

260:                                              ; preds = %256, %256
  %261 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %262 unwind label %265

262:                                              ; preds = %260
  %263 = load ptr, ptr %19, align 8, !tbaa !5
  %264 = getelementptr inbounds i8, ptr %263, i64 0
  store i8 %261, ptr %264, align 1, !tbaa !24
  br label %308

265:                                              ; preds = %301, %297, %293, %291, %284, %280, %278, %271, %269, %260
  %266 = landingpad { ptr, i32 }
          cleanup
  %267 = extractvalue { ptr, i32 } %266, 0
  store ptr %267, ptr %10, align 8
  %268 = extractvalue { ptr, i32 } %266, 1
  store i32 %268, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %351

269:                                              ; preds = %256
  %270 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %271 unwind label %265

271:                                              ; preds = %269
  %272 = load ptr, ptr %19, align 8, !tbaa !5
  %273 = getelementptr inbounds i8, ptr %272, i64 0
  store i8 %270, ptr %273, align 1, !tbaa !24
  %274 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %275 unwind label %265

275:                                              ; preds = %271
  %276 = load ptr, ptr %19, align 8, !tbaa !5
  %277 = getelementptr inbounds i8, ptr %276, i64 1
  store i8 %274, ptr %277, align 1, !tbaa !24
  br label %308

278:                                              ; preds = %256
  %279 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %280 unwind label %265

280:                                              ; preds = %278
  %281 = load ptr, ptr %19, align 8, !tbaa !5
  %282 = getelementptr inbounds i8, ptr %281, i64 2
  store i8 %279, ptr %282, align 1, !tbaa !24
  %283 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %284 unwind label %265

284:                                              ; preds = %280
  %285 = load ptr, ptr %19, align 8, !tbaa !5
  %286 = getelementptr inbounds i8, ptr %285, i64 1
  store i8 %283, ptr %286, align 1, !tbaa !24
  %287 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %288 unwind label %265

288:                                              ; preds = %284
  %289 = load ptr, ptr %19, align 8, !tbaa !5
  %290 = getelementptr inbounds i8, ptr %289, i64 0
  store i8 %287, ptr %290, align 1, !tbaa !24
  br label %308

291:                                              ; preds = %256
  %292 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %293 unwind label %265

293:                                              ; preds = %291
  %294 = load ptr, ptr %19, align 8, !tbaa !5
  %295 = getelementptr inbounds i8, ptr %294, i64 2
  store i8 %292, ptr %295, align 1, !tbaa !24
  %296 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %297 unwind label %265

297:                                              ; preds = %293
  %298 = load ptr, ptr %19, align 8, !tbaa !5
  %299 = getelementptr inbounds i8, ptr %298, i64 1
  store i8 %296, ptr %299, align 1, !tbaa !24
  %300 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %301 unwind label %265

301:                                              ; preds = %297
  %302 = load ptr, ptr %19, align 8, !tbaa !5
  %303 = getelementptr inbounds i8, ptr %302, i64 0
  store i8 %300, ptr %303, align 1, !tbaa !24
  %304 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %305 unwind label %265

305:                                              ; preds = %301
  %306 = load ptr, ptr %19, align 8, !tbaa !5
  %307 = getelementptr inbounds i8, ptr %306, i64 3
  store i8 %304, ptr %307, align 1, !tbaa !24
  br label %308

308:                                              ; preds = %305, %288, %275, %262, %256
  %309 = load ptr, ptr %4, align 8, !tbaa !5
  %310 = getelementptr inbounds %"struct.rw::Image", ptr %309, i32 0, i32 4
  %311 = load i32, ptr %310, align 8, !tbaa !34
  %312 = load ptr, ptr %19, align 8, !tbaa !5
  %313 = sext i32 %311 to i64
  %314 = getelementptr inbounds i8, ptr %312, i64 %313
  store ptr %314, ptr %19, align 8, !tbaa !5
  br label %315

315:                                              ; preds = %308
  %316 = load i32, ptr %20, align 4, !tbaa !9
  %317 = add nsw i32 %316, 1
  store i32 %317, ptr %20, align 4, !tbaa !9
  br label %249, !llvm.loop !35

318:                                              ; preds = %255
  %319 = getelementptr inbounds %"struct.rw::TGAHeader", ptr %3, i32 0, i32 11
  %320 = load i8, ptr %319, align 1, !tbaa !29
  %321 = zext i8 %320 to i32
  %322 = and i32 %321, 32
  %323 = icmp ne i32 %322, 0
  br i1 %323, label %324, label %328

324:                                              ; preds = %318
  %325 = load ptr, ptr %4, align 8, !tbaa !5
  %326 = getelementptr inbounds %"struct.rw::Image", ptr %325, i32 0, i32 5
  %327 = load i32, ptr %326, align 4, !tbaa !31
  br label %333

328:                                              ; preds = %318
  %329 = load ptr, ptr %4, align 8, !tbaa !5
  %330 = getelementptr inbounds %"struct.rw::Image", ptr %329, i32 0, i32 5
  %331 = load i32, ptr %330, align 4, !tbaa !31
  %332 = sub nsw i32 0, %331
  br label %333

333:                                              ; preds = %328, %324
  %334 = phi i32 [ %327, %324 ], [ %332, %328 ]
  %335 = load ptr, ptr %16, align 8, !tbaa !5
  %336 = sext i32 %334 to i64
  %337 = getelementptr inbounds i8, ptr %335, i64 %336
  store ptr %337, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %338

338:                                              ; preds = %333
  %339 = load i32, ptr %17, align 4, !tbaa !9
  %340 = add nsw i32 %339, 1
  store i32 %340, ptr %17, align 4, !tbaa !9
  br label %240, !llvm.loop !36

341:                                              ; preds = %246
  invoke void @_ZN2rw12StreamMemory5closeEv(ptr noundef nonnull align 8 dereferenceable(28) %9)
          to label %342 unwind label %347

342:                                              ; preds = %341
  %343 = load ptr, ptr getelementptr inbounds (%"struct.rw::MemoryFunctions", ptr @_ZN2rw6Engine8memfuncsE, i32 0, i32 2), align 8, !tbaa !37
  %344 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void %343(ptr noundef %344)
          to label %345 unwind label %347

345:                                              ; preds = %342
  %346 = load ptr, ptr %4, align 8, !tbaa !5
  store i32 1, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @_ZN2rw6StreamD2Ev(ptr noundef nonnull align 8 dereferenceable(28) %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 20, ptr %3) #6
  ret ptr %346

347:                                              ; preds = %342, %341
  %348 = landingpad { ptr, i32 }
          cleanup
  %349 = extractvalue { ptr, i32 } %348, 0
  store ptr %349, ptr %10, align 8
  %350 = extractvalue { ptr, i32 } %348, 1
  store i32 %350, ptr %11, align 4
  br label %351

351:                                              ; preds = %347, %265
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %352

352:                                              ; preds = %351, %180
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %353

353:                                              ; preds = %352, %47
  call void @_ZN2rw6StreamD2Ev(ptr noundef nonnull align 8 dereferenceable(28) %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 20, ptr %3) #6
  br label %354

354:                                              ; preds = %353
  %355 = load ptr, ptr %10, align 8
  %356 = load i32, ptr %11, align 4
  %357 = insertvalue { ptr, i32 } poison, ptr %355, 0
  %358 = insertvalue { ptr, i32 } %357, i32 %356, 1
  resume { ptr, i32 } %358
}

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

declare noundef ptr @_ZN2rw15getFileContentsEPKcPj(ptr noundef, ptr noundef) #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN2rw12StreamMemoryC2Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #4 align 2

declare noundef ptr @_ZN2rw12StreamMemory4openEPhjj(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef, i32 noundef, i32 noundef) #1

declare i32 @__gxx_personality_v0(...)

declare void @_ZN2rw12StreamMemory4seekEii(ptr noundef nonnull align 8 dereferenceable(28), i32 noundef, i32 noundef) unnamed_addr #1

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

declare void @_ZN2rw5Image8allocateEv(ptr noundef nonnull align 8 dereferenceable(40)) #1

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

declare void @_ZN2rw12StreamMemory5closeEv(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #1

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

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !7, i64 2}
!12 = !{!"_ZTSN2rw9TGAHeaderE", !7, i64 0, !7, i64 1, !7, i64 2, !13, i64 4, !13, i64 6, !7, i64 8, !13, i64 10, !13, i64 12, !13, i64 14, !13, i64 16, !7, i64 18, !7, i64 19}
!13 = !{!"short", !7, i64 0}
!14 = !{!12, !7, i64 0}
!15 = !{!12, !7, i64 1}
!16 = !{!12, !13, i64 4}
!17 = !{!12, !13, i64 6}
!18 = !{!12, !7, i64 8}
!19 = !{!12, !7, i64 18}
!20 = !{!12, !13, i64 14}
!21 = !{!12, !13, i64 16}
!22 = !{!23, !6, i64 32}
!23 = !{!"_ZTSN2rw5ImageE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !6, i64 24, !6, i64 32}
!24 = !{!7, !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}
!28 = !{!23, !6, i64 24}
!29 = !{!12, !7, i64 19}
!30 = !{!23, !10, i64 8}
!31 = !{!23, !10, i64 20}
!32 = !{!23, !10, i64 4}
!33 = !{!23, !10, i64 12}
!34 = !{!23, !10, i64 16}
!35 = distinct !{!35, !26}
!36 = distinct !{!36, !26}
!37 = !{!38, !6, i64 16}
!38 = !{!"_ZTSN2rw15MemoryFunctionsE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}


; 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::MemoryFunctions" = type { ptr, ptr, ptr, ptr, ptr }
%"struct.rw::TGAHeader" = type { i8, i8, i8, i16, i16, i8, i16, i16, i16, i16, i8, i8 }
%"class.rw::StreamMemory" = type <{ %"class.rw::Stream", ptr, i32, i32, i32, [4 x i8] }>
%"class.rw::Stream" = type { ptr }

@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [55 x i8], align 1
@__PRETTY_FUNCTION__._ZN2rw7readTGAEPKc = external hidden unnamed_addr constant [33 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [42 x i8], align 1
@_ZN2rw6Engine8memfuncsE = external local_unnamed_addr global %"struct.rw::MemoryFunctions", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2rw9TGAHeader4readEPNS_6StreamE(ptr noundef nonnull align 2 dereferenceable(20), ptr noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN2rw7readTGAEPKc(ptr noundef %0) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"struct.rw::TGAHeader", align 2
  %3 = alloca i32, align 4
  %4 = alloca %"class.rw::StreamMemory", align 8
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %5 = call noundef ptr @_ZN2rw15getFileContentsEPKcPj(ptr noundef %0, ptr noundef nonnull %3)
  %.not = icmp eq ptr %5, null
  br i1 %.not, label %6, label %7

6:                                                ; preds = %1
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 78, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN2rw7readTGAEPKc) #8
  unreachable

7:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  call void @_ZN2rw12StreamMemoryC2Ev(ptr noundef nonnull align 8 dereferenceable(28) %4) #7
  %8 = load i32, ptr %3, align 4, !tbaa !5
  %9 = invoke noundef ptr @_ZN2rw12StreamMemory4openEPhjj(ptr noundef nonnull align 8 dereferenceable(28) %4, ptr noundef nonnull %5, i32 noundef %8, i32 noundef 0)
          to label %10 unwind label %17

10:                                               ; preds = %7
  invoke void @_ZN2rw9TGAHeader4readEPNS_6StreamE(ptr noundef nonnull align 2 dereferenceable(20) %2, ptr noundef nonnull %4)
          to label %11 unwind label %17

11:                                               ; preds = %10
  %12 = getelementptr inbounds i8, ptr %2, i64 2
  %13 = load i8, ptr %12, align 2
  %14 = add i8 %13, -1
  %15 = icmp ult i8 %14, 2
  br i1 %15, label %19, label %16

16:                                               ; preds = %11
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 83, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN2rw7readTGAEPKc) #8
  unreachable

17:                                               ; preds = %51, %.critedge, %19, %10, %7
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %185

19:                                               ; preds = %11
  %20 = load i8, ptr %2, align 2, !tbaa !9
  %21 = sext i8 %20 to i32
  invoke void @_ZN2rw12StreamMemory4seekEii(ptr noundef nonnull align 8 dereferenceable(28) %4, i32 noundef %21, i32 noundef 1)
          to label %22 unwind label %17

22:                                               ; preds = %19
  %23 = getelementptr inbounds i8, ptr %2, i64 1
  %24 = load i8, ptr %23, align 1, !tbaa !12
  %.not85 = icmp eq i8 %24, 0
  br i1 %.not85, label %39, label %25

25:                                               ; preds = %22
  %26 = getelementptr inbounds i8, ptr %2, i64 4
  %27 = load i16, ptr %26, align 2, !tbaa !13
  %28 = icmp eq i16 %27, 0
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 86, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN2rw7readTGAEPKc) #8
  unreachable

30:                                               ; preds = %25
  %31 = getelementptr inbounds i8, ptr %2, i64 6
  %32 = load i16, ptr %31, align 2, !tbaa !14
  %33 = icmp slt i16 %32, 17
  %34 = select i1 %33, i32 4, i32 8
  %35 = getelementptr inbounds i8, ptr %2, i64 8
  %36 = load i8, ptr %35, align 2, !tbaa !15
  %37 = sext i8 %36 to i32
  switch i8 %36, label %38 [
    i8 32, label %.critedge
    i8 24, label %.critedge
  ]

38:                                               ; preds = %30
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 89, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN2rw7readTGAEPKc) #8
  unreachable

39:                                               ; preds = %22
  %40 = getelementptr inbounds i8, ptr %2, i64 18
  %41 = load i8, ptr %40, align 2, !tbaa !16
  %42 = zext i8 %41 to i32
  switch i8 %41, label %43 [
    i8 32, label %.critedge
    i8 24, label %.critedge
    i8 16, label %.critedge
  ]

43:                                               ; preds = %39
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 92, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN2rw7readTGAEPKc) #8
  unreachable

.critedge:                                        ; preds = %39, %39, %39, %30, %30
  %.077 = phi i32 [ %37, %30 ], [ 0, %39 ], [ %37, %30 ], [ 0, %39 ], [ 0, %39 ]
  %.076 = phi i32 [ %34, %30 ], [ %42, %39 ], [ %34, %30 ], [ %42, %39 ], [ %42, %39 ]
  %44 = getelementptr inbounds i8, ptr %2, i64 14
  %45 = load i16, ptr %44, align 2, !tbaa !17
  %46 = sext i16 %45 to i32
  %47 = getelementptr inbounds i8, ptr %2, i64 16
  %48 = load i16, ptr %47, align 2, !tbaa !18
  %49 = sext i16 %48 to i32
  %50 = invoke noundef ptr @_ZN2rw5Image6createEiii(i32 noundef %46, i32 noundef %49, i32 noundef %.076)
          to label %51 unwind label %17

51:                                               ; preds = %.critedge
  invoke void @_ZN2rw5Image8allocateEv(ptr noundef nonnull align 8 dereferenceable(40) %50)
          to label %52 unwind label %17

52:                                               ; preds = %51
  %53 = load i8, ptr %23, align 1, !tbaa !12
  %.not86 = icmp eq i8 %53, 0
  br i1 %.not86, label %.thread, label %54

54:                                               ; preds = %52
  %55 = getelementptr inbounds i8, ptr %50, i64 32
  %56 = load ptr, ptr %55, align 8, !tbaa !19
  %.not87 = icmp eq ptr %56, null
  br i1 %.not87, label %.thread, label %57

57:                                               ; preds = %54
  %58 = icmp eq i32 %.076, 4
  %59 = select i1 %58, i32 16, i32 256
  %60 = getelementptr inbounds i8, ptr %2, i64 6
  %61 = load i16, ptr %60, align 2, !tbaa !14
  %62 = icmp sgt i16 %61, 0
  br i1 %62, label %.lr.ph, label %.lr.ph100.preheader

.lr.ph:                                           ; preds = %57
  %63 = icmp eq i32 %.077, 32
  br i1 %63, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %75
  %indvars.iv112 = phi i64 [ %indvars.iv.next113, %75 ], [ 0, %.lr.ph ]
  %64 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %65 unwind label %.split.us

65:                                               ; preds = %.lr.ph.split.us
  %66 = getelementptr inbounds [4 x i8], ptr %56, i64 %indvars.iv112
  %67 = getelementptr inbounds i8, ptr %66, i64 2
  store i8 %64, ptr %67, align 1, !tbaa !22
  %68 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %69 unwind label %.split.us

69:                                               ; preds = %65
  %70 = getelementptr inbounds i8, ptr %66, i64 1
  store i8 %68, ptr %70, align 1, !tbaa !22
  %71 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %72 unwind label %.split.us

72:                                               ; preds = %69
  store i8 %71, ptr %66, align 1, !tbaa !22
  %73 = getelementptr inbounds i8, ptr %66, i64 3
  store i8 -1, ptr %73, align 1, !tbaa !22
  %74 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %75 unwind label %.split.us

75:                                               ; preds = %72
  store i8 %74, ptr %73, align 1, !tbaa !22
  %indvars.iv.next113 = add nuw nsw i64 %indvars.iv112, 1
  %76 = load i16, ptr %60, align 2, !tbaa !14
  %77 = sext i16 %76 to i64
  %78 = icmp slt i64 %indvars.iv.next113, %77
  br i1 %78, label %.lr.ph.split.us, label %.preheader95, !llvm.loop !23

.split.us:                                        ; preds = %72, %69, %65, %.lr.ph.split.us
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %185

.preheader95:                                     ; preds = %95, %75
  %indvars.iv.next.lcssa.sink = phi i64 [ %indvars.iv.next113, %75 ], [ %indvars.iv.next, %95 ]
  %80 = trunc nuw nsw i64 %indvars.iv.next.lcssa.sink to i32
  %81 = icmp ugt i32 %59, %80
  br i1 %81, label %.lr.ph100.preheader, label %.thread

.lr.ph100.preheader:                              ; preds = %57, %.preheader95
  %.074.lcssa120 = phi i64 [ %indvars.iv.next.lcssa.sink, %.preheader95 ], [ 0, %57 ]
  %82 = and i64 %.074.lcssa120, 4294967295
  %wide.trip.count = zext nneg i32 %59 to i64
  %83 = sub i64 0, %.074.lcssa120
  %xtraiter = and i64 %83, 7
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph100.prol.loopexit, label %.lr.ph100.prol

.lr.ph100.prol:                                   ; preds = %.lr.ph100.preheader, %.lr.ph100.prol
  %indvars.iv115.prol = phi i64 [ %indvars.iv.next116.prol, %.lr.ph100.prol ], [ %82, %.lr.ph100.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph100.prol ], [ 0, %.lr.ph100.preheader ]
  %84 = getelementptr inbounds [4 x i8], ptr %56, i64 %indvars.iv115.prol
  store <4 x i8> <i8 0, i8 0, i8 0, i8 -1>, ptr %84, align 1, !tbaa !22
  %indvars.iv.next116.prol = add nuw nsw i64 %indvars.iv115.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph100.prol.loopexit, label %.lr.ph100.prol, !llvm.loop !25

.lr.ph100.prol.loopexit:                          ; preds = %.lr.ph100.prol, %.lr.ph100.preheader
  %indvars.iv115.unr = phi i64 [ %82, %.lr.ph100.preheader ], [ %indvars.iv.next116.prol, %.lr.ph100.prol ]
  %85 = sub i64 %.074.lcssa120, %wide.trip.count
  %86 = icmp ugt i64 %85, -8
  br i1 %86, label %.thread, label %.lr.ph100.preheader.new

.lr.ph100.preheader.new:                          ; preds = %.lr.ph100.prol.loopexit
  %invariant.gep = getelementptr i8, ptr %56, i64 4
  %invariant.gep123 = getelementptr i8, ptr %56, i64 8
  %invariant.gep125 = getelementptr i8, ptr %56, i64 12
  %invariant.gep127 = getelementptr i8, ptr %56, i64 16
  %invariant.gep129 = getelementptr i8, ptr %56, i64 20
  %invariant.gep131 = getelementptr i8, ptr %56, i64 24
  %invariant.gep133 = getelementptr i8, ptr %56, i64 28
  br label %.lr.ph100

.lr.ph.split:                                     ; preds = %.lr.ph, %95
  %indvars.iv = phi i64 [ %indvars.iv.next, %95 ], [ 0, %.lr.ph ]
  %87 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %88 unwind label %.split

88:                                               ; preds = %.lr.ph.split
  %89 = getelementptr inbounds [4 x i8], ptr %56, i64 %indvars.iv
  %90 = getelementptr inbounds i8, ptr %89, i64 2
  store i8 %87, ptr %90, align 1, !tbaa !22
  %91 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %92 unwind label %.split

92:                                               ; preds = %88
  %93 = getelementptr inbounds i8, ptr %89, i64 1
  store i8 %91, ptr %93, align 1, !tbaa !22
  %94 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %95 unwind label %.split

95:                                               ; preds = %92
  store i8 %94, ptr %89, align 1, !tbaa !22
  %96 = getelementptr inbounds i8, ptr %89, i64 3
  store i8 -1, ptr %96, align 1, !tbaa !22
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %97 = load i16, ptr %60, align 2, !tbaa !14
  %98 = sext i16 %97 to i64
  %99 = icmp slt i64 %indvars.iv.next, %98
  br i1 %99, label %.lr.ph.split, label %.preheader95, !llvm.loop !23

.split:                                           ; preds = %92, %88, %.lr.ph.split
  %100 = landingpad { ptr, i32 }
          cleanup
  br label %185

.lr.ph100:                                        ; preds = %.lr.ph100, %.lr.ph100.preheader.new
  %indvars.iv115 = phi i64 [ %indvars.iv115.unr, %.lr.ph100.preheader.new ], [ %indvars.iv.next116.7, %.lr.ph100 ]
  %101 = getelementptr inbounds [4 x i8], ptr %56, i64 %indvars.iv115
  store <4 x i8> <i8 0, i8 0, i8 0, i8 -1>, ptr %101, align 1, !tbaa !22
  %gep = getelementptr [4 x i8], ptr %invariant.gep, i64 %indvars.iv115
  store <4 x i8> <i8 0, i8 0, i8 0, i8 -1>, ptr %gep, align 1, !tbaa !22
  %gep124 = getelementptr [4 x i8], ptr %invariant.gep123, i64 %indvars.iv115
  store <4 x i8> <i8 0, i8 0, i8 0, i8 -1>, ptr %gep124, align 1, !tbaa !22
  %gep126 = getelementptr [4 x i8], ptr %invariant.gep125, i64 %indvars.iv115
  store <4 x i8> <i8 0, i8 0, i8 0, i8 -1>, ptr %gep126, align 1, !tbaa !22
  %gep128 = getelementptr [4 x i8], ptr %invariant.gep127, i64 %indvars.iv115
  store <4 x i8> <i8 0, i8 0, i8 0, i8 -1>, ptr %gep128, align 1, !tbaa !22
  %gep130 = getelementptr [4 x i8], ptr %invariant.gep129, i64 %indvars.iv115
  store <4 x i8> <i8 0, i8 0, i8 0, i8 -1>, ptr %gep130, align 1, !tbaa !22
  %gep132 = getelementptr [4 x i8], ptr %invariant.gep131, i64 %indvars.iv115
  store <4 x i8> <i8 0, i8 0, i8 0, i8 -1>, ptr %gep132, align 1, !tbaa !22
  %gep134 = getelementptr [4 x i8], ptr %invariant.gep133, i64 %indvars.iv115
  store <4 x i8> <i8 0, i8 0, i8 0, i8 -1>, ptr %gep134, align 1, !tbaa !22
  %indvars.iv.next116.7 = add nuw nsw i64 %indvars.iv115, 8
  %exitcond.not.7 = icmp eq i64 %indvars.iv.next116.7, %wide.trip.count
  br i1 %exitcond.not.7, label %.thread, label %.lr.ph100, !llvm.loop !27

.thread:                                          ; preds = %.lr.ph100.prol.loopexit, %.lr.ph100, %.preheader95, %52, %54
  %102 = getelementptr inbounds i8, ptr %50, i64 24
  %103 = load ptr, ptr %102, align 8, !tbaa !28
  %104 = getelementptr inbounds i8, ptr %2, i64 19
  %105 = load i8, ptr %104, align 1, !tbaa !29
  %106 = and i8 %105, 32
  %.not88 = icmp eq i8 %106, 0
  %107 = getelementptr inbounds i8, ptr %50, i64 8
  %108 = load i32, ptr %107, align 8, !tbaa !30
  br i1 %.not88, label %109, label %.thread._crit_edge

109:                                              ; preds = %.thread
  %110 = add nsw i32 %108, -1
  %111 = getelementptr inbounds i8, ptr %50, i64 20
  %112 = load i32, ptr %111, align 4, !tbaa !31
  %113 = mul nsw i32 %110, %112
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds i8, ptr %103, i64 %114
  br label %.thread._crit_edge

.thread._crit_edge:                               ; preds = %.thread, %109
  %.073 = phi ptr [ %115, %109 ], [ %103, %.thread ]
  %116 = getelementptr inbounds i8, ptr %50, i64 8
  %117 = icmp sgt i32 %108, 0
  br i1 %117, label %.preheader.lr.ph, label %._crit_edge106

.preheader.lr.ph:                                 ; preds = %.thread._crit_edge
  %118 = getelementptr inbounds i8, ptr %50, i64 4
  %119 = getelementptr inbounds i8, ptr %50, i64 12
  %120 = getelementptr inbounds i8, ptr %50, i64 16
  %121 = getelementptr inbounds i8, ptr %50, i64 20
  %122 = load i32, ptr %118, align 4, !tbaa !32
  %123 = icmp sgt i32 %122, 0
  br i1 %123, label %.preheader, label %._crit_edge106

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %124 = phi i8 [ %127, %._crit_edge ], [ %105, %.preheader.lr.ph ]
  %125 = phi i32 [ %128, %._crit_edge ], [ %122, %.preheader.lr.ph ]
  %.072105 = phi i32 [ %135, %._crit_edge ], [ 0, %.preheader.lr.ph ]
  %.1104 = phi ptr [ %134, %._crit_edge ], [ %.073, %.preheader.lr.ph ]
  %126 = icmp sgt i32 %125, 0
  br i1 %126, label %.lr.ph103, label %._crit_edge

._crit_edge106:                                   ; preds = %._crit_edge, %.preheader.lr.ph, %.thread._crit_edge
  invoke void @_ZN2rw12StreamMemory5closeEv(ptr noundef nonnull align 8 dereferenceable(28) %4)
          to label %180 unwind label %183

._crit_edge.loopexit:                             ; preds = %173
  %.pre118 = load i8, ptr %104, align 1, !tbaa !29
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %127 = phi i8 [ %.pre118, %._crit_edge.loopexit ], [ %124, %.preheader ]
  %128 = phi i32 [ %178, %._crit_edge.loopexit ], [ %125, %.preheader ]
  %129 = and i8 %127, 32
  %.not89 = icmp eq i8 %129, 0
  %130 = load i32, ptr %121, align 4, !tbaa !31
  %131 = sub nsw i32 0, %130
  %132 = select i1 %.not89, i32 %131, i32 %130
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds i8, ptr %.1104, i64 %133
  %135 = add nuw nsw i32 %.072105, 1
  %136 = load i32, ptr %116, align 8, !tbaa !30
  %137 = icmp slt i32 %135, %136
  br i1 %137, label %.preheader, label %._crit_edge106, !llvm.loop !33

.lr.ph103:                                        ; preds = %.preheader, %173
  %.0102 = phi i32 [ %177, %173 ], [ 0, %.preheader ]
  %.071101 = phi ptr [ %176, %173 ], [ %.1104, %.preheader ]
  %138 = load i32, ptr %119, align 4, !tbaa !35
  %139 = add i32 %138, -4
  %140 = call i32 @llvm.fshl.i32(i32 %139, i32 %139, i32 30)
  switch i32 %140, label %173 [
    i32 0, label %141
    i32 1, label %141
    i32 3, label %146
    i32 5, label %152
    i32 7, label %161
  ]

141:                                              ; preds = %.lr.ph103, %.lr.ph103
  %142 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %143 unwind label %144

143:                                              ; preds = %141
  store i8 %142, ptr %.071101, align 1, !tbaa !22
  br label %173

144:                                              ; preds = %169, %166, %163, %161, %157, %154, %152, %148, %146, %141
  %145 = landingpad { ptr, i32 }
          cleanup
  br label %185

146:                                              ; preds = %.lr.ph103
  %147 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %148 unwind label %144

148:                                              ; preds = %146
  store i8 %147, ptr %.071101, align 1, !tbaa !22
  %149 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %150 unwind label %144

150:                                              ; preds = %148
  %151 = getelementptr inbounds i8, ptr %.071101, i64 1
  store i8 %149, ptr %151, align 1, !tbaa !22
  br label %173

152:                                              ; preds = %.lr.ph103
  %153 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %154 unwind label %144

154:                                              ; preds = %152
  %155 = getelementptr inbounds i8, ptr %.071101, i64 2
  store i8 %153, ptr %155, align 1, !tbaa !22
  %156 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %157 unwind label %144

157:                                              ; preds = %154
  %158 = getelementptr inbounds i8, ptr %.071101, i64 1
  store i8 %156, ptr %158, align 1, !tbaa !22
  %159 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %160 unwind label %144

160:                                              ; preds = %157
  store i8 %159, ptr %.071101, align 1, !tbaa !22
  br label %173

161:                                              ; preds = %.lr.ph103
  %162 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %163 unwind label %144

163:                                              ; preds = %161
  %164 = getelementptr inbounds i8, ptr %.071101, i64 2
  store i8 %162, ptr %164, align 1, !tbaa !22
  %165 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %166 unwind label %144

166:                                              ; preds = %163
  %167 = getelementptr inbounds i8, ptr %.071101, i64 1
  store i8 %165, ptr %167, align 1, !tbaa !22
  %168 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %169 unwind label %144

169:                                              ; preds = %166
  store i8 %168, ptr %.071101, align 1, !tbaa !22
  %170 = invoke noundef zeroext i8 @_ZN2rw6Stream6readU8Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %171 unwind label %144

171:                                              ; preds = %169
  %172 = getelementptr inbounds i8, ptr %.071101, i64 3
  store i8 %170, ptr %172, align 1, !tbaa !22
  br label %173

173:                                              ; preds = %171, %160, %150, %143, %.lr.ph103
  %174 = load i32, ptr %120, align 8, !tbaa !36
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds i8, ptr %.071101, i64 %175
  %177 = add nuw nsw i32 %.0102, 1
  %178 = load i32, ptr %118, align 4, !tbaa !32
  %179 = icmp slt i32 %177, %178
  br i1 %179, label %.lr.ph103, label %._crit_edge.loopexit, !llvm.loop !37

180:                                              ; preds = %._crit_edge106
  %181 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZN2rw6Engine8memfuncsE, i64 16), align 8, !tbaa !38
  invoke void %181(ptr noundef nonnull %5)
          to label %182 unwind label %183

182:                                              ; preds = %180
  call void @_ZN2rw6StreamD2Ev(ptr noundef nonnull align 8 dereferenceable(28) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %2) #7
  ret ptr %50

183:                                              ; preds = %180, %._crit_edge106
  %184 = landingpad { ptr, i32 }
          cleanup
  br label %185

185:                                              ; preds = %.split, %.split.us, %183, %144, %17
  %.pn91.pn = phi { ptr, i32 } [ %18, %17 ], [ %145, %144 ], [ %184, %183 ], [ %100, %.split ], [ %79, %.split.us ]
  call void @_ZN2rw6StreamD2Ev(ptr noundef nonnull align 8 dereferenceable(28) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %2) #7
  resume { ptr, i32 } %.pn91.pn
}

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

declare noundef ptr @_ZN2rw15getFileContentsEPKcPj(ptr noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN2rw12StreamMemoryC2Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #4 align 2

declare noundef ptr @_ZN2rw12StreamMemory4openEPhjj(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

declare void @_ZN2rw12StreamMemory4seekEii(ptr noundef nonnull align 8 dereferenceable(28), i32 noundef, i32 noundef) unnamed_addr #1

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

declare void @_ZN2rw5Image8allocateEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1

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

declare void @_ZN2rw12StreamMemory5closeEv(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #1

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.fshl.i32(i32, i32, i32) #6

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !7, i64 0}
!10 = !{!"_ZTSN2rw9TGAHeaderE", !7, i64 0, !7, i64 1, !7, i64 2, !11, i64 4, !11, i64 6, !7, i64 8, !11, i64 10, !11, i64 12, !11, i64 14, !11, i64 16, !7, i64 18, !7, i64 19}
!11 = !{!"short", !7, i64 0}
!12 = !{!10, !7, i64 1}
!13 = !{!10, !11, i64 4}
!14 = !{!10, !11, i64 6}
!15 = !{!10, !7, i64 8}
!16 = !{!10, !7, i64 18}
!17 = !{!10, !11, i64 14}
!18 = !{!10, !11, i64 16}
!19 = !{!20, !21, i64 32}
!20 = !{!"_ZTSN2rw5ImageE", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !21, i64 24, !21, i64 32}
!21 = !{!"any pointer", !7, i64 0}
!22 = !{!7, !7, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.unroll.disable"}
!27 = distinct !{!27, !24}
!28 = !{!20, !21, i64 24}
!29 = !{!10, !7, i64 19}
!30 = !{!20, !6, i64 8}
!31 = !{!20, !6, i64 20}
!32 = !{!20, !6, i64 4}
!33 = distinct !{!33, !24, !34}
!34 = !{!"llvm.loop.unswitch.partial.disable"}
!35 = !{!20, !6, i64 12}
!36 = !{!20, !6, i64 16}
!37 = distinct !{!37, !24}
!38 = !{!39, !21, i64 16}
!39 = !{!"_ZTSN2rw15MemoryFunctionsE", !21, i64 0, !21, i64 8, !21, i64 16, !21, i64 24, !21, i64 32}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SLPVectorizerPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass