; LLVM IR from pentilm/StellarSolver :: BarnesHutParticleSystem.ll (ZN23BarnesHutParticleSystem9diskModelEPfS0_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.BarnesHutParticleSystem = type { %struct.SimulationParameters, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.SimulationParameters = type { i32, i8, i8, i8, i8, float, 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN23BarnesHutParticleSystem9diskModelEPfS0_S0_S0_S0_S0_S0_i(ptr noundef nonnull align 8 dereferenceable(328) %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) #1 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
  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
  %30 = 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 2.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  call void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %23, float noundef 1.500000e+00, float noundef 1.200000e+01)
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %31 = load float, ptr %20, align 4, !tbaa !11
  %32 = fmul float 2.000000e+00, %31
  call void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %24, float noundef 0.000000e+00, float noundef %32)
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %33

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

37:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  br label %130

38:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #4
  %39 = call noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %21)
  store float %39, ptr %26, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #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 %27, align 4, !tbaa !11
  %41 = load i32, ptr %25, align 4, !tbaa !9
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %43, label %56

43:                                               ; preds = %38
  %44 = load ptr, ptr %11, align 8, !tbaa !5
  %45 = load i32, ptr %25, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds float, ptr %44, i64 %46
  store float 2.000000e+05, ptr %47, align 4, !tbaa !11
  %48 = load ptr, ptr %12, align 8, !tbaa !5
  %49 = load i32, ptr %25, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds float, ptr %48, i64 %50
  store float 0.000000e+00, ptr %51, align 4, !tbaa !11
  %52 = load ptr, ptr %13, align 8, !tbaa !5
  %53 = load i32, ptr %25, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds float, ptr %52, i64 %54
  store float 0.000000e+00, ptr %55, align 4, !tbaa !11
  br label %77

56:                                               ; preds = %38
  %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+00, ptr %60, align 4, !tbaa !11
  %61 = load float, ptr %27, align 4, !tbaa !11
  %62 = load float, ptr %26, align 4, !tbaa !11
  %63 = call noundef float @_ZSt3cosf(float noundef %62)
  %64 = fmul float %61, %63
  %65 = load ptr, ptr %12, 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 %64, ptr %68, align 4, !tbaa !11
  %69 = load float, ptr %27, align 4, !tbaa !11
  %70 = load float, ptr %26, align 4, !tbaa !11
  %71 = call noundef float @_ZSt3sinf(float noundef %70)
  %72 = fmul float %69, %71
  %73 = load ptr, ptr %13, align 8, !tbaa !5
  %74 = load i32, ptr %25, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds float, ptr %73, i64 %75
  store float %72, ptr %76, align 4, !tbaa !11
  br label %77

77:                                               ; preds = %56, %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #4
  store float -1.000000e+00, ptr %28, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #4
  %78 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %30, i32 0, i32 0
  %79 = getelementptr inbounds %struct.SimulationParameters, ptr %78, i32 0, i32 7
  %80 = load float, ptr %79, align 8, !tbaa !13
  %81 = fpext float %80 to double
  %82 = fmul double %81, 2.000000e+05
  %83 = load float, ptr %27, align 4, !tbaa !11
  %84 = fpext float %83 to double
  %85 = fdiv double %82, %84
  %86 = call double @sqrt(double noundef %85) #4
  %87 = fmul double 1.000000e+00, %86
  %88 = fptrunc double %87 to float
  store float %88, ptr %29, align 4, !tbaa !11
  %89 = load i32, ptr %25, align 4, !tbaa !9
  %90 = icmp eq i32 %89, 0
  br i1 %90, label %91, label %96

91:                                               ; preds = %77
  %92 = load ptr, ptr %14, align 8, !tbaa !5
  %93 = getelementptr inbounds float, ptr %92, i64 0
  store float 0.000000e+00, ptr %93, align 4, !tbaa !11
  %94 = load ptr, ptr %15, align 8, !tbaa !5
  %95 = getelementptr inbounds float, ptr %94, i64 0
  store float 0.000000e+00, ptr %95, align 4, !tbaa !11
  br label %118

96:                                               ; preds = %77
  %97 = load float, ptr %28, align 4, !tbaa !11
  %98 = load float, ptr %29, align 4, !tbaa !11
  %99 = fmul float %97, %98
  %100 = load float, ptr %26, align 4, !tbaa !11
  %101 = call noundef float @_ZSt3sinf(float noundef %100)
  %102 = fmul float %99, %101
  %103 = load ptr, ptr %14, align 8, !tbaa !5
  %104 = load i32, ptr %25, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds float, ptr %103, i64 %105
  store float %102, ptr %106, align 4, !tbaa !11
  %107 = load float, ptr %28, align 4, !tbaa !11
  %108 = fneg float %107
  %109 = load float, ptr %29, align 4, !tbaa !11
  %110 = fmul float %108, %109
  %111 = load float, ptr %26, align 4, !tbaa !11
  %112 = call noundef float @_ZSt3cosf(float noundef %111)
  %113 = fmul float %110, %112
  %114 = load ptr, ptr %15, align 8, !tbaa !5
  %115 = load i32, ptr %25, align 4, !tbaa !9
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds float, ptr %114, i64 %116
  store float %113, ptr %117, align 4, !tbaa !11
  br label %118

118:                                              ; preds = %96, %91
  %119 = load ptr, ptr %16, align 8, !tbaa !5
  %120 = load i32, ptr %25, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds float, ptr %119, i64 %121
  store float 0.000000e+00, ptr %122, align 4, !tbaa !11
  %123 = load ptr, ptr %17, align 8, !tbaa !5
  %124 = load i32, ptr %25, align 4, !tbaa !9
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds float, ptr %123, i64 %125
  store float 0.000000e+00, ptr %126, align 4, !tbaa !11
  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 %127

127:                                              ; preds = %118
  %128 = load i32, ptr %25, align 4, !tbaa !9
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %25, align 4, !tbaa !9
  br label %33, !llvm.loop !18

130:                                              ; preds = %37
  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: mustprogress uwtable
declare dso_local void @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 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 #1 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)) #1 align 2

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #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 16}
!14 = !{!"_ZTS23BarnesHutParticleSystem", !15, i64 0, !10, i64 24, !10, i64 28, !10, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320}
!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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN23BarnesHutParticleSystem9diskModelEPfS0_S0_S0_S0_S0_S0_i(ptr nocapture noundef nonnull readonly align 8 dereferenceable(328) %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 #1 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 2.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 1.500000e+00, float noundef 1.200000e+01)
  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 0.000000e+00, float noundef 0x401921FB60000000)
  %14 = icmp sgt i32 %8, 0
  br i1 %14, label %15, label %._crit_edge

15:                                               ; preds = %9
  %16 = getelementptr inbounds i8, ptr %0, i64 16
  %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) %13, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %18 = call noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %10)
  store float 2.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
  %19 = fpext float %.pre to double
  %20 = fmul double %19, 2.000000e+05
  %21 = fpext float %18 to double
  %22 = fdiv double %20, %21
  %23 = call double @sqrt(double noundef %22) #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 ]
  %24 = call noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %25 = call noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %26 = getelementptr inbounds float, ptr %1, i64 %indvars.iv
  store float 1.000000e+00, ptr %26, align 4, !tbaa !5
  %27 = call noundef float @_ZSt3cosf(float noundef %24)
  %28 = fmul float %25, %27
  %29 = getelementptr inbounds float, ptr %2, i64 %indvars.iv
  store float %28, ptr %29, align 4, !tbaa !5
  %30 = call noundef float @_ZSt3sinf(float noundef %24)
  %31 = fmul float %25, %30
  %32 = getelementptr inbounds float, ptr %3, i64 %indvars.iv
  store float %31, ptr %32, align 4, !tbaa !5
  %.pre42 = load float, ptr %16, align 8, !tbaa !9
  %33 = fpext float %.pre42 to double
  %34 = fmul double %33, 2.000000e+05
  %35 = fpext float %25 to double
  %36 = fdiv double %34, %35
  %37 = call double @sqrt(double noundef %36) #4
  %38 = fptrunc double %37 to float
  %39 = fneg float %38
  %40 = call noundef float @_ZSt3sinf(float noundef %24)
  %41 = fmul float %40, %39
  %42 = getelementptr inbounds float, ptr %4, i64 %indvars.iv
  store float %41, ptr %42, align 4, !tbaa !5
  %43 = call noundef float @_ZSt3cosf(float noundef %24)
  %44 = fmul float %43, %38
  %45 = getelementptr inbounds float, ptr %5, i64 %indvars.iv
  store float %44, ptr %45, align 4, !tbaa !5
  %46 = getelementptr inbounds float, ptr %6, i64 %indvars.iv
  store float 0.000000e+00, ptr %46, align 4, !tbaa !5
  %47 = getelementptr inbounds float, ptr %7, i64 %indvars.iv
  store float 0.000000e+00, ptr %47, 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 !16
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 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 #1 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 #1 align 2

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #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 16}
!10 = !{!"_ZTS23BarnesHutParticleSystem", !11, i64 0, !14, i64 24, !14, i64 28, !14, i64 32, !15, i64 40, !15, i64 48, !15, i64 56, !15, i64 64, !15, i64 72, !15, i64 80, !15, i64 88, !15, i64 96, !15, i64 104, !15, i64 112, !15, i64 120, !15, i64 128, !15, i64 136, !15, i64 144, !15, i64 152, !15, i64 160, !15, i64 168, !15, i64 176, !15, i64 184, !15, i64 192, !15, i64 200, !15, i64 208, !15, i64 216, !15, i64 224, !15, i64 232, !15, i64 240, !15, i64 248, !15, i64 256, !15, i64 264, !15, i64 272, !15, i64 280, !15, i64 288, !15, i64 296, !15, i64 304, !15, i64 312, !15, i64 320}
!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 = !{!"int", !7, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = distinct !{!16, !17, !18}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!"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