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

; 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::Triangle" = type { [3 x i16], i16 }
%"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.10 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.11 = 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: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN2rw15mustrealloc_LOCEPvmjPKc(ptr noundef, i64 noundef, i32 noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2rw8Geometry12allocateDataEv(ptr noundef nonnull align 8 dereferenceable(168) %0) #2 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  %11 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 3
  %12 = load i32, ptr %11, align 8, !tbaa !9
  %13 = sext i32 %12 to i64
  %14 = mul i64 %13, 8
  %15 = trunc i64 %14 to i32
  store i32 %15, ptr %3, align 4, !tbaa !15
  %16 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 1
  %17 = load i32, ptr %16, align 8, !tbaa !16
  %18 = and i32 %17, 8
  %19 = icmp ne i32 %18, 0
  br i1 %19, label %20, label %29

20:                                               ; preds = %1
  %21 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 4
  %22 = load i32, ptr %21, align 4, !tbaa !17
  %23 = sext i32 %22 to i64
  %24 = mul i64 %23, 4
  %25 = load i32, ptr %3, align 4, !tbaa !15
  %26 = sext i32 %25 to i64
  %27 = add i64 %26, %24
  %28 = trunc i64 %27 to i32
  store i32 %28, ptr %3, align 4, !tbaa !15
  br label %29

29:                                               ; preds = %20, %1
  %30 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 6
  %31 = load i32, ptr %30, align 4, !tbaa !18
  %32 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 4
  %33 = load i32, ptr %32, align 4, !tbaa !17
  %34 = mul nsw i32 %31, %33
  %35 = sext i32 %34 to i64
  %36 = mul i64 %35, 8
  %37 = load i32, ptr %3, align 4, !tbaa !15
  %38 = sext i32 %37 to i64
  %39 = add i64 %38, %36
  %40 = trunc i64 %39 to i32
  store i32 %40, ptr %3, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  %41 = load i32, ptr %3, align 4, !tbaa !15
  %42 = sext i32 %41 to i64
  %43 = call noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef %42, i32 noundef 196623, ptr noundef @.str.10)
  store ptr %43, ptr %4, align 8, !tbaa !5
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 7
  store ptr %44, ptr %45, align 8, !tbaa !19
  %46 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 3
  %47 = load i32, ptr %46, align 8, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = mul i64 %48, 8
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %50, i64 %49
  store ptr %51, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 0, ptr %5, align 4, !tbaa !15
  br label %52

52:                                               ; preds = %65, %29
  %53 = load i32, ptr %5, align 4, !tbaa !15
  %54 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 3
  %55 = load i32, ptr %54, align 8, !tbaa !9
  %56 = icmp slt i32 %53, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  br label %68

58:                                               ; preds = %52
  %59 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 7
  %60 = load ptr, ptr %59, align 8, !tbaa !19
  %61 = load i32, ptr %5, align 4, !tbaa !15
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds %"struct.rw::Triangle", ptr %60, i64 %62
  %64 = getelementptr inbounds %"struct.rw::Triangle", ptr %63, i32 0, i32 1
  store i16 -1, ptr %64, align 2, !tbaa !20
  br label %65

65:                                               ; preds = %58
  %66 = load i32, ptr %5, align 4, !tbaa !15
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %5, align 4, !tbaa !15
  br label %52, !llvm.loop !22

68:                                               ; preds = %57
  %69 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 1
  %70 = load i32, ptr %69, align 8, !tbaa !16
  %71 = and i32 %70, 8
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %73, label %82

73:                                               ; preds = %68
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 8
  store ptr %74, ptr %75, align 8, !tbaa !24
  %76 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 4
  %77 = load i32, ptr %76, align 4, !tbaa !17
  %78 = sext i32 %77 to i64
  %79 = mul i64 %78, 4
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds i8, ptr %80, i64 %79
  store ptr %81, ptr %4, align 8, !tbaa !5
  br label %82

82:                                               ; preds = %73, %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  store i32 0, ptr %6, align 4, !tbaa !15
  br label %83

83:                                               ; preds = %101, %82
  %84 = load i32, ptr %6, align 4, !tbaa !15
  %85 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 6
  %86 = load i32, ptr %85, align 4, !tbaa !18
  %87 = icmp slt i32 %84, %86
  br i1 %87, label %89, label %88

88:                                               ; preds = %83
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  br label %104

89:                                               ; preds = %83
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 9
  %92 = load i32, ptr %6, align 4, !tbaa !15
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [8 x ptr], ptr %91, i64 0, i64 %93
  store ptr %90, ptr %94, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 4
  %96 = load i32, ptr %95, align 4, !tbaa !17
  %97 = sext i32 %96 to i64
  %98 = mul i64 %97, 8
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = getelementptr inbounds i8, ptr %99, i64 %98
  store ptr %100, ptr %4, align 8, !tbaa !5
  br label %101

101:                                              ; preds = %89
  %102 = load i32, ptr %6, align 4, !tbaa !15
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %6, align 4, !tbaa !15
  br label %83, !llvm.loop !25

104:                                              ; preds = %88
  %105 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 4
  %106 = load i32, ptr %105, align 4, !tbaa !17
  %107 = sext i32 %106 to i64
  %108 = mul i64 %107, 12
  %109 = add i64 40, %108
  %110 = trunc i64 %109 to i32
  store i32 %110, ptr %3, align 4, !tbaa !15
  %111 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 1
  %112 = load i32, ptr %111, align 8, !tbaa !16
  %113 = and i32 %112, 16
  %114 = icmp ne i32 %113, 0
  br i1 %114, label %115, label %124

115:                                              ; preds = %104
  %116 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 4
  %117 = load i32, ptr %116, align 4, !tbaa !17
  %118 = sext i32 %117 to i64
  %119 = mul i64 %118, 12
  %120 = load i32, ptr %3, align 4, !tbaa !15
  %121 = sext i32 %120 to i64
  %122 = add i64 %121, %119
  %123 = trunc i64 %122 to i32
  store i32 %123, ptr %3, align 4, !tbaa !15
  br label %124

124:                                              ; preds = %115, %104
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %125 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 10
  %126 = load ptr, ptr %125, align 8, !tbaa !26
  %127 = load i32, ptr %3, align 4, !tbaa !15
  %128 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 5
  %129 = load i32, ptr %128, align 8, !tbaa !27
  %130 = mul nsw i32 %127, %129
  %131 = sext i32 %130 to i64
  %132 = call noundef ptr @_ZN2rw15mustrealloc_LOCEPvmjPKc(ptr noundef %126, i64 noundef %131, i32 noundef 196623, ptr noundef @.str.11)
  store ptr %132, ptr %7, align 8, !tbaa !5
  %133 = load ptr, ptr %7, align 8, !tbaa !5
  %134 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 10
  store ptr %133, ptr %134, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %135 = load ptr, ptr %7, align 8, !tbaa !5
  %136 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 5
  %137 = load i32, ptr %136, align 8, !tbaa !27
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %135, i64 %138
  store ptr %139, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !15
  br label %140

140:                                              ; preds = %182, %124
  %141 = load i32, ptr %9, align 4, !tbaa !15
  %142 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 5
  %143 = load i32, ptr %142, align 8, !tbaa !27
  %144 = icmp slt i32 %141, %143
  br i1 %144, label %146, label %145

145:                                              ; preds = %140
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %185

146:                                              ; preds = %140
  %147 = load ptr, ptr %7, align 8, !tbaa !5
  %148 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %147, i32 0, i32 0
  store ptr %10, ptr %148, align 8, !tbaa !28
  %149 = load ptr, ptr %7, align 8, !tbaa !5
  %150 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %149, i32 0, i32 2
  store ptr null, ptr %150, align 8, !tbaa !33
  %151 = load ptr, ptr %7, align 8, !tbaa !5
  %152 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %151, i32 0, i32 3
  store ptr null, ptr %152, align 8, !tbaa !34
  %153 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 4
  %154 = load i32, ptr %153, align 4, !tbaa !17
  %155 = icmp ne i32 %154, 0
  br i1 %155, label %156, label %179

156:                                              ; preds = %146
  %157 = load ptr, ptr %8, align 8, !tbaa !5
  %158 = load ptr, ptr %7, align 8, !tbaa !5
  %159 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %158, i32 0, i32 2
  store ptr %157, ptr %159, align 8, !tbaa !33
  %160 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 4
  %161 = load i32, ptr %160, align 4, !tbaa !17
  %162 = load ptr, ptr %8, align 8, !tbaa !5
  %163 = sext i32 %161 to i64
  %164 = getelementptr inbounds %"struct.rw::V3d", ptr %162, i64 %163
  store ptr %164, ptr %8, align 8, !tbaa !5
  %165 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 1
  %166 = load i32, ptr %165, align 8, !tbaa !16
  %167 = and i32 %166, 16
  %168 = icmp ne i32 %167, 0
  br i1 %168, label %169, label %178

169:                                              ; preds = %156
  %170 = load ptr, ptr %8, align 8, !tbaa !5
  %171 = load ptr, ptr %7, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %171, i32 0, i32 3
  store ptr %170, ptr %172, align 8, !tbaa !34
  %173 = getelementptr inbounds %"struct.rw::Geometry", ptr %10, i32 0, i32 4
  %174 = load i32, ptr %173, align 4, !tbaa !17
  %175 = load ptr, ptr %8, align 8, !tbaa !5
  %176 = sext i32 %174 to i64
  %177 = getelementptr inbounds %"struct.rw::V3d", ptr %175, i64 %176
  store ptr %177, ptr %8, align 8, !tbaa !5
  br label %178

178:                                              ; preds = %169, %156
  br label %179

179:                                              ; preds = %178, %146
  %180 = load ptr, ptr %7, align 8, !tbaa !5
  %181 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %180, i32 1
  store ptr %181, ptr %7, align 8, !tbaa !5
  br label %182

182:                                              ; preds = %179
  %183 = load i32, ptr %9, align 4, !tbaa !15
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr %9, align 4, !tbaa !15
  br label %140, !llvm.loop !35

185:                                              ; preds = %145
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  ret void
}

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


; 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::Triangle" = type { [3 x i16], i16 }
%"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.10 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.11 = 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: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN2rw15mustrealloc_LOCEPvmjPKc(ptr noundef, i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2rw8Geometry12allocateDataEv(ptr noundef nonnull align 8 dereferenceable(168) %0) local_unnamed_addr #1 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 24
  %3 = load i32, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 16
  %5 = load i32, ptr %4, align 8, !tbaa !14
  %6 = and i32 %5, 8
  %.not = icmp eq i32 %6, 0
  %7 = getelementptr inbounds i8, ptr %0, i64 28
  %8 = load i32, ptr %7, align 4
  %9 = shl i32 %8, 2
  %10 = select i1 %.not, i32 0, i32 %9
  %11 = getelementptr inbounds i8, ptr %0, i64 36
  %12 = load i32, ptr %11, align 4, !tbaa !15
  %13 = mul nsw i32 %12, %8
  %14 = add i32 %13, %3
  %15 = shl i32 %14, 3
  %16 = add i32 %15, %10
  %17 = sext i32 %16 to i64
  %18 = tail call noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef %17, i32 noundef 196623, ptr noundef nonnull @.str.10)
  %19 = getelementptr inbounds i8, ptr %0, i64 40
  store ptr %18, ptr %19, align 8, !tbaa !16
  %20 = load i32, ptr %2, align 8, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = shl nsw i64 %21, 3
  %23 = getelementptr inbounds i8, ptr %18, i64 %22
  %24 = icmp sgt i32 %20, 0
  br i1 %24, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %1
  %wide.trip.count = zext nneg i32 %20 to i64
  %xtraiter = and i64 %wide.trip.count, 7
  %25 = icmp ult i32 %20, 8
  br i1 %25, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

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

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

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %26 = getelementptr inbounds %"struct.rw::Triangle", ptr %18, i64 %indvars.iv.epil, i32 1
  store i16 -1, ptr %26, align 2, !tbaa !17
  %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 %._crit_edge, label %.lr.ph.epil, !llvm.loop !19

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil, %1
  %27 = load i32, ptr %4, align 8, !tbaa !14
  %28 = and i32 %27, 8
  %.not39 = icmp eq i32 %28, 0
  %.pre.pre = load i32, ptr %7, align 4, !tbaa !21
  br i1 %.not39, label %42, label %37

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.7, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.7, %.lr.ph ]
  %29 = getelementptr inbounds %"struct.rw::Triangle", ptr %18, i64 %indvars.iv, i32 1
  store i16 -1, ptr %29, align 2, !tbaa !17
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %30 = getelementptr inbounds %"struct.rw::Triangle", ptr %18, i64 %indvars.iv.next, i32 1
  store i16 -1, ptr %30, align 2, !tbaa !17
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %31 = getelementptr inbounds %"struct.rw::Triangle", ptr %18, i64 %indvars.iv.next.1, i32 1
  store i16 -1, ptr %31, align 2, !tbaa !17
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %32 = getelementptr inbounds %"struct.rw::Triangle", ptr %18, i64 %indvars.iv.next.2, i32 1
  store i16 -1, ptr %32, align 2, !tbaa !17
  %indvars.iv.next.3 = or disjoint i64 %indvars.iv, 4
  %33 = getelementptr inbounds %"struct.rw::Triangle", ptr %18, i64 %indvars.iv.next.3, i32 1
  store i16 -1, ptr %33, align 2, !tbaa !17
  %indvars.iv.next.4 = or disjoint i64 %indvars.iv, 5
  %34 = getelementptr inbounds %"struct.rw::Triangle", ptr %18, i64 %indvars.iv.next.4, i32 1
  store i16 -1, ptr %34, align 2, !tbaa !17
  %indvars.iv.next.5 = or disjoint i64 %indvars.iv, 6
  %35 = getelementptr inbounds %"struct.rw::Triangle", ptr %18, i64 %indvars.iv.next.5, i32 1
  store i16 -1, ptr %35, align 2, !tbaa !17
  %indvars.iv.next.6 = or disjoint i64 %indvars.iv, 7
  %36 = getelementptr inbounds %"struct.rw::Triangle", ptr %18, i64 %indvars.iv.next.6, i32 1
  store i16 -1, ptr %36, align 2, !tbaa !17
  %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 %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !22

37:                                               ; preds = %._crit_edge
  %38 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr %23, ptr %38, align 8, !tbaa !24
  %39 = sext i32 %.pre.pre to i64
  %40 = shl nsw i64 %39, 2
  %41 = getelementptr inbounds i8, ptr %23, i64 %40
  br label %42

42:                                               ; preds = %37, %._crit_edge
  %.035 = phi ptr [ %41, %37 ], [ %23, %._crit_edge ]
  %43 = load i32, ptr %11, align 4, !tbaa !15
  %44 = icmp sgt i32 %43, 0
  br i1 %44, label %.lr.ph47, label %._crit_edge48

.lr.ph47:                                         ; preds = %42
  %45 = getelementptr inbounds i8, ptr %0, i64 56
  %46 = sext i32 %.pre.pre to i64
  %47 = shl nsw i64 %46, 3
  %wide.trip.count65 = zext nneg i32 %43 to i64
  %xtraiter76 = and i64 %wide.trip.count65, 7
  %48 = icmp ult i32 %43, 8
  br i1 %48, label %._crit_edge48.loopexit.unr-lcssa, label %.lr.ph47.new

.lr.ph47.new:                                     ; preds = %.lr.ph47
  %unroll_iter79 = and i64 %wide.trip.count65, 2147483640
  br label %105

._crit_edge48.loopexit.unr-lcssa:                 ; preds = %105, %.lr.ph47
  %indvars.iv62.unr = phi i64 [ 0, %.lr.ph47 ], [ %indvars.iv.next63.7, %105 ]
  %.13644.unr = phi ptr [ %.035, %.lr.ph47 ], [ %121, %105 ]
  %lcmp.mod78.not = icmp eq i64 %xtraiter76, 0
  br i1 %lcmp.mod78.not, label %._crit_edge48, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge48.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv62.epil = phi i64 [ %indvars.iv.next63.epil, %.epil.preheader ], [ %indvars.iv62.unr, %._crit_edge48.loopexit.unr-lcssa ]
  %.13644.epil = phi ptr [ %50, %.epil.preheader ], [ %.13644.unr, %._crit_edge48.loopexit.unr-lcssa ]
  %epil.iter77 = phi i64 [ %epil.iter77.next, %.epil.preheader ], [ 0, %._crit_edge48.loopexit.unr-lcssa ]
  %49 = getelementptr inbounds [8 x ptr], ptr %45, i64 0, i64 %indvars.iv62.epil
  store ptr %.13644.epil, ptr %49, align 8, !tbaa !25
  %50 = getelementptr inbounds i8, ptr %.13644.epil, i64 %47
  %indvars.iv.next63.epil = add nuw nsw i64 %indvars.iv62.epil, 1
  %epil.iter77.next = add i64 %epil.iter77, 1
  %epil.iter77.cmp.not = icmp eq i64 %epil.iter77.next, %xtraiter76
  br i1 %epil.iter77.cmp.not, label %._crit_edge48, label %.epil.preheader, !llvm.loop !26

._crit_edge48:                                    ; preds = %._crit_edge48.loopexit.unr-lcssa, %.epil.preheader, %42
  %51 = mul i32 %.pre.pre, 12
  %52 = add i32 %51, 40
  %53 = and i32 %27, 16
  %.not40 = icmp eq i32 %53, 0
  %54 = select i1 %.not40, i32 0, i32 %51
  %.138 = add i32 %52, %54
  %55 = getelementptr inbounds i8, ptr %0, i64 120
  %56 = load ptr, ptr %55, align 8, !tbaa !27
  %57 = getelementptr inbounds i8, ptr %0, i64 32
  %58 = load i32, ptr %57, align 8, !tbaa !28
  %59 = mul nsw i32 %.138, %58
  %60 = sext i32 %59 to i64
  %61 = tail call noundef ptr @_ZN2rw15mustrealloc_LOCEPvmjPKc(ptr noundef %56, i64 noundef %60, i32 noundef 196623, ptr noundef nonnull @.str.11)
  store ptr %61, ptr %55, align 8, !tbaa !27
  %62 = load i32, ptr %57, align 8, !tbaa !28
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %61, i64 %63
  %65 = icmp sgt i32 %62, 0
  br i1 %65, label %.lr.ph53, label %._crit_edge54

.lr.ph53:                                         ; preds = %._crit_edge48
  %66 = load i32, ptr %7, align 4, !tbaa !21
  %.not41 = icmp eq i32 %66, 0
  %67 = sext i32 %66 to i64
  br i1 %.not41, label %.lr.ph53.split.us.preheader, label %.lr.ph53.split

.lr.ph53.split.us.preheader:                      ; preds = %.lr.ph53
  %xtraiter91 = and i32 %62, 7
  %68 = icmp ult i32 %62, 8
  br i1 %68, label %._crit_edge54.loopexit.unr-lcssa, label %.lr.ph53.split.us.preheader.new

.lr.ph53.split.us.preheader.new:                  ; preds = %.lr.ph53.split.us.preheader
  %unroll_iter94 = and i32 %62, 2147483640
  br label %.lr.ph53.split.us

.lr.ph53.split.us:                                ; preds = %.lr.ph53.split.us, %.lr.ph53.split.us.preheader.new
  %.03249.us = phi ptr [ %61, %.lr.ph53.split.us.preheader.new ], [ %84, %.lr.ph53.split.us ]
  %niter95 = phi i32 [ 0, %.lr.ph53.split.us.preheader.new ], [ %niter95.next.7, %.lr.ph53.split.us ]
  store ptr %0, ptr %.03249.us, align 8, !tbaa !29
  %69 = getelementptr inbounds i8, ptr %.03249.us, i64 24
  %70 = getelementptr inbounds i8, ptr %.03249.us, i64 40
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %69, i8 0, i64 16, i1 false)
  store ptr %0, ptr %70, align 8, !tbaa !29
  %71 = getelementptr inbounds i8, ptr %.03249.us, i64 64
  %72 = getelementptr inbounds i8, ptr %.03249.us, i64 80
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %71, i8 0, i64 16, i1 false)
  store ptr %0, ptr %72, align 8, !tbaa !29
  %73 = getelementptr inbounds i8, ptr %.03249.us, i64 104
  %74 = getelementptr inbounds i8, ptr %.03249.us, i64 120
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %73, i8 0, i64 16, i1 false)
  store ptr %0, ptr %74, align 8, !tbaa !29
  %75 = getelementptr inbounds i8, ptr %.03249.us, i64 144
  %76 = getelementptr inbounds i8, ptr %.03249.us, i64 160
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %75, i8 0, i64 16, i1 false)
  store ptr %0, ptr %76, align 8, !tbaa !29
  %77 = getelementptr inbounds i8, ptr %.03249.us, i64 184
  %78 = getelementptr inbounds i8, ptr %.03249.us, i64 200
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %77, i8 0, i64 16, i1 false)
  store ptr %0, ptr %78, align 8, !tbaa !29
  %79 = getelementptr inbounds i8, ptr %.03249.us, i64 224
  %80 = getelementptr inbounds i8, ptr %.03249.us, i64 240
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %79, i8 0, i64 16, i1 false)
  store ptr %0, ptr %80, align 8, !tbaa !29
  %81 = getelementptr inbounds i8, ptr %.03249.us, i64 264
  %82 = getelementptr inbounds i8, ptr %.03249.us, i64 280
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %81, i8 0, i64 16, i1 false)
  store ptr %0, ptr %82, align 8, !tbaa !29
  %83 = getelementptr inbounds i8, ptr %.03249.us, i64 304
  %84 = getelementptr inbounds i8, ptr %.03249.us, i64 320
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %83, i8 0, i64 16, i1 false)
  %niter95.next.7 = add i32 %niter95, 8
  %niter95.ncmp.7 = icmp eq i32 %niter95.next.7, %unroll_iter94
  br i1 %niter95.ncmp.7, label %._crit_edge54.loopexit.unr-lcssa, label %.lr.ph53.split.us, !llvm.loop !34

.lr.ph53.split:                                   ; preds = %.lr.ph53
  %85 = load i32, ptr %4, align 8
  %86 = and i32 %85, 16
  %.not42 = icmp eq i32 %86, 0
  br i1 %.not42, label %.lr.ph53.split.split.us.preheader, label %.lr.ph53.split.split.preheader

.lr.ph53.split.split.preheader:                   ; preds = %.lr.ph53.split
  %xtraiter81 = and i32 %62, 3
  %87 = icmp ult i32 %62, 4
  br i1 %87, label %._crit_edge54.loopexit75.unr-lcssa, label %.lr.ph53.split.split.preheader.new

.lr.ph53.split.split.preheader.new:               ; preds = %.lr.ph53.split.split.preheader
  %unroll_iter84 = and i32 %62, 2147483644
  br label %.lr.ph53.split.split

.lr.ph53.split.split.us.preheader:                ; preds = %.lr.ph53.split
  %xtraiter86 = and i32 %62, 3
  %88 = icmp ult i32 %62, 4
  br i1 %88, label %._crit_edge54.loopexit74.unr-lcssa, label %.lr.ph53.split.split.us.preheader.new

.lr.ph53.split.split.us.preheader.new:            ; preds = %.lr.ph53.split.split.us.preheader
  %unroll_iter89 = and i32 %62, 2147483644
  br label %.lr.ph53.split.split.us

.lr.ph53.split.split.us:                          ; preds = %.lr.ph53.split.split.us, %.lr.ph53.split.split.us.preheader.new
  %.03150.us56 = phi ptr [ %64, %.lr.ph53.split.split.us.preheader.new ], [ %103, %.lr.ph53.split.split.us ]
  %.03249.us57 = phi ptr [ %61, %.lr.ph53.split.split.us.preheader.new ], [ %104, %.lr.ph53.split.split.us ]
  %niter90 = phi i32 [ 0, %.lr.ph53.split.split.us.preheader.new ], [ %niter90.next.3, %.lr.ph53.split.split.us ]
  store ptr %0, ptr %.03249.us57, align 8, !tbaa !29
  %89 = getelementptr inbounds i8, ptr %.03249.us57, i64 24
  %90 = getelementptr inbounds i8, ptr %.03249.us57, i64 32
  store i64 0, ptr %90, align 8
  store ptr %.03150.us56, ptr %89, align 8, !tbaa !35
  %91 = getelementptr inbounds %"struct.rw::V3d", ptr %.03150.us56, i64 %67
  %92 = getelementptr inbounds i8, ptr %.03249.us57, i64 40
  store ptr %0, ptr %92, align 8, !tbaa !29
  %93 = getelementptr inbounds i8, ptr %.03249.us57, i64 64
  %94 = getelementptr inbounds i8, ptr %.03249.us57, i64 72
  store i64 0, ptr %94, align 8
  store ptr %91, ptr %93, align 8, !tbaa !35
  %95 = getelementptr inbounds %"struct.rw::V3d", ptr %91, i64 %67
  %96 = getelementptr inbounds i8, ptr %.03249.us57, i64 80
  store ptr %0, ptr %96, align 8, !tbaa !29
  %97 = getelementptr inbounds i8, ptr %.03249.us57, i64 104
  %98 = getelementptr inbounds i8, ptr %.03249.us57, i64 112
  store i64 0, ptr %98, align 8
  store ptr %95, ptr %97, align 8, !tbaa !35
  %99 = getelementptr inbounds %"struct.rw::V3d", ptr %95, i64 %67
  %100 = getelementptr inbounds i8, ptr %.03249.us57, i64 120
  store ptr %0, ptr %100, align 8, !tbaa !29
  %101 = getelementptr inbounds i8, ptr %.03249.us57, i64 144
  %102 = getelementptr inbounds i8, ptr %.03249.us57, i64 152
  store i64 0, ptr %102, align 8
  store ptr %99, ptr %101, align 8, !tbaa !35
  %103 = getelementptr inbounds %"struct.rw::V3d", ptr %99, i64 %67
  %104 = getelementptr inbounds i8, ptr %.03249.us57, i64 160
  %niter90.next.3 = add i32 %niter90, 4
  %niter90.ncmp.3 = icmp eq i32 %niter90.next.3, %unroll_iter89
  br i1 %niter90.ncmp.3, label %._crit_edge54.loopexit74.unr-lcssa, label %.lr.ph53.split.split.us, !llvm.loop !34

105:                                              ; preds = %105, %.lr.ph47.new
  %indvars.iv62 = phi i64 [ 0, %.lr.ph47.new ], [ %indvars.iv.next63.7, %105 ]
  %.13644 = phi ptr [ %.035, %.lr.ph47.new ], [ %121, %105 ]
  %niter80 = phi i64 [ 0, %.lr.ph47.new ], [ %niter80.next.7, %105 ]
  %106 = getelementptr inbounds [8 x ptr], ptr %45, i64 0, i64 %indvars.iv62
  store ptr %.13644, ptr %106, align 8, !tbaa !25
  %107 = getelementptr inbounds i8, ptr %.13644, i64 %47
  %indvars.iv.next63 = or disjoint i64 %indvars.iv62, 1
  %108 = getelementptr inbounds [8 x ptr], ptr %45, i64 0, i64 %indvars.iv.next63
  store ptr %107, ptr %108, align 8, !tbaa !25
  %109 = getelementptr inbounds i8, ptr %107, i64 %47
  %indvars.iv.next63.1 = or disjoint i64 %indvars.iv62, 2
  %110 = getelementptr inbounds [8 x ptr], ptr %45, i64 0, i64 %indvars.iv.next63.1
  store ptr %109, ptr %110, align 8, !tbaa !25
  %111 = getelementptr inbounds i8, ptr %109, i64 %47
  %indvars.iv.next63.2 = or disjoint i64 %indvars.iv62, 3
  %112 = getelementptr inbounds [8 x ptr], ptr %45, i64 0, i64 %indvars.iv.next63.2
  store ptr %111, ptr %112, align 8, !tbaa !25
  %113 = getelementptr inbounds i8, ptr %111, i64 %47
  %indvars.iv.next63.3 = or disjoint i64 %indvars.iv62, 4
  %114 = getelementptr inbounds [8 x ptr], ptr %45, i64 0, i64 %indvars.iv.next63.3
  store ptr %113, ptr %114, align 8, !tbaa !25
  %115 = getelementptr inbounds i8, ptr %113, i64 %47
  %indvars.iv.next63.4 = or disjoint i64 %indvars.iv62, 5
  %116 = getelementptr inbounds [8 x ptr], ptr %45, i64 0, i64 %indvars.iv.next63.4
  store ptr %115, ptr %116, align 8, !tbaa !25
  %117 = getelementptr inbounds i8, ptr %115, i64 %47
  %indvars.iv.next63.5 = or disjoint i64 %indvars.iv62, 6
  %118 = getelementptr inbounds [8 x ptr], ptr %45, i64 0, i64 %indvars.iv.next63.5
  store ptr %117, ptr %118, align 8, !tbaa !25
  %119 = getelementptr inbounds i8, ptr %117, i64 %47
  %indvars.iv.next63.6 = or disjoint i64 %indvars.iv62, 7
  %120 = getelementptr inbounds [8 x ptr], ptr %45, i64 0, i64 %indvars.iv.next63.6
  store ptr %119, ptr %120, align 8, !tbaa !25
  %121 = getelementptr inbounds i8, ptr %119, i64 %47
  %indvars.iv.next63.7 = add nuw nsw i64 %indvars.iv62, 8
  %niter80.next.7 = add i64 %niter80, 8
  %niter80.ncmp.7 = icmp eq i64 %niter80.next.7, %unroll_iter79
  br i1 %niter80.ncmp.7, label %._crit_edge48.loopexit.unr-lcssa, label %105, !llvm.loop !36

._crit_edge54.loopexit.unr-lcssa:                 ; preds = %.lr.ph53.split.us, %.lr.ph53.split.us.preheader
  %.03249.us.unr = phi ptr [ %61, %.lr.ph53.split.us.preheader ], [ %84, %.lr.ph53.split.us ]
  %lcmp.mod93.not = icmp eq i32 %xtraiter91, 0
  br i1 %lcmp.mod93.not, label %._crit_edge54, label %.lr.ph53.split.us.epil

.lr.ph53.split.us.epil:                           ; preds = %._crit_edge54.loopexit.unr-lcssa, %.lr.ph53.split.us.epil
  %.03249.us.epil = phi ptr [ %123, %.lr.ph53.split.us.epil ], [ %.03249.us.unr, %._crit_edge54.loopexit.unr-lcssa ]
  %epil.iter92 = phi i32 [ %epil.iter92.next, %.lr.ph53.split.us.epil ], [ 0, %._crit_edge54.loopexit.unr-lcssa ]
  store ptr %0, ptr %.03249.us.epil, align 8, !tbaa !29
  %122 = getelementptr inbounds i8, ptr %.03249.us.epil, i64 24
  %123 = getelementptr inbounds i8, ptr %.03249.us.epil, i64 40
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %122, i8 0, i64 16, i1 false)
  %epil.iter92.next = add i32 %epil.iter92, 1
  %epil.iter92.cmp.not = icmp eq i32 %epil.iter92.next, %xtraiter91
  br i1 %epil.iter92.cmp.not, label %._crit_edge54, label %.lr.ph53.split.us.epil, !llvm.loop !37

._crit_edge54.loopexit74.unr-lcssa:               ; preds = %.lr.ph53.split.split.us, %.lr.ph53.split.split.us.preheader
  %.03150.us56.unr = phi ptr [ %64, %.lr.ph53.split.split.us.preheader ], [ %103, %.lr.ph53.split.split.us ]
  %.03249.us57.unr = phi ptr [ %61, %.lr.ph53.split.split.us.preheader ], [ %104, %.lr.ph53.split.split.us ]
  %lcmp.mod88.not = icmp eq i32 %xtraiter86, 0
  br i1 %lcmp.mod88.not, label %._crit_edge54, label %.lr.ph53.split.split.us.epil

.lr.ph53.split.split.us.epil:                     ; preds = %._crit_edge54.loopexit74.unr-lcssa, %.lr.ph53.split.split.us.epil
  %.03150.us56.epil = phi ptr [ %126, %.lr.ph53.split.split.us.epil ], [ %.03150.us56.unr, %._crit_edge54.loopexit74.unr-lcssa ]
  %.03249.us57.epil = phi ptr [ %127, %.lr.ph53.split.split.us.epil ], [ %.03249.us57.unr, %._crit_edge54.loopexit74.unr-lcssa ]
  %epil.iter87 = phi i32 [ %epil.iter87.next, %.lr.ph53.split.split.us.epil ], [ 0, %._crit_edge54.loopexit74.unr-lcssa ]
  store ptr %0, ptr %.03249.us57.epil, align 8, !tbaa !29
  %124 = getelementptr inbounds i8, ptr %.03249.us57.epil, i64 24
  %125 = getelementptr inbounds i8, ptr %.03249.us57.epil, i64 32
  store i64 0, ptr %125, align 8
  store ptr %.03150.us56.epil, ptr %124, align 8, !tbaa !35
  %126 = getelementptr inbounds %"struct.rw::V3d", ptr %.03150.us56.epil, i64 %67
  %127 = getelementptr inbounds i8, ptr %.03249.us57.epil, i64 40
  %epil.iter87.next = add i32 %epil.iter87, 1
  %epil.iter87.cmp.not = icmp eq i32 %epil.iter87.next, %xtraiter86
  br i1 %epil.iter87.cmp.not, label %._crit_edge54, label %.lr.ph53.split.split.us.epil, !llvm.loop !38

._crit_edge54.loopexit75.unr-lcssa:               ; preds = %.lr.ph53.split.split, %.lr.ph53.split.split.preheader
  %.03150.unr = phi ptr [ %64, %.lr.ph53.split.split.preheader ], [ %151, %.lr.ph53.split.split ]
  %.03249.unr = phi ptr [ %61, %.lr.ph53.split.split.preheader ], [ %152, %.lr.ph53.split.split ]
  %lcmp.mod83.not = icmp eq i32 %xtraiter81, 0
  br i1 %lcmp.mod83.not, label %._crit_edge54, label %.lr.ph53.split.split.epil

.lr.ph53.split.split.epil:                        ; preds = %._crit_edge54.loopexit75.unr-lcssa, %.lr.ph53.split.split.epil
  %.03150.epil = phi ptr [ %131, %.lr.ph53.split.split.epil ], [ %.03150.unr, %._crit_edge54.loopexit75.unr-lcssa ]
  %.03249.epil = phi ptr [ %132, %.lr.ph53.split.split.epil ], [ %.03249.unr, %._crit_edge54.loopexit75.unr-lcssa ]
  %epil.iter82 = phi i32 [ %epil.iter82.next, %.lr.ph53.split.split.epil ], [ 0, %._crit_edge54.loopexit75.unr-lcssa ]
  store ptr %0, ptr %.03249.epil, align 8, !tbaa !29
  %128 = getelementptr inbounds i8, ptr %.03249.epil, i64 24
  %129 = getelementptr inbounds i8, ptr %.03249.epil, i64 32
  store ptr %.03150.epil, ptr %128, align 8, !tbaa !35
  %130 = getelementptr inbounds %"struct.rw::V3d", ptr %.03150.epil, i64 %67
  store ptr %130, ptr %129, align 8, !tbaa !39
  %131 = getelementptr inbounds %"struct.rw::V3d", ptr %130, i64 %67
  %132 = getelementptr inbounds i8, ptr %.03249.epil, i64 40
  %epil.iter82.next = add i32 %epil.iter82, 1
  %epil.iter82.cmp.not = icmp eq i32 %epil.iter82.next, %xtraiter81
  br i1 %epil.iter82.cmp.not, label %._crit_edge54, label %.lr.ph53.split.split.epil, !llvm.loop !40

._crit_edge54:                                    ; preds = %._crit_edge54.loopexit75.unr-lcssa, %.lr.ph53.split.split.epil, %._crit_edge54.loopexit74.unr-lcssa, %.lr.ph53.split.split.us.epil, %._crit_edge54.loopexit.unr-lcssa, %.lr.ph53.split.us.epil, %._crit_edge48
  ret void

.lr.ph53.split.split:                             ; preds = %.lr.ph53.split.split, %.lr.ph53.split.split.preheader.new
  %.03150 = phi ptr [ %64, %.lr.ph53.split.split.preheader.new ], [ %151, %.lr.ph53.split.split ]
  %.03249 = phi ptr [ %61, %.lr.ph53.split.split.preheader.new ], [ %152, %.lr.ph53.split.split ]
  %niter85 = phi i32 [ 0, %.lr.ph53.split.split.preheader.new ], [ %niter85.next.3, %.lr.ph53.split.split ]
  store ptr %0, ptr %.03249, align 8, !tbaa !29
  %133 = getelementptr inbounds i8, ptr %.03249, i64 24
  %134 = getelementptr inbounds i8, ptr %.03249, i64 32
  store ptr %.03150, ptr %133, align 8, !tbaa !35
  %135 = getelementptr inbounds %"struct.rw::V3d", ptr %.03150, i64 %67
  store ptr %135, ptr %134, align 8, !tbaa !39
  %136 = getelementptr inbounds %"struct.rw::V3d", ptr %135, i64 %67
  %137 = getelementptr inbounds i8, ptr %.03249, i64 40
  store ptr %0, ptr %137, align 8, !tbaa !29
  %138 = getelementptr inbounds i8, ptr %.03249, i64 64
  %139 = getelementptr inbounds i8, ptr %.03249, i64 72
  store ptr %136, ptr %138, align 8, !tbaa !35
  %140 = getelementptr inbounds %"struct.rw::V3d", ptr %136, i64 %67
  store ptr %140, ptr %139, align 8, !tbaa !39
  %141 = getelementptr inbounds %"struct.rw::V3d", ptr %140, i64 %67
  %142 = getelementptr inbounds i8, ptr %.03249, i64 80
  store ptr %0, ptr %142, align 8, !tbaa !29
  %143 = getelementptr inbounds i8, ptr %.03249, i64 104
  %144 = getelementptr inbounds i8, ptr %.03249, i64 112
  store ptr %141, ptr %143, align 8, !tbaa !35
  %145 = getelementptr inbounds %"struct.rw::V3d", ptr %141, i64 %67
  store ptr %145, ptr %144, align 8, !tbaa !39
  %146 = getelementptr inbounds %"struct.rw::V3d", ptr %145, i64 %67
  %147 = getelementptr inbounds i8, ptr %.03249, i64 120
  store ptr %0, ptr %147, align 8, !tbaa !29
  %148 = getelementptr inbounds i8, ptr %.03249, i64 144
  %149 = getelementptr inbounds i8, ptr %.03249, i64 152
  store ptr %146, ptr %148, align 8, !tbaa !35
  %150 = getelementptr inbounds %"struct.rw::V3d", ptr %146, i64 %67
  store ptr %150, ptr %149, align 8, !tbaa !39
  %151 = getelementptr inbounds %"struct.rw::V3d", ptr %150, i64 %67
  %152 = getelementptr inbounds i8, ptr %.03249, i64 160
  %niter85.next.3 = add i32 %niter85, 4
  %niter85.ncmp.3 = icmp eq i32 %niter85.next.3, %unroll_iter84
  br i1 %niter85.ncmp.3, label %._crit_edge54.loopexit75.unr-lcssa, label %.lr.ph53.split.split, !llvm.loop !34
}

; 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 24}
!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 36}
!16 = !{!6, !10, i64 40}
!17 = !{!18, !12, i64 6}
!18 = !{!"_ZTSN2rw8TriangleE", !8, i64 0, !12, i64 6}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.unroll.disable"}
!21 = !{!6, !11, i64 28}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!6, !10, i64 48}
!25 = !{!10, !10, i64 0}
!26 = distinct !{!26, !20}
!27 = !{!6, !10, i64 120}
!28 = !{!6, !11, i64 32}
!29 = !{!30, !10, i64 0}
!30 = !{!"_ZTSN2rw11MorphTargetE", !10, i64 0, !31, i64 8, !10, i64 24, !10, i64 32}
!31 = !{!"_ZTSN2rw6SphereE", !32, i64 0, !33, i64 12}
!32 = !{!"_ZTSN2rw3V3dE", !33, i64 0, !33, i64 4, !33, i64 8}
!33 = !{!"float", !8, i64 0}
!34 = distinct !{!34, !23}
!35 = !{!30, !10, i64 24}
!36 = distinct !{!36, !23}
!37 = distinct !{!37, !20}
!38 = distinct !{!38, !20}
!39 = !{!30, !10, i64 32}
!40 = distinct !{!40, !20}


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