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

@N = external dso_local global i32, align 4
@particles = external dso_local global ptr, align 8
@xsize = external dso_local global double, align 8
@ysize = external dso_local global double, align 8
@zsize = external dso_local global double, align 8
@cx = external dso_local global i32, align 4
@cy = external dso_local global i32, align 4
@cz = external dso_local global i32, align 4
@.str.22 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [79 x i8], align 1
@cxsize = external dso_local global double, align 8
@cysize = external dso_local global double, align 8
@czsize = external dso_local global double, align 8
@celllist = external dso_local global [75 x [75 x [75 x ptr]]], align 16

; 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

declare i32 @printf(ptr noundef, ...) #1

; Function Attrs: nounwind uwtable
define dso_local void @initcelllist() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  %5 = load double, ptr @xsize, align 8, !tbaa !5
  %6 = fsub double %5, 1.000000e-04
  %7 = fptosi double %6 to i32
  store i32 %7, ptr @cx, align 4, !tbaa !9
  %8 = load double, ptr @ysize, align 8, !tbaa !5
  %9 = fsub double %8, 1.000000e-04
  %10 = fptosi double %9 to i32
  store i32 %10, ptr @cy, align 4, !tbaa !9
  %11 = load double, ptr @zsize, align 8, !tbaa !5
  %12 = fsub double %11, 1.000000e-04
  %13 = fptosi double %12 to i32
  store i32 %13, ptr @cz, align 4, !tbaa !9
  br label %14

14:                                               ; preds = %23, %0
  %15 = load i32, ptr @cx, align 4, !tbaa !9
  %16 = load i32, ptr @cy, align 4, !tbaa !9
  %17 = mul nsw i32 %15, %16
  %18 = load i32, ptr @cz, align 4, !tbaa !9
  %19 = mul nsw i32 %17, %18
  %20 = load i32, ptr @N, align 4, !tbaa !9
  %21 = mul nsw i32 8, %20
  %22 = icmp sgt i32 %19, %21
  br i1 %22, label %23, label %36

23:                                               ; preds = %14
  %24 = load i32, ptr @cx, align 4, !tbaa !9
  %25 = sitofp i32 %24 to double
  %26 = fmul double %25, 9.000000e-01
  %27 = fptosi double %26 to i32
  store i32 %27, ptr @cx, align 4, !tbaa !9
  %28 = load i32, ptr @cy, align 4, !tbaa !9
  %29 = sitofp i32 %28 to double
  %30 = fmul double %29, 9.000000e-01
  %31 = fptosi double %30 to i32
  store i32 %31, ptr @cy, align 4, !tbaa !9
  %32 = load i32, ptr @cz, align 4, !tbaa !9
  %33 = sitofp i32 %32 to double
  %34 = fmul double %33, 9.000000e-01
  %35 = fptosi double %34 to i32
  store i32 %35, ptr @cz, align 4, !tbaa !9
  br label %14, !llvm.loop !11

36:                                               ; preds = %14
  %37 = load i32, ptr @cx, align 4, !tbaa !9
  %38 = load i32, ptr @cy, align 4, !tbaa !9
  %39 = load i32, ptr @cz, align 4, !tbaa !9
  %40 = call i32 (ptr, ...) @printf(ptr noundef @.str.22, i32 noundef %37, i32 noundef %38, i32 noundef %39)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  store i32 0, ptr %4, align 4, !tbaa !9
  %41 = load i32, ptr @cx, align 4, !tbaa !9
  %42 = icmp sgt i32 %41, 75
  br i1 %42, label %43, label %44

43:                                               ; preds = %36
  store i32 75, ptr @cx, align 4, !tbaa !9
  store i32 1, ptr %4, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %43, %36
  %45 = load i32, ptr @cy, align 4, !tbaa !9
  %46 = icmp sgt i32 %45, 75
  br i1 %46, label %47, label %48

47:                                               ; preds = %44
  store i32 75, ptr @cy, align 4, !tbaa !9
  store i32 1, ptr %4, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %47, %44
  %49 = load i32, ptr @cz, align 4, !tbaa !9
  %50 = icmp sgt i32 %49, 75
  br i1 %50, label %51, label %52

51:                                               ; preds = %48
  store i32 75, ptr @cz, align 4, !tbaa !9
  store i32 1, ptr %4, align 4, !tbaa !9
  br label %52

52:                                               ; preds = %51, %48
  %53 = load i32, ptr %4, align 4, !tbaa !9
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %55, label %60

55:                                               ; preds = %52
  %56 = load i32, ptr @cx, align 4, !tbaa !9
  %57 = load i32, ptr @cy, align 4, !tbaa !9
  %58 = load i32, ptr @cz, align 4, !tbaa !9
  %59 = call i32 (ptr, ...) @printf(ptr noundef @.str.23, i32 noundef %56, i32 noundef %57, i32 noundef %58)
  br label %60

60:                                               ; preds = %55, %52
  %61 = load double, ptr @xsize, align 8, !tbaa !5
  %62 = load i32, ptr @cx, align 4, !tbaa !9
  %63 = sitofp i32 %62 to double
  %64 = fdiv double %61, %63
  store double %64, ptr @cxsize, align 8, !tbaa !5
  %65 = load double, ptr @ysize, align 8, !tbaa !5
  %66 = load i32, ptr @cy, align 4, !tbaa !9
  %67 = sitofp i32 %66 to double
  %68 = fdiv double %65, %67
  store double %68, ptr @cysize, align 8, !tbaa !5
  %69 = load double, ptr @zsize, align 8, !tbaa !5
  %70 = load i32, ptr @cz, align 4, !tbaa !9
  %71 = sitofp i32 %70 to double
  %72 = fdiv double %69, %71
  store double %72, ptr @czsize, align 8, !tbaa !5
  store i32 0, ptr %1, align 4, !tbaa !9
  br label %73

73:                                               ; preds = %105, %60
  %74 = load i32, ptr %1, align 4, !tbaa !9
  %75 = load i32, ptr @cx, align 4, !tbaa !9
  %76 = icmp slt i32 %74, %75
  br i1 %76, label %77, label %108

77:                                               ; preds = %73
  store i32 0, ptr %2, align 4, !tbaa !9
  br label %78

78:                                               ; preds = %101, %77
  %79 = load i32, ptr %2, align 4, !tbaa !9
  %80 = load i32, ptr @cy, align 4, !tbaa !9
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %82, label %104

82:                                               ; preds = %78
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %83

83:                                               ; preds = %97, %82
  %84 = load i32, ptr %3, align 4, !tbaa !9
  %85 = load i32, ptr @cz, align 4, !tbaa !9
  %86 = icmp slt i32 %84, %85
  br i1 %86, label %87, label %100

87:                                               ; preds = %83
  %88 = load i32, ptr %1, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [75 x [75 x [75 x ptr]]], ptr @celllist, i64 0, i64 %89
  %91 = load i32, ptr %2, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [75 x [75 x ptr]], ptr %90, i64 0, i64 %92
  %94 = load i32, ptr %3, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [75 x ptr], ptr %93, i64 0, i64 %95
  store ptr null, ptr %96, align 8, !tbaa !13
  br label %97

97:                                               ; preds = %87
  %98 = load i32, ptr %3, align 4, !tbaa !9
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %3, align 4, !tbaa !9
  br label %83, !llvm.loop !15

100:                                              ; preds = %83
  br label %101

101:                                              ; preds = %100
  %102 = load i32, ptr %2, align 4, !tbaa !9
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %2, align 4, !tbaa !9
  br label %78, !llvm.loop !16

104:                                              ; preds = %78
  br label %105

105:                                              ; preds = %104
  %106 = load i32, ptr %1, align 4, !tbaa !9
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %1, align 4, !tbaa !9
  br label %73, !llvm.loop !17

108:                                              ; preds = %73
  store i32 0, ptr %1, align 4, !tbaa !9
  br label %109

109:                                              ; preds = %118, %108
  %110 = load i32, ptr %1, align 4, !tbaa !9
  %111 = load i32, ptr @N, align 4, !tbaa !9
  %112 = icmp slt i32 %110, %111
  br i1 %112, label %113, label %121

113:                                              ; preds = %109
  %114 = load ptr, ptr @particles, align 8, !tbaa !13
  %115 = load i32, ptr %1, align 4, !tbaa !9
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds %struct.sparticle, ptr %114, i64 %116
  call void @addtocelllist(ptr noundef %117)
  br label %118

118:                                              ; preds = %113
  %119 = load i32, ptr %1, align 4, !tbaa !9
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %1, align 4, !tbaa !9
  br label %109, !llvm.loop !18

121:                                              ; preds = %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #3
  ret void
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


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

%struct.sparticle = type { double, double, double, double, double, double, double, double, double, i8, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, i8 }

@N = external dso_local local_unnamed_addr global i32, align 4
@particles = external dso_local local_unnamed_addr global ptr, align 8
@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
@cx = external dso_local local_unnamed_addr global i32, align 4
@cy = external dso_local local_unnamed_addr global i32, align 4
@cz = external dso_local local_unnamed_addr global i32, align 4
@.str.22 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [79 x i8], align 1
@cxsize = external dso_local local_unnamed_addr global double, align 8
@cysize = external dso_local local_unnamed_addr global double, align 8
@czsize = external dso_local local_unnamed_addr global double, align 8
@celllist = external dso_local local_unnamed_addr global [75 x [75 x [75 x ptr]]], align 16

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @initcelllist() local_unnamed_addr #1 {
  %1 = load double, ptr @xsize, align 8, !tbaa !5
  %2 = load double, ptr @ysize, align 8, !tbaa !5
  %3 = fadd double %2, -1.000000e-04
  %4 = fptosi double %3 to i32
  store i32 %4, ptr @cy, align 4, !tbaa !9
  %5 = load double, ptr @zsize, align 8, !tbaa !5
  %6 = load i32, ptr @N, align 4, !tbaa !9
  %7 = shl nsw i32 %6, 3
  %8 = insertelement <2 x double> poison, double %1, i64 0
  %9 = insertelement <2 x double> %8, double %5, i64 1
  %10 = fadd <2 x double> %9, <double -1.000000e-04, double -1.000000e-04>
  %11 = fptosi <2 x double> %10 to <2 x i32>
  %12 = extractelement <2 x i32> %11, i64 0
  store i32 %12, ptr @cx, align 4, !tbaa !9
  %13 = extractelement <2 x i32> %11, i64 1
  %14 = mul i32 %12, %13
  %15 = mul i32 %14, %4
  %16 = icmp sgt i32 %15, %7
  br i1 %16, label %.lr.ph, label %30

.lr.ph:                                           ; preds = %0, %.lr.ph
  %17 = phi i32 [ %22, %.lr.ph ], [ %4, %0 ]
  %18 = phi <2 x i32> [ %24, %.lr.ph ], [ %11, %0 ]
  %19 = sitofp <2 x i32> %18 to <2 x double>
  %20 = sitofp i32 %17 to double
  %21 = fmul double %20, 9.000000e-01
  %22 = fptosi double %21 to i32
  %23 = fmul <2 x double> %19, <double 9.000000e-01, double 9.000000e-01>
  %24 = fptosi <2 x double> %23 to <2 x i32>
  %25 = extractelement <2 x i32> %24, i64 0
  %26 = extractelement <2 x i32> %24, i64 1
  %27 = mul i32 %25, %26
  %28 = mul i32 %27, %22
  %29 = icmp sgt i32 %28, %7
  br i1 %29, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph
  store i32 %25, ptr @cx, align 4, !tbaa !9
  store i32 %22, ptr @cy, align 4, !tbaa !9
  br label %30

30:                                               ; preds = %._crit_edge, %0
  %.lcssa = phi i32 [ %22, %._crit_edge ], [ %4, %0 ]
  %31 = phi <2 x i32> [ %24, %._crit_edge ], [ %11, %0 ]
  %32 = extractelement <2 x i32> %31, i64 1
  store i32 %32, ptr @cz, align 4, !tbaa !9
  %33 = extractelement <2 x i32> %31, i64 0
  %34 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22, i32 noundef %33, i32 noundef %.lcssa, i32 noundef %32)
  %35 = load i32, ptr @cx, align 4, !tbaa !9
  %36 = icmp slt i32 %35, 76
  br i1 %36, label %38, label %37

37:                                               ; preds = %30
  store i32 75, ptr @cx, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %37, %30
  %39 = phi i32 [ 75, %37 ], [ %35, %30 ]
  %40 = load i32, ptr @cy, align 4, !tbaa !9
  %41 = icmp sgt i32 %40, 75
  br i1 %41, label %.thread57, label %42

42:                                               ; preds = %38
  %43 = load i32, ptr @cz, align 4, !tbaa !9
  %44 = icmp sgt i32 %43, 75
  br i1 %44, label %.thread, label %48

.thread57:                                        ; preds = %38
  store i32 75, ptr @cy, align 4, !tbaa !9
  %45 = load i32, ptr @cz, align 4, !tbaa !9
  %46 = icmp sgt i32 %45, 75
  br i1 %46, label %.thread, label %.thread60

.thread:                                          ; preds = %.thread57, %42
  %47 = phi i32 [ 75, %.thread57 ], [ %40, %42 ]
  store i32 75, ptr @cz, align 4, !tbaa !9
  br label %.thread60

48:                                               ; preds = %42
  br i1 %36, label %52, label %.thread60

.thread60:                                        ; preds = %.thread57, %.thread, %48
  %49 = phi i32 [ %47, %.thread ], [ %40, %48 ], [ 75, %.thread57 ]
  %50 = phi i32 [ 75, %.thread ], [ %43, %48 ], [ %45, %.thread57 ]
  %51 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.23, i32 noundef %39, i32 noundef %49, i32 noundef %50)
  %.pre = load i32, ptr @cx, align 4, !tbaa !9
  %.pre55 = load i32, ptr @cy, align 4, !tbaa !9
  %.pre56 = load i32, ptr @cz, align 4, !tbaa !9
  br label %52

52:                                               ; preds = %.thread60, %48
  %53 = phi i32 [ %.pre56, %.thread60 ], [ %43, %48 ]
  %54 = phi i32 [ %.pre55, %.thread60 ], [ %40, %48 ]
  %55 = phi i32 [ %.pre, %.thread60 ], [ %39, %48 ]
  %56 = load double, ptr @xsize, align 8, !tbaa !5
  %57 = sitofp i32 %55 to double
  %58 = fdiv double %56, %57
  store double %58, ptr @cxsize, align 8, !tbaa !5
  %59 = load double, ptr @ysize, align 8, !tbaa !5
  %60 = sitofp i32 %54 to double
  %61 = fdiv double %59, %60
  store double %61, ptr @cysize, align 8, !tbaa !5
  %62 = load double, ptr @zsize, align 8, !tbaa !5
  %63 = sitofp i32 %53 to double
  %64 = fdiv double %62, %63
  store double %64, ptr @czsize, align 8, !tbaa !5
  %65 = icmp sgt i32 %55, 0
  %66 = icmp sgt i32 %54, 0
  %or.cond = select i1 %65, i1 %66, i1 false
  %67 = icmp sgt i32 %53, 0
  %or.cond65 = select i1 %or.cond, i1 %67, i1 false
  br i1 %or.cond65, label %.preheader20.us.us.preheader, label %.preheader

.preheader20.us.us.preheader:                     ; preds = %52
  %68 = zext nneg i32 %53 to i64
  %69 = shl nuw nsw i64 %68, 3
  %wide.trip.count52 = zext nneg i32 %55 to i64
  %wide.trip.count = zext nneg i32 %54 to i64
  %xtraiter = and i64 %wide.trip.count, 7
  %70 = icmp ult i32 %54, 8
  %unroll_iter = and i64 %wide.trip.count, 2147483640
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader20.us.us

.preheader20.us.us:                               ; preds = %.preheader20.us.us.preheader, %._crit_edge34.split.us.us.us
  %indvar = phi i64 [ 0, %.preheader20.us.us.preheader ], [ %indvar.next, %._crit_edge34.split.us.us.us ]
  %71 = mul nuw nsw i64 %indvar, 45000
  %72 = getelementptr i8, ptr @celllist, i64 %71
  br i1 %70, label %._crit_edge34.split.us.us.us.unr-lcssa, label %.preheader20.us.us.new

.preheader20.us.us.new:                           ; preds = %.preheader20.us.us
  %invariant.gep = getelementptr i8, ptr %72, i64 600
  %invariant.gep74 = getelementptr i8, ptr %72, i64 1200
  %invariant.gep76 = getelementptr i8, ptr %72, i64 1800
  %invariant.gep78 = getelementptr i8, ptr %72, i64 2400
  %invariant.gep80 = getelementptr i8, ptr %72, i64 3000
  %invariant.gep82 = getelementptr i8, ptr %72, i64 3600
  %invariant.gep84 = getelementptr i8, ptr %72, i64 4200
  br label %.preheader19.us.us.us

.preheader19.us.us.us:                            ; preds = %.preheader19.us.us.us, %.preheader20.us.us.new
  %indvar47 = phi i64 [ 0, %.preheader20.us.us.new ], [ %indvar.next48.7, %.preheader19.us.us.us ]
  %niter = phi i64 [ 0, %.preheader20.us.us.new ], [ %niter.next.7, %.preheader19.us.us.us ]
  %73 = mul nuw nsw i64 %indvar47, 600
  %scevgep = getelementptr i8, ptr %72, i64 %73
  tail call void @llvm.memset.p0.i64(ptr align 8 %scevgep, i8 0, i64 %69, i1 false), !tbaa !13
  %74 = mul nuw i64 %indvar47, 600
  %gep = getelementptr i8, ptr %invariant.gep, i64 %74
  tail call void @llvm.memset.p0.i64(ptr align 8 %gep, i8 0, i64 %69, i1 false), !tbaa !13
  %75 = mul nuw i64 %indvar47, 600
  %gep75 = getelementptr i8, ptr %invariant.gep74, i64 %75
  tail call void @llvm.memset.p0.i64(ptr align 8 %gep75, i8 0, i64 %69, i1 false), !tbaa !13
  %76 = mul nuw i64 %indvar47, 600
  %gep77 = getelementptr i8, ptr %invariant.gep76, i64 %76
  tail call void @llvm.memset.p0.i64(ptr align 8 %gep77, i8 0, i64 %69, i1 false), !tbaa !13
  %77 = mul nuw i64 %indvar47, 600
  %gep79 = getelementptr i8, ptr %invariant.gep78, i64 %77
  tail call void @llvm.memset.p0.i64(ptr align 8 %gep79, i8 0, i64 %69, i1 false), !tbaa !13
  %78 = mul nuw i64 %indvar47, 600
  %gep81 = getelementptr i8, ptr %invariant.gep80, i64 %78
  tail call void @llvm.memset.p0.i64(ptr align 8 %gep81, i8 0, i64 %69, i1 false), !tbaa !13
  %79 = mul nuw i64 %indvar47, 600
  %gep83 = getelementptr i8, ptr %invariant.gep82, i64 %79
  tail call void @llvm.memset.p0.i64(ptr align 8 %gep83, i8 0, i64 %69, i1 false), !tbaa !13
  %80 = mul nuw i64 %indvar47, 600
  %gep85 = getelementptr i8, ptr %invariant.gep84, i64 %80
  tail call void @llvm.memset.p0.i64(ptr align 8 %gep85, i8 0, i64 %69, i1 false), !tbaa !13
  %indvar.next48.7 = add nuw nsw i64 %indvar47, 8
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %._crit_edge34.split.us.us.us.unr-lcssa, label %.preheader19.us.us.us, !llvm.loop !15

._crit_edge34.split.us.us.us.unr-lcssa:           ; preds = %.preheader19.us.us.us, %.preheader20.us.us
  %indvar47.unr = phi i64 [ 0, %.preheader20.us.us ], [ %indvar.next48.7, %.preheader19.us.us.us ]
  br i1 %lcmp.mod.not, label %._crit_edge34.split.us.us.us, label %.preheader19.us.us.us.epil

.preheader19.us.us.us.epil:                       ; preds = %._crit_edge34.split.us.us.us.unr-lcssa, %.preheader19.us.us.us.epil
  %indvar47.epil = phi i64 [ %indvar.next48.epil, %.preheader19.us.us.us.epil ], [ %indvar47.unr, %._crit_edge34.split.us.us.us.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.preheader19.us.us.us.epil ], [ 0, %._crit_edge34.split.us.us.us.unr-lcssa ]
  %81 = mul nuw nsw i64 %indvar47.epil, 600
  %scevgep.epil = getelementptr i8, ptr %72, i64 %81
  tail call void @llvm.memset.p0.i64(ptr align 8 %scevgep.epil, i8 0, i64 %69, i1 false), !tbaa !13
  %indvar.next48.epil = add nuw nsw i64 %indvar47.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge34.split.us.us.us, label %.preheader19.us.us.us.epil, !llvm.loop !16

._crit_edge34.split.us.us.us:                     ; preds = %.preheader19.us.us.us.epil, %._crit_edge34.split.us.us.us.unr-lcssa
  %indvar.next = add nuw nsw i64 %indvar, 1
  %exitcond53.not = icmp eq i64 %indvar.next, %wide.trip.count52
  br i1 %exitcond53.not, label %.preheader, label %.preheader20.us.us, !llvm.loop !18

.preheader:                                       ; preds = %._crit_edge34.split.us.us.us, %52
  %82 = load i32, ptr @N, align 4, !tbaa !9
  %83 = icmp sgt i32 %82, 0
  br i1 %83, label %.lr.ph41, label %._crit_edge42

.lr.ph41:                                         ; preds = %.preheader, %.lr.ph41
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph41 ], [ 0, %.preheader ]
  %84 = load ptr, ptr @particles, align 8, !tbaa !13
  %85 = getelementptr inbounds %struct.sparticle, ptr %84, i64 %indvars.iv
  tail call void @addtocelllist(ptr noundef %85)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %86 = load i32, ptr @N, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = icmp slt i64 %indvars.iv.next, %87
  br i1 %88, label %.lr.ph41, label %._crit_edge42, !llvm.loop !19

._crit_edge42:                                    ; preds = %.lr.ph41, %.preheader
  ret void
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

attributes #0 = { nofree 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 #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 nounwind willreturn memory(argmem: write) }

!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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.unroll.disable"}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass