; LLVM IR from csviragh/robotsim :: src (sensors)

; 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.unit_model_params_t = type { %struct.unit_param_double_t, %struct.unit_param_double_t, %struct.unit_param_double_t, %struct.unit_param_double_t, %struct.unit_param_double_t, %struct.unit_param_double_t, %struct.unit_param_double_t, %struct.unit_param_double_t, %struct.unit_param_double_t, %struct.unit_param_double_t, %struct.unit_param_double_t, %struct.unit_param_double_t, %struct.unit_param_double_t, %struct.unit_param_double_t, %struct.unit_param_double_t, %struct.unit_param_double_t, [512 x i8] }
%struct.unit_param_double_t = type { [64 x i8], [10 x i8], double }

@StepGPSNoises.GPSPosition = external hidden global [3 x double], align 16
@StepGPSNoises.GPSVelocity = external hidden global [3 x double], align 16
@StepGPSNoises.GPSNoiseToAdd = external hidden global [3 x double], align 16
@StepGPSNoises.Force = external hidden global [3 x double], align 16
@StepGPSNoises.Damping = external hidden global [3 x double], align 16
@Noises = external dso_local global ptr, align 8
@StepGPSNoises.lambda_GPS_XY = external hidden global double, align 8
@StepGPSNoises.lambda_GPS_Z = 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

; Function Attrs: nounwind uwtable
define dso_local void @StepGPSNoises(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @NullVect(ptr noundef @StepGPSNoises.GPSPosition, i32 noundef 3)
  call void @NullVect(ptr noundef @StepGPSNoises.GPSVelocity, i32 noundef 3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %8

8:                                                ; preds = %123, %2
  %9 = load i32, ptr %5, align 4, !tbaa !9
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.phase_t, ptr %10, i32 0, i32 5
  %12 = load i32, ptr %11, align 4, !tbaa !11
  %13 = icmp slt i32 %9, %12
  br i1 %13, label %14, label %126

14:                                               ; preds = %8
  %15 = load ptr, ptr @Noises, align 8, !tbaa !5
  %16 = load i32, ptr %5, align 4, !tbaa !9
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds i8, ptr %15, i64 %17
  %19 = load i8, ptr %18, align 1, !tbaa !13, !range !15, !noundef !16
  %20 = trunc i8 %19 to i1
  %21 = zext i1 %20 to i32
  %22 = icmp eq i32 %21, 0
  br i1 %22, label %23, label %24

23:                                               ; preds = %14
  br label %123

24:                                               ; preds = %14
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = load i32, ptr %5, align 4, !tbaa !9
  call void @GetAgentsCoordinates(ptr noundef @StepGPSNoises.GPSPosition, ptr noundef %25, i32 noundef %26)
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = load i32, ptr %5, align 4, !tbaa !9
  call void @GetAgentsVelocity(ptr noundef @StepGPSNoises.GPSVelocity, ptr noundef %27, i32 noundef %28)
  call void @NullVect(ptr noundef @StepGPSNoises.GPSNoiseToAdd, i32 noundef 3)
  %29 = call double @randomizeGaussDouble(double noundef 0.000000e+00, double noundef 1.000000e+00)
  store double %29, ptr @StepGPSNoises.GPSNoiseToAdd, align 16, !tbaa !17
  %30 = call double @randomizeGaussDouble(double noundef 0.000000e+00, double noundef 1.000000e+00)
  store double %30, ptr getelementptr inbounds ([3 x double], ptr @StepGPSNoises.GPSNoiseToAdd, i64 0, i64 1), align 8, !tbaa !17
  %31 = call double @randomizeGaussDouble(double noundef 0.000000e+00, double noundef 1.000000e+00)
  store double %31, ptr getelementptr inbounds ([3 x double], ptr @StepGPSNoises.GPSNoiseToAdd, i64 0, i64 2), align 16, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %32 = load double, ptr @StepGPSNoises.lambda_GPS_XY, align 8, !tbaa !17
  %33 = fmul double 2.000000e+00, %32
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.unit_model_params_t, ptr %34, i32 0, i32 8
  %36 = getelementptr inbounds %struct.unit_param_double_t, ptr %35, i32 0, i32 2
  %37 = load double, ptr %36, align 8, !tbaa !19
  %38 = fmul double %33, %37
  %39 = call double @sqrt(double noundef %38) #5
  %40 = fdiv double %39, 3.000000e+02
  store double %40, ptr %6, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %41 = load double, ptr @StepGPSNoises.lambda_GPS_Z, align 8, !tbaa !17
  %42 = fmul double 2.000000e+00, %41
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.unit_model_params_t, ptr %43, i32 0, i32 10
  %45 = getelementptr inbounds %struct.unit_param_double_t, ptr %44, i32 0, i32 2
  %46 = load double, ptr %45, align 8, !tbaa !22
  %47 = fmul double %42, %46
  %48 = call double @sqrt(double noundef %47) #5
  %49 = fdiv double %48, 3.000000e+02
  store double %49, ptr %7, align 8, !tbaa !17
  call void @NullVect(ptr noundef @StepGPSNoises.Force, i32 noundef 3)
  call void @VectSum(ptr noundef @StepGPSNoises.Force, ptr noundef @StepGPSNoises.Force, ptr noundef @StepGPSNoises.GPSPosition)
  call void @UnitVect(ptr noundef @StepGPSNoises.Force, ptr noundef @StepGPSNoises.Force)
  %50 = load double, ptr %6, align 8, !tbaa !17
  %51 = fneg double %50
  %52 = call double @VectAbsXY(ptr noundef @StepGPSNoises.GPSPosition)
  %53 = fmul double %51, %52
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.unit_model_params_t, ptr %54, i32 0, i32 3
  %56 = getelementptr inbounds %struct.unit_param_double_t, ptr %55, i32 0, i32 2
  %57 = load double, ptr %56, align 8, !tbaa !23
  %58 = fmul double %53, %57
  call void @MultiplicateWithScalar(ptr noundef @StepGPSNoises.Force, ptr noundef @StepGPSNoises.Force, double noundef %58, i32 noundef 2)
  %59 = load double, ptr %7, align 8, !tbaa !17
  %60 = fneg double %59
  %61 = load double, ptr getelementptr inbounds ([3 x double], ptr @StepGPSNoises.GPSPosition, i64 0, i64 2), align 16, !tbaa !17
  %62 = call double @llvm.fabs.f64(double %61)
  %63 = fmul double %60, %62
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.unit_model_params_t, ptr %64, i32 0, i32 3
  %66 = getelementptr inbounds %struct.unit_param_double_t, ptr %65, i32 0, i32 2
  %67 = load double, ptr %66, align 8, !tbaa !23
  %68 = fmul double %63, %67
  %69 = load double, ptr getelementptr inbounds ([3 x double], ptr @StepGPSNoises.Force, i64 0, i64 2), align 16, !tbaa !17
  %70 = fmul double %69, %68
  store double %70, ptr getelementptr inbounds ([3 x double], ptr @StepGPSNoises.Force, i64 0, i64 2), align 16, !tbaa !17
  call void @NullVect(ptr noundef @StepGPSNoises.Damping, i32 noundef 3)
  call void @VectSum(ptr noundef @StepGPSNoises.Damping, ptr noundef @StepGPSNoises.Damping, ptr noundef @StepGPSNoises.GPSVelocity)
  %71 = load double, ptr @StepGPSNoises.lambda_GPS_XY, align 8, !tbaa !17
  %72 = fneg double %71
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.unit_model_params_t, ptr %73, i32 0, i32 3
  %75 = getelementptr inbounds %struct.unit_param_double_t, ptr %74, i32 0, i32 2
  %76 = load double, ptr %75, align 8, !tbaa !23
  %77 = fmul double %72, %76
  call void @MultiplicateWithScalar(ptr noundef @StepGPSNoises.Damping, ptr noundef @StepGPSNoises.Damping, double noundef %77, i32 noundef 2)
  %78 = load double, ptr @StepGPSNoises.lambda_GPS_Z, align 8, !tbaa !17
  %79 = fneg double %78
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.unit_model_params_t, ptr %80, i32 0, i32 3
  %82 = getelementptr inbounds %struct.unit_param_double_t, ptr %81, i32 0, i32 2
  %83 = load double, ptr %82, align 8, !tbaa !23
  %84 = fmul double %79, %83
  %85 = load double, ptr getelementptr inbounds ([3 x double], ptr @StepGPSNoises.Damping, i64 0, i64 2), align 16, !tbaa !17
  %86 = fmul double %85, %84
  store double %86, ptr getelementptr inbounds ([3 x double], ptr @StepGPSNoises.Damping, i64 0, i64 2), align 16, !tbaa !17
  %87 = load double, ptr @StepGPSNoises.lambda_GPS_XY, align 8, !tbaa !17
  %88 = fmul double 2.000000e+00, %87
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.unit_model_params_t, ptr %89, i32 0, i32 3
  %91 = getelementptr inbounds %struct.unit_param_double_t, ptr %90, i32 0, i32 2
  %92 = load double, ptr %91, align 8, !tbaa !23
  %93 = fmul double %88, %92
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.unit_model_params_t, ptr %94, i32 0, i32 8
  %96 = getelementptr inbounds %struct.unit_param_double_t, ptr %95, i32 0, i32 2
  %97 = load double, ptr %96, align 8, !tbaa !19
  %98 = fmul double %93, %97
  %99 = call double @sqrt(double noundef %98) #5
  call void @MultiplicateWithScalar(ptr noundef @StepGPSNoises.GPSNoiseToAdd, ptr noundef @StepGPSNoises.GPSNoiseToAdd, double noundef %99, i32 noundef 2)
  %100 = load double, ptr @StepGPSNoises.lambda_GPS_Z, align 8, !tbaa !17
  %101 = fmul double 2.000000e+00, %100
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.unit_model_params_t, ptr %102, i32 0, i32 3
  %104 = getelementptr inbounds %struct.unit_param_double_t, ptr %103, i32 0, i32 2
  %105 = load double, ptr %104, align 8, !tbaa !23
  %106 = fmul double %101, %105
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.unit_model_params_t, ptr %107, i32 0, i32 10
  %109 = getelementptr inbounds %struct.unit_param_double_t, ptr %108, i32 0, i32 2
  %110 = load double, ptr %109, align 8, !tbaa !22
  %111 = fmul double %106, %110
  %112 = call double @sqrt(double noundef %111) #5
  %113 = load double, ptr getelementptr inbounds ([3 x double], ptr @StepGPSNoises.GPSNoiseToAdd, i64 0, i64 2), align 16, !tbaa !17
  %114 = fmul double %113, %112
  store double %114, ptr getelementptr inbounds ([3 x double], ptr @StepGPSNoises.GPSNoiseToAdd, i64 0, i64 2), align 16, !tbaa !17
  call void @VectSum(ptr noundef @StepGPSNoises.GPSNoiseToAdd, ptr noundef @StepGPSNoises.GPSVelocity, ptr noundef @StepGPSNoises.GPSNoiseToAdd)
  call void @VectSum(ptr noundef @StepGPSNoises.GPSNoiseToAdd, ptr noundef @StepGPSNoises.GPSNoiseToAdd, ptr noundef @StepGPSNoises.Force)
  call void @VectSum(ptr noundef @StepGPSNoises.GPSNoiseToAdd, ptr noundef @StepGPSNoises.GPSNoiseToAdd, ptr noundef @StepGPSNoises.Damping)
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = load i32, ptr %5, align 4, !tbaa !9
  call void @InsertAgentsVelocity(ptr noundef %115, ptr noundef @StepGPSNoises.GPSNoiseToAdd, i32 noundef %116)
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.unit_model_params_t, ptr %117, i32 0, i32 3
  %119 = getelementptr inbounds %struct.unit_param_double_t, ptr %118, i32 0, i32 2
  %120 = load double, ptr %119, align 8, !tbaa !23
  call void @MultiplicateWithScalar(ptr noundef @StepGPSNoises.GPSNoiseToAdd, ptr noundef @StepGPSNoises.GPSNoiseToAdd, double noundef %120, i32 noundef 3)
  call void @VectSum(ptr noundef @StepGPSNoises.GPSPosition, ptr noundef @StepGPSNoises.GPSPosition, ptr noundef @StepGPSNoises.GPSNoiseToAdd)
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = load i32, ptr %5, align 4, !tbaa !9
  call void @InsertAgentsCoordinates(ptr noundef %121, ptr noundef @StepGPSNoises.GPSPosition, i32 noundef %122)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %123

123:                                              ; preds = %24, %23
  %124 = load i32, ptr %5, align 4, !tbaa !9
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %5, align 4, !tbaa !9
  br label %8, !llvm.loop !24

126:                                              ; preds = %8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret void
}

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

declare void @GetAgentsCoordinates(ptr noundef, ptr noundef, i32 noundef) #2

declare void @GetAgentsVelocity(ptr noundef, ptr noundef, i32 noundef) #2

declare double @randomizeGaussDouble(double noundef, double noundef) #2

; Function Attrs: nounwind
declare double @sqrt(double noundef) #3

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

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

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

declare double @VectAbsXY(ptr noundef) #2

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

declare void @InsertAgentsVelocity(ptr noundef, ptr noundef, i32 noundef) #2

declare void @InsertAgentsCoordinates(ptr noundef, ptr noundef, i32 noundef) #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 36}
!12 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !10, i64 36}
!13 = !{!14, !14, i64 0}
!14 = !{!"_Bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = !{!20, !18, i64 784}
!20 = !{!"", !21, i64 0, !21, i64 88, !21, i64 176, !21, i64 264, !21, i64 352, !21, i64 440, !21, i64 528, !21, i64 616, !21, i64 704, !21, i64 792, !21, i64 880, !21, i64 968, !21, i64 1056, !21, i64 1144, !21, i64 1232, !21, i64 1320, !7, i64 1408}
!21 = !{!"", !7, i64 0, !7, i64 64, !18, i64 80}
!22 = !{!20, !18, i64 960}
!23 = !{!20, !18, i64 344}
!24 = distinct !{!24, !25}
!25 = !{!"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"

@StepGPSNoises.GPSPosition = external hidden global [3 x double], align 16
@StepGPSNoises.GPSVelocity = external hidden global [3 x double], align 16
@StepGPSNoises.GPSNoiseToAdd = external hidden global [3 x double], align 16
@StepGPSNoises.Force = external hidden global [3 x double], align 16
@StepGPSNoises.Damping = external hidden global [3 x double], align 16
@Noises = external dso_local local_unnamed_addr global ptr, align 8
@StepGPSNoises.lambda_GPS_XY = external hidden local_unnamed_addr global double, align 8
@StepGPSNoises.lambda_GPS_Z = external hidden local_unnamed_addr global double, align 8

; Function Attrs: nounwind uwtable
define dso_local void @StepGPSNoises(ptr noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  tail call void @NullVect(ptr noundef nonnull @StepGPSNoises.GPSPosition, i32 noundef 3) #4
  tail call void @NullVect(ptr noundef nonnull @StepGPSNoises.GPSVelocity, i32 noundef 3) #4
  %3 = getelementptr inbounds i8, ptr %0, i64 36
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2
  %6 = getelementptr inbounds i8, ptr %1, i64 784
  %7 = getelementptr inbounds i8, ptr %1, i64 960
  %8 = getelementptr inbounds i8, ptr %1, i64 344
  %.pre26 = load ptr, ptr @Noises, align 8, !tbaa !11
  br label %9

9:                                                ; preds = %.lr.ph, %69
  %10 = phi i32 [ %4, %.lr.ph ], [ %70, %69 ]
  %11 = phi ptr [ %.pre26, %.lr.ph ], [ %71, %69 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %69 ]
  %12 = getelementptr inbounds i8, ptr %11, i64 %indvars.iv
  %13 = load i8, ptr %12, align 1, !tbaa !12, !range !14, !noundef !15
  %14 = icmp eq i8 %13, 0
  br i1 %14, label %69, label %15

15:                                               ; preds = %9
  %16 = trunc nuw nsw i64 %indvars.iv to i32
  tail call void @GetAgentsCoordinates(ptr noundef nonnull @StepGPSNoises.GPSPosition, ptr noundef nonnull %0, i32 noundef %16) #4
  tail call void @GetAgentsVelocity(ptr noundef nonnull @StepGPSNoises.GPSVelocity, ptr noundef nonnull %0, i32 noundef %16) #4
  tail call void @NullVect(ptr noundef nonnull @StepGPSNoises.GPSNoiseToAdd, i32 noundef 3) #4
  %17 = tail call double @randomizeGaussDouble(double noundef 0.000000e+00, double noundef 1.000000e+00) #4
  store double %17, ptr @StepGPSNoises.GPSNoiseToAdd, align 16, !tbaa !16
  %18 = tail call double @randomizeGaussDouble(double noundef 0.000000e+00, double noundef 1.000000e+00) #4
  store double %18, ptr getelementptr inbounds (i8, ptr @StepGPSNoises.GPSNoiseToAdd, i64 8), align 8, !tbaa !16
  %19 = tail call double @randomizeGaussDouble(double noundef 0.000000e+00, double noundef 1.000000e+00) #4
  store double %19, ptr getelementptr inbounds (i8, ptr @StepGPSNoises.GPSNoiseToAdd, i64 16), align 16, !tbaa !16
  %20 = load double, ptr @StepGPSNoises.lambda_GPS_XY, align 8, !tbaa !16
  %21 = fmul double %20, 2.000000e+00
  %22 = load double, ptr %6, align 8, !tbaa !18
  %23 = fmul double %21, %22
  %24 = tail call double @sqrt(double noundef %23) #4
  %25 = load double, ptr @StepGPSNoises.lambda_GPS_Z, align 8, !tbaa !16
  %26 = fmul double %25, 2.000000e+00
  %27 = load double, ptr %7, align 8, !tbaa !21
  %28 = fmul double %26, %27
  %29 = tail call double @sqrt(double noundef %28) #4
  tail call void @NullVect(ptr noundef nonnull @StepGPSNoises.Force, i32 noundef 3) #4
  tail call void @VectSum(ptr noundef nonnull @StepGPSNoises.Force, ptr noundef nonnull @StepGPSNoises.Force, ptr noundef nonnull @StepGPSNoises.GPSPosition) #4
  tail call void @UnitVect(ptr noundef nonnull @StepGPSNoises.Force, ptr noundef nonnull @StepGPSNoises.Force) #4
  %30 = fdiv double %24, -3.000000e+02
  %31 = tail call double @VectAbsXY(ptr noundef nonnull @StepGPSNoises.GPSPosition) #4
  %32 = fmul double %30, %31
  %33 = load double, ptr %8, align 8, !tbaa !22
  %34 = fmul double %32, %33
  tail call void @MultiplicateWithScalar(ptr noundef nonnull @StepGPSNoises.Force, ptr noundef nonnull @StepGPSNoises.Force, double noundef %34, i32 noundef 2) #4
  %35 = fdiv double %29, -3.000000e+02
  %36 = load double, ptr getelementptr inbounds (i8, ptr @StepGPSNoises.GPSPosition, i64 16), align 16, !tbaa !16
  %37 = tail call double @llvm.fabs.f64(double %36)
  %38 = fmul double %35, %37
  %39 = load double, ptr %8, align 8, !tbaa !22
  %40 = fmul double %39, %38
  %41 = load double, ptr getelementptr inbounds (i8, ptr @StepGPSNoises.Force, i64 16), align 16, !tbaa !16
  %42 = fmul double %41, %40
  store double %42, ptr getelementptr inbounds (i8, ptr @StepGPSNoises.Force, i64 16), align 16, !tbaa !16
  tail call void @NullVect(ptr noundef nonnull @StepGPSNoises.Damping, i32 noundef 3) #4
  tail call void @VectSum(ptr noundef nonnull @StepGPSNoises.Damping, ptr noundef nonnull @StepGPSNoises.Damping, ptr noundef nonnull @StepGPSNoises.GPSVelocity) #4
  %43 = load double, ptr @StepGPSNoises.lambda_GPS_XY, align 8, !tbaa !16
  %44 = fneg double %43
  %45 = load double, ptr %8, align 8, !tbaa !22
  %46 = fmul double %45, %44
  tail call void @MultiplicateWithScalar(ptr noundef nonnull @StepGPSNoises.Damping, ptr noundef nonnull @StepGPSNoises.Damping, double noundef %46, i32 noundef 2) #4
  %47 = load double, ptr @StepGPSNoises.lambda_GPS_Z, align 8, !tbaa !16
  %48 = fneg double %47
  %49 = load double, ptr %8, align 8, !tbaa !22
  %50 = fmul double %49, %48
  %51 = load double, ptr getelementptr inbounds (i8, ptr @StepGPSNoises.Damping, i64 16), align 16, !tbaa !16
  %52 = fmul double %51, %50
  store double %52, ptr getelementptr inbounds (i8, ptr @StepGPSNoises.Damping, i64 16), align 16, !tbaa !16
  %53 = load double, ptr @StepGPSNoises.lambda_GPS_XY, align 8, !tbaa !16
  %54 = fmul double %53, 2.000000e+00
  %55 = fmul double %49, %54
  %56 = load double, ptr %6, align 8, !tbaa !18
  %57 = fmul double %56, %55
  %58 = tail call double @sqrt(double noundef %57) #4
  tail call void @MultiplicateWithScalar(ptr noundef nonnull @StepGPSNoises.GPSNoiseToAdd, ptr noundef nonnull @StepGPSNoises.GPSNoiseToAdd, double noundef %58, i32 noundef 2) #4
  %59 = load double, ptr @StepGPSNoises.lambda_GPS_Z, align 8, !tbaa !16
  %60 = fmul double %59, 2.000000e+00
  %61 = load double, ptr %8, align 8, !tbaa !22
  %62 = fmul double %60, %61
  %63 = load double, ptr %7, align 8, !tbaa !21
  %64 = fmul double %62, %63
  %65 = tail call double @sqrt(double noundef %64) #4
  %66 = load double, ptr getelementptr inbounds (i8, ptr @StepGPSNoises.GPSNoiseToAdd, i64 16), align 16, !tbaa !16
  %67 = fmul double %65, %66
  store double %67, ptr getelementptr inbounds (i8, ptr @StepGPSNoises.GPSNoiseToAdd, i64 16), align 16, !tbaa !16
  tail call void @VectSum(ptr noundef nonnull @StepGPSNoises.GPSNoiseToAdd, ptr noundef nonnull @StepGPSNoises.GPSVelocity, ptr noundef nonnull @StepGPSNoises.GPSNoiseToAdd) #4
  tail call void @VectSum(ptr noundef nonnull @StepGPSNoises.GPSNoiseToAdd, ptr noundef nonnull @StepGPSNoises.GPSNoiseToAdd, ptr noundef nonnull @StepGPSNoises.Force) #4
  tail call void @VectSum(ptr noundef nonnull @StepGPSNoises.GPSNoiseToAdd, ptr noundef nonnull @StepGPSNoises.GPSNoiseToAdd, ptr noundef nonnull @StepGPSNoises.Damping) #4
  tail call void @InsertAgentsVelocity(ptr noundef nonnull %0, ptr noundef nonnull @StepGPSNoises.GPSNoiseToAdd, i32 noundef %16) #4
  %68 = load double, ptr %8, align 8, !tbaa !22
  tail call void @MultiplicateWithScalar(ptr noundef nonnull @StepGPSNoises.GPSNoiseToAdd, ptr noundef nonnull @StepGPSNoises.GPSNoiseToAdd, double noundef %68, i32 noundef 3) #4
  tail call void @VectSum(ptr noundef nonnull @StepGPSNoises.GPSPosition, ptr noundef nonnull @StepGPSNoises.GPSPosition, ptr noundef nonnull @StepGPSNoises.GPSNoiseToAdd) #4
  tail call void @InsertAgentsCoordinates(ptr noundef nonnull %0, ptr noundef nonnull @StepGPSNoises.GPSPosition, i32 noundef %16) #4
  %.pre = load ptr, ptr @Noises, align 8, !tbaa !11
  %.pre27 = load i32, ptr %3, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %9, %15
  %70 = phi i32 [ %10, %9 ], [ %.pre27, %15 ]
  %71 = phi ptr [ %11, %9 ], [ %.pre, %15 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %72 = sext i32 %70 to i64
  %73 = icmp slt i64 %indvars.iv.next, %72
  br i1 %73, label %9, label %._crit_edge, !llvm.loop !23

._crit_edge:                                      ; preds = %69, %2
  ret void
}

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

declare void @GetAgentsCoordinates(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @GetAgentsVelocity(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare double @randomizeGaussDouble(double noundef, double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #2

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

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

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

declare double @VectAbsXY(ptr noundef) local_unnamed_addr #1

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

declare void @InsertAgentsVelocity(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @InsertAgentsCoordinates(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

attributes #0 = { 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 #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 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !10, i64 36}
!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 = !{!13, !13, i64 0}
!13 = !{!"_Bool", !8, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !8, i64 0}
!18 = !{!19, !17, i64 784}
!19 = !{!"", !20, i64 0, !20, i64 88, !20, i64 176, !20, i64 264, !20, i64 352, !20, i64 440, !20, i64 528, !20, i64 616, !20, i64 704, !20, i64 792, !20, i64 880, !20, i64 968, !20, i64 1056, !20, i64 1144, !20, i64 1232, !20, i64 1320, !8, i64 1408}
!20 = !{!"", !8, i64 0, !8, i64 64, !17, i64 80}
!21 = !{!19, !17, i64 960}
!22 = !{!19, !17, i64 344}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


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