; LLVM IR from aap/librw :: src/ps2 (ps2)

; 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::ps2::PipeAttribute" = type { ptr, i32 }
%"struct.rw::ps2::InstMeshInfo" = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [10 x i32] }
%"struct.rw::ps2::InstanceData" = type { i32, ptr, ptr, ptr }
%"class.rw::ps2::MatPipeline" = type { %"class.rw::Pipeline", i32, i32, i32, i32, [10 x ptr], ptr, ptr, ptr, ptr }
%"class.rw::Pipeline" = type { i32, 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::MeshHeader" = type { i32, i16, i16, i32, i32 }

@_ZN2rw3ps27adcHackE = external dso_local global i8, align 1
@stderr = external global ptr, align 8
@_ZN2rw3ps29attribXYZE = external dso_local global %"struct.rw::ps2::PipeAttribute", align 8
@_ZN2rw3ps210attribXYZWE = external dso_local global %"struct.rw::ps2::PipeAttribute", align 8
@_ZN2rw3ps28attribUVE = external dso_local global %"struct.rw::ps2::PipeAttribute", align 8
@_ZN2rw3ps29attribUV2E = external dso_local global %"struct.rw::ps2::PipeAttribute", align 8
@_ZN2rw3ps210attribRGBAE = external dso_local global %"struct.rw::ps2::PipeAttribute", align 8
@_ZN2rw3ps212attribNormalE = external dso_local global %"struct.rw::ps2::PipeAttribute", align 8
@_ZN2rw3ps27markcntE = external dso_local global i32, align 4
@.str.25 = external hidden unnamed_addr constant [75 x i8], align 1
@_ZN2rw7versionE = external global i32, align 4
@.str.26 = external hidden unnamed_addr constant [60 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: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN2rw3ps211instanceXYZEPjPNS_8GeometryEPNS_4MeshEjj(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN2rw3ps210instanceUVEPjPNS_8GeometryEPNS_4MeshEjj(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN2rw3ps211instanceUV2EPjPNS_8GeometryEPNS_4MeshEjj(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN2rw3ps212instanceRGBAEPjPNS_8GeometryEPNS_4MeshEjj(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN2rw3ps214instanceNormalEPjPNS_8GeometryEPNS_4MeshEjj(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2rw3ps215getInstMeshInfoEPNS0_11MatPipelineEPNS_8GeometryEPNS_4MeshE(ptr dead_on_unwind noalias writable sret(%"struct.rw::ps2::InstMeshInfo") align 4, ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN2rw3ps2L10attribSizeEj(i32 noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2rw3ps211MatPipeline8instanceEPNS_8GeometryEPNS0_12InstanceDataEPNS_4MeshE(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #4 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.rw::ps2::InstMeshInfo", align 4
  %11 = alloca [10 x ptr], align 16
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %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 i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %26 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr %10) #5
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN2rw3ps215getInstMeshInfoEPNS0_11MatPipelineEPNS_8GeometryEPNS_4MeshE(ptr dead_on_unwind writable sret(%"struct.rw::ps2::InstMeshInfo") align 4 %10, ptr noundef %26, ptr noundef %27, ptr noundef %28)
  %29 = getelementptr inbounds %"struct.rw::ps2::InstMeshInfo", ptr %10, i32 0, i32 7
  %30 = load i32, ptr %29, align 4, !tbaa !9
  %31 = getelementptr inbounds %"struct.rw::ps2::InstMeshInfo", ptr %10, i32 0, i32 8
  %32 = load i32, ptr %31, align 4, !tbaa !12
  %33 = add i32 %30, %32
  %34 = shl i32 %33, 4
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.rw::ps2::InstanceData", ptr %35, i32 0, i32 0
  store i32 %34, ptr %36, align 8, !tbaa !13
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.rw::ps2::InstanceData", ptr %37, i32 0, i32 0
  %39 = load i32, ptr %38, align 8, !tbaa !13
  %40 = add i32 %39, 127
  store i32 %40, ptr %38, align 8, !tbaa !13
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.rw::ps2::InstanceData", ptr %41, i32 0, i32 0
  %43 = load i32, ptr %42, align 8, !tbaa !13
  %44 = zext i32 %43 to i64
  %45 = mul i64 %44, 1
  %46 = call noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef %45, i32 noundef 196623, ptr noundef @.str.25)
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.rw::ps2::InstanceData", ptr %47, i32 0, i32 1
  store ptr %46, ptr %48, align 8, !tbaa !15
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.rw::ps2::InstanceData", ptr %49, i32 0, i32 1
  %51 = load ptr, ptr %50, align 8, !tbaa !15
  %52 = ptrtoint ptr %51 to i64
  %53 = add i64 %52, 128
  %54 = sub i64 %53, 1
  %55 = and i64 %54, -128
  %56 = inttoptr i64 %55 to ptr
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.rw::ps2::InstanceData", ptr %57, i32 0, i32 2
  store ptr %56, ptr %58, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 80, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %59 = getelementptr inbounds [10 x ptr], ptr %11, i64 0, i64 0
  store ptr %59, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !17
  br label %60

60:                                               ; preds = %95, %4
  %61 = load i32, ptr %13, align 4, !tbaa !17
  %62 = zext i32 %61 to i64
  %63 = icmp ult i64 %62, 10
  br i1 %63, label %65, label %64

64:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %98

65:                                               ; preds = %60
  %66 = getelementptr inbounds %"class.rw::ps2::MatPipeline", ptr %26, i32 0, i32 5
  %67 = load i32, ptr %13, align 4, !tbaa !17
  %68 = zext i32 %67 to i64
  %69 = getelementptr inbounds [10 x ptr], ptr %66, i64 0, i64 %68
  %70 = load ptr, ptr %69, align 8, !tbaa !5
  store ptr %70, ptr %9, align 8, !tbaa !5
  %71 = icmp ne ptr %70, null
  br i1 %71, label %72, label %94

72:                                               ; preds = %65
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.rw::ps2::PipeAttribute", ptr %73, i32 0, i32 1
  %75 = load i32, ptr %74, align 8, !tbaa !18
  %76 = and i32 %75, 6
  %77 = icmp ne i32 %76, 0
  br i1 %77, label %78, label %94

78:                                               ; preds = %72
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.rw::ps2::InstanceData", ptr %79, i32 0, i32 2
  %81 = load ptr, ptr %80, align 8, !tbaa !16
  %82 = getelementptr inbounds %"struct.rw::ps2::InstMeshInfo", ptr %10, i32 0, i32 10
  %83 = load i32, ptr %13, align 4, !tbaa !17
  %84 = zext i32 %83 to i64
  %85 = getelementptr inbounds [10 x i32], ptr %82, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !17
  %87 = mul i32 %86, 16
  %88 = zext i32 %87 to i64
  %89 = getelementptr inbounds i8, ptr %81, i64 %88
  %90 = load ptr, ptr %12, align 8, !tbaa !5
  %91 = load i32, ptr %13, align 4, !tbaa !17
  %92 = zext i32 %91 to i64
  %93 = getelementptr inbounds ptr, ptr %90, i64 %92
  store ptr %89, ptr %93, align 8, !tbaa !5
  br label %94

94:                                               ; preds = %78, %72, %65
  br label %95

95:                                               ; preds = %94
  %96 = load i32, ptr %13, align 4, !tbaa !17
  %97 = add i32 %96, 1
  store i32 %97, ptr %13, align 4, !tbaa !17
  br label %60, !llvm.loop !20

98:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %99 = load i32, ptr @_ZN2rw7versionE, align 4, !tbaa !17
  %100 = icmp sge i32 %99, 217088
  %101 = zext i1 %100 to i64
  %102 = select i1 %100, i32 285212672, i32 100663296
  store i32 %102, ptr %14, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %103 = load ptr, ptr %7, align 8, !tbaa !5
  %104 = getelementptr inbounds %"struct.rw::ps2::InstanceData", ptr %103, i32 0, i32 2
  %105 = load ptr, ptr %104, align 8, !tbaa !16
  store ptr %105, ptr %16, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.rw::ps2::InstMeshInfo", ptr %10, i32 0, i32 1
  %107 = load i32, ptr %106, align 4, !tbaa !22
  %108 = icmp eq i32 %107, 0
  br i1 %108, label %109, label %123

109:                                              ; preds = %98
  %110 = getelementptr inbounds %"struct.rw::ps2::InstMeshInfo", ptr %10, i32 0, i32 7
  %111 = load i32, ptr %110, align 4, !tbaa !9
  %112 = sub i32 %111, 1
  %113 = or i32 1610612736, %112
  %114 = load ptr, ptr %16, align 8, !tbaa !5
  %115 = getelementptr inbounds i32, ptr %114, i32 1
  store ptr %115, ptr %16, align 8, !tbaa !5
  store i32 %113, ptr %114, align 4, !tbaa !17
  %116 = load ptr, ptr %16, align 8, !tbaa !5
  %117 = getelementptr inbounds i32, ptr %116, i32 1
  store ptr %117, ptr %16, align 8, !tbaa !5
  store i32 0, ptr %116, align 4, !tbaa !17
  %118 = load ptr, ptr %16, align 8, !tbaa !5
  %119 = getelementptr inbounds i32, ptr %118, i32 1
  store ptr %119, ptr %16, align 8, !tbaa !5
  store i32 285212672, ptr %118, align 4, !tbaa !17
  %120 = load i32, ptr %14, align 4, !tbaa !17
  %121 = load ptr, ptr %16, align 8, !tbaa !5
  %122 = getelementptr inbounds i32, ptr %121, i32 1
  store ptr %122, ptr %16, align 8, !tbaa !5
  store i32 %120, ptr %121, align 4, !tbaa !17
  br label %123

123:                                              ; preds = %109, %98
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !17
  br label %124

124:                                              ; preds = %473, %123
  %125 = load i32, ptr %17, align 4, !tbaa !17
  %126 = getelementptr inbounds %"struct.rw::ps2::InstMeshInfo", ptr %10, i32 0, i32 4
  %127 = load i32, ptr %126, align 4, !tbaa !23
  %128 = icmp ult i32 %125, %127
  br i1 %128, label %130, label %129

129:                                              ; preds = %124
  store i32 5, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %476

130:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %131 = load i32, ptr %17, align 4, !tbaa !17
  %132 = getelementptr inbounds %"struct.rw::ps2::InstMeshInfo", ptr %10, i32 0, i32 4
  %133 = load i32, ptr %132, align 4, !tbaa !23
  %134 = sub i32 %133, 1
  %135 = icmp ult i32 %131, %134
  br i1 %135, label %136, label %141

136:                                              ; preds = %130
  %137 = getelementptr inbounds %"struct.rw::ps2::InstMeshInfo", ptr %10, i32 0, i32 5
  %138 = load i32, ptr %137, align 4, !tbaa !24
  store i32 %138, ptr %20, align 4, !tbaa !17
  %139 = getelementptr inbounds %"struct.rw::ps2::InstMeshInfo", ptr %10, i32 0, i32 2
  %140 = load i32, ptr %139, align 4, !tbaa !25
  store i32 %140, ptr %19, align 4, !tbaa !17
  br label %146

141:                                              ; preds = %130
  %142 = getelementptr inbounds %"struct.rw::ps2::InstMeshInfo", ptr %10, i32 0, i32 6
  %143 = load i32, ptr %142, align 4, !tbaa !26
  store i32 %143, ptr %20, align 4, !tbaa !17
  %144 = getelementptr inbounds %"struct.rw::ps2::InstMeshInfo", ptr %10, i32 0, i32 3
  %145 = load i32, ptr %144, align 4, !tbaa !27
  store i32 %145, ptr %19, align 4, !tbaa !17
  br label %146

146:                                              ; preds = %141, %136
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 0, ptr %21, align 4, !tbaa !17
  br label %147

147:                                              ; preds = %269, %146
  %148 = load i32, ptr %21, align 4, !tbaa !17
  %149 = zext i32 %148 to i64
  %150 = icmp ult i64 %149, 10
  br i1 %150, label %152, label %151

151:                                              ; preds = %147
  store i32 8, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %272

152:                                              ; preds = %147
  %153 = getelementptr inbounds %"class.rw::ps2::MatPipeline", ptr %26, i32 0, i32 5
  %154 = load i32, ptr %21, align 4, !tbaa !17
  %155 = zext i32 %154 to i64
  %156 = getelementptr inbounds [10 x ptr], ptr %153, i64 0, i64 %155
  %157 = load ptr, ptr %156, align 8, !tbaa !5
  store ptr %157, ptr %9, align 8, !tbaa !5
  %158 = icmp ne ptr %157, null
  br i1 %158, label %159, label %268

159:                                              ; preds = %152
  %160 = load ptr, ptr %9, align 8, !tbaa !5
  %161 = getelementptr inbounds %"struct.rw::ps2::PipeAttribute", ptr %160, i32 0, i32 1
  %162 = load i32, ptr %161, align 8, !tbaa !18
  %163 = and i32 %162, 6
  %164 = icmp ne i32 %163, 0
  br i1 %164, label %165, label %268

165:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %166 = load ptr, ptr %9, align 8, !tbaa !5
  %167 = getelementptr inbounds %"struct.rw::ps2::PipeAttribute", ptr %166, i32 0, i32 1
  %168 = load i32, ptr %167, align 8, !tbaa !18
  %169 = call noundef i32 @_ZN2rw3ps2L10attribSizeEj(i32 noundef %168)
  store i32 %169, ptr %22, align 4, !tbaa !17
  %170 = load i32, ptr %19, align 4, !tbaa !17
  %171 = load i32, ptr %22, align 4, !tbaa !17
  %172 = mul i32 %170, %171
  %173 = add i32 %172, 15
  %174 = lshr i32 %173, 4
  %175 = or i32 805306368, %174
  %176 = load ptr, ptr %16, align 8, !tbaa !5
  %177 = getelementptr inbounds i32, ptr %176, i32 1
  store ptr %177, ptr %16, align 8, !tbaa !5
  store i32 %175, ptr %176, align 4, !tbaa !17
  %178 = getelementptr inbounds %"struct.rw::ps2::InstMeshInfo", ptr %10, i32 0, i32 10
  %179 = load i32, ptr %21, align 4, !tbaa !17
  %180 = zext i32 %179 to i64
  %181 = getelementptr inbounds [10 x i32], ptr %178, i64 0, i64 %180
  %182 = load i32, ptr %181, align 4, !tbaa !17
  %183 = load ptr, ptr %16, align 8, !tbaa !5
  %184 = getelementptr inbounds i32, ptr %183, i32 1
  store ptr %184, ptr %16, align 8, !tbaa !5
  store i32 %182, ptr %183, align 4, !tbaa !17
  %185 = getelementptr inbounds %"class.rw::ps2::MatPipeline", ptr %26, i32 0, i32 2
  %186 = load i32, ptr %185, align 8, !tbaa !28
  %187 = or i32 16777472, %186
  %188 = load ptr, ptr %16, align 8, !tbaa !5
  %189 = getelementptr inbounds i32, ptr %188, i32 1
  store ptr %189, ptr %16, align 8, !tbaa !5
  store i32 %187, ptr %188, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %190 = load i32, ptr %19, align 4, !tbaa !17
  %191 = load i32, ptr %22, align 4, !tbaa !17
  %192 = mul i32 %190, %191
  %193 = add i32 %192, 15
  %194 = lshr i32 %193, 4
  %195 = shl i32 %194, 4
  %196 = load i32, ptr %22, align 4, !tbaa !17
  %197 = udiv i32 %195, %196
  store i32 %197, ptr %23, align 4, !tbaa !17
  %198 = load ptr, ptr %9, align 8, !tbaa !5
  %199 = getelementptr inbounds %"struct.rw::ps2::PipeAttribute", ptr %198, i32 0, i32 1
  %200 = load i32, ptr %199, align 8, !tbaa !18
  %201 = and i32 %200, -16760832
  %202 = or i32 %201, 32768
  %203 = load i32, ptr %23, align 4, !tbaa !17
  %204 = shl i32 %203, 16
  %205 = or i32 %202, %204
  %206 = load i32, ptr %21, align 4, !tbaa !17
  %207 = or i32 %205, %206
  %208 = load ptr, ptr %16, align 8, !tbaa !5
  %209 = getelementptr inbounds i32, ptr %208, i32 1
  store ptr %209, ptr %16, align 8, !tbaa !5
  store i32 %207, ptr %208, align 4, !tbaa !17
  %210 = load i32, ptr %23, align 4, !tbaa !17
  %211 = getelementptr inbounds %"class.rw::ps2::MatPipeline", ptr %26, i32 0, i32 2
  %212 = load i32, ptr %211, align 8, !tbaa !28
  %213 = mul i32 %210, %212
  %214 = getelementptr inbounds %"class.rw::ps2::MatPipeline", ptr %26, i32 0, i32 1
  %215 = load i32, ptr %214, align 4, !tbaa !31
  %216 = icmp ugt i32 %213, %215
  br i1 %216, label %217, label %230

217:                                              ; preds = %165
  %218 = load ptr, ptr @stderr, align 8, !tbaa !5
  %219 = load ptr, ptr %16, align 8, !tbaa !5
  %220 = getelementptr inbounds i32, ptr %219, i64 -1
  %221 = load i32, ptr %220, align 4, !tbaa !17
  %222 = load i32, ptr %23, align 4, !tbaa !17
  %223 = load i32, ptr %23, align 4, !tbaa !17
  %224 = getelementptr inbounds %"class.rw::ps2::MatPipeline", ptr %26, i32 0, i32 2
  %225 = load i32, ptr %224, align 8, !tbaa !28
  %226 = mul i32 %223, %225
  %227 = getelementptr inbounds %"class.rw::ps2::MatPipeline", ptr %26, i32 0, i32 1
  %228 = load i32, ptr %227, align 4, !tbaa !31
  %229 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %218, ptr noundef @.str.26, i32 noundef %221, i32 noundef %222, i32 noundef %226, i32 noundef %228) #5
  br label %230

230:                                              ; preds = %217, %165
  %231 = load ptr, ptr %16, align 8, !tbaa !5
  %232 = getelementptr inbounds i32, ptr %231, i32 1
  store ptr %232, ptr %16, align 8, !tbaa !5
  store i32 268435456, ptr %231, align 4, !tbaa !17
  %233 = load ptr, ptr %16, align 8, !tbaa !5
  %234 = getelementptr inbounds i32, ptr %233, i32 1
  store ptr %234, ptr %16, align 8, !tbaa !5
  store i32 0, ptr %233, align 4, !tbaa !17
  %235 = load ptr, ptr %16, align 8, !tbaa !5
  %236 = getelementptr inbounds i32, ptr %235, i32 1
  store ptr %236, ptr %16, align 8, !tbaa !5
  store i32 0, ptr %235, align 4, !tbaa !17
  %237 = load ptr, ptr %16, align 8, !tbaa !5
  %238 = getelementptr inbounds i32, ptr %237, i32 1
  store ptr %238, ptr %16, align 8, !tbaa !5
  store i32 0, ptr %237, align 4, !tbaa !17
  %239 = load ptr, ptr %6, align 8, !tbaa !5
  %240 = getelementptr inbounds %"struct.rw::Geometry", ptr %239, i32 0, i32 12
  %241 = load ptr, ptr %240, align 8, !tbaa !32
  %242 = getelementptr inbounds %"struct.rw::MeshHeader", ptr %241, i32 0, i32 0
  %243 = load i32, ptr %242, align 4, !tbaa !37
  %244 = icmp eq i32 %243, 1
  br i1 %244, label %245, label %253

245:                                              ; preds = %230
  %246 = getelementptr inbounds %"struct.rw::ps2::InstMeshInfo", ptr %10, i32 0, i32 2
  %247 = load i32, ptr %246, align 4, !tbaa !25
  %248 = sub i32 %247, 2
  %249 = load i32, ptr %22, align 4, !tbaa !17
  %250 = mul i32 %248, %249
  %251 = add i32 %250, 15
  %252 = lshr i32 %251, 4
  br label %260

253:                                              ; preds = %230
  %254 = getelementptr inbounds %"struct.rw::ps2::InstMeshInfo", ptr %10, i32 0, i32 2
  %255 = load i32, ptr %254, align 4, !tbaa !25
  %256 = load i32, ptr %22, align 4, !tbaa !17
  %257 = mul i32 %255, %256
  %258 = add i32 %257, 15
  %259 = lshr i32 %258, 4
  br label %260

260:                                              ; preds = %253, %245
  %261 = phi i32 [ %252, %245 ], [ %259, %253 ]
  %262 = getelementptr inbounds %"struct.rw::ps2::InstMeshInfo", ptr %10, i32 0, i32 10
  %263 = load i32, ptr %21, align 4, !tbaa !17
  %264 = zext i32 %263 to i64
  %265 = getelementptr inbounds [10 x i32], ptr %262, i64 0, i64 %264
  %266 = load i32, ptr %265, align 4, !tbaa !17
  %267 = add i32 %266, %261
  store i32 %267, ptr %265, align 4, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %268

268:                                              ; preds = %260, %159, %152
  br label %269

269:                                              ; preds = %268
  %270 = load i32, ptr %21, align 4, !tbaa !17
  %271 = add i32 %270, 1
  store i32 %271, ptr %21, align 4, !tbaa !17
  br label %147, !llvm.loop !39

272:                                              ; preds = %151
  %273 = getelementptr inbounds %"struct.rw::ps2::InstMeshInfo", ptr %10, i32 0, i32 1
  %274 = load i32, ptr %273, align 4, !tbaa !22
  %275 = icmp ne i32 %274, 0
  br i1 %275, label %276, label %294

276:                                              ; preds = %272
  %277 = load i32, ptr %17, align 4, !tbaa !17
  %278 = getelementptr inbounds %"struct.rw::ps2::InstMeshInfo", ptr %10, i32 0, i32 4
  %279 = load i32, ptr %278, align 4, !tbaa !23
  %280 = sub i32 %279, 1
  %281 = icmp ult i32 %277, %280
  %282 = zext i1 %281 to i64
  %283 = select i1 %281, i32 268435456, i32 1610612736
  %284 = load i32, ptr %20, align 4, !tbaa !17
  %285 = or i32 %283, %284
  %286 = load ptr, ptr %16, align 8, !tbaa !5
  %287 = getelementptr inbounds i32, ptr %286, i32 1
  store ptr %287, ptr %16, align 8, !tbaa !5
  store i32 %285, ptr %286, align 4, !tbaa !17
  %288 = load ptr, ptr %16, align 8, !tbaa !5
  %289 = getelementptr inbounds i32, ptr %288, i32 1
  store ptr %289, ptr %16, align 8, !tbaa !5
  store i32 0, ptr %288, align 4, !tbaa !17
  %290 = load ptr, ptr %16, align 8, !tbaa !5
  %291 = getelementptr inbounds i32, ptr %290, i32 1
  store ptr %291, ptr %16, align 8, !tbaa !5
  store i32 0, ptr %290, align 4, !tbaa !17
  %292 = load ptr, ptr %16, align 8, !tbaa !5
  %293 = getelementptr inbounds i32, ptr %292, i32 1
  store ptr %293, ptr %16, align 8, !tbaa !5
  store i32 0, ptr %292, align 4, !tbaa !17
  br label %294

294:                                              ; preds = %276, %272
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 0, ptr %24, align 4, !tbaa !17
  br label %295

295:                                              ; preds = %425, %294
  %296 = load i32, ptr %24, align 4, !tbaa !17
  %297 = zext i32 %296 to i64
  %298 = icmp ult i64 %297, 10
  br i1 %298, label %300, label %299

299:                                              ; preds = %295
  store i32 11, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %428

300:                                              ; preds = %295
  %301 = getelementptr inbounds %"class.rw::ps2::MatPipeline", ptr %26, i32 0, i32 5
  %302 = load i32, ptr %24, align 4, !tbaa !17
  %303 = zext i32 %302 to i64
  %304 = getelementptr inbounds [10 x ptr], ptr %301, i64 0, i64 %303
  %305 = load ptr, ptr %304, align 8, !tbaa !5
  store ptr %305, ptr %9, align 8, !tbaa !5
  %306 = icmp ne ptr %305, null
  br i1 %306, label %307, label %424

307:                                              ; preds = %300
  %308 = load ptr, ptr %9, align 8, !tbaa !5
  %309 = getelementptr inbounds %"struct.rw::ps2::PipeAttribute", ptr %308, i32 0, i32 1
  %310 = load i32, ptr %309, align 8, !tbaa !18
  %311 = and i32 %310, 6
  %312 = icmp eq i32 %311, 0
  br i1 %312, label %313, label %424

313:                                              ; preds = %307
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %314 = load i8, ptr @_ZN2rw3ps27adcHackE, align 1, !tbaa !40, !range !42, !noundef !43
  %315 = trunc i8 %314 to i1
  br i1 %315, label %316, label %324

316:                                              ; preds = %313
  %317 = load ptr, ptr %9, align 8, !tbaa !5
  %318 = icmp eq ptr %317, @_ZN2rw3ps29attribXYZE
  br i1 %318, label %319, label %324

319:                                              ; preds = %316
  %320 = load ptr, ptr %16, align 8, !tbaa !5
  %321 = getelementptr inbounds i32, ptr %320, i32 1
  store ptr %321, ptr %16, align 8, !tbaa !5
  store i32 536870912, ptr %320, align 4, !tbaa !17
  %322 = load ptr, ptr %16, align 8, !tbaa !5
  %323 = getelementptr inbounds i32, ptr %322, i32 1
  store ptr %323, ptr %16, align 8, !tbaa !5
  store i32 64, ptr %322, align 4, !tbaa !17
  store i32 268435456, ptr %25, align 4, !tbaa !17
  br label %339

324:                                              ; preds = %316, %313
  %325 = load i32, ptr @_ZN2rw7versionE, align 4, !tbaa !17
  %326 = icmp sge i32 %325, 217088
  br i1 %326, label %327, label %330

327:                                              ; preds = %324
  %328 = load ptr, ptr %16, align 8, !tbaa !5
  %329 = getelementptr inbounds i32, ptr %328, i32 1
  store ptr %329, ptr %16, align 8, !tbaa !5
  store i32 0, ptr %328, align 4, !tbaa !17
  br label %336

330:                                              ; preds = %324
  %331 = load i32, ptr @_ZN2rw3ps27markcntE, align 4, !tbaa !17
  %332 = add i32 %331, 1
  store i32 %332, ptr @_ZN2rw3ps27markcntE, align 4, !tbaa !17
  %333 = or i32 117440512, %331
  %334 = load ptr, ptr %16, align 8, !tbaa !5
  %335 = getelementptr inbounds i32, ptr %334, i32 1
  store ptr %335, ptr %16, align 8, !tbaa !5
  store i32 %333, ptr %334, align 4, !tbaa !17
  br label %336

336:                                              ; preds = %330, %327
  %337 = load ptr, ptr %16, align 8, !tbaa !5
  %338 = getelementptr inbounds i32, ptr %337, i32 1
  store ptr %338, ptr %16, align 8, !tbaa !5
  store i32 83886080, ptr %337, align 4, !tbaa !17
  store i32 0, ptr %25, align 4, !tbaa !17
  br label %339

339:                                              ; preds = %336, %319
  %340 = getelementptr inbounds %"class.rw::ps2::MatPipeline", ptr %26, i32 0, i32 2
  %341 = load i32, ptr %340, align 8, !tbaa !28
  %342 = or i32 16777472, %341
  %343 = load ptr, ptr %16, align 8, !tbaa !5
  %344 = getelementptr inbounds i32, ptr %343, i32 1
  store ptr %344, ptr %16, align 8, !tbaa !5
  store i32 %342, ptr %343, align 4, !tbaa !17
  %345 = load ptr, ptr %9, align 8, !tbaa !5
  %346 = getelementptr inbounds %"struct.rw::ps2::PipeAttribute", ptr %345, i32 0, i32 1
  %347 = load i32, ptr %346, align 8, !tbaa !18
  %348 = and i32 %347, -16760832
  %349 = load i32, ptr %25, align 4, !tbaa !17
  %350 = or i32 %348, %349
  %351 = or i32 %350, 32768
  %352 = load i32, ptr %19, align 4, !tbaa !17
  %353 = shl i32 %352, 16
  %354 = or i32 %351, %353
  %355 = load i32, ptr %24, align 4, !tbaa !17
  %356 = or i32 %354, %355
  %357 = load ptr, ptr %16, align 8, !tbaa !5
  %358 = getelementptr inbounds i32, ptr %357, i32 1
  store ptr %358, ptr %16, align 8, !tbaa !5
  store i32 %356, ptr %357, align 4, !tbaa !17
  %359 = load ptr, ptr %9, align 8, !tbaa !5
  %360 = icmp eq ptr %359, @_ZN2rw3ps29attribXYZE
  br i1 %360, label %361, label %368

361:                                              ; preds = %339
  %362 = load ptr, ptr %16, align 8, !tbaa !5
  %363 = load ptr, ptr %6, align 8, !tbaa !5
  %364 = load ptr, ptr %8, align 8, !tbaa !5
  %365 = load i32, ptr %15, align 4, !tbaa !17
  %366 = load i32, ptr %19, align 4, !tbaa !17
  %367 = call noundef ptr @_ZN2rw3ps211instanceXYZEPjPNS_8GeometryEPNS_4MeshEjj(ptr noundef %362, ptr noundef %363, ptr noundef %364, i32 noundef %365, i32 noundef %366)
  store ptr %367, ptr %16, align 8, !tbaa !5
  br label %423

368:                                              ; preds = %339
  %369 = load ptr, ptr %9, align 8, !tbaa !5
  %370 = icmp eq ptr %369, @_ZN2rw3ps210attribXYZWE
  br i1 %370, label %371, label %378

371:                                              ; preds = %368
  %372 = load ptr, ptr %16, align 8, !tbaa !5
  %373 = load ptr, ptr %6, align 8, !tbaa !5
  %374 = load ptr, ptr %8, align 8, !tbaa !5
  %375 = load i32, ptr %15, align 4, !tbaa !17
  %376 = load i32, ptr %19, align 4, !tbaa !17
  %377 = call noundef ptr @_ZN2rw3ps212instanceXYZWEPjPNS_8GeometryEPNS_4MeshEjj(ptr noundef %372, ptr noundef %373, ptr noundef %374, i32 noundef %375, i32 noundef %376)
  store ptr %377, ptr %16, align 8, !tbaa !5
  br label %422

378:                                              ; preds = %368
  %379 = load ptr, ptr %9, align 8, !tbaa !5
  %380 = icmp eq ptr %379, @_ZN2rw3ps28attribUVE
  br i1 %380, label %381, label %388

381:                                              ; preds = %378
  %382 = load ptr, ptr %16, align 8, !tbaa !5
  %383 = load ptr, ptr %6, align 8, !tbaa !5
  %384 = load ptr, ptr %8, align 8, !tbaa !5
  %385 = load i32, ptr %15, align 4, !tbaa !17
  %386 = load i32, ptr %19, align 4, !tbaa !17
  %387 = call noundef ptr @_ZN2rw3ps210instanceUVEPjPNS_8GeometryEPNS_4MeshEjj(ptr noundef %382, ptr noundef %383, ptr noundef %384, i32 noundef %385, i32 noundef %386)
  store ptr %387, ptr %16, align 8, !tbaa !5
  br label %421

388:                                              ; preds = %378
  %389 = load ptr, ptr %9, align 8, !tbaa !5
  %390 = icmp eq ptr %389, @_ZN2rw3ps29attribUV2E
  br i1 %390, label %391, label %398

391:                                              ; preds = %388
  %392 = load ptr, ptr %16, align 8, !tbaa !5
  %393 = load ptr, ptr %6, align 8, !tbaa !5
  %394 = load ptr, ptr %8, align 8, !tbaa !5
  %395 = load i32, ptr %15, align 4, !tbaa !17
  %396 = load i32, ptr %19, align 4, !tbaa !17
  %397 = call noundef ptr @_ZN2rw3ps211instanceUV2EPjPNS_8GeometryEPNS_4MeshEjj(ptr noundef %392, ptr noundef %393, ptr noundef %394, i32 noundef %395, i32 noundef %396)
  store ptr %397, ptr %16, align 8, !tbaa !5
  br label %420

398:                                              ; preds = %388
  %399 = load ptr, ptr %9, align 8, !tbaa !5
  %400 = icmp eq ptr %399, @_ZN2rw3ps210attribRGBAE
  br i1 %400, label %401, label %408

401:                                              ; preds = %398
  %402 = load ptr, ptr %16, align 8, !tbaa !5
  %403 = load ptr, ptr %6, align 8, !tbaa !5
  %404 = load ptr, ptr %8, align 8, !tbaa !5
  %405 = load i32, ptr %15, align 4, !tbaa !17
  %406 = load i32, ptr %19, align 4, !tbaa !17
  %407 = call noundef ptr @_ZN2rw3ps212instanceRGBAEPjPNS_8GeometryEPNS_4MeshEjj(ptr noundef %402, ptr noundef %403, ptr noundef %404, i32 noundef %405, i32 noundef %406)
  store ptr %407, ptr %16, align 8, !tbaa !5
  br label %419

408:                                              ; preds = %398
  %409 = load ptr, ptr %9, align 8, !tbaa !5
  %410 = icmp eq ptr %409, @_ZN2rw3ps212attribNormalE
  br i1 %410, label %411, label %418

411:                                              ; preds = %408
  %412 = load ptr, ptr %16, align 8, !tbaa !5
  %413 = load ptr, ptr %6, align 8, !tbaa !5
  %414 = load ptr, ptr %8, align 8, !tbaa !5
  %415 = load i32, ptr %15, align 4, !tbaa !17
  %416 = load i32, ptr %19, align 4, !tbaa !17
  %417 = call noundef ptr @_ZN2rw3ps214instanceNormalEPjPNS_8GeometryEPNS_4MeshEjj(ptr noundef %412, ptr noundef %413, ptr noundef %414, i32 noundef %415, i32 noundef %416)
  store ptr %417, ptr %16, align 8, !tbaa !5
  br label %418

418:                                              ; preds = %411, %408
  br label %419

419:                                              ; preds = %418, %401
  br label %420

420:                                              ; preds = %419, %391
  br label %421

421:                                              ; preds = %420, %381
  br label %422

422:                                              ; preds = %421, %371
  br label %423

423:                                              ; preds = %422, %361
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %424

424:                                              ; preds = %423, %307, %300
  br label %425

425:                                              ; preds = %424
  %426 = load i32, ptr %24, align 4, !tbaa !17
  %427 = add i32 %426, 1
  store i32 %427, ptr %24, align 4, !tbaa !17
  br label %295, !llvm.loop !44

428:                                              ; preds = %299
  %429 = load ptr, ptr %6, align 8, !tbaa !5
  %430 = getelementptr inbounds %"struct.rw::Geometry", ptr %429, i32 0, i32 12
  %431 = load ptr, ptr %430, align 8, !tbaa !32
  %432 = getelementptr inbounds %"struct.rw::MeshHeader", ptr %431, i32 0, i32 0
  %433 = load i32, ptr %432, align 4, !tbaa !37
  %434 = icmp eq i32 %433, 1
  br i1 %434, label %435, label %439

435:                                              ; preds = %428
  %436 = getelementptr inbounds %"struct.rw::ps2::InstMeshInfo", ptr %10, i32 0, i32 2
  %437 = load i32, ptr %436, align 4, !tbaa !25
  %438 = sub i32 %437, 2
  br label %442

439:                                              ; preds = %428
  %440 = getelementptr inbounds %"struct.rw::ps2::InstMeshInfo", ptr %10, i32 0, i32 2
  %441 = load i32, ptr %440, align 4, !tbaa !25
  br label %442

442:                                              ; preds = %439, %435
  %443 = phi i32 [ %438, %435 ], [ %441, %439 ]
  %444 = load i32, ptr %15, align 4, !tbaa !17
  %445 = add i32 %444, %443
  store i32 %445, ptr %15, align 4, !tbaa !17
  %446 = load i32, ptr %19, align 4, !tbaa !17
  %447 = or i32 67108864, %446
  %448 = load ptr, ptr %16, align 8, !tbaa !5
  %449 = getelementptr inbounds i32, ptr %448, i32 1
  store ptr %449, ptr %16, align 8, !tbaa !5
  store i32 %447, ptr %448, align 4, !tbaa !17
  %450 = load i32, ptr %17, align 4, !tbaa !17
  %451 = icmp eq i32 %450, 0
  %452 = zext i1 %451 to i64
  %453 = select i1 %451, i32 352321536, i32 385875968
  %454 = load ptr, ptr %16, align 8, !tbaa !5
  %455 = getelementptr inbounds i32, ptr %454, i32 1
  store ptr %455, ptr %16, align 8, !tbaa !5
  store i32 %453, ptr %454, align 4, !tbaa !17
  %456 = load i32, ptr %17, align 4, !tbaa !17
  %457 = getelementptr inbounds %"struct.rw::ps2::InstMeshInfo", ptr %10, i32 0, i32 4
  %458 = load i32, ptr %457, align 4, !tbaa !23
  %459 = sub i32 %458, 1
  %460 = icmp ult i32 %456, %459
  br i1 %460, label %461, label %466

461:                                              ; preds = %442
  %462 = load ptr, ptr %16, align 8, !tbaa !5
  %463 = getelementptr inbounds i32, ptr %462, i32 1
  store ptr %463, ptr %16, align 8, !tbaa !5
  store i32 0, ptr %462, align 4, !tbaa !17
  %464 = load ptr, ptr %16, align 8, !tbaa !5
  %465 = getelementptr inbounds i32, ptr %464, i32 1
  store ptr %465, ptr %16, align 8, !tbaa !5
  store i32 0, ptr %464, align 4, !tbaa !17
  br label %472

466:                                              ; preds = %442
  %467 = load ptr, ptr %16, align 8, !tbaa !5
  %468 = getelementptr inbounds i32, ptr %467, i32 1
  store ptr %468, ptr %16, align 8, !tbaa !5
  store i32 285212672, ptr %467, align 4, !tbaa !17
  %469 = load i32, ptr %14, align 4, !tbaa !17
  %470 = load ptr, ptr %16, align 8, !tbaa !5
  %471 = getelementptr inbounds i32, ptr %470, i32 1
  store ptr %471, ptr %16, align 8, !tbaa !5
  store i32 %469, ptr %470, align 4, !tbaa !17
  br label %472

472:                                              ; preds = %466, %461
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %473

473:                                              ; preds = %472
  %474 = load i32, ptr %17, align 4, !tbaa !17
  %475 = add i32 %474, 1
  store i32 %475, ptr %17, align 4, !tbaa !17
  br label %124, !llvm.loop !45

476:                                              ; preds = %129
  %477 = getelementptr inbounds %"class.rw::ps2::MatPipeline", ptr %26, i32 0, i32 6
  %478 = load ptr, ptr %477, align 8, !tbaa !46
  %479 = icmp ne ptr %478, null
  br i1 %479, label %480, label %486

480:                                              ; preds = %476
  %481 = getelementptr inbounds %"class.rw::ps2::MatPipeline", ptr %26, i32 0, i32 6
  %482 = load ptr, ptr %481, align 8, !tbaa !46
  %483 = load ptr, ptr %6, align 8, !tbaa !5
  %484 = load ptr, ptr %8, align 8, !tbaa !5
  %485 = getelementptr inbounds [10 x ptr], ptr %11, i64 0, i64 0
  call void %482(ptr noundef %26, ptr noundef %483, ptr noundef %484, ptr noundef %485)
  br label %486

486:                                              ; preds = %480, %476
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  ret void
}

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


; 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::ps2::PipeAttribute" = type { ptr, i32 }
%"struct.rw::ps2::InstMeshInfo" = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [10 x i32] }

@_ZN2rw3ps27adcHackE = external dso_local local_unnamed_addr global i8, align 1
@stderr = external local_unnamed_addr global ptr, align 8
@_ZN2rw3ps29attribXYZE = external dso_local global %"struct.rw::ps2::PipeAttribute", align 8
@_ZN2rw3ps210attribXYZWE = external dso_local global %"struct.rw::ps2::PipeAttribute", align 8
@_ZN2rw3ps28attribUVE = external dso_local global %"struct.rw::ps2::PipeAttribute", align 8
@_ZN2rw3ps29attribUV2E = external dso_local global %"struct.rw::ps2::PipeAttribute", align 8
@_ZN2rw3ps210attribRGBAE = external dso_local global %"struct.rw::ps2::PipeAttribute", align 8
@_ZN2rw3ps212attribNormalE = external dso_local global %"struct.rw::ps2::PipeAttribute", align 8
@_ZN2rw3ps27markcntE = external dso_local local_unnamed_addr global i32, align 4
@.str.25 = external hidden unnamed_addr constant [75 x i8], align 1
@_ZN2rw7versionE = external local_unnamed_addr global i32, align 4
@.str.26 = external hidden unnamed_addr constant [60 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: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN2rw3ps211instanceXYZEPjPNS_8GeometryEPNS_4MeshEjj(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN2rw3ps210instanceUVEPjPNS_8GeometryEPNS_4MeshEjj(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN2rw3ps211instanceUV2EPjPNS_8GeometryEPNS_4MeshEjj(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN2rw3ps212instanceRGBAEPjPNS_8GeometryEPNS_4MeshEjj(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN2rw3ps214instanceNormalEPjPNS_8GeometryEPNS_4MeshEjj(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2rw3ps215getInstMeshInfoEPNS0_11MatPipelineEPNS_8GeometryEPNS_4MeshE(ptr dead_on_unwind noalias writable sret(%"struct.rw::ps2::InstMeshInfo") align 4, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN2rw3ps2L10attribSizeEj(i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2rw3ps211MatPipeline8instanceEPNS_8GeometryEPNS0_12InstanceDataEPNS_4MeshE(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef %1, ptr nocapture noundef writeonly %2, ptr noundef %3) local_unnamed_addr #4 align 2 {
  %5 = alloca %"struct.rw::ps2::InstMeshInfo", align 4
  %6 = alloca [10 x ptr], align 16
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %5) #5
  call void @_ZN2rw3ps215getInstMeshInfoEPNS0_11MatPipelineEPNS_8GeometryEPNS_4MeshE(ptr dead_on_unwind nonnull writable sret(%"struct.rw::ps2::InstMeshInfo") align 4 %5, ptr noundef nonnull %0, ptr noundef %1, ptr noundef %3)
  %7 = getelementptr inbounds i8, ptr %5, i64 28
  %8 = load i32, ptr %7, align 4, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %5, i64 32
  %10 = load i32, ptr %9, align 4, !tbaa !10
  %11 = add i32 %10, %8
  %12 = shl i32 %11, 4
  %13 = add i32 %12, 127
  store i32 %13, ptr %2, align 8, !tbaa !11
  %14 = zext i32 %13 to i64
  %15 = call noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef %14, i32 noundef 196623, ptr noundef nonnull @.str.25)
  %16 = getelementptr inbounds i8, ptr %2, i64 8
  store ptr %15, ptr %16, align 8, !tbaa !14
  %17 = ptrtoint ptr %15 to i64
  %18 = add i64 %17, 127
  %19 = and i64 %18, -128
  %20 = inttoptr i64 %19 to ptr
  %21 = getelementptr inbounds i8, ptr %2, i64 16
  store ptr %20, ptr %21, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %6) #5
  %22 = getelementptr inbounds i8, ptr %0, i64 32
  %23 = getelementptr inbounds i8, ptr %5, i64 40
  %24 = load ptr, ptr %22, align 8, !tbaa !16
  %.not150 = icmp eq ptr %24, null
  br i1 %.not150, label %34, label %25

25:                                               ; preds = %4
  %26 = getelementptr inbounds i8, ptr %24, i64 8
  %27 = load i32, ptr %26, align 8, !tbaa !17
  %28 = and i32 %27, 6
  %.not151 = icmp eq i32 %28, 0
  br i1 %.not151, label %34, label %29

29:                                               ; preds = %25
  %30 = load i32, ptr %23, align 4, !tbaa !19
  %31 = shl i32 %30, 4
  %32 = zext i32 %31 to i64
  %33 = getelementptr inbounds i8, ptr %20, i64 %32
  store ptr %33, ptr %6, align 16, !tbaa !16
  br label %34

34:                                               ; preds = %4, %25, %29
  %35 = getelementptr inbounds i8, ptr %0, i64 40
  %36 = load ptr, ptr %35, align 8, !tbaa !16
  %.not150.1 = icmp eq ptr %36, null
  br i1 %.not150.1, label %48, label %37

37:                                               ; preds = %34
  %38 = getelementptr inbounds i8, ptr %36, i64 8
  %39 = load i32, ptr %38, align 8, !tbaa !17
  %40 = and i32 %39, 6
  %.not151.1 = icmp eq i32 %40, 0
  br i1 %.not151.1, label %48, label %41

41:                                               ; preds = %37
  %42 = getelementptr inbounds i8, ptr %5, i64 44
  %43 = load i32, ptr %42, align 4, !tbaa !19
  %44 = shl i32 %43, 4
  %45 = zext i32 %44 to i64
  %46 = getelementptr inbounds i8, ptr %20, i64 %45
  %47 = getelementptr inbounds i8, ptr %6, i64 8
  store ptr %46, ptr %47, align 8, !tbaa !16
  br label %48

48:                                               ; preds = %41, %37, %34
  %49 = getelementptr inbounds i8, ptr %0, i64 48
  %50 = load ptr, ptr %49, align 8, !tbaa !16
  %.not150.2 = icmp eq ptr %50, null
  br i1 %.not150.2, label %62, label %51

51:                                               ; preds = %48
  %52 = getelementptr inbounds i8, ptr %50, i64 8
  %53 = load i32, ptr %52, align 8, !tbaa !17
  %54 = and i32 %53, 6
  %.not151.2 = icmp eq i32 %54, 0
  br i1 %.not151.2, label %62, label %55

55:                                               ; preds = %51
  %56 = getelementptr inbounds i8, ptr %5, i64 48
  %57 = load i32, ptr %56, align 4, !tbaa !19
  %58 = shl i32 %57, 4
  %59 = zext i32 %58 to i64
  %60 = getelementptr inbounds i8, ptr %20, i64 %59
  %61 = getelementptr inbounds i8, ptr %6, i64 16
  store ptr %60, ptr %61, align 16, !tbaa !16
  br label %62

62:                                               ; preds = %55, %51, %48
  %63 = getelementptr inbounds i8, ptr %0, i64 56
  %64 = load ptr, ptr %63, align 8, !tbaa !16
  %.not150.3 = icmp eq ptr %64, null
  br i1 %.not150.3, label %76, label %65

65:                                               ; preds = %62
  %66 = getelementptr inbounds i8, ptr %64, i64 8
  %67 = load i32, ptr %66, align 8, !tbaa !17
  %68 = and i32 %67, 6
  %.not151.3 = icmp eq i32 %68, 0
  br i1 %.not151.3, label %76, label %69

69:                                               ; preds = %65
  %70 = getelementptr inbounds i8, ptr %5, i64 52
  %71 = load i32, ptr %70, align 4, !tbaa !19
  %72 = shl i32 %71, 4
  %73 = zext i32 %72 to i64
  %74 = getelementptr inbounds i8, ptr %20, i64 %73
  %75 = getelementptr inbounds i8, ptr %6, i64 24
  store ptr %74, ptr %75, align 8, !tbaa !16
  br label %76

76:                                               ; preds = %69, %65, %62
  %77 = getelementptr inbounds i8, ptr %0, i64 64
  %78 = load ptr, ptr %77, align 8, !tbaa !16
  %.not150.4 = icmp eq ptr %78, null
  br i1 %.not150.4, label %90, label %79

79:                                               ; preds = %76
  %80 = getelementptr inbounds i8, ptr %78, i64 8
  %81 = load i32, ptr %80, align 8, !tbaa !17
  %82 = and i32 %81, 6
  %.not151.4 = icmp eq i32 %82, 0
  br i1 %.not151.4, label %90, label %83

83:                                               ; preds = %79
  %84 = getelementptr inbounds i8, ptr %5, i64 56
  %85 = load i32, ptr %84, align 4, !tbaa !19
  %86 = shl i32 %85, 4
  %87 = zext i32 %86 to i64
  %88 = getelementptr inbounds i8, ptr %20, i64 %87
  %89 = getelementptr inbounds i8, ptr %6, i64 32
  store ptr %88, ptr %89, align 16, !tbaa !16
  br label %90

90:                                               ; preds = %83, %79, %76
  %91 = getelementptr inbounds i8, ptr %0, i64 72
  %92 = load ptr, ptr %91, align 8, !tbaa !16
  %.not150.5 = icmp eq ptr %92, null
  br i1 %.not150.5, label %104, label %93

93:                                               ; preds = %90
  %94 = getelementptr inbounds i8, ptr %92, i64 8
  %95 = load i32, ptr %94, align 8, !tbaa !17
  %96 = and i32 %95, 6
  %.not151.5 = icmp eq i32 %96, 0
  br i1 %.not151.5, label %104, label %97

97:                                               ; preds = %93
  %98 = getelementptr inbounds i8, ptr %5, i64 60
  %99 = load i32, ptr %98, align 4, !tbaa !19
  %100 = shl i32 %99, 4
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds i8, ptr %20, i64 %101
  %103 = getelementptr inbounds i8, ptr %6, i64 40
  store ptr %102, ptr %103, align 8, !tbaa !16
  br label %104

104:                                              ; preds = %97, %93, %90
  %105 = getelementptr inbounds i8, ptr %0, i64 80
  %106 = load ptr, ptr %105, align 8, !tbaa !16
  %.not150.6 = icmp eq ptr %106, null
  br i1 %.not150.6, label %118, label %107

107:                                              ; preds = %104
  %108 = getelementptr inbounds i8, ptr %106, i64 8
  %109 = load i32, ptr %108, align 8, !tbaa !17
  %110 = and i32 %109, 6
  %.not151.6 = icmp eq i32 %110, 0
  br i1 %.not151.6, label %118, label %111

111:                                              ; preds = %107
  %112 = getelementptr inbounds i8, ptr %5, i64 64
  %113 = load i32, ptr %112, align 4, !tbaa !19
  %114 = shl i32 %113, 4
  %115 = zext i32 %114 to i64
  %116 = getelementptr inbounds i8, ptr %20, i64 %115
  %117 = getelementptr inbounds i8, ptr %6, i64 48
  store ptr %116, ptr %117, align 16, !tbaa !16
  br label %118

118:                                              ; preds = %111, %107, %104
  %119 = getelementptr inbounds i8, ptr %0, i64 88
  %120 = load ptr, ptr %119, align 8, !tbaa !16
  %.not150.7 = icmp eq ptr %120, null
  br i1 %.not150.7, label %132, label %121

121:                                              ; preds = %118
  %122 = getelementptr inbounds i8, ptr %120, i64 8
  %123 = load i32, ptr %122, align 8, !tbaa !17
  %124 = and i32 %123, 6
  %.not151.7 = icmp eq i32 %124, 0
  br i1 %.not151.7, label %132, label %125

125:                                              ; preds = %121
  %126 = getelementptr inbounds i8, ptr %5, i64 68
  %127 = load i32, ptr %126, align 4, !tbaa !19
  %128 = shl i32 %127, 4
  %129 = zext i32 %128 to i64
  %130 = getelementptr inbounds i8, ptr %20, i64 %129
  %131 = getelementptr inbounds i8, ptr %6, i64 56
  store ptr %130, ptr %131, align 8, !tbaa !16
  br label %132

132:                                              ; preds = %125, %121, %118
  %133 = getelementptr inbounds i8, ptr %0, i64 96
  %134 = load ptr, ptr %133, align 8, !tbaa !16
  %.not150.8 = icmp eq ptr %134, null
  br i1 %.not150.8, label %146, label %135

135:                                              ; preds = %132
  %136 = getelementptr inbounds i8, ptr %134, i64 8
  %137 = load i32, ptr %136, align 8, !tbaa !17
  %138 = and i32 %137, 6
  %.not151.8 = icmp eq i32 %138, 0
  br i1 %.not151.8, label %146, label %139

139:                                              ; preds = %135
  %140 = getelementptr inbounds i8, ptr %5, i64 72
  %141 = load i32, ptr %140, align 4, !tbaa !19
  %142 = shl i32 %141, 4
  %143 = zext i32 %142 to i64
  %144 = getelementptr inbounds i8, ptr %20, i64 %143
  %145 = getelementptr inbounds i8, ptr %6, i64 64
  store ptr %144, ptr %145, align 16, !tbaa !16
  br label %146

146:                                              ; preds = %139, %135, %132
  %147 = getelementptr inbounds i8, ptr %0, i64 104
  %148 = load ptr, ptr %147, align 8, !tbaa !16
  %.not150.9 = icmp eq ptr %148, null
  br i1 %.not150.9, label %160, label %149

149:                                              ; preds = %146
  %150 = getelementptr inbounds i8, ptr %148, i64 8
  %151 = load i32, ptr %150, align 8, !tbaa !17
  %152 = and i32 %151, 6
  %.not151.9 = icmp eq i32 %152, 0
  br i1 %.not151.9, label %160, label %153

153:                                              ; preds = %149
  %154 = getelementptr inbounds i8, ptr %5, i64 76
  %155 = load i32, ptr %154, align 4, !tbaa !19
  %156 = shl i32 %155, 4
  %157 = zext i32 %156 to i64
  %158 = getelementptr inbounds i8, ptr %20, i64 %157
  %159 = getelementptr inbounds i8, ptr %6, i64 72
  store ptr %158, ptr %159, align 8, !tbaa !16
  br label %160

160:                                              ; preds = %153, %149, %146
  %161 = load i32, ptr @_ZN2rw7versionE, align 4, !tbaa !19
  %162 = icmp sgt i32 %161, 217087
  %163 = select i1 %162, i32 285212672, i32 100663296
  %164 = getelementptr inbounds i8, ptr %5, i64 4
  %165 = load i32, ptr %164, align 4, !tbaa !20
  %166 = icmp eq i32 %165, 0
  br i1 %166, label %167, label %175

167:                                              ; preds = %160
  %168 = load i32, ptr %7, align 4, !tbaa !5
  %169 = add i32 %168, -1
  %170 = or i32 %169, 1610612736
  %171 = getelementptr inbounds i8, ptr %20, i64 4
  store i32 %170, ptr %20, align 128, !tbaa !19
  %172 = getelementptr inbounds i8, ptr %20, i64 8
  store i32 0, ptr %171, align 4, !tbaa !19
  %173 = getelementptr inbounds i8, ptr %20, i64 12
  store i32 285212672, ptr %172, align 8, !tbaa !19
  %174 = getelementptr inbounds i8, ptr %20, i64 16
  store i32 %163, ptr %173, align 4, !tbaa !19
  br label %175

175:                                              ; preds = %167, %160
  %.0134 = phi ptr [ %174, %167 ], [ %20, %160 ]
  %176 = getelementptr inbounds i8, ptr %5, i64 16
  %177 = load i32, ptr %176, align 4, !tbaa !21
  %.not160 = icmp eq i32 %177, 0
  br i1 %.not160, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %175
  %178 = getelementptr inbounds i8, ptr %5, i64 20
  %179 = getelementptr inbounds i8, ptr %5, i64 8
  %180 = getelementptr inbounds i8, ptr %5, i64 24
  %181 = getelementptr inbounds i8, ptr %5, i64 12
  %182 = getelementptr inbounds i8, ptr %0, i64 16
  %183 = getelementptr inbounds i8, ptr %0, i64 12
  %184 = getelementptr inbounds i8, ptr %1, i64 144
  br label %187

._crit_edge:                                      ; preds = %257, %175
  %185 = getelementptr inbounds i8, ptr %0, i64 112
  %186 = load ptr, ptr %185, align 8, !tbaa !22
  %.not = icmp eq ptr %186, null
  br i1 %.not, label %332, label %331

187:                                              ; preds = %.lr.ph, %257
  %188 = phi i32 [ %177, %.lr.ph ], [ %275, %257 ]
  %.0133159 = phi i32 [ 0, %.lr.ph ], [ %274, %257 ]
  %.1158 = phi ptr [ %.0134, %.lr.ph ], [ %.10, %257 ]
  %.0135157 = phi i32 [ 0, %.lr.ph ], [ %264, %257 ]
  %189 = add i32 %188, -1
  %190 = icmp ult i32 %.0133159, %189
  %191 = load i32, ptr %178, align 4
  %192 = load i32, ptr %179, align 4
  %193 = load i32, ptr %180, align 4
  %194 = load i32, ptr %181, align 4
  %.0132 = select i1 %190, i32 %192, i32 %194
  br label %197

195:                                              ; preds = %244
  %196 = load i32, ptr %164, align 4, !tbaa !20
  %.not146 = icmp eq i32 %196, 0
  br i1 %.not146, label %255, label %245

197:                                              ; preds = %187, %244
  %indvars.iv = phi i64 [ 0, %187 ], [ %indvars.iv.next, %244 ]
  %.2153 = phi ptr [ %.1158, %187 ], [ %.3, %244 ]
  %198 = getelementptr inbounds [10 x ptr], ptr %22, i64 0, i64 %indvars.iv
  %199 = load ptr, ptr %198, align 8, !tbaa !16
  %.not148 = icmp eq ptr %199, null
  br i1 %.not148, label %244, label %200

200:                                              ; preds = %197
  %201 = getelementptr inbounds i8, ptr %199, i64 8
  %202 = load i32, ptr %201, align 8, !tbaa !17
  %203 = and i32 %202, 6
  %.not149 = icmp eq i32 %203, 0
  br i1 %.not149, label %244, label %204

204:                                              ; preds = %200
  %205 = call noundef i32 @_ZN2rw3ps2L10attribSizeEj(i32 noundef %202)
  %206 = mul i32 %205, %.0132
  %207 = add i32 %206, 15
  %208 = lshr i32 %207, 4
  %209 = or disjoint i32 %208, 805306368
  %210 = getelementptr inbounds i8, ptr %.2153, i64 4
  store i32 %209, ptr %.2153, align 4, !tbaa !19
  %211 = getelementptr inbounds [10 x i32], ptr %23, i64 0, i64 %indvars.iv
  %212 = load i32, ptr %211, align 4, !tbaa !19
  %213 = getelementptr inbounds i8, ptr %.2153, i64 8
  store i32 %212, ptr %210, align 4, !tbaa !19
  %214 = load i32, ptr %182, align 8, !tbaa !25
  %215 = or i32 %214, 16777472
  %216 = getelementptr inbounds i8, ptr %.2153, i64 12
  store i32 %215, ptr %213, align 4, !tbaa !19
  %217 = and i32 %207, -16
  %218 = udiv i32 %217, %205
  %219 = load i32, ptr %201, align 8, !tbaa !17
  %220 = and i32 %219, -16760832
  %221 = shl i32 %218, 16
  %222 = or i32 %221, %220
  %223 = trunc nuw nsw i64 %indvars.iv to i32
  %224 = or i32 %222, %223
  %225 = or i32 %224, 32768
  %226 = getelementptr inbounds i8, ptr %.2153, i64 16
  store i32 %225, ptr %216, align 4, !tbaa !19
  %227 = load i32, ptr %182, align 8, !tbaa !25
  %228 = mul i32 %227, %218
  %229 = load i32, ptr %183, align 4, !tbaa !26
  %230 = icmp ugt i32 %228, %229
  br i1 %230, label %231, label %234

231:                                              ; preds = %204
  %232 = load ptr, ptr @stderr, align 8, !tbaa !16
  %233 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %232, ptr noundef nonnull @.str.26, i32 noundef %225, i32 noundef %218, i32 noundef %228, i32 noundef %229) #6
  br label %234

234:                                              ; preds = %231, %204
  %235 = getelementptr inbounds i8, ptr %.2153, i64 32
  store <4 x i32> <i32 268435456, i32 0, i32 0, i32 0>, ptr %226, align 4, !tbaa !19
  %236 = load ptr, ptr %184, align 8, !tbaa !27
  %237 = load i32, ptr %236, align 4, !tbaa !32
  %238 = icmp eq i32 %237, 1
  %239 = load i32, ptr %179, align 4
  %240 = add i32 %239, -2
  %.pn = select i1 %238, i32 %240, i32 %239
  %.in.in = mul i32 %.pn, %205
  %.in = add i32 %.in.in, 15
  %241 = lshr i32 %.in, 4
  %242 = load i32, ptr %211, align 4, !tbaa !19
  %243 = add i32 %241, %242
  store i32 %243, ptr %211, align 4, !tbaa !19
  br label %244

244:                                              ; preds = %197, %200, %234
  %.3 = phi ptr [ %235, %234 ], [ %.2153, %200 ], [ %.2153, %197 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 10
  br i1 %exitcond.not, label %195, label %197, !llvm.loop !34

245:                                              ; preds = %195
  %.0131 = select i1 %190, i32 %191, i32 %193
  %246 = load i32, ptr %176, align 4, !tbaa !21
  %247 = add i32 %246, -1
  %248 = icmp ult i32 %.0133159, %247
  %249 = select i1 %248, i32 268435456, i32 1610612736
  %250 = or i32 %249, %.0131
  %251 = getelementptr inbounds i8, ptr %.3, i64 4
  store i32 %250, ptr %.3, align 4, !tbaa !19
  %252 = getelementptr inbounds i8, ptr %.3, i64 8
  store i32 0, ptr %251, align 4, !tbaa !19
  %253 = getelementptr inbounds i8, ptr %.3, i64 12
  store i32 0, ptr %252, align 4, !tbaa !19
  %254 = getelementptr inbounds i8, ptr %.3, i64 16
  store i32 0, ptr %253, align 4, !tbaa !19
  br label %255

255:                                              ; preds = %245, %195
  %.4 = phi ptr [ %254, %245 ], [ %.3, %195 ]
  %256 = shl i32 %.0132, 16
  br label %277

257:                                              ; preds = %330
  %258 = load ptr, ptr %184, align 8, !tbaa !27
  %259 = load i32, ptr %258, align 4, !tbaa !32
  %260 = icmp eq i32 %259, 1
  %261 = load i32, ptr %179, align 4
  %262 = add i32 %261, -2
  %263 = select i1 %260, i32 %262, i32 %261
  %264 = add i32 %263, %.0135157
  %265 = or i32 %.0132, 67108864
  %266 = getelementptr inbounds i8, ptr %.9, i64 4
  store i32 %265, ptr %.9, align 4, !tbaa !19
  %267 = icmp eq i32 %.0133159, 0
  %268 = select i1 %267, i32 352321536, i32 385875968
  %269 = getelementptr inbounds i8, ptr %.9, i64 8
  store i32 %268, ptr %266, align 4, !tbaa !19
  %270 = load i32, ptr %176, align 4, !tbaa !21
  %271 = add i32 %270, -1
  %272 = icmp ult i32 %.0133159, %271
  %spec.select = select i1 %272, i32 0, i32 285212672
  %spec.select168 = select i1 %272, i32 0, i32 %163
  store i32 %spec.select, ptr %269, align 4
  %273 = getelementptr inbounds i8, ptr %.9, i64 12
  store i32 %spec.select168, ptr %273, align 4
  %.10 = getelementptr inbounds i8, ptr %.9, i64 16
  %274 = add nuw i32 %.0133159, 1
  %275 = load i32, ptr %176, align 4, !tbaa !21
  %276 = icmp ult i32 %274, %275
  br i1 %276, label %187, label %._crit_edge, !llvm.loop !36

277:                                              ; preds = %255, %330
  %indvars.iv163 = phi i64 [ 0, %255 ], [ %indvars.iv.next164, %330 ]
  %.5155 = phi ptr [ %.4, %255 ], [ %.9, %330 ]
  %278 = getelementptr inbounds [10 x ptr], ptr %22, i64 0, i64 %indvars.iv163
  %279 = load ptr, ptr %278, align 8, !tbaa !16
  %.not147 = icmp eq ptr %279, null
  br i1 %.not147, label %330, label %280

280:                                              ; preds = %277
  %281 = getelementptr inbounds i8, ptr %279, i64 8
  %282 = load i32, ptr %281, align 8, !tbaa !17
  %283 = and i32 %282, 6
  %284 = icmp eq i32 %283, 0
  br i1 %284, label %285, label %330

285:                                              ; preds = %280
  %286 = load i8, ptr @_ZN2rw3ps27adcHackE, align 1, !tbaa !37, !range !39, !noundef !40
  %287 = trunc nuw i8 %286 to i1
  %288 = icmp eq ptr %279, @_ZN2rw3ps29attribXYZE
  %or.cond = and i1 %288, %287
  br i1 %or.cond, label %296, label %289

289:                                              ; preds = %285
  %290 = load i32, ptr @_ZN2rw7versionE, align 4, !tbaa !19
  %291 = icmp sgt i32 %290, 217087
  br i1 %291, label %296, label %292

292:                                              ; preds = %289
  %293 = load i32, ptr @_ZN2rw3ps27markcntE, align 4, !tbaa !19
  %294 = add i32 %293, 1
  store i32 %294, ptr @_ZN2rw3ps27markcntE, align 4, !tbaa !19
  %295 = or i32 %293, 117440512
  br label %296

296:                                              ; preds = %292, %289, %285
  %storemerge.sink = phi i32 [ 536870912, %285 ], [ %295, %292 ], [ 0, %289 ]
  %.sink169 = phi i32 [ 64, %285 ], [ 83886080, %292 ], [ 83886080, %289 ]
  %.0 = phi i32 [ 268435456, %285 ], [ 0, %292 ], [ 0, %289 ]
  %.6 = getelementptr inbounds i8, ptr %.5155, i64 4
  store i32 %storemerge.sink, ptr %.5155, align 4, !tbaa !19
  store i32 %.sink169, ptr %.6, align 4, !tbaa !19
  %.7 = getelementptr inbounds i8, ptr %.5155, i64 8
  %297 = load i32, ptr %182, align 8, !tbaa !25
  %298 = or i32 %297, 16777472
  %299 = getelementptr inbounds i8, ptr %.5155, i64 12
  store i32 %298, ptr %.7, align 4, !tbaa !19
  %300 = load i32, ptr %281, align 8, !tbaa !17
  %301 = and i32 %300, -16760832
  %302 = or i32 %256, %.0
  %303 = or i32 %302, %301
  %304 = trunc nuw nsw i64 %indvars.iv163 to i32
  %305 = or i32 %303, %304
  %306 = or i32 %305, 32768
  %307 = getelementptr inbounds i8, ptr %.5155, i64 16
  store i32 %306, ptr %299, align 4, !tbaa !19
  br i1 %288, label %308, label %310

308:                                              ; preds = %296
  %309 = call noundef ptr @_ZN2rw3ps211instanceXYZEPjPNS_8GeometryEPNS_4MeshEjj(ptr noundef nonnull %307, ptr noundef %1, ptr noundef %3, i32 noundef %.0135157, i32 noundef %.0132)
  br label %330

310:                                              ; preds = %296
  %311 = icmp eq ptr %279, @_ZN2rw3ps210attribXYZWE
  br i1 %311, label %312, label %314

312:                                              ; preds = %310
  %313 = call noundef ptr @_ZN2rw3ps212instanceXYZWEPjPNS_8GeometryEPNS_4MeshEjj(ptr noundef nonnull %307, ptr noundef %1, ptr noundef %3, i32 noundef %.0135157, i32 noundef %.0132)
  br label %330

314:                                              ; preds = %310
  %315 = icmp eq ptr %279, @_ZN2rw3ps28attribUVE
  br i1 %315, label %316, label %318

316:                                              ; preds = %314
  %317 = call noundef ptr @_ZN2rw3ps210instanceUVEPjPNS_8GeometryEPNS_4MeshEjj(ptr noundef nonnull %307, ptr noundef %1, ptr noundef %3, i32 noundef %.0135157, i32 noundef %.0132)
  br label %330

318:                                              ; preds = %314
  %319 = icmp eq ptr %279, @_ZN2rw3ps29attribUV2E
  br i1 %319, label %320, label %322

320:                                              ; preds = %318
  %321 = call noundef ptr @_ZN2rw3ps211instanceUV2EPjPNS_8GeometryEPNS_4MeshEjj(ptr noundef nonnull %307, ptr noundef %1, ptr noundef %3, i32 noundef %.0135157, i32 noundef %.0132)
  br label %330

322:                                              ; preds = %318
  %323 = icmp eq ptr %279, @_ZN2rw3ps210attribRGBAE
  br i1 %323, label %324, label %326

324:                                              ; preds = %322
  %325 = call noundef ptr @_ZN2rw3ps212instanceRGBAEPjPNS_8GeometryEPNS_4MeshEjj(ptr noundef nonnull %307, ptr noundef %1, ptr noundef %3, i32 noundef %.0135157, i32 noundef %.0132)
  br label %330

326:                                              ; preds = %322
  %327 = icmp eq ptr %279, @_ZN2rw3ps212attribNormalE
  br i1 %327, label %328, label %330

328:                                              ; preds = %326
  %329 = call noundef ptr @_ZN2rw3ps214instanceNormalEPjPNS_8GeometryEPNS_4MeshEjj(ptr noundef nonnull %307, ptr noundef %1, ptr noundef %3, i32 noundef %.0135157, i32 noundef %.0132)
  br label %330

330:                                              ; preds = %308, %316, %324, %328, %326, %320, %312, %277, %280
  %.9 = phi ptr [ %.5155, %280 ], [ %.5155, %277 ], [ %309, %308 ], [ %313, %312 ], [ %317, %316 ], [ %321, %320 ], [ %325, %324 ], [ %329, %328 ], [ %307, %326 ]
  %indvars.iv.next164 = add nuw nsw i64 %indvars.iv163, 1
  %exitcond166.not = icmp eq i64 %indvars.iv.next164, 10
  br i1 %exitcond166.not, label %257, label %277, !llvm.loop !41

331:                                              ; preds = %._crit_edge
  call void %186(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %3, ptr noundef nonnull %6)
  br label %332

332:                                              ; preds = %331, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #5
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 28}
!6 = !{!"_ZTSN2rw3ps212InstMeshInfoE", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !8, i64 40}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 32}
!11 = !{!12, !7, i64 0}
!12 = !{!"_ZTSN2rw3ps212InstanceDataE", !7, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!12, !13, i64 8}
!15 = !{!12, !13, i64 16}
!16 = !{!13, !13, i64 0}
!17 = !{!18, !7, i64 8}
!18 = !{!"_ZTSN2rw3ps213PipeAttributeE", !13, i64 0, !7, i64 8}
!19 = !{!7, !7, i64 0}
!20 = !{!6, !7, i64 4}
!21 = !{!6, !7, i64 16}
!22 = !{!23, !13, i64 112}
!23 = !{!"_ZTSN2rw3ps211MatPipelineE", !24, i64 0, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !8, i64 32, !13, i64 112, !13, i64 120, !13, i64 128, !13, i64 136}
!24 = !{!"_ZTSN2rw8PipelineE", !7, i64 0, !7, i64 4, !7, i64 8}
!25 = !{!23, !7, i64 16}
!26 = !{!23, !7, i64 12}
!27 = !{!28, !13, i64 144}
!28 = !{!"_ZTSN2rw8GeometryE", !29, i64 0, !7, i64 16, !30, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !13, i64 40, !13, i64 48, !8, i64 56, !13, i64 120, !31, i64 128, !13, i64 144, !13, i64 152, !7, i64 160}
!29 = !{!"_ZTSN2rw6ObjectE", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !13, i64 8}
!30 = !{!"short", !8, i64 0}
!31 = !{!"_ZTSN2rw12MaterialListE", !13, i64 0, !7, i64 8, !7, i64 12}
!32 = !{!33, !7, i64 0}
!33 = !{!"_ZTSN2rw10MeshHeaderE", !7, i64 0, !30, i64 4, !30, i64 6, !7, i64 8, !7, i64 12}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = distinct !{!36, !35}
!37 = !{!38, !38, i64 0}
!38 = !{!"bool", !8, i64 0}
!39 = !{i8 0, i8 2}
!40 = !{}
!41 = distinct !{!41, !35}


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