; LLVM IR from aap/librw :: src/geometry.ll (ZN2rw8Geometry6createEiij)

; 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::PluginList" = type { i32, i32, %"struct.rw::LinkList" }
%"struct.rw::LinkList" = type { %"struct.rw::LLLink" }
%"struct.rw::LLLink" = type { ptr, ptr }
%"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::Triangle" = type { [3 x i16], i16 }

@_ZN2rw8Geometry12numAllocatedE = external dso_local global i32, align 4
@_ZN2rw8Geometry9s_plglistE = external dso_local global %"struct.rw::PluginList", align 8
@.str = external hidden unnamed_addr constant [75 x i8], align 1
@stderr = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [75 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN2rw8Geometry6createEiij(i32 noundef %0, i32 noundef %1, i32 noundef %2) #0 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.rw::Error", align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 %0, ptr %5, align 4, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %16 = load i32, ptr @_ZN2rw8Geometry9s_plglistE, align 8, !tbaa !9
  %17 = sext i32 %16 to i64
  %18 = call noundef ptr @_ZN2rw10malloc_LOCEmjPKc(i64 noundef %17, i32 noundef 196623, ptr noundef @.str)
  store ptr %18, ptr %8, align 8, !tbaa !14
  %19 = load ptr, ptr %8, align 8, !tbaa !14
  %20 = icmp eq ptr %19, null
  br i1 %20, label %21, label %33

21:                                               ; preds = %3
  br label %22

22:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %23 = getelementptr inbounds %"struct.rw::Error", ptr %9, i32 0, i32 0
  store i32 15, ptr %23, align 4, !tbaa !15
  %24 = getelementptr inbounds %"struct.rw::Error", ptr %9, i32 0, i32 1
  store i32 -2147483646, ptr %24, align 4, !tbaa !17
  %25 = load ptr, ptr @stderr, align 8, !tbaa !14
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 32) #6
  %27 = load ptr, ptr @stderr, align 8, !tbaa !14
  %28 = load i32, ptr @_ZN2rw8Geometry9s_plglistE, align 8, !tbaa !9
  %29 = call noundef ptr (i32, ...) @_ZN2rw9dbgsprintEjz(i32 noundef -2147483646, i32 noundef %28)
  %30 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef @.str.4, ptr noundef %29) #6
  call void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %31

31:                                               ; preds = %22
  br label %32

32:                                               ; preds = %31
  store ptr null, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %239

33:                                               ; preds = %3
  %34 = load i32, ptr @_ZN2rw8Geometry12numAllocatedE, align 4, !tbaa !5
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr @_ZN2rw8Geometry12numAllocatedE, align 4, !tbaa !5
  %36 = load ptr, ptr %8, align 8, !tbaa !14
  %37 = getelementptr inbounds %"struct.rw::Geometry", ptr %36, i32 0, i32 0
  call void @_ZN2rw6Object4initEhh(ptr noundef nonnull align 8 dereferenceable(16) %37, i8 noundef zeroext 8, i8 noundef zeroext 0)
  %38 = load i32, ptr %7, align 4, !tbaa !5
  %39 = and i32 %38, -16711681
  %40 = load ptr, ptr %8, align 8, !tbaa !14
  %41 = getelementptr inbounds %"struct.rw::Geometry", ptr %40, i32 0, i32 1
  store i32 %39, ptr %41, align 8, !tbaa !18
  %42 = load i32, ptr %7, align 4, !tbaa !5
  %43 = and i32 %42, 16711680
  %44 = lshr i32 %43, 16
  %45 = load ptr, ptr %8, align 8, !tbaa !14
  %46 = getelementptr inbounds %"struct.rw::Geometry", ptr %45, i32 0, i32 6
  store i32 %44, ptr %46, align 4, !tbaa !23
  %47 = load ptr, ptr %8, align 8, !tbaa !14
  %48 = getelementptr inbounds %"struct.rw::Geometry", ptr %47, i32 0, i32 6
  %49 = load i32, ptr %48, align 4, !tbaa !23
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %70

51:                                               ; preds = %33
  %52 = load ptr, ptr %8, align 8, !tbaa !14
  %53 = getelementptr inbounds %"struct.rw::Geometry", ptr %52, i32 0, i32 1
  %54 = load i32, ptr %53, align 8, !tbaa !18
  %55 = and i32 %54, 4
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %57, label %58

57:                                               ; preds = %51
  br label %66

58:                                               ; preds = %51
  %59 = load ptr, ptr %8, align 8, !tbaa !14
  %60 = getelementptr inbounds %"struct.rw::Geometry", ptr %59, i32 0, i32 1
  %61 = load i32, ptr %60, align 8, !tbaa !18
  %62 = and i32 %61, 128
  %63 = icmp ne i32 %62, 0
  %64 = zext i1 %63 to i64
  %65 = select i1 %63, i32 2, i32 0
  br label %66

66:                                               ; preds = %58, %57
  %67 = phi i32 [ 1, %57 ], [ %65, %58 ]
  %68 = load ptr, ptr %8, align 8, !tbaa !14
  %69 = getelementptr inbounds %"struct.rw::Geometry", ptr %68, i32 0, i32 6
  store i32 %67, ptr %69, align 4, !tbaa !23
  br label %70

70:                                               ; preds = %66, %33
  %71 = load i32, ptr %6, align 4, !tbaa !5
  %72 = load ptr, ptr %8, align 8, !tbaa !14
  %73 = getelementptr inbounds %"struct.rw::Geometry", ptr %72, i32 0, i32 3
  store i32 %71, ptr %73, align 8, !tbaa !24
  %74 = load i32, ptr %5, align 4, !tbaa !5
  %75 = load ptr, ptr %8, align 8, !tbaa !14
  %76 = getelementptr inbounds %"struct.rw::Geometry", ptr %75, i32 0, i32 4
  store i32 %74, ptr %76, align 4, !tbaa !25
  %77 = load ptr, ptr %8, align 8, !tbaa !14
  %78 = getelementptr inbounds %"struct.rw::Geometry", ptr %77, i32 0, i32 8
  store ptr null, ptr %78, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %89, %70
  %80 = load i32, ptr %11, align 4, !tbaa !5
  %81 = icmp slt i32 %80, 8
  br i1 %81, label %83, label %82

82:                                               ; preds = %79
  store i32 4, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %92

83:                                               ; preds = %79
  %84 = load ptr, ptr %8, align 8, !tbaa !14
  %85 = getelementptr inbounds %"struct.rw::Geometry", ptr %84, i32 0, i32 9
  %86 = load i32, ptr %11, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [8 x ptr], ptr %85, i64 0, i64 %87
  store ptr null, ptr %88, align 8, !tbaa !14
  br label %89

89:                                               ; preds = %83
  %90 = load i32, ptr %11, align 4, !tbaa !5
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %11, align 4, !tbaa !5
  br label %79, !llvm.loop !27

92:                                               ; preds = %82
  %93 = load ptr, ptr %8, align 8, !tbaa !14
  %94 = getelementptr inbounds %"struct.rw::Geometry", ptr %93, i32 0, i32 7
  store ptr null, ptr %94, align 8, !tbaa !29
  %95 = load ptr, ptr %8, align 8, !tbaa !14
  %96 = getelementptr inbounds %"struct.rw::Geometry", ptr %95, i32 0, i32 1
  %97 = load i32, ptr %96, align 8, !tbaa !18
  %98 = and i32 %97, 16777216
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %221, label %100

100:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %101 = load ptr, ptr %8, align 8, !tbaa !14
  %102 = getelementptr inbounds %"struct.rw::Geometry", ptr %101, i32 0, i32 3
  %103 = load i32, ptr %102, align 8, !tbaa !24
  %104 = sext i32 %103 to i64
  %105 = mul i64 %104, 8
  %106 = trunc i64 %105 to i32
  store i32 %106, ptr %12, align 4, !tbaa !5
  %107 = load ptr, ptr %8, align 8, !tbaa !14
  %108 = getelementptr inbounds %"struct.rw::Geometry", ptr %107, i32 0, i32 1
  %109 = load i32, ptr %108, align 8, !tbaa !18
  %110 = and i32 %109, 8
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %112, label %122

112:                                              ; preds = %100
  %113 = load ptr, ptr %8, align 8, !tbaa !14
  %114 = getelementptr inbounds %"struct.rw::Geometry", ptr %113, i32 0, i32 4
  %115 = load i32, ptr %114, align 4, !tbaa !25
  %116 = sext i32 %115 to i64
  %117 = mul i64 %116, 4
  %118 = load i32, ptr %12, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = add i64 %119, %117
  %121 = trunc i64 %120 to i32
  store i32 %121, ptr %12, align 4, !tbaa !5
  br label %122

122:                                              ; preds = %112, %100
  %123 = load ptr, ptr %8, align 8, !tbaa !14
  %124 = getelementptr inbounds %"struct.rw::Geometry", ptr %123, i32 0, i32 6
  %125 = load i32, ptr %124, align 4, !tbaa !23
  %126 = load ptr, ptr %8, align 8, !tbaa !14
  %127 = getelementptr inbounds %"struct.rw::Geometry", ptr %126, i32 0, i32 4
  %128 = load i32, ptr %127, align 4, !tbaa !25
  %129 = mul nsw i32 %125, %128
  %130 = sext i32 %129 to i64
  %131 = mul i64 %130, 8
  %132 = load i32, ptr %12, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = add i64 %133, %131
  %135 = trunc i64 %134 to i32
  store i32 %135, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %136 = load i32, ptr %12, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = call noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef %137, i32 noundef 196623, ptr noundef @.str.5)
  store ptr %138, ptr %13, align 8, !tbaa !14
  %139 = load ptr, ptr %13, align 8, !tbaa !14
  %140 = load ptr, ptr %8, align 8, !tbaa !14
  %141 = getelementptr inbounds %"struct.rw::Geometry", ptr %140, i32 0, i32 7
  store ptr %139, ptr %141, align 8, !tbaa !29
  %142 = load ptr, ptr %8, align 8, !tbaa !14
  %143 = getelementptr inbounds %"struct.rw::Geometry", ptr %142, i32 0, i32 3
  %144 = load i32, ptr %143, align 8, !tbaa !24
  %145 = sext i32 %144 to i64
  %146 = mul i64 %145, 8
  %147 = load ptr, ptr %13, align 8, !tbaa !14
  %148 = getelementptr inbounds i8, ptr %147, i64 %146
  store ptr %148, ptr %13, align 8, !tbaa !14
  %149 = load ptr, ptr %8, align 8, !tbaa !14
  %150 = getelementptr inbounds %"struct.rw::Geometry", ptr %149, i32 0, i32 1
  %151 = load i32, ptr %150, align 8, !tbaa !18
  %152 = and i32 %151, 8
  %153 = icmp ne i32 %152, 0
  br i1 %153, label %154, label %170

154:                                              ; preds = %122
  %155 = load ptr, ptr %8, align 8, !tbaa !14
  %156 = getelementptr inbounds %"struct.rw::Geometry", ptr %155, i32 0, i32 4
  %157 = load i32, ptr %156, align 4, !tbaa !25
  %158 = icmp ne i32 %157, 0
  br i1 %158, label %159, label %170

159:                                              ; preds = %154
  %160 = load ptr, ptr %13, align 8, !tbaa !14
  %161 = load ptr, ptr %8, align 8, !tbaa !14
  %162 = getelementptr inbounds %"struct.rw::Geometry", ptr %161, i32 0, i32 8
  store ptr %160, ptr %162, align 8, !tbaa !26
  %163 = load ptr, ptr %8, align 8, !tbaa !14
  %164 = getelementptr inbounds %"struct.rw::Geometry", ptr %163, i32 0, i32 4
  %165 = load i32, ptr %164, align 4, !tbaa !25
  %166 = sext i32 %165 to i64
  %167 = mul i64 %166, 4
  %168 = load ptr, ptr %13, align 8, !tbaa !14
  %169 = getelementptr inbounds i8, ptr %168, i64 %167
  store ptr %169, ptr %13, align 8, !tbaa !14
  br label %170

170:                                              ; preds = %159, %154, %122
  %171 = load ptr, ptr %8, align 8, !tbaa !14
  %172 = getelementptr inbounds %"struct.rw::Geometry", ptr %171, i32 0, i32 4
  %173 = load i32, ptr %172, align 4, !tbaa !25
  %174 = icmp ne i32 %173, 0
  br i1 %174, label %175, label %201

175:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %176

176:                                              ; preds = %197, %175
  %177 = load i32, ptr %14, align 4, !tbaa !5
  %178 = load ptr, ptr %8, align 8, !tbaa !14
  %179 = getelementptr inbounds %"struct.rw::Geometry", ptr %178, i32 0, i32 6
  %180 = load i32, ptr %179, align 4, !tbaa !23
  %181 = icmp slt i32 %177, %180
  br i1 %181, label %183, label %182

182:                                              ; preds = %176
  store i32 7, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %200

183:                                              ; preds = %176
  %184 = load ptr, ptr %13, align 8, !tbaa !14
  %185 = load ptr, ptr %8, align 8, !tbaa !14
  %186 = getelementptr inbounds %"struct.rw::Geometry", ptr %185, i32 0, i32 9
  %187 = load i32, ptr %14, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [8 x ptr], ptr %186, i64 0, i64 %188
  store ptr %184, ptr %189, align 8, !tbaa !14
  %190 = load ptr, ptr %8, align 8, !tbaa !14
  %191 = getelementptr inbounds %"struct.rw::Geometry", ptr %190, i32 0, i32 4
  %192 = load i32, ptr %191, align 4, !tbaa !25
  %193 = sext i32 %192 to i64
  %194 = mul i64 %193, 8
  %195 = load ptr, ptr %13, align 8, !tbaa !14
  %196 = getelementptr inbounds i8, ptr %195, i64 %194
  store ptr %196, ptr %13, align 8, !tbaa !14
  br label %197

197:                                              ; preds = %183
  %198 = load i32, ptr %14, align 4, !tbaa !5
  %199 = add nsw i32 %198, 1
  store i32 %199, ptr %14, align 4, !tbaa !5
  br label %176, !llvm.loop !30

200:                                              ; preds = %182
  br label %201

201:                                              ; preds = %200, %170
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %202

202:                                              ; preds = %217, %201
  %203 = load i32, ptr %15, align 4, !tbaa !5
  %204 = load ptr, ptr %8, align 8, !tbaa !14
  %205 = getelementptr inbounds %"struct.rw::Geometry", ptr %204, i32 0, i32 3
  %206 = load i32, ptr %205, align 8, !tbaa !24
  %207 = icmp slt i32 %203, %206
  br i1 %207, label %209, label %208

208:                                              ; preds = %202
  store i32 10, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %220

209:                                              ; preds = %202
  %210 = load ptr, ptr %8, align 8, !tbaa !14
  %211 = getelementptr inbounds %"struct.rw::Geometry", ptr %210, i32 0, i32 7
  %212 = load ptr, ptr %211, align 8, !tbaa !29
  %213 = load i32, ptr %15, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds %"struct.rw::Triangle", ptr %212, i64 %214
  %216 = getelementptr inbounds %"struct.rw::Triangle", ptr %215, i32 0, i32 1
  store i16 -1, ptr %216, align 2, !tbaa !31
  br label %217

217:                                              ; preds = %209
  %218 = load i32, ptr %15, align 4, !tbaa !5
  %219 = add nsw i32 %218, 1
  store i32 %219, ptr %15, align 4, !tbaa !5
  br label %202, !llvm.loop !33

220:                                              ; preds = %208
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %221

221:                                              ; preds = %220, %92
  %222 = load ptr, ptr %8, align 8, !tbaa !14
  %223 = getelementptr inbounds %"struct.rw::Geometry", ptr %222, i32 0, i32 5
  store i32 0, ptr %223, align 8, !tbaa !34
  %224 = load ptr, ptr %8, align 8, !tbaa !14
  %225 = getelementptr inbounds %"struct.rw::Geometry", ptr %224, i32 0, i32 10
  store ptr null, ptr %225, align 8, !tbaa !35
  %226 = load ptr, ptr %8, align 8, !tbaa !14
  call void @_ZN2rw8Geometry15addMorphTargetsEi(ptr noundef nonnull align 8 dereferenceable(168) %226, i32 noundef 1)
  %227 = load ptr, ptr %8, align 8, !tbaa !14
  %228 = getelementptr inbounds %"struct.rw::Geometry", ptr %227, i32 0, i32 11
  call void @_ZN2rw12MaterialList4initEv(ptr noundef nonnull align 8 dereferenceable(16) %228)
  %229 = load ptr, ptr %8, align 8, !tbaa !14
  %230 = getelementptr inbounds %"struct.rw::Geometry", ptr %229, i32 0, i32 2
  store i16 0, ptr %230, align 4, !tbaa !36
  %231 = load ptr, ptr %8, align 8, !tbaa !14
  %232 = getelementptr inbounds %"struct.rw::Geometry", ptr %231, i32 0, i32 12
  store ptr null, ptr %232, align 8, !tbaa !37
  %233 = load ptr, ptr %8, align 8, !tbaa !14
  %234 = getelementptr inbounds %"struct.rw::Geometry", ptr %233, i32 0, i32 13
  store ptr null, ptr %234, align 8, !tbaa !38
  %235 = load ptr, ptr %8, align 8, !tbaa !14
  %236 = getelementptr inbounds %"struct.rw::Geometry", ptr %235, i32 0, i32 14
  store i32 1, ptr %236, align 8, !tbaa !39
  %237 = load ptr, ptr %8, align 8, !tbaa !14
  call void @_ZN2rw10PluginList9constructEPv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN2rw8Geometry9s_plglistE, ptr noundef %237)
  %238 = load ptr, ptr %8, align 8, !tbaa !14
  store ptr %238, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %239

239:                                              ; preds = %221, %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  %240 = load ptr, ptr %4, align 8
  ret ptr %240
}

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

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

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

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

declare void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2rw6Object4initEhh(ptr noundef nonnull align 8 dereferenceable(16), i8 noundef zeroext, i8 noundef zeroext) #5 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2rw8Geometry15addMorphTargetsEi(ptr noundef nonnull align 8 dereferenceable(168), i32 noundef) #0 align 2

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

declare void @_ZN2rw10PluginList9constructEPv(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #4

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSN2rw10PluginListE", !6, i64 0, !6, i64 4, !11, i64 8}
!11 = !{!"_ZTSN2rw8LinkListE", !12, i64 0}
!12 = !{!"_ZTSN2rw6LLLinkE", !13, i64 0, !13, i64 8}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"_ZTSN2rw5ErrorE", !6, i64 0, !6, i64 4}
!17 = !{!16, !6, i64 4}
!18 = !{!19, !6, i64 16}
!19 = !{!"_ZTSN2rw8GeometryE", !20, i64 0, !6, i64 16, !21, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !13, i64 40, !13, i64 48, !7, i64 56, !13, i64 120, !22, i64 128, !13, i64 144, !13, i64 152, !6, i64 160}
!20 = !{!"_ZTSN2rw6ObjectE", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !13, i64 8}
!21 = !{!"short", !7, i64 0}
!22 = !{!"_ZTSN2rw12MaterialListE", !13, i64 0, !6, i64 8, !6, i64 12}
!23 = !{!19, !6, i64 36}
!24 = !{!19, !6, i64 24}
!25 = !{!19, !6, i64 28}
!26 = !{!19, !13, i64 48}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!19, !13, i64 40}
!30 = distinct !{!30, !28}
!31 = !{!32, !21, i64 6}
!32 = !{!"_ZTSN2rw8TriangleE", !7, i64 0, !21, i64 6}
!33 = distinct !{!33, !28}
!34 = !{!19, !6, i64 32}
!35 = !{!19, !13, i64 120}
!36 = !{!19, !21, i64 20}
!37 = !{!19, !13, i64 144}
!38 = !{!19, !13, i64 152}
!39 = !{!19, !6, i64 160}


; 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::PluginList" = type { i32, i32, %"struct.rw::LinkList" }
%"struct.rw::LinkList" = type { %"struct.rw::LLLink" }
%"struct.rw::LLLink" = type { ptr, ptr }
%"struct.rw::Error" = type { i32, i32 }
%"struct.rw::Triangle" = type { [3 x i16], i16 }

@_ZN2rw8Geometry12numAllocatedE = external dso_local local_unnamed_addr global i32, align 4
@_ZN2rw8Geometry9s_plglistE = external dso_local global %"struct.rw::PluginList", align 8
@.str = external hidden unnamed_addr constant [75 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [75 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN2rw8Geometry6createEiij(i32 noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 align 2 {
  %4 = alloca %"struct.rw::Error", align 4
  %5 = load i32, ptr @_ZN2rw8Geometry9s_plglistE, align 8, !tbaa !5
  %6 = sext i32 %5 to i64
  %7 = tail call noundef ptr @_ZN2rw10malloc_LOCEmjPKc(i64 noundef %6, i32 noundef 196623, ptr noundef nonnull @.str)
  %8 = icmp eq ptr %7, null
  br i1 %8, label %9, label %17

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

17:                                               ; preds = %3
  %18 = load i32, ptr @_ZN2rw8Geometry12numAllocatedE, align 4, !tbaa !17
  %19 = add nsw i32 %18, 1
  store i32 %19, ptr @_ZN2rw8Geometry12numAllocatedE, align 4, !tbaa !17
  tail call void @_ZN2rw6Object4initEhh(ptr noundef nonnull align 8 dereferenceable(16) %7, i8 noundef zeroext 8, i8 noundef zeroext 0)
  %20 = and i32 %2, -16711681
  %21 = getelementptr inbounds i8, ptr %7, i64 16
  store i32 %20, ptr %21, align 8, !tbaa !18
  %22 = lshr i32 %2, 16
  %23 = and i32 %22, 255
  %24 = getelementptr inbounds i8, ptr %7, i64 36
  %25 = icmp eq i32 %23, 0
  br i1 %25, label %26, label %31

26:                                               ; preds = %17
  %27 = and i32 %2, 4
  %.not = icmp eq i32 %27, 0
  %28 = lshr i32 %2, 6
  %29 = and i32 %28, 2
  %30 = select i1 %.not, i32 %29, i32 1
  br label %31

31:                                               ; preds = %26, %17
  %32 = phi i32 [ %30, %26 ], [ %23, %17 ]
  store i32 %32, ptr %24, align 4, !tbaa !23
  %33 = getelementptr inbounds i8, ptr %7, i64 24
  store i32 %1, ptr %33, align 8, !tbaa !24
  %34 = getelementptr inbounds i8, ptr %7, i64 28
  store i32 %0, ptr %34, align 4, !tbaa !25
  %35 = getelementptr inbounds i8, ptr %7, i64 48
  %36 = getelementptr inbounds i8, ptr %7, i64 56
  %37 = getelementptr inbounds i8, ptr %7, i64 40
  %38 = and i32 %2, 16777216
  %.not70 = icmp eq i32 %38, 0
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %37, i8 0, i64 80, i1 false)
  br i1 %.not70, label %39, label %.loopexit

39:                                               ; preds = %31
  %40 = and i32 %2, 8
  %.not71 = icmp eq i32 %40, 0
  %41 = shl i32 %0, 2
  %42 = select i1 %.not71, i32 0, i32 %41
  %43 = mul nsw i32 %32, %0
  %44 = add i32 %43, %1
  %45 = shl i32 %44, 3
  %46 = add i32 %45, %42
  %47 = sext i32 %46 to i64
  %48 = tail call noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef %47, i32 noundef 196623, ptr noundef nonnull @.str.5)
  store ptr %48, ptr %37, align 8, !tbaa !26
  %49 = load i32, ptr %33, align 8, !tbaa !24
  %50 = sext i32 %49 to i64
  %51 = shl nsw i64 %50, 3
  %52 = getelementptr inbounds i8, ptr %48, i64 %51
  %53 = load i32, ptr %21, align 8, !tbaa !18
  %54 = and i32 %53, 8
  %.not72 = icmp eq i32 %54, 0
  %.pr.pre = load i32, ptr %34, align 4, !tbaa !25
  %.not74 = icmp eq i32 %.pr.pre, 0
  br i1 %.not72, label %59, label %55

55:                                               ; preds = %39
  br i1 %.not74, label %.thread, label %.thread89

.thread89:                                        ; preds = %55
  store ptr %52, ptr %35, align 8, !tbaa !27
  %56 = sext i32 %.pr.pre to i64
  %57 = shl nsw i64 %56, 2
  %58 = getelementptr inbounds i8, ptr %52, i64 %57
  br label %.preheader

59:                                               ; preds = %39
  br i1 %.not74, label %.thread, label %.preheader

.preheader:                                       ; preds = %.thread89, %59
  %.064.ph92 = phi ptr [ %58, %.thread89 ], [ %52, %59 ]
  %60 = load i32, ptr %24, align 4, !tbaa !23
  %61 = icmp sgt i32 %60, 0
  br i1 %61, label %.lr.ph, label %.thread

.lr.ph:                                           ; preds = %.preheader
  %62 = sext i32 %.pr.pre to i64
  %63 = shl nsw i64 %62, 3
  %wide.trip.count = zext nneg i32 %60 to i64
  %xtraiter = and i64 %wide.trip.count, 7
  %64 = icmp ult i32 %60, 8
  br i1 %64, label %.thread.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %wide.trip.count, 2147483640
  br label %65

65:                                               ; preds = %65, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.7, %65 ]
  %.178 = phi ptr [ %.064.ph92, %.lr.ph.new ], [ %81, %65 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.7, %65 ]
  %66 = getelementptr inbounds [8 x ptr], ptr %36, i64 0, i64 %indvars.iv
  store ptr %.178, ptr %66, align 8, !tbaa !16
  %67 = getelementptr inbounds i8, ptr %.178, i64 %63
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %68 = getelementptr inbounds [8 x ptr], ptr %36, i64 0, i64 %indvars.iv.next
  store ptr %67, ptr %68, align 8, !tbaa !16
  %69 = getelementptr inbounds i8, ptr %67, i64 %63
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %70 = getelementptr inbounds [8 x ptr], ptr %36, i64 0, i64 %indvars.iv.next.1
  store ptr %69, ptr %70, align 8, !tbaa !16
  %71 = getelementptr inbounds i8, ptr %69, i64 %63
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %72 = getelementptr inbounds [8 x ptr], ptr %36, i64 0, i64 %indvars.iv.next.2
  store ptr %71, ptr %72, align 8, !tbaa !16
  %73 = getelementptr inbounds i8, ptr %71, i64 %63
  %indvars.iv.next.3 = or disjoint i64 %indvars.iv, 4
  %74 = getelementptr inbounds [8 x ptr], ptr %36, i64 0, i64 %indvars.iv.next.3
  store ptr %73, ptr %74, align 8, !tbaa !16
  %75 = getelementptr inbounds i8, ptr %73, i64 %63
  %indvars.iv.next.4 = or disjoint i64 %indvars.iv, 5
  %76 = getelementptr inbounds [8 x ptr], ptr %36, i64 0, i64 %indvars.iv.next.4
  store ptr %75, ptr %76, align 8, !tbaa !16
  %77 = getelementptr inbounds i8, ptr %75, i64 %63
  %indvars.iv.next.5 = or disjoint i64 %indvars.iv, 6
  %78 = getelementptr inbounds [8 x ptr], ptr %36, i64 0, i64 %indvars.iv.next.5
  store ptr %77, ptr %78, align 8, !tbaa !16
  %79 = getelementptr inbounds i8, ptr %77, i64 %63
  %indvars.iv.next.6 = or disjoint i64 %indvars.iv, 7
  %80 = getelementptr inbounds [8 x ptr], ptr %36, i64 0, i64 %indvars.iv.next.6
  store ptr %79, ptr %80, align 8, !tbaa !16
  %81 = getelementptr inbounds i8, ptr %79, i64 %63
  %indvars.iv.next.7 = add nuw nsw i64 %indvars.iv, 8
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %.thread.loopexit.unr-lcssa, label %65, !llvm.loop !28

.thread.loopexit.unr-lcssa:                       ; preds = %65, %.lr.ph
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.7, %65 ]
  %.178.unr = phi ptr [ %.064.ph92, %.lr.ph ], [ %81, %65 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.thread, label %.epil.preheader

.epil.preheader:                                  ; preds = %.thread.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %.thread.loopexit.unr-lcssa ]
  %.178.epil = phi ptr [ %83, %.epil.preheader ], [ %.178.unr, %.thread.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.thread.loopexit.unr-lcssa ]
  %82 = getelementptr inbounds [8 x ptr], ptr %36, i64 0, i64 %indvars.iv.epil
  store ptr %.178.epil, ptr %82, align 8, !tbaa !16
  %83 = getelementptr inbounds i8, ptr %.178.epil, i64 %63
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.thread, label %.epil.preheader, !llvm.loop !30

.thread:                                          ; preds = %.thread.loopexit.unr-lcssa, %.epil.preheader, %.preheader, %55, %59
  %84 = icmp sgt i32 %49, 0
  br i1 %84, label %.lr.ph81, label %.loopexit

.lr.ph81:                                         ; preds = %.thread
  %wide.trip.count87 = zext nneg i32 %49 to i64
  %xtraiter94 = and i64 %wide.trip.count87, 7
  %85 = icmp ult i32 %49, 8
  br i1 %85, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph81.new

.lr.ph81.new:                                     ; preds = %.lr.ph81
  %unroll_iter97 = and i64 %wide.trip.count87, 2147483640
  br label %86

86:                                               ; preds = %86, %.lr.ph81.new
  %indvars.iv84 = phi i64 [ 0, %.lr.ph81.new ], [ %indvars.iv.next85.7, %86 ]
  %niter98 = phi i64 [ 0, %.lr.ph81.new ], [ %niter98.next.7, %86 ]
  %87 = getelementptr inbounds %"struct.rw::Triangle", ptr %48, i64 %indvars.iv84, i32 1
  store i16 -1, ptr %87, align 2, !tbaa !32
  %indvars.iv.next85 = or disjoint i64 %indvars.iv84, 1
  %88 = getelementptr inbounds %"struct.rw::Triangle", ptr %48, i64 %indvars.iv.next85, i32 1
  store i16 -1, ptr %88, align 2, !tbaa !32
  %indvars.iv.next85.1 = or disjoint i64 %indvars.iv84, 2
  %89 = getelementptr inbounds %"struct.rw::Triangle", ptr %48, i64 %indvars.iv.next85.1, i32 1
  store i16 -1, ptr %89, align 2, !tbaa !32
  %indvars.iv.next85.2 = or disjoint i64 %indvars.iv84, 3
  %90 = getelementptr inbounds %"struct.rw::Triangle", ptr %48, i64 %indvars.iv.next85.2, i32 1
  store i16 -1, ptr %90, align 2, !tbaa !32
  %indvars.iv.next85.3 = or disjoint i64 %indvars.iv84, 4
  %91 = getelementptr inbounds %"struct.rw::Triangle", ptr %48, i64 %indvars.iv.next85.3, i32 1
  store i16 -1, ptr %91, align 2, !tbaa !32
  %indvars.iv.next85.4 = or disjoint i64 %indvars.iv84, 5
  %92 = getelementptr inbounds %"struct.rw::Triangle", ptr %48, i64 %indvars.iv.next85.4, i32 1
  store i16 -1, ptr %92, align 2, !tbaa !32
  %indvars.iv.next85.5 = or disjoint i64 %indvars.iv84, 6
  %93 = getelementptr inbounds %"struct.rw::Triangle", ptr %48, i64 %indvars.iv.next85.5, i32 1
  store i16 -1, ptr %93, align 2, !tbaa !32
  %indvars.iv.next85.6 = or disjoint i64 %indvars.iv84, 7
  %94 = getelementptr inbounds %"struct.rw::Triangle", ptr %48, i64 %indvars.iv.next85.6, i32 1
  store i16 -1, ptr %94, align 2, !tbaa !32
  %indvars.iv.next85.7 = add nuw nsw i64 %indvars.iv84, 8
  %niter98.next.7 = add i64 %niter98, 8
  %niter98.ncmp.7 = icmp eq i64 %niter98.next.7, %unroll_iter97
  br i1 %niter98.ncmp.7, label %.loopexit.loopexit.unr-lcssa, label %86, !llvm.loop !34

.loopexit.loopexit.unr-lcssa:                     ; preds = %86, %.lr.ph81
  %indvars.iv84.unr = phi i64 [ 0, %.lr.ph81 ], [ %indvars.iv.next85.7, %86 ]
  %lcmp.mod96.not = icmp eq i64 %xtraiter94, 0
  br i1 %lcmp.mod96.not, label %.loopexit, label %.epil.preheader93

.epil.preheader93:                                ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader93
  %indvars.iv84.epil = phi i64 [ %indvars.iv.next85.epil, %.epil.preheader93 ], [ %indvars.iv84.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter95 = phi i64 [ %epil.iter95.next, %.epil.preheader93 ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %95 = getelementptr inbounds %"struct.rw::Triangle", ptr %48, i64 %indvars.iv84.epil, i32 1
  store i16 -1, ptr %95, align 2, !tbaa !32
  %indvars.iv.next85.epil = add nuw nsw i64 %indvars.iv84.epil, 1
  %epil.iter95.next = add i64 %epil.iter95, 1
  %epil.iter95.cmp.not = icmp eq i64 %epil.iter95.next, %xtraiter94
  br i1 %epil.iter95.cmp.not, label %.loopexit, label %.epil.preheader93, !llvm.loop !35

.loopexit:                                        ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader93, %.thread, %31
  %96 = getelementptr inbounds i8, ptr %7, i64 32
  store i32 0, ptr %96, align 8, !tbaa !36
  %97 = getelementptr inbounds i8, ptr %7, i64 120
  store ptr null, ptr %97, align 8, !tbaa !37
  tail call void @_ZN2rw8Geometry15addMorphTargetsEi(ptr noundef nonnull align 8 dereferenceable(168) %7, i32 noundef 1)
  %98 = getelementptr inbounds i8, ptr %7, i64 128
  tail call void @_ZN2rw12MaterialList4initEv(ptr noundef nonnull align 8 dereferenceable(16) %98)
  %99 = getelementptr inbounds i8, ptr %7, i64 20
  store i16 0, ptr %99, align 4, !tbaa !38
  %100 = getelementptr inbounds i8, ptr %7, i64 144
  %101 = getelementptr inbounds i8, ptr %7, i64 160
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %100, i8 0, i64 16, i1 false)
  store i32 1, ptr %101, align 8, !tbaa !39
  tail call void @_ZN2rw10PluginList9constructEPv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN2rw8Geometry9s_plglistE, ptr noundef nonnull %7)
  br label %102

102:                                              ; preds = %.loopexit, %9
  ret ptr %7
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN2rw10malloc_LOCEmjPKc(i64 noundef, i32 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 #4

declare void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2rw6Object4initEhh(ptr noundef nonnull align 8 dereferenceable(16), i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #5 align 2

; 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 uwtable
declare dso_local void @_ZN2rw8Geometry15addMorphTargetsEi(ptr noundef nonnull align 8 dereferenceable(168), i32 noundef) local_unnamed_addr #0 align 2

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

declare void @_ZN2rw10PluginList9constructEPv(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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


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