; LLVM IR from FSmallenburg/EDMD :: Cell (mdCell)

; 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.sparticle = type { double, double, double, double, double, double, double, double, double, i8, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, i8 }

@inputfilename = external dso_local global [100 x i8], align 16
@N = external dso_local global i32, align 4
@particles = external dso_local global ptr, align 8
@.str.21 = external hidden unnamed_addr constant [37 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: nounwind uwtable
define dso_local void @randommovement() #3 {
  %1 = alloca ptr, align 8
  %2 = alloca double, align 8
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  store double 0.000000e+00, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store double 0.000000e+00, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store double 0.000000e+00, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store double 0.000000e+00, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store double 0.000000e+00, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %10

10:                                               ; preds = %68, %0
  %11 = load i32, ptr %7, align 4, !tbaa !9
  %12 = load i32, ptr @N, align 4, !tbaa !9
  %13 = icmp slt i32 %11, %12
  br i1 %13, label %14, label %71

14:                                               ; preds = %10
  %15 = load ptr, ptr @particles, align 8, !tbaa !11
  %16 = load i32, ptr %7, align 4, !tbaa !9
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds %struct.sparticle, ptr %15, i64 %17
  store ptr %18, ptr %1, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %19 = load ptr, ptr %1, align 8, !tbaa !11
  %20 = getelementptr inbounds %struct.sparticle, ptr %19, i32 0, i32 8
  %21 = load double, ptr %20, align 8, !tbaa !13
  %22 = call double @sqrt(double noundef %21) #5
  %23 = fdiv double 1.000000e+00, %22
  store double %23, ptr %8, align 8, !tbaa !5
  %24 = load double, ptr %8, align 8, !tbaa !5
  %25 = call double @random_gaussian()
  %26 = fmul double %24, %25
  %27 = load ptr, ptr %1, align 8, !tbaa !11
  %28 = getelementptr inbounds %struct.sparticle, ptr %27, i32 0, i32 3
  store double %26, ptr %28, align 8, !tbaa !15
  %29 = load double, ptr %8, align 8, !tbaa !5
  %30 = call double @random_gaussian()
  %31 = fmul double %29, %30
  %32 = load ptr, ptr %1, align 8, !tbaa !11
  %33 = getelementptr inbounds %struct.sparticle, ptr %32, i32 0, i32 4
  store double %31, ptr %33, align 8, !tbaa !16
  %34 = load double, ptr %8, align 8, !tbaa !5
  %35 = call double @random_gaussian()
  %36 = fmul double %34, %35
  %37 = load ptr, ptr %1, align 8, !tbaa !11
  %38 = getelementptr inbounds %struct.sparticle, ptr %37, i32 0, i32 5
  store double %36, ptr %38, align 8, !tbaa !17
  %39 = load ptr, ptr %1, align 8, !tbaa !11
  %40 = getelementptr inbounds %struct.sparticle, ptr %39, i32 0, i32 8
  %41 = load double, ptr %40, align 8, !tbaa !13
  %42 = load ptr, ptr %1, align 8, !tbaa !11
  %43 = getelementptr inbounds %struct.sparticle, ptr %42, i32 0, i32 3
  %44 = load double, ptr %43, align 8, !tbaa !15
  %45 = load double, ptr %3, align 8, !tbaa !5
  %46 = call double @llvm.fmuladd.f64(double %41, double %44, double %45)
  store double %46, ptr %3, align 8, !tbaa !5
  %47 = load ptr, ptr %1, align 8, !tbaa !11
  %48 = getelementptr inbounds %struct.sparticle, ptr %47, i32 0, i32 8
  %49 = load double, ptr %48, align 8, !tbaa !13
  %50 = load ptr, ptr %1, align 8, !tbaa !11
  %51 = getelementptr inbounds %struct.sparticle, ptr %50, i32 0, i32 4
  %52 = load double, ptr %51, align 8, !tbaa !16
  %53 = load double, ptr %4, align 8, !tbaa !5
  %54 = call double @llvm.fmuladd.f64(double %49, double %52, double %53)
  store double %54, ptr %4, align 8, !tbaa !5
  %55 = load ptr, ptr %1, align 8, !tbaa !11
  %56 = getelementptr inbounds %struct.sparticle, ptr %55, i32 0, i32 8
  %57 = load double, ptr %56, align 8, !tbaa !13
  %58 = load ptr, ptr %1, align 8, !tbaa !11
  %59 = getelementptr inbounds %struct.sparticle, ptr %58, i32 0, i32 5
  %60 = load double, ptr %59, align 8, !tbaa !17
  %61 = load double, ptr %5, align 8, !tbaa !5
  %62 = call double @llvm.fmuladd.f64(double %57, double %60, double %61)
  store double %62, ptr %5, align 8, !tbaa !5
  %63 = load ptr, ptr %1, align 8, !tbaa !11
  %64 = getelementptr inbounds %struct.sparticle, ptr %63, i32 0, i32 8
  %65 = load double, ptr %64, align 8, !tbaa !13
  %66 = load double, ptr %6, align 8, !tbaa !5
  %67 = fadd double %66, %65
  store double %67, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %68

68:                                               ; preds = %14
  %69 = load i32, ptr %7, align 4, !tbaa !9
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %7, align 4, !tbaa !9
  br label %10, !llvm.loop !18

71:                                               ; preds = %10
  %72 = load double, ptr %6, align 8, !tbaa !5
  %73 = load double, ptr %3, align 8, !tbaa !5
  %74 = fdiv double %73, %72
  store double %74, ptr %3, align 8, !tbaa !5
  %75 = load double, ptr %6, align 8, !tbaa !5
  %76 = load double, ptr %4, align 8, !tbaa !5
  %77 = fdiv double %76, %75
  store double %77, ptr %4, align 8, !tbaa !5
  %78 = load double, ptr %6, align 8, !tbaa !5
  %79 = load double, ptr %5, align 8, !tbaa !5
  %80 = fdiv double %79, %78
  store double %80, ptr %5, align 8, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %81

81:                                               ; preds = %131, %71
  %82 = load i32, ptr %7, align 4, !tbaa !9
  %83 = load i32, ptr @N, align 4, !tbaa !9
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %85, label %134

85:                                               ; preds = %81
  %86 = load ptr, ptr @particles, align 8, !tbaa !11
  %87 = load i32, ptr %7, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds %struct.sparticle, ptr %86, i64 %88
  store ptr %89, ptr %1, align 8, !tbaa !11
  %90 = load double, ptr %3, align 8, !tbaa !5
  %91 = load ptr, ptr %1, align 8, !tbaa !11
  %92 = getelementptr inbounds %struct.sparticle, ptr %91, i32 0, i32 3
  %93 = load double, ptr %92, align 8, !tbaa !15
  %94 = fsub double %93, %90
  store double %94, ptr %92, align 8, !tbaa !15
  %95 = load double, ptr %4, align 8, !tbaa !5
  %96 = load ptr, ptr %1, align 8, !tbaa !11
  %97 = getelementptr inbounds %struct.sparticle, ptr %96, i32 0, i32 4
  %98 = load double, ptr %97, align 8, !tbaa !16
  %99 = fsub double %98, %95
  store double %99, ptr %97, align 8, !tbaa !16
  %100 = load double, ptr %5, align 8, !tbaa !5
  %101 = load ptr, ptr %1, align 8, !tbaa !11
  %102 = getelementptr inbounds %struct.sparticle, ptr %101, i32 0, i32 5
  %103 = load double, ptr %102, align 8, !tbaa !17
  %104 = fsub double %103, %100
  store double %104, ptr %102, align 8, !tbaa !17
  %105 = load ptr, ptr %1, align 8, !tbaa !11
  %106 = getelementptr inbounds %struct.sparticle, ptr %105, i32 0, i32 8
  %107 = load double, ptr %106, align 8, !tbaa !13
  %108 = load ptr, ptr %1, align 8, !tbaa !11
  %109 = getelementptr inbounds %struct.sparticle, ptr %108, i32 0, i32 3
  %110 = load double, ptr %109, align 8, !tbaa !15
  %111 = load ptr, ptr %1, align 8, !tbaa !11
  %112 = getelementptr inbounds %struct.sparticle, ptr %111, i32 0, i32 3
  %113 = load double, ptr %112, align 8, !tbaa !15
  %114 = load ptr, ptr %1, align 8, !tbaa !11
  %115 = getelementptr inbounds %struct.sparticle, ptr %114, i32 0, i32 4
  %116 = load double, ptr %115, align 8, !tbaa !16
  %117 = load ptr, ptr %1, align 8, !tbaa !11
  %118 = getelementptr inbounds %struct.sparticle, ptr %117, i32 0, i32 4
  %119 = load double, ptr %118, align 8, !tbaa !16
  %120 = fmul double %116, %119
  %121 = call double @llvm.fmuladd.f64(double %110, double %113, double %120)
  %122 = load ptr, ptr %1, align 8, !tbaa !11
  %123 = getelementptr inbounds %struct.sparticle, ptr %122, i32 0, i32 5
  %124 = load double, ptr %123, align 8, !tbaa !17
  %125 = load ptr, ptr %1, align 8, !tbaa !11
  %126 = getelementptr inbounds %struct.sparticle, ptr %125, i32 0, i32 5
  %127 = load double, ptr %126, align 8, !tbaa !17
  %128 = call double @llvm.fmuladd.f64(double %124, double %127, double %121)
  %129 = load double, ptr %2, align 8, !tbaa !5
  %130 = call double @llvm.fmuladd.f64(double %107, double %128, double %129)
  store double %130, ptr %2, align 8, !tbaa !5
  br label %131

131:                                              ; preds = %85
  %132 = load i32, ptr %7, align 4, !tbaa !9
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %7, align 4, !tbaa !9
  br label %81, !llvm.loop !20

134:                                              ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %135 = load double, ptr %2, align 8, !tbaa !5
  %136 = load i32, ptr @N, align 4, !tbaa !9
  %137 = sitofp i32 %136 to double
  %138 = fdiv double %135, %137
  %139 = fdiv double 3.000000e+00, %138
  %140 = call double @sqrt(double noundef %139) #5
  store double %140, ptr %9, align 8, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %141

141:                                              ; preds = %165, %134
  %142 = load i32, ptr %7, align 4, !tbaa !9
  %143 = load i32, ptr @N, align 4, !tbaa !9
  %144 = icmp slt i32 %142, %143
  br i1 %144, label %145, label %168

145:                                              ; preds = %141
  %146 = load ptr, ptr @particles, align 8, !tbaa !11
  %147 = load i32, ptr %7, align 4, !tbaa !9
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds %struct.sparticle, ptr %146, i64 %148
  store ptr %149, ptr %1, align 8, !tbaa !11
  %150 = load double, ptr %9, align 8, !tbaa !5
  %151 = load ptr, ptr %1, align 8, !tbaa !11
  %152 = getelementptr inbounds %struct.sparticle, ptr %151, i32 0, i32 3
  %153 = load double, ptr %152, align 8, !tbaa !15
  %154 = fmul double %153, %150
  store double %154, ptr %152, align 8, !tbaa !15
  %155 = load double, ptr %9, align 8, !tbaa !5
  %156 = load ptr, ptr %1, align 8, !tbaa !11
  %157 = getelementptr inbounds %struct.sparticle, ptr %156, i32 0, i32 4
  %158 = load double, ptr %157, align 8, !tbaa !16
  %159 = fmul double %158, %155
  store double %159, ptr %157, align 8, !tbaa !16
  %160 = load double, ptr %9, align 8, !tbaa !5
  %161 = load ptr, ptr %1, align 8, !tbaa !11
  %162 = getelementptr inbounds %struct.sparticle, ptr %161, i32 0, i32 5
  %163 = load double, ptr %162, align 8, !tbaa !17
  %164 = fmul double %163, %160
  store double %164, ptr %162, align 8, !tbaa !17
  br label %165

165:                                              ; preds = %145
  %166 = load i32, ptr %7, align 4, !tbaa !9
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %7, align 4, !tbaa !9
  br label %141, !llvm.loop !21

168:                                              ; preds = %141
  %169 = call i32 (ptr, ...) @printf(ptr noundef @.str.21, ptr noundef @inputfilename)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  ret void
}

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

; Function Attrs: nounwind uwtable
declare dso_local double @random_gaussian() #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { "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 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 #4 = { 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 #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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !6, i64 64}
!14 = !{!"sparticle", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !7, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !12, i64 104, !12, i64 112, !12, i64 120, !7, i64 128}
!15 = !{!14, !6, i64 24}
!16 = !{!14, !6, i64 32}
!17 = !{!14, !6, i64 40}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}


; 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.sparticle = type { double, double, double, double, double, double, double, double, double, i8, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, i8 }

@inputfilename = external dso_local global [100 x i8], align 16
@N = external dso_local local_unnamed_addr global i32, align 4
@particles = external dso_local local_unnamed_addr global ptr, align 8
@.str.21 = external hidden unnamed_addr constant [37 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #0

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @randommovement() local_unnamed_addr #2 {
  %1 = load i32, ptr @N, align 4, !tbaa !5
  %2 = icmp sgt i32 %1, 0
  br i1 %2, label %.lr.ph, label %._crit_edge72

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %.05462 = phi double [ %28, %.lr.ph ], [ 0.000000e+00, %0 ]
  %.05561 = phi double [ %27, %.lr.ph ], [ 0.000000e+00, %0 ]
  %3 = phi <2 x double> [ %26, %.lr.ph ], [ zeroinitializer, %0 ]
  %4 = load ptr, ptr @particles, align 8, !tbaa !9
  %5 = getelementptr inbounds %struct.sparticle, ptr %4, i64 %indvars.iv
  %6 = getelementptr inbounds i8, ptr %5, i64 64
  %7 = load double, ptr %6, align 8, !tbaa !11
  %8 = tail call double @sqrt(double noundef %7) #5
  %9 = fdiv double 1.000000e+00, %8
  %10 = tail call double @random_gaussian()
  %11 = fmul double %9, %10
  %12 = getelementptr inbounds i8, ptr %5, i64 24
  store double %11, ptr %12, align 8, !tbaa !14
  %13 = tail call double @random_gaussian()
  %14 = fmul double %9, %13
  %15 = getelementptr inbounds i8, ptr %5, i64 32
  store double %14, ptr %15, align 8, !tbaa !15
  %16 = tail call double @random_gaussian()
  %17 = fmul double %9, %16
  %18 = getelementptr inbounds i8, ptr %5, i64 40
  store double %17, ptr %18, align 8, !tbaa !16
  %19 = load double, ptr %6, align 8, !tbaa !11
  %20 = load double, ptr %12, align 8, !tbaa !14
  %21 = load double, ptr %15, align 8, !tbaa !15
  %22 = insertelement <2 x double> poison, double %20, i64 0
  %23 = insertelement <2 x double> %22, double %19, i64 1
  %24 = insertelement <2 x double> poison, double %19, i64 0
  %25 = insertelement <2 x double> %24, double %21, i64 1
  %26 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %23, <2 x double> %25, <2 x double> %3)
  %27 = tail call double @llvm.fmuladd.f64(double %19, double %17, double %.05561)
  %28 = fadd double %.05462, %19
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %29 = load i32, ptr @N, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = icmp slt i64 %indvars.iv.next, %30
  br i1 %31, label %.lr.ph, label %._crit_edge, !llvm.loop !17

._crit_edge:                                      ; preds = %.lr.ph
  %32 = insertelement <2 x double> poison, double %28, i64 0
  %33 = shufflevector <2 x double> %32, <2 x double> poison, <2 x i32> zeroinitializer
  %34 = fdiv <2 x double> %26, %33
  %35 = fdiv double %27, %28
  %36 = icmp sgt i32 %29, 0
  br i1 %36, label %.lr.ph71, label %._crit_edge72

.lr.ph71:                                         ; preds = %._crit_edge
  %37 = load ptr, ptr @particles, align 8, !tbaa !9
  %wide.trip.count = zext nneg i32 %29 to i64
  br label %38

38:                                               ; preds = %.lr.ph71, %38
  %indvars.iv85 = phi i64 [ 0, %.lr.ph71 ], [ %indvars.iv.next86, %38 ]
  %.069 = phi double [ 0.000000e+00, %.lr.ph71 ], [ %53, %38 ]
  %39 = getelementptr inbounds %struct.sparticle, ptr %37, i64 %indvars.iv85
  %40 = getelementptr inbounds i8, ptr %39, i64 24
  %41 = load <2 x double>, ptr %40, align 8, !tbaa !19
  %42 = fsub <2 x double> %41, %34
  store <2 x double> %42, ptr %40, align 8, !tbaa !19
  %43 = getelementptr inbounds i8, ptr %39, i64 40
  %44 = load double, ptr %43, align 8, !tbaa !16
  %45 = fsub double %44, %35
  store double %45, ptr %43, align 8, !tbaa !16
  %46 = getelementptr inbounds i8, ptr %39, i64 64
  %47 = load double, ptr %46, align 8, !tbaa !11
  %48 = fmul <2 x double> %42, %42
  %49 = extractelement <2 x double> %48, i64 1
  %50 = extractelement <2 x double> %42, i64 0
  %51 = tail call double @llvm.fmuladd.f64(double %50, double %50, double %49)
  %52 = tail call double @llvm.fmuladd.f64(double %45, double %45, double %51)
  %53 = tail call double @llvm.fmuladd.f64(double %47, double %52, double %.069)
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next86, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge72, label %38, !llvm.loop !20

._crit_edge72:                                    ; preds = %38, %0, %._crit_edge
  %.lcssa98 = phi i32 [ %29, %._crit_edge ], [ %1, %0 ], [ %29, %38 ]
  %.0.lcssa = phi double [ 0.000000e+00, %._crit_edge ], [ 0.000000e+00, %0 ], [ %53, %38 ]
  %54 = sitofp i32 %.lcssa98 to double
  %55 = fdiv double %.0.lcssa, %54
  %56 = fdiv double 3.000000e+00, %55
  %57 = tail call double @sqrt(double noundef %56) #5
  %58 = load i32, ptr @N, align 4, !tbaa !5
  %59 = icmp sgt i32 %58, 0
  br i1 %59, label %.lr.ph76, label %._crit_edge77

.lr.ph76:                                         ; preds = %._crit_edge72
  %60 = load ptr, ptr @particles, align 8, !tbaa !9
  %wide.trip.count91 = zext nneg i32 %58 to i64
  %61 = insertelement <2 x double> poison, double %57, i64 0
  %62 = shufflevector <2 x double> %61, <2 x double> poison, <2 x i32> zeroinitializer
  %xtraiter = and i64 %wide.trip.count91, 1
  %63 = icmp eq i32 %58, 1
  br i1 %63, label %._crit_edge77.loopexit.unr-lcssa, label %.lr.ph76.new

.lr.ph76.new:                                     ; preds = %.lr.ph76
  %unroll_iter = and i64 %wide.trip.count91, 2147483646
  br label %64

64:                                               ; preds = %64, %.lr.ph76.new
  %indvars.iv88 = phi i64 [ 0, %.lr.ph76.new ], [ %indvars.iv.next89.1, %64 ]
  %niter = phi i64 [ 0, %.lr.ph76.new ], [ %niter.next.1, %64 ]
  %65 = getelementptr inbounds %struct.sparticle, ptr %60, i64 %indvars.iv88
  %66 = getelementptr inbounds i8, ptr %65, i64 24
  %67 = load <2 x double>, ptr %66, align 8, !tbaa !19
  %68 = fmul <2 x double> %62, %67
  store <2 x double> %68, ptr %66, align 8, !tbaa !19
  %69 = getelementptr inbounds i8, ptr %65, i64 40
  %70 = load double, ptr %69, align 8, !tbaa !16
  %71 = fmul double %57, %70
  store double %71, ptr %69, align 8, !tbaa !16
  %indvars.iv.next89 = or disjoint i64 %indvars.iv88, 1
  %72 = getelementptr inbounds %struct.sparticle, ptr %60, i64 %indvars.iv.next89
  %73 = getelementptr inbounds i8, ptr %72, i64 24
  %74 = load <2 x double>, ptr %73, align 8, !tbaa !19
  %75 = fmul <2 x double> %62, %74
  store <2 x double> %75, ptr %73, align 8, !tbaa !19
  %76 = getelementptr inbounds i8, ptr %72, i64 40
  %77 = load double, ptr %76, align 8, !tbaa !16
  %78 = fmul double %57, %77
  store double %78, ptr %76, align 8, !tbaa !16
  %indvars.iv.next89.1 = add nuw nsw i64 %indvars.iv88, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge77.loopexit.unr-lcssa, label %64, !llvm.loop !21

._crit_edge77.loopexit.unr-lcssa:                 ; preds = %64, %.lr.ph76
  %indvars.iv88.unr = phi i64 [ 0, %.lr.ph76 ], [ %indvars.iv.next89.1, %64 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge77, label %._crit_edge77.loopexit.epilog-lcssa

._crit_edge77.loopexit.epilog-lcssa:              ; preds = %._crit_edge77.loopexit.unr-lcssa
  %79 = getelementptr inbounds %struct.sparticle, ptr %60, i64 %indvars.iv88.unr
  %80 = getelementptr inbounds i8, ptr %79, i64 24
  %81 = load <2 x double>, ptr %80, align 8, !tbaa !19
  %82 = fmul <2 x double> %62, %81
  store <2 x double> %82, ptr %80, align 8, !tbaa !19
  %83 = getelementptr inbounds i8, ptr %79, i64 40
  %84 = load double, ptr %83, align 8, !tbaa !16
  %85 = fmul double %57, %84
  store double %85, ptr %83, align 8, !tbaa !16
  br label %._crit_edge77

._crit_edge77:                                    ; preds = %._crit_edge77.loopexit.epilog-lcssa, %._crit_edge77.loopexit.unr-lcssa, %._crit_edge72
  %86 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.21, ptr noundef nonnull @inputfilename)
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local double @random_gaussian() local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { nofree 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 #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 = { 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" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !13, i64 64}
!12 = !{!"sparticle", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !7, i64 72, !6, i64 76, !6, i64 80, !6, i64 84, !6, i64 88, !6, i64 92, !6, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !7, i64 128}
!13 = !{!"double", !7, i64 0}
!14 = !{!12, !13, i64 24}
!15 = !{!12, !13, i64 32}
!16 = !{!12, !13, i64 40}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!13, !13, i64 0}
!20 = distinct !{!20, !18}
!21 = distinct !{!21, !18}


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