; LLVM IR from pentilm/StellarSolver :: ParticleSystem.ll (ZN14ParticleSystem12plummerModelEPfS0_S0_S0_S0_S0_S0_i)

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

%"class.std::linear_congruential_engine" = type { i64 }
%"class.std::uniform_real_distribution" = type { %"struct.std::uniform_real_distribution<float>::param_type" }
%"struct.std::uniform_real_distribution<float>::param_type" = type { float, float }
%class.ParticleSystem = type { ptr, %struct.SimulationParameters }
%struct.SimulationParameters = type { i32, i8, i8, i8, i8, float, float, float, float }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14ParticleSystem12plummerModelEPfS0_S0_S0_S0_S0_S0_i(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, i32 noundef %8) #0 align 2 {
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca %"class.std::linear_congruential_engine", align 8
  %22 = alloca %"class.std::uniform_real_distribution", align 4
  %23 = alloca %"class.std::uniform_real_distribution", align 4
  %24 = alloca %"class.std::uniform_real_distribution", align 4
  %25 = alloca i32, align 4
  %26 = alloca float, align 4
  %27 = alloca float, align 4
  %28 = alloca float, align 4
  %29 = alloca float, align 4
  %30 = alloca float, align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store ptr %2, ptr %12, align 8, !tbaa !5
  store ptr %3, ptr %13, align 8, !tbaa !5
  store ptr %4, ptr %14, align 8, !tbaa !5
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  store i32 %8, ptr %18, align 4, !tbaa !9
  %31 = load ptr, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  store float 1.000000e+00, ptr %19, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  store float 0x400921FB60000000, ptr %20, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %21)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  call void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %22, float noundef 0.000000e+00, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %32 = load float, ptr %20, align 4, !tbaa !11
  %33 = fmul float 2.000000e+00, %32
  call void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %23, float noundef 0.000000e+00, float noundef %33)
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  call void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %24, float noundef -1.000000e+00, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %34

34:                                               ; preds = %140, %9
  %35 = load i32, ptr %25, align 4, !tbaa !9
  %36 = load i32, ptr %18, align 4, !tbaa !9
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  br label %143

39:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #4
  %40 = call noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %21)
  store float %40, ptr %26, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #4
  %41 = call noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %21)
  %42 = call noundef float @_ZSt4acosf(float noundef %41)
  store float %42, ptr %27, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #4
  %43 = load float, ptr %19, align 4, !tbaa !11
  %44 = fpext float %43 to double
  %45 = call noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %21)
  %46 = call noundef double @_ZSt3powIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef %45, double noundef 3.333000e-01)
  %47 = fmul double %44, %46
  %48 = call noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %21)
  %49 = call noundef double @_ZSt3powIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef %48, double noundef 6.666700e-01)
  %50 = fsub double 1.000000e+00, %49
  %51 = call double @sqrt(double noundef %50) #4
  %52 = fdiv double %47, %51
  %53 = fptrunc double %52 to float
  store float %53, ptr %28, align 4, !tbaa !11
  %54 = load i32, ptr %25, align 4, !tbaa !9
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %56, label %69

56:                                               ; preds = %39
  %57 = load ptr, ptr %11, align 8, !tbaa !5
  %58 = load i32, ptr %25, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds float, ptr %57, i64 %59
  store float 1.000000e+05, ptr %60, align 4, !tbaa !11
  %61 = load ptr, ptr %12, align 8, !tbaa !5
  %62 = load i32, ptr %25, align 4, !tbaa !9
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds float, ptr %61, i64 %63
  store float 0.000000e+00, ptr %64, align 4, !tbaa !11
  %65 = load ptr, ptr %13, align 8, !tbaa !5
  %66 = load i32, ptr %25, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds float, ptr %65, i64 %67
  store float 0.000000e+00, ptr %68, align 4, !tbaa !11
  br label %90

69:                                               ; preds = %39
  %70 = load ptr, ptr %11, align 8, !tbaa !5
  %71 = load i32, ptr %25, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds float, ptr %70, i64 %72
  store float 1.000000e+00, ptr %73, align 4, !tbaa !11
  %74 = load float, ptr %28, align 4, !tbaa !11
  %75 = load float, ptr %26, align 4, !tbaa !11
  %76 = call noundef float @_ZSt3cosf(float noundef %75)
  %77 = fmul float %74, %76
  %78 = load ptr, ptr %12, align 8, !tbaa !5
  %79 = load i32, ptr %25, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds float, ptr %78, i64 %80
  store float %77, ptr %81, align 4, !tbaa !11
  %82 = load float, ptr %28, align 4, !tbaa !11
  %83 = load float, ptr %26, align 4, !tbaa !11
  %84 = call noundef float @_ZSt3sinf(float noundef %83)
  %85 = fmul float %82, %84
  %86 = load ptr, ptr %13, align 8, !tbaa !5
  %87 = load i32, ptr %25, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds float, ptr %86, i64 %88
  store float %85, ptr %89, align 4, !tbaa !11
  br label %90

90:                                               ; preds = %69, %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #4
  store float 1.000000e+00, ptr %29, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #4
  %91 = getelementptr inbounds %class.ParticleSystem, ptr %31, i32 0, i32 1
  %92 = getelementptr inbounds %struct.SimulationParameters, ptr %91, i32 0, i32 7
  %93 = load float, ptr %92, align 8, !tbaa !13
  %94 = fpext float %93 to double
  %95 = fmul double %94, 1.000000e+05
  %96 = load float, ptr %28, align 4, !tbaa !11
  %97 = fpext float %96 to double
  %98 = fdiv double %95, %97
  %99 = call double @sqrt(double noundef %98) #4
  %100 = fmul double 1.000000e+00, %99
  %101 = fptrunc double %100 to float
  store float %101, ptr %30, align 4, !tbaa !11
  %102 = load i32, ptr %25, align 4, !tbaa !9
  %103 = icmp eq i32 %102, 0
  br i1 %103, label %104, label %109

104:                                              ; preds = %90
  %105 = load ptr, ptr %14, align 8, !tbaa !5
  %106 = getelementptr inbounds float, ptr %105, i64 0
  store float 0.000000e+00, ptr %106, align 4, !tbaa !11
  %107 = load ptr, ptr %15, align 8, !tbaa !5
  %108 = getelementptr inbounds float, ptr %107, i64 0
  store float 0.000000e+00, ptr %108, align 4, !tbaa !11
  br label %131

109:                                              ; preds = %90
  %110 = load float, ptr %29, align 4, !tbaa !11
  %111 = load float, ptr %30, align 4, !tbaa !11
  %112 = fmul float %110, %111
  %113 = load float, ptr %26, align 4, !tbaa !11
  %114 = call noundef float @_ZSt3sinf(float noundef %113)
  %115 = fmul float %112, %114
  %116 = load ptr, ptr %14, align 8, !tbaa !5
  %117 = load i32, ptr %25, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds float, ptr %116, i64 %118
  store float %115, ptr %119, align 4, !tbaa !11
  %120 = load float, ptr %29, align 4, !tbaa !11
  %121 = fneg float %120
  %122 = load float, ptr %30, align 4, !tbaa !11
  %123 = fmul float %121, %122
  %124 = load float, ptr %26, align 4, !tbaa !11
  %125 = call noundef float @_ZSt3cosf(float noundef %124)
  %126 = fmul float %123, %125
  %127 = load ptr, ptr %15, align 8, !tbaa !5
  %128 = load i32, ptr %25, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds float, ptr %127, i64 %129
  store float %126, ptr %130, align 4, !tbaa !11
  br label %131

131:                                              ; preds = %109, %104
  %132 = load ptr, ptr %16, align 8, !tbaa !5
  %133 = load i32, ptr %25, align 4, !tbaa !9
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds float, ptr %132, i64 %134
  store float 0.000000e+00, ptr %135, align 4, !tbaa !11
  %136 = load ptr, ptr %17, align 8, !tbaa !5
  %137 = load i32, ptr %25, align 4, !tbaa !9
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds float, ptr %136, i64 %138
  store float 0.000000e+00, ptr %139, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  br label %140

140:                                              ; preds = %131
  %141 = load i32, ptr %25, align 4, !tbaa !9
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %25, align 4, !tbaa !9
  br label %34, !llvm.loop !18

143:                                              ; preds = %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4acosf(float noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef, double noundef) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3cosf(float noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3sinf(float noundef) #2

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !12, i64 24}
!14 = !{!"_ZTS14ParticleSystem", !15, i64 8}
!15 = !{!"_ZTS20SimulationParameters", !16, i64 0, !17, i64 4, !17, i64 5, !17, i64 6, !17, i64 7, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20}
!16 = !{!"_ZTS5Model", !7, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


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

%"class.std::linear_congruential_engine" = type { i64 }
%"class.std::uniform_real_distribution" = type { %"struct.std::uniform_real_distribution<float>::param_type" }
%"struct.std::uniform_real_distribution<float>::param_type" = type { float, float }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14ParticleSystem12plummerModelEPfS0_S0_S0_S0_S0_S0_i(ptr nocapture noundef nonnull readonly align 8 dereferenceable(32) %0, ptr nocapture noundef writeonly %1, ptr nocapture noundef writeonly %2, ptr nocapture noundef writeonly %3, ptr nocapture noundef writeonly %4, ptr nocapture noundef writeonly %5, ptr nocapture noundef writeonly %6, ptr nocapture noundef writeonly %7, i32 noundef %8) local_unnamed_addr #0 align 2 {
  %10 = alloca %"class.std::linear_congruential_engine", align 8
  %11 = alloca %"class.std::uniform_real_distribution", align 4
  %12 = alloca %"class.std::uniform_real_distribution", align 4
  %13 = alloca %"class.std::uniform_real_distribution", align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  call void @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  call void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %11, float noundef 0.000000e+00, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  call void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %12, float noundef 0.000000e+00, float noundef 0x401921FB60000000)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  call void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %13, float noundef -1.000000e+00, float noundef 1.000000e+00)
  %14 = icmp sgt i32 %8, 0
  br i1 %14, label %15, label %._crit_edge

15:                                               ; preds = %9
  %16 = getelementptr inbounds i8, ptr %0, i64 24
  %wide.trip.count = zext nneg i32 %8 to i64
  %17 = call noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %18 = call noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %19 = call noundef float @_ZSt4acosf(float noundef %18)
  %20 = call noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %21 = call noundef double @_ZSt3powIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef %20, double noundef 3.333000e-01)
  %22 = call noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %23 = call noundef double @_ZSt3powIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef %22, double noundef 6.666700e-01)
  %24 = fsub double 1.000000e+00, %23
  %25 = call double @sqrt(double noundef %24) #4
  %26 = fdiv double %21, %25
  %27 = fptrunc double %26 to float
  store float 1.000000e+05, ptr %1, align 4, !tbaa !5
  store float 0.000000e+00, ptr %2, align 4, !tbaa !5
  store float 0.000000e+00, ptr %3, align 4, !tbaa !5
  %.pre = load float, ptr %16, align 8, !tbaa !9
  %28 = fpext float %.pre to double
  %29 = fmul double %28, 1.000000e+05
  %30 = fpext float %27 to double
  %31 = fdiv double %29, %30
  %32 = call double @sqrt(double noundef %31) #4
  store float 0.000000e+00, ptr %4, align 4, !tbaa !5
  store float 0.000000e+00, ptr %5, align 4, !tbaa !5
  store float 0.000000e+00, ptr %6, align 4, !tbaa !5
  store float 0.000000e+00, ptr %7, align 4, !tbaa !5
  %exitcond.peel.not = icmp eq i32 %8, 1
  br i1 %exitcond.peel.not, label %._crit_edge, label %.peel.next

._crit_edge:                                      ; preds = %.peel.next, %15, %9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  ret void

.peel.next:                                       ; preds = %15, %.peel.next
  %indvars.iv = phi i64 [ %indvars.iv.next, %.peel.next ], [ 1, %15 ]
  %33 = call noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %34 = call noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %35 = call noundef float @_ZSt4acosf(float noundef %34)
  %36 = call noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %37 = call noundef double @_ZSt3powIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef %36, double noundef 3.333000e-01)
  %38 = call noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %39 = call noundef double @_ZSt3powIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef %38, double noundef 6.666700e-01)
  %40 = fsub double 1.000000e+00, %39
  %41 = call double @sqrt(double noundef %40) #4
  %42 = fdiv double %37, %41
  %43 = fptrunc double %42 to float
  %44 = getelementptr inbounds float, ptr %1, i64 %indvars.iv
  store float 1.000000e+00, ptr %44, align 4, !tbaa !5
  %45 = call noundef float @_ZSt3cosf(float noundef %33)
  %46 = fmul float %45, %43
  %47 = getelementptr inbounds float, ptr %2, i64 %indvars.iv
  store float %46, ptr %47, align 4, !tbaa !5
  %48 = call noundef float @_ZSt3sinf(float noundef %33)
  %49 = fmul float %48, %43
  %50 = getelementptr inbounds float, ptr %3, i64 %indvars.iv
  store float %49, ptr %50, align 4, !tbaa !5
  %.pre43 = load float, ptr %16, align 8, !tbaa !9
  %51 = fpext float %.pre43 to double
  %52 = fmul double %51, 1.000000e+05
  %53 = fpext float %43 to double
  %54 = fdiv double %52, %53
  %55 = call double @sqrt(double noundef %54) #4
  %56 = fptrunc double %55 to float
  %57 = call noundef float @_ZSt3sinf(float noundef %33)
  %58 = fmul float %57, %56
  %59 = getelementptr inbounds float, ptr %4, i64 %indvars.iv
  store float %58, ptr %59, align 4, !tbaa !5
  %60 = fneg float %56
  %61 = call noundef float @_ZSt3cosf(float noundef %33)
  %62 = fmul float %61, %60
  %63 = getelementptr inbounds float, ptr %5, i64 %indvars.iv
  store float %62, ptr %63, align 4, !tbaa !5
  %64 = getelementptr inbounds float, ptr %6, i64 %indvars.iv
  store float 0.000000e+00, ptr %64, align 4, !tbaa !5
  %65 = getelementptr inbounds float, ptr %7, i64 %indvars.iv
  store float 0.000000e+00, ptr %65, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.peel.next, !llvm.loop !14
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4acosf(float noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef, double noundef) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3cosf(float noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3sinf(float noundef) local_unnamed_addr #2

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 24}
!10 = !{!"_ZTS14ParticleSystem", !11, i64 8}
!11 = !{!"_ZTS20SimulationParameters", !12, i64 0, !13, i64 4, !13, i64 5, !13, i64 6, !13, i64 7, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20}
!12 = !{!"_ZTS5Model", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = distinct !{!14, !15, !16}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!"llvm.loop.peeled.count", i32 1}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass