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

@dvtot = external dso_local global double, align 8
@colcounter = external dso_local global i32, align 4
@xsize = external dso_local global double, align 8
@ysize = external dso_local global double, align 8
@zsize = external dso_local global double, align 8
@hx = external dso_local global double, align 8
@hy = external dso_local global double, align 8
@hz = external dso_local global double, align 8

; 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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @collision(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.sevent, ptr %21, i32 0, i32 4
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  store ptr %23, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.sevent, ptr %24, i32 0, i32 5
  %26 = load ptr, ptr %25, align 8, !tbaa !13
  store ptr %26, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.sparticle, ptr %27, i32 0, i32 8
  %29 = load double, ptr %28, align 8, !tbaa !14
  store double %29, ptr %5, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.sparticle, ptr %30, i32 0, i32 7
  %32 = load double, ptr %31, align 8, !tbaa !17
  store double %32, ptr %6, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.sparticle, ptr %33, i32 0, i32 8
  %35 = load double, ptr %34, align 8, !tbaa !14
  store double %35, ptr %7, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.sparticle, ptr %36, i32 0, i32 7
  %38 = load double, ptr %37, align 8, !tbaa !17
  store double %38, ptr %8, align 8, !tbaa !16
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  call void @update(ptr noundef %39)
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  call void @update(ptr noundef %40)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %41 = load double, ptr %6, align 8, !tbaa !16
  %42 = load double, ptr %8, align 8, !tbaa !16
  %43 = fadd double %41, %42
  store double %43, ptr %9, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %44 = load double, ptr %9, align 8, !tbaa !16
  %45 = fdiv double 1.000000e+00, %44
  store double %45, ptr %10, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.sparticle, ptr %46, i32 0, i32 0
  %48 = load double, ptr %47, align 8, !tbaa !18
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.sparticle, ptr %49, i32 0, i32 0
  %51 = load double, ptr %50, align 8, !tbaa !18
  %52 = fsub double %48, %51
  store double %52, ptr %11, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.sparticle, ptr %53, i32 0, i32 1
  %55 = load double, ptr %54, align 8, !tbaa !19
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.sparticle, ptr %56, i32 0, i32 1
  %58 = load double, ptr %57, align 8, !tbaa !19
  %59 = fsub double %55, %58
  store double %59, ptr %12, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.sparticle, ptr %60, i32 0, i32 2
  %62 = load double, ptr %61, align 8, !tbaa !20
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.sparticle, ptr %63, i32 0, i32 2
  %65 = load double, ptr %64, align 8, !tbaa !20
  %66 = fsub double %62, %65
  store double %66, ptr %13, align 8, !tbaa !16
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.sparticle, ptr %67, i32 0, i32 9
  %69 = load i8, ptr %68, align 8, !tbaa !21
  %70 = icmp ne i8 %69, 0
  br i1 %70, label %71, label %126

71:                                               ; preds = %1
  %72 = load double, ptr %11, align 8, !tbaa !16
  %73 = load double, ptr @hx, align 8, !tbaa !16
  %74 = fcmp ogt double %72, %73
  br i1 %74, label %75, label %79

75:                                               ; preds = %71
  %76 = load double, ptr @xsize, align 8, !tbaa !16
  %77 = load double, ptr %11, align 8, !tbaa !16
  %78 = fsub double %77, %76
  store double %78, ptr %11, align 8, !tbaa !16
  br label %89

79:                                               ; preds = %71
  %80 = load double, ptr %11, align 8, !tbaa !16
  %81 = load double, ptr @hx, align 8, !tbaa !16
  %82 = fneg double %81
  %83 = fcmp olt double %80, %82
  br i1 %83, label %84, label %88

84:                                               ; preds = %79
  %85 = load double, ptr @xsize, align 8, !tbaa !16
  %86 = load double, ptr %11, align 8, !tbaa !16
  %87 = fadd double %86, %85
  store double %87, ptr %11, align 8, !tbaa !16
  br label %88

88:                                               ; preds = %84, %79
  br label %89

89:                                               ; preds = %88, %75
  %90 = load double, ptr %12, align 8, !tbaa !16
  %91 = load double, ptr @hy, align 8, !tbaa !16
  %92 = fcmp ogt double %90, %91
  br i1 %92, label %93, label %97

93:                                               ; preds = %89
  %94 = load double, ptr @ysize, align 8, !tbaa !16
  %95 = load double, ptr %12, align 8, !tbaa !16
  %96 = fsub double %95, %94
  store double %96, ptr %12, align 8, !tbaa !16
  br label %107

97:                                               ; preds = %89
  %98 = load double, ptr %12, align 8, !tbaa !16
  %99 = load double, ptr @hy, align 8, !tbaa !16
  %100 = fneg double %99
  %101 = fcmp olt double %98, %100
  br i1 %101, label %102, label %106

102:                                              ; preds = %97
  %103 = load double, ptr @ysize, align 8, !tbaa !16
  %104 = load double, ptr %12, align 8, !tbaa !16
  %105 = fadd double %104, %103
  store double %105, ptr %12, align 8, !tbaa !16
  br label %106

106:                                              ; preds = %102, %97
  br label %107

107:                                              ; preds = %106, %93
  %108 = load double, ptr %13, align 8, !tbaa !16
  %109 = load double, ptr @hz, align 8, !tbaa !16
  %110 = fcmp ogt double %108, %109
  br i1 %110, label %111, label %115

111:                                              ; preds = %107
  %112 = load double, ptr @zsize, align 8, !tbaa !16
  %113 = load double, ptr %13, align 8, !tbaa !16
  %114 = fsub double %113, %112
  store double %114, ptr %13, align 8, !tbaa !16
  br label %125

115:                                              ; preds = %107
  %116 = load double, ptr %13, align 8, !tbaa !16
  %117 = load double, ptr @hz, align 8, !tbaa !16
  %118 = fneg double %117
  %119 = fcmp olt double %116, %118
  br i1 %119, label %120, label %124

120:                                              ; preds = %115
  %121 = load double, ptr @zsize, align 8, !tbaa !16
  %122 = load double, ptr %13, align 8, !tbaa !16
  %123 = fadd double %122, %121
  store double %123, ptr %13, align 8, !tbaa !16
  br label %124

124:                                              ; preds = %120, %115
  br label %125

125:                                              ; preds = %124, %111
  br label %126

126:                                              ; preds = %125, %1
  %127 = load double, ptr %10, align 8, !tbaa !16
  %128 = load double, ptr %11, align 8, !tbaa !16
  %129 = fmul double %128, %127
  store double %129, ptr %11, align 8, !tbaa !16
  %130 = load double, ptr %10, align 8, !tbaa !16
  %131 = load double, ptr %12, align 8, !tbaa !16
  %132 = fmul double %131, %130
  store double %132, ptr %12, align 8, !tbaa !16
  %133 = load double, ptr %10, align 8, !tbaa !16
  %134 = load double, ptr %13, align 8, !tbaa !16
  %135 = fmul double %134, %133
  store double %135, ptr %13, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.sparticle, ptr %136, i32 0, i32 3
  %138 = load double, ptr %137, align 8, !tbaa !22
  %139 = load ptr, ptr %4, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.sparticle, ptr %139, i32 0, i32 3
  %141 = load double, ptr %140, align 8, !tbaa !22
  %142 = fsub double %138, %141
  store double %142, ptr %14, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %143 = load ptr, ptr %3, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.sparticle, ptr %143, i32 0, i32 4
  %145 = load double, ptr %144, align 8, !tbaa !23
  %146 = load ptr, ptr %4, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.sparticle, ptr %146, i32 0, i32 4
  %148 = load double, ptr %147, align 8, !tbaa !23
  %149 = fsub double %145, %148
  store double %149, ptr %15, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %150 = load ptr, ptr %3, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.sparticle, ptr %150, i32 0, i32 5
  %152 = load double, ptr %151, align 8, !tbaa !24
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.sparticle, ptr %153, i32 0, i32 5
  %155 = load double, ptr %154, align 8, !tbaa !24
  %156 = fsub double %152, %155
  store double %156, ptr %16, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %157 = load double, ptr %11, align 8, !tbaa !16
  %158 = load double, ptr %14, align 8, !tbaa !16
  %159 = load double, ptr %12, align 8, !tbaa !16
  %160 = load double, ptr %15, align 8, !tbaa !16
  %161 = fmul double %159, %160
  %162 = call double @llvm.fmuladd.f64(double %157, double %158, double %161)
  %163 = load double, ptr %13, align 8, !tbaa !16
  %164 = load double, ptr %16, align 8, !tbaa !16
  %165 = call double @llvm.fmuladd.f64(double %163, double %164, double %162)
  store double %165, ptr %17, align 8, !tbaa !16
  %166 = load double, ptr %5, align 8, !tbaa !16
  %167 = load double, ptr %7, align 8, !tbaa !16
  %168 = fadd double %166, %167
  %169 = fdiv double 2.000000e+00, %168
  %170 = load double, ptr %17, align 8, !tbaa !16
  %171 = fmul double %170, %169
  store double %171, ptr %17, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %172 = load double, ptr %17, align 8, !tbaa !16
  %173 = load double, ptr %7, align 8, !tbaa !16
  %174 = fmul double %172, %173
  store double %174, ptr %18, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %175 = load double, ptr %17, align 8, !tbaa !16
  %176 = load double, ptr %5, align 8, !tbaa !16
  %177 = fmul double %175, %176
  store double %177, ptr %19, align 8, !tbaa !16
  %178 = load double, ptr %18, align 8, !tbaa !16
  %179 = load double, ptr %11, align 8, !tbaa !16
  %180 = load ptr, ptr %3, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.sparticle, ptr %180, i32 0, i32 3
  %182 = load double, ptr %181, align 8, !tbaa !22
  %183 = fneg double %178
  %184 = call double @llvm.fmuladd.f64(double %183, double %179, double %182)
  store double %184, ptr %181, align 8, !tbaa !22
  %185 = load double, ptr %18, align 8, !tbaa !16
  %186 = load double, ptr %12, align 8, !tbaa !16
  %187 = load ptr, ptr %3, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.sparticle, ptr %187, i32 0, i32 4
  %189 = load double, ptr %188, align 8, !tbaa !23
  %190 = fneg double %185
  %191 = call double @llvm.fmuladd.f64(double %190, double %186, double %189)
  store double %191, ptr %188, align 8, !tbaa !23
  %192 = load double, ptr %18, align 8, !tbaa !16
  %193 = load double, ptr %13, align 8, !tbaa !16
  %194 = load ptr, ptr %3, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.sparticle, ptr %194, i32 0, i32 5
  %196 = load double, ptr %195, align 8, !tbaa !24
  %197 = fneg double %192
  %198 = call double @llvm.fmuladd.f64(double %197, double %193, double %196)
  store double %198, ptr %195, align 8, !tbaa !24
  %199 = load double, ptr %19, align 8, !tbaa !16
  %200 = load double, ptr %11, align 8, !tbaa !16
  %201 = load ptr, ptr %4, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.sparticle, ptr %201, i32 0, i32 3
  %203 = load double, ptr %202, align 8, !tbaa !22
  %204 = call double @llvm.fmuladd.f64(double %199, double %200, double %203)
  store double %204, ptr %202, align 8, !tbaa !22
  %205 = load double, ptr %19, align 8, !tbaa !16
  %206 = load double, ptr %12, align 8, !tbaa !16
  %207 = load ptr, ptr %4, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.sparticle, ptr %207, i32 0, i32 4
  %209 = load double, ptr %208, align 8, !tbaa !23
  %210 = call double @llvm.fmuladd.f64(double %205, double %206, double %209)
  store double %210, ptr %208, align 8, !tbaa !23
  %211 = load double, ptr %19, align 8, !tbaa !16
  %212 = load double, ptr %13, align 8, !tbaa !16
  %213 = load ptr, ptr %4, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.sparticle, ptr %213, i32 0, i32 5
  %215 = load double, ptr %214, align 8, !tbaa !24
  %216 = call double @llvm.fmuladd.f64(double %211, double %212, double %215)
  store double %216, ptr %214, align 8, !tbaa !24
  %217 = load double, ptr %18, align 8, !tbaa !16
  %218 = load double, ptr %5, align 8, !tbaa !16
  %219 = fmul double %217, %218
  %220 = load double, ptr %9, align 8, !tbaa !16
  %221 = load double, ptr @dvtot, align 8, !tbaa !16
  %222 = call double @llvm.fmuladd.f64(double %219, double %220, double %221)
  store double %222, ptr @dvtot, align 8, !tbaa !16
  %223 = load i32, ptr @colcounter, align 4, !tbaa !25
  %224 = add i32 %223, 1
  store i32 %224, ptr @colcounter, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  %225 = load ptr, ptr %3, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.sparticle, ptr %225, i32 0, i32 16
  %227 = load ptr, ptr %226, align 8, !tbaa !26
  store ptr %227, ptr %20, align 8, !tbaa !5
  br label %228

228:                                              ; preds = %234, %126
  %229 = load ptr, ptr %20, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.sevent, ptr %229, i32 0, i32 7
  %231 = load ptr, ptr %230, align 8, !tbaa !27
  %232 = load ptr, ptr %20, align 8, !tbaa !5
  %233 = icmp ne ptr %231, %232
  br i1 %233, label %234, label %238

234:                                              ; preds = %228
  %235 = load ptr, ptr %20, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.sevent, ptr %235, i32 0, i32 7
  %237 = load ptr, ptr %236, align 8, !tbaa !27
  call void @removeevent(ptr noundef %237)
  br label %228, !llvm.loop !28

238:                                              ; preds = %228
  br label %239

239:                                              ; preds = %245, %238
  %240 = load ptr, ptr %20, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.sevent, ptr %240, i32 0, i32 9
  %242 = load ptr, ptr %241, align 8, !tbaa !30
  %243 = load ptr, ptr %20, align 8, !tbaa !5
  %244 = icmp ne ptr %242, %243
  br i1 %244, label %245, label %249

245:                                              ; preds = %239
  %246 = load ptr, ptr %20, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.sevent, ptr %246, i32 0, i32 9
  %248 = load ptr, ptr %247, align 8, !tbaa !30
  call void @removeevent(ptr noundef %248)
  br label %239, !llvm.loop !31

249:                                              ; preds = %239
  %250 = load ptr, ptr %20, align 8, !tbaa !5
  call void @removeevent(ptr noundef %250)
  %251 = load ptr, ptr %3, align 8, !tbaa !5
  call void @findcrossing(ptr noundef %251)
  %252 = load ptr, ptr %3, align 8, !tbaa !5
  %253 = load ptr, ptr %4, align 8, !tbaa !5
  call void @findcollisions(ptr noundef %252, ptr noundef %253)
  %254 = load ptr, ptr %4, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.sparticle, ptr %254, i32 0, i32 16
  %256 = load ptr, ptr %255, align 8, !tbaa !26
  store ptr %256, ptr %20, align 8, !tbaa !5
  br label %257

257:                                              ; preds = %263, %249
  %258 = load ptr, ptr %20, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.sevent, ptr %258, i32 0, i32 7
  %260 = load ptr, ptr %259, align 8, !tbaa !27
  %261 = load ptr, ptr %20, align 8, !tbaa !5
  %262 = icmp ne ptr %260, %261
  br i1 %262, label %263, label %267

263:                                              ; preds = %257
  %264 = load ptr, ptr %20, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.sevent, ptr %264, i32 0, i32 7
  %266 = load ptr, ptr %265, align 8, !tbaa !27
  call void @removeevent(ptr noundef %266)
  br label %257, !llvm.loop !32

267:                                              ; preds = %257
  br label %268

268:                                              ; preds = %274, %267
  %269 = load ptr, ptr %20, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.sevent, ptr %269, i32 0, i32 9
  %271 = load ptr, ptr %270, align 8, !tbaa !30
  %272 = load ptr, ptr %20, align 8, !tbaa !5
  %273 = icmp ne ptr %271, %272
  br i1 %273, label %274, label %278

274:                                              ; preds = %268
  %275 = load ptr, ptr %20, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.sevent, ptr %275, i32 0, i32 9
  %277 = load ptr, ptr %276, align 8, !tbaa !30
  call void @removeevent(ptr noundef %277)
  br label %268, !llvm.loop !33

278:                                              ; preds = %268
  %279 = load ptr, ptr %20, align 8, !tbaa !5
  call void @removeevent(ptr noundef %279)
  %280 = load ptr, ptr %4, align 8, !tbaa !5
  call void @findcrossing(ptr noundef %280)
  %281 = load ptr, ptr %4, align 8, !tbaa !5
  %282 = load ptr, ptr %3, align 8, !tbaa !5
  call void @findcollisions(ptr noundef %281, ptr noundef %282)
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  ret void
}

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 32}
!10 = !{!"sevent", !11, 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, !6, i64 72, !12, i64 80, !12, i64 84}
!11 = !{!"double", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!10, !6, i64 40}
!14 = !{!15, !11, i64 64}
!15 = !{!"sparticle", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !7, i64 72, !12, i64 76, !12, i64 80, !12, i64 84, !12, i64 88, !12, i64 92, !12, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !7, i64 128}
!16 = !{!11, !11, i64 0}
!17 = !{!15, !11, i64 56}
!18 = !{!15, !11, i64 0}
!19 = !{!15, !11, i64 8}
!20 = !{!15, !11, i64 16}
!21 = !{!15, !7, i64 72}
!22 = !{!15, !11, i64 24}
!23 = !{!15, !11, i64 32}
!24 = !{!15, !11, i64 40}
!25 = !{!12, !12, i64 0}
!26 = !{!15, !6, i64 104}
!27 = !{!10, !6, i64 56}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!10, !6, i64 72}
!31 = distinct !{!31, !29}
!32 = distinct !{!32, !29}
!33 = distinct !{!33, !29}


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

@dvtot = external dso_local local_unnamed_addr global double, align 8
@colcounter = external dso_local local_unnamed_addr global i32, align 4
@xsize = external dso_local local_unnamed_addr global double, align 8
@ysize = external dso_local local_unnamed_addr global double, align 8
@zsize = external dso_local local_unnamed_addr global double, align 8
@hx = external dso_local local_unnamed_addr global double, align 8
@hy = external dso_local local_unnamed_addr global double, align 8
@hz = external dso_local local_unnamed_addr global double, align 8

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @collision(ptr nocapture noundef readonly %0) local_unnamed_addr #1 {
  %2 = getelementptr inbounds i8, ptr %0, i64 32
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 40
  %5 = load ptr, ptr %4, align 8, !tbaa !12
  %6 = getelementptr inbounds i8, ptr %3, i64 64
  %7 = load double, ptr %6, align 8, !tbaa !13
  %8 = getelementptr inbounds i8, ptr %3, i64 56
  %9 = load double, ptr %8, align 8, !tbaa !15
  %10 = getelementptr inbounds i8, ptr %5, i64 64
  %11 = load double, ptr %10, align 8, !tbaa !13
  %12 = getelementptr inbounds i8, ptr %5, i64 56
  %13 = load double, ptr %12, align 8, !tbaa !15
  tail call void @update(ptr noundef %3)
  tail call void @update(ptr noundef %5)
  %14 = fadd double %9, %13
  %15 = fdiv double 1.000000e+00, %14
  %16 = load <2 x double>, ptr %3, align 8, !tbaa !16
  %17 = load <2 x double>, ptr %5, align 8, !tbaa !16
  %18 = fsub <2 x double> %16, %17
  %19 = getelementptr inbounds i8, ptr %3, i64 16
  %20 = load double, ptr %19, align 8, !tbaa !17
  %21 = getelementptr inbounds i8, ptr %5, i64 16
  %22 = load double, ptr %21, align 8, !tbaa !17
  %23 = fsub double %20, %22
  %24 = getelementptr inbounds i8, ptr %3, i64 72
  %25 = load i8, ptr %24, align 8, !tbaa !18
  %.not = icmp eq i8 %25, 0
  br i1 %.not, label %68, label %26

26:                                               ; preds = %1
  %27 = load double, ptr @hx, align 8, !tbaa !16
  %28 = extractelement <2 x double> %18, i64 0
  %29 = fcmp ogt double %28, %27
  br i1 %29, label %30, label %33

30:                                               ; preds = %26
  %31 = load double, ptr @xsize, align 8, !tbaa !16
  %32 = fsub double %28, %31
  br label %39

33:                                               ; preds = %26
  %34 = fneg double %27
  %35 = fcmp olt double %28, %34
  br i1 %35, label %36, label %39

36:                                               ; preds = %33
  %37 = load double, ptr @xsize, align 8, !tbaa !16
  %38 = fadd double %28, %37
  br label %39

39:                                               ; preds = %33, %36, %30
  %.0 = phi double [ %32, %30 ], [ %38, %36 ], [ %28, %33 ]
  %40 = load double, ptr @hy, align 8, !tbaa !16
  %41 = extractelement <2 x double> %18, i64 1
  %42 = fcmp ogt double %41, %40
  br i1 %42, label %43, label %46

43:                                               ; preds = %39
  %44 = load double, ptr @ysize, align 8, !tbaa !16
  %45 = fsub double %41, %44
  br label %52

46:                                               ; preds = %39
  %47 = fneg double %40
  %48 = fcmp olt double %41, %47
  br i1 %48, label %49, label %52

49:                                               ; preds = %46
  %50 = load double, ptr @ysize, align 8, !tbaa !16
  %51 = fadd double %41, %50
  br label %52

52:                                               ; preds = %46, %49, %43
  %.098 = phi double [ %45, %43 ], [ %51, %49 ], [ %41, %46 ]
  %53 = load double, ptr @hz, align 8, !tbaa !16
  %54 = fcmp ogt double %23, %53
  br i1 %54, label %55, label %60

55:                                               ; preds = %52
  %56 = load double, ptr @zsize, align 8, !tbaa !16
  %57 = fsub double %23, %56
  %58 = insertelement <2 x double> poison, double %.0, i64 0
  %59 = insertelement <2 x double> %58, double %.098, i64 1
  br label %68

60:                                               ; preds = %52
  %61 = fneg double %53
  %62 = fcmp olt double %23, %61
  %63 = insertelement <2 x double> poison, double %.0, i64 0
  %64 = insertelement <2 x double> %63, double %.098, i64 1
  br i1 %62, label %65, label %68

65:                                               ; preds = %60
  %66 = load double, ptr @zsize, align 8, !tbaa !16
  %67 = fadd double %23, %66
  br label %68

68:                                               ; preds = %55, %65, %60, %1
  %.0100 = phi double [ %57, %55 ], [ %67, %65 ], [ %23, %60 ], [ %23, %1 ]
  %69 = phi <2 x double> [ %59, %55 ], [ %64, %65 ], [ %64, %60 ], [ %18, %1 ]
  %70 = insertelement <2 x double> poison, double %15, i64 0
  %71 = shufflevector <2 x double> %70, <2 x double> poison, <2 x i32> zeroinitializer
  %72 = fmul <2 x double> %71, %69
  %73 = fmul double %15, %.0100
  %74 = getelementptr inbounds i8, ptr %3, i64 24
  %75 = getelementptr inbounds i8, ptr %5, i64 24
  %76 = load double, ptr %75, align 8, !tbaa !19
  %77 = getelementptr inbounds i8, ptr %5, i64 32
  %78 = load double, ptr %77, align 8, !tbaa !20
  %79 = getelementptr inbounds i8, ptr %3, i64 40
  %80 = load double, ptr %79, align 8, !tbaa !21
  %81 = getelementptr inbounds i8, ptr %5, i64 40
  %82 = load double, ptr %81, align 8, !tbaa !21
  %83 = fsub double %80, %82
  %84 = fadd double %7, %11
  %85 = fdiv double 2.000000e+00, %84
  %86 = load <2 x double>, ptr %74, align 8, !tbaa !16
  %87 = extractelement <2 x double> %86, i64 0
  %88 = fsub double %87, %76
  %89 = extractelement <2 x double> %86, i64 1
  %90 = fsub double %89, %78
  %91 = extractelement <2 x double> %72, i64 1
  %92 = fmul double %91, %90
  %93 = extractelement <2 x double> %72, i64 0
  %94 = tail call double @llvm.fmuladd.f64(double %93, double %88, double %92)
  %95 = tail call double @llvm.fmuladd.f64(double %73, double %83, double %94)
  %96 = fmul double %85, %95
  %97 = fmul double %11, %96
  %98 = fmul double %7, %96
  %99 = fneg double %97
  %100 = insertelement <2 x double> poison, double %99, i64 0
  %101 = shufflevector <2 x double> %100, <2 x double> poison, <2 x i32> zeroinitializer
  %102 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %101, <2 x double> %72, <2 x double> %86)
  store <2 x double> %102, ptr %74, align 8, !tbaa !16
  %103 = tail call double @llvm.fmuladd.f64(double %99, double %73, double %80)
  store double %103, ptr %79, align 8, !tbaa !21
  %104 = load <2 x double>, ptr %75, align 8, !tbaa !16
  %105 = insertelement <2 x double> poison, double %98, i64 0
  %106 = shufflevector <2 x double> %105, <2 x double> poison, <2 x i32> zeroinitializer
  %107 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %106, <2 x double> %72, <2 x double> %104)
  store <2 x double> %107, ptr %75, align 8, !tbaa !16
  %108 = load double, ptr %81, align 8, !tbaa !21
  %109 = tail call double @llvm.fmuladd.f64(double %98, double %73, double %108)
  store double %109, ptr %81, align 8, !tbaa !21
  %110 = fmul double %7, %97
  %111 = load double, ptr @dvtot, align 8, !tbaa !16
  %112 = tail call double @llvm.fmuladd.f64(double %110, double %14, double %111)
  store double %112, ptr @dvtot, align 8, !tbaa !16
  %113 = load i32, ptr @colcounter, align 4, !tbaa !22
  %114 = add i32 %113, 1
  store i32 %114, ptr @colcounter, align 4, !tbaa !22
  %115 = getelementptr inbounds i8, ptr %3, i64 104
  %116 = load ptr, ptr %115, align 8, !tbaa !23
  %117 = getelementptr inbounds i8, ptr %116, i64 56
  %118 = load ptr, ptr %117, align 8, !tbaa !24
  %.not116121 = icmp eq ptr %118, %116
  br i1 %.not116121, label %.preheader120, label %.lr.ph

.preheader120:                                    ; preds = %.lr.ph, %68
  %119 = getelementptr inbounds i8, ptr %116, i64 72
  %120 = load ptr, ptr %119, align 8, !tbaa !25
  %.not117122 = icmp eq ptr %120, %116
  br i1 %.not117122, label %._crit_edge, label %.lr.ph123

.lr.ph:                                           ; preds = %68, %.lr.ph
  %121 = phi ptr [ %122, %.lr.ph ], [ %118, %68 ]
  tail call void @removeevent(ptr noundef %121)
  %122 = load ptr, ptr %117, align 8, !tbaa !24
  %.not116 = icmp eq ptr %122, %116
  br i1 %.not116, label %.preheader120, label %.lr.ph, !llvm.loop !26

.lr.ph123:                                        ; preds = %.preheader120, %.lr.ph123
  %123 = phi ptr [ %124, %.lr.ph123 ], [ %120, %.preheader120 ]
  tail call void @removeevent(ptr noundef %123)
  %124 = load ptr, ptr %119, align 8, !tbaa !25
  %.not117 = icmp eq ptr %124, %116
  br i1 %.not117, label %._crit_edge, label %.lr.ph123, !llvm.loop !28

._crit_edge:                                      ; preds = %.lr.ph123, %.preheader120
  tail call void @removeevent(ptr noundef nonnull %116)
  tail call void @findcrossing(ptr noundef nonnull %3)
  tail call void @findcollisions(ptr noundef nonnull %3, ptr noundef nonnull %5)
  %125 = getelementptr inbounds i8, ptr %5, i64 104
  %126 = load ptr, ptr %125, align 8, !tbaa !23
  %127 = getelementptr inbounds i8, ptr %126, i64 56
  %128 = load ptr, ptr %127, align 8, !tbaa !24
  %.not118124 = icmp eq ptr %128, %126
  br i1 %.not118124, label %.preheader, label %.lr.ph126

.preheader:                                       ; preds = %.lr.ph126, %._crit_edge
  %129 = getelementptr inbounds i8, ptr %126, i64 72
  %130 = load ptr, ptr %129, align 8, !tbaa !25
  %.not119127 = icmp eq ptr %130, %126
  br i1 %.not119127, label %._crit_edge129, label %.lr.ph128

.lr.ph126:                                        ; preds = %._crit_edge, %.lr.ph126
  %131 = phi ptr [ %132, %.lr.ph126 ], [ %128, %._crit_edge ]
  tail call void @removeevent(ptr noundef %131)
  %132 = load ptr, ptr %127, align 8, !tbaa !24
  %.not118 = icmp eq ptr %132, %126
  br i1 %.not118, label %.preheader, label %.lr.ph126, !llvm.loop !29

.lr.ph128:                                        ; preds = %.preheader, %.lr.ph128
  %133 = phi ptr [ %134, %.lr.ph128 ], [ %130, %.preheader ]
  tail call void @removeevent(ptr noundef %133)
  %134 = load ptr, ptr %129, align 8, !tbaa !25
  %.not119 = icmp eq ptr %134, %126
  br i1 %.not119, label %._crit_edge129, label %.lr.ph128, !llvm.loop !30

._crit_edge129:                                   ; preds = %.lr.ph128, %.preheader
  tail call void @removeevent(ptr noundef nonnull %126)
  tail call void @findcrossing(ptr noundef nonnull %5)
  tail call void @findcollisions(ptr noundef nonnull %5, ptr noundef nonnull %3)
  ret void
}

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

; Function Attrs: nounwind uwtable
declare dso_local void @findcollisions(ptr noundef, ptr noundef) local_unnamed_addr #1

; 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>) #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { 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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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, !10, i64 32}
!6 = !{!"sevent", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !11, i64 80, !11, i64 84}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!6, !10, i64 40}
!13 = !{!14, !7, i64 64}
!14 = !{!"sparticle", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !8, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !8, i64 128}
!15 = !{!14, !7, i64 56}
!16 = !{!7, !7, i64 0}
!17 = !{!14, !7, i64 16}
!18 = !{!14, !8, i64 72}
!19 = !{!14, !7, i64 24}
!20 = !{!14, !7, i64 32}
!21 = !{!14, !7, i64 40}
!22 = !{!11, !11, i64 0}
!23 = !{!14, !10, i64 104}
!24 = !{!6, !10, i64 56}
!25 = !{!6, !10, i64 72}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}
!29 = distinct !{!29, !27}
!30 = distinct !{!30, !27}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass