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

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

@__const._ZNK2rw11MorphTarget23calculateBoundingSphereEv.min = external hidden unnamed_addr constant %"struct.rw::V3d", align 4
@__const._ZNK2rw11MorphTarget23calculateBoundingSphereEv.max = external hidden unnamed_addr constant %"struct.rw::V3d", align 4

; 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: mustprogress uwtable
define dso_local { <2 x float>, <2 x float> } @_ZNK2rw11MorphTarget23calculateBoundingSphereEv(ptr noundef nonnull align 8 dereferenceable(40) %0) #2 align 2 {
  %2 = alloca %"struct.rw::Sphere", align 4
  %3 = alloca ptr, align 8
  %4 = alloca %"struct.rw::V3d", align 4
  %5 = alloca %"struct.rw::V3d", align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"struct.rw::V3d", align 4
  %9 = alloca %"struct.rw::V3d", align 4
  %10 = alloca { <2 x float>, float }, align 8
  %11 = alloca { <2 x float>, float }, align 8
  %12 = alloca %"struct.rw::V3d", align 4
  %13 = alloca { <2 x float>, float }, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %14 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr %4) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %4, ptr align 4 @__const._ZNK2rw11MorphTarget23calculateBoundingSphereEv.min, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %5) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %5, ptr align 4 @__const._ZNK2rw11MorphTarget23calculateBoundingSphereEv.max, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %15 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %14, i32 0, i32 2
  %16 = load ptr, ptr %15, align 8, !tbaa !9
  store ptr %16, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !14
  br label %17

17:                                               ; preds = %100, %1
  %18 = load i32, ptr %7, align 4, !tbaa !14
  %19 = getelementptr inbounds %"struct.rw::MorphTarget", ptr %14, i32 0, i32 0
  %20 = load ptr, ptr %19, align 8, !tbaa !16
  %21 = getelementptr inbounds %"struct.rw::Geometry", ptr %20, i32 0, i32 4
  %22 = load i32, ptr %21, align 4, !tbaa !17
  %23 = icmp slt i32 %18, %22
  br i1 %23, label %25, label %24

24:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %103

25:                                               ; preds = %17
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.rw::V3d", ptr %26, i32 0, i32 0
  %28 = load float, ptr %27, align 4, !tbaa !22
  %29 = getelementptr inbounds %"struct.rw::V3d", ptr %5, i32 0, i32 0
  %30 = load float, ptr %29, align 4, !tbaa !22
  %31 = fcmp ogt float %28, %30
  br i1 %31, label %32, label %37

32:                                               ; preds = %25
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.rw::V3d", ptr %33, i32 0, i32 0
  %35 = load float, ptr %34, align 4, !tbaa !22
  %36 = getelementptr inbounds %"struct.rw::V3d", ptr %5, i32 0, i32 0
  store float %35, ptr %36, align 4, !tbaa !22
  br label %37

37:                                               ; preds = %32, %25
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.rw::V3d", ptr %38, i32 0, i32 0
  %40 = load float, ptr %39, align 4, !tbaa !22
  %41 = getelementptr inbounds %"struct.rw::V3d", ptr %4, i32 0, i32 0
  %42 = load float, ptr %41, align 4, !tbaa !22
  %43 = fcmp olt float %40, %42
  br i1 %43, label %44, label %49

44:                                               ; preds = %37
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.rw::V3d", ptr %45, i32 0, i32 0
  %47 = load float, ptr %46, align 4, !tbaa !22
  %48 = getelementptr inbounds %"struct.rw::V3d", ptr %4, i32 0, i32 0
  store float %47, ptr %48, align 4, !tbaa !22
  br label %49

49:                                               ; preds = %44, %37
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.rw::V3d", ptr %50, i32 0, i32 1
  %52 = load float, ptr %51, align 4, !tbaa !23
  %53 = getelementptr inbounds %"struct.rw::V3d", ptr %5, i32 0, i32 1
  %54 = load float, ptr %53, align 4, !tbaa !23
  %55 = fcmp ogt float %52, %54
  br i1 %55, label %56, label %61

56:                                               ; preds = %49
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.rw::V3d", ptr %57, i32 0, i32 1
  %59 = load float, ptr %58, align 4, !tbaa !23
  %60 = getelementptr inbounds %"struct.rw::V3d", ptr %5, i32 0, i32 1
  store float %59, ptr %60, align 4, !tbaa !23
  br label %61

61:                                               ; preds = %56, %49
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.rw::V3d", ptr %62, i32 0, i32 1
  %64 = load float, ptr %63, align 4, !tbaa !23
  %65 = getelementptr inbounds %"struct.rw::V3d", ptr %4, i32 0, i32 1
  %66 = load float, ptr %65, align 4, !tbaa !23
  %67 = fcmp olt float %64, %66
  br i1 %67, label %68, label %73

68:                                               ; preds = %61
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.rw::V3d", ptr %69, i32 0, i32 1
  %71 = load float, ptr %70, align 4, !tbaa !23
  %72 = getelementptr inbounds %"struct.rw::V3d", ptr %4, i32 0, i32 1
  store float %71, ptr %72, align 4, !tbaa !23
  br label %73

73:                                               ; preds = %68, %61
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.rw::V3d", ptr %74, i32 0, i32 2
  %76 = load float, ptr %75, align 4, !tbaa !24
  %77 = getelementptr inbounds %"struct.rw::V3d", ptr %5, i32 0, i32 2
  %78 = load float, ptr %77, align 4, !tbaa !24
  %79 = fcmp ogt float %76, %78
  br i1 %79, label %80, label %85

80:                                               ; preds = %73
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.rw::V3d", ptr %81, i32 0, i32 2
  %83 = load float, ptr %82, align 4, !tbaa !24
  %84 = getelementptr inbounds %"struct.rw::V3d", ptr %5, i32 0, i32 2
  store float %83, ptr %84, align 4, !tbaa !24
  br label %85

85:                                               ; preds = %80, %73
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.rw::V3d", ptr %86, i32 0, i32 2
  %88 = load float, ptr %87, align 4, !tbaa !24
  %89 = getelementptr inbounds %"struct.rw::V3d", ptr %4, i32 0, i32 2
  %90 = load float, ptr %89, align 4, !tbaa !24
  %91 = fcmp olt float %88, %90
  br i1 %91, label %92, label %97

92:                                               ; preds = %85
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = getelementptr inbounds %"struct.rw::V3d", ptr %93, i32 0, i32 2
  %95 = load float, ptr %94, align 4, !tbaa !24
  %96 = getelementptr inbounds %"struct.rw::V3d", ptr %4, i32 0, i32 2
  store float %95, ptr %96, align 4, !tbaa !24
  br label %97

97:                                               ; preds = %92, %85
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = getelementptr inbounds %"struct.rw::V3d", ptr %98, i32 1
  store ptr %99, ptr %6, align 8, !tbaa !5
  br label %100

100:                                              ; preds = %97
  %101 = load i32, ptr %7, align 4, !tbaa !14
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %7, align 4, !tbaa !14
  br label %17, !llvm.loop !25

103:                                              ; preds = %24
  call void @llvm.lifetime.start.p0(i64 12, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %9) #6
  %104 = call { <2 x float>, float } @_ZN2rw3addERKNS_3V3dES2_(ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %5)
  store { <2 x float>, float } %104, ptr %10, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %9, ptr align 8 %10, i64 12, i1 false)
  %105 = call { <2 x float>, float } @_ZN2rw5scaleERKNS_3V3dEf(ptr noundef nonnull align 4 dereferenceable(12) %9, float noundef 5.000000e-01)
  store { <2 x float>, float } %105, ptr %11, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 8 %11, i64 12, i1 false)
  %106 = getelementptr inbounds %"struct.rw::Sphere", ptr %2, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %106, ptr align 4 %8, i64 12, i1 false), !tbaa.struct !27
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #6
  %107 = getelementptr inbounds %"struct.rw::Sphere", ptr %2, i32 0, i32 0
  %108 = call { <2 x float>, float } @_ZN2rw3subERKNS_3V3dES2_(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %107)
  store { <2 x float>, float } %108, ptr %13, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 8 %13, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %5, ptr align 4 %12, i64 12, i1 false), !tbaa.struct !27
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #6
  %109 = call noundef float @_ZN2rw6lengthERKNS_3V3dE(ptr noundef nonnull align 4 dereferenceable(12) %5)
  %110 = getelementptr inbounds %"struct.rw::Sphere", ptr %2, i32 0, i32 1
  store float %109, ptr %110, align 4, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %4) #6
  %111 = load { <2 x float>, <2 x float> }, ptr %2, align 4
  ret { <2 x float>, <2 x float> } %111
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN2rw5scaleERKNS_3V3dEf(ptr noundef nonnull align 4 dereferenceable(12), float noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_ZN2rw3addERKNS_3V3dES2_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_ZN2rw3subERKNS_3V3dES2_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZN2rw6lengthERKNS_3V3dE(ptr noundef nonnull align 4 dereferenceable(12)) #5

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

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

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


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

@__const._ZNK2rw11MorphTarget23calculateBoundingSphereEv.min = external hidden unnamed_addr constant %"struct.rw::V3d", align 4
@__const._ZNK2rw11MorphTarget23calculateBoundingSphereEv.max = external hidden unnamed_addr constant %"struct.rw::V3d", align 4

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: mustprogress uwtable
define dso_local { <2 x float>, <2 x float> } @_ZNK2rw11MorphTarget23calculateBoundingSphereEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(40) %0) local_unnamed_addr #2 align 2 {
  %2 = alloca %"struct.rw::Sphere", align 8
  %3 = alloca %"struct.rw::V3d", align 4
  %4 = alloca %"struct.rw::V3d", align 8
  %5 = alloca %"struct.rw::V3d", align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) @__const._ZNK2rw11MorphTarget23calculateBoundingSphereEv.min, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) @__const._ZNK2rw11MorphTarget23calculateBoundingSphereEv.max, i64 12, i1 false)
  %6 = load ptr, ptr %0, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 28
  %8 = load i32, ptr %7, align 4, !tbaa !13
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %1
  %.promoted33 = load float, ptr %3, align 4, !tbaa !19
  %.promoted = load float, ptr %4, align 8, !tbaa !19
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  %11 = load ptr, ptr %10, align 8, !tbaa !20
  %12 = getelementptr inbounds i8, ptr %4, i64 4
  %13 = getelementptr inbounds i8, ptr %3, i64 4
  %14 = getelementptr inbounds i8, ptr %4, i64 8
  %15 = getelementptr inbounds i8, ptr %3, i64 8
  %.promoted36 = load float, ptr %12, align 4, !tbaa !21
  %.promoted37 = load float, ptr %13, align 4, !tbaa !21
  %.promoted38 = load float, ptr %14, align 8, !tbaa !22
  %.promoted39 = load float, ptr %15, align 4, !tbaa !22
  br label %21

._crit_edge:                                      ; preds = %55, %1
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #6
  %16 = call { <2 x float>, float } @_ZN2rw3addERKNS_3V3dES2_(ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %4)
  %.fca.0.extract6 = extractvalue { <2 x float>, float } %16, 0
  %.fca.1.extract7 = extractvalue { <2 x float>, float } %16, 1
  store <2 x float> %.fca.0.extract6, ptr %5, align 8
  %.sroa.29.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 8
  store float %.fca.1.extract7, ptr %.sroa.29.0..sroa_idx, align 8
  %17 = call { <2 x float>, float } @_ZN2rw5scaleERKNS_3V3dEf(ptr noundef nonnull align 4 dereferenceable(12) %5, float noundef 5.000000e-01)
  %.fca.0.extract2 = extractvalue { <2 x float>, float } %17, 0
  %.fca.1.extract3 = extractvalue { <2 x float>, float } %17, 1
  store <2 x float> %.fca.0.extract2, ptr %2, align 8
  %.sroa.411.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 8
  store float %.fca.1.extract3, ptr %.sroa.411.0..sroa_idx, align 8, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #6
  %18 = call { <2 x float>, float } @_ZN2rw3subERKNS_3V3dES2_(ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %2)
  %.fca.0.extract = extractvalue { <2 x float>, float } %18, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %18, 1
  store <2 x float> %.fca.0.extract, ptr %4, align 8
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 8
  store float %.fca.1.extract, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !23
  %19 = call noundef float @_ZN2rw6lengthERKNS_3V3dE(ptr noundef nonnull align 4 dereferenceable(12) %4)
  %20 = getelementptr inbounds i8, ptr %2, i64 12
  store float %19, ptr %20, align 4, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #6
  %.fca.0.load = load <2 x float>, ptr %2, align 8
  %.fca.0.insert = insertvalue { <2 x float>, <2 x float> } poison, <2 x float> %.fca.0.load, 0
  %.fca.1.load = load <2 x float>, ptr %.sroa.411.0..sroa_idx, align 8
  %.fca.1.insert = insertvalue { <2 x float>, <2 x float> } %.fca.0.insert, <2 x float> %.fca.1.load, 1
  ret { <2 x float>, <2 x float> } %.fca.1.insert

21:                                               ; preds = %.lr.ph, %55
  %22 = phi float [ %.promoted39, %.lr.ph ], [ %56, %55 ]
  %23 = phi float [ %.promoted38, %.lr.ph ], [ %52, %55 ]
  %24 = phi float [ %.promoted37, %.lr.ph ], [ %46, %55 ]
  %25 = phi float [ %.promoted36, %.lr.ph ], [ %42, %55 ]
  %.035 = phi ptr [ %11, %.lr.ph ], [ %57, %55 ]
  %.02634 = phi i32 [ 0, %.lr.ph ], [ %58, %55 ]
  %26 = phi float [ %.promoted, %.lr.ph ], [ %32, %55 ]
  %27 = phi float [ %.promoted33, %.lr.ph ], [ %36, %55 ]
  %28 = load float, ptr %.035, align 4, !tbaa !19
  %29 = fcmp ogt float %28, %26
  br i1 %29, label %30, label %31

30:                                               ; preds = %21
  store float %28, ptr %4, align 8, !tbaa !19
  br label %31

31:                                               ; preds = %30, %21
  %32 = phi float [ %28, %30 ], [ %26, %21 ]
  %33 = fcmp olt float %28, %27
  br i1 %33, label %34, label %35

34:                                               ; preds = %31
  store float %28, ptr %3, align 4, !tbaa !19
  br label %35

35:                                               ; preds = %34, %31
  %36 = phi float [ %28, %34 ], [ %27, %31 ]
  %37 = getelementptr inbounds i8, ptr %.035, i64 4
  %38 = load float, ptr %37, align 4, !tbaa !21
  %39 = fcmp ogt float %38, %25
  br i1 %39, label %40, label %41

40:                                               ; preds = %35
  store float %38, ptr %12, align 4, !tbaa !21
  br label %41

41:                                               ; preds = %40, %35
  %42 = phi float [ %38, %40 ], [ %25, %35 ]
  %43 = fcmp olt float %38, %24
  br i1 %43, label %44, label %45

44:                                               ; preds = %41
  store float %38, ptr %13, align 4, !tbaa !21
  br label %45

45:                                               ; preds = %44, %41
  %46 = phi float [ %38, %44 ], [ %24, %41 ]
  %47 = getelementptr inbounds i8, ptr %.035, i64 8
  %48 = load float, ptr %47, align 4, !tbaa !22
  %49 = fcmp ogt float %48, %23
  br i1 %49, label %50, label %51

50:                                               ; preds = %45
  store float %48, ptr %14, align 8, !tbaa !22
  br label %51

51:                                               ; preds = %50, %45
  %52 = phi float [ %48, %50 ], [ %23, %45 ]
  %53 = fcmp olt float %48, %22
  br i1 %53, label %54, label %55

54:                                               ; preds = %51
  store float %48, ptr %15, align 4, !tbaa !22
  br label %55

55:                                               ; preds = %54, %51
  %56 = phi float [ %48, %54 ], [ %22, %51 ]
  %57 = getelementptr inbounds i8, ptr %.035, i64 12
  %58 = add nuw nsw i32 %.02634, 1
  %exitcond.not = icmp eq i32 %58, %8
  br i1 %exitcond.not, label %._crit_edge, label %21, !llvm.loop !25
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN2rw5scaleERKNS_3V3dEf(ptr noundef nonnull align 4 dereferenceable(12), float noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_ZN2rw3addERKNS_3V3dES2_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_ZN2rw3subERKNS_3V3dES2_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZN2rw6lengthERKNS_3V3dE(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #5

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

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass