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

; 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.arenas_t = type { [32 x %struct.arena_t], i32 }
%struct.arena_t = type { i32, [32 x i8], [128 x [3 x double]], i32 }
%struct.obstacles_t = type { [32 x %struct.obstacle_t], i32 }
%struct.obstacle_t = type { [32 x i8], [10 x [3 x double]], [2 x double], i32 }
%struct.flocking_model_params_t = type { [256 x i8], i32, [64 x %struct.fl_param_double_t], i32, [64 x ptr], i32 }
%struct.fl_param_double_t = type { [64 x i8], [10 x i8], double, i32, double, double, double, double, [64 x i8], i8, i8, double, ptr, i32, %struct.anon }
%struct.anon = type { [32 x double], [32 x [7 x i8]] }
%struct.phase_t = type { ptr, ptr, ptr, ptr, i32, i32 }
%struct.sit_parameters_t = type { i32, double, double, double, double, double, double, double, i32, double }

@V_Flock = external dso_local global double, align 8
@ArenaRadius = external dso_local global double, align 8
@ArenaCenterX = external dso_local global double, align 8
@ArenaCenterY = external dso_local global double, align 8
@Dim = external dso_local global double, align 8
@.str.44 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [22 x i8], align 1
@Arenas = external dso_local global %struct.arenas_t, align 8
@obstacles = external dso_local global %struct.obstacles_t, align 8
@.str.47 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @InitializePhase(ptr noundef %0, ptr noundef %1, ptr noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca [512 x i8], align 16
  %8 = alloca [512 x i8], align 16
  %9 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 512, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 512, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %10 = getelementptr inbounds [512 x i8], ptr %7, i64 0, i64 0
  %11 = call ptr @getcwd(ptr noundef %10, i64 noundef 512) #5
  %12 = getelementptr inbounds [512 x i8], ptr %7, i64 0, i64 0
  %13 = call ptr @strcat(ptr noundef %12, ptr noundef @.str.44) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %14

14:                                               ; preds = %41, %3
  %15 = load i32, ptr %9, align 4, !tbaa !9
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.flocking_model_params_t, ptr %16, i32 0, i32 3
  %18 = load i32, ptr %17, align 8, !tbaa !11
  %19 = sub nsw i32 %18, 1
  %20 = icmp slt i32 %15, %19
  br i1 %20, label %21, label %44

21:                                               ; preds = %14
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.flocking_model_params_t, ptr %22, i32 0, i32 4
  %24 = load i32, ptr %9, align 4, !tbaa !9
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [64 x ptr], ptr %23, i64 0, i64 %25
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  %28 = call i32 @strcmp(ptr noundef %27, ptr noundef @.str.45) #6
  %29 = icmp eq i32 %28, 0
  br i1 %29, label %30, label %40

30:                                               ; preds = %21
  %31 = getelementptr inbounds [512 x i8], ptr %7, i64 0, i64 0
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.flocking_model_params_t, ptr %32, i32 0, i32 4
  %34 = load i32, ptr %9, align 4, !tbaa !9
  %35 = add nsw i32 %34, 1
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [64 x ptr], ptr %33, i64 0, i64 %36
  %38 = load ptr, ptr %37, align 8, !tbaa !5
  %39 = call ptr @strcpy(ptr noundef %31, ptr noundef %38) #5
  br label %40

40:                                               ; preds = %30, %21
  br label %41

41:                                               ; preds = %40
  %42 = load i32, ptr %9, align 4, !tbaa !9
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %9, align 4, !tbaa !9
  br label %14, !llvm.loop !13

44:                                               ; preds = %14
  %45 = getelementptr inbounds [512 x i8], ptr %7, i64 0, i64 0
  %46 = call i32 (ptr, ...) @printf(ptr noundef @.str.46, ptr noundef %45)
  %47 = getelementptr inbounds [512 x i8], ptr %7, i64 0, i64 0
  %48 = call i32 @ParseArenaFile(ptr noundef %47, ptr noundef @Arenas, i1 noundef zeroext true)
  store i32 0, ptr getelementptr inbounds (%struct.obstacles_t, ptr @obstacles, i32 0, i32 1), align 8, !tbaa !15
  %49 = getelementptr inbounds [512 x i8], ptr %8, i64 0, i64 0
  %50 = call ptr @getcwd(ptr noundef %49, i64 noundef 512) #5
  %51 = getelementptr inbounds [512 x i8], ptr %8, i64 0, i64 0
  %52 = call ptr @strcat(ptr noundef %51, ptr noundef @.str.47) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %80, %44
  %54 = load i32, ptr %9, align 4, !tbaa !9
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.flocking_model_params_t, ptr %55, i32 0, i32 3
  %57 = load i32, ptr %56, align 8, !tbaa !11
  %58 = sub nsw i32 %57, 1
  %59 = icmp slt i32 %54, %58
  br i1 %59, label %60, label %83

60:                                               ; preds = %53
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.flocking_model_params_t, ptr %61, i32 0, i32 4
  %63 = load i32, ptr %9, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [64 x ptr], ptr %62, i64 0, i64 %64
  %66 = load ptr, ptr %65, align 8, !tbaa !5
  %67 = call i32 @strcmp(ptr noundef %66, ptr noundef @.str.48) #6
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %69, label %79

69:                                               ; preds = %60
  %70 = getelementptr inbounds [512 x i8], ptr %8, i64 0, i64 0
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.flocking_model_params_t, ptr %71, i32 0, i32 4
  %73 = load i32, ptr %9, align 4, !tbaa !9
  %74 = add nsw i32 %73, 1
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [64 x ptr], ptr %72, i64 0, i64 %75
  %77 = load ptr, ptr %76, align 8, !tbaa !5
  %78 = call ptr @strcpy(ptr noundef %70, ptr noundef %77) #5
  br label %79

79:                                               ; preds = %69, %60
  br label %80

80:                                               ; preds = %79
  %81 = load i32, ptr %9, align 4, !tbaa !9
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %9, align 4, !tbaa !9
  br label %53, !llvm.loop !17

83:                                               ; preds = %53
  %84 = getelementptr inbounds [512 x i8], ptr %8, i64 0, i64 0
  %85 = call i32 (ptr, ...) @printf(ptr noundef @.str.49, ptr noundef %84)
  %86 = getelementptr inbounds [512 x i8], ptr %8, i64 0, i64 0
  %87 = call i32 @ParseObstacleFile(ptr noundef %86, ptr noundef @obstacles)
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = load double, ptr @ArenaRadius, align 8, !tbaa !18
  %90 = fmul double 2.000000e+00, %89
  %91 = load double, ptr @ArenaRadius, align 8, !tbaa !18
  %92 = fmul double 2.000000e+00, %91
  %93 = load double, ptr @ArenaCenterX, align 8, !tbaa !18
  %94 = load double, ptr @ArenaCenterY, align 8, !tbaa !18
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.phase_t, ptr %95, i32 0, i32 5
  %97 = load i32, ptr %96, align 4, !tbaa !20
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.sit_parameters_t, ptr %98, i32 0, i32 6
  %100 = load double, ptr %99, align 8, !tbaa !22
  %101 = load double, ptr @V_Flock, align 8, !tbaa !18
  %102 = fmul double %101, 2.000000e+00
  %103 = fcmp ogt double %100, %102
  br i1 %103, label %104, label %108

104:                                              ; preds = %83
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.sit_parameters_t, ptr %105, i32 0, i32 6
  %107 = load double, ptr %106, align 8, !tbaa !22
  br label %111

108:                                              ; preds = %83
  %109 = load double, ptr @V_Flock, align 8, !tbaa !18
  %110 = fmul double %109, 2.000000e+00
  br label %111

111:                                              ; preds = %108, %104
  %112 = phi double [ %107, %104 ], [ %110, %108 ]
  call void @PlaceAgentsOnXYPlane(ptr noundef %88, double noundef %90, double noundef %92, double noundef %93, double noundef %94, double noundef 0.000000e+00, i32 noundef 0, i32 noundef %97, double noundef %112)
  %113 = load double, ptr @Dim, align 8, !tbaa !18
  %114 = fcmp oeq double 2.000000e+00, %113
  br i1 %114, label %115, label %143

115:                                              ; preds = %111
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %116

116:                                              ; preds = %139, %115
  %117 = load i32, ptr %9, align 4, !tbaa !9
  %118 = load ptr, ptr %4, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.phase_t, ptr %118, i32 0, i32 5
  %120 = load i32, ptr %119, align 4, !tbaa !20
  %121 = icmp slt i32 %117, %120
  br i1 %121, label %122, label %142

122:                                              ; preds = %116
  %123 = load ptr, ptr %4, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.phase_t, ptr %123, i32 0, i32 0
  %125 = load ptr, ptr %124, align 8, !tbaa !24
  %126 = load i32, ptr %9, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds ptr, ptr %125, i64 %127
  %129 = load ptr, ptr %128, align 8, !tbaa !5
  %130 = getelementptr inbounds double, ptr %129, i64 2
  store double 0.000000e+00, ptr %130, align 8, !tbaa !18
  %131 = load ptr, ptr %4, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.phase_t, ptr %131, i32 0, i32 1
  %133 = load ptr, ptr %132, align 8, !tbaa !25
  %134 = load i32, ptr %9, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds ptr, ptr %133, i64 %135
  %137 = load ptr, ptr %136, align 8, !tbaa !5
  %138 = getelementptr inbounds double, ptr %137, i64 2
  store double 0.000000e+00, ptr %138, align 8, !tbaa !18
  br label %139

139:                                              ; preds = %122
  %140 = load i32, ptr %9, align 4, !tbaa !9
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %9, align 4, !tbaa !9
  br label %116, !llvm.loop !26

142:                                              ; preds = %116
  br label %143

143:                                              ; preds = %142, %111
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 512, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 512, ptr %7) #5
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nounwind
declare ptr @getcwd(ptr noundef, i64 noundef) #2

; Function Attrs: nounwind
declare ptr @strcat(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #2

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

declare i32 @ParseArenaFile(ptr noundef, ptr noundef, i1 noundef zeroext) #4

declare i32 @ParseObstacleFile(ptr noundef, ptr noundef) #4

declare void @PlaceAgentsOnXYPlane(ptr noundef, double noundef, double noundef, double noundef, double noundef, double noundef, i32 noundef, i32 noundef, double noundef) #4

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nounwind willreturn memory(read) "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 = { "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 #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }

!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 45320}
!12 = !{!"", !7, i64 0, !10, i64 256, !7, i64 264, !10, i64 45320, !7, i64 45328, !10, i64 45840}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !10, i64 9472}
!16 = !{!"", !7, i64 0, !10, i64 9472}
!17 = distinct !{!17, !14}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !7, i64 0}
!20 = !{!21, !10, i64 36}
!21 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !10, i64 36}
!22 = !{!23, !19, i64 48}
!23 = !{!"", !10, i64 0, !19, i64 8, !19, i64 16, !19, i64 24, !19, i64 32, !19, i64 40, !19, i64 48, !19, i64 56, !10, i64 64, !19, i64 72}
!24 = !{!21, !6, i64 0}
!25 = !{!21, !6, i64 8}
!26 = distinct !{!26, !14}


; 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.arenas_t = type { [32 x %struct.arena_t], i32 }
%struct.arena_t = type { i32, [32 x i8], [128 x [3 x double]], i32 }
%struct.obstacles_t = type { [32 x %struct.obstacle_t], i32 }
%struct.obstacle_t = type { [32 x i8], [10 x [3 x double]], [2 x double], i32 }

@V_Flock = external dso_local local_unnamed_addr global double, align 8
@ArenaRadius = external dso_local local_unnamed_addr global double, align 8
@ArenaCenterX = external dso_local local_unnamed_addr global double, align 8
@ArenaCenterY = external dso_local local_unnamed_addr global double, align 8
@Dim = external dso_local local_unnamed_addr global double, align 8
@.str.44 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [22 x i8], align 1
@Arenas = external dso_local global %struct.arenas_t, align 8
@obstacles = external dso_local global %struct.obstacles_t, align 8
@.str.47 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @InitializePhase(ptr noundef %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2) local_unnamed_addr #0 {
  %4 = alloca [512 x i8], align 16
  %5 = alloca [512 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %5) #7
  %6 = call ptr @getcwd(ptr noundef nonnull %4, i64 noundef 512) #7
  %7 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.44) #7
  %8 = getelementptr inbounds i8, ptr %1, i64 45320
  %9 = load i32, ptr %8, align 8, !tbaa !5
  %10 = icmp sgt i32 %9, 1
  br i1 %10, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %3
  %11 = add nsw i32 %9, -1
  %12 = getelementptr inbounds i8, ptr %1, i64 45328
  %wide.trip.count = zext nneg i32 %11 to i64
  br label %13

13:                                               ; preds = %.lr.ph, %._crit_edge45
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %18, %._crit_edge45 ]
  %14 = getelementptr inbounds [64 x ptr], ptr %12, i64 0, i64 %indvars.iv
  %15 = load ptr, ptr %14, align 8, !tbaa !10
  %16 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.45) #8
  %17 = icmp eq i32 %16, 0
  %18 = add nuw nsw i64 %indvars.iv, 1
  br i1 %17, label %19, label %._crit_edge45

19:                                               ; preds = %13
  %20 = getelementptr inbounds [64 x ptr], ptr %12, i64 0, i64 %18
  %21 = load ptr, ptr %20, align 8, !tbaa !10
  %22 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) %21) #7
  br label %._crit_edge45

._crit_edge45:                                    ; preds = %13, %19
  %exitcond.not = icmp eq i64 %18, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %13, !llvm.loop !12

._crit_edge:                                      ; preds = %._crit_edge45, %3
  %23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.46, ptr noundef nonnull %4)
  %24 = call i32 @ParseArenaFile(ptr noundef nonnull %4, ptr noundef nonnull @Arenas, i1 noundef zeroext true) #7
  store i32 0, ptr getelementptr inbounds (i8, ptr @obstacles, i64 9472), align 8, !tbaa !14
  %25 = call ptr @getcwd(ptr noundef nonnull %5, i64 noundef 512) #7
  %26 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) @.str.47) #7
  %27 = load i32, ptr %8, align 8, !tbaa !5
  %28 = icmp sgt i32 %27, 1
  br i1 %28, label %.lr.ph29, label %._crit_edge30

.lr.ph29:                                         ; preds = %._crit_edge
  %29 = add nsw i32 %27, -1
  %30 = getelementptr inbounds i8, ptr %1, i64 45328
  %wide.trip.count37 = zext nneg i32 %29 to i64
  br label %31

31:                                               ; preds = %.lr.ph29, %._crit_edge44
  %indvars.iv34 = phi i64 [ 0, %.lr.ph29 ], [ %36, %._crit_edge44 ]
  %32 = getelementptr inbounds [64 x ptr], ptr %30, i64 0, i64 %indvars.iv34
  %33 = load ptr, ptr %32, align 8, !tbaa !10
  %34 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %33, ptr noundef nonnull dereferenceable(1) @.str.48) #8
  %35 = icmp eq i32 %34, 0
  %36 = add nuw nsw i64 %indvars.iv34, 1
  br i1 %35, label %37, label %._crit_edge44

37:                                               ; preds = %31
  %38 = getelementptr inbounds [64 x ptr], ptr %30, i64 0, i64 %36
  %39 = load ptr, ptr %38, align 8, !tbaa !10
  %40 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) %39) #7
  br label %._crit_edge44

._crit_edge44:                                    ; preds = %31, %37
  %exitcond38.not = icmp eq i64 %36, %wide.trip.count37
  br i1 %exitcond38.not, label %._crit_edge30, label %31, !llvm.loop !16

._crit_edge30:                                    ; preds = %._crit_edge44, %._crit_edge
  %41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49, ptr noundef nonnull %5)
  %42 = call i32 @ParseObstacleFile(ptr noundef nonnull %5, ptr noundef nonnull @obstacles) #7
  %43 = load double, ptr @ArenaRadius, align 8, !tbaa !17
  %44 = fmul double %43, 2.000000e+00
  %45 = load double, ptr @ArenaCenterX, align 8, !tbaa !17
  %46 = load double, ptr @ArenaCenterY, align 8, !tbaa !17
  %47 = getelementptr inbounds i8, ptr %0, i64 36
  %48 = load i32, ptr %47, align 4, !tbaa !19
  %49 = getelementptr inbounds i8, ptr %2, i64 48
  %50 = load double, ptr %49, align 8, !tbaa !21
  %51 = load double, ptr @V_Flock, align 8, !tbaa !17
  %52 = fmul double %51, 2.000000e+00
  %53 = fcmp ogt double %50, %52
  %. = select i1 %53, double %50, double %52
  call void @PlaceAgentsOnXYPlane(ptr noundef %0, double noundef %44, double noundef %44, double noundef %45, double noundef %46, double noundef 0.000000e+00, i32 noundef 0, i32 noundef %48, double noundef %.) #7
  %54 = load double, ptr @Dim, align 8, !tbaa !17
  %55 = fcmp oeq double %54, 2.000000e+00
  br i1 %55, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %._crit_edge30
  %56 = load i32, ptr %47, align 4, !tbaa !19
  %57 = icmp sgt i32 %56, 0
  br i1 %57, label %.lr.ph32, label %.loopexit

.lr.ph32:                                         ; preds = %.preheader
  %58 = load ptr, ptr %0, align 8, !tbaa !23
  %59 = getelementptr inbounds i8, ptr %0, i64 8
  %60 = load ptr, ptr %59, align 8, !tbaa !24
  %wide.trip.count42 = zext nneg i32 %56 to i64
  %xtraiter = and i64 %wide.trip.count42, 3
  %61 = icmp ult i32 %56, 4
  br i1 %61, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph32.new

.lr.ph32.new:                                     ; preds = %.lr.ph32
  %unroll_iter = and i64 %wide.trip.count42, 2147483644
  br label %62

62:                                               ; preds = %62, %.lr.ph32.new
  %indvars.iv39 = phi i64 [ 0, %.lr.ph32.new ], [ %indvars.iv.next40.3, %62 ]
  %niter = phi i64 [ 0, %.lr.ph32.new ], [ %niter.next.3, %62 ]
  %63 = getelementptr inbounds ptr, ptr %58, i64 %indvars.iv39
  %64 = load ptr, ptr %63, align 8, !tbaa !10
  %65 = getelementptr inbounds i8, ptr %64, i64 16
  store double 0.000000e+00, ptr %65, align 8, !tbaa !17
  %66 = getelementptr inbounds ptr, ptr %60, i64 %indvars.iv39
  %67 = load ptr, ptr %66, align 8, !tbaa !10
  %68 = getelementptr inbounds i8, ptr %67, i64 16
  store double 0.000000e+00, ptr %68, align 8, !tbaa !17
  %indvars.iv.next40 = or disjoint i64 %indvars.iv39, 1
  %69 = getelementptr inbounds ptr, ptr %58, i64 %indvars.iv.next40
  %70 = load ptr, ptr %69, align 8, !tbaa !10
  %71 = getelementptr inbounds i8, ptr %70, i64 16
  store double 0.000000e+00, ptr %71, align 8, !tbaa !17
  %72 = getelementptr inbounds ptr, ptr %60, i64 %indvars.iv.next40
  %73 = load ptr, ptr %72, align 8, !tbaa !10
  %74 = getelementptr inbounds i8, ptr %73, i64 16
  store double 0.000000e+00, ptr %74, align 8, !tbaa !17
  %indvars.iv.next40.1 = or disjoint i64 %indvars.iv39, 2
  %75 = getelementptr inbounds ptr, ptr %58, i64 %indvars.iv.next40.1
  %76 = load ptr, ptr %75, align 8, !tbaa !10
  %77 = getelementptr inbounds i8, ptr %76, i64 16
  store double 0.000000e+00, ptr %77, align 8, !tbaa !17
  %78 = getelementptr inbounds ptr, ptr %60, i64 %indvars.iv.next40.1
  %79 = load ptr, ptr %78, align 8, !tbaa !10
  %80 = getelementptr inbounds i8, ptr %79, i64 16
  store double 0.000000e+00, ptr %80, align 8, !tbaa !17
  %indvars.iv.next40.2 = or disjoint i64 %indvars.iv39, 3
  %81 = getelementptr inbounds ptr, ptr %58, i64 %indvars.iv.next40.2
  %82 = load ptr, ptr %81, align 8, !tbaa !10
  %83 = getelementptr inbounds i8, ptr %82, i64 16
  store double 0.000000e+00, ptr %83, align 8, !tbaa !17
  %84 = getelementptr inbounds ptr, ptr %60, i64 %indvars.iv.next40.2
  %85 = load ptr, ptr %84, align 8, !tbaa !10
  %86 = getelementptr inbounds i8, ptr %85, i64 16
  store double 0.000000e+00, ptr %86, align 8, !tbaa !17
  %indvars.iv.next40.3 = add nuw nsw i64 %indvars.iv39, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %62, !llvm.loop !25

.loopexit.loopexit.unr-lcssa:                     ; preds = %62, %.lr.ph32
  %indvars.iv39.unr = phi i64 [ 0, %.lr.ph32 ], [ %indvars.iv.next40.3, %62 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.epil.preheader

.epil.preheader:                                  ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv39.epil = phi i64 [ %indvars.iv.next40.epil, %.epil.preheader ], [ %indvars.iv39.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %87 = getelementptr inbounds ptr, ptr %58, i64 %indvars.iv39.epil
  %88 = load ptr, ptr %87, align 8, !tbaa !10
  %89 = getelementptr inbounds i8, ptr %88, i64 16
  store double 0.000000e+00, ptr %89, align 8, !tbaa !17
  %90 = getelementptr inbounds ptr, ptr %60, i64 %indvars.iv39.epil
  %91 = load ptr, ptr %90, align 8, !tbaa !10
  %92 = getelementptr inbounds i8, ptr %91, i64 16
  store double 0.000000e+00, ptr %92, align 8, !tbaa !17
  %indvars.iv.next40.epil = add nuw nsw i64 %indvars.iv39.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 %.loopexit, label %.epil.preheader, !llvm.loop !26

.loopexit:                                        ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader, %.preheader, %._crit_edge30
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %4) #7
  ret void
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nounwind
declare ptr @getcwd(ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcat(ptr noalias noundef returned, ptr noalias nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #3

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

declare i32 @ParseArenaFile(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #6

declare i32 @ParseObstacleFile(ptr noundef, ptr noundef) local_unnamed_addr #6

declare void @PlaceAgentsOnXYPlane(ptr noundef, double noundef, double noundef, double noundef, double noundef, double noundef, i32 noundef, i32 noundef, double noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "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 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 #5 = { 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 #6 = { "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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }

!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, !9, i64 45320}
!6 = !{!"", !7, i64 0, !9, i64 256, !7, i64 264, !9, i64 45320, !7, i64 45328, !9, i64 45840}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !9, i64 9472}
!15 = !{!"", !7, i64 0, !9, i64 9472}
!16 = distinct !{!16, !13}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = !{!20, !9, i64 36}
!20 = !{!"", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !9, i64 32, !9, i64 36}
!21 = !{!22, !18, i64 48}
!22 = !{!"", !9, i64 0, !18, i64 8, !18, i64 16, !18, i64 24, !18, i64 32, !18, i64 40, !18, i64 48, !18, i64 56, !9, i64 64, !18, i64 72}
!23 = !{!20, !11, i64 0}
!24 = !{!20, !11, i64 8}
!25 = distinct !{!25, !13}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.unroll.disable"}


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