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

; 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::xbox::InstanceDataHeader" = type { %"struct.rw::InstanceDataHeader", i32, i16, i16, i32, i32, i32, ptr, i32, ptr, ptr, ptr }
%"struct.rw::InstanceDataHeader" = type { 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::MorphTarget" = type { ptr, %"struct.rw::Sphere", ptr, ptr }
%"struct.rw::Sphere" = type { %"struct.rw::V3d", float }
%"struct.rw::V3d" = type { float, float, float }

@.str.1 = external hidden unnamed_addr constant [60 x i8], align 1
@_ZN2rw4xbox12v3dFormatMapE = external dso_local global [6 x i32], align 16
@_ZN2rw4xbox12v2dFormatMapE = external dso_local global [6 x i32], align 16
@_ZN2rw4xbox17vertexFormatSizesE = external global [6 x i32], align 16
@.str.13 = external hidden unnamed_addr constant [9 x i8], align 1
@__PRETTY_FUNCTION__._ZN2rw4xbox19defaultUninstanceCBEPNS_8GeometryEPNS0_18InstanceDataHeaderE = external hidden unnamed_addr constant [69 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

declare noundef ptr @_ZN2rw4xbox12getVertexFmtEPNS_8GeometryE(ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2rw4xbox19defaultUninstanceCBEPNS_8GeometryEPNS0_18InstanceDataHeaderE(ptr noundef %0, ptr noundef %1) #3 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = call noundef ptr @_ZN2rw4xbox12getVertexFmtEPNS_8GeometryE(ptr noundef %11)
  store ptr %12, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %14, ptr %6, align 4, !tbaa !9
  %15 = load i32, ptr %6, align 4, !tbaa !9
  %16 = icmp ne i32 %15, 0
  br i1 %16, label %17, label %18

17:                                               ; preds = %2
  br label %20

18:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.1, i32 noundef 362, ptr noundef @__PRETTY_FUNCTION__._ZN2rw4xbox19defaultUninstanceCBEPNS_8GeometryEPNS0_18InstanceDataHeaderE) #5
  unreachable

19:                                               ; No predecessors!
  br label %20

20:                                               ; preds = %19, %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %21, i32 0, i32 7
  %23 = load ptr, ptr %22, align 8, !tbaa !11
  store ptr %23, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %24 = load i32, ptr %6, align 4, !tbaa !9
  %25 = and i32 %24, 15
  store i32 %25, ptr %8, align 4, !tbaa !9
  %26 = load i32, ptr %8, align 4, !tbaa !9
  %27 = zext i32 %26 to i64
  %28 = getelementptr inbounds [6 x i32], ptr @_ZN2rw4xbox12v3dFormatMapE, i64 0, i64 %27
  %29 = load i32, ptr %28, align 4, !tbaa !9
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.rw::Geometry", ptr %30, i32 0, i32 10
  %32 = load ptr, ptr %31, align 8, !tbaa !15
  %33 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %32, i64 0
  %34 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %33, i32 0, i32 2
  %35 = load ptr, ptr %34, align 8, !tbaa !19
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %37, i32 0, i32 5
  %39 = load i32, ptr %38, align 8, !tbaa !24
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %40, i32 0, i32 6
  %42 = load i32, ptr %41, align 4, !tbaa !25
  call void @_ZN2rw9uninstV3dEiPNS_3V3dEPhjj(i32 noundef %29, ptr noundef %35, ptr noundef %36, i32 noundef %39, i32 noundef %42)
  %43 = load i32, ptr %8, align 4, !tbaa !9
  %44 = icmp eq i32 %43, 4
  br i1 %44, label %45, label %46

45:                                               ; preds = %20
  br label %52

46:                                               ; preds = %20
  %47 = load i32, ptr %8, align 4, !tbaa !9
  %48 = zext i32 %47 to i64
  %49 = getelementptr inbounds [6 x i32], ptr @_ZN2rw4xbox17vertexFormatSizesE, i64 0, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !9
  %51 = mul i32 3, %50
  br label %52

52:                                               ; preds = %46, %45
  %53 = phi i32 [ 4, %45 ], [ %51, %46 ]
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = zext i32 %53 to i64
  %56 = getelementptr inbounds i8, ptr %54, i64 %55
  store ptr %56, ptr %7, align 8, !tbaa !5
  %57 = load i32, ptr %6, align 4, !tbaa !9
  %58 = lshr i32 %57, 4
  %59 = and i32 %58, 15
  store i32 %59, ptr %8, align 4, !tbaa !9
  %60 = load i32, ptr %8, align 4, !tbaa !9
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %94

62:                                               ; preds = %52
  %63 = load i32, ptr %8, align 4, !tbaa !9
  %64 = zext i32 %63 to i64
  %65 = getelementptr inbounds [6 x i32], ptr @_ZN2rw4xbox12v3dFormatMapE, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !9
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.rw::Geometry", ptr %67, i32 0, i32 10
  %69 = load ptr, ptr %68, align 8, !tbaa !15
  %70 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %69, i64 0
  %71 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %70, i32 0, i32 3
  %72 = load ptr, ptr %71, align 8, !tbaa !26
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %74, i32 0, i32 5
  %76 = load i32, ptr %75, align 8, !tbaa !24
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %77, i32 0, i32 6
  %79 = load i32, ptr %78, align 4, !tbaa !25
  call void @_ZN2rw9uninstV3dEiPNS_3V3dEPhjj(i32 noundef %66, ptr noundef %72, ptr noundef %73, i32 noundef %76, i32 noundef %79)
  %80 = load i32, ptr %8, align 4, !tbaa !9
  %81 = icmp eq i32 %80, 4
  br i1 %81, label %82, label %83

82:                                               ; preds = %62
  br label %89

83:                                               ; preds = %62
  %84 = load i32, ptr %8, align 4, !tbaa !9
  %85 = zext i32 %84 to i64
  %86 = getelementptr inbounds [6 x i32], ptr @_ZN2rw4xbox17vertexFormatSizesE, i64 0, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !9
  %88 = mul i32 3, %87
  br label %89

89:                                               ; preds = %83, %82
  %90 = phi i32 [ 4, %82 ], [ %88, %83 ]
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = zext i32 %90 to i64
  %93 = getelementptr inbounds i8, ptr %91, i64 %92
  store ptr %93, ptr %7, align 8, !tbaa !5
  br label %94

94:                                               ; preds = %89, %52
  %95 = load i32, ptr %6, align 4, !tbaa !9
  %96 = and i32 %95, 16777216
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %98, label %111

98:                                               ; preds = %94
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds %"struct.rw::Geometry", ptr %99, i32 0, i32 8
  %101 = load ptr, ptr %100, align 8, !tbaa !27
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  %104 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %103, i32 0, i32 5
  %105 = load i32, ptr %104, align 8, !tbaa !24
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %106, i32 0, i32 6
  %108 = load i32, ptr %107, align 4, !tbaa !25
  call void @_ZN2rw11uninstColorEiPNS_4RGBAEPhjj(i32 noundef 10, ptr noundef %101, ptr noundef %102, i32 noundef %105, i32 noundef %108)
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = getelementptr inbounds i8, ptr %109, i64 4
  store ptr %110, ptr %7, align 8, !tbaa !5
  br label %111

111:                                              ; preds = %98, %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %112

112:                                              ; preds = %158, %111
  %113 = load i32, ptr %9, align 4, !tbaa !9
  %114 = icmp slt i32 %113, 4
  br i1 %114, label %116, label %115

115:                                              ; preds = %112
  store i32 2, ptr %10, align 4
  br label %161

116:                                              ; preds = %112
  %117 = load i32, ptr %6, align 4, !tbaa !9
  %118 = load i32, ptr %9, align 4, !tbaa !9
  %119 = mul nsw i32 %118, 4
  %120 = add nsw i32 %119, 8
  %121 = lshr i32 %117, %120
  %122 = and i32 %121, 15
  store i32 %122, ptr %8, align 4, !tbaa !9
  %123 = load i32, ptr %8, align 4, !tbaa !9
  %124 = icmp eq i32 %123, 0
  br i1 %124, label %125, label %126

125:                                              ; preds = %116
  store i32 2, ptr %10, align 4
  br label %161

126:                                              ; preds = %116
  %127 = load i32, ptr %8, align 4, !tbaa !9
  %128 = zext i32 %127 to i64
  %129 = getelementptr inbounds [6 x i32], ptr @_ZN2rw4xbox12v2dFormatMapE, i64 0, i64 %128
  %130 = load i32, ptr %129, align 4, !tbaa !9
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = getelementptr inbounds %"struct.rw::Geometry", ptr %131, i32 0, i32 9
  %133 = load i32, ptr %9, align 4, !tbaa !9
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [8 x ptr], ptr %132, i64 0, i64 %134
  %136 = load ptr, ptr %135, align 8, !tbaa !5
  %137 = load ptr, ptr %7, align 8, !tbaa !5
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  %139 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %138, i32 0, i32 5
  %140 = load i32, ptr %139, align 8, !tbaa !24
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = getelementptr inbounds %"struct.rw::xbox::InstanceDataHeader", ptr %141, i32 0, i32 6
  %143 = load i32, ptr %142, align 4, !tbaa !25
  call void @_ZN2rw15uninstTexCoordsEiPNS_9TexCoordsEPhjj(i32 noundef %130, ptr noundef %136, ptr noundef %137, i32 noundef %140, i32 noundef %143)
  %144 = load i32, ptr %8, align 4, !tbaa !9
  %145 = icmp eq i32 %144, 4
  br i1 %145, label %146, label %147

146:                                              ; preds = %126
  br label %153

147:                                              ; preds = %126
  %148 = load i32, ptr %8, align 4, !tbaa !9
  %149 = zext i32 %148 to i64
  %150 = getelementptr inbounds [6 x i32], ptr @_ZN2rw4xbox17vertexFormatSizesE, i64 0, i64 %149
  %151 = load i32, ptr %150, align 4, !tbaa !9
  %152 = mul i32 2, %151
  br label %153

153:                                              ; preds = %147, %146
  %154 = phi i32 [ 4, %146 ], [ %152, %147 ]
  %155 = load ptr, ptr %7, align 8, !tbaa !5
  %156 = zext i32 %154 to i64
  %157 = getelementptr inbounds i8, ptr %155, i64 %156
  store ptr %157, ptr %7, align 8, !tbaa !5
  br label %158

158:                                              ; preds = %153
  %159 = load i32, ptr %9, align 4, !tbaa !9
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %9, align 4, !tbaa !9
  br label %112, !llvm.loop !28

161:                                              ; preds = %125, %115
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %162

162:                                              ; preds = %161
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  ret void
}

declare void @_ZN2rw9uninstV3dEiPNS_3V3dEPhjj(i32 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #2

declare void @_ZN2rw11uninstColorEiPNS_4RGBAEPhjj(i32 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #2

declare void @_ZN2rw15uninstTexCoordsEiPNS_9TexCoordsEPhjj(i32 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #2

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

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

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


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

@.str.1 = external hidden unnamed_addr constant [60 x i8], align 1
@_ZN2rw4xbox12v3dFormatMapE = external dso_local local_unnamed_addr global [6 x i32], align 16
@_ZN2rw4xbox12v2dFormatMapE = external dso_local local_unnamed_addr global [6 x i32], align 16
@_ZN2rw4xbox17vertexFormatSizesE = external local_unnamed_addr global [6 x i32], align 16
@.str.13 = external hidden unnamed_addr constant [9 x i8], align 1
@__PRETTY_FUNCTION__._ZN2rw4xbox19defaultUninstanceCBEPNS_8GeometryEPNS0_18InstanceDataHeaderE = external hidden unnamed_addr constant [69 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2rw4xbox19defaultUninstanceCBEPNS_8GeometryEPNS0_18InstanceDataHeaderE(ptr noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #2 {
  %3 = tail call noundef ptr @_ZN2rw4xbox12getVertexFmtEPNS_8GeometryE(ptr noundef %0)
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %.not = icmp eq i32 %4, 0
  br i1 %.not, label %5, label %6

5:                                                ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.1, i32 noundef 362, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN2rw4xbox19defaultUninstanceCBEPNS_8GeometryEPNS0_18InstanceDataHeaderE) #3
  unreachable

6:                                                ; preds = %2
  %7 = getelementptr inbounds i8, ptr %1, i64 24
  %8 = load ptr, ptr %7, align 8, !tbaa !9
  %9 = and i32 %4, 15
  %10 = zext nneg i32 %9 to i64
  %11 = getelementptr inbounds [6 x i32], ptr @_ZN2rw4xbox12v3dFormatMapE, i64 0, i64 %10
  %12 = load i32, ptr %11, align 4, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %0, i64 120
  %14 = load ptr, ptr %13, align 8, !tbaa !14
  %15 = getelementptr inbounds i8, ptr %14, i64 24
  %16 = load ptr, ptr %15, align 8, !tbaa !18
  %17 = getelementptr inbounds i8, ptr %1, i64 16
  %18 = load i32, ptr %17, align 8, !tbaa !23
  %19 = getelementptr inbounds i8, ptr %1, i64 20
  %20 = load i32, ptr %19, align 4, !tbaa !24
  tail call void @_ZN2rw9uninstV3dEiPNS_3V3dEPhjj(i32 noundef %12, ptr noundef %16, ptr noundef %8, i32 noundef %18, i32 noundef %20)
  %21 = icmp eq i32 %9, 4
  br i1 %21, label %27, label %22

22:                                               ; preds = %6
  %23 = getelementptr inbounds [6 x i32], ptr @_ZN2rw4xbox17vertexFormatSizesE, i64 0, i64 %10
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = mul i32 %24, 3
  %26 = zext i32 %25 to i64
  br label %27

27:                                               ; preds = %6, %22
  %28 = phi i64 [ %26, %22 ], [ 4, %6 ]
  %29 = getelementptr inbounds i8, ptr %8, i64 %28
  %30 = lshr i32 %4, 4
  %31 = and i32 %30, 15
  %.not46 = icmp eq i32 %31, 0
  br i1 %.not46, label %50, label %32

32:                                               ; preds = %27
  %33 = zext nneg i32 %31 to i64
  %34 = getelementptr inbounds [6 x i32], ptr @_ZN2rw4xbox12v3dFormatMapE, i64 0, i64 %33
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = load ptr, ptr %13, align 8, !tbaa !14
  %37 = getelementptr inbounds i8, ptr %36, i64 32
  %38 = load ptr, ptr %37, align 8, !tbaa !25
  %39 = load i32, ptr %17, align 8, !tbaa !23
  %40 = load i32, ptr %19, align 4, !tbaa !24
  tail call void @_ZN2rw9uninstV3dEiPNS_3V3dEPhjj(i32 noundef %35, ptr noundef %38, ptr noundef %29, i32 noundef %39, i32 noundef %40)
  %41 = icmp eq i32 %31, 4
  br i1 %41, label %47, label %42

42:                                               ; preds = %32
  %43 = getelementptr inbounds [6 x i32], ptr @_ZN2rw4xbox17vertexFormatSizesE, i64 0, i64 %33
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = mul i32 %44, 3
  %46 = zext i32 %45 to i64
  br label %47

47:                                               ; preds = %32, %42
  %48 = phi i64 [ %46, %42 ], [ 4, %32 ]
  %49 = getelementptr inbounds i8, ptr %29, i64 %48
  br label %50

50:                                               ; preds = %47, %27
  %.042 = phi ptr [ %49, %47 ], [ %29, %27 ]
  %51 = and i32 %4, 16777216
  %.not47 = icmp eq i32 %51, 0
  br i1 %.not47, label %58, label %52

52:                                               ; preds = %50
  %53 = getelementptr inbounds i8, ptr %0, i64 48
  %54 = load ptr, ptr %53, align 8, !tbaa !26
  %55 = load i32, ptr %17, align 8, !tbaa !23
  %56 = load i32, ptr %19, align 4, !tbaa !24
  tail call void @_ZN2rw11uninstColorEiPNS_4RGBAEPhjj(i32 noundef 10, ptr noundef %54, ptr noundef %.042, i32 noundef %55, i32 noundef %56)
  %57 = getelementptr inbounds i8, ptr %.042, i64 4
  br label %58

58:                                               ; preds = %52, %50
  %.1 = phi ptr [ %57, %52 ], [ %.042, %50 ]
  %59 = lshr i32 %4, 8
  %60 = and i32 %59, 15
  %61 = icmp eq i32 %60, 0
  br i1 %61, label %130, label %62

62:                                               ; preds = %58
  %63 = getelementptr inbounds i8, ptr %0, i64 56
  %64 = zext nneg i32 %60 to i64
  %65 = getelementptr inbounds [6 x i32], ptr @_ZN2rw4xbox12v2dFormatMapE, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = load ptr, ptr %63, align 8, !tbaa !27
  %68 = load i32, ptr %17, align 8, !tbaa !23
  %69 = load i32, ptr %19, align 4, !tbaa !24
  tail call void @_ZN2rw15uninstTexCoordsEiPNS_9TexCoordsEPhjj(i32 noundef %66, ptr noundef %67, ptr noundef %.1, i32 noundef %68, i32 noundef %69)
  %70 = icmp eq i32 %60, 4
  br i1 %70, label %76, label %71

71:                                               ; preds = %62
  %72 = getelementptr inbounds [6 x i32], ptr @_ZN2rw4xbox17vertexFormatSizesE, i64 0, i64 %64
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = shl i32 %73, 1
  %75 = zext i32 %74 to i64
  br label %76

76:                                               ; preds = %62, %71
  %77 = phi i64 [ %75, %71 ], [ 4, %62 ]
  %78 = getelementptr inbounds i8, ptr %.1, i64 %77
  %79 = lshr i32 %4, 12
  %80 = and i32 %79, 15
  %81 = icmp eq i32 %80, 0
  br i1 %81, label %130, label %82

82:                                               ; preds = %76
  %83 = zext nneg i32 %80 to i64
  %84 = getelementptr inbounds [6 x i32], ptr @_ZN2rw4xbox12v2dFormatMapE, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = getelementptr inbounds i8, ptr %0, i64 64
  %87 = load ptr, ptr %86, align 8, !tbaa !27
  %88 = load i32, ptr %17, align 8, !tbaa !23
  %89 = load i32, ptr %19, align 4, !tbaa !24
  tail call void @_ZN2rw15uninstTexCoordsEiPNS_9TexCoordsEPhjj(i32 noundef %85, ptr noundef %87, ptr noundef %78, i32 noundef %88, i32 noundef %89)
  %90 = icmp eq i32 %80, 4
  br i1 %90, label %96, label %91

91:                                               ; preds = %82
  %92 = getelementptr inbounds [6 x i32], ptr @_ZN2rw4xbox17vertexFormatSizesE, i64 0, i64 %83
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = shl i32 %93, 1
  %95 = zext i32 %94 to i64
  br label %96

96:                                               ; preds = %91, %82
  %97 = phi i64 [ %95, %91 ], [ 4, %82 ]
  %98 = getelementptr inbounds i8, ptr %78, i64 %97
  %99 = lshr i32 %4, 16
  %100 = and i32 %99, 15
  %101 = icmp eq i32 %100, 0
  br i1 %101, label %130, label %102

102:                                              ; preds = %96
  %103 = zext nneg i32 %100 to i64
  %104 = getelementptr inbounds [6 x i32], ptr @_ZN2rw4xbox12v2dFormatMapE, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = getelementptr inbounds i8, ptr %0, i64 72
  %107 = load ptr, ptr %106, align 8, !tbaa !27
  %108 = load i32, ptr %17, align 8, !tbaa !23
  %109 = load i32, ptr %19, align 4, !tbaa !24
  tail call void @_ZN2rw15uninstTexCoordsEiPNS_9TexCoordsEPhjj(i32 noundef %105, ptr noundef %107, ptr noundef %98, i32 noundef %108, i32 noundef %109)
  %110 = icmp eq i32 %100, 4
  br i1 %110, label %116, label %111

111:                                              ; preds = %102
  %112 = getelementptr inbounds [6 x i32], ptr @_ZN2rw4xbox17vertexFormatSizesE, i64 0, i64 %103
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = shl i32 %113, 1
  %115 = zext i32 %114 to i64
  br label %116

116:                                              ; preds = %111, %102
  %117 = phi i64 [ %115, %111 ], [ 4, %102 ]
  %118 = lshr i32 %4, 20
  %119 = and i32 %118, 15
  %120 = icmp eq i32 %119, 0
  br i1 %120, label %130, label %121

121:                                              ; preds = %116
  %122 = getelementptr inbounds i8, ptr %98, i64 %117
  %123 = zext nneg i32 %119 to i64
  %124 = getelementptr inbounds [6 x i32], ptr @_ZN2rw4xbox12v2dFormatMapE, i64 0, i64 %123
  %125 = load i32, ptr %124, align 4, !tbaa !5
  %126 = getelementptr inbounds i8, ptr %0, i64 80
  %127 = load ptr, ptr %126, align 8, !tbaa !27
  %128 = load i32, ptr %17, align 8, !tbaa !23
  %129 = load i32, ptr %19, align 4, !tbaa !24
  tail call void @_ZN2rw15uninstTexCoordsEiPNS_9TexCoordsEPhjj(i32 noundef %125, ptr noundef %127, ptr noundef %122, i32 noundef %128, i32 noundef %129)
  br label %130

130:                                              ; preds = %121, %116, %96, %76, %58
  ret void
}

declare void @_ZN2rw9uninstV3dEiPNS_3V3dEPhjj(i32 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare void @_ZN2rw11uninstColorEiPNS_4RGBAEPhjj(i32 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare void @_ZN2rw15uninstTexCoordsEiPNS_9TexCoordsEPhjj(i32 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

attributes #0 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !13, i64 24}
!10 = !{!"_ZTSN2rw4xbox18InstanceDataHeaderE", !11, i64 0, !6, i64 4, !12, i64 8, !12, i64 10, !6, i64 12, !6, i64 16, !6, i64 20, !13, i64 24, !6, i64 32, !13, i64 40, !13, i64 48, !13, i64 56}
!11 = !{!"_ZTSN2rw18InstanceDataHeaderE", !6, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!15, !13, i64 120}
!15 = !{!"_ZTSN2rw8GeometryE", !16, i64 0, !6, i64 16, !12, 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, !17, i64 128, !13, i64 144, !13, i64 152, !6, i64 160}
!16 = !{!"_ZTSN2rw6ObjectE", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !13, i64 8}
!17 = !{!"_ZTSN2rw12MaterialListE", !13, i64 0, !6, i64 8, !6, i64 12}
!18 = !{!19, !13, i64 24}
!19 = !{!"_ZTSN2rw11MorphTargetE", !13, i64 0, !20, i64 8, !13, i64 24, !13, i64 32}
!20 = !{!"_ZTSN2rw6SphereE", !21, i64 0, !22, i64 12}
!21 = !{!"_ZTSN2rw3V3dE", !22, i64 0, !22, i64 4, !22, i64 8}
!22 = !{!"float", !7, i64 0}
!23 = !{!10, !6, i64 16}
!24 = !{!10, !6, i64 20}
!25 = !{!19, !13, i64 32}
!26 = !{!15, !13, i64 48}
!27 = !{!13, !13, i64 0}


; Effective O3 passes: ADCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass