; LLVM IR from FSmallenburg/EDMD :: Single (mdSingle)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.sparticle = type { double, double, double, double, double, double, double, double, double, [24 x ptr], i8, double, double, double, i8, i32, i32, i32, i32, i32, i32, ptr, ptr, i8, double, ptr, ptr, ptr, ptr, i32, 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 @update(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @removeevent(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 i32, align 4
  %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
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.sparticle, ptr %20, i32 0, i32 28
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  store ptr %22, ptr %3, align 8, !tbaa !5
  %23 = load ptr, ptr %2, align 8, !tbaa !5
  call void @update(ptr noundef %23)
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.sparticle, ptr %24, i32 0, i32 20
  %26 = load i32, ptr %25, align 8, !tbaa !13
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.sparticle, ptr %27, i32 0, i32 19
  %29 = load i32, ptr %28, align 4, !tbaa !14
  %30 = icmp ne i32 %26, %29
  br i1 %30, label %31, label %33

31:                                               ; preds = %1
  %32 = load ptr, ptr %2, align 8, !tbaa !5
  call void @findcollisions(ptr noundef %32)
  store i32 1, ptr %4, align 4
  br label %242

33:                                               ; preds = %1
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  call void @update(ptr noundef %34)
  %35 = load ptr, ptr %2, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.sparticle, ptr %35, i32 0, i32 19
  %37 = load i32, ptr %36, align 4, !tbaa !14
  %38 = add i32 %37, 1
  store i32 %38, ptr %36, align 4, !tbaa !14
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.sparticle, ptr %39, i32 0, i32 19
  %41 = load i32, ptr %40, align 4, !tbaa !14
  %42 = add i32 %41, 1
  store i32 %42, ptr %40, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  %43 = load ptr, ptr %2, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.sparticle, ptr %43, i32 0, i32 13
  %45 = load double, ptr %44, align 8, !tbaa !15
  store double %45, ptr %5, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %46 = load ptr, ptr %2, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.sparticle, ptr %46, i32 0, i32 12
  %48 = load double, ptr %47, align 8, !tbaa !17
  store double %48, ptr %6, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.sparticle, ptr %49, i32 0, i32 13
  %51 = load double, ptr %50, align 8, !tbaa !15
  store double %51, ptr %7, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.sparticle, ptr %52, i32 0, i32 12
  %54 = load double, ptr %53, align 8, !tbaa !17
  store double %54, ptr %8, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %55 = load double, ptr %6, align 8, !tbaa !16
  %56 = load double, ptr %8, align 8, !tbaa !16
  %57 = fadd double %55, %56
  store double %57, ptr %9, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %58 = load double, ptr %9, align 8, !tbaa !16
  %59 = fdiv double 1.000000e+00, %58
  store double %59, ptr %10, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %60 = load ptr, ptr %2, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.sparticle, ptr %60, i32 0, i32 0
  %62 = load double, ptr %61, align 8, !tbaa !18
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.sparticle, ptr %63, i32 0, i32 0
  %65 = load double, ptr %64, align 8, !tbaa !18
  %66 = fsub double %62, %65
  store double %66, ptr %11, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %67 = load ptr, ptr %2, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.sparticle, ptr %67, i32 0, i32 1
  %69 = load double, ptr %68, align 8, !tbaa !19
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.sparticle, ptr %70, i32 0, i32 1
  %72 = load double, ptr %71, align 8, !tbaa !19
  %73 = fsub double %69, %72
  store double %73, ptr %12, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %74 = load ptr, ptr %2, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.sparticle, ptr %74, i32 0, i32 2
  %76 = load double, ptr %75, align 8, !tbaa !20
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.sparticle, ptr %77, i32 0, i32 2
  %79 = load double, ptr %78, align 8, !tbaa !20
  %80 = fsub double %76, %79
  store double %80, ptr %13, align 8, !tbaa !16
  %81 = load ptr, ptr %2, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.sparticle, ptr %81, i32 0, i32 14
  %83 = load i8, ptr %82, align 8, !tbaa !21
  %84 = icmp ne i8 %83, 0
  br i1 %84, label %85, label %140

85:                                               ; preds = %33
  %86 = load double, ptr %11, align 8, !tbaa !16
  %87 = load double, ptr @hx, align 8, !tbaa !16
  %88 = fcmp ogt double %86, %87
  br i1 %88, label %89, label %93

89:                                               ; preds = %85
  %90 = load double, ptr @xsize, align 8, !tbaa !16
  %91 = load double, ptr %11, align 8, !tbaa !16
  %92 = fsub double %91, %90
  store double %92, ptr %11, align 8, !tbaa !16
  br label %103

93:                                               ; preds = %85
  %94 = load double, ptr %11, align 8, !tbaa !16
  %95 = load double, ptr @hx, align 8, !tbaa !16
  %96 = fneg double %95
  %97 = fcmp olt double %94, %96
  br i1 %97, label %98, label %102

98:                                               ; preds = %93
  %99 = load double, ptr @xsize, align 8, !tbaa !16
  %100 = load double, ptr %11, align 8, !tbaa !16
  %101 = fadd double %100, %99
  store double %101, ptr %11, align 8, !tbaa !16
  br label %102

102:                                              ; preds = %98, %93
  br label %103

103:                                              ; preds = %102, %89
  %104 = load double, ptr %12, align 8, !tbaa !16
  %105 = load double, ptr @hy, align 8, !tbaa !16
  %106 = fcmp ogt double %104, %105
  br i1 %106, label %107, label %111

107:                                              ; preds = %103
  %108 = load double, ptr @ysize, align 8, !tbaa !16
  %109 = load double, ptr %12, align 8, !tbaa !16
  %110 = fsub double %109, %108
  store double %110, ptr %12, align 8, !tbaa !16
  br label %121

111:                                              ; preds = %103
  %112 = load double, ptr %12, align 8, !tbaa !16
  %113 = load double, ptr @hy, align 8, !tbaa !16
  %114 = fneg double %113
  %115 = fcmp olt double %112, %114
  br i1 %115, label %116, label %120

116:                                              ; preds = %111
  %117 = load double, ptr @ysize, align 8, !tbaa !16
  %118 = load double, ptr %12, align 8, !tbaa !16
  %119 = fadd double %118, %117
  store double %119, ptr %12, align 8, !tbaa !16
  br label %120

120:                                              ; preds = %116, %111
  br label %121

121:                                              ; preds = %120, %107
  %122 = load double, ptr %13, align 8, !tbaa !16
  %123 = load double, ptr @hz, align 8, !tbaa !16
  %124 = fcmp ogt double %122, %123
  br i1 %124, label %125, label %129

125:                                              ; preds = %121
  %126 = load double, ptr @zsize, align 8, !tbaa !16
  %127 = load double, ptr %13, align 8, !tbaa !16
  %128 = fsub double %127, %126
  store double %128, ptr %13, align 8, !tbaa !16
  br label %139

129:                                              ; preds = %121
  %130 = load double, ptr %13, align 8, !tbaa !16
  %131 = load double, ptr @hz, align 8, !tbaa !16
  %132 = fneg double %131
  %133 = fcmp olt double %130, %132
  br i1 %133, label %134, label %138

134:                                              ; preds = %129
  %135 = load double, ptr @zsize, align 8, !tbaa !16
  %136 = load double, ptr %13, align 8, !tbaa !16
  %137 = fadd double %136, %135
  store double %137, ptr %13, align 8, !tbaa !16
  br label %138

138:                                              ; preds = %134, %129
  br label %139

139:                                              ; preds = %138, %125
  br label %140

140:                                              ; preds = %139, %33
  %141 = load double, ptr %10, align 8, !tbaa !16
  %142 = load double, ptr %11, align 8, !tbaa !16
  %143 = fmul double %142, %141
  store double %143, ptr %11, align 8, !tbaa !16
  %144 = load double, ptr %10, align 8, !tbaa !16
  %145 = load double, ptr %12, align 8, !tbaa !16
  %146 = fmul double %145, %144
  store double %146, ptr %12, align 8, !tbaa !16
  %147 = load double, ptr %10, align 8, !tbaa !16
  %148 = load double, ptr %13, align 8, !tbaa !16
  %149 = fmul double %148, %147
  store double %149, ptr %13, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %150 = load ptr, ptr %2, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.sparticle, ptr %150, i32 0, i32 3
  %152 = load double, ptr %151, align 8, !tbaa !22
  %153 = load ptr, ptr %3, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.sparticle, ptr %153, i32 0, i32 3
  %155 = load double, ptr %154, align 8, !tbaa !22
  %156 = fsub double %152, %155
  store double %156, ptr %14, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %157 = load ptr, ptr %2, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.sparticle, ptr %157, i32 0, i32 4
  %159 = load double, ptr %158, align 8, !tbaa !23
  %160 = load ptr, ptr %3, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.sparticle, ptr %160, i32 0, i32 4
  %162 = load double, ptr %161, align 8, !tbaa !23
  %163 = fsub double %159, %162
  store double %163, ptr %15, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %164 = load ptr, ptr %2, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.sparticle, ptr %164, i32 0, i32 5
  %166 = load double, ptr %165, align 8, !tbaa !24
  %167 = load ptr, ptr %3, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.sparticle, ptr %167, i32 0, i32 5
  %169 = load double, ptr %168, align 8, !tbaa !24
  %170 = fsub double %166, %169
  store double %170, ptr %16, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %171 = load double, ptr %11, align 8, !tbaa !16
  %172 = load double, ptr %14, align 8, !tbaa !16
  %173 = load double, ptr %12, align 8, !tbaa !16
  %174 = load double, ptr %15, align 8, !tbaa !16
  %175 = fmul double %173, %174
  %176 = call double @llvm.fmuladd.f64(double %171, double %172, double %175)
  %177 = load double, ptr %13, align 8, !tbaa !16
  %178 = load double, ptr %16, align 8, !tbaa !16
  %179 = call double @llvm.fmuladd.f64(double %177, double %178, double %176)
  store double %179, ptr %17, align 8, !tbaa !16
  %180 = load double, ptr %5, align 8, !tbaa !16
  %181 = load double, ptr %7, align 8, !tbaa !16
  %182 = fadd double %180, %181
  %183 = fdiv double 2.000000e+00, %182
  %184 = load double, ptr %17, align 8, !tbaa !16
  %185 = fmul double %184, %183
  store double %185, ptr %17, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %186 = load double, ptr %17, align 8, !tbaa !16
  %187 = load double, ptr %7, align 8, !tbaa !16
  %188 = fmul double %186, %187
  store double %188, ptr %18, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %189 = load double, ptr %17, align 8, !tbaa !16
  %190 = load double, ptr %5, align 8, !tbaa !16
  %191 = fmul double %189, %190
  store double %191, ptr %19, align 8, !tbaa !16
  %192 = load double, ptr %18, align 8, !tbaa !16
  %193 = load double, ptr %11, align 8, !tbaa !16
  %194 = load ptr, ptr %2, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.sparticle, ptr %194, i32 0, i32 3
  %196 = load double, ptr %195, align 8, !tbaa !22
  %197 = fneg double %192
  %198 = call double @llvm.fmuladd.f64(double %197, double %193, double %196)
  store double %198, ptr %195, align 8, !tbaa !22
  %199 = load double, ptr %18, align 8, !tbaa !16
  %200 = load double, ptr %12, align 8, !tbaa !16
  %201 = load ptr, ptr %2, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.sparticle, ptr %201, i32 0, i32 4
  %203 = load double, ptr %202, align 8, !tbaa !23
  %204 = fneg double %199
  %205 = call double @llvm.fmuladd.f64(double %204, double %200, double %203)
  store double %205, ptr %202, align 8, !tbaa !23
  %206 = load double, ptr %18, align 8, !tbaa !16
  %207 = load double, ptr %13, align 8, !tbaa !16
  %208 = load ptr, ptr %2, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.sparticle, ptr %208, i32 0, i32 5
  %210 = load double, ptr %209, align 8, !tbaa !24
  %211 = fneg double %206
  %212 = call double @llvm.fmuladd.f64(double %211, double %207, double %210)
  store double %212, ptr %209, align 8, !tbaa !24
  %213 = load double, ptr %19, align 8, !tbaa !16
  %214 = load double, ptr %11, align 8, !tbaa !16
  %215 = load ptr, ptr %3, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.sparticle, ptr %215, i32 0, i32 3
  %217 = load double, ptr %216, align 8, !tbaa !22
  %218 = call double @llvm.fmuladd.f64(double %213, double %214, double %217)
  store double %218, ptr %216, align 8, !tbaa !22
  %219 = load double, ptr %19, align 8, !tbaa !16
  %220 = load double, ptr %12, align 8, !tbaa !16
  %221 = load ptr, ptr %3, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.sparticle, ptr %221, i32 0, i32 4
  %223 = load double, ptr %222, align 8, !tbaa !23
  %224 = call double @llvm.fmuladd.f64(double %219, double %220, double %223)
  store double %224, ptr %222, align 8, !tbaa !23
  %225 = load double, ptr %19, align 8, !tbaa !16
  %226 = load double, ptr %13, align 8, !tbaa !16
  %227 = load ptr, ptr %3, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.sparticle, ptr %227, i32 0, i32 5
  %229 = load double, ptr %228, align 8, !tbaa !24
  %230 = call double @llvm.fmuladd.f64(double %225, double %226, double %229)
  store double %230, ptr %228, align 8, !tbaa !24
  %231 = load double, ptr %18, align 8, !tbaa !16
  %232 = load double, ptr %5, align 8, !tbaa !16
  %233 = fmul double %231, %232
  %234 = load double, ptr %9, align 8, !tbaa !16
  %235 = load double, ptr @dvtot, align 8, !tbaa !16
  %236 = call double @llvm.fmuladd.f64(double %233, double %234, double %235)
  store double %236, ptr @dvtot, align 8, !tbaa !16
  %237 = load i32, ptr @colcounter, align 4, !tbaa !25
  %238 = add i32 %237, 1
  store i32 %238, ptr @colcounter, align 4, !tbaa !25
  %239 = load ptr, ptr %3, align 8, !tbaa !5
  call void @removeevent(ptr noundef %239)
  %240 = load ptr, ptr %2, align 8, !tbaa !5
  call void @findcollisions(ptr noundef %240)
  %241 = load ptr, ptr %3, align 8, !tbaa !5
  call void @findcollisions(ptr noundef %241)
  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
  store i32 0, ptr %4, align 4
  br label %242

242:                                              ; preds = %140, %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  %243 = load i32, ptr %4, align 4
  switch i32 %243, label %245 [
    i32 0, label %244
    i32 1, label %244
  ]

244:                                              ; preds = %242, %242
  ret void

245:                                              ; preds = %242
  unreachable
}

; Function Attrs: nounwind uwtable
declare dso_local void @findcollisions(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 384}
!10 = !{!"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, !7, i64 264, !11, i64 272, !11, i64 280, !11, i64 288, !7, i64 296, !12, i64 300, !12, i64 304, !12, i64 308, !12, i64 312, !12, i64 316, !12, i64 320, !6, i64 328, !6, i64 336, !7, i64 344, !11, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !12, i64 392, !7, i64 396}
!11 = !{!"double", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!10, !12, i64 320}
!14 = !{!10, !12, i64 316}
!15 = !{!10, !11, i64 288}
!16 = !{!11, !11, i64 0}
!17 = !{!10, !11, i64 280}
!18 = !{!10, !11, i64 0}
!19 = !{!10, !11, i64 8}
!20 = !{!10, !11, i64 16}
!21 = !{!10, !7, i64 296}
!22 = !{!10, !11, i64 24}
!23 = !{!10, !11, i64 32}
!24 = !{!10, !11, i64 40}
!25 = !{!12, !12, i64 0}


; 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 @update(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local void @collision(ptr noundef %0) local_unnamed_addr #1 {
  %2 = getelementptr inbounds i8, ptr %0, i64 384
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  tail call void @update(ptr noundef %0)
  %4 = getelementptr inbounds i8, ptr %0, i64 320
  %5 = load i32, ptr %4, align 8, !tbaa !12
  %6 = getelementptr inbounds i8, ptr %3, i64 316
  %7 = load i32, ptr %6, align 4, !tbaa !13
  %.not = icmp eq i32 %5, %7
  br i1 %.not, label %8, label %123

8:                                                ; preds = %1
  tail call void @update(ptr noundef nonnull %3)
  %9 = getelementptr inbounds i8, ptr %0, i64 316
  %10 = load i32, ptr %9, align 4, !tbaa !13
  %11 = add i32 %10, 1
  store i32 %11, ptr %9, align 4, !tbaa !13
  %12 = load i32, ptr %6, align 4, !tbaa !13
  %13 = add i32 %12, 1
  store i32 %13, ptr %6, align 4, !tbaa !13
  %14 = getelementptr inbounds i8, ptr %0, i64 288
  %15 = load double, ptr %14, align 8, !tbaa !14
  %16 = getelementptr inbounds i8, ptr %0, i64 280
  %17 = load double, ptr %16, align 8, !tbaa !15
  %18 = getelementptr inbounds i8, ptr %3, i64 288
  %19 = load double, ptr %18, align 8, !tbaa !14
  %20 = getelementptr inbounds i8, ptr %3, i64 280
  %21 = load double, ptr %20, align 8, !tbaa !15
  %22 = fadd double %17, %21
  %23 = fdiv double 1.000000e+00, %22
  %24 = load <2 x double>, ptr %0, align 8, !tbaa !16
  %25 = load <2 x double>, ptr %3, align 8, !tbaa !16
  %26 = fsub <2 x double> %24, %25
  %27 = getelementptr inbounds i8, ptr %0, i64 16
  %28 = load double, ptr %27, align 8, !tbaa !17
  %29 = getelementptr inbounds i8, ptr %3, i64 16
  %30 = load double, ptr %29, align 8, !tbaa !17
  %31 = fsub double %28, %30
  %32 = getelementptr inbounds i8, ptr %0, i64 296
  %33 = load i8, ptr %32, align 8, !tbaa !18
  %.not95 = icmp eq i8 %33, 0
  br i1 %.not95, label %76, label %34

34:                                               ; preds = %8
  %35 = load double, ptr @hx, align 8, !tbaa !16
  %36 = extractelement <2 x double> %26, i64 0
  %37 = fcmp ogt double %36, %35
  br i1 %37, label %38, label %41

38:                                               ; preds = %34
  %39 = load double, ptr @xsize, align 8, !tbaa !16
  %40 = fsub double %36, %39
  br label %47

41:                                               ; preds = %34
  %42 = fneg double %35
  %43 = fcmp olt double %36, %42
  br i1 %43, label %44, label %47

44:                                               ; preds = %41
  %45 = load double, ptr @xsize, align 8, !tbaa !16
  %46 = fadd double %36, %45
  br label %47

47:                                               ; preds = %41, %44, %38
  %.0 = phi double [ %40, %38 ], [ %46, %44 ], [ %36, %41 ]
  %48 = load double, ptr @hy, align 8, !tbaa !16
  %49 = extractelement <2 x double> %26, i64 1
  %50 = fcmp ogt double %49, %48
  br i1 %50, label %51, label %54

51:                                               ; preds = %47
  %52 = load double, ptr @ysize, align 8, !tbaa !16
  %53 = fsub double %49, %52
  br label %60

54:                                               ; preds = %47
  %55 = fneg double %48
  %56 = fcmp olt double %49, %55
  br i1 %56, label %57, label %60

57:                                               ; preds = %54
  %58 = load double, ptr @ysize, align 8, !tbaa !16
  %59 = fadd double %49, %58
  br label %60

60:                                               ; preds = %54, %57, %51
  %.083 = phi double [ %53, %51 ], [ %59, %57 ], [ %49, %54 ]
  %61 = load double, ptr @hz, align 8, !tbaa !16
  %62 = fcmp ogt double %31, %61
  br i1 %62, label %63, label %68

63:                                               ; preds = %60
  %64 = load double, ptr @zsize, align 8, !tbaa !16
  %65 = fsub double %31, %64
  %66 = insertelement <2 x double> poison, double %.0, i64 0
  %67 = insertelement <2 x double> %66, double %.083, i64 1
  br label %76

68:                                               ; preds = %60
  %69 = fneg double %61
  %70 = fcmp olt double %31, %69
  %71 = insertelement <2 x double> poison, double %.0, i64 0
  %72 = insertelement <2 x double> %71, double %.083, i64 1
  br i1 %70, label %73, label %76

73:                                               ; preds = %68
  %74 = load double, ptr @zsize, align 8, !tbaa !16
  %75 = fadd double %31, %74
  br label %76

76:                                               ; preds = %63, %73, %68, %8
  %.085 = phi double [ %65, %63 ], [ %75, %73 ], [ %31, %68 ], [ %31, %8 ]
  %77 = phi <2 x double> [ %67, %63 ], [ %72, %73 ], [ %72, %68 ], [ %26, %8 ]
  %78 = insertelement <2 x double> poison, double %23, i64 0
  %79 = shufflevector <2 x double> %78, <2 x double> poison, <2 x i32> zeroinitializer
  %80 = fmul <2 x double> %79, %77
  %81 = fmul double %23, %.085
  %82 = getelementptr inbounds i8, ptr %0, i64 24
  %83 = getelementptr inbounds i8, ptr %3, i64 24
  %84 = load double, ptr %83, align 8, !tbaa !19
  %85 = getelementptr inbounds i8, ptr %3, i64 32
  %86 = load double, ptr %85, align 8, !tbaa !20
  %87 = getelementptr inbounds i8, ptr %0, i64 40
  %88 = load double, ptr %87, align 8, !tbaa !21
  %89 = getelementptr inbounds i8, ptr %3, i64 40
  %90 = load double, ptr %89, align 8, !tbaa !21
  %91 = fsub double %88, %90
  %92 = fadd double %15, %19
  %93 = fdiv double 2.000000e+00, %92
  %94 = load <2 x double>, ptr %82, align 8, !tbaa !16
  %95 = extractelement <2 x double> %94, i64 0
  %96 = fsub double %95, %84
  %97 = extractelement <2 x double> %94, i64 1
  %98 = fsub double %97, %86
  %99 = extractelement <2 x double> %80, i64 1
  %100 = fmul double %99, %98
  %101 = extractelement <2 x double> %80, i64 0
  %102 = tail call double @llvm.fmuladd.f64(double %101, double %96, double %100)
  %103 = tail call double @llvm.fmuladd.f64(double %81, double %91, double %102)
  %104 = fmul double %93, %103
  %105 = fmul double %19, %104
  %106 = fmul double %15, %104
  %107 = fneg double %105
  %108 = insertelement <2 x double> poison, double %107, i64 0
  %109 = shufflevector <2 x double> %108, <2 x double> poison, <2 x i32> zeroinitializer
  %110 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %109, <2 x double> %80, <2 x double> %94)
  store <2 x double> %110, ptr %82, align 8, !tbaa !16
  %111 = tail call double @llvm.fmuladd.f64(double %107, double %81, double %88)
  store double %111, ptr %87, align 8, !tbaa !21
  %112 = load <2 x double>, ptr %83, align 8, !tbaa !16
  %113 = insertelement <2 x double> poison, double %106, i64 0
  %114 = shufflevector <2 x double> %113, <2 x double> poison, <2 x i32> zeroinitializer
  %115 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %114, <2 x double> %80, <2 x double> %112)
  store <2 x double> %115, ptr %83, align 8, !tbaa !16
  %116 = load double, ptr %89, align 8, !tbaa !21
  %117 = tail call double @llvm.fmuladd.f64(double %106, double %81, double %116)
  store double %117, ptr %89, align 8, !tbaa !21
  %118 = fmul double %15, %105
  %119 = load double, ptr @dvtot, align 8, !tbaa !16
  %120 = tail call double @llvm.fmuladd.f64(double %118, double %22, double %119)
  store double %120, ptr @dvtot, align 8, !tbaa !16
  %121 = load i32, ptr @colcounter, align 4, !tbaa !22
  %122 = add i32 %121, 1
  store i32 %122, ptr @colcounter, align 4, !tbaa !22
  tail call void @removeevent(ptr noundef nonnull %3)
  tail call void @findcollisions(ptr noundef nonnull %0)
  br label %123

123:                                              ; preds = %1, %76
  %.sink = phi ptr [ %3, %76 ], [ %0, %1 ]
  tail call void @findcollisions(ptr noundef nonnull %.sink)
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local void @findcollisions(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, !11, i64 384}
!6 = !{!"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, !8, i64 264, !7, i64 272, !7, i64 280, !7, i64 288, !8, i64 296, !10, i64 300, !10, i64 304, !10, i64 308, !10, i64 312, !10, i64 316, !10, i64 320, !11, i64 328, !11, i64 336, !8, i64 344, !7, i64 352, !11, i64 360, !11, i64 368, !11, i64 376, !11, i64 384, !10, i64 392, !8, i64 396}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!6, !10, i64 320}
!13 = !{!6, !10, i64 316}
!14 = !{!6, !7, i64 288}
!15 = !{!6, !7, i64 280}
!16 = !{!7, !7, i64 0}
!17 = !{!6, !7, i64 16}
!18 = !{!6, !8, i64 296}
!19 = !{!6, !7, i64 24}
!20 = !{!6, !7, i64 32}
!21 = !{!6, !7, i64 40}
!22 = !{!10, !10, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass