; LLVM IR from csviragh/robotsim :: src/utilities (arenas)

; 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.phase_t = type { ptr, ptr, ptr, ptr, i32, i32 }
%struct.arena_t = type { i32, [32 x i8], [128 x [3 x double]], i32 }

@Shill_Wall_LinSqrt.ArenaCenter = external hidden global [3 x double], align 16
@Shill_Wall_LinSqrt.ToCenter = external hidden global [3 x double], align 16
@Shill_Wall_LinSqrt.ToArena = external hidden global [3 x double], align 16
@Shill_Wall_LinSqrt.VelDiff = external hidden global double, align 8
@Shill_Wall_LinSqrt.DistFromWall = external hidden global double, align 8
@Shill_Wall_LinSqrt.MaxVelDiff = external hidden 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

declare void @VectDifference(ptr noundef, ptr noundef, ptr noundef) #1

declare void @UnitVect(ptr noundef, ptr noundef) #1

declare void @MultiplicateWithScalar(ptr noundef, ptr noundef, double noundef, i32 noundef) #1

declare void @VectSum(ptr noundef, ptr noundef, ptr noundef) #1

declare void @FillVect(ptr noundef, double noundef, double noundef, double noundef) #1

declare void @NullVect(ptr noundef, i32 noundef) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #2

declare double @VectAbs(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @Shill_Wall_LinSqrt(ptr noundef %0, ptr noundef %1, double noundef %2, double noundef %3, double noundef %4, ptr noundef %5, double noundef %6, double noundef %7, double noundef %8, double noundef %9, i32 noundef %10, i32 noundef %11) #3 {
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca ptr, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  store ptr %0, ptr %13, align 8, !tbaa !5
  store ptr %1, ptr %14, align 8, !tbaa !5
  store double %2, ptr %15, align 8, !tbaa !9
  store double %3, ptr %16, align 8, !tbaa !9
  store double %4, ptr %17, align 8, !tbaa !9
  store ptr %5, ptr %18, align 8, !tbaa !5
  store double %6, ptr %19, align 8, !tbaa !9
  store double %7, ptr %20, align 8, !tbaa !9
  store double %8, ptr %21, align 8, !tbaa !9
  store double %9, ptr %22, align 8, !tbaa !9
  store i32 %10, ptr %23, align 4, !tbaa !11
  store i32 %11, ptr %24, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  %28 = load ptr, ptr %14, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.phase_t, ptr %28, i32 0, i32 0
  %30 = load ptr, ptr %29, align 8, !tbaa !13
  %31 = load i32, ptr %23, align 4, !tbaa !11
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds ptr, ptr %30, i64 %32
  %34 = load ptr, ptr %33, align 8, !tbaa !5
  store ptr %34, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  %35 = load ptr, ptr %14, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.phase_t, ptr %35, i32 0, i32 1
  %37 = load ptr, ptr %36, align 8, !tbaa !15
  %38 = load i32, ptr %23, align 4, !tbaa !11
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds ptr, ptr %37, i64 %39
  %41 = load ptr, ptr %40, align 8, !tbaa !5
  store ptr %41, ptr %27, align 8, !tbaa !5
  %42 = load double, ptr %15, align 8, !tbaa !9
  %43 = load double, ptr %16, align 8, !tbaa !9
  call void @FillVect(ptr noundef @Shill_Wall_LinSqrt.ArenaCenter, double noundef %42, double noundef %43, double noundef 0.000000e+00)
  %44 = load ptr, ptr %26, align 8, !tbaa !5
  call void @VectDifference(ptr noundef @Shill_Wall_LinSqrt.ToCenter, ptr noundef @Shill_Wall_LinSqrt.ArenaCenter, ptr noundef %44)
  %45 = load i32, ptr %24, align 4, !tbaa !11
  %46 = sitofp i32 %45 to double
  %47 = fcmp oeq double 2.000000e+00, %46
  br i1 %47, label %48, label %49

48:                                               ; preds = %12
  store double 0.000000e+00, ptr getelementptr inbounds ([3 x double], ptr @Shill_Wall_LinSqrt.ToCenter, i64 0, i64 2), align 16, !tbaa !9
  br label %49

49:                                               ; preds = %48, %12
  %50 = load ptr, ptr %18, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.arena_t, ptr %50, i32 0, i32 0
  %52 = load i32, ptr %51, align 8, !tbaa !16
  %53 = icmp eq i32 %52, 1
  br i1 %53, label %54, label %103

54:                                               ; preds = %49
  store i32 0, ptr %25, align 4, !tbaa !11
  br label %55

55:                                               ; preds = %99, %54
  %56 = load i32, ptr %25, align 4, !tbaa !11
  %57 = load i32, ptr %24, align 4, !tbaa !11
  %58 = icmp slt i32 %56, %57
  br i1 %58, label %59, label %102

59:                                               ; preds = %55
  %60 = load double, ptr %17, align 8, !tbaa !9
  %61 = load i32, ptr %25, align 4, !tbaa !11
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [3 x double], ptr @Shill_Wall_LinSqrt.ToCenter, i64 0, i64 %62
  %64 = load double, ptr %63, align 8, !tbaa !9
  %65 = call double @llvm.fabs.f64(double %64)
  %66 = fsub double %60, %65
  store double %66, ptr @Shill_Wall_LinSqrt.DistFromWall, align 8, !tbaa !9
  call void @NullVect(ptr noundef @Shill_Wall_LinSqrt.ToArena, i32 noundef 3)
  %67 = load i32, ptr %25, align 4, !tbaa !11
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [3 x double], ptr @Shill_Wall_LinSqrt.ToCenter, i64 0, i64 %68
  %70 = load double, ptr %69, align 8, !tbaa !9
  %71 = load i32, ptr %25, align 4, !tbaa !11
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [3 x double], ptr @Shill_Wall_LinSqrt.ToArena, i64 0, i64 %72
  store double %70, ptr %73, align 8, !tbaa !9
  call void @UnitVect(ptr noundef @Shill_Wall_LinSqrt.ToArena, ptr noundef @Shill_Wall_LinSqrt.ToArena)
  %74 = load double, ptr %19, align 8, !tbaa !9
  call void @MultiplicateWithScalar(ptr noundef @Shill_Wall_LinSqrt.ToArena, ptr noundef @Shill_Wall_LinSqrt.ToArena, double noundef %74, i32 noundef 3)
  %75 = load ptr, ptr %27, align 8, !tbaa !5
  call void @VectDifference(ptr noundef @Shill_Wall_LinSqrt.ToArena, ptr noundef @Shill_Wall_LinSqrt.ToArena, ptr noundef %75)
  %76 = load i32, ptr %24, align 4, !tbaa !11
  %77 = sitofp i32 %76 to double
  %78 = fcmp oeq double 2.000000e+00, %77
  br i1 %78, label %79, label %80

79:                                               ; preds = %59
  store double 0.000000e+00, ptr getelementptr inbounds ([3 x double], ptr @Shill_Wall_LinSqrt.ToArena, i64 0, i64 2), align 16, !tbaa !9
  br label %80

80:                                               ; preds = %79, %59
  %81 = call double @VectAbs(ptr noundef @Shill_Wall_LinSqrt.ToArena)
  store double %81, ptr @Shill_Wall_LinSqrt.VelDiff, align 8, !tbaa !9
  call void @UnitVect(ptr noundef @Shill_Wall_LinSqrt.ToArena, ptr noundef @Shill_Wall_LinSqrt.ToArena)
  %82 = load double, ptr @Shill_Wall_LinSqrt.DistFromWall, align 8, !tbaa !9
  %83 = load double, ptr %22, align 8, !tbaa !9
  %84 = load double, ptr %21, align 8, !tbaa !9
  %85 = load double, ptr @Shill_Wall_LinSqrt.VelDiff, align 8, !tbaa !9
  %86 = load double, ptr %20, align 8, !tbaa !9
  %87 = call double @VelDecayLinSqrt(double noundef %82, double noundef %83, double noundef %84, double noundef %85, double noundef %86)
  store double %87, ptr @Shill_Wall_LinSqrt.MaxVelDiff, align 8, !tbaa !9
  %88 = load double, ptr @Shill_Wall_LinSqrt.VelDiff, align 8, !tbaa !9
  %89 = load double, ptr @Shill_Wall_LinSqrt.MaxVelDiff, align 8, !tbaa !9
  %90 = fcmp ogt double %88, %89
  br i1 %90, label %91, label %98

91:                                               ; preds = %80
  %92 = load double, ptr @Shill_Wall_LinSqrt.VelDiff, align 8, !tbaa !9
  %93 = load double, ptr @Shill_Wall_LinSqrt.MaxVelDiff, align 8, !tbaa !9
  %94 = fsub double %92, %93
  %95 = load i32, ptr %24, align 4, !tbaa !11
  call void @MultiplicateWithScalar(ptr noundef @Shill_Wall_LinSqrt.ToArena, ptr noundef @Shill_Wall_LinSqrt.ToArena, double noundef %94, i32 noundef %95)
  %96 = load ptr, ptr %13, align 8, !tbaa !5
  %97 = load ptr, ptr %13, align 8, !tbaa !5
  call void @VectSum(ptr noundef %96, ptr noundef %97, ptr noundef @Shill_Wall_LinSqrt.ToArena)
  br label %98

98:                                               ; preds = %91, %80
  br label %99

99:                                               ; preds = %98
  %100 = load i32, ptr %25, align 4, !tbaa !11
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %25, align 4, !tbaa !11
  br label %55, !llvm.loop !18

102:                                              ; preds = %55
  br label %140

103:                                              ; preds = %49
  %104 = load ptr, ptr %18, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.arena_t, ptr %104, i32 0, i32 0
  %106 = load i32, ptr %105, align 8, !tbaa !16
  %107 = icmp eq i32 %106, 0
  br i1 %107, label %108, label %137

108:                                              ; preds = %103
  %109 = load double, ptr %17, align 8, !tbaa !9
  %110 = call double @VectAbs(ptr noundef @Shill_Wall_LinSqrt.ToCenter)
  %111 = fsub double %109, %110
  store double %111, ptr @Shill_Wall_LinSqrt.DistFromWall, align 8, !tbaa !9
  call void @UnitVect(ptr noundef @Shill_Wall_LinSqrt.ToArena, ptr noundef @Shill_Wall_LinSqrt.ToCenter)
  %112 = load double, ptr %19, align 8, !tbaa !9
  call void @MultiplicateWithScalar(ptr noundef @Shill_Wall_LinSqrt.ToArena, ptr noundef @Shill_Wall_LinSqrt.ToArena, double noundef %112, i32 noundef 3)
  %113 = load ptr, ptr %27, align 8, !tbaa !5
  call void @VectDifference(ptr noundef @Shill_Wall_LinSqrt.ToArena, ptr noundef @Shill_Wall_LinSqrt.ToArena, ptr noundef %113)
  %114 = load i32, ptr %24, align 4, !tbaa !11
  %115 = sitofp i32 %114 to double
  %116 = fcmp oeq double 2.000000e+00, %115
  br i1 %116, label %117, label %118

117:                                              ; preds = %108
  store double 0.000000e+00, ptr getelementptr inbounds ([3 x double], ptr @Shill_Wall_LinSqrt.ToArena, i64 0, i64 2), align 16, !tbaa !9
  br label %118

118:                                              ; preds = %117, %108
  %119 = call double @VectAbs(ptr noundef @Shill_Wall_LinSqrt.ToArena)
  store double %119, ptr @Shill_Wall_LinSqrt.VelDiff, align 8, !tbaa !9
  call void @UnitVect(ptr noundef @Shill_Wall_LinSqrt.ToArena, ptr noundef @Shill_Wall_LinSqrt.ToArena)
  %120 = load double, ptr @Shill_Wall_LinSqrt.DistFromWall, align 8, !tbaa !9
  %121 = load double, ptr %22, align 8, !tbaa !9
  %122 = load double, ptr %21, align 8, !tbaa !9
  %123 = load double, ptr @Shill_Wall_LinSqrt.VelDiff, align 8, !tbaa !9
  %124 = load double, ptr %20, align 8, !tbaa !9
  %125 = call double @VelDecayLinSqrt(double noundef %120, double noundef %121, double noundef %122, double noundef %123, double noundef %124)
  store double %125, ptr @Shill_Wall_LinSqrt.MaxVelDiff, align 8, !tbaa !9
  %126 = load double, ptr @Shill_Wall_LinSqrt.VelDiff, align 8, !tbaa !9
  %127 = load double, ptr @Shill_Wall_LinSqrt.MaxVelDiff, align 8, !tbaa !9
  %128 = fcmp ogt double %126, %127
  br i1 %128, label %129, label %136

129:                                              ; preds = %118
  %130 = load double, ptr @Shill_Wall_LinSqrt.VelDiff, align 8, !tbaa !9
  %131 = load double, ptr @Shill_Wall_LinSqrt.MaxVelDiff, align 8, !tbaa !9
  %132 = fsub double %130, %131
  %133 = load i32, ptr %24, align 4, !tbaa !11
  call void @MultiplicateWithScalar(ptr noundef @Shill_Wall_LinSqrt.ToArena, ptr noundef @Shill_Wall_LinSqrt.ToArena, double noundef %132, i32 noundef %133)
  %134 = load ptr, ptr %13, align 8, !tbaa !5
  %135 = load ptr, ptr %13, align 8, !tbaa !5
  call void @VectSum(ptr noundef %134, ptr noundef %135, ptr noundef @Shill_Wall_LinSqrt.ToArena)
  br label %136

136:                                              ; preds = %129, %118
  br label %139

137:                                              ; preds = %103
  %138 = load ptr, ptr %13, align 8, !tbaa !5
  call void @NullVect(ptr noundef %138, i32 noundef 3)
  br label %139

139:                                              ; preds = %137, %136
  br label %140

140:                                              ; preds = %139, %102
  %141 = load i32, ptr %24, align 4, !tbaa !11
  %142 = sitofp i32 %141 to double
  %143 = fcmp oeq double 2.000000e+00, %142
  br i1 %143, label %144, label %147

144:                                              ; preds = %140
  %145 = load ptr, ptr %13, align 8, !tbaa !5
  %146 = getelementptr inbounds double, ptr %145, i64 2
  store double 0.000000e+00, ptr %146, align 8, !tbaa !9
  br label %147

147:                                              ; preds = %144, %140
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  ret void
}

declare double @VelDecayLinSqrt(double noundef, double noundef, double noundef, double noundef, double noundef) #1

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !12, i64 32, !12, i64 36}
!15 = !{!14, !6, i64 8}
!16 = !{!17, !12, i64 0}
!17 = !{!"", !12, i64 0, !7, i64 4, !7, i64 40, !12, i64 3112}
!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"

@Shill_Wall_LinSqrt.ArenaCenter = external hidden global [3 x double], align 16
@Shill_Wall_LinSqrt.ToCenter = external hidden global [3 x double], align 16
@Shill_Wall_LinSqrt.ToArena = external hidden global [3 x double], align 16
@Shill_Wall_LinSqrt.VelDiff = external hidden local_unnamed_addr global double, align 8
@Shill_Wall_LinSqrt.DistFromWall = external hidden local_unnamed_addr global double, align 8
@Shill_Wall_LinSqrt.MaxVelDiff = external hidden local_unnamed_addr global double, align 8

declare void @VectDifference(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @UnitVect(ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @MultiplicateWithScalar(ptr noundef, ptr noundef, double noundef, i32 noundef) local_unnamed_addr #0

declare void @VectSum(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @FillVect(ptr noundef, double noundef, double noundef, double noundef) local_unnamed_addr #0

declare void @NullVect(ptr noundef, i32 noundef) local_unnamed_addr #0

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

declare double @VectAbs(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @Shill_Wall_LinSqrt(ptr noundef %0, ptr nocapture noundef readonly %1, double noundef %2, double noundef %3, double noundef %4, ptr nocapture noundef readonly %5, double noundef %6, double noundef %7, double noundef %8, double noundef %9, i32 noundef %10, i32 noundef %11) local_unnamed_addr #2 {
  %13 = load ptr, ptr %1, align 8, !tbaa !5
  %14 = sext i32 %10 to i64
  %15 = getelementptr inbounds ptr, ptr %13, i64 %14
  %16 = load ptr, ptr %15, align 8, !tbaa !11
  %17 = getelementptr inbounds i8, ptr %1, i64 8
  %18 = load ptr, ptr %17, align 8, !tbaa !12
  %19 = getelementptr inbounds ptr, ptr %18, i64 %14
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  tail call void @FillVect(ptr noundef nonnull @Shill_Wall_LinSqrt.ArenaCenter, double noundef %2, double noundef %3, double noundef 0.000000e+00) #3
  tail call void @VectDifference(ptr noundef nonnull @Shill_Wall_LinSqrt.ToCenter, ptr noundef nonnull @Shill_Wall_LinSqrt.ArenaCenter, ptr noundef %16) #3
  %21 = icmp eq i32 %11, 2
  br i1 %21, label %22, label %23

22:                                               ; preds = %12
  store double 0.000000e+00, ptr getelementptr inbounds (i8, ptr @Shill_Wall_LinSqrt.ToCenter, i64 16), align 16, !tbaa !13
  br label %23

23:                                               ; preds = %22, %12
  %24 = load i32, ptr %5, align 8, !tbaa !15
  switch i32 %24, label %56 [
    i32 1, label %.preheader
    i32 0, label %43
  ]

.preheader:                                       ; preds = %23
  %25 = icmp sgt i32 %11, 0
  br i1 %25, label %.lr.ph.preheader, label %.loopexit.thread

.lr.ph.preheader:                                 ; preds = %.preheader
  %wide.trip.count = zext nneg i32 %11 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %42
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %42 ]
  %26 = getelementptr inbounds [3 x double], ptr @Shill_Wall_LinSqrt.ToCenter, i64 0, i64 %indvars.iv
  %27 = load double, ptr %26, align 8, !tbaa !13
  %28 = tail call double @llvm.fabs.f64(double %27)
  %29 = fsub double %4, %28
  store double %29, ptr @Shill_Wall_LinSqrt.DistFromWall, align 8, !tbaa !13
  tail call void @NullVect(ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena, i32 noundef 3) #3
  %30 = load double, ptr %26, align 8, !tbaa !13
  %31 = getelementptr inbounds [3 x double], ptr @Shill_Wall_LinSqrt.ToArena, i64 0, i64 %indvars.iv
  store double %30, ptr %31, align 8, !tbaa !13
  tail call void @UnitVect(ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena, ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena) #3
  tail call void @MultiplicateWithScalar(ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena, ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena, double noundef %6, i32 noundef 3) #3
  tail call void @VectDifference(ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena, ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena, ptr noundef %20) #3
  br i1 %21, label %32, label %33

32:                                               ; preds = %.lr.ph
  store double 0.000000e+00, ptr getelementptr inbounds (i8, ptr @Shill_Wall_LinSqrt.ToArena, i64 16), align 16, !tbaa !13
  br label %33

33:                                               ; preds = %32, %.lr.ph
  %34 = tail call double @VectAbs(ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena) #3
  store double %34, ptr @Shill_Wall_LinSqrt.VelDiff, align 8, !tbaa !13
  tail call void @UnitVect(ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena, ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena) #3
  %35 = load double, ptr @Shill_Wall_LinSqrt.DistFromWall, align 8, !tbaa !13
  %36 = load double, ptr @Shill_Wall_LinSqrt.VelDiff, align 8, !tbaa !13
  %37 = tail call double @VelDecayLinSqrt(double noundef %35, double noundef %9, double noundef %8, double noundef %36, double noundef %7) #3
  store double %37, ptr @Shill_Wall_LinSqrt.MaxVelDiff, align 8, !tbaa !13
  %38 = load double, ptr @Shill_Wall_LinSqrt.VelDiff, align 8, !tbaa !13
  %39 = fcmp ogt double %38, %37
  br i1 %39, label %40, label %42

40:                                               ; preds = %33
  %41 = fsub double %38, %37
  tail call void @MultiplicateWithScalar(ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena, ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena, double noundef %41, i32 noundef %11) #3
  tail call void @VectSum(ptr noundef %0, ptr noundef %0, ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena) #3
  br label %42

42:                                               ; preds = %33, %40
  %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 %.loopexit, label %.lr.ph, !llvm.loop !17

43:                                               ; preds = %23
  %44 = tail call double @VectAbs(ptr noundef nonnull @Shill_Wall_LinSqrt.ToCenter) #3
  %45 = fsub double %4, %44
  store double %45, ptr @Shill_Wall_LinSqrt.DistFromWall, align 8, !tbaa !13
  tail call void @UnitVect(ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena, ptr noundef nonnull @Shill_Wall_LinSqrt.ToCenter) #3
  tail call void @MultiplicateWithScalar(ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena, ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena, double noundef %6, i32 noundef 3) #3
  tail call void @VectDifference(ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena, ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena, ptr noundef %20) #3
  br i1 %21, label %46, label %47

46:                                               ; preds = %43
  store double 0.000000e+00, ptr getelementptr inbounds (i8, ptr @Shill_Wall_LinSqrt.ToArena, i64 16), align 16, !tbaa !13
  br label %47

47:                                               ; preds = %46, %43
  %48 = tail call double @VectAbs(ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena) #3
  store double %48, ptr @Shill_Wall_LinSqrt.VelDiff, align 8, !tbaa !13
  tail call void @UnitVect(ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena, ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena) #3
  %49 = load double, ptr @Shill_Wall_LinSqrt.DistFromWall, align 8, !tbaa !13
  %50 = load double, ptr @Shill_Wall_LinSqrt.VelDiff, align 8, !tbaa !13
  %51 = tail call double @VelDecayLinSqrt(double noundef %49, double noundef %9, double noundef %8, double noundef %50, double noundef %7) #3
  store double %51, ptr @Shill_Wall_LinSqrt.MaxVelDiff, align 8, !tbaa !13
  %52 = load double, ptr @Shill_Wall_LinSqrt.VelDiff, align 8, !tbaa !13
  %53 = fcmp ogt double %52, %51
  br i1 %53, label %54, label %.loopexit

54:                                               ; preds = %47
  %55 = fsub double %52, %51
  tail call void @MultiplicateWithScalar(ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena, ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena, double noundef %55, i32 noundef %11) #3
  tail call void @VectSum(ptr noundef %0, ptr noundef %0, ptr noundef nonnull @Shill_Wall_LinSqrt.ToArena) #3
  br label %.loopexit

56:                                               ; preds = %23
  tail call void @NullVect(ptr noundef %0, i32 noundef 3) #3
  br label %.loopexit

.loopexit:                                        ; preds = %42, %56, %54, %47
  br i1 %21, label %57, label %.loopexit.thread

57:                                               ; preds = %.loopexit
  %58 = getelementptr inbounds i8, ptr %0, i64 16
  store double 0.000000e+00, ptr %58, align 8, !tbaa !13
  br label %.loopexit.thread

.loopexit.thread:                                 ; preds = %.preheader, %57, %.loopexit
  ret void
}

declare double @VelDecayLinSqrt(double noundef, double noundef, double noundef, double noundef, double noundef) local_unnamed_addr #0

attributes #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 #1 = { mustprogress 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, !7, i64 0}
!6 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !10, i64 36}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!6, !7, i64 8}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !8, i64 0}
!15 = !{!16, !10, i64 0}
!16 = !{!"", !10, i64 0, !8, i64 4, !8, i64 40, !10, i64 3112}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass