; 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 uwtable
define dso_local void @vrParticleSystemStep(ptr noundef %0, float noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca float, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca %struct.vrVec2, align 4
  %8 = alloca %struct.vrVec2, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca %struct.vrVec2, align 4
  %12 = alloca %struct.vrVec2, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca %struct.vrVec2, align 4
  %16 = alloca %struct.vrVec2, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  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) #5
  store i32 0, ptr %5, align 4, !tbaa !11
  br label %19

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

27:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %56

28:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.vrParticleSystem, ptr %29, i32 0, i32 0
  %31 = load ptr, ptr %30, align 8, !tbaa !13
  %32 = getelementptr inbounds %struct.vrArray, ptr %31, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !18
  %34 = load i32, ptr %5, align 4, !tbaa !11
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds ptr, ptr %33, i64 %35
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  store ptr %37, ptr %6, align 8, !tbaa !5
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.vrParticle, ptr %38, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.vrParticle, ptr %40, i32 0, i32 0
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.vrParticle, ptr %42, i32 0, i32 1
  %44 = load <2 x float>, ptr %41, align 4
  %45 = load <2 x float>, ptr %43, align 4
  %46 = call <2 x float> @vrSub(<2 x float> %44, <2 x float> %45)
  store <2 x float> %46, ptr %8, align 4
  %47 = load float, ptr %4, align 4, !tbaa !9
  %48 = fpext float %47 to double
  %49 = fdiv double 1.000000e+00, %48
  %50 = fptrunc double %49 to float
  %51 = load <2 x float>, ptr %8, align 4
  %52 = call <2 x float> @vrScale(<2 x float> %51, float noundef %50)
  store <2 x float> %52, ptr %7, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %39, ptr align 4 %7, i64 8, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %53

53:                                               ; preds = %28
  %54 = load i32, ptr %5, align 4, !tbaa !11
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %5, align 4, !tbaa !11
  br label %19, !llvm.loop !20

56:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !11
  br label %57

57:                                               ; preds = %88, %56
  %58 = load i32, ptr %9, align 4, !tbaa !11
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.vrParticleSystem, ptr %59, i32 0, i32 0
  %61 = load ptr, ptr %60, align 8, !tbaa !13
  %62 = getelementptr inbounds %struct.vrArray, ptr %61, i32 0, i32 1
  %63 = load i32, ptr %62, align 8, !tbaa !16
  %64 = icmp slt i32 %58, %63
  br i1 %64, label %66, label %65

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

66:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.vrParticleSystem, ptr %67, i32 0, i32 0
  %69 = load ptr, ptr %68, align 8, !tbaa !13
  %70 = getelementptr inbounds %struct.vrArray, ptr %69, i32 0, i32 0
  %71 = load ptr, ptr %70, align 8, !tbaa !18
  %72 = load i32, ptr %9, align 4, !tbaa !11
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds ptr, ptr %71, i64 %73
  %75 = load ptr, ptr %74, align 8, !tbaa !5
  store ptr %75, ptr %10, align 8, !tbaa !5
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.vrParticle, ptr %76, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %78 = load ptr, ptr %10, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.vrParticle, ptr %78, i32 0, i32 2
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.vrParticleSystem, ptr %80, i32 0, i32 8
  %82 = load float, ptr %4, align 4, !tbaa !9
  %83 = load <2 x float>, ptr %81, align 4
  %84 = call <2 x float> @vrScale(<2 x float> %83, float noundef %82)
  store <2 x float> %84, ptr %12, align 4
  %85 = load <2 x float>, ptr %79, align 4
  %86 = load <2 x float>, ptr %12, align 4
  %87 = call <2 x float> @vrAdd(<2 x float> %85, <2 x float> %86)
  store <2 x float> %87, ptr %11, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %77, ptr align 4 %11, i64 8, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %88

88:                                               ; preds = %66
  %89 = load i32, ptr %9, align 4, !tbaa !11
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %9, align 4, !tbaa !11
  br label %57, !llvm.loop !22

91:                                               ; preds = %65
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = load float, ptr %4, align 4, !tbaa !9
  call void @vrParticleSystemViscousity(ptr noundef %92, float noundef %93)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !11
  br label %94

94:                                               ; preds = %129, %91
  %95 = load i32, ptr %13, align 4, !tbaa !11
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.vrParticleSystem, ptr %96, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8, !tbaa !13
  %99 = getelementptr inbounds %struct.vrArray, ptr %98, i32 0, i32 1
  %100 = load i32, ptr %99, align 8, !tbaa !16
  %101 = icmp slt i32 %95, %100
  br i1 %101, label %103, label %102

102:                                              ; preds = %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %132

103:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.vrParticleSystem, ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !13
  %107 = getelementptr inbounds %struct.vrArray, ptr %106, i32 0, i32 0
  %108 = load ptr, ptr %107, align 8, !tbaa !18
  %109 = load i32, ptr %13, align 4, !tbaa !11
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds ptr, ptr %108, i64 %110
  %112 = load ptr, ptr %111, align 8, !tbaa !5
  store ptr %112, ptr %14, align 8, !tbaa !5
  %113 = load ptr, ptr %14, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.vrParticle, ptr %113, i32 0, i32 1
  %115 = load ptr, ptr %14, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.vrParticle, ptr %115, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %114, ptr align 4 %116, i64 8, i1 false), !tbaa.struct !19
  %117 = load ptr, ptr %14, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.vrParticle, ptr %117, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %119 = load ptr, ptr %14, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.vrParticle, ptr %119, i32 0, i32 0
  %121 = load ptr, ptr %14, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.vrParticle, ptr %121, i32 0, i32 2
  %123 = load float, ptr %4, align 4, !tbaa !9
  %124 = load <2 x float>, ptr %122, align 4
  %125 = call <2 x float> @vrScale(<2 x float> %124, float noundef %123)
  store <2 x float> %125, ptr %16, align 4
  %126 = load <2 x float>, ptr %120, align 4
  %127 = load <2 x float>, ptr %16, align 4
  %128 = call <2 x float> @vrAdd(<2 x float> %126, <2 x float> %127)
  store <2 x float> %128, ptr %15, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %118, ptr align 4 %15, i64 8, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %129

129:                                              ; preds = %103
  %130 = load i32, ptr %13, align 4, !tbaa !11
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %13, align 4, !tbaa !11
  br label %94, !llvm.loop !23

132:                                              ; preds = %102
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  %134 = load float, ptr %4, align 4, !tbaa !9
  call void @vrParticleSystemDoubleDensity(ptr noundef %133, float noundef %134)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !11
  br label %135

135:                                              ; preds = %158, %132
  %136 = load i32, ptr %17, align 4, !tbaa !11
  %137 = load ptr, ptr %3, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.vrParticleSystem, ptr %137, i32 0, i32 0
  %139 = load ptr, ptr %138, align 8, !tbaa !13
  %140 = getelementptr inbounds %struct.vrArray, ptr %139, i32 0, i32 1
  %141 = load i32, ptr %140, align 8, !tbaa !16
  %142 = icmp slt i32 %136, %141
  br i1 %142, label %144, label %143

143:                                              ; preds = %135
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %161

144:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %145 = load ptr, ptr %3, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.vrParticleSystem, ptr %145, i32 0, i32 0
  %147 = load ptr, ptr %146, align 8, !tbaa !13
  %148 = getelementptr inbounds %struct.vrArray, ptr %147, i32 0, i32 0
  %149 = load ptr, ptr %148, align 8, !tbaa !18
  %150 = load i32, ptr %17, align 4, !tbaa !11
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds ptr, ptr %149, i64 %151
  %153 = load ptr, ptr %152, align 8, !tbaa !5
  store ptr %153, ptr %18, align 8, !tbaa !5
  %154 = load ptr, ptr %18, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.vrParticle, ptr %154, i32 0, i32 5
  store float 0.000000e+00, ptr %155, align 4, !tbaa !24
  %156 = load ptr, ptr %18, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.vrParticle, ptr %156, i32 0, i32 10
  store float 0.000000e+00, ptr %157, align 4, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %158

158:                                              ; preds = %144
  %159 = load i32, ptr %17, align 4, !tbaa !11
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %17, align 4, !tbaa !11
  br label %135, !llvm.loop !28

161:                                              ; preds = %143
  %162 = load ptr, ptr %3, align 8, !tbaa !5
  call void @vrParticleSystemBoundaries(ptr noundef %162)
  ret void
}

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
declare dso_local void @vrParticleSystemViscousity(ptr noundef, float noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @vrParticleSystemDoubleDensity(ptr noundef, float noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @vrParticleSystemBoundaries(ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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"="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 #5 = { 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 = !{i64 0, i64 4, !9, i64 4, i64 4, !9}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = distinct !{!23, !21}
!24 = !{!25, !10, i64 40}
!25 = !{!"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, !26, i64 68}
!26 = !{!"vrColor", !10, i64 0, !10, i64 4, !10, i64 8}
!27 = !{!25, !10, i64 60}
!28 = distinct !{!28, !21}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: nounwind uwtable
define dso_local void @vrParticleSystemStep(ptr noundef %0, float noundef %1) local_unnamed_addr #0 {
  %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.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2
  %7 = fdiv float 1.000000e+00, %1
  br label %10

.preheader:                                       ; preds = %10
  %8 = icmp sgt i32 %23, 0
  br i1 %8, label %.lr.ph50, label %._crit_edge

.lr.ph50:                                         ; preds = %.preheader
  %9 = getelementptr inbounds i8, ptr %0, i64 36
  br label %30

10:                                               ; preds = %.lr.ph, %10
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %10 ]
  %11 = phi ptr [ %3, %.lr.ph ], [ %21, %10 ]
  %12 = load ptr, ptr %11, align 8, !tbaa !15
  %13 = getelementptr inbounds ptr, ptr %12, i64 %indvars.iv
  %14 = load ptr, ptr %13, align 8, !tbaa !16
  %15 = getelementptr inbounds i8, ptr %14, i64 16
  %16 = getelementptr inbounds i8, ptr %14, i64 8
  %17 = load <2 x float>, ptr %14, align 4
  %18 = load <2 x float>, ptr %16, align 4
  %19 = tail call <2 x float> @vrSub(<2 x float> %17, <2 x float> %18) #3
  %20 = tail call <2 x float> @vrScale(<2 x float> %19, float noundef %7) #3
  store <2 x float> %20, ptr %15, align 4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %21 = load ptr, ptr %0, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %21, i64 8
  %23 = load i32, ptr %22, align 8, !tbaa !12
  %24 = sext i32 %23 to i64
  %25 = icmp slt i64 %indvars.iv.next, %24
  br i1 %25, label %10, label %.preheader, !llvm.loop !17

._crit_edge:                                      ; preds = %30, %2, %.preheader
  tail call void @vrParticleSystemViscousity(ptr noundef nonnull %0, float noundef %1)
  %26 = load ptr, ptr %0, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %26, i64 8
  %28 = load i32, ptr %27, align 8, !tbaa !12
  %29 = icmp sgt i32 %28, 0
  br i1 %29, label %.lr.ph53, label %._crit_edge54

30:                                               ; preds = %.lr.ph50, %30
  %indvars.iv60 = phi i64 [ 0, %.lr.ph50 ], [ %indvars.iv.next61, %30 ]
  %31 = phi ptr [ %21, %.lr.ph50 ], [ %40, %30 ]
  %32 = load ptr, ptr %31, align 8, !tbaa !15
  %33 = getelementptr inbounds ptr, ptr %32, i64 %indvars.iv60
  %34 = load ptr, ptr %33, align 8, !tbaa !16
  %35 = getelementptr inbounds i8, ptr %34, i64 16
  %36 = load <2 x float>, ptr %9, align 4
  %37 = tail call <2 x float> @vrScale(<2 x float> %36, float noundef %1) #3
  %38 = load <2 x float>, ptr %35, align 4
  %39 = tail call <2 x float> @vrAdd(<2 x float> %38, <2 x float> %37) #3
  store <2 x float> %39, ptr %35, align 4
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %40 = load ptr, ptr %0, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %40, i64 8
  %42 = load i32, ptr %41, align 8, !tbaa !12
  %43 = sext i32 %42 to i64
  %44 = icmp slt i64 %indvars.iv.next61, %43
  br i1 %44, label %30, label %._crit_edge, !llvm.loop !19

._crit_edge54:                                    ; preds = %.lr.ph53, %._crit_edge
  tail call void @vrParticleSystemDoubleDensity(ptr noundef nonnull %0, float noundef %1)
  %45 = load ptr, ptr %0, align 8, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %45, i64 8
  %47 = load i32, ptr %46, align 8, !tbaa !12
  %48 = icmp sgt i32 %47, 0
  br i1 %48, label %.lr.ph57, label %._crit_edge58

.lr.ph57:                                         ; preds = %._crit_edge54
  %49 = load ptr, ptr %45, align 8, !tbaa !15
  %wide.trip.count = zext nneg i32 %47 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %50 = icmp ult i32 %47, 4
  br i1 %50, label %._crit_edge58.loopexit.unr-lcssa, label %.lr.ph57.new

.lr.ph57.new:                                     ; preds = %.lr.ph57
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %71

.lr.ph53:                                         ; preds = %._crit_edge, %.lr.ph53
  %indvars.iv63 = phi i64 [ %indvars.iv.next64, %.lr.ph53 ], [ 0, %._crit_edge ]
  %51 = phi ptr [ %62, %.lr.ph53 ], [ %26, %._crit_edge ]
  %52 = load ptr, ptr %51, align 8, !tbaa !15
  %53 = getelementptr inbounds ptr, ptr %52, i64 %indvars.iv63
  %54 = load ptr, ptr %53, align 8, !tbaa !16
  %55 = getelementptr inbounds i8, ptr %54, i64 8
  %56 = load i64, ptr %54, align 4
  store i64 %56, ptr %55, align 4
  %57 = getelementptr inbounds i8, ptr %54, i64 16
  %58 = load <2 x float>, ptr %57, align 4
  %59 = tail call <2 x float> @vrScale(<2 x float> %58, float noundef %1) #3
  %60 = load <2 x float>, ptr %54, align 4
  %61 = tail call <2 x float> @vrAdd(<2 x float> %60, <2 x float> %59) #3
  store <2 x float> %61, ptr %54, align 4
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %62 = load ptr, ptr %0, align 8, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %62, i64 8
  %64 = load i32, ptr %63, align 8, !tbaa !12
  %65 = sext i32 %64 to i64
  %66 = icmp slt i64 %indvars.iv.next64, %65
  br i1 %66, label %.lr.ph53, label %._crit_edge54, !llvm.loop !20

._crit_edge58.loopexit.unr-lcssa:                 ; preds = %71, %.lr.ph57
  %indvars.iv66.unr = phi i64 [ 0, %.lr.ph57 ], [ %indvars.iv.next67.3, %71 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge58, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge58.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv66.epil = phi i64 [ %indvars.iv.next67.epil, %.epil.preheader ], [ %indvars.iv66.unr, %._crit_edge58.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge58.loopexit.unr-lcssa ]
  %67 = getelementptr inbounds ptr, ptr %49, i64 %indvars.iv66.epil
  %68 = load ptr, ptr %67, align 8, !tbaa !16
  %69 = getelementptr inbounds i8, ptr %68, i64 40
  store float 0.000000e+00, ptr %69, align 4, !tbaa !21
  %70 = getelementptr inbounds i8, ptr %68, i64 60
  store float 0.000000e+00, ptr %70, align 4, !tbaa !24
  %indvars.iv.next67.epil = add nuw nsw i64 %indvars.iv66.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_edge58, label %.epil.preheader, !llvm.loop !25

._crit_edge58:                                    ; preds = %._crit_edge58.loopexit.unr-lcssa, %.epil.preheader, %._crit_edge54
  tail call void @vrParticleSystemBoundaries(ptr noundef nonnull %0)
  ret void

71:                                               ; preds = %71, %.lr.ph57.new
  %indvars.iv66 = phi i64 [ 0, %.lr.ph57.new ], [ %indvars.iv.next67.3, %71 ]
  %niter = phi i64 [ 0, %.lr.ph57.new ], [ %niter.next.3, %71 ]
  %72 = getelementptr inbounds ptr, ptr %49, i64 %indvars.iv66
  %73 = load ptr, ptr %72, align 8, !tbaa !16
  %74 = getelementptr inbounds i8, ptr %73, i64 40
  store float 0.000000e+00, ptr %74, align 4, !tbaa !21
  %75 = getelementptr inbounds i8, ptr %73, i64 60
  store float 0.000000e+00, ptr %75, align 4, !tbaa !24
  %indvars.iv.next67 = or disjoint i64 %indvars.iv66, 1
  %76 = getelementptr inbounds ptr, ptr %49, i64 %indvars.iv.next67
  %77 = load ptr, ptr %76, align 8, !tbaa !16
  %78 = getelementptr inbounds i8, ptr %77, i64 40
  store float 0.000000e+00, ptr %78, align 4, !tbaa !21
  %79 = getelementptr inbounds i8, ptr %77, i64 60
  store float 0.000000e+00, ptr %79, align 4, !tbaa !24
  %indvars.iv.next67.1 = or disjoint i64 %indvars.iv66, 2
  %80 = getelementptr inbounds ptr, ptr %49, i64 %indvars.iv.next67.1
  %81 = load ptr, ptr %80, align 8, !tbaa !16
  %82 = getelementptr inbounds i8, ptr %81, i64 40
  store float 0.000000e+00, ptr %82, align 4, !tbaa !21
  %83 = getelementptr inbounds i8, ptr %81, i64 60
  store float 0.000000e+00, ptr %83, align 4, !tbaa !24
  %indvars.iv.next67.2 = or disjoint i64 %indvars.iv66, 3
  %84 = getelementptr inbounds ptr, ptr %49, i64 %indvars.iv.next67.2
  %85 = load ptr, ptr %84, align 8, !tbaa !16
  %86 = getelementptr inbounds i8, ptr %85, i64 40
  store float 0.000000e+00, ptr %86, align 4, !tbaa !21
  %87 = getelementptr inbounds i8, ptr %85, i64 60
  store float 0.000000e+00, ptr %87, align 4, !tbaa !24
  %indvars.iv.next67.3 = add nuw nsw i64 %indvars.iv66, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge58.loopexit.unr-lcssa, label %71, !llvm.loop !27
}

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @vrParticleSystemViscousity(ptr noundef, float noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @vrParticleSystemDoubleDensity(ptr noundef, float noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @vrParticleSystemBoundaries(ptr noundef) local_unnamed_addr #2

attributes #0 = { 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 #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #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, !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}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !18}
!21 = !{!22, !10, i64 40}
!22 = !{!"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, !23, i64 68}
!23 = !{!"vrColor", !10, i64 0, !10, i64 4, !10, i64 8}
!24 = !{!22, !10, i64 60}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.unroll.disable"}
!27 = distinct !{!27, !18}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass