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

; 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::Geometry" = type { %"struct.rw::Object", i32, i16, i32, i32, i32, i32, ptr, ptr, [8 x ptr], ptr, %"struct.rw::MaterialList", ptr, ptr, i32 }
%"struct.rw::Object" = type { i8, i8, i8, i8, ptr }
%"struct.rw::MaterialList" = type { ptr, i32, i32 }
%"struct.rw::InstanceDataHeader" = type { i32 }
%"struct.rw::xbox::InstanceDataHeader" = type { %"struct.rw::InstanceDataHeader", i32, i16, i16, i32, i32, i32, ptr, i32, ptr, ptr, ptr }
%"struct.rw::xbox::InstanceData" = type { i32, i32, i32, ptr, ptr, 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
@.str.4 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [76 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

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

27:                                               ; preds = %5
  br label %28

28:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %29 = getelementptr inbounds %"struct.rw::Error", ptr %15, i32 0, i32 0
  store i32 2, ptr %29, align 4, !tbaa !11
  %30 = getelementptr inbounds %"struct.rw::Error", ptr %15, i32 0, i32 1
  store i32 -2147483644, ptr %30, align 4, !tbaa !13
  %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 75) #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 %15)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %36

36:                                               ; preds = %28
  br label %37

37:                                               ; preds = %36
  store ptr null, ptr %6, align 8
  store i32 1, ptr %16, align 4
  br label %230

38:                                               ; preds = %5
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = call noundef i32 @_ZN2rw6Stream7readU32Ev(ptr noundef nonnull align 8 dereferenceable(8) %39)
  store i32 %40, ptr %14, align 4, !tbaa !9
  %41 = load i32, ptr %14, align 4, !tbaa !9
  %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 %17) #5
  %45 = getelementptr inbounds %"struct.rw::Error", ptr %17, i32 0, i32 0
  store i32 2, ptr %45, align 4, !tbaa !11
  %46 = getelementptr inbounds %"struct.rw::Error", ptr %17, i32 0, i32 1
  store i32 -2147483642, ptr %46, align 4, !tbaa !13
  %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 80) #5
  %49 = load ptr, ptr @stderr, align 8, !tbaa !5
  %50 = load i32, ptr %14, align 4, !tbaa !9
  %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 %17)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %53

53:                                               ; preds = %44
  br label %54

54:                                               ; preds = %53
  store ptr null, ptr %6, align 8
  store i32 1, ptr %16, align 4
  br label %230

55:                                               ; preds = %38
  %56 = load i32, ptr %13, align 4, !tbaa !9
  %57 = icmp ult i32 %56, 217088
  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 %18) #5
  %60 = getelementptr inbounds %"struct.rw::Error", ptr %18, i32 0, i32 0
  store i32 2, ptr %60, align 4, !tbaa !11
  %61 = getelementptr inbounds %"struct.rw::Error", ptr %18, i32 0, i32 1
  store i32 -2147483643, ptr %61, align 4, !tbaa !13
  %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 84) #5
  %64 = load ptr, ptr @stderr, align 8, !tbaa !5
  %65 = load i32, ptr %13, align 4, !tbaa !9
  %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 %18)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %68

68:                                               ; preds = %59
  br label %69

69:                                               ; preds = %68
  store ptr null, ptr %6, align 8
  store i32 1, ptr %16, align 4
  br label %230

70:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %71 = call noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef 64, i32 noundef 196623, ptr noundef @.str.4)
  store ptr %71, ptr %19, align 8, !tbaa !5
  %72 = load ptr, ptr %19, align 8, !tbaa !5
  %73 = load ptr, ptr %12, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.rw::Geometry", ptr %73, i32 0, i32 13
  store ptr %72, ptr %74, align 8, !tbaa !14
  %75 = load ptr, ptr %19, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.rw::InstanceDataHeader", ptr %75, i32 0, i32 0
  store i32 5, ptr %76, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = call noundef i32 @_ZN2rw6Stream7readI32Ev(ptr noundef nonnull align 8 dereferenceable(8) %77)
  store i32 %78, ptr %20, align 4, !tbaa !9
  %79 = load i32, ptr %20, align 4, !tbaa !9
  %80 = add nsw i32 %79, 24
  %81 = sext i32 %80 to i64
  %82 = mul i64 %81, 1
  %83 = call noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef %82, i32 noundef 196623, ptr noundef @.str.5)
  %84 = load ptr, ptr %19, align 8, !tbaa !5
  %85 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %84, i32 0, i32 11
  store ptr %83, ptr %85, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %86 = load ptr, ptr %19, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %86, i32 0, i32 11
  %88 = load ptr, ptr %87, align 8, !tbaa !21
  %89 = getelementptr inbounds i8, ptr %88, i64 24
  %90 = getelementptr inbounds i8, ptr %89, i64 4
  store ptr %90, ptr %21, align 8, !tbaa !5
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = load ptr, ptr %21, align 8, !tbaa !5
  %93 = load i32, ptr %20, align 4, !tbaa !9
  %94 = sub nsw i32 %93, 4
  %95 = load ptr, ptr %91, align 8, !tbaa !23
  %96 = getelementptr inbounds ptr, ptr %95, i64 4
  %97 = load ptr, ptr %96, align 8
  %98 = call noundef i32 %97(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef %92, i32 noundef %94)
  %99 = load i32, ptr %20, align 4, !tbaa !9
  %100 = load ptr, ptr %19, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %100, i32 0, i32 1
  store i32 %99, ptr %101, align 4, !tbaa !25
  %102 = load ptr, ptr %21, align 8, !tbaa !5
  %103 = load i16, ptr %102, align 2, !tbaa !26
  %104 = load ptr, ptr %19, align 8, !tbaa !5
  %105 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %104, i32 0, i32 2
  store i16 %103, ptr %105, align 8, !tbaa !27
  %106 = load ptr, ptr %21, align 8, !tbaa !5
  %107 = getelementptr inbounds i8, ptr %106, i64 2
  store ptr %107, ptr %21, align 8, !tbaa !5
  %108 = load ptr, ptr %21, align 8, !tbaa !5
  %109 = load i16, ptr %108, align 2, !tbaa !26
  %110 = load ptr, ptr %19, align 8, !tbaa !5
  %111 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %110, i32 0, i32 3
  store i16 %109, ptr %111, align 2, !tbaa !28
  %112 = load ptr, ptr %21, align 8, !tbaa !5
  %113 = getelementptr inbounds i8, ptr %112, i64 2
  store ptr %113, ptr %21, align 8, !tbaa !5
  %114 = load ptr, ptr %21, align 8, !tbaa !5
  %115 = load i32, ptr %114, align 4, !tbaa !9
  %116 = load ptr, ptr %19, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %116, i32 0, i32 4
  store i32 %115, ptr %117, align 4, !tbaa !29
  %118 = load ptr, ptr %21, align 8, !tbaa !5
  %119 = getelementptr inbounds i8, ptr %118, i64 4
  store ptr %119, ptr %21, align 8, !tbaa !5
  %120 = load ptr, ptr %21, align 8, !tbaa !5
  %121 = load i32, ptr %120, align 4, !tbaa !9
  %122 = load ptr, ptr %19, align 8, !tbaa !5
  %123 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %122, i32 0, i32 5
  store i32 %121, ptr %123, align 8, !tbaa !30
  %124 = load ptr, ptr %21, align 8, !tbaa !5
  %125 = getelementptr inbounds i8, ptr %124, i64 4
  store ptr %125, ptr %21, align 8, !tbaa !5
  %126 = load ptr, ptr %21, align 8, !tbaa !5
  %127 = load i32, ptr %126, align 4, !tbaa !9
  %128 = load ptr, ptr %19, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %128, i32 0, i32 6
  store i32 %127, ptr %129, align 4, !tbaa !31
  %130 = load ptr, ptr %21, align 8, !tbaa !5
  %131 = getelementptr inbounds i8, ptr %130, i64 4
  store ptr %131, ptr %21, align 8, !tbaa !5
  %132 = load ptr, ptr %21, align 8, !tbaa !5
  %133 = getelementptr inbounds i8, ptr %132, i64 4
  store ptr %133, ptr %21, align 8, !tbaa !5
  %134 = load ptr, ptr %21, align 8, !tbaa !5
  %135 = load i32, ptr %134, align 4, !tbaa !9
  %136 = load ptr, ptr %19, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %136, i32 0, i32 8
  store i32 %135, ptr %137, align 8, !tbaa !32
  %138 = load ptr, ptr %21, align 8, !tbaa !5
  %139 = getelementptr inbounds i8, ptr %138, i64 4
  store ptr %139, ptr %21, align 8, !tbaa !5
  %140 = load ptr, ptr %21, align 8, !tbaa !5
  %141 = getelementptr inbounds i8, ptr %140, i64 8
  store ptr %141, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %142 = load ptr, ptr %19, align 8, !tbaa !5
  %143 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %142, i32 0, i32 3
  %144 = load i16, ptr %143, align 2, !tbaa !28
  %145 = zext i16 %144 to i64
  %146 = mul i64 %145, 40
  %147 = call noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef %146, i32 noundef 196623, ptr noundef @.str.6)
  store ptr %147, ptr %22, align 8, !tbaa !5
  %148 = load ptr, ptr %22, align 8, !tbaa !5
  %149 = load ptr, ptr %19, align 8, !tbaa !5
  %150 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %149, i32 0, i32 9
  store ptr %148, ptr %150, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %151

151:                                              ; preds = %195, %70
  %152 = load i32, ptr %23, align 4, !tbaa !9
  %153 = load ptr, ptr %19, align 8, !tbaa !5
  %154 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %153, i32 0, i32 3
  %155 = load i16, ptr %154, align 2, !tbaa !28
  %156 = zext i16 %155 to i32
  %157 = icmp slt i32 %152, %156
  br i1 %157, label %159, label %158

158:                                              ; preds = %151
  store i32 8, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  br label %198

159:                                              ; preds = %151
  %160 = load ptr, ptr %21, align 8, !tbaa !5
  %161 = load i32, ptr %160, align 4, !tbaa !9
  %162 = load ptr, ptr %22, align 8, !tbaa !5
  %163 = getelementptr inbounds %"struct.rw::xbox::InstanceData", ptr %162, i32 0, i32 0
  store i32 %161, ptr %163, align 8, !tbaa !34
  %164 = load ptr, ptr %21, align 8, !tbaa !5
  %165 = getelementptr inbounds i8, ptr %164, i64 4
  store ptr %165, ptr %21, align 8, !tbaa !5
  %166 = load ptr, ptr %21, align 8, !tbaa !5
  %167 = load i32, ptr %166, align 4, !tbaa !9
  %168 = load ptr, ptr %22, align 8, !tbaa !5
  %169 = getelementptr inbounds %"struct.rw::xbox::InstanceData", ptr %168, i32 0, i32 1
  store i32 %167, ptr %169, align 4, !tbaa !36
  %170 = load ptr, ptr %21, align 8, !tbaa !5
  %171 = getelementptr inbounds i8, ptr %170, i64 4
  store ptr %171, ptr %21, align 8, !tbaa !5
  %172 = load ptr, ptr %21, align 8, !tbaa !5
  %173 = load i32, ptr %172, align 4, !tbaa !9
  %174 = load ptr, ptr %22, align 8, !tbaa !5
  %175 = getelementptr inbounds %"struct.rw::xbox::InstanceData", ptr %174, i32 0, i32 2
  store i32 %173, ptr %175, align 8, !tbaa !37
  %176 = load ptr, ptr %21, align 8, !tbaa !5
  %177 = getelementptr inbounds i8, ptr %176, i64 4
  store ptr %177, ptr %21, align 8, !tbaa !5
  %178 = load ptr, ptr %19, align 8, !tbaa !5
  %179 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %178, i32 0, i32 11
  %180 = load ptr, ptr %179, align 8, !tbaa !21
  %181 = load ptr, ptr %21, align 8, !tbaa !5
  %182 = load i32, ptr %181, align 4, !tbaa !9
  %183 = zext i32 %182 to i64
  %184 = getelementptr inbounds i8, ptr %180, i64 %183
  %185 = load ptr, ptr %22, align 8, !tbaa !5
  %186 = getelementptr inbounds %"struct.rw::xbox::InstanceData", ptr %185, i32 0, i32 3
  store ptr %184, ptr %186, align 8, !tbaa !38
  %187 = load ptr, ptr %21, align 8, !tbaa !5
  %188 = getelementptr inbounds i8, ptr %187, i64 4
  store ptr %188, ptr %21, align 8, !tbaa !5
  %189 = load ptr, ptr %21, align 8, !tbaa !5
  %190 = getelementptr inbounds i8, ptr %189, i64 8
  store ptr %190, ptr %21, align 8, !tbaa !5
  %191 = load ptr, ptr %22, align 8, !tbaa !5
  %192 = getelementptr inbounds %"struct.rw::xbox::InstanceData", ptr %191, i32 0, i32 5
  store i32 0, ptr %192, align 8, !tbaa !39
  %193 = load ptr, ptr %22, align 8, !tbaa !5
  %194 = getelementptr inbounds %"struct.rw::xbox::InstanceData", ptr %193, i32 1
  store ptr %194, ptr %22, align 8, !tbaa !5
  br label %195

195:                                              ; preds = %159
  %196 = load i32, ptr %23, align 4, !tbaa !9
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %23, align 4, !tbaa !9
  br label %151, !llvm.loop !40

198:                                              ; preds = %158
  %199 = load ptr, ptr %22, align 8, !tbaa !5
  %200 = load ptr, ptr %19, align 8, !tbaa !5
  %201 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %200, i32 0, i32 10
  store ptr %199, ptr %201, align 8, !tbaa !42
  %202 = load ptr, ptr %19, align 8, !tbaa !5
  %203 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %202, i32 0, i32 6
  %204 = load i32, ptr %203, align 4, !tbaa !31
  %205 = load ptr, ptr %19, align 8, !tbaa !5
  %206 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %205, i32 0, i32 5
  %207 = load i32, ptr %206, align 8, !tbaa !30
  %208 = mul nsw i32 %204, %207
  %209 = sext i32 %208 to i64
  %210 = mul i64 %209, 1
  %211 = call noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef %210, i32 noundef 196623, ptr noundef @.str.7)
  %212 = load ptr, ptr %19, align 8, !tbaa !5
  %213 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %212, i32 0, i32 7
  store ptr %211, ptr %213, align 8, !tbaa !43
  %214 = load ptr, ptr %7, align 8, !tbaa !5
  %215 = load ptr, ptr %19, align 8, !tbaa !5
  %216 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %215, i32 0, i32 7
  %217 = load ptr, ptr %216, align 8, !tbaa !43
  %218 = load ptr, ptr %19, align 8, !tbaa !5
  %219 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %218, i32 0, i32 6
  %220 = load i32, ptr %219, align 4, !tbaa !31
  %221 = load ptr, ptr %19, align 8, !tbaa !5
  %222 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %221, i32 0, i32 5
  %223 = load i32, ptr %222, align 8, !tbaa !30
  %224 = mul nsw i32 %220, %223
  %225 = load ptr, ptr %214, align 8, !tbaa !23
  %226 = getelementptr inbounds ptr, ptr %225, i64 4
  %227 = load ptr, ptr %226, align 8
  %228 = call noundef i32 %227(ptr noundef nonnull align 8 dereferenceable(8) %214, ptr noundef %217, i32 noundef %224)
  %229 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %229, ptr %6, align 8
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #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 8, ptr %19) #5
  br label %230

230:                                              ; preds = %198, %69, %54, %37
  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 8, ptr %12) #5
  %231 = load ptr, ptr %6, align 8
  ret ptr %231
}

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

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

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

declare void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef) #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef, i32 noundef, ptr noundef) #4

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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, !10, i64 0}
!12 = !{!"_ZTSN2rw5ErrorE", !10, i64 0, !10, i64 4}
!13 = !{!12, !10, i64 4}
!14 = !{!15, !6, i64 152}
!15 = !{!"_ZTSN2rw8GeometryE", !16, i64 0, !10, i64 16, !17, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !6, i64 40, !6, i64 48, !7, i64 56, !6, i64 120, !18, i64 128, !6, i64 144, !6, i64 152, !10, i64 160}
!16 = !{!"_ZTSN2rw6ObjectE", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !6, i64 8}
!17 = !{!"short", !7, i64 0}
!18 = !{!"_ZTSN2rw12MaterialListE", !6, i64 0, !10, i64 8, !10, i64 12}
!19 = !{!20, !10, i64 0}
!20 = !{!"_ZTSN2rw18InstanceDataHeaderE", !10, i64 0}
!21 = !{!22, !6, i64 56}
!22 = !{!"_ZTSN2rw4xbox18InstanceDataHeaderE", !20, i64 0, !10, i64 4, !17, i64 8, !17, i64 10, !10, i64 12, !10, i64 16, !10, i64 20, !6, i64 24, !10, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!23 = !{!24, !24, i64 0}
!24 = !{!"vtable pointer", !8, i64 0}
!25 = !{!22, !10, i64 4}
!26 = !{!17, !17, i64 0}
!27 = !{!22, !17, i64 8}
!28 = !{!22, !17, i64 10}
!29 = !{!22, !10, i64 12}
!30 = !{!22, !10, i64 16}
!31 = !{!22, !10, i64 20}
!32 = !{!22, !10, i64 32}
!33 = !{!22, !6, i64 40}
!34 = !{!35, !10, i64 0}
!35 = !{!"_ZTSN2rw4xbox12InstanceDataE", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !6, i64 24, !10, i64 32}
!36 = !{!35, !10, i64 4}
!37 = !{!35, !10, i64 8}
!38 = !{!35, !6, i64 16}
!39 = !{!35, !10, i64 32}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}
!42 = !{!22, !6, i64 48}
!43 = !{!22, !6, i64 24}


; 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
@.str.4 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [76 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

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

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

18:                                               ; preds = %5
  %19 = call noundef i32 @_ZN2rw6Stream7readU32Ev(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %.not = icmp eq i32 %19, 5
  br i1 %.not, label %27, label %20

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

27:                                               ; preds = %18
  %28 = load i32, ptr %6, align 4, !tbaa !13
  %29 = icmp ult i32 %28, 217088
  br i1 %29, label %30, label %38

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

38:                                               ; preds = %27
  %39 = call noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef 64, i32 noundef 196623, ptr noundef nonnull @.str.4)
  %40 = getelementptr inbounds i8, ptr %2, i64 152
  store ptr %39, ptr %40, align 8, !tbaa !14
  store i32 5, ptr %39, align 8, !tbaa !19
  %41 = call noundef i32 @_ZN2rw6Stream7readI32Ev(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %42 = add nsw i32 %41, 24
  %43 = sext i32 %42 to i64
  %44 = call noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef %43, i32 noundef 196623, ptr noundef nonnull @.str.5)
  %45 = getelementptr inbounds i8, ptr %39, i64 56
  store ptr %44, ptr %45, align 8, !tbaa !21
  %46 = getelementptr inbounds i8, ptr %44, i64 28
  %47 = add nsw i32 %41, -4
  %48 = load ptr, ptr %0, align 8, !tbaa !23
  %49 = getelementptr inbounds i8, ptr %48, i64 32
  %50 = load ptr, ptr %49, align 8
  %51 = call noundef i32 %50(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %46, i32 noundef %47)
  %52 = getelementptr inbounds i8, ptr %39, i64 4
  store i32 %41, ptr %52, align 4, !tbaa !25
  %53 = load i16, ptr %46, align 2, !tbaa !26
  %54 = getelementptr inbounds i8, ptr %39, i64 8
  store i16 %53, ptr %54, align 8, !tbaa !27
  %55 = getelementptr inbounds i8, ptr %44, i64 30
  %56 = load i16, ptr %55, align 2, !tbaa !26
  %57 = getelementptr inbounds i8, ptr %39, i64 10
  store i16 %56, ptr %57, align 2, !tbaa !28
  %58 = getelementptr inbounds i8, ptr %44, i64 32
  %59 = load i32, ptr %58, align 4, !tbaa !13
  %60 = getelementptr inbounds i8, ptr %39, i64 12
  store i32 %59, ptr %60, align 4, !tbaa !29
  %61 = getelementptr inbounds i8, ptr %44, i64 36
  %62 = load i32, ptr %61, align 4, !tbaa !13
  %63 = getelementptr inbounds i8, ptr %39, i64 16
  store i32 %62, ptr %63, align 8, !tbaa !30
  %64 = getelementptr inbounds i8, ptr %44, i64 40
  %65 = load i32, ptr %64, align 4, !tbaa !13
  %66 = getelementptr inbounds i8, ptr %39, i64 20
  store i32 %65, ptr %66, align 4, !tbaa !31
  %67 = getelementptr inbounds i8, ptr %44, i64 48
  %68 = load i32, ptr %67, align 4, !tbaa !13
  %69 = getelementptr inbounds i8, ptr %39, i64 32
  store i32 %68, ptr %69, align 8, !tbaa !32
  %70 = zext i16 %56 to i64
  %71 = mul nuw nsw i64 %70, 40
  %72 = call noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef %71, i32 noundef 196623, ptr noundef nonnull @.str.6)
  %73 = getelementptr inbounds i8, ptr %39, i64 40
  store ptr %72, ptr %73, align 8, !tbaa !33
  %74 = load i16, ptr %57, align 2, !tbaa !28
  %75 = zext i16 %74 to i32
  %.not76 = icmp eq i16 %74, 0
  br i1 %.not76, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %38
  %76 = getelementptr inbounds i8, ptr %44, i64 60
  %77 = load ptr, ptr %45, align 8, !tbaa !21
  %xtraiter = and i32 %75, 1
  %78 = icmp eq i16 %74, 1
  br i1 %78, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i32 %75, 65534
  br label %107

._crit_edge.loopexit.unr-lcssa:                   ; preds = %107, %.lr.ph
  %.lcssa.ph = phi ptr [ poison, %.lr.ph ], [ %137, %107 ]
  %.06974.unr = phi ptr [ %72, %.lr.ph ], [ %137, %107 ]
  %.07073.unr = phi ptr [ %76, %.lr.ph ], [ %135, %107 ]
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %._crit_edge.loopexit.epilog-lcssa

._crit_edge.loopexit.epilog-lcssa:                ; preds = %._crit_edge.loopexit.unr-lcssa
  %79 = load i32, ptr %.07073.unr, align 4, !tbaa !13
  store i32 %79, ptr %.06974.unr, align 8, !tbaa !34
  %80 = getelementptr inbounds i8, ptr %.07073.unr, i64 4
  %81 = load i32, ptr %80, align 4, !tbaa !13
  %82 = getelementptr inbounds i8, ptr %.06974.unr, i64 4
  store i32 %81, ptr %82, align 4, !tbaa !36
  %83 = getelementptr inbounds i8, ptr %.07073.unr, i64 8
  %84 = load i32, ptr %83, align 4, !tbaa !13
  %85 = getelementptr inbounds i8, ptr %.06974.unr, i64 8
  store i32 %84, ptr %85, align 8, !tbaa !37
  %86 = getelementptr inbounds i8, ptr %.07073.unr, i64 12
  %87 = load i32, ptr %86, align 4, !tbaa !13
  %88 = zext i32 %87 to i64
  %89 = getelementptr inbounds i8, ptr %77, i64 %88
  %90 = getelementptr inbounds i8, ptr %.06974.unr, i64 16
  store ptr %89, ptr %90, align 8, !tbaa !38
  %91 = getelementptr inbounds i8, ptr %.06974.unr, i64 32
  store i32 0, ptr %91, align 8, !tbaa !39
  %92 = getelementptr inbounds i8, ptr %.06974.unr, i64 40
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %38
  %.069.lcssa = phi ptr [ %72, %38 ], [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %92, %._crit_edge.loopexit.epilog-lcssa ]
  %93 = getelementptr inbounds i8, ptr %39, i64 48
  store ptr %.069.lcssa, ptr %93, align 8, !tbaa !40
  %94 = load i32, ptr %66, align 4, !tbaa !31
  %95 = load i32, ptr %63, align 8, !tbaa !30
  %96 = mul nsw i32 %95, %94
  %97 = sext i32 %96 to i64
  %98 = call noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef %97, i32 noundef 196623, ptr noundef nonnull @.str.7)
  %99 = getelementptr inbounds i8, ptr %39, i64 24
  store ptr %98, ptr %99, align 8, !tbaa !41
  %100 = load i32, ptr %66, align 4, !tbaa !31
  %101 = load i32, ptr %63, align 8, !tbaa !30
  %102 = mul nsw i32 %101, %100
  %103 = load ptr, ptr %0, align 8, !tbaa !23
  %104 = getelementptr inbounds i8, ptr %103, i64 32
  %105 = load ptr, ptr %104, align 8
  %106 = call noundef i32 %105(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %98, i32 noundef %102)
  br label %138

107:                                              ; preds = %107, %.lr.ph.new
  %.06974 = phi ptr [ %72, %.lr.ph.new ], [ %137, %107 ]
  %.07073 = phi ptr [ %76, %.lr.ph.new ], [ %135, %107 ]
  %niter = phi i32 [ 0, %.lr.ph.new ], [ %niter.next.1, %107 ]
  %108 = load i32, ptr %.07073, align 4, !tbaa !13
  store i32 %108, ptr %.06974, align 8, !tbaa !34
  %109 = getelementptr inbounds i8, ptr %.07073, i64 4
  %110 = load i32, ptr %109, align 4, !tbaa !13
  %111 = getelementptr inbounds i8, ptr %.06974, i64 4
  store i32 %110, ptr %111, align 4, !tbaa !36
  %112 = getelementptr inbounds i8, ptr %.07073, i64 8
  %113 = load i32, ptr %112, align 4, !tbaa !13
  %114 = getelementptr inbounds i8, ptr %.06974, i64 8
  store i32 %113, ptr %114, align 8, !tbaa !37
  %115 = getelementptr inbounds i8, ptr %.07073, i64 12
  %116 = load i32, ptr %115, align 4, !tbaa !13
  %117 = zext i32 %116 to i64
  %118 = getelementptr inbounds i8, ptr %77, i64 %117
  %119 = getelementptr inbounds i8, ptr %.06974, i64 16
  store ptr %118, ptr %119, align 8, !tbaa !38
  %120 = getelementptr inbounds i8, ptr %.07073, i64 24
  %121 = getelementptr inbounds i8, ptr %.06974, i64 32
  store i32 0, ptr %121, align 8, !tbaa !39
  %122 = getelementptr inbounds i8, ptr %.06974, i64 40
  %123 = load i32, ptr %120, align 4, !tbaa !13
  store i32 %123, ptr %122, align 8, !tbaa !34
  %124 = getelementptr inbounds i8, ptr %.07073, i64 28
  %125 = load i32, ptr %124, align 4, !tbaa !13
  %126 = getelementptr inbounds i8, ptr %.06974, i64 44
  store i32 %125, ptr %126, align 4, !tbaa !36
  %127 = getelementptr inbounds i8, ptr %.07073, i64 32
  %128 = load i32, ptr %127, align 4, !tbaa !13
  %129 = getelementptr inbounds i8, ptr %.06974, i64 48
  store i32 %128, ptr %129, align 8, !tbaa !37
  %130 = getelementptr inbounds i8, ptr %.07073, i64 36
  %131 = load i32, ptr %130, align 4, !tbaa !13
  %132 = zext i32 %131 to i64
  %133 = getelementptr inbounds i8, ptr %77, i64 %132
  %134 = getelementptr inbounds i8, ptr %.06974, i64 56
  store ptr %133, ptr %134, align 8, !tbaa !38
  %135 = getelementptr inbounds i8, ptr %.07073, i64 48
  %136 = getelementptr inbounds i8, ptr %.06974, i64 72
  store i32 0, ptr %136, align 8, !tbaa !39
  %137 = getelementptr inbounds i8, ptr %.06974, i64 80
  %niter.next.1 = add i32 %niter, 2
  %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %107, !llvm.loop !42

138:                                              ; preds = %._crit_edge, %30, %20, %11
  %.071 = phi ptr [ null, %20 ], [ null, %30 ], [ %0, %._crit_edge ], [ null, %11 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  ret ptr %.071
}

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

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

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

declare void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { cold 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, !12, i64 152}
!15 = !{!"_ZTSN2rw8GeometryE", !16, i64 0, !7, i64 16, !17, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !12, i64 40, !12, i64 48, !8, i64 56, !12, i64 120, !18, i64 128, !12, i64 144, !12, i64 152, !7, i64 160}
!16 = !{!"_ZTSN2rw6ObjectE", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !12, i64 8}
!17 = !{!"short", !8, i64 0}
!18 = !{!"_ZTSN2rw12MaterialListE", !12, i64 0, !7, i64 8, !7, i64 12}
!19 = !{!20, !7, i64 0}
!20 = !{!"_ZTSN2rw18InstanceDataHeaderE", !7, i64 0}
!21 = !{!22, !12, i64 56}
!22 = !{!"_ZTSN2rw4xbox18InstanceDataHeaderE", !20, i64 0, !7, i64 4, !17, i64 8, !17, i64 10, !7, i64 12, !7, i64 16, !7, i64 20, !12, i64 24, !7, i64 32, !12, i64 40, !12, i64 48, !12, i64 56}
!23 = !{!24, !24, i64 0}
!24 = !{!"vtable pointer", !9, i64 0}
!25 = !{!22, !7, i64 4}
!26 = !{!17, !17, i64 0}
!27 = !{!22, !17, i64 8}
!28 = !{!22, !17, i64 10}
!29 = !{!22, !7, i64 12}
!30 = !{!22, !7, i64 16}
!31 = !{!22, !7, i64 20}
!32 = !{!22, !7, i64 32}
!33 = !{!22, !12, i64 40}
!34 = !{!35, !7, i64 0}
!35 = !{!"_ZTSN2rw4xbox12InstanceDataE", !7, i64 0, !7, i64 4, !7, i64 8, !12, i64 16, !12, i64 24, !7, i64 32}
!36 = !{!35, !7, i64 4}
!37 = !{!35, !7, i64 8}
!38 = !{!35, !12, i64 16}
!39 = !{!35, !7, i64 32}
!40 = !{!22, !12, i64 48}
!41 = !{!22, !12, i64 24}
!42 = distinct !{!42, !43}
!43 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass