; LLVM IR from Mithreindeir/VelocityRaptor :: VelocityRaptor/src (vrParticleSystem)

; 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.vrVec2 = type { float, float }
%struct.vrParticleSystem = type { ptr, float, float, float, float, float, float, float, %struct.vrVec2, ptr }
%struct.vrArray = type { ptr, i32, i32, i32, i32 }
%struct.vrParticle = type { %struct.vrVec2, %struct.vrVec2, %struct.vrVec2, %struct.vrVec2, %struct.vrVec2, float, float, float, float, float, float, float, %struct.vrColor }
%struct.vrColor = type { float, float, float }

; 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 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind
declare double @sqrt(double noundef) #2

declare <2 x float> @vrScale(<2 x float>, float noundef) #3

declare <2 x float> @vrSub(<2 x float>, <2 x float>) #3

declare <2 x float> @vrAdd(<2 x float>, <2 x float>) #3

; Function Attrs: nounwind uwtable
define dso_local void @vrParticleSystemViscousity(ptr noundef %0, float noundef %1) #4 {
  %3 = alloca ptr, align 8
  %4 = alloca float, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %struct.vrVec2, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca %struct.vrVec2, align 4
  %14 = alloca float, align 4
  %15 = alloca %struct.vrVec2, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca %struct.vrVec2, align 4
  %19 = alloca %struct.vrVec2, align 4
  %20 = alloca %struct.vrVec2, align 4
  %21 = alloca %struct.vrVec2, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store float %1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !11
  br label %22

22:                                               ; preds = %166, %2
  %23 = load i32, ptr %5, align 4, !tbaa !11
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.vrParticleSystem, ptr %24, i32 0, i32 0
  %26 = load ptr, ptr %25, align 8, !tbaa !13
  %27 = getelementptr inbounds %struct.vrArray, ptr %26, i32 0, i32 1
  %28 = load i32, ptr %27, align 8, !tbaa !16
  %29 = icmp slt i32 %23, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %22
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %169

31:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.vrParticleSystem, ptr %32, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8, !tbaa !13
  %35 = getelementptr inbounds %struct.vrArray, ptr %34, i32 0, i32 0
  %36 = load ptr, ptr %35, align 8, !tbaa !18
  %37 = load i32, ptr %5, align 4, !tbaa !11
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds ptr, ptr %36, i64 %38
  %40 = load ptr, ptr %39, align 8, !tbaa !5
  store ptr %40, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !11
  br label %41

41:                                               ; preds = %162, %31
  %42 = load i32, ptr %8, align 4, !tbaa !11
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.vrParticleSystem, ptr %43, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !13
  %46 = getelementptr inbounds %struct.vrArray, ptr %45, i32 0, i32 1
  %47 = load i32, ptr %46, align 8, !tbaa !16
  %48 = icmp slt i32 %42, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %41
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %165

50:                                               ; preds = %41
  %51 = load i32, ptr %8, align 4, !tbaa !11
  %52 = load i32, ptr %5, align 4, !tbaa !11
  %53 = icmp sgt i32 %51, %52
  br i1 %53, label %54, label %55

54:                                               ; preds = %50
  br label %162

55:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.vrParticleSystem, ptr %56, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8, !tbaa !13
  %59 = getelementptr inbounds %struct.vrArray, ptr %58, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8, !tbaa !18
  %61 = load i32, ptr %8, align 4, !tbaa !11
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds ptr, ptr %60, i64 %62
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  store ptr %64, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.vrParticle, ptr %65, i32 0, i32 0
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.vrParticle, ptr %67, i32 0, i32 0
  %69 = load <2 x float>, ptr %66, align 4
  %70 = load <2 x float>, ptr %68, align 4
  %71 = call <2 x float> @vrSub(<2 x float> %69, <2 x float> %70)
  store <2 x float> %71, ptr %10, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %72 = load <2 x float>, ptr %10, align 4
  %73 = call float @vrLengthSqr(<2 x float> %72)
  store float %73, ptr %11, align 4, !tbaa !9
  %74 = load float, ptr %11, align 4, !tbaa !9
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.vrParticle, ptr %75, i32 0, i32 8
  %77 = load float, ptr %76, align 4, !tbaa !19
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.vrParticle, ptr %78, i32 0, i32 8
  %80 = load float, ptr %79, align 4, !tbaa !19
  %81 = fmul float %77, %80
  %82 = fcmp ogt float %74, %81
  br i1 %82, label %83, label %84

83:                                               ; preds = %55
  store i32 7, ptr %6, align 4
  br label %159

84:                                               ; preds = %55
  %85 = load float, ptr %11, align 4, !tbaa !9
  %86 = fpext float %85 to double
  %87 = call double @sqrt(double noundef %86) #6
  %88 = fptrunc double %87 to float
  store float %88, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %89 = load float, ptr %11, align 4, !tbaa !9
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.vrParticle, ptr %90, i32 0, i32 8
  %92 = load float, ptr %91, align 4, !tbaa !19
  %93 = fdiv float %89, %92
  store float %93, ptr %12, align 4, !tbaa !9
  %94 = load float, ptr %12, align 4, !tbaa !9
  %95 = fcmp olt float %94, 1.000000e+00
  br i1 %95, label %96, label %158

96:                                               ; preds = %84
  %97 = load float, ptr %11, align 4, !tbaa !9
  %98 = fcmp une float %97, 0.000000e+00
  br i1 %98, label %99, label %158

99:                                               ; preds = %96
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %100 = load float, ptr %11, align 4, !tbaa !9
  %101 = fpext float %100 to double
  %102 = fdiv double 1.000000e+00, %101
  %103 = fptrunc double %102 to float
  %104 = load <2 x float>, ptr %10, align 4
  %105 = call <2 x float> @vrScale(<2 x float> %104, float noundef %103)
  store <2 x float> %105, ptr %13, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.vrParticle, ptr %106, i32 0, i32 2
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.vrParticle, ptr %108, i32 0, i32 2
  %110 = load <2 x float>, ptr %107, align 4
  %111 = load <2 x float>, ptr %109, align 4
  %112 = call <2 x float> @vrSub(<2 x float> %110, <2 x float> %111)
  store <2 x float> %112, ptr %15, align 4
  %113 = load <2 x float>, ptr %15, align 4
  %114 = load <2 x float>, ptr %13, align 4
  %115 = call float @vrDot(<2 x float> %113, <2 x float> %114)
  store float %115, ptr %14, align 4, !tbaa !9
  %116 = load float, ptr %14, align 4, !tbaa !9
  %117 = fcmp ogt float %116, 0.000000e+00
  br i1 %117, label %118, label %157

118:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %119 = load ptr, ptr %7, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.vrParticle, ptr %119, i32 0, i32 9
  %121 = load float, ptr %120, align 4, !tbaa !22
  store float %121, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %122 = load ptr, ptr %7, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.vrParticle, ptr %122, i32 0, i32 9
  %124 = load float, ptr %123, align 4, !tbaa !22
  %125 = fmul float %124, 5.000000e+00
  store float %125, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %126 = load float, ptr %4, align 4, !tbaa !9
  %127 = load float, ptr %12, align 4, !tbaa !9
  %128 = fsub float 1.000000e+00, %127
  %129 = fmul float %126, %128
  %130 = load float, ptr %17, align 4, !tbaa !9
  %131 = load float, ptr %14, align 4, !tbaa !9
  %132 = load float, ptr %16, align 4, !tbaa !9
  %133 = load float, ptr %14, align 4, !tbaa !9
  %134 = load float, ptr %14, align 4, !tbaa !9
  %135 = fmul float %133, %134
  %136 = fmul float %132, %135
  %137 = call float @llvm.fmuladd.f32(float %130, float %131, float %136)
  %138 = fmul float %129, %137
  %139 = load <2 x float>, ptr %13, align 4
  %140 = call <2 x float> @vrScale(<2 x float> %139, float noundef %138)
  store <2 x float> %140, ptr %18, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %141 = load <2 x float>, ptr %18, align 4
  %142 = call <2 x float> @vrScale(<2 x float> %141, float noundef 5.000000e-01)
  store <2 x float> %142, ptr %19, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %19, i64 8, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  %143 = load ptr, ptr %7, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.vrParticle, ptr %143, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %145 = load ptr, ptr %7, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.vrParticle, ptr %145, i32 0, i32 2
  %147 = load <2 x float>, ptr %146, align 4
  %148 = load <2 x float>, ptr %18, align 4
  %149 = call <2 x float> @vrSub(<2 x float> %147, <2 x float> %148)
  store <2 x float> %149, ptr %20, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %144, ptr align 4 %20, i64 8, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  %150 = load ptr, ptr %9, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.vrParticle, ptr %150, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %152 = load ptr, ptr %9, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.vrParticle, ptr %152, i32 0, i32 2
  %154 = load <2 x float>, ptr %153, align 4
  %155 = load <2 x float>, ptr %18, align 4
  %156 = call <2 x float> @vrAdd(<2 x float> %154, <2 x float> %155)
  store <2 x float> %156, ptr %21, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %151, ptr align 4 %21, i64 8, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %157

157:                                              ; preds = %118, %99
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %158

158:                                              ; preds = %157, %96, %84
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  store i32 0, ptr %6, align 4
  br label %159

159:                                              ; preds = %158, %83
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  %160 = load i32, ptr %6, align 4
  switch i32 %160, label %170 [
    i32 0, label %161
    i32 7, label %162
  ]

161:                                              ; preds = %159
  br label %162

162:                                              ; preds = %161, %159, %54
  %163 = load i32, ptr %8, align 4, !tbaa !11
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %8, align 4, !tbaa !11
  br label %41, !llvm.loop !24

165:                                              ; preds = %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %166

166:                                              ; preds = %165
  %167 = load i32, ptr %5, align 4, !tbaa !11
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %5, align 4, !tbaa !11
  br label %22, !llvm.loop !26

169:                                              ; preds = %30
  ret void

170:                                              ; preds = %159
  unreachable
}

declare float @vrLengthSqr(<2 x float>) #3

declare float @vrDot(<2 x float>, <2 x float>) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"vrParticleSystem", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !15, i64 36, !6, i64 48}
!15 = !{!"vrVec2", !10, i64 0, !10, i64 4}
!16 = !{!17, !12, i64 8}
!17 = !{!"vrArray", !6, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20}
!18 = !{!17, !6, i64 0}
!19 = !{!20, !10, i64 52}
!20 = !{!"vrParticle", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !21, i64 68}
!21 = !{!"vrColor", !10, i64 0, !10, i64 4, !10, i64 8}
!22 = !{!20, !10, i64 56}
!23 = !{i64 0, i64 4, !9, i64 4, i64 4, !9}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}


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

declare <2 x float> @vrScale(<2 x float>, float noundef) local_unnamed_addr #0

declare <2 x float> @vrSub(<2 x float>, <2 x float>) local_unnamed_addr #0

declare <2 x float> @vrAdd(<2 x float>, <2 x float>) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @vrParticleSystemViscousity(ptr nocapture noundef readonly %0, float noundef %1) local_unnamed_addr #1 {
  %3 = load ptr, ptr %0, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %3, i64 8
  %5 = load i32, ptr %4, align 8, !tbaa !12
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph57.split, label %._crit_edge58

._crit_edge58:                                    ; preds = %._crit_edge, %2
  ret void

.lr.ph57.split:                                   ; preds = %2, %._crit_edge
  %.pre = phi i32 [ %.pre65, %._crit_edge ], [ %5, %2 ]
  %7 = phi ptr [ %15, %._crit_edge ], [ %3, %2 ]
  %indvars.iv61 = phi i64 [ %indvars.iv.next62, %._crit_edge ], [ 0, %2 ]
  %8 = load ptr, ptr %7, align 8, !tbaa !15
  %9 = getelementptr inbounds ptr, ptr %8, i64 %indvars.iv61
  %10 = load ptr, ptr %9, align 8, !tbaa !16
  %11 = icmp sgt i32 %.pre, 0
  br i1 %11, label %.lr.ph, label %.lr.ph57.split.._crit_edge_crit_edge

.lr.ph57.split.._crit_edge_crit_edge:             ; preds = %.lr.ph57.split
  %.pre66 = sext i32 %.pre to i64
  br label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph57.split
  %12 = getelementptr inbounds i8, ptr %10, i64 52
  %13 = getelementptr inbounds i8, ptr %10, i64 16
  %14 = getelementptr inbounds i8, ptr %10, i64 56
  br label %17

._crit_edge:                                      ; preds = %60, %.lr.ph57.split.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre66, %.lr.ph57.split.._crit_edge_crit_edge ], [ %64, %60 ]
  %.pre65 = phi i32 [ %.pre, %.lr.ph57.split.._crit_edge_crit_edge ], [ %63, %60 ]
  %15 = phi ptr [ %7, %.lr.ph57.split.._crit_edge_crit_edge ], [ %61, %60 ]
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %16 = icmp slt i64 %indvars.iv.next62, %.pre-phi
  br i1 %16, label %.lr.ph57.split, label %._crit_edge58, !llvm.loop !17

17:                                               ; preds = %.lr.ph, %60
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %60 ]
  %18 = phi ptr [ %7, %.lr.ph ], [ %61, %60 ]
  %19 = icmp ugt i64 %indvars.iv, %indvars.iv61
  br i1 %19, label %60, label %20

20:                                               ; preds = %17
  %21 = load ptr, ptr %18, align 8, !tbaa !15
  %22 = getelementptr inbounds ptr, ptr %21, i64 %indvars.iv
  %23 = load ptr, ptr %22, align 8, !tbaa !16
  %24 = load <2 x float>, ptr %23, align 4
  %25 = load <2 x float>, ptr %10, align 4
  %26 = tail call <2 x float> @vrSub(<2 x float> %24, <2 x float> %25) #3
  %27 = tail call float @vrLengthSqr(<2 x float> %26) #3
  %28 = load float, ptr %12, align 4, !tbaa !20
  %29 = fmul float %28, %28
  %30 = fcmp ogt float %27, %29
  br i1 %30, label %60, label %31

31:                                               ; preds = %20
  %sqrtf = tail call float @sqrtf(float noundef %27) #4
  %32 = load float, ptr %12, align 4, !tbaa !20
  %33 = fdiv float %sqrtf, %32
  %34 = fcmp olt float %33, 1.000000e+00
  %35 = fcmp une float %sqrtf, 0.000000e+00
  %or.cond = and i1 %35, %34
  br i1 %or.cond, label %36, label %60

36:                                               ; preds = %31
  %37 = fdiv float 1.000000e+00, %sqrtf
  %38 = tail call <2 x float> @vrScale(<2 x float> %26, float noundef %37) #3
  %39 = getelementptr inbounds i8, ptr %23, i64 16
  %40 = load <2 x float>, ptr %13, align 4
  %41 = load <2 x float>, ptr %39, align 4
  %42 = tail call <2 x float> @vrSub(<2 x float> %40, <2 x float> %41) #3
  %43 = tail call float @vrDot(<2 x float> %42, <2 x float> %38) #3
  %44 = fcmp ogt float %43, 0.000000e+00
  br i1 %44, label %45, label %60

45:                                               ; preds = %36
  %46 = load float, ptr %14, align 4, !tbaa !23
  %47 = fmul float %46, 5.000000e+00
  %48 = fsub float 1.000000e+00, %33
  %49 = fmul float %48, %1
  %50 = fmul float %43, %43
  %51 = fmul float %50, %46
  %52 = tail call float @llvm.fmuladd.f32(float %47, float %43, float %51)
  %53 = fmul float %49, %52
  %54 = tail call <2 x float> @vrScale(<2 x float> %38, float noundef %53) #3
  %55 = tail call <2 x float> @vrScale(<2 x float> %54, float noundef 5.000000e-01) #3
  %56 = load <2 x float>, ptr %13, align 4
  %57 = tail call <2 x float> @vrSub(<2 x float> %56, <2 x float> %55) #3
  store <2 x float> %57, ptr %13, align 4
  %58 = load <2 x float>, ptr %39, align 4
  %59 = tail call <2 x float> @vrAdd(<2 x float> %58, <2 x float> %55) #3
  store <2 x float> %59, ptr %39, align 4
  br label %60

60:                                               ; preds = %20, %36, %45, %31, %17
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %61 = load ptr, ptr %0, align 8, !tbaa !5
  %62 = getelementptr inbounds i8, ptr %61, i64 8
  %63 = load i32, ptr %62, align 8, !tbaa !12
  %64 = sext i32 %63 to i64
  %65 = icmp slt i64 %indvars.iv.next, %64
  br i1 %65, label %17, label %._crit_edge, !llvm.loop !24
}

declare float @vrLengthSqr(<2 x float>) local_unnamed_addr #0

declare float @vrDot(<2 x float>, <2 x float>) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #2

declare float @sqrtf(float) local_unnamed_addr

attributes #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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nounwind }
attributes #4 = { mustprogress nofree nounwind willreturn memory(write) "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" }

!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 = !{!"vrParticleSystem", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !11, i64 36, !7, i64 48}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!"vrVec2", !10, i64 0, !10, i64 4}
!12 = !{!13, !14, i64 8}
!13 = !{!"vrArray", !7, i64 0, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20}
!14 = !{!"int", !8, i64 0}
!15 = !{!13, !7, i64 0}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !18, !19}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!"llvm.loop.unswitch.partial.disable"}
!20 = !{!21, !10, i64 52}
!21 = !{!"vrParticle", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !22, i64 68}
!22 = !{!"vrColor", !10, i64 0, !10, i64 4, !10, i64 8}
!23 = !{!21, !10, i64 56}
!24 = distinct !{!24, !18}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass