; LLVM IR from pentilm/StellarSolver :: ParticleSystem.ll (ZN14ParticleSystem18collidingDiskModelEPfS0_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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; 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

; 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 @_ZN14ParticleSystem18collidingDiskModelEPfS0_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) #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
  %30 = alloca float, align 4
  %31 = alloca float, align 4
  %32 = 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
  %33 = load ptr, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store float 1.000000e+00, ptr %19, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store float 0x400921FB60000000, ptr %20, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  call void @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %21)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  call void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %22, float noundef 1.500000e+00, float noundef 1.200000e+01)
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  call void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %23, float noundef 1.000000e+00, float noundef 5.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %34 = load float, ptr %20, align 4, !tbaa !11
  %35 = fmul float 2.000000e+00, %34
  call void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %24, float noundef 0.000000e+00, float noundef %35)
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %36

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

40:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %263

41:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %42 = 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 %42, ptr %26, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %43 = call noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %21)
  store float %43, ptr %27, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  %44 = 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 %44, ptr %28, align 4, !tbaa !11
  %45 = load i32, ptr %25, align 4, !tbaa !9
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %47, label %60

47:                                               ; preds = %41
  %48 = load ptr, ptr %11, 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 1.000000e+05, ptr %51, align 4, !tbaa !11
  %52 = load ptr, ptr %12, 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
  %56 = load ptr, ptr %13, align 8, !tbaa !5
  %57 = load i32, ptr %25, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds float, ptr %56, i64 %58
  store float 0.000000e+00, ptr %59, align 4, !tbaa !11
  br label %136

60:                                               ; preds = %41
  %61 = load i32, ptr %25, align 4, !tbaa !9
  %62 = icmp eq i32 %61, 1
  br i1 %62, label %63, label %82

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

82:                                               ; preds = %60
  %83 = load i32, ptr %25, align 4, !tbaa !9
  %84 = load i32, ptr %18, align 4, !tbaa !9
  %85 = icmp sle i32 %83, %84
  br i1 %85, label %86, label %107

86:                                               ; preds = %82
  %87 = load ptr, ptr %11, align 8, !tbaa !5
  %88 = load i32, ptr %25, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds float, ptr %87, i64 %89
  store float 1.000000e+00, ptr %90, align 4, !tbaa !11
  %91 = load float, ptr %27, align 4, !tbaa !11
  %92 = load float, ptr %26, align 4, !tbaa !11
  %93 = call noundef float @_ZSt3cosf(float noundef %92)
  %94 = fmul float %91, %93
  %95 = load ptr, ptr %12, align 8, !tbaa !5
  %96 = load i32, ptr %25, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds float, ptr %95, i64 %97
  store float %94, ptr %98, align 4, !tbaa !11
  %99 = load float, ptr %27, align 4, !tbaa !11
  %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 %13, 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
  br label %134

107:                                              ; preds = %82
  %108 = load ptr, ptr %11, align 8, !tbaa !5
  %109 = load i32, ptr %25, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds float, ptr %108, i64 %110
  store float 1.000000e+00, ptr %111, align 4, !tbaa !11
  %112 = load float, ptr %28, align 4, !tbaa !11
  %113 = load float, ptr %26, align 4, !tbaa !11
  %114 = call noundef float @_ZSt3cosf(float noundef %113)
  %115 = load ptr, ptr %12, align 8, !tbaa !5
  %116 = getelementptr inbounds float, ptr %115, i64 1
  %117 = load float, ptr %116, align 4, !tbaa !11
  %118 = call float @llvm.fmuladd.f32(float %112, float %114, float %117)
  %119 = load ptr, ptr %12, 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 %118, ptr %122, align 4, !tbaa !11
  %123 = load float, ptr %28, align 4, !tbaa !11
  %124 = load float, ptr %26, align 4, !tbaa !11
  %125 = call noundef float @_ZSt3sinf(float noundef %124)
  %126 = load ptr, ptr %13, align 8, !tbaa !5
  %127 = getelementptr inbounds float, ptr %126, i64 1
  %128 = load float, ptr %127, align 4, !tbaa !11
  %129 = call float @llvm.fmuladd.f32(float %123, float %125, float %128)
  %130 = load ptr, ptr %13, align 8, !tbaa !5
  %131 = load i32, ptr %25, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds float, ptr %130, i64 %132
  store float %129, ptr %133, align 4, !tbaa !11
  br label %134

134:                                              ; preds = %107, %86
  br label %135

135:                                              ; preds = %134, %63
  br label %136

136:                                              ; preds = %135, %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  store float 1.000000e+00, ptr %29, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  %137 = getelementptr inbounds %class.ParticleSystem, ptr %33, i32 0, i32 1
  %138 = getelementptr inbounds %struct.SimulationParameters, ptr %137, i32 0, i32 7
  %139 = load float, ptr %138, align 8, !tbaa !13
  %140 = fpext float %139 to double
  %141 = fmul double %140, 1.000000e+05
  %142 = load float, ptr %27, align 4, !tbaa !11
  %143 = fpext float %142 to double
  %144 = fdiv double %141, %143
  %145 = call double @sqrt(double noundef %144) #5
  %146 = fmul double 1.000000e+00, %145
  %147 = fptrunc double %146 to float
  store float %147, ptr %30, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  %148 = getelementptr inbounds %class.ParticleSystem, ptr %33, i32 0, i32 1
  %149 = getelementptr inbounds %struct.SimulationParameters, ptr %148, i32 0, i32 7
  %150 = load float, ptr %149, align 8, !tbaa !13
  %151 = fpext float %150 to double
  %152 = fmul double %151, 5.000000e+04
  %153 = load float, ptr %28, align 4, !tbaa !11
  %154 = fpext float %153 to double
  %155 = fdiv double %152, %154
  %156 = call double @sqrt(double noundef %155) #5
  %157 = fmul double 1.000000e+00, %156
  %158 = fptrunc double %157 to float
  store float %158, ptr %31, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #5
  %159 = getelementptr inbounds %class.ParticleSystem, ptr %33, i32 0, i32 1
  %160 = getelementptr inbounds %struct.SimulationParameters, ptr %159, i32 0, i32 7
  %161 = load float, ptr %160, align 8, !tbaa !13
  %162 = fpext float %161 to double
  %163 = fmul double %162, 1.000000e+05
  %164 = call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef 450)
  %165 = fdiv double %163, %164
  %166 = call double @sqrt(double noundef %165) #5
  %167 = fmul double 1.000000e+00, %166
  %168 = fptrunc double %167 to float
  store float %168, ptr %32, align 4, !tbaa !11
  %169 = load i32, ptr %25, align 4, !tbaa !9
  %170 = icmp eq i32 %169, 0
  br i1 %170, label %171, label %176

171:                                              ; preds = %136
  %172 = load ptr, ptr %14, align 8, !tbaa !5
  %173 = getelementptr inbounds float, ptr %172, i64 0
  store float 0.000000e+00, ptr %173, align 4, !tbaa !11
  %174 = load ptr, ptr %15, align 8, !tbaa !5
  %175 = getelementptr inbounds float, ptr %174, i64 0
  store float 0.000000e+00, ptr %175, align 4, !tbaa !11
  br label %251

176:                                              ; preds = %136
  %177 = load i32, ptr %25, align 4, !tbaa !9
  %178 = icmp eq i32 %177, 1
  br i1 %178, label %179, label %201

179:                                              ; preds = %176
  %180 = load float, ptr %29, align 4, !tbaa !11
  %181 = load float, ptr %32, align 4, !tbaa !11
  %182 = fmul float %180, %181
  %183 = load float, ptr %26, align 4, !tbaa !11
  %184 = call noundef float @_ZSt3sinf(float noundef %183)
  %185 = fmul float %182, %184
  %186 = load ptr, ptr %14, align 8, !tbaa !5
  %187 = load i32, ptr %25, align 4, !tbaa !9
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds float, ptr %186, i64 %188
  store float %185, ptr %189, align 4, !tbaa !11
  %190 = load float, ptr %29, align 4, !tbaa !11
  %191 = fneg float %190
  %192 = load float, ptr %32, align 4, !tbaa !11
  %193 = fmul float %191, %192
  %194 = load float, ptr %26, align 4, !tbaa !11
  %195 = call noundef float @_ZSt3cosf(float noundef %194)
  %196 = fmul float %193, %195
  %197 = load ptr, ptr %15, align 8, !tbaa !5
  %198 = load i32, ptr %25, align 4, !tbaa !9
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds float, ptr %197, i64 %199
  store float %196, ptr %200, align 4, !tbaa !11
  br label %250

201:                                              ; preds = %176
  %202 = load i32, ptr %25, align 4, !tbaa !9
  %203 = load i32, ptr %18, align 4, !tbaa !9
  %204 = icmp sle i32 %202, %203
  br i1 %204, label %205, label %227

205:                                              ; preds = %201
  %206 = load float, ptr %29, align 4, !tbaa !11
  %207 = load float, ptr %30, align 4, !tbaa !11
  %208 = fmul float %206, %207
  %209 = load float, ptr %26, align 4, !tbaa !11
  %210 = call noundef float @_ZSt3sinf(float noundef %209)
  %211 = fmul float %208, %210
  %212 = load ptr, ptr %14, align 8, !tbaa !5
  %213 = load i32, ptr %25, align 4, !tbaa !9
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds float, ptr %212, i64 %214
  store float %211, ptr %215, align 4, !tbaa !11
  %216 = load float, ptr %29, align 4, !tbaa !11
  %217 = fneg float %216
  %218 = load float, ptr %30, align 4, !tbaa !11
  %219 = fmul float %217, %218
  %220 = load float, ptr %26, align 4, !tbaa !11
  %221 = call noundef float @_ZSt3cosf(float noundef %220)
  %222 = fmul float %219, %221
  %223 = load ptr, ptr %15, align 8, !tbaa !5
  %224 = load i32, ptr %25, align 4, !tbaa !9
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds float, ptr %223, i64 %225
  store float %222, ptr %226, align 4, !tbaa !11
  br label %249

227:                                              ; preds = %201
  %228 = load float, ptr %29, align 4, !tbaa !11
  %229 = load float, ptr %31, align 4, !tbaa !11
  %230 = fmul float %228, %229
  %231 = load float, ptr %26, align 4, !tbaa !11
  %232 = call noundef float @_ZSt3sinf(float noundef %231)
  %233 = fmul float %230, %232
  %234 = load ptr, ptr %14, align 8, !tbaa !5
  %235 = load i32, ptr %25, align 4, !tbaa !9
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds float, ptr %234, i64 %236
  store float %233, ptr %237, align 4, !tbaa !11
  %238 = load float, ptr %29, align 4, !tbaa !11
  %239 = fneg float %238
  %240 = load float, ptr %31, align 4, !tbaa !11
  %241 = fmul float %239, %240
  %242 = load float, ptr %26, align 4, !tbaa !11
  %243 = call noundef float @_ZSt3cosf(float noundef %242)
  %244 = fmul float %241, %243
  %245 = load ptr, ptr %15, align 8, !tbaa !5
  %246 = load i32, ptr %25, align 4, !tbaa !9
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds float, ptr %245, i64 %247
  store float %244, ptr %248, align 4, !tbaa !11
  br label %249

249:                                              ; preds = %227, %205
  br label %250

250:                                              ; preds = %249, %179
  br label %251

251:                                              ; preds = %250, %171
  %252 = load ptr, ptr %16, align 8, !tbaa !5
  %253 = load i32, ptr %25, align 4, !tbaa !9
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds float, ptr %252, i64 %254
  store float 0.000000e+00, ptr %255, align 4, !tbaa !11
  %256 = load ptr, ptr %17, align 8, !tbaa !5
  %257 = load i32, ptr %25, align 4, !tbaa !9
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds float, ptr %256, i64 %258
  store float 0.000000e+00, ptr %259, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  br label %260

260:                                              ; preds = %251
  %261 = load i32, ptr %25, align 4, !tbaa !9
  %262 = add nsw i32 %261, 1
  store i32 %262, ptr %25, align 4, !tbaa !9
  br label %36, !llvm.loop !18

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 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 = { 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 = !{!"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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; 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

; 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 @_ZN14ParticleSystem18collidingDiskModelEPfS0_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 #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 1.500000e+00, float noundef 1.200000e+01)
  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.000000e+00, float noundef 5.000000e+00)
  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 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) %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) %11, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %19 = 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 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
  %20 = fpext float %.pre to double
  %21 = fmul double %20, 1.000000e+05
  %22 = fpext float %18 to double
  %23 = fdiv double %21, %22
  %24 = call double @sqrt(double noundef %23) #4
  %25 = load float, ptr %16, align 8, !tbaa !9
  %26 = fpext float %25 to double
  %27 = fmul double %26, 5.000000e+04
  %28 = fpext float %19 to double
  %29 = fdiv double %27, %28
  %30 = call double @sqrt(double noundef %29) #4
  %31 = load float, ptr %16, align 8, !tbaa !9
  %32 = fpext float %31 to double
  %33 = fmul double %32, 1.000000e+05
  %34 = call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef 450)
  %35 = fdiv double %33, %34
  %36 = call double @sqrt(double noundef %35) #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 %37

37:                                               ; preds = %15
  %38 = getelementptr inbounds i8, ptr %5, i64 4
  %39 = getelementptr inbounds i8, ptr %4, i64 4
  %40 = getelementptr inbounds i8, ptr %3, i64 4
  %41 = getelementptr inbounds i8, ptr %2, i64 4
  %42 = getelementptr inbounds i8, ptr %1, i64 4
  %43 = call noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %44 = call noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %45 = 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 1.000000e+00, ptr %42, align 4, !tbaa !5
  %46 = call noundef float @_ZSt3cosf(float noundef %43)
  %47 = fmul float %46, 1.500000e+01
  store float %47, ptr %41, align 4, !tbaa !5
  %48 = call noundef float @_ZSt3sinf(float noundef %43)
  %49 = fmul float %48, 1.500000e+01
  store float %49, ptr %40, align 4, !tbaa !5
  %.pre94 = load float, ptr %16, align 8, !tbaa !9
  %50 = fpext float %.pre94 to double
  %51 = fmul double %50, 1.000000e+05
  %52 = fpext float %44 to double
  %53 = fdiv double %51, %52
  %54 = call double @sqrt(double noundef %53) #4
  %55 = load float, ptr %16, align 8, !tbaa !9
  %56 = fpext float %55 to double
  %57 = fmul double %56, 5.000000e+04
  %58 = fpext float %45 to double
  %59 = fdiv double %57, %58
  %60 = call double @sqrt(double noundef %59) #4
  %61 = load float, ptr %16, align 8, !tbaa !9
  %62 = fpext float %61 to double
  %63 = fmul double %62, 1.000000e+05
  %64 = call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef 450)
  %65 = fdiv double %63, %64
  %66 = call double @sqrt(double noundef %65) #4
  %67 = fptrunc double %66 to float
  %68 = call noundef float @_ZSt3sinf(float noundef %43)
  %69 = fmul float %68, %67
  store float %69, ptr %39, align 4, !tbaa !5
  %70 = fneg float %67
  %71 = call noundef float @_ZSt3cosf(float noundef %43)
  %72 = fmul float %71, %70
  store float %72, ptr %38, align 4, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %6, i64 4
  store float 0.000000e+00, ptr %73, align 4, !tbaa !5
  %74 = getelementptr inbounds i8, ptr %7, i64 4
  store float 0.000000e+00, ptr %74, align 4, !tbaa !5
  %exitcond.peel92.not = icmp eq i32 %8, 2
  br i1 %exitcond.peel92.not, label %._crit_edge, label %.peel.next90

._crit_edge:                                      ; preds = %.peel.next90, %15, %37, %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.next90:                                     ; preds = %37, %.peel.next90
  %indvars.iv = phi i64 [ %indvars.iv.next, %.peel.next90 ], [ 2, %37 ]
  %75 = call noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %76 = call noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %77 = call noundef float @_ZNSt25uniform_real_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %78 = getelementptr inbounds float, ptr %1, i64 %indvars.iv
  store float 1.000000e+00, ptr %78, align 4, !tbaa !5
  %79 = call noundef float @_ZSt3cosf(float noundef %75)
  %80 = fmul float %76, %79
  %81 = getelementptr inbounds float, ptr %2, i64 %indvars.iv
  store float %80, ptr %81, align 4, !tbaa !5
  %82 = call noundef float @_ZSt3sinf(float noundef %75)
  %83 = fmul float %76, %82
  %84 = getelementptr inbounds float, ptr %3, i64 %indvars.iv
  store float %83, ptr %84, align 4, !tbaa !5
  %.pre95 = load float, ptr %16, align 8, !tbaa !9
  %85 = fpext float %.pre95 to double
  %86 = fmul double %85, 1.000000e+05
  %87 = fpext float %76 to double
  %88 = fdiv double %86, %87
  %89 = call double @sqrt(double noundef %88) #4
  %90 = fptrunc double %89 to float
  %91 = load float, ptr %16, align 8, !tbaa !9
  %92 = fpext float %91 to double
  %93 = fmul double %92, 5.000000e+04
  %94 = fpext float %77 to double
  %95 = fdiv double %93, %94
  %96 = call double @sqrt(double noundef %95) #4
  %97 = load float, ptr %16, align 8, !tbaa !9
  %98 = fpext float %97 to double
  %99 = fmul double %98, 1.000000e+05
  %100 = call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef 450)
  %101 = fdiv double %99, %100
  %102 = call double @sqrt(double noundef %101) #4
  %103 = call noundef float @_ZSt3sinf(float noundef %75)
  %104 = fmul float %103, %90
  %105 = getelementptr inbounds float, ptr %4, i64 %indvars.iv
  store float %104, ptr %105, align 4, !tbaa !5
  %106 = fneg float %90
  %107 = call noundef float @_ZSt3cosf(float noundef %75)
  %108 = fmul float %107, %106
  %109 = getelementptr inbounds float, ptr %5, i64 %indvars.iv
  store float %108, ptr %109, align 4, !tbaa !5
  %110 = getelementptr inbounds float, ptr %6, i64 %indvars.iv
  store float 0.000000e+00, ptr %110, align 4, !tbaa !5
  %111 = getelementptr inbounds float, ptr %7, i64 %indvars.iv
  store float 0.000000e+00, ptr %111, 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.next90, !llvm.loop !14
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 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 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 2}


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