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

; 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::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.8 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [76 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2rw8Geometry15addMorphTargetsEi(ptr noundef nonnull align 8 dereferenceable(168) %0, i32 noundef %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %12 = load ptr, ptr %3, align 8
  %13 = load i32, ptr %4, align 4, !tbaa !9
  %14 = icmp eq i32 %13, 0
  br i1 %14, label %15, label %16

15:                                               ; preds = %2
  br label %180

16:                                               ; preds = %2
  %17 = getelementptr inbounds %"struct.rw::Geometry", ptr %12, i32 0, i32 5
  %18 = load i32, ptr %17, align 8, !tbaa !11
  %19 = load i32, ptr %4, align 4, !tbaa !9
  %20 = add nsw i32 %19, %18
  store i32 %20, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 40, ptr %5, align 4, !tbaa !9
  %21 = getelementptr inbounds %"struct.rw::Geometry", ptr %12, i32 0, i32 1
  %22 = load i32, ptr %21, align 8, !tbaa !16
  %23 = and i32 %22, 16777216
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %48, label %25

25:                                               ; preds = %16
  %26 = getelementptr inbounds %"struct.rw::Geometry", ptr %12, i32 0, i32 4
  %27 = load i32, ptr %26, align 4, !tbaa !17
  %28 = sext i32 %27 to i64
  %29 = mul i64 %28, 12
  %30 = load i32, ptr %5, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = add i64 %31, %29
  %33 = trunc i64 %32 to i32
  store i32 %33, ptr %5, align 4, !tbaa !9
  %34 = getelementptr inbounds %"struct.rw::Geometry", ptr %12, i32 0, i32 1
  %35 = load i32, ptr %34, align 8, !tbaa !16
  %36 = and i32 %35, 16
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %38, label %47

38:                                               ; preds = %25
  %39 = getelementptr inbounds %"struct.rw::Geometry", ptr %12, i32 0, i32 4
  %40 = load i32, ptr %39, align 4, !tbaa !17
  %41 = sext i32 %40 to i64
  %42 = mul i64 %41, 12
  %43 = load i32, ptr %5, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = add i64 %44, %42
  %46 = trunc i64 %45 to i32
  store i32 %46, ptr %5, align 4, !tbaa !9
  br label %47

47:                                               ; preds = %38, %25
  br label %48

48:                                               ; preds = %47, %16
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %49 = getelementptr inbounds %"struct.rw::Geometry", ptr %12, i32 0, i32 5
  %50 = load i32, ptr %49, align 8, !tbaa !11
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %94

52:                                               ; preds = %48
  %53 = getelementptr inbounds %"struct.rw::Geometry", ptr %12, i32 0, i32 10
  %54 = load ptr, ptr %53, align 8, !tbaa !18
  %55 = load i32, ptr %4, align 4, !tbaa !9
  %56 = load i32, ptr %5, align 4, !tbaa !9
  %57 = mul nsw i32 %55, %56
  %58 = sext i32 %57 to i64
  %59 = call noundef ptr @_ZN2rw15mustrealloc_LOCEPvmjPKc(ptr noundef %54, i64 noundef %58, i32 noundef 196623, ptr noundef @.str.8)
  store ptr %59, ptr %6, align 8, !tbaa !5
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.rw::Geometry", ptr %12, i32 0, i32 10
  store ptr %60, ptr %61, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = load i32, ptr %5, align 4, !tbaa !9
  %64 = getelementptr inbounds %"struct.rw::Geometry", ptr %12, i32 0, i32 5
  %65 = load i32, ptr %64, align 8, !tbaa !11
  %66 = mul nsw i32 %63, %65
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds i8, ptr %62, i64 %67
  store ptr %68, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = load i32, ptr %5, align 4, !tbaa !9
  %71 = load i32, ptr %4, align 4, !tbaa !9
  %72 = mul nsw i32 %70, %71
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds i8, ptr %69, i64 %73
  store ptr %74, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %75 = load i32, ptr %5, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = sub i64 %76, 40
  %78 = getelementptr inbounds %"struct.rw::Geometry", ptr %12, i32 0, i32 5
  %79 = load i32, ptr %78, align 8, !tbaa !11
  %80 = sext i32 %79 to i64
  %81 = mul i64 %77, %80
  %82 = trunc i64 %81 to i32
  store i32 %82, ptr %9, align 4, !tbaa !9
  br label %83

83:                                               ; preds = %87, %52
  %84 = load i32, ptr %9, align 4, !tbaa !9
  %85 = add i32 %84, -1
  store i32 %85, ptr %9, align 4, !tbaa !9
  %86 = icmp ne i32 %84, 0
  br i1 %86, label %87, label %93

87:                                               ; preds = %83
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = getelementptr inbounds i8, ptr %88, i32 -1
  store ptr %89, ptr %7, align 8, !tbaa !5
  %90 = load i8, ptr %89, align 1, !tbaa !19
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = getelementptr inbounds i8, ptr %91, i32 -1
  store ptr %92, ptr %8, align 8, !tbaa !5
  store i8 %90, ptr %92, align 1, !tbaa !19
  br label %83, !llvm.loop !20

93:                                               ; preds = %83
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  br label %102

94:                                               ; preds = %48
  %95 = load i32, ptr %4, align 4, !tbaa !9
  %96 = load i32, ptr %5, align 4, !tbaa !9
  %97 = mul nsw i32 %95, %96
  %98 = sext i32 %97 to i64
  %99 = call noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef %98, i32 noundef 196623, ptr noundef @.str.9)
  store ptr %99, ptr %6, align 8, !tbaa !5
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.rw::Geometry", ptr %12, i32 0, i32 10
  store ptr %100, ptr %101, align 8, !tbaa !18
  br label %102

102:                                              ; preds = %94, %93
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = load i32, ptr %4, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %103, i64 %105
  store ptr %106, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %107

107:                                              ; preds = %174, %102
  %108 = load i32, ptr %11, align 4, !tbaa !9
  %109 = load i32, ptr %4, align 4, !tbaa !9
  %110 = icmp slt i32 %108, %109
  br i1 %110, label %112, label %111

111:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %177

112:                                              ; preds = %107
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %113, i32 0, i32 0
  store ptr %12, ptr %114, align 8, !tbaa !22
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %115, i32 0, i32 2
  store ptr null, ptr %116, align 8, !tbaa !27
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %117, i32 0, i32 3
  store ptr null, ptr %118, align 8, !tbaa !28
  %119 = load i32, ptr %11, align 4, !tbaa !9
  %120 = getelementptr inbounds %"struct.rw::Geometry", ptr %12, i32 0, i32 5
  %121 = load i32, ptr %120, align 8, !tbaa !11
  %122 = icmp sge i32 %119, %121
  br i1 %122, label %123, label %139

123:                                              ; preds = %112
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  %125 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %124, i32 0, i32 1
  %126 = getelementptr inbounds %"struct.rw::Sphere", ptr %125, i32 0, i32 0
  %127 = getelementptr inbounds %"struct.rw::V3d", ptr %126, i32 0, i32 0
  store float 0.000000e+00, ptr %127, align 8, !tbaa !29
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %128, i32 0, i32 1
  %130 = getelementptr inbounds %"struct.rw::Sphere", ptr %129, i32 0, i32 0
  %131 = getelementptr inbounds %"struct.rw::V3d", ptr %130, i32 0, i32 1
  store float 0.000000e+00, ptr %131, align 4, !tbaa !30
  %132 = load ptr, ptr %6, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %132, i32 0, i32 1
  %134 = getelementptr inbounds %"struct.rw::Sphere", ptr %133, i32 0, i32 0
  %135 = getelementptr inbounds %"struct.rw::V3d", ptr %134, i32 0, i32 2
  store float 0.000000e+00, ptr %135, align 8, !tbaa !31
  %136 = load ptr, ptr %6, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %136, i32 0, i32 1
  %138 = getelementptr inbounds %"struct.rw::Sphere", ptr %137, i32 0, i32 1
  store float 0.000000e+00, ptr %138, align 4, !tbaa !32
  br label %139

139:                                              ; preds = %123, %112
  %140 = getelementptr inbounds %"struct.rw::Geometry", ptr %12, i32 0, i32 1
  %141 = load i32, ptr %140, align 8, !tbaa !16
  %142 = and i32 %141, 16777216
  %143 = icmp ne i32 %142, 0
  br i1 %143, label %171, label %144

144:                                              ; preds = %139
  %145 = getelementptr inbounds %"struct.rw::Geometry", ptr %12, i32 0, i32 4
  %146 = load i32, ptr %145, align 4, !tbaa !17
  %147 = icmp ne i32 %146, 0
  br i1 %147, label %148, label %171

148:                                              ; preds = %144
  %149 = load ptr, ptr %10, align 8, !tbaa !5
  %150 = load ptr, ptr %6, align 8, !tbaa !5
  %151 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %150, i32 0, i32 2
  store ptr %149, ptr %151, align 8, !tbaa !27
  %152 = getelementptr inbounds %"struct.rw::Geometry", ptr %12, i32 0, i32 4
  %153 = load i32, ptr %152, align 4, !tbaa !17
  %154 = load ptr, ptr %10, align 8, !tbaa !5
  %155 = sext i32 %153 to i64
  %156 = getelementptr inbounds %"struct.rw::V3d", ptr %154, i64 %155
  store ptr %156, ptr %10, align 8, !tbaa !5
  %157 = getelementptr inbounds %"struct.rw::Geometry", ptr %12, i32 0, i32 1
  %158 = load i32, ptr %157, align 8, !tbaa !16
  %159 = and i32 %158, 16
  %160 = icmp ne i32 %159, 0
  br i1 %160, label %161, label %170

161:                                              ; preds = %148
  %162 = load ptr, ptr %10, align 8, !tbaa !5
  %163 = load ptr, ptr %6, align 8, !tbaa !5
  %164 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %163, i32 0, i32 3
  store ptr %162, ptr %164, align 8, !tbaa !28
  %165 = getelementptr inbounds %"struct.rw::Geometry", ptr %12, i32 0, i32 4
  %166 = load i32, ptr %165, align 4, !tbaa !17
  %167 = load ptr, ptr %10, align 8, !tbaa !5
  %168 = sext i32 %166 to i64
  %169 = getelementptr inbounds %"struct.rw::V3d", ptr %167, i64 %168
  store ptr %169, ptr %10, align 8, !tbaa !5
  br label %170

170:                                              ; preds = %161, %148
  br label %171

171:                                              ; preds = %170, %144, %139
  %172 = load ptr, ptr %6, align 8, !tbaa !5
  %173 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %172, i32 1
  store ptr %173, ptr %6, align 8, !tbaa !5
  br label %174

174:                                              ; preds = %171
  %175 = load i32, ptr %11, align 4, !tbaa !9
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %11, align 4, !tbaa !9
  br label %107, !llvm.loop !33

177:                                              ; preds = %111
  %178 = load i32, ptr %4, align 4, !tbaa !9
  %179 = getelementptr inbounds %"struct.rw::Geometry", ptr %12, i32 0, i32 5
  store i32 %178, ptr %179, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  br label %180

180:                                              ; preds = %177, %15
  ret void
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { nounwind }

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

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


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

@.str.8 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [76 x i8], align 1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2rw8Geometry15addMorphTargetsEi(ptr noundef nonnull align 8 dereferenceable(168) %0, i32 noundef %1) local_unnamed_addr #1 align 2 {
  %3 = icmp eq i32 %1, 0
  br i1 %3, label %175, label %4

4:                                                ; preds = %2
  %5 = getelementptr inbounds i8, ptr %0, i64 32
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = add i32 %6, %1
  %8 = getelementptr inbounds i8, ptr %0, i64 16
  %9 = load i32, ptr %8, align 8, !tbaa !14
  %10 = and i32 %9, 16777216
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %11, label %18

11:                                               ; preds = %4
  %12 = getelementptr inbounds i8, ptr %0, i64 28
  %13 = load i32, ptr %12, align 4, !tbaa !15
  %14 = mul i32 %13, 12
  %15 = add i32 %14, 40
  %16 = and i32 %9, 16
  %.not49 = icmp eq i32 %16, 0
  %17 = select i1 %.not49, i32 0, i32 %14
  %spec.select = add i32 %15, %17
  br label %18

18:                                               ; preds = %11, %4
  %.046 = phi i32 [ 40, %4 ], [ %spec.select, %11 ]
  %.not50 = icmp eq i32 %6, 0
  br i1 %.not50, label %83, label %19

19:                                               ; preds = %18
  %20 = getelementptr inbounds i8, ptr %0, i64 120
  %21 = load ptr, ptr %20, align 8, !tbaa !16
  %22 = mul nsw i32 %.046, %7
  %23 = sext i32 %22 to i64
  %24 = tail call noundef ptr @_ZN2rw15mustrealloc_LOCEPvmjPKc(ptr noundef %21, i64 noundef %23, i32 noundef 196623, ptr noundef nonnull @.str.8)
  store ptr %24, ptr %20, align 8, !tbaa !16
  %25 = load i32, ptr %5, align 8, !tbaa !5
  %26 = add i32 %.046, -40
  %27 = mul i32 %25, %26
  %.not5156 = icmp eq i32 %27, 0
  br i1 %.not5156, label %.loopexit, label %iter.check

iter.check:                                       ; preds = %19
  %28 = getelementptr inbounds i8, ptr %24, i64 %23
  %29 = mul i32 %25, %.046
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds i8, ptr %24, i64 %30
  %32 = zext i32 %27 to i64
  %min.iters.check = icmp ult i32 %27, 4
  br i1 %min.iters.check, label %.lr.ph.preheader, label %vector.scevcheck

vector.scevcheck:                                 ; preds = %iter.check
  %33 = add i32 %27, -1
  %34 = getelementptr i8, ptr %24, i64 %23
  %scevgep = getelementptr i8, ptr %34, i64 -1
  %35 = zext i32 %33 to i64
  %36 = sub nsw i64 0, %35
  %37 = getelementptr i8, ptr %scevgep, i64 %36
  %38 = icmp ugt ptr %37, %scevgep
  %39 = getelementptr i8, ptr %24, i64 %30
  %scevgep82 = getelementptr i8, ptr %39, i64 -1
  %40 = zext i32 %33 to i64
  %41 = sub nsw i64 0, %40
  %42 = getelementptr i8, ptr %scevgep82, i64 %41
  %43 = icmp ugt ptr %42, %scevgep82
  %44 = or i1 %38, %43
  %45 = sub nsw i64 %30, %23
  %diff.check = icmp ult i64 %45, 16
  %or.cond = select i1 %44, i1 true, i1 %diff.check
  br i1 %or.cond, label %.lr.ph.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %vector.scevcheck
  %min.iters.check86 = icmp ult i32 %27, 16
  br i1 %min.iters.check86, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %32, 4294967280
  %invariant.gep = getelementptr i8, ptr %31, i64 -16
  %invariant.gep139 = getelementptr i8, ptr %28, i64 -16
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = sub i64 0, %index
  %offset.idx87 = sub i64 0, %index
  %gep = getelementptr i8, ptr %invariant.gep, i64 %offset.idx87
  %wide.load = load <16 x i8>, ptr %gep, align 1, !tbaa !17
  %gep140 = getelementptr i8, ptr %invariant.gep139, i64 %offset.idx
  store <16 x i8> %wide.load, ptr %gep140, align 1, !tbaa !17
  %index.next = add nuw i64 %index, 16
  %46 = icmp eq i64 %index.next, %n.vec
  br i1 %46, label %middle.block, label %vector.body, !llvm.loop !18

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %32
  br i1 %cmp.n, label %.loopexit, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %47 = sub nsw i64 0, %n.vec
  %ind.end98 = getelementptr i8, ptr %31, i64 %47
  %48 = sub nsw i64 0, %n.vec
  %ind.end95 = getelementptr i8, ptr %28, i64 %48
  %.cast92 = trunc nuw i64 %n.vec to i32
  %ind.end93 = sub i32 %27, %.cast92
  %n.vec.remaining = and i64 %32, 12
  %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check, label %.lr.ph.preheader, label %vec.epilog.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.vec91 = and i64 %32, 4294967292
  %.cast = trunc nuw i64 %n.vec91 to i32
  %ind.end = sub i32 %27, %.cast
  %49 = sub nsw i64 0, %n.vec91
  %ind.end94 = getelementptr i8, ptr %28, i64 %49
  %50 = sub nsw i64 0, %n.vec91
  %ind.end97 = getelementptr i8, ptr %31, i64 %50
  %invariant.gep141 = getelementptr i8, ptr %31, i64 -4
  %invariant.gep143 = getelementptr i8, ptr %28, i64 -4
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index100 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next108, %vec.epilog.vector.body ]
  %offset.idx101 = sub i64 0, %index100
  %offset.idx103 = sub i64 0, %index100
  %gep142 = getelementptr i8, ptr %invariant.gep141, i64 %offset.idx103
  %wide.load105 = load <4 x i8>, ptr %gep142, align 1, !tbaa !17
  %gep144 = getelementptr i8, ptr %invariant.gep143, i64 %offset.idx101
  store <4 x i8> %wide.load105, ptr %gep144, align 1, !tbaa !17
  %index.next108 = add nuw i64 %index100, 4
  %51 = icmp eq i64 %index.next108, %n.vec91
  br i1 %51, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !22

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n109 = icmp eq i64 %n.vec91, %32
  br i1 %cmp.n109, label %.loopexit, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %vec.epilog.middle.block, %vector.scevcheck, %iter.check, %vec.epilog.iter.check
  %.04159.ph = phi i32 [ %27, %iter.check ], [ %27, %vector.scevcheck ], [ %ind.end93, %vec.epilog.iter.check ], [ %ind.end, %vec.epilog.middle.block ]
  %.04258.ph = phi ptr [ %28, %iter.check ], [ %28, %vector.scevcheck ], [ %ind.end95, %vec.epilog.iter.check ], [ %ind.end94, %vec.epilog.middle.block ]
  %.04357.ph = phi ptr [ %31, %iter.check ], [ %31, %vector.scevcheck ], [ %ind.end98, %vec.epilog.iter.check ], [ %ind.end97, %vec.epilog.middle.block ]
  %52 = add i32 %.04159.ph, -1
  %xtraiter = and i32 %.04159.ph, 7
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader, %.lr.ph.prol
  %.04159.prol = phi i32 [ %53, %.lr.ph.prol ], [ %.04159.ph, %.lr.ph.preheader ]
  %.04258.prol = phi ptr [ %56, %.lr.ph.prol ], [ %.04258.ph, %.lr.ph.preheader ]
  %.04357.prol = phi ptr [ %54, %.lr.ph.prol ], [ %.04357.ph, %.lr.ph.preheader ]
  %prol.iter = phi i32 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader ]
  %53 = add i32 %.04159.prol, -1
  %54 = getelementptr inbounds i8, ptr %.04357.prol, i64 -1
  %55 = load i8, ptr %54, align 1, !tbaa !17
  %56 = getelementptr inbounds i8, ptr %.04258.prol, i64 -1
  store i8 %55, ptr %56, align 1, !tbaa !17
  %prol.iter.next = add i32 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i32 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol, !llvm.loop !23

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader
  %.04159.unr = phi i32 [ %.04159.ph, %.lr.ph.preheader ], [ %53, %.lr.ph.prol ]
  %.04258.unr = phi ptr [ %.04258.ph, %.lr.ph.preheader ], [ %56, %.lr.ph.prol ]
  %.04357.unr = phi ptr [ %.04357.ph, %.lr.ph.preheader ], [ %54, %.lr.ph.prol ]
  %57 = icmp ult i32 %52, 7
  br i1 %57, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %.04159 = phi i32 [ %79, %.lr.ph ], [ %.04159.unr, %.lr.ph.prol.loopexit ]
  %.04258 = phi ptr [ %82, %.lr.ph ], [ %.04258.unr, %.lr.ph.prol.loopexit ]
  %.04357 = phi ptr [ %80, %.lr.ph ], [ %.04357.unr, %.lr.ph.prol.loopexit ]
  %58 = getelementptr inbounds i8, ptr %.04357, i64 -1
  %59 = load i8, ptr %58, align 1, !tbaa !17
  %60 = getelementptr inbounds i8, ptr %.04258, i64 -1
  store i8 %59, ptr %60, align 1, !tbaa !17
  %61 = getelementptr inbounds i8, ptr %.04357, i64 -2
  %62 = load i8, ptr %61, align 1, !tbaa !17
  %63 = getelementptr inbounds i8, ptr %.04258, i64 -2
  store i8 %62, ptr %63, align 1, !tbaa !17
  %64 = getelementptr inbounds i8, ptr %.04357, i64 -3
  %65 = load i8, ptr %64, align 1, !tbaa !17
  %66 = getelementptr inbounds i8, ptr %.04258, i64 -3
  store i8 %65, ptr %66, align 1, !tbaa !17
  %67 = getelementptr inbounds i8, ptr %.04357, i64 -4
  %68 = load i8, ptr %67, align 1, !tbaa !17
  %69 = getelementptr inbounds i8, ptr %.04258, i64 -4
  store i8 %68, ptr %69, align 1, !tbaa !17
  %70 = getelementptr inbounds i8, ptr %.04357, i64 -5
  %71 = load i8, ptr %70, align 1, !tbaa !17
  %72 = getelementptr inbounds i8, ptr %.04258, i64 -5
  store i8 %71, ptr %72, align 1, !tbaa !17
  %73 = getelementptr inbounds i8, ptr %.04357, i64 -6
  %74 = load i8, ptr %73, align 1, !tbaa !17
  %75 = getelementptr inbounds i8, ptr %.04258, i64 -6
  store i8 %74, ptr %75, align 1, !tbaa !17
  %76 = getelementptr inbounds i8, ptr %.04357, i64 -7
  %77 = load i8, ptr %76, align 1, !tbaa !17
  %78 = getelementptr inbounds i8, ptr %.04258, i64 -7
  store i8 %77, ptr %78, align 1, !tbaa !17
  %79 = add i32 %.04159, -8
  %80 = getelementptr inbounds i8, ptr %.04357, i64 -8
  %81 = load i8, ptr %80, align 1, !tbaa !17
  %82 = getelementptr inbounds i8, ptr %.04258, i64 -8
  store i8 %81, ptr %82, align 1, !tbaa !17
  %.not51.7 = icmp eq i32 %79, 0
  br i1 %.not51.7, label %.loopexit, label %.lr.ph, !llvm.loop !25

83:                                               ; preds = %18
  %84 = mul nsw i32 %.046, %7
  %85 = sext i32 %84 to i64
  %86 = tail call noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef %85, i32 noundef 196623, ptr noundef nonnull @.str.9)
  %87 = getelementptr inbounds i8, ptr %0, i64 120
  store ptr %86, ptr %87, align 8, !tbaa !16
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %middle.block, %vec.epilog.middle.block, %19, %83
  %.044 = phi ptr [ %86, %83 ], [ %24, %19 ], [ %24, %vec.epilog.middle.block ], [ %24, %middle.block ], [ %24, %.lr.ph ], [ %24, %.lr.ph.prol.loopexit ]
  %88 = sext i32 %7 to i64
  %89 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %.044, i64 %88
  %90 = icmp sgt i32 %7, 0
  br i1 %90, label %.lr.ph63, label %._crit_edge

.lr.ph63:                                         ; preds = %.loopexit
  %91 = load i32, ptr %5, align 8, !tbaa !5
  %92 = load i32, ptr %8, align 8, !tbaa !14
  %93 = and i32 %92, 16777216
  %.not53 = icmp eq i32 %93, 0
  %94 = getelementptr inbounds i8, ptr %0, i64 28
  %95 = load i32, ptr %94, align 4
  %96 = sext i32 %95 to i64
  %97 = and i32 %92, 16
  %.not55 = icmp eq i32 %97, 0
  br i1 %.not53, label %.lr.ph63.split.us, label %.lr.ph63.split.preheader

.lr.ph63.split.preheader:                         ; preds = %.lr.ph63
  %98 = add i32 %6, %1
  %xtraiter113 = and i32 %7, 1
  %99 = icmp eq i32 %98, 1
  br i1 %99, label %._crit_edge.loopexit112.unr-lcssa, label %.lr.ph63.split.preheader.new

.lr.ph63.split.preheader.new:                     ; preds = %.lr.ph63.split.preheader
  %unroll_iter = and i32 %7, 2147483646
  br label %.lr.ph63.split

.lr.ph63.split.us:                                ; preds = %.lr.ph63
  %.not54 = icmp eq i32 %95, 0
  br i1 %.not54, label %.lr.ph63.split.us.split.us.preheader, label %.lr.ph63.split.us.split

.lr.ph63.split.us.split.us.preheader:             ; preds = %.lr.ph63.split.us
  %100 = add i32 %6, %1
  %xtraiter123 = and i32 %7, 1
  %101 = icmp eq i32 %100, 1
  br i1 %101, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph63.split.us.split.us.preheader.new

.lr.ph63.split.us.split.us.preheader.new:         ; preds = %.lr.ph63.split.us.split.us.preheader
  %unroll_iter125 = and i32 %7, 2147483646
  br label %.lr.ph63.split.us.split.us

.lr.ph63.split.us.split.us:                       ; preds = %110, %.lr.ph63.split.us.split.us.preheader.new
  %.062.us.us = phi i32 [ 0, %.lr.ph63.split.us.split.us.preheader.new ], [ %112, %110 ]
  %.14560.us.us = phi ptr [ %.044, %.lr.ph63.split.us.split.us.preheader.new ], [ %111, %110 ]
  %niter126 = phi i32 [ 0, %.lr.ph63.split.us.split.us.preheader.new ], [ %niter126.next.1, %110 ]
  store ptr %0, ptr %.14560.us.us, align 8, !tbaa !26
  %102 = getelementptr inbounds i8, ptr %.14560.us.us, i64 24
  %.not52.us.us = icmp slt i32 %.062.us.us, %91
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %102, i8 0, i64 16, i1 false)
  br i1 %.not52.us.us, label %.lr.ph63.split.us.split.us.1, label %103

103:                                              ; preds = %.lr.ph63.split.us.split.us
  %104 = getelementptr inbounds i8, ptr %.14560.us.us, i64 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %104, i8 0, i64 16, i1 false)
  br label %.lr.ph63.split.us.split.us.1

.lr.ph63.split.us.split.us.1:                     ; preds = %103, %.lr.ph63.split.us.split.us
  %105 = getelementptr inbounds i8, ptr %.14560.us.us, i64 40
  %106 = or disjoint i32 %.062.us.us, 1
  store ptr %0, ptr %105, align 8, !tbaa !26
  %107 = getelementptr inbounds i8, ptr %.14560.us.us, i64 64
  %.not52.us.us.1 = icmp slt i32 %106, %91
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %107, i8 0, i64 16, i1 false)
  br i1 %.not52.us.us.1, label %110, label %108

108:                                              ; preds = %.lr.ph63.split.us.split.us.1
  %109 = getelementptr inbounds i8, ptr %.14560.us.us, i64 48
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %109, i8 0, i64 16, i1 false)
  br label %110

110:                                              ; preds = %108, %.lr.ph63.split.us.split.us.1
  %111 = getelementptr inbounds i8, ptr %.14560.us.us, i64 80
  %112 = add nuw nsw i32 %.062.us.us, 2
  %niter126.next.1 = add i32 %niter126, 2
  %niter126.ncmp.1 = icmp eq i32 %niter126.next.1, %unroll_iter125
  br i1 %niter126.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph63.split.us.split.us, !llvm.loop !31

.lr.ph63.split.us.split:                          ; preds = %.lr.ph63.split.us
  br i1 %.not55, label %.lr.ph63.split.us.split.split.us.preheader, label %.lr.ph63.split.us.split.split.preheader

.lr.ph63.split.us.split.split.preheader:          ; preds = %.lr.ph63.split.us.split
  %113 = add i32 %6, %1
  %xtraiter115 = and i32 %7, 1
  %114 = icmp eq i32 %113, 1
  br i1 %114, label %._crit_edge.loopexit111.unr-lcssa, label %.lr.ph63.split.us.split.split.preheader.new

.lr.ph63.split.us.split.split.preheader.new:      ; preds = %.lr.ph63.split.us.split.split.preheader
  %unroll_iter117 = and i32 %7, 2147483646
  br label %.lr.ph63.split.us.split.split

.lr.ph63.split.us.split.split.us.preheader:       ; preds = %.lr.ph63.split.us.split
  %115 = add i32 %6, %1
  %xtraiter119 = and i32 %7, 1
  %116 = icmp eq i32 %115, 1
  br i1 %116, label %._crit_edge.loopexit110.unr-lcssa, label %.lr.ph63.split.us.split.split.us.preheader.new

.lr.ph63.split.us.split.split.us.preheader.new:   ; preds = %.lr.ph63.split.us.split.split.us.preheader
  %unroll_iter121 = and i32 %7, 2147483646
  br label %.lr.ph63.split.us.split.split.us

.lr.ph63.split.us.split.split.us:                 ; preds = %128, %.lr.ph63.split.us.split.split.us.preheader.new
  %.062.us.us64 = phi i32 [ 0, %.lr.ph63.split.us.split.split.us.preheader.new ], [ %131, %128 ]
  %.04061.us.us65 = phi ptr [ %89, %.lr.ph63.split.us.split.split.us.preheader.new ], [ %129, %128 ]
  %.14560.us.us66 = phi ptr [ %.044, %.lr.ph63.split.us.split.split.us.preheader.new ], [ %130, %128 ]
  %niter122 = phi i32 [ 0, %.lr.ph63.split.us.split.split.us.preheader.new ], [ %niter122.next.1, %128 ]
  store ptr %0, ptr %.14560.us.us66, align 8, !tbaa !26
  %117 = getelementptr inbounds i8, ptr %.14560.us.us66, i64 24
  %.not52.us.us67 = icmp slt i32 %.062.us.us64, %91
  %118 = getelementptr inbounds i8, ptr %.14560.us.us66, i64 32
  store i64 0, ptr %118, align 8
  br i1 %.not52.us.us67, label %.lr.ph63.split.us.split.split.us.1, label %119

119:                                              ; preds = %.lr.ph63.split.us.split.split.us
  %120 = getelementptr inbounds i8, ptr %.14560.us.us66, i64 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %120, i8 0, i64 16, i1 false)
  br label %.lr.ph63.split.us.split.split.us.1

.lr.ph63.split.us.split.split.us.1:               ; preds = %119, %.lr.ph63.split.us.split.split.us
  store ptr %.04061.us.us65, ptr %117, align 8, !tbaa !32
  %121 = getelementptr inbounds %"struct.rw::V3d", ptr %.04061.us.us65, i64 %96
  %122 = getelementptr inbounds i8, ptr %.14560.us.us66, i64 40
  %123 = or disjoint i32 %.062.us.us64, 1
  store ptr %0, ptr %122, align 8, !tbaa !26
  %124 = getelementptr inbounds i8, ptr %.14560.us.us66, i64 64
  %.not52.us.us67.1 = icmp slt i32 %123, %91
  %125 = getelementptr inbounds i8, ptr %.14560.us.us66, i64 72
  store i64 0, ptr %125, align 8
  br i1 %.not52.us.us67.1, label %128, label %126

126:                                              ; preds = %.lr.ph63.split.us.split.split.us.1
  %127 = getelementptr inbounds i8, ptr %.14560.us.us66, i64 48
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %127, i8 0, i64 16, i1 false)
  br label %128

128:                                              ; preds = %126, %.lr.ph63.split.us.split.split.us.1
  store ptr %121, ptr %124, align 8, !tbaa !32
  %129 = getelementptr inbounds %"struct.rw::V3d", ptr %121, i64 %96
  %130 = getelementptr inbounds i8, ptr %.14560.us.us66, i64 80
  %131 = add nuw nsw i32 %.062.us.us64, 2
  %niter122.next.1 = add i32 %niter122, 2
  %niter122.ncmp.1 = icmp eq i32 %niter122.next.1, %unroll_iter121
  br i1 %niter122.ncmp.1, label %._crit_edge.loopexit110.unr-lcssa, label %.lr.ph63.split.us.split.split.us, !llvm.loop !31

.lr.ph63.split.us.split.split:                    ; preds = %144, %.lr.ph63.split.us.split.split.preheader.new
  %.062.us = phi i32 [ 0, %.lr.ph63.split.us.split.split.preheader.new ], [ %148, %144 ]
  %.04061.us = phi ptr [ %89, %.lr.ph63.split.us.split.split.preheader.new ], [ %146, %144 ]
  %.14560.us = phi ptr [ %.044, %.lr.ph63.split.us.split.split.preheader.new ], [ %147, %144 ]
  %niter118 = phi i32 [ 0, %.lr.ph63.split.us.split.split.preheader.new ], [ %niter118.next.1, %144 ]
  store ptr %0, ptr %.14560.us, align 8, !tbaa !26
  %132 = getelementptr inbounds i8, ptr %.14560.us, i64 24
  %133 = getelementptr inbounds i8, ptr %.14560.us, i64 32
  %.not52.us = icmp slt i32 %.062.us, %91
  br i1 %.not52.us, label %.lr.ph63.split.us.split.split.1, label %134

134:                                              ; preds = %.lr.ph63.split.us.split.split
  %135 = getelementptr inbounds i8, ptr %.14560.us, i64 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %135, i8 0, i64 16, i1 false)
  br label %.lr.ph63.split.us.split.split.1

.lr.ph63.split.us.split.split.1:                  ; preds = %134, %.lr.ph63.split.us.split.split
  store ptr %.04061.us, ptr %132, align 8, !tbaa !32
  %136 = getelementptr inbounds %"struct.rw::V3d", ptr %.04061.us, i64 %96
  store ptr %136, ptr %133, align 8, !tbaa !33
  %137 = getelementptr inbounds %"struct.rw::V3d", ptr %136, i64 %96
  %138 = getelementptr inbounds i8, ptr %.14560.us, i64 40
  %139 = or disjoint i32 %.062.us, 1
  store ptr %0, ptr %138, align 8, !tbaa !26
  %140 = getelementptr inbounds i8, ptr %.14560.us, i64 64
  %141 = getelementptr inbounds i8, ptr %.14560.us, i64 72
  %.not52.us.1 = icmp slt i32 %139, %91
  br i1 %.not52.us.1, label %144, label %142

142:                                              ; preds = %.lr.ph63.split.us.split.split.1
  %143 = getelementptr inbounds i8, ptr %.14560.us, i64 48
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %143, i8 0, i64 16, i1 false)
  br label %144

144:                                              ; preds = %142, %.lr.ph63.split.us.split.split.1
  store ptr %137, ptr %140, align 8, !tbaa !32
  %145 = getelementptr inbounds %"struct.rw::V3d", ptr %137, i64 %96
  store ptr %145, ptr %141, align 8, !tbaa !33
  %146 = getelementptr inbounds %"struct.rw::V3d", ptr %145, i64 %96
  %147 = getelementptr inbounds i8, ptr %.14560.us, i64 80
  %148 = add nuw nsw i32 %.062.us, 2
  %niter118.next.1 = add i32 %niter118, 2
  %niter118.ncmp.1 = icmp eq i32 %niter118.next.1, %unroll_iter117
  br i1 %niter118.ncmp.1, label %._crit_edge.loopexit111.unr-lcssa, label %.lr.ph63.split.us.split.split, !llvm.loop !31

._crit_edge.loopexit.unr-lcssa:                   ; preds = %110, %.lr.ph63.split.us.split.us.preheader
  %.062.us.us.unr = phi i32 [ 0, %.lr.ph63.split.us.split.us.preheader ], [ %112, %110 ]
  %.14560.us.us.unr = phi ptr [ %.044, %.lr.ph63.split.us.split.us.preheader ], [ %111, %110 ]
  %lcmp.mod124.not = icmp eq i32 %xtraiter123, 0
  br i1 %lcmp.mod124.not, label %._crit_edge, label %.lr.ph63.split.us.split.us.epil

.lr.ph63.split.us.split.us.epil:                  ; preds = %._crit_edge.loopexit.unr-lcssa
  store ptr %0, ptr %.14560.us.us.unr, align 8, !tbaa !26
  %149 = getelementptr inbounds i8, ptr %.14560.us.us.unr, i64 24
  %.not52.us.us.epil = icmp slt i32 %.062.us.us.unr, %91
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %149, i8 0, i64 16, i1 false)
  br i1 %.not52.us.us.epil, label %._crit_edge, label %150

150:                                              ; preds = %.lr.ph63.split.us.split.us.epil
  %151 = getelementptr inbounds i8, ptr %.14560.us.us.unr, i64 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %151, i8 0, i64 16, i1 false)
  br label %._crit_edge

._crit_edge.loopexit110.unr-lcssa:                ; preds = %128, %.lr.ph63.split.us.split.split.us.preheader
  %.062.us.us64.unr = phi i32 [ 0, %.lr.ph63.split.us.split.split.us.preheader ], [ %131, %128 ]
  %.04061.us.us65.unr = phi ptr [ %89, %.lr.ph63.split.us.split.split.us.preheader ], [ %129, %128 ]
  %.14560.us.us66.unr = phi ptr [ %.044, %.lr.ph63.split.us.split.split.us.preheader ], [ %130, %128 ]
  %lcmp.mod120.not = icmp eq i32 %xtraiter119, 0
  br i1 %lcmp.mod120.not, label %._crit_edge, label %.lr.ph63.split.us.split.split.us.epil

.lr.ph63.split.us.split.split.us.epil:            ; preds = %._crit_edge.loopexit110.unr-lcssa
  store ptr %0, ptr %.14560.us.us66.unr, align 8, !tbaa !26
  %152 = getelementptr inbounds i8, ptr %.14560.us.us66.unr, i64 24
  %.not52.us.us67.epil = icmp slt i32 %.062.us.us64.unr, %91
  %153 = getelementptr inbounds i8, ptr %.14560.us.us66.unr, i64 32
  store i64 0, ptr %153, align 8
  br i1 %.not52.us.us67.epil, label %._crit_edge.loopexit110.epilog-lcssa, label %154

154:                                              ; preds = %.lr.ph63.split.us.split.split.us.epil
  %155 = getelementptr inbounds i8, ptr %.14560.us.us66.unr, i64 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %155, i8 0, i64 16, i1 false)
  br label %._crit_edge.loopexit110.epilog-lcssa

._crit_edge.loopexit110.epilog-lcssa:             ; preds = %154, %.lr.ph63.split.us.split.split.us.epil
  store ptr %.04061.us.us65.unr, ptr %152, align 8, !tbaa !32
  br label %._crit_edge

._crit_edge.loopexit111.unr-lcssa:                ; preds = %144, %.lr.ph63.split.us.split.split.preheader
  %.062.us.unr = phi i32 [ 0, %.lr.ph63.split.us.split.split.preheader ], [ %148, %144 ]
  %.04061.us.unr = phi ptr [ %89, %.lr.ph63.split.us.split.split.preheader ], [ %146, %144 ]
  %.14560.us.unr = phi ptr [ %.044, %.lr.ph63.split.us.split.split.preheader ], [ %147, %144 ]
  %lcmp.mod116.not = icmp eq i32 %xtraiter115, 0
  br i1 %lcmp.mod116.not, label %._crit_edge, label %.lr.ph63.split.us.split.split.epil

.lr.ph63.split.us.split.split.epil:               ; preds = %._crit_edge.loopexit111.unr-lcssa
  store ptr %0, ptr %.14560.us.unr, align 8, !tbaa !26
  %156 = getelementptr inbounds i8, ptr %.14560.us.unr, i64 24
  %157 = getelementptr inbounds i8, ptr %.14560.us.unr, i64 32
  %.not52.us.epil = icmp slt i32 %.062.us.unr, %91
  br i1 %.not52.us.epil, label %._crit_edge.loopexit111.epilog-lcssa, label %158

158:                                              ; preds = %.lr.ph63.split.us.split.split.epil
  %159 = getelementptr inbounds i8, ptr %.14560.us.unr, i64 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %159, i8 0, i64 16, i1 false)
  br label %._crit_edge.loopexit111.epilog-lcssa

._crit_edge.loopexit111.epilog-lcssa:             ; preds = %158, %.lr.ph63.split.us.split.split.epil
  store ptr %.04061.us.unr, ptr %156, align 8, !tbaa !32
  %160 = getelementptr inbounds %"struct.rw::V3d", ptr %.04061.us.unr, i64 %96
  store ptr %160, ptr %157, align 8, !tbaa !33
  br label %._crit_edge

._crit_edge.loopexit112.unr-lcssa:                ; preds = %172, %.lr.ph63.split.preheader
  %.062.unr = phi i32 [ 0, %.lr.ph63.split.preheader ], [ %174, %172 ]
  %.14560.unr = phi ptr [ %.044, %.lr.ph63.split.preheader ], [ %173, %172 ]
  %lcmp.mod114.not = icmp eq i32 %xtraiter113, 0
  br i1 %lcmp.mod114.not, label %._crit_edge, label %.lr.ph63.split.epil

.lr.ph63.split.epil:                              ; preds = %._crit_edge.loopexit112.unr-lcssa
  store ptr %0, ptr %.14560.unr, align 8, !tbaa !26
  %161 = getelementptr inbounds i8, ptr %.14560.unr, i64 24
  %.not52.epil = icmp slt i32 %.062.unr, %91
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %161, i8 0, i64 16, i1 false)
  br i1 %.not52.epil, label %._crit_edge, label %162

162:                                              ; preds = %.lr.ph63.split.epil
  %163 = getelementptr inbounds i8, ptr %.14560.unr, i64 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %163, i8 0, i64 16, i1 false)
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit112.unr-lcssa, %162, %.lr.ph63.split.epil, %._crit_edge.loopexit111.epilog-lcssa, %._crit_edge.loopexit111.unr-lcssa, %._crit_edge.loopexit110.epilog-lcssa, %._crit_edge.loopexit110.unr-lcssa, %._crit_edge.loopexit.unr-lcssa, %150, %.lr.ph63.split.us.split.us.epil, %.loopexit
  store i32 %7, ptr %5, align 8, !tbaa !5
  br label %175

.lr.ph63.split:                                   ; preds = %172, %.lr.ph63.split.preheader.new
  %.062 = phi i32 [ 0, %.lr.ph63.split.preheader.new ], [ %174, %172 ]
  %.14560 = phi ptr [ %.044, %.lr.ph63.split.preheader.new ], [ %173, %172 ]
  %niter = phi i32 [ 0, %.lr.ph63.split.preheader.new ], [ %niter.next.1, %172 ]
  store ptr %0, ptr %.14560, align 8, !tbaa !26
  %164 = getelementptr inbounds i8, ptr %.14560, i64 24
  %.not52 = icmp slt i32 %.062, %91
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %164, i8 0, i64 16, i1 false)
  br i1 %.not52, label %.lr.ph63.split.1, label %165

165:                                              ; preds = %.lr.ph63.split
  %166 = getelementptr inbounds i8, ptr %.14560, i64 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %166, i8 0, i64 16, i1 false)
  br label %.lr.ph63.split.1

.lr.ph63.split.1:                                 ; preds = %165, %.lr.ph63.split
  %167 = getelementptr inbounds i8, ptr %.14560, i64 40
  %168 = or disjoint i32 %.062, 1
  store ptr %0, ptr %167, align 8, !tbaa !26
  %169 = getelementptr inbounds i8, ptr %.14560, i64 64
  %.not52.1 = icmp slt i32 %168, %91
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %169, i8 0, i64 16, i1 false)
  br i1 %.not52.1, label %172, label %170

170:                                              ; preds = %.lr.ph63.split.1
  %171 = getelementptr inbounds i8, ptr %.14560, i64 48
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %171, i8 0, i64 16, i1 false)
  br label %172

172:                                              ; preds = %170, %.lr.ph63.split.1
  %173 = getelementptr inbounds i8, ptr %.14560, i64 80
  %174 = add nuw nsw i32 %.062, 2
  %niter.next.1 = add i32 %niter, 2
  %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit112.unr-lcssa, label %.lr.ph63.split, !llvm.loop !31

175:                                              ; preds = %2, %._crit_edge
  ret void
}

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

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

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

!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, !11, i64 32}
!6 = !{!"_ZTSN2rw8GeometryE", !7, i64 0, !11, i64 16, !12, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !10, i64 40, !10, i64 48, !8, i64 56, !10, i64 120, !13, i64 128, !10, i64 144, !10, i64 152, !11, i64 160}
!7 = !{!"_ZTSN2rw6ObjectE", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !10, i64 8}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"short", !8, i64 0}
!13 = !{!"_ZTSN2rw12MaterialListE", !10, i64 0, !11, i64 8, !11, i64 12}
!14 = !{!6, !11, i64 16}
!15 = !{!6, !11, i64 28}
!16 = !{!6, !10, i64 120}
!17 = !{!8, !8, i64 0}
!18 = distinct !{!18, !19, !20, !21}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!"llvm.loop.isvectorized", i32 1}
!21 = !{!"llvm.loop.unroll.runtime.disable"}
!22 = distinct !{!22, !19, !20, !21}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.unroll.disable"}
!25 = distinct !{!25, !19, !20}
!26 = !{!27, !10, i64 0}
!27 = !{!"_ZTSN2rw11MorphTargetE", !10, i64 0, !28, i64 8, !10, i64 24, !10, i64 32}
!28 = !{!"_ZTSN2rw6SphereE", !29, i64 0, !30, i64 12}
!29 = !{!"_ZTSN2rw3V3dE", !30, i64 0, !30, i64 4, !30, i64 8}
!30 = !{!"float", !8, i64 0}
!31 = distinct !{!31, !19}
!32 = !{!27, !10, i64 24}
!33 = !{!27, !10, i64 32}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,MemCpyOptPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass